Compare commits

..

418 commits

Author SHA1 Message Date
Copilot
0000cd7a02
Fix spelling and grammar mistakes in documentation (#1127)
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
* Initial plan

* Fix spelling and grammar mistakes in documentation

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-05 00:05:31 +01:00
Copilot
9a1dbe06dc
Fix spelling and grammar mistakes in German and English translations (#1125)
* Initial plan

* Fix spelling and grammar mistakes in German and English translations

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-04 23:44:03 +01:00
Jan Böhmer
fd7106af28 Allow that the DEFAULT_URI does not end with a slash
We normalize the url with an env var processor before passing it to the saml lib, to avoid an error. Fixes issue #1118
2025-12-04 23:31:42 +01:00
Jan Böhmer
cb6da36954 Merge remote-tracking branch 'origin/master' 2025-12-04 23:04:47 +01:00
Jan Böhmer
a5275f7be7 Increase DB field length for URLs to 2048 chars
This fixes issue #1122
2025-12-04 23:04:44 +01:00
dependabot[bot]
17f9755b86
Bump actions/checkout from 5 to 6 (#1116)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-04 22:41:11 +01:00
Copilot
a3d6f77fda
Add missing German translations to messages.de.xlf (#1124)
* Initial plan

* Add 41 missing German translations to messages.de.xlf

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-04 22:33:59 +01:00
Jan Böhmer
36e1fcfbed Fixed bulk provider imports, issue described in #869
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
This makes PR #1110 obsolete
2025-12-03 22:22:21 +01:00
Jan Böhmer
1925a71f30 Added translations for new IPN suggestion settings 2025-12-03 21:52:48 +01:00
Jan Böhmer
023d38d170 Allow to configure seperators, category fallback and a global prefix for IPN generation
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
Translations still missing
2025-12-01 23:56:36 +01:00
Jan Böhmer
9a1961bcd7 Fixed fixtures loading (for real now hopefully) 2025-12-01 22:56:47 +01:00
Jan Böhmer
f27f0ab12d Fixed fixtures loading
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2025-11-30 23:40:53 +01:00
Jan Böhmer
9f2989444a Fixed phpstan issues 2025-11-30 23:37:34 +01:00
Jan Böhmer
8efc1ab07d Save changes to yarn.lock 2025-11-30 23:33:11 +01:00
Jan Böhmer
1596b4d7ea Updated jbtronics/settings-bundle for fixing compatibility issues with symfony 7.4 2025-11-30 23:27:27 +01:00
Jan Böhmer
d8ec65461e fixed error messages related to datafixtures in prod 2025-11-30 21:30:17 +01:00
Jan Böhmer
d89a76bdc3 Removed unnecessary frankenphp-symfony runtime, as it is now part of symonfy 7.4 2025-11-30 21:30:00 +01:00
Jan Böhmer
3b4a099285 Use AutowireIterator instead of deprecated TaggedIterator
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2025-11-30 15:43:25 +01:00
Jan Böhmer
161a9e930d Made IPN format help placeholder translatable 2025-11-30 15:38:46 +01:00
Jan Böhmer
3649fffde1 Made password toggle buttons labels translatable 2025-11-30 15:36:54 +01:00
Jan Böhmer
d55d9b43f9 Removed more clutter in settings form translation 2025-11-30 15:33:52 +01:00
Jan Böhmer
8e11e06077 Fixed multi translation of env var tooltip to remove clutter in translation editor 2025-11-30 15:28:22 +01:00
Jan Böhmer
e112a8dbe0 Use static message in settings to remove translation editor clutter 2025-11-30 15:17:37 +01:00
Jan Böhmer
5d843ec8eb Merge branch 'symfony74' 2025-11-30 15:10:21 +01:00
Jan Böhmer
3518321f0e Updated webpack-encore bundle 2025-11-30 15:10:13 +01:00
Jan Böhmer
4750a50fb9 Updated stimulus recipe 2025-11-30 15:07:59 +01:00
Jan Böhmer
52a9975769 Updated security recipe 2025-11-30 15:03:23 +01:00
Jan Böhmer
bb650c2218 Updated routing recipe 2025-11-30 15:01:37 +01:00
Jan Böhmer
3dc66542b2 Updated monolog recipe 2025-11-30 14:51:56 +01:00
Jan Böhmer
070ce800d5 Updated framework bundle recipe 2025-11-30 14:50:46 +01:00
Jan Böhmer
57dc4242b2 Updated phpunit bridge recipe 2025-11-30 14:48:00 +01:00
Jan Böhmer
5fa2167755 config/references update 2025-11-30 14:45:49 +01:00
Jan Böhmer
4eac63b683 Fixed phpunit deprecations 2025-11-30 14:45:40 +01:00
Jan Böhmer
171508fcad Fixed deprecated csv reader usage 2025-11-30 14:34:45 +01:00
Jan Böhmer
e4f8252e0f Upgraded to symfony 7.4 2025-11-30 14:30:04 +01:00
Jan Böhmer
e513960401 Updated dependencies 2025-11-30 14:26:37 +01:00
Jan Böhmer
84e35603b1 Made sidebar toggle button smaller 2025-11-30 14:20:50 +01:00
Jan Böhmer
3459731ca8 Show plural translation for entity type labels in synonym settings 2025-11-30 14:16:54 +01:00
Jan Böhmer
819a8cc56d Fixed category field in part edit page not being correctly rendered 2025-11-30 14:02:42 +01:00
Jan Böhmer
95c5ab7b8b Removed unnecessary polyfills
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2025-11-12 21:54:41 +01:00
Jan Böhmer
f184afc918 Updated dependencies 2025-11-12 21:49:44 +01:00
web-devinition.de
54f318ecac
Implemented the ability to set user-defined synonyms/labels for internal element types
* Implementiere bevorzugte Sprachauswahl und Datenquellen-Synonyme

Die Spracheinstellungen/System-Settings wurden um die Möglichkeit ergänzt, bevorzugte Sprachen für die Dropdown-Menüs festzulegen. Zudem wurde ein Datenquellen-Synonymsystem implementiert, um benutzerfreundlichere Bezeichnungen anzuzeigen und zu personalisieren.

* Anpassung aus Analyse

* Entferne alten JSON-basierten Datenquellen-Synonym-Handler

Die Verwaltung der Datenquellen-Synonyme wurde überarbeitet, um ein flexibleres und strukturiertes Konzept zu ermöglichen. Der bestehende JSON-basierte Ansatz wurde durch eine neue Service-basierte Architektur ersetzt, die eine bessere Handhabung und Erweiterbarkeit erlaubt.

* Ermögliche Rückgabe aller möglichen Sprachoptionen in Verbindung mit den vom Nutzer freigeschalteten.

* Removed unnecessary service definition

The tag is applied via autoconfiguration

* Use default translations for the NotBlank constraint

* Started refactoring ElementTypeNameGenerator

* Made ElementTypeNameGenerator class readonly

* Modified form to work properly with new datastructure

* Made the form more beautiful and space saving

* Made synonym form even more space saving

* Allow to define overrides for any element label there is

* Use defined synonyms in ElementTypeNameGenerator

* Use ElementTypeNameGenerator where possible

* Register synonyms for element types as global translation parameters

* Revert changes done to permission layout

* Use new synonym system for admin page titles

* Removed now unnecessary services

* Reworked settings name and translation

* Renamed all files to Synonyms

* Removed unnecessary translations

* Removed unnecessary translations

* Fixed duplicate check

* Renamed synoynms translations

* Use our synonyms for permission translations

* Fixed phpstan issue

* Added tests

---------

Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-11-12 21:35:02 +01:00
Jan Böhmer
5e3bd26e27
New Crowdin updates (#1105)
* New translations validators.en.xlf (French)

* New translations security.en.xlf (French)

* New translations messages.en.xlf (French)

* New translations messages.en.xlf (French)
2025-11-12 21:34:05 +01:00
Jan Böhmer
e53b72a8d1 Merge remote-tracking branch 'origin/master'
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2025-11-03 00:37:00 +01:00
Jan Böhmer
e8ff15ad0f Updated dependencies 2025-11-03 00:36:56 +01:00
dependabot[bot]
ec6b3ae414
Bump actions/setup-node from 5 to 6 (#1086)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 00:35:12 +01:00
dependabot[bot]
07e4521c30
Bump actions/upload-artifact from 4 to 5 (#1091)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 00:35:03 +01:00
web-devinition.de
771857e014
Added feature for part IPN suggest with category prefixes (#1054)
* Erweiterungstätigkeiten zur IPN-Vorschlagsliste anhand von Präfixen aus den Kategorien

* Umstellung Migrationen bzgl. Multi-Plattform-Support.
Zunächst MySQL, SQLite Statements integrieren.

* Postgre Statements integrieren

* SQL-Formatierung in Migration verbessern

* Erweitere IPN-Suggest um Bauteilbeschreibung.

Die Implementierung berücksichtigt nun zusätzlich die Bauteilbeschreibung zu maximal 150 Zeichen Länge für die Generierung von IPN-Vorschlägen und Inkrementen.

* Anpassungen aus Analyse vornehmen

* IPN-Validierung für Parts überarbeiten

* IPN-Vorschlagslogik um Konfiguration erweitert

* Anpassungen aus phpstan Analyse

* IPN-Vorschlagslogik erweitert und Bauteil-IPN vereindeutigt

Die IPN-Logik wurde um eine Konfiguration zur automatischen Suffix-Anfügung und die Berücksichtigung von doppelten Beschreibungen bei Bedarf ergänzt. Zudem wurde das Datenmodell angepasst, um eine eindeutige Speicherung der IPN zu gewährleisten.

* Regex-Konfigurationsmöglichkeit für IPN-Vorschläge einführen

Die Einstellungen für die IPN-Vorschlagslogik wurden um eine Regex-Validierung und eine Hilfetext-Konfiguration erweitert. Tests und Änderungen an den Formularoptionen wurden implementiert.

* Match range assert and form limits in suggestPartDigits

* Keep existing behavior with autoAppend suffix by default

* Show the regex hint in the browser validation notice.

* Improved translations

* Removed unnecessary service definition

* Removed german comments

---------

Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-11-03 00:31:47 +01:00
web-devinition.de
14a4f1f437
Added custom part status (#1053)
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
* Benutzerdefinierten Bauteilstatus einführen

* PartCustomStateController hinzufügen

* Umstellung Migrationen bzgl. Multi-Plattform-Support.
Zunächst MySQL, SQLite Statements integrieren.

* Postgre Statements integrieren

* Semikolon in Migration entfernen

* Migration für PartCustomState aktualisieren

* Benutzerdefinierten Bauteilstatus in TableSettings aufnehmen

* PartCustomStateControllerTest: Attribute für PHPUnit-Gruppen umgestellt

* PartCustomState: Mapping für Parameter korrigieren

* PartCustomState: Darstellung und Zuordnung von Anhängen ergänzt

Die Sidebar wurde um die Anzeige des benutzerdefinierten Bauteilstatus erweitert, inklusive Vorschaubild, sofern vorhanden.

* Migrationen zusammenführen

* PartCustomState: Anpassungen bzgl. Tests

* PartCustomStateEndpoint hinzufügen

* Made custom part states plural for consistency with other entity captions

* Fixed phpunit error

* Fixed phpstan issues

---------

Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-10-27 21:58:16 +01:00
Jan Böhmer
600686c32b Fixed phpstan issue
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2025-10-19 16:20:08 +02:00
Jan Böhmer
2e3ff05d83 Merge remote-tracking branch 'origin/master' 2025-10-19 16:09:34 +02:00
Jan Böhmer
e9dcdbc30d Bump to Version 2.2.1 2025-10-19 16:09:29 +02:00
Jan Böhmer
6cbb482c0f
New Crowdin updates (#1083)
* New translations messages.en.xlf (English)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)
2025-10-19 16:08:42 +02:00
Jan Böhmer
68aafc4d2e Better align the part parameter tables to each other
Fixes issue #1066
2025-10-19 15:56:18 +02:00
Jan Böhmer
70354c8599 Try to show an more detailed error message, if digikey needs oauth reconnection 2025-10-19 15:45:48 +02:00
Jan Böhmer
43601e060c Update label when pressing enter in label dialog
Fixes issue #996
2025-10-19 15:15:25 +02:00
Jan Böhmer
56f82a7587 Fixed phpstan issues
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2025-10-19 00:39:40 +02:00
Jan Böhmer
4c30cab7c1 Do not change the dropdownParent of tomselect if it is inside a modal
This ensures that it is properly displayed. Fixes issue #1073
2025-10-19 00:34:31 +02:00
Jan Böhmer
1c8ca6c0a2 Added an settings option to change the default behavior of including child categories or not
Fixes issue #1077
2025-10-19 00:19:07 +02:00
Jan Böhmer
5dbe4ba00b Escape like pattern % and _ so that search containing these chars work like expected
This fixes issue #1075
2025-10-19 00:00:03 +02:00
Jan Böhmer
377feaf566 Use yellow alert box for notifying of empty bom on build, show infinite correclty and added translations
Fixes issue #1038
2025-10-18 23:32:20 +02:00
Marc
05839a549c Fix Wrong default number of project builds if BOM is empty #1038 2025-10-18 20:58:19 +02:00
Jan Böhmer
7a1a458abe Fixed error that permission preset was applied when pressing enter in groups and user admin
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
This fixes issue #1039
2025-10-18 20:53:14 +02:00
Jan Böhmer
c71e4cd063 Updated dependencies 2025-10-18 20:52:45 +02:00
Jan Böhmer
d8e093e0c5 Added documentation about manually deleting the var/cache folder while upgrading from 1 to 2
This is related to issue #1084
2025-10-18 20:15:21 +02:00
Jan Böhmer
351e084ab1 Fixed translation of our placeholder ckeditor plugin by keeping existing translations on localization
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2025-10-18 01:17:19 +02:00
Jan Böhmer
bba6fff4a5 Only include the ckeditor translations we really need 2025-10-18 01:07:56 +02:00
Jan Böhmer
a8e92b5f46 Removed unused images leftover from legacy part-db 2025-10-18 01:03:21 +02:00
Jan Böhmer
8315e33258 Added hungarian to list of possible languages
Replaces PR #1081
2025-10-18 00:54:50 +02:00
Jan Böhmer
3881c26ee0 Manually added hungarian translation downloaded from crowdin
Somehow automatic synchronization doesnt work. Related to PR #1081
2025-10-18 00:46:49 +02:00
Jan Böhmer
028c64f6ec Merge remote-tracking branch 'origin/l10n_master' 2025-10-18 00:42:50 +02:00
Jan Böhmer
4088b141a6 New translations validators.en.xlf (Hungarian) 2025-10-17 22:49:41 +02:00
Jan Böhmer
445881bae9 New translations security.en.xlf (Hungarian) 2025-10-17 22:40:52 +02:00
Jan Böhmer
b3f7e445fe New translations messages.en.xlf (English) 2025-10-17 22:40:50 +02:00
Jan Böhmer
1f2a7b86e5 Fixed warning on PHP8.5 2025-10-17 22:39:58 +02:00
Jan Böhmer
ae787530ff Added an settings option to control what languages to show in the dropdown menu 2025-10-17 22:34:27 +02:00
Jan Böhmer
6e4ae15438 Do not remove associated Project BOM entries if part is deleted
Instead the part name is put into the name field. This fixes issue #1068
2025-10-17 21:30:40 +02:00
Jan Böhmer
e06d9da186 Load translations for CKEDITOR if language is not english
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2025-10-17 18:15:04 +02:00
Jan Böhmer
b035014867 Fixed english translation for placeholder plugin and use more modern translation system 2025-10-17 17:57:34 +02:00
Jan Böhmer
746aa53bc3 Fixed dropdown button visibility for ckeditor label placeholder plugin
This fixes issue #1056
2025-10-17 17:41:30 +02:00
Jan Böhmer
7b61a00f21 Updated ckeditor 2025-10-17 17:28:11 +02:00
Jan Böhmer
aa24888ee5 New translations messages.en.xlf (English) 2025-10-17 01:31:20 +02:00
Jan Böhmer
c735bfdb1d Made the titles of the settings categories translatable
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
This fixes issue #1037
2025-10-17 00:35:01 +02:00
Jan Böhmer
41dbc27e27 Updated dependencies 2025-10-17 00:22:06 +02:00
Jan Böhmer
4d98605e93 Fixed problem of missing page breaks when generating multiple labels
This was caused by some behavior change introduced in dompdf 3.1.1
This fixes issue #1070
2025-10-17 00:21:26 +02:00
Jan Böhmer
07166037b9 New translations security.en.xlf (Polish) 2025-09-25 11:53:55 +02:00
Jan Böhmer
e1418dfdc1 Do not create the filter form in the ajax requests for tables, if it is not needed
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2025-09-24 18:13:30 +02:00
Jan Böhmer
ab92620f56 Merge remote-tracking branch 'origin/l10n_master' 2025-09-23 23:39:29 +02:00
Jan Böhmer
0a4b873b77 New translations messages.en.xlf (German) 2025-09-23 23:38:41 +02:00
Jan Böhmer
23bafa4471 Bumped version to 2.2.0 2025-09-23 23:38:32 +02:00
Jan Böhmer
436d3df83f
New Crowdin updates (#1050)
* New translations messages.en.xlf (English)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)
2025-09-23 23:34:51 +02:00
Jan Böhmer
37393dd6c9 Revert "Removed more unused translations"
This reverts commit 8c15af3105.
2025-09-23 23:12:31 +02:00
Jan Böhmer
8c15af3105 Removed more unused translations 2025-09-23 23:11:48 +02:00
Jan Böhmer
0ac1d19415 Removed unused translations related to bulk imports 2025-09-23 23:06:30 +02:00
Jan Böhmer
63a33d1057 Fixed deprecations 2025-09-23 20:55:22 +02:00
Jan Böhmer
a9d0caad5f Fixed some deprecations
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2025-09-23 00:03:04 +02:00
Jan Böhmer
6ed4ad4c8c Use native lazy objects for doctrine when on PHP8.4 2025-09-22 23:52:31 +02:00
Jan Böhmer
71946afd75 Updated dependencies 2025-09-22 22:45:58 +02:00
Jan Böhmer
919bf49ec1 Fix the wrong currency code mouser returns for chinese yuan
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
This fixes issue #1045
2025-09-22 00:20:52 +02:00
Jan Böhmer
001f2e97ea Do not let phpunit fail on deprecations 2025-09-22 00:12:29 +02:00
Jan Böhmer
d2d5490aab Merge remote-tracking branch 'origin/master' 2025-09-22 00:06:25 +02:00
Jan Böhmer
c788fa99e3 Use an older version of maennchen/zipstream-php which is capable of running on 32-bit systems 2025-09-22 00:06:21 +02:00
Jan Böhmer
34d284b1c4 Do not test against real LCSC provider... 2025-09-22 00:05:49 +02:00
dependabot[bot]
67c736f979
Bump actions/setup-node from 4 to 5 (#1034)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-21 23:52:02 +02:00
Jan Böhmer
6b1e7b3544 Run phpunit tests with PHP8.5 2025-09-21 23:51:36 +02:00
Jan Böhmer
da30a6657e Use the new LCSC endpoint for batch searches 2025-09-21 23:51:11 +02:00
Jan Böhmer
2e0b5edd95 Merge remote-tracking branch 'origin/master' 2025-09-21 23:43:16 +02:00
Jan Böhmer
1d6f0b403a Moved scoll to see more actions hint into optgroup title 2025-09-21 23:43:10 +02:00
Jan Böhmer
df65f39d5e Fixed phpunit tests 2025-09-21 23:33:56 +02:00
Jan Böhmer
1bfea3c48a Fixed phpstan issues 2025-09-21 23:27:56 +02:00
Jan Böhmer
07db1554c7 Updated dependencies 2025-09-21 23:15:28 +02:00
Jan Böhmer
ed1e51f694 Merge branch 'feature/batch-info-provider-import' 2025-09-21 23:14:09 +02:00
Jan Böhmer
5b71d68179 Added tests for new DTO objects 2025-09-21 23:07:45 +02:00
Jan Böhmer
b94e28a961 Added a bit of documentation about the new features 2025-09-21 22:52:23 +02:00
Jan Böhmer
1d52b7c464 Fixed tests 2025-09-21 21:35:13 +02:00
Jan Böhmer
0d49632b92 Refactored constraints, to reuse existing mechanisms 2025-09-21 20:45:18 +02:00
Jan Böhmer
702e5c8732 Use underscore in route paths instead of hyphens to match the other path styles 2025-09-21 19:58:15 +02:00
Jan Böhmer
d2b605edc0 Imrpoved bulk info provider manage page 2025-09-21 19:54:40 +02:00
Jan Böhmer
4c28871283 Fixed problem of failing researchAllParts
This maybe should be revisited in the future, but for now this fix should work
2025-09-21 19:47:49 +02:00
Jan Böhmer
1d38c50abc Fixed step2 template 2025-09-21 19:30:49 +02:00
Jan Böhmer
710569daaf Fixed phpunit tests 2025-09-21 19:03:29 +02:00
Jan Böhmer
92cd645945 Renamed dto to make their relation to batch searches more clear 2025-09-21 17:49:00 +02:00
Jan Böhmer
16126c4000 Encapsulate the fieldmapping data in the importjob further 2025-09-21 17:41:56 +02:00
Jan Böhmer
eda6deff47 Made classes readonly where possible 2025-09-21 14:25:57 +02:00
Jan Böhmer
27a18bdc1e Doing refactoring to remove remains of arrays 2025-09-21 14:24:34 +02:00
Jan Böhmer
98b62cc81e Do not autowire bulkImport parameters globally 2025-09-20 14:33:16 +02:00
barisgit
2c195d9767 Refactor bulk info provider: replace complex arrays with DTOs
- Add BulkSearchResponseDTO, FieldMappingDTO for type safety
- Use composition instead of inheritance in BulkSearchResultDTO
- Remove unnecessary BulkSearchRequestDTO
- Fix N+1 queries and API error handling
- Fix Add Mapping button functionality
2025-09-19 16:28:40 +02:00
Jan Böhmer
bb49c67108 Removed Microsoft X-XSS-Protection header, as it is not recommended on modern browsers anymore and is considered deprecated 2025-09-19 09:18:49 +02:00
Jan Böhmer
f0dc80aac9
New Crowdin updates (#1036)
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
* New translations messages.en.xlf (German)

* New translations validators.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations security.en.xlf (German)

* New translations validators.en.xlf (Dutch)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations security.en.xlf (German)

* New translations messages.en.xlf (German)
2025-09-19 09:12:47 +02:00
Jan Böhmer
8998b006e0 Added some type hints for arrays 2025-09-14 23:17:43 +02:00
Jan Böhmer
b4b758c356 Fixed tests 2025-09-14 23:14:00 +02:00
Jan Böhmer
a399b629d1 Use a proper range constraint on the form
Otherwise it is possible to inject invalid data
2025-09-14 23:04:44 +02:00
Jan Böhmer
41a7238ab7 Pass parts object directly to BulkSearchRequestDTO and added some syntax hints 2025-09-14 22:56:12 +02:00
Jan Böhmer
0e99faee0a Moved BulkImportJobStatus enum to own file to make it discoverable by autoloading 2025-09-14 22:23:07 +02:00
Jan Böhmer
13e75808f8 Use validateJobAccess where applicable and ensure permissions for all controller endpoints 2025-09-14 16:24:56 +02:00
Jan Böhmer
1a0fab0615 Use a deterministic method to generate parameter names for filters, to allow for proper caching of queries
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-09-09 23:05:03 +02:00
Jan Böhmer
fcdeb0479a Bumped version 2.1.2
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-09-09 21:31:15 +02:00
Jan Böhmer
79ac318d0f Merge remote-tracking branch 'origin/l10n_master' 2025-09-09 21:30:22 +02:00
Jan Böhmer
6765c110c6 New translations messages.en.xlf (English) 2025-09-09 21:23:52 +02:00
Jan Böhmer
f6f83cc111 New translations messages.en.xlf (Czech) 2025-09-09 21:23:41 +02:00
d-buchmann
c6d5fb3f57 Update translations
When the part count notice is always displayed, the exclamation mark would probably be perceived as rather annoying.
(Of course this would have to be reflected in crowdin)
2025-09-09 21:20:42 +02:00
Jan Böhmer
4b8ef4b0fa Allow the defaultSearchProviders option to be empty
This fixes issue #1032
2025-09-09 21:19:12 +02:00
barisgit
46d8c86e0c Improved makefile 2025-09-09 20:57:58 +02:00
barisgit
c7102bcd8c Update bulk info provider test to work with new services approach 2025-09-09 20:54:27 +02:00
barisgit
d6ac16ede0 Refactor bulk import functionality to make controller smaller (use services) add DTOs and use stimulus controllers on frontend 2025-09-09 20:30:27 +02:00
Jan Böhmer
23cad8261b New translations messages.en.xlf (Czech) 2025-09-09 14:12:30 +02:00
barisgit
65d840c444 Fix invalid flag --memory-limit 2025-09-09 10:31:33 +02:00
Jan Böhmer
c52126ccf8
Update PHP version badge in README to 8.2
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-09-08 12:53:03 +02:00
Jan Böhmer
8eec606589 Bumped to version 2.1.1
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-09-07 23:58:41 +02:00
Jan Böhmer
cdc58507db Removed style nonce, as it blocks the loading of all other inline styles and kills the styling of the sidebar treeviews 2025-09-07 23:58:21 +02:00
Jan Böhmer
03f7ad66d2 Bumped version to 2.1.0 2025-09-07 23:16:15 +02:00
Jan Böhmer
3b01af1247 Merge branch 'l10n_master' 2025-09-07 23:15:53 +02:00
Jan Böhmer
8d2ff6f5d7 New translations messages.en.xlf (English) 2025-09-07 22:37:16 +02:00
Jan Böhmer
6ff7f64384 New translations messages.en.xlf (German) 2025-09-07 22:37:11 +02:00
Jan Böhmer
c2cbbee0df Ensure that part table action bar dont overlap our navbar dropdowns
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-09-07 21:59:30 +02:00
Jan Böhmer
e81c8470be Made part table action bar sticky floating
Related to PR #997
2025-09-07 21:52:04 +02:00
Jan Böhmer
ecd2abe00e Made image size of preview images in tables configurable and slightly bigger by default
This makes PR #984 and #623 obsolete
2025-09-07 21:21:08 +02:00
Jan Böhmer
0d1ae030be Allow to select default info providers for search
This fixes issue #556
2025-09-07 20:42:33 +02:00
Jan Böhmer
1f669a9c53 Readded option to show all elements in a table 2025-09-07 20:04:48 +02:00
Jan Böhmer
8ff2fc5a82 Allow to disable the extraction of parameters out of part description and notes
Fixes issue #747
2025-09-07 19:55:58 +02:00
Jan Böhmer
c7ec8adc31 Disable settings caching in debug mode
Otherwise we run into errors, if a settings get changed
2025-09-07 19:44:32 +02:00
Jan Böhmer
cee6d355e8 Allow to hide the version number on homepage 2025-09-07 19:43:23 +02:00
Jan Böhmer
4b00697f02 Allow to customize which items get shown on the homepage and in which order
This fixes issue #470 and #894
2025-09-07 19:27:02 +02:00
Jan Böhmer
617ae03b48 Merge remote-tracking branch 'origin/master' 2025-09-07 17:56:30 +02:00
Jan Böhmer
71629a696c Use updated gnu unifont 2025-09-07 17:55:55 +02:00
Jan Böhmer
14cc0b9e9a
New translations messages.en.xlf (German) (#1028) 2025-09-07 17:53:12 +02:00
Jan Böhmer
c5a1df37b9 Fixed tests
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-09-07 00:26:24 +02:00
Jan Böhmer
46d1a0cb1b Added an button to update a label profile from directly inside the label generator
Related to issue #994
2025-09-06 23:57:04 +02:00
Jan Böhmer
a18ec373d2 Validate label profiles before creating them via the label controller, so that we do not create duplicate entries
This fixes issue #994
2025-09-06 23:49:14 +02:00
Jan Böhmer
ced16620ec Fixed pollin info provider
This fixes issue #1015
2025-09-06 23:42:09 +02:00
Jan Böhmer
890621b651 Merge branch 'feature/upload-schematic-boms' 2025-09-06 23:34:55 +02:00
Jan Böhmer
5a5691a8c4 Added documentation about the new BOM file types 2025-09-06 23:34:47 +02:00
Jan Böhmer
fb92db8c05 Use body element as dropdownParent for tomselect elements
This improves UX
2025-09-06 23:32:08 +02:00
Jan Böhmer
2b28aa8ba9 Enable CSP also in debug mode, as otherwise it complains about missing nonce function 2025-09-06 23:29:19 +02:00
Jan Böhmer
90f83273da Added nonce to scripts to ensure that they are working with enabled CSP 2025-09-06 23:24:32 +02:00
Jan Böhmer
76f3c379b5 Added generic CSV type option, to highlight the universal nature of the importer 2025-09-06 23:20:07 +02:00
Jan Böhmer
1d33d95c57 Show validation error messages in mapping step 2025-09-06 23:10:47 +02:00
Jan Böhmer
72e3766be5 Added missing translations that got removed during rebase 2025-09-06 23:10:12 +02:00
barisgit
7c1ab6460d Add tests to cover new additions 2025-09-06 19:54:13 +02:00
barisgit
d0f2422e0d Implement functionality to import schematic csv (or any other csv for that matter), with ability to map input columns to output columns with input validation and error handling 2025-09-06 19:54:13 +02:00
barisgit
4277f42285 Fix same error as in other branch and add makefile 2025-09-06 19:53:56 +02:00
d-buchmann
0e9558e331
Do not mark internal (relative) links as external and open in new tab in markdown blocks
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
Don't handle links as external by default. Instead distiguish internal (relative) and external (absolute) links.
2025-09-06 19:49:38 +02:00
d-buchmann
4e9e82d9f1
Replace "range" indicators with mathematical tilde in LCSC provider (#989)
* Replace "range" indicators with mathematical tilde symbols in LCSC provider

* Improve comment
2025-09-06 19:43:50 +02:00
Jan Böhmer
411ac500ba
New Crowdin updates (#1008)
* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (German)
2025-09-06 19:43:05 +02:00
d-buchmann
b1443a817b
Add import permission for label profiles (#1021) 2025-09-06 19:42:07 +02:00
Jan Böhmer
3e8ca06177 Fixed text color in ckeditor editors when in dark mode
Fixes issue #1016
2025-09-06 19:34:31 +02:00
Jan Böhmer
c1b7272ab1 Updated frontend dependencies 2025-09-06 19:30:17 +02:00
Jan Böhmer
b093866d15 Do not replace LCSC category slashes with arrows, as these are actually their names, not level separators 2025-09-06 19:27:10 +02:00
Jan Böhmer
065ef9f8ae Fixed LCSC provider
LCSC has changed its search API, so it was broken. Fixes issue #1018
2025-09-06 19:22:59 +02:00
Jan Böhmer
9b17efc12c Fixed phpstan issue
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-09-06 00:39:23 +02:00
Jan Böhmer
fe7910a2f2 Fixed invalid name for currency in data fixture 2025-09-06 00:39:16 +02:00
Jan Böhmer
eb4258053e Added voter reason explaination to the other voters 2025-09-06 00:24:55 +02:00
Jan Böhmer
117ff4484d Allow to show what permissions a user is lacking in case of access denied message
Should help with errors like 1026
2025-09-06 00:10:50 +02:00
Jan Böhmer
ba7d139f8a Grey out info provider settings button if the user misses system settings permission
Helps to make the problem in #1026 more clear
2025-09-05 23:33:05 +02:00
Jan Böhmer
d657b2ff04 Merge remote-tracking branch 'd-buchmann/fix-formatting-mass-creation' 2025-09-05 23:26:17 +02:00
Jan Böhmer
0637c05053 Merge remote-tracking branch 'd-buchmann/sqlite-min-version' 2025-09-05 23:26:13 +02:00
Jan Böhmer
88fbc46325 Added test for Currency Admin Controller 2025-09-05 23:25:20 +02:00
Jan Böhmer
379155e839 Allow for more currency exchange rate pairs, without need for fixer.io 2025-09-05 22:15:04 +02:00
Jan Böhmer
0717239296 Use central banks of czechia, turkey and romania as a free provider for their currencies exchange rates
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-09-05 19:56:01 +02:00
Jan Böhmer
d3e3c4e3f8 Fixed currency admin page and modernized underlying swap packages
Fixes issue #1009
2025-09-05 19:35:58 +02:00
d-buchmann
c9a1febc56 Fix formatting: Use literal '->' in CDATA context 2025-09-04 14:59:40 +02:00
d-buchmann
7f099972e1 Documentation - Require SQLite 3.35
That way, migrations that try to drop columns won't fail anymore (regardless if the user intended to use sqlite or not)
2025-09-04 14:50:59 +02:00
Jan Böhmer
52444e05e4 Optimized LCSC batch search calls and extracted it into interface for potential general use in the future 2025-08-31 23:41:16 +02:00
Jan Böhmer
4fcd55748f Use new settings object in LCSCProvider 2025-08-31 23:27:53 +02:00
Jan Böhmer
d57107ed3e Do not use ob_* functions in XSLX exporter, as this affects global state and can lead to sideffects 2025-08-31 23:05:07 +02:00
Jan Böhmer
0c7aa5e92a Fixed phpunit tests 2025-08-31 22:56:10 +02:00
Jan Böhmer
17f123ba8a Fixed logentryRepositoryTest
It seems that this was always wrong, but this was never noticed, because normally the log timestamps are all the same
2025-08-31 22:51:47 +02:00
Jan Böhmer
1156bb52af Added phpoffice dependency 2025-08-31 22:50:56 +02:00
barisgit
71be75b3e7 Improve test coverage 2025-08-31 22:18:25 +02:00
barisgit
5a4f151ca3 Add BulkInfoProviderImportJobPart to element type name generator 2025-08-31 22:18:25 +02:00
barisgit
9729a43f2b Add bulk_info_provider_import_job_part.label 2025-08-31 22:18:24 +02:00
barisgit
4da403569c Increase time limit on batch search and add option to priorities which fields to choose 2025-08-31 22:18:24 +02:00
barisgit
74be016b68 Add abbility to search faster on LCSC without details 2025-08-31 22:18:24 +02:00
barisgit
3896d3d9ab Fix a single failing test 2025-08-31 22:18:24 +02:00
barisgit
ed396765c8 Let symfony manage translations 2025-08-31 22:18:24 +02:00
barisgit
cc9d50a8fe Add makefile to help with development setup, change part_ids in bulk import jobs to junction table and implement filtering based on bulk import jobs status and its associated parts' statuses. 2025-08-31 22:17:05 +02:00
barisgit
9b4d5e9c27 Improve test coverage 2025-08-31 22:16:28 +02:00
barisgit
ccb837e4b4 Fix migration error and dto error 2025-08-31 22:16:28 +02:00
barisgit
2bc39e7791 Add tests and fix static errors 2025-08-31 22:16:27 +02:00
barisgit
fa7f3a1da1 Fix tests 2025-08-31 22:16:27 +02:00
barisgit
c91d37d2a4 More sophisticated two-step bulk import from info providers 2025-08-31 22:16:27 +02:00
barisgit
5ab7ac4d4b Move pageSize and table columns filter buttons apart a bit 2025-08-31 22:16:27 +02:00
barisgit
4c8940f9c3 Simple batch processing 2025-08-31 22:16:27 +02:00
barisgit
aa29f10d51 Remove problematic tests 2025-08-31 22:15:58 +02:00
barisgit
78885ec3c5 Add more tests and fix failing ones 2025-08-31 22:15:58 +02:00
barisgit
1fb137e89f Add export functionality to batch select and fix errors 2025-08-31 22:15:58 +02:00
barisgit
facfb37383 Implement excel based import/export 2025-08-31 22:15:58 +02:00
barisgit
c5751b2aa6 Fix timestamp test 2025-08-31 22:13:54 +02:00
barisgit
aa4299041b Update example import csv to schow real capatibilities 2025-08-31 22:13:54 +02:00
barisgit
c27f2246a3 Update part merger to consider rows with same supplier and spn duplicates 2025-08-31 22:13:54 +02:00
Jan Böhmer
a6be786d5d Bump to version 2.0.2
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-31 15:20:22 +02:00
Jan Böhmer
578a030175 Reverted english translations which were broken by the PR 2025-08-31 15:19:05 +02:00
Jan Böhmer
f858e68f12 Merge remote-tracking branch 'origin/l10n_master' 2025-08-31 15:14:37 +02:00
Jan Böhmer
bdd88700d4 Start php-fpm directly in our docker entrypoint
This way it gets all environment variables and we do not need to hassle ourselves with the generation of php-fpm config files and we can use the normal clear_env=no option

This fixes issue #1006
2025-08-31 15:13:45 +02:00
Jan Böhmer
87cf75f67d New translations security.en.xlf (Czech) 2025-08-31 15:12:32 +02:00
Jan Böhmer
c3cc7cb0d6 New translations validators.en.xlf (Czech) 2025-08-31 15:12:31 +02:00
Jan Böhmer
e1600cdec9 New translations messages.en.xlf (Czech) 2025-08-31 15:12:30 +02:00
Jan Böhmer
431cf23600 Do not pollute docker logs with deprecation notices in error case 2025-08-31 15:11:31 +02:00
Jan Böhmer
08ce1795fc Use correct column for ordering when the columns were reordered
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-31 01:44:26 +02:00
Jan Böhmer
e369ce6db9 Disable searching option on datatables which we do not need and which causes an CSP violation 2025-08-31 01:34:31 +02:00
Jan Böhmer
af4ea17faa Fixed formatting error in english translations 2025-08-31 01:22:19 +02:00
Jan Böhmer
bb13ebc0ec Put the upgrade docs under the correct section 2025-08-30 22:43:53 +02:00
Jan Böhmer
3b42d7a2c8 Bumped version to 2.0.0 2025-08-30 22:40:59 +02:00
Jan Böhmer
e98d988c45 Fixed phpstan issues 2025-08-30 22:36:00 +02:00
Jan Böhmer
cc70e77dee Revert "New translations messages.en.xlf (German)"
This reverts commit 50f478f7ef.
2025-08-30 22:15:27 +02:00
Jan Böhmer
7a86109d66 Merge remote-tracking branch 'origin/master' 2025-08-30 22:15:15 +02:00
Jan Böhmer
5238be1460 Added permissions to github actions 2025-08-30 22:15:09 +02:00
dependabot[bot]
6edc8056ec
Bump actions/checkout from 4 to 5 (#992)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-30 22:00:08 +02:00
Jan Böhmer
b19cc13897 New translations messages.en.xlf (English) 2025-08-30 21:59:36 +02:00
Jan Böhmer
50f478f7ef New translations messages.en.xlf (German) 2025-08-30 21:59:33 +02:00
Jan Böhmer
80482f7294 Moved form extensions into their directory 2025-08-30 21:59:10 +02:00
Jan Böhmer
dc864fad04 Removed the deprecated symfony/ux-toggle-password package by replacing it by our own local versions 2025-08-30 21:57:57 +02:00
Jan Böhmer
6d495b38b4 Removed env vars from docker-compose example 2025-08-30 21:48:42 +02:00
Jan Böhmer
1c838d1e42 Set APP_ENV again otherwise we will run into error messages on existing deployments 2025-08-30 21:46:42 +02:00
Jan Böhmer
652c7abbce Merge remote-tracking branch 'origin/l10n_master' 2025-08-30 21:44:06 +02:00
Jan Böhmer
d925fd8913 Updated dependencies 2025-08-30 21:42:58 +02:00
Jan Böhmer
9a8e34cbe3 Changed classical docker image in the way that we do not need to passthrough env vars explicitly 2025-08-30 21:40:24 +02:00
Jan Böhmer
34ae83cc8c New translations messages.en.xlf (German) 2025-08-30 19:53:21 +02:00
Jan Böhmer
e26e6da15d New translations validators.en.xlf (German) 2025-08-30 01:51:14 +02:00
Jan Böhmer
d45cd23c0f Fixed docs build
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-30 01:06:33 +02:00
Jan Böhmer
b60a1070e9 New translations validators.en.xlf (English) 2025-08-30 00:47:20 +02:00
Jan Böhmer
7f04827a0b New translations messages.en.xlf (English) 2025-08-30 00:47:19 +02:00
Jan Böhmer
da11c9b793 Merge branch 'v2' 2025-08-30 00:41:08 +02:00
Jan Böhmer
93b04fbf94 Use nodejs 22 in docker images
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-30 00:32:43 +02:00
Jan Böhmer
a2d94b54b1 Use PHP 8.4 in docker images 2025-08-30 00:31:50 +02:00
Jan Böhmer
1aedcc056f Fixed (hopefully) frankenphp dockerfile 2025-08-30 00:30:54 +02:00
Jan Böhmer
2019f44395 Updated dependencies 2025-08-30 00:10:59 +02:00
Jan Böhmer
b217d3e4ef Added info about the configuration of the info provider system 2025-08-30 00:08:29 +02:00
Jan Böhmer
e3125e3afb Document system settings in getting_started guide 2025-08-29 23:33:35 +02:00
Jan Böhmer
d5c5c7c772 Added documentation about the censoring 2025-08-29 23:25:58 +02:00
Jan Böhmer
f945118827 Redact API keys overwritten via env variables to prevent leakage to undesired users 2025-08-29 23:24:42 +02:00
Jan Böhmer
ab811b1b7b Updated debian installation guide
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-29 00:12:01 +02:00
Jan Böhmer
1cd5d7b073 Updated configuration documentation 2025-08-28 23:59:39 +02:00
Jan Böhmer
c9576f0b08 Documented env migration command 2025-08-28 23:50:32 +02:00
Jan Böhmer
cbedb377ac Added migration guide 2025-08-28 23:49:01 +02:00
Jan Böhmer
6340bdd677 Updated dependencies 2025-08-28 23:11:26 +02:00
Jan Böhmer
f41722c7eb Merge remote-tracking branch 'origin/master' into v2 2025-08-28 23:04:46 +02:00
Jan Böhmer
b645c674bc Added documentation on how to configure proxy internet access
Related to issue #1001
2025-08-28 23:04:14 +02:00
Jan Böhmer
e45a56c66a
Bump version from 1.17.3 to 1.17.4
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-28 22:55:32 +02:00
Jan Böhmer
b4a7d18ace
Pass proxy env vars to symfony
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-25 15:55:28 +02:00
Jan Böhmer
d70fe0fbaa Improved styling of help text in settings forms
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-24 23:42:39 +02:00
Jan Böhmer
48ff2494f6 Add settings form for remaining info providers 2025-08-24 23:35:31 +02:00
Jan Böhmer
ee33d743e6 Allow to associate settings forms with info providers 2025-08-24 23:32:58 +02:00
Jan Böhmer
eaaf44b391 Fixed disable logic and disable hints for info providers
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-24 21:10:38 +02:00
Jan Böhmer
a48490ac1a Show flash messages on saving settings 2025-08-24 21:01:07 +02:00
Jan Böhmer
cb63b3bde7 Set empty_data to null for APIKeyType 2025-08-24 20:54:04 +02:00
Jan Böhmer
f48791e961 Use a special form type for api key settings, that hide the api key by default as dots 2025-08-24 20:04:52 +02:00
Jan Böhmer
a75a60fecd Use settings-bundle 3.0.0 to ensure cache invalidation on env var change 2025-08-24 19:33:26 +02:00
Jan Böhmer
ac89489202 Allow to override the banner with its existing env variable 2025-08-24 17:37:16 +02:00
Jan Böhmer
ae08d9539d Fixed ckeditor loading
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-24 12:35:14 +02:00
Jan Böhmer
275b695d6b Use ajax_replace option for symfony debug toolbar instead of custom event subscriber 2025-08-24 12:24:08 +02:00
Jan Böhmer
d4d80de10f Show a tooltip on which env needs to be set to override a certain settings parameter 2025-08-24 12:03:37 +02:00
Jan Böhmer
49ddb2938f Updated dependencies 2025-08-24 11:33:35 +02:00
Jan Böhmer
7054c51490 Started documenting the upgrade process
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-15 01:04:20 +02:00
Jan Böhmer
808af0d3cd Fixed phpstan issue 2025-08-15 00:52:19 +02:00
Jan Böhmer
b14fc0e22a Only use inline style for commonmark parser 2025-08-15 00:09:28 +02:00
Jan Böhmer
f7259a118b Removed invalid reference to parsedown 2025-08-14 22:56:40 +02:00
Jan Böhmer
be60c4363c Replaced parsedown with the newer league/commonmark library 2025-08-14 22:56:20 +02:00
Jan Böhmer
631db7df31 Fixed postgresql migrations 2025-08-14 22:37:40 +02:00
Jan Böhmer
781ea45633 Removed ArrayType which is not necessary anymore with the new webauthn lib 2025-08-14 18:47:17 +02:00
Jan Böhmer
0eee161630 Use new webauthn library for 2FA 2025-08-14 18:46:10 +02:00
Jan Böhmer
7a1b9b8ce1 Updated dependencies 2025-08-13 16:13:25 +02:00
Jan Böhmer
3fcb5ce82e Merge branch 'master' into v2 2025-08-13 16:07:20 +02:00
Jan Böhmer
d9ef9cd7b7 New translations messages.en.xlf (English) 2025-08-13 14:45:00 +02:00
Jan Böhmer
247fed7d74 Fixed login CSFR token error
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-04 23:50:25 +02:00
Jan Böhmer
c834058678 Updated to API Platform 4 2025-08-04 23:32:42 +02:00
Jan Böhmer
6c229ccb3a Updated datatables bundle 2025-08-04 22:25:45 +02:00
Jan Böhmer
696eb8092a Updated brick/math 2025-08-04 22:20:01 +02:00
Jan Böhmer
f9b85c3b85 Fixed deprecation on PHP8.4
Implements PR #970
2025-08-04 22:15:32 +02:00
Jan Böhmer
496df89e0b Added configuration what should be reported for test coverage by phpunit
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-03 22:04:45 +02:00
Jan Böhmer
58d4207b49 Fixed phpstan issues 2025-08-03 21:59:51 +02:00
Jan Böhmer
390736cf5a Made bin/phpunit executable again 2025-08-03 21:48:38 +02:00
Jan Böhmer
fd090b8701 Use newer version of settings-bundle that should not fail anymore if the database does not exist during cache warmup 2025-08-03 21:43:56 +02:00
Jan Böhmer
286cd009de Use node 20 in test runners 2025-08-03 21:23:26 +02:00
Jan Böhmer
1f384a6ab8 Removed Part-DB 8.1 runner on github 2025-08-03 21:21:42 +02:00
Jan Böhmer
883d38ecfc Updated barcode-detector lib and wasm in background 2025-08-03 21:19:19 +02:00
Jan Böhmer
a691be6584 Updated datatables.net-select-bs5 plugin 2025-08-03 20:55:25 +02:00
Jan Böhmer
833a8c34f4 Updated stimulus-bridge 2025-08-03 20:51:35 +02:00
Jan Böhmer
9fde748fbe Updated marked 2025-08-03 20:46:53 +02:00
Jan Böhmer
8c22ec46bc Require nodejs 20.0 or later 2025-08-03 20:44:45 +02:00
Jan Böhmer
74cc8629f6 Upgrade fontawesome 6 -> 7 2025-08-03 20:40:03 +02:00
Jan Böhmer
fc3857aa67 Use greek special chars plugin for label editor
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-08-03 20:24:56 +02:00
Jan Böhmer
db1b91fc32 Use ckeditors emoji picker instead of our own plugin 2025-08-03 20:22:00 +02:00
Jan Böhmer
e87720a838 Fixed CKEDITOR 2025-08-03 20:00:36 +02:00
Jan Böhmer
74fef78120 Updated ckeditor and use new mono package 2025-08-03 19:46:57 +02:00
Jan Böhmer
9eb8e33e09 Updated dependencies 2025-08-03 19:10:45 +02:00
Jan Böhmer
8bcebf57c4 New translations messages.en.xlf (Spanish) 2025-07-30 09:32:00 +02:00
Jan Böhmer
e2735823a0 Fixed tests for new PHPunit 11.5
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-07-14 21:57:27 +02:00
Jan Böhmer
f3ad3c1ffe Run phpunit code quality rector 2025-07-14 00:38:54 +02:00
Jan Böhmer
f215bd11cd Updated rector config 2025-07-14 00:36:35 +02:00
Jan Böhmer
dc480f755c Migrated phpunit annotations to attributes 2025-07-14 00:32:06 +02:00
Jan Böhmer
f1d34bbc24 Run rector 2025-07-14 00:26:40 +02:00
Jan Böhmer
6665203f2a Updated rector config 2025-07-14 00:25:39 +02:00
Jan Böhmer
ce86863095 Updated dama doctrine-test bundle recipe 2025-07-14 00:16:01 +02:00
Jan Böhmer
e2bad9e9da Updated phpunit recipe 2025-07-14 00:15:08 +02:00
Jan Böhmer
2cd2a481d9 Updated phpunit recipe 2025-07-14 00:06:44 +02:00
Jan Böhmer
78de2c5e03 Updated phpunit to 11.5 2025-07-14 00:05:44 +02:00
Jan Böhmer
dc25397469 Fixed PHPunit tests
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-07-13 20:06:38 +02:00
Jan Böhmer
db810445fb Updated phpunit recipe
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-07-13 16:53:41 +02:00
Jan Böhmer
a3db52b184 Updated api-platform recipe 2025-07-13 16:52:26 +02:00
Jan Böhmer
7d96b2a611 Updated webpack-encore recipe 2025-07-13 16:51:10 +02:00
Jan Böhmer
50f4c01e99 Updated ux-turbo recipe 2025-07-13 16:46:41 +02:00
Jan Böhmer
0bc6d9986b Updated stimulus-bundle 2025-07-13 16:44:10 +02:00
Jan Böhmer
d3c3fedac2 Updated routing recipe 2025-07-13 16:40:56 +02:00
Jan Böhmer
6137065b4e Updated framework-bundle recipe 2025-07-13 16:40:14 +02:00
Jan Böhmer
a58fcd94dd Updated translation recipe 2025-07-13 16:32:22 +02:00
Jan Böhmer
daec5aa4b1 Updated web-profiler-bundle recipe 2025-07-13 16:31:25 +02:00
Jan Böhmer
2819b457fa Updated validator recipe 2025-07-13 16:30:11 +02:00
Jan Böhmer
1933234ed4 Updated symfony form recipe 2025-07-13 16:29:27 +02:00
Jan Böhmer
4e1bd486e8 Updated mailer recipe 2025-07-13 16:28:15 +02:00
Jan Böhmer
53889c7813 Updated recipe for property_info 2025-07-13 12:13:10 +02:00
Jan Böhmer
9a3794bc83 Updated uid recipe 2025-07-13 12:12:25 +02:00
Jan Böhmer
e5cf8550ee Updated apache pack recipe 2025-07-13 12:11:50 +02:00
Jan Böhmer
5c4aa11b4b Fixed problems with container injection into migrations
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-07-12 23:39:26 +02:00
Jan Böhmer
1b86257836 Replaced the obsolete containerawareinterface with own implementation 2025-07-12 23:10:59 +02:00
Jan Böhmer
0f5fb992ef Updated dependencies 2025-07-12 22:56:12 +02:00
Jan Böhmer
392740d79c Updated nelmio/security-bundle recipe 2025-07-07 23:42:52 +02:00
Jan Böhmer
41108bd969 Updated doctrine-bundle recipe 2025-07-07 23:31:07 +02:00
Jan Böhmer
40a837b165 Updated doctrine/deprecations recipe 2025-07-07 23:29:06 +02:00
Jan Böhmer
7e6b931db4 Fixed code for symfony 7 2025-07-07 23:27:26 +02:00
Jan Böhmer
9eb825f89a Bumped symfony to 7.3 and updated dependant bundles 2025-07-07 22:28:21 +02:00
Jan Böhmer
af87c1ae1d Bumped minimal PHP version to 8.2 2025-07-07 22:15:36 +02:00
Jan Böhmer
18bf68cb6a Use release versions of settings-bundle
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-07-06 22:30:17 +02:00
Jan Böhmer
38c826713f Check for permissions to access settings menu and added settings menu to sidebar menu 2025-07-06 22:29:35 +02:00
Jan Böhmer
b9c3358f7f Use a doctrine entity for storing the settings 2025-07-06 22:15:48 +02:00
Jan Böhmer
2f2f4b2b3e Allow to leave the enforceComments option empty 2025-07-06 22:08:10 +02:00
Jan Böhmer
423cdf6ca2 Set envVarMode to override everywhere 2025-07-06 22:00:46 +02:00
Jan Böhmer
dc81a5b361 Moved SHOW_PART_IMAGE_OVERLAY to settings-bundle 2025-07-06 21:53:06 +02:00
Jan Böhmer
a4f2a7a7df Moved fixer API config to settings bundle 2025-07-06 21:42:58 +02:00
Jan Böhmer
c0c847c5be Moved octopart / nexar integration configuration to the new settings system 2025-07-06 20:18:14 +02:00
Jan Böhmer
1dbcff66d1 Moved digikey IPS configuration to new settings system 2025-07-06 19:32:55 +02:00
Jan Böhmer
6e28f2a74e Moved rootNodeRedirectsToNewEntity option to new settings system 2025-07-06 19:09:10 +02:00
Jan Böhmer
9812671a89 Merge master into settings-bundle 2025-07-06 19:05:22 +02:00
Jan Böhmer
b2946aee0d Moved pollin and reichelt info provider settings to new settings system
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-06-22 20:08:27 +02:00
Jan Böhmer
beb079b825 Removed env variables of already implemented info provider settings 2025-06-15 22:33:31 +02:00
Jan Böhmer
64497c4c0d Fixed phpstan issues
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-06-15 22:30:23 +02:00
Jan Böhmer
70bbb47850 Fixed phpunit tests 2025-06-15 22:27:10 +02:00
Jan Böhmer
73253dd03c Fixed dependencies
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
2025-06-15 18:46:39 +02:00
Jan Böhmer
442457f11b Merge branch 'master' into settings-bundle 2025-06-15 18:39:49 +02:00
Jan Böhmer
cf791cff1d New translations messages.en.xlf (English) 2025-05-11 00:41:22 +02:00
Jan Böhmer
3d4e91fc69 Moved OEMSecrets config to new settings system 2025-01-18 22:58:26 +01:00
Jan Böhmer
97aed847b6 Updated dependencies 2025-01-18 22:21:58 +01:00
Jan Böhmer
8750573724 Merge branch 'master' into settings-bundle 2025-01-17 22:06:18 +01:00
Jan Böhmer
1ac9641a04 Added translations for table settings 2024-08-21 22:31:39 +02:00
Jan Böhmer
ad47c8d8ed Allow to configure default table page length via Settings UI 2024-08-21 22:15:26 +02:00
Jan Böhmer
0dbf417866 Moved part table default column definiton to settings UI 2024-08-21 22:02:56 +02:00
Jan Böhmer
a45bf22ac5 Updated dependencies 2024-08-21 17:41:30 +02:00
Jan Böhmer
b5a6ba921c Updated dependencies 2024-08-18 22:46:06 +02:00
Jan Böhmer
f6a2467eae Improved select controls and added remove_buttons to multiple select inputs 2024-08-07 00:52:27 +02:00
Jan Böhmer
79da0518c2 Allow to configure sidebar menu via the new settings system 2024-08-07 00:41:06 +02:00
Jan Böhmer
5e512f8935 Migrated kicad category depth setting to new settings system 2024-08-04 19:18:20 +02:00
Jan Böhmer
99c10ffe85 Use icons for info provider settings 2024-08-04 18:52:49 +02:00
Jan Böhmer
47830dcd08 Allow to define icons for settings 2024-08-04 00:00:38 +02:00
Jan Böhmer
947cce78d7 Added title and icon to settings page 2024-08-03 23:36:08 +02:00
Jan Böhmer
74e555d25d Fixed tests 2024-08-03 23:31:56 +02:00
Jan Böhmer
e9973af8f4 Fixed old usages of base_currency 2024-08-03 23:19:09 +02:00
Jan Böhmer
2ab2b7f77d Moved default language, default timezone and base currency settings to new settings system 2024-08-03 23:14:29 +02:00
Jan Böhmer
463812fb3d Updated dependencies. 2024-08-03 22:18:17 +02:00
Jan Böhmer
d2406726c6 Merge branch 'master' into settings-bundle 2024-08-03 22:15:20 +02:00
Jan Böhmer
1f04d1b993 Updated dependencies 2024-07-21 21:33:39 +02:00
Jan Böhmer
2ef46cdd34 Moved gravatar and update checking settings to the settings-bundle system 2024-07-16 21:58:41 +02:00
Jan Böhmer
2bc50b2888 Updated settings-bundle 2024-07-16 21:33:44 +02:00
Jan Böhmer
9e0f86788d Symfony/string 6.4.9 introduced a bug with generating the symfony UX translations files. Therefore use 6.4.8 for now 2024-07-03 22:18:56 +02:00
Jan Böhmer
2681c7ded3 Updated dependencies 2024-07-03 21:39:51 +02:00
Jan Böhmer
5ab6a63492 Moved the "ENFORCE_CHANGE_COMMENTS_FOR" type to the HistorySettings class 2024-06-25 22:59:22 +02:00
Jan Böhmer
6df7bc5f2a Made the magic strings of EventCommentHelper into an array 2024-06-25 22:29:04 +02:00
Jan Böhmer
a0a7ca3c9c Fixed exception on SystemInfo page 2024-06-25 22:28:36 +02:00
Jan Böhmer
f88584e1ca Allow to configure the global theme using the WebUI 2024-06-24 21:40:37 +02:00
Jan Böhmer
3e657a7cac Merge branch 'master' into settings-bundle 2024-06-24 21:15:14 +02:00
Jan Böhmer
7cc67f8bb1 Allow to configure history log settings via new settings system 2024-05-20 21:48:33 +02:00
Jan Böhmer
0772d85918 Use new settings system to configure the instance Name and homepage banner 2024-05-20 21:14:32 +02:00
Jan Böhmer
26d83af298 Use new settings systems for attachments settings 2024-05-14 23:02:46 +02:00
Jan Böhmer
4876068cce Added translations for info provider settings fields 2024-05-10 00:55:14 +02:00
Jan Böhmer
08ae313dfe Added template to automatically generate a nice settings form from app settings 2024-05-10 00:03:25 +02:00
Jan Böhmer
3967c53468 Moved Element14 configuration logic to jbtronics/settings-bundle 2024-05-06 22:25:02 +02:00
Jan Böhmer
7ad077862c Moved TME Provider settings to settings-bundle 2024-05-06 00:05:58 +02:00
Jan Böhmer
5a563e4f8f Moved mouser info provider config to settings-bundle 2024-05-05 23:34:06 +02:00
Jan Böhmer
5a4b7c525b Started working on moving info provider settings with jbtronics/settings-bundle 2024-04-29 22:59:56 +02:00
568 changed files with 56484 additions and 9292 deletions

View file

@ -40,7 +40,7 @@ if [ -d /var/www/html/var/db ]; then
fi fi
# Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile) # Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile)
service phpPHP_VERSION-fpm start php-fpmPHP_VERSION -F &
# Run migrations if automigration is enabled via env variable DB_AUTOMIGRATE # Run migrations if automigration is enabled via env variable DB_AUTOMIGRATE

View file

@ -24,31 +24,6 @@
ErrorLog ${APACHE_LOG_DIR}/error.log ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined CustomLog ${APACHE_LOG_DIR}/access.log combined
# Pass the configuration from the docker env to the PHP environment (here you should list all .env options)
PassEnv APP_ENV APP_DEBUG APP_SECRET REDIRECT_TO_HTTPS DISABLE_YEAR2038_BUG_CHECK
PassEnv TRUSTED_PROXIES TRUSTED_HOSTS LOCK_DSN
PassEnv DATABASE_URL ENFORCE_CHANGE_COMMENTS_FOR DATABASE_MYSQL_USE_SSL_CA DATABASE_MYSQL_SSL_VERIFY_CERT
PassEnv DEFAULT_LANG DEFAULT_TIMEZONE BASE_CURRENCY INSTANCE_NAME ALLOW_ATTACHMENT_DOWNLOADS USE_GRAVATAR MAX_ATTACHMENT_FILE_SIZE DEFAULT_URI CHECK_FOR_UPDATES ATTACHMENT_DOWNLOAD_BY_DEFAULT
PassEnv MAILER_DSN ALLOW_EMAIL_PW_RESET EMAIL_SENDER_EMAIL EMAIL_SENDER_NAME
PassEnv HISTORY_SAVE_CHANGED_FIELDS HISTORY_SAVE_CHANGED_DATA HISTORY_SAVE_REMOVED_DATA HISTORY_SAVE_NEW_DATA
PassEnv ERROR_PAGE_ADMIN_EMAIL ERROR_PAGE_SHOW_HELP
PassEnv DEMO_MODE NO_URL_REWRITE_AVAILABLE FIXER_API_KEY BANNER
# In old version the SAML sp private key env, was wrongly named SAMLP_SP_PRIVATE_KEY, keep it for backward compatibility
PassEnv SAML_ENABLED SAML_BEHIND_PROXY SAML_ROLE_MAPPING SAML_UPDATE_GROUP_ON_LOGIN SAML_IDP_ENTITY_ID SAML_IDP_SINGLE_SIGN_ON_SERVICE SAML_IDP_SINGLE_LOGOUT_SERVICE SAML_IDP_X509_CERT SAML_SP_ENTITY_ID SAML_SP_X509_CERT SAML_SP_PRIVATE_KEY SAMLP_SP_PRIVATE_KEY
PassEnv TABLE_DEFAULT_PAGE_SIZE TABLE_PARTS_DEFAULT_COLUMNS
PassEnv PROVIDER_DIGIKEY_CLIENT_ID PROVIDER_DIGIKEY_SECRET PROVIDER_DIGIKEY_CURRENCY PROVIDER_DIGIKEY_LANGUAGE PROVIDER_DIGIKEY_COUNTRY
PassEnv PROVIDER_ELEMENT14_KEY PROVIDER_ELEMENT14_STORE_ID
PassEnv PROVIDER_TME_KEY PROVIDER_TME_SECRET PROVIDER_TME_CURRENCY PROVIDER_TME_LANGUAGE PROVIDER_TME_COUNTRY PROVIDER_TME_GET_GROSS_PRICES
PassEnv PROVIDER_OCTOPART_CLIENT_ID PROVIDER_OCTOPART_SECRET PROVIDER_OCTOPART_CURRENCY PROVIDER_OCTOPART_COUNTRY PROVIDER_OCTOPART_SEARCH_LIMIT PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS
PassEnv PROVIDER_MOUSER_KEY PROVIDER_MOUSER_SEARCH_OPTION PROVIDER_MOUSER_SEARCH_LIMIT PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE
PassEnv PROVIDER_LCSC_ENABLED PROVIDER_LCSC_CURRENCY
PassEnv PROVIDER_OEMSECRETS_KEY PROVIDER_OEMSECRETS_COUNTRY_CODE PROVIDER_OEMSECRETS_CURRENCY PROVIDER_OEMSECRETS_ZERO_PRICE PROVIDER_OEMSECRETS_SET_PARAM PROVIDER_OEMSECRETS_SORT_CRITERIA
PassEnv PROVIDER_REICHELT_ENABLED PROVIDER_REICHELT_CURRENCY PROVIDER_REICHELT_COUNTRY PROVIDER_REICHELT_LANGUAGE PROVIDER_REICHELT_INCLUDE_VAT
PassEnv PROVIDER_POLLIN_ENABLED
PassEnv EDA_KICAD_CATEGORY_DEPTH
PassEnv SHOW_PART_IMAGE_OVERLAY
# For most configuration files from conf-available/, which are # For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to # enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the # include a line for only one particular virtual host. For example the

17
.editorconfig Normal file
View file

@ -0,0 +1,17 @@
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[{compose.yaml,compose.*.yaml}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false

207
.env
View file

@ -31,37 +31,9 @@ DATABASE_EMULATE_NATURAL_SORT=0
# General settings # General settings
################################################################################### ###################################################################################
# The language to use serverwide as default (en, de, ru, etc.) # The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates or when no request context is available.
DEFAULT_LANG="en"
# The default timezone to use serverwide (e.g. Europe/Berlin)
DEFAULT_TIMEZONE="Europe/Berlin"
# The currency that is used inside the DB (and is assumed when no currency is set). This can not be changed later, so be sure to set it the currency used in your country
BASE_CURRENCY="EUR"
# The name of this installation. This will be shown as title in the browser and in the header of the website
INSTANCE_NAME="Part-DB"
# Allow users to download attachments to the server by providing an URL
# This could be a potential security issue, as the user can retrieve any file the server has access to (via internet)
ALLOW_ATTACHMENT_DOWNLOADS=0
# Set this to 1, if the "download external files" checkbox should be checked by default for new attachments
ATTACHMENT_DOWNLOAD_BY_DEFAULT=0
# Use gravatars for user avatars, when user has no own avatar defined
USE_GRAVATAR=0
# The maximum allowed size for attachment files in bytes (you can use M for megabytes and G for gigabytes)
# Please note that the php.ini setting upload_max_filesize also limits the maximum size of uploaded files
MAX_ATTACHMENT_FILE_SIZE="100M"
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates
# This must end with a slash!
DEFAULT_URI="https://partdb.changeme.invalid/" DEFAULT_URI="https://partdb.changeme.invalid/"
# With this option you can configure, where users are enforced to give a change reason, which will be logged
# This is a comma separated list of values, see documentation for available values
# Leave this empty, to make all change reasons optional
ENFORCE_CHANGE_COMMENTS_FOR=""
# Disable that if you do not want that Part-DB connects to GitHub to check for available updates, or if your server can not connect to the internet
CHECK_FOR_UPDATES=1
################################################################################### ###################################################################################
# Email settings # Email settings
################################################################################### ###################################################################################
@ -78,21 +50,6 @@ EMAIL_SENDER_NAME="Part-DB Mailer"
# Set this to 1 to allow reset of a password per email # Set this to 1 to allow reset of a password per email
ALLOW_EMAIL_PW_RESET=0 ALLOW_EMAIL_PW_RESET=0
######################################################################################
# History/Eventlog settings
######################################################################################
# If you want to use full timetrave functionality all values below have to be set to 1
# Save which fields were changed in a ElementEdited log entry
HISTORY_SAVE_CHANGED_FIELDS=1
# Save the old data in the ElementEdited log entry (warning this could increase the database size in short time)
HISTORY_SAVE_CHANGED_DATA=1
# Save the data of an element that gets removed into log entry. This allows to undelete an element
HISTORY_SAVE_REMOVED_DATA=1
# Save the new data of an element that gets changed or added. This allows an easy comparison of the old and new data on the detail page
# This option only becomes active when HISTORY_SAVE_CHANGED_DATA is set to 1
HISTORY_SAVE_NEW_DATA=1
################################################################################### ###################################################################################
# Error pages settings # Error pages settings
################################################################################### ###################################################################################
@ -102,149 +59,6 @@ ERROR_PAGE_ADMIN_EMAIL=''
# If this is set to true, solutions to common problems are shown on error pages. Disable this, if you do not want your users to see them... # If this is set to true, solutions to common problems are shown on error pages. Disable this, if you do not want your users to see them...
ERROR_PAGE_SHOW_HELP=1 ERROR_PAGE_SHOW_HELP=1
##################################################################################
# Part table settings
##################################################################################
# The default page size for the part table (set to -1 to show all parts on one page)
TABLE_DEFAULT_PAGE_SIZE=50
# Configure which columns will be visible by default in the parts table (and in which order).
# This is a comma separated list of column names. See documentation for available values.
TABLE_PARTS_DEFAULT_COLUMNS=name,description,category,footprint,manufacturer,storage_location,amount
##################################################################################
# Info provider settings
##################################################################################
# Digikey Provider:
# You can get your client id and secret from https://developer.digikey.com/
PROVIDER_DIGIKEY_CLIENT_ID=
PROVIDER_DIGIKEY_SECRET=
# The currency to get prices in
PROVIDER_DIGIKEY_CURRENCY=EUR
# The language to get results in (en, de, fr, it, es, zh, ja, ko)
PROVIDER_DIGIKEY_LANGUAGE=en
# The country to get results for
PROVIDER_DIGIKEY_COUNTRY=DE
# Farnell Provider:
# You can get your API key from https://partner.element14.com/
PROVIDER_ELEMENT14_KEY=
# Configure the store domain you want to use. This decides the language and currency of results. You can get a list of available stores from https://partner.element14.com/docs/Product_Search_API_REST__Description
PROVIDER_ELEMENT14_STORE_ID=de.farnell.com
# TME Provider:
# You can get your API key from https://developers.tme.eu/en/
PROVIDER_TME_KEY=
PROVIDER_TME_SECRET=
# The currency to get prices in
PROVIDER_TME_CURRENCY=EUR
# The language to get results in (en, de, pl)
PROVIDER_TME_LANGUAGE=en
# The country to get results for
PROVIDER_TME_COUNTRY=DE
# [DEPRECATED] Set this to 1 to get gross prices (including VAT) instead of net prices
# With private API keys, this option cannot be used anymore is ignored by Part-DB. The VAT inclusion depends on your TME account settings.
PROVIDER_TME_GET_GROSS_PRICES=1
# Octopart / Nexar Provider:
# You can get your API key from https://nexar.com/api
PROVIDER_OCTOPART_CLIENT_ID=
PROVIDER_OCTOPART_SECRET=
# The currency and country to get prices for (you have to set both to get meaningful results)
# 3 letter ISO currency code (e.g. EUR, USD, GBP)
PROVIDER_OCTOPART_CURRENCY=EUR
# 2 letter ISO country code (e.g. DE, US, GB)
PROVIDER_OCTOPART_COUNTRY=DE
# The number of results to get from Octopart while searching (please note that this counts towards your API limits)
PROVIDER_OCTOPART_SEARCH_LIMIT=10
# Set to false to include non authorized offers in the results
PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS=1
# Mouser Provider API V2:
# You can get your API key from https://www.mouser.it/api-hub/
PROVIDER_MOUSER_KEY=
# Filter search results by RoHS compliance and stock availability:
# Available options: None | Rohs | InStock | RohsAndInStock
PROVIDER_MOUSER_SEARCH_OPTION='None'
# The number of results to get from Mouser while searching (please note that this value is max 50)
PROVIDER_MOUSER_SEARCH_LIMIT=50
# It is recommended to leave this set to 'true'. The option is not really good doumented by Mouser:
# Used when searching for keywords in the language specified when you signed up for Search API.
PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE='true'
# LCSC Provider:
# LCSC does not provide an offical API, so this used the API LCSC uses to render their webshop.
# LCSC did not intended the use of this API and it could break any time, so use it at your own risk.
# We dont require an API key for LCSC, just set this to 1 to enable LCSC support
PROVIDER_LCSC_ENABLED=0
# The currency to get prices in (e.g. EUR, USD, etc.)
PROVIDER_LCSC_CURRENCY=EUR
# Oemsecrets Provider API 3.0.1:
# You can get your API key from https://www.oemsecrets.com/api
PROVIDER_OEMSECRETS_KEY=
# The country you want the output for
PROVIDER_OEMSECRETS_COUNTRY_CODE=DE
# Available country code are:
# AD, AE, AQ, AR, AT, AU, BE, BO, BR, BV, BY, CA, CH, CL, CN, CO, CZ, DE, DK, EC, EE, EH,
# ES, FI, FK, FO, FR, GB, GE, GF, GG, GI, GL, GR, GS, GY, HK, HM, HR, HU, IE, IM, IN, IS,
# IT, JM, JP, KP, KR, KZ, LI, LK, LT, LU, MC, MD, ME, MK, MT, NL, NO, NZ, PE, PH, PL, PT,
# PY, RO, RS, RU, SB, SD, SE, SG, SI, SJ, SK, SM, SO, SR, SY, SZ, TC, TF, TG, TH, TJ, TK,
# TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VE, VG, VI, VN, VU, WF, YE,
# ZA, ZM, ZW
#
# The currency you want the prices to be displayed in
PROVIDER_OEMSECRETS_CURRENCY=EUR
# Available currency are:AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, ILS, INR, JPY, KRW, NOK,
# NZD, RUB, SEK, SGD, TWD, USD
#
# If PROVIDER_OEMSECRETS_ZERO_PRICE is set to 0, distributors with zero prices
# will be discarded from the creation of a new part (set to 1 otherwise)
PROVIDER_OEMSECRETS_ZERO_PRICE=0
#
# When PROVIDER_OEMSECRETS_SET_PARAM is set to 1 the parameters for the part are generated
# from the description transforming unstructured descriptions into structured parameters;
# each parameter in description should have the form: "...;name1:value1;name2:value2"
PROVIDER_OEMSECRETS_SET_PARAM=1
#
# This environment variable determines the sorting criteria for product results.
# The sorting process first arranges items based on the provided keyword.
# Then, if set to 'C', it further sorts by completeness (prioritizing items with the most
# detailed information). If set to 'M', it further sorts by manufacturer name.
#If unset or set to any other value, no sorting is performed.
PROVIDER_OEMSECRETS_SORT_CRITERIA=C
# Reichelt provider:
# Reichelt.com offers no official API, so this info provider webscrapes the website to extract info
# It could break at any time, use it at your own risk
# We dont require an API key for Reichelt, just set this to 1 to enable Reichelt support
PROVIDER_REICHELT_ENABLED=0
# The country to get prices for
PROVIDER_REICHELT_COUNTRY=DE
# The language to get results in (en, de, fr, nl, pl, it, es)
PROVIDER_REICHELT_LANGUAGE=en
# Include VAT in prices (set to 1 to include VAT, 0 to exclude VAT)
PROVIDER_REICHELT_INCLUDE_VAT=1
# The currency to get prices in (only for countries with countries other than EUR)
PROVIDER_REICHELT_CURRENCY=EUR
# Pollin provider:
# Pollin.de offers no official API, so this info provider webscrapes the website to extract info
# It could break at any time, use it at your own risk
# We dont require an API key for Pollin, just set this to 1 to enable Pollin support
PROVIDER_POLLIN_ENABLED=0
##################################################################################
# EDA integration related settings
##################################################################################
# This value determines the depth of the category tree, that is visible inside KiCad
# 0 means that only the top level categories are visible. Set to a value > 0 to show more levels.
# Set to -1, to show all parts of Part-DB inside a single category in KiCad
EDA_KICAD_CATEGORY_DEPTH=0
################################################################################### ###################################################################################
# SAML Single sign on-settings # SAML Single sign on-settings
@ -298,19 +112,6 @@ NO_URL_REWRITE_AVAILABLE=0
# Set to 1, if Part-DB should redirect all HTTP requests to HTTPS. You dont need to configure this, if your webserver already does this. # Set to 1, if Part-DB should redirect all HTTP requests to HTTPS. You dont need to configure this, if your webserver already does this.
REDIRECT_TO_HTTPS=0 REDIRECT_TO_HTTPS=0
# If you want to use fixer.io for currency conversion, you have to set this to your API key
FIXER_API_KEY=CHANGEME
# Override value if you want to show to show a given text on homepage.
# When this is empty the content of config/banner.md is used as banner
BANNER=""
# Enable the part image overlay which shows name and filename of the picture
SHOW_PART_IMAGE_OVERLAY=1
APP_ENV=prod
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
# Set this to zero, if you want to disable the year 2038 bug check on 32-bit systems (it will cause errors with current 32-bit PHP versions) # Set this to zero, if you want to disable the year 2038 bug check on 32-bit systems (it will cause errors with current 32-bit PHP versions)
DISABLE_YEAR2038_BUG_CHECK=0 DISABLE_YEAR2038_BUG_CHECK=0
@ -328,3 +129,9 @@ LOCK_DSN=flock
###> nelmio/cors-bundle ### ###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ### ###< nelmio/cors-bundle ###
###> symfony/framework-bundle ###
APP_ENV=prod
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
APP_SHARE_DIR=var/share
###< symfony/framework-bundle ###

View file

@ -0,0 +1,4 @@
###> symfony/framework-bundle ###
APP_SECRET=318b5d659e07a0b3f96d9b3a83b254ca
###< symfony/framework-bundle ###

View file

@ -11,3 +11,5 @@ DATABASE_URL="sqlite:///%kernel.project_dir%/var/app_test.db"
# Disable update checks, as tests would fail, when github is not reachable # Disable update checks, as tests would fail, when github is not reachable
CHECK_FOR_UPDATES=0 CHECK_FOR_UPDATES=0
INSTANCE_NAME="Part-DB"

View file

@ -1,5 +1,8 @@
name: Build assets artifact name: Build assets artifact
permissions:
contents: read
on: on:
push: push:
branches: branches:
@ -19,7 +22,7 @@ jobs:
APP_ENV: prod APP_ENV: prod
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
@ -57,9 +60,9 @@ jobs:
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v6
with: with:
node-version: '18' node-version: '20'
- name: Install yarn dependencies - name: Install yarn dependencies
run: yarn install run: yarn install
@ -77,13 +80,13 @@ jobs:
run: zip -r /tmp/partdb_assets.zip public/build/ vendor/ run: zip -r /tmp/partdb_assets.zip public/build/ vendor/
- name: Upload assets artifact - name: Upload assets artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v5
with: with:
name: Only dependencies and built assets name: Only dependencies and built assets
path: /tmp/partdb_assets.zip path: /tmp/partdb_assets.zip
- name: Upload full artifact - name: Upload full artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v5
with: with:
name: Full Part-DB including dependencies and built assets name: Full Part-DB including dependencies and built assets
path: /tmp/partdb_with_assets.zip path: /tmp/partdb_with_assets.zip

View file

@ -1,5 +1,8 @@
name: Docker Image Build name: Docker Image Build
permissions:
contents: read
on: on:
#schedule: #schedule:
# - cron: '0 10 * * *' # everyday at 10am # - cron: '0 10 * * *' # everyday at 10am
@ -17,7 +20,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta

View file

@ -1,5 +1,8 @@
name: Docker Image Build (FrankenPHP) name: Docker Image Build (FrankenPHP)
permissions:
contents: read
on: on:
#schedule: #schedule:
# - cron: '0 10 * * *' # everyday at 10am # - cron: '0 10 * * *' # everyday at 10am
@ -17,7 +20,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta

View file

@ -1,5 +1,8 @@
name: Static analysis name: Static analysis
permissions:
contents: read
on: on:
push: push:
branches: branches:
@ -16,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2

View file

@ -1,5 +1,8 @@
name: PHPUnit Tests name: PHPUnit Tests
permissions:
contents: read
on: on:
push: push:
branches: branches:
@ -18,7 +21,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: [ '8.1', '8.2', '8.3', '8.4' ] php-versions: ['8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql', 'sqlite', 'postgres' ] db-type: [ 'mysql', 'sqlite', 'postgres' ]
env: env:
@ -43,7 +46,7 @@ jobs:
if: matrix.db-type == 'postgres' if: matrix.db-type == 'postgres'
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
@ -101,9 +104,9 @@ jobs:
run: composer install --prefer-dist --no-progress run: composer install --prefer-dist --no-progress
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v6
with: with:
node-version: '18' node-version: '20'
- name: Install yarn dependencies - name: Install yarn dependencies
run: yarn install run: yarn install

6
.gitignore vendored
View file

@ -2,6 +2,7 @@
/.env.local /.env.local
/.env.local.php /.env.local.php
/.env.*.local /.env.*.local
/.env.local.bak
/config/secrets/prod/prod.decrypt.private.php /config/secrets/prod/prod.decrypt.private.php
/public/bundles/ /public/bundles/
/var/ /var/
@ -41,9 +42,12 @@ yarn-error.log
###> phpunit/phpunit ### ###> phpunit/phpunit ###
/phpunit.xml /phpunit.xml
.phpunit.result.cache /.phpunit.cache/
###< phpunit/phpunit ### ###< phpunit/phpunit ###
###> phpstan/phpstan ### ###> phpstan/phpstan ###
phpstan.neon phpstan.neon
###< phpstan/phpstan ### ###< phpstan/phpstan ###
.claude/
CLAUDE.md

View file

@ -20,7 +20,7 @@ was translated in other languages (this is possible via the "Other languages" dr
## Project structure ## Project structure
Part-DB uses symfony's recommended [project structure](https://symfony.com/doc/current/best_practices.html). Part-DB uses symfony's recommended [project structure](https://symfony.com/doc/current/best_practices.html).
Interesting folders are: Interesting folders are:
* `public`: Everything in this directory will be publicy accessible via web. Use this folder to serve static images. * `public`: Everything in this directory will be publicly accessible via web. Use this folder to serve static images.
* `assets`: The frontend assets are saved here. You can find the javascript and CSS code here. * `assets`: The frontend assets are saved here. You can find the javascript and CSS code here.
* `src`: Part-DB's PHP code is saved here. Note that the sub directories are structured by the classes purposes (so use `Controller` Controllers, `Entities` for Database models, etc.) * `src`: Part-DB's PHP code is saved here. Note that the sub directories are structured by the classes purposes (so use `Controller` Controllers, `Entities` for Database models, etc.)
* `translations`: The translations used in Part-DB are saved here * `translations`: The translations used in Part-DB are saved here
@ -49,7 +49,7 @@ Part-DB uses GitHub actions to run various tests and checks on the code:
* PHPunit tests run successful * PHPunit tests run successful
* Config files, translations and templates has valid syntax * Config files, translations and templates has valid syntax
* Doctrine schema valid * Doctrine schema valid
* No known vulnerable dependecies are used * No known vulnerable dependencies are used
* Static analysis successful (phpstan with `--level=2`) * Static analysis successful (phpstan with `--level=2`)
Further the code coverage of the PHPunit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server). Further the code coverage of the PHPunit tests is determined and uploaded to [CodeCov](https://codecov.io/gh/Part-DB/Part-DB-server).

View file

@ -1,5 +1,5 @@
ARG BASE_IMAGE=debian:bookworm-slim ARG BASE_IMAGE=debian:bookworm-slim
ARG PHP_VERSION=8.3 ARG PHP_VERSION=8.4
FROM ${BASE_IMAGE} AS base FROM ${BASE_IMAGE} AS base
ARG PHP_VERSION ARG PHP_VERSION
@ -48,7 +48,7 @@ RUN apt-get update && apt-get -y install \
# Install node and yarn # Install node and yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \ curl -sL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get update && apt-get install -y \ apt-get update && apt-get install -y \
nodejs \ nodejs \
yarn \ yarn \
@ -119,12 +119,12 @@ realpath_cache_size=4096K
realpath_cache_ttl=600 realpath_cache_ttl=600
EOF EOF
# Increase upload limit and enable preloading # Increase upload limit and enable preloading (disabled for now, as it does not seem to work properly, and require prod env anyway)
COPY <<EOF /etc/php/${PHP_VERSION}/fpm/conf.d/partdb.ini COPY <<EOF /etc/php/${PHP_VERSION}/fpm/conf.d/partdb.ini
upload_max_filesize=256M upload_max_filesize=256M
post_max_size=300M post_max_size=300M
opcache.preload_user=www-data ;opcache.preload_user=www-data
opcache.preload=/var/www/html/config/preload.php ;opcache.preload=/var/www/html/config/preload.php
log_limit=8096 log_limit=8096
EOF EOF

View file

@ -1,4 +1,4 @@
FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream
RUN apt-get update && apt-get -y install \ RUN apt-get update && apt-get -y install \
curl \ curl \
@ -13,13 +13,33 @@ RUN apt-get update && apt-get -y install \
zip \ zip \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*; && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
# Install node and yarn RUN set -eux; \
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ # Prepare keyrings directory
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ mkdir -p /etc/apt/keyrings; \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \ \
apt-get update && apt-get install -y \ # Import Yarn GPG key
nodejs yarn \ curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/* | tee /etc/apt/keyrings/yarn.gpg >/dev/null; \
chmod 644 /etc/apt/keyrings/yarn.gpg; \
\
# Add Yarn repo with signed-by
echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main" \
| tee /etc/apt/sources.list.d/yarn.list; \
\
# Run NodeSource setup script (unchanged)
curl -sL https://deb.nodesource.com/setup_22.x | bash -; \
\
# Install Node.js + Yarn
apt-get update; \
apt-get install -y --no-install-recommends \
nodejs \
yarn; \
\
# Cleanup
apt-get -y autoremove; \
apt-get clean autoclean; \
rm -rf /var/lib/apt/lists/*
# Install PHP # Install PHP
RUN set -eux; \ RUN set -eux; \

91
Makefile Normal file
View file

@ -0,0 +1,91 @@
# PartDB Makefile for Test Environment Management
.PHONY: help deps-install lint format format-check test coverage pre-commit all test-typecheck \
test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run test-reset \
section-dev dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset
# Default target
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"}; /^[a-zA-Z0-9][a-zA-Z0-9_-]+:.*##/ {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
# Dependencies
deps-install: ## Install PHP dependencies with unlimited memory
@echo "📦 Installing PHP dependencies..."
COMPOSER_MEMORY_LIMIT=-1 composer install
yarn install
@echo "✅ Dependencies installed"
# Complete test environment setup
test-setup: test-clean test-db-create test-db-migrate test-fixtures ## Complete test setup (clean, create DB, migrate, fixtures)
@echo "✅ Test environment setup complete!"
# Clean test environment
test-clean: ## Clean test cache and database files
@echo "🧹 Cleaning test environment..."
rm -rf var/cache/test
rm -f var/app_test.db
@echo "✅ Test environment cleaned"
# Create test database
test-db-create: ## Create test database (if not exists)
@echo "🗄️ Creating test database..."
-php bin/console doctrine:database:create --if-not-exists --env test || echo "⚠️ Database creation failed (expected for SQLite) - continuing..."
# Run database migrations for test environment
test-db-migrate: ## Run database migrations for test environment
@echo "🔄 Running database migrations..."
COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env test
# Clear test cache
test-cache-clear: ## Clear test cache
@echo "🗑️ Clearing test cache..."
rm -rf var/cache/test
@echo "✅ Test cache cleared"
# Load test fixtures
test-fixtures: ## Load test fixtures
@echo "📦 Loading test fixtures..."
php bin/console partdb:fixtures:load -n --env test
# Run PHPUnit tests
test-run: ## Run PHPUnit tests
@echo "🧪 Running tests..."
php bin/phpunit
# Quick test reset (clean + migrate + fixtures, skip DB creation)
test-reset: test-cache-clear test-db-migrate test-fixtures
@echo "✅ Test environment reset complete!"
test-typecheck: ## Run static analysis (PHPStan)
@echo "🧪 Running type checks..."
COMPOSER_MEMORY_LIMIT=-1 composer phpstan
# Development helpers
dev-setup: dev-clean dev-db-create dev-db-migrate dev-warmup ## Complete development setup (clean, create DB, migrate, warmup)
@echo "✅ Development environment setup complete!"
dev-clean: ## Clean development cache and database files
@echo "🧹 Cleaning development environment..."
rm -rf var/cache/dev
rm -f var/app_dev.db
@echo "✅ Development environment cleaned"
dev-db-create: ## Create development database (if not exists)
@echo "🗄️ Creating development database..."
-php bin/console doctrine:database:create --if-not-exists --env dev || echo "⚠️ Database creation failed (expected for SQLite) - continuing..."
dev-db-migrate: ## Run database migrations for development environment
@echo "🔄 Running database migrations..."
COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env dev
dev-cache-clear: ## Clear development cache
@echo "🗑️ Clearing development cache..."
rm -rf var/cache/dev
@echo "✅ Development cache cleared"
dev-warmup: ## Warm up development cache
@echo "🔥 Warming up development cache..."
COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=1G bin/console cache:warmup --env dev -n
dev-reset: dev-cache-clear dev-db-migrate ## Quick development reset (cache clear + migrate)
@echo "✅ Development environment reset complete!"

View file

@ -3,7 +3,7 @@
![Static analysis](https://github.com/Part-DB/Part-DB-symfony/workflows/Static%20analysis/badge.svg) ![Static analysis](https://github.com/Part-DB/Part-DB-symfony/workflows/Static%20analysis/badge.svg)
[![codecov](https://codecov.io/gh/Part-DB/Part-DB-server/branch/master/graph/badge.svg)](https://codecov.io/gh/Part-DB/Part-DB-server) [![codecov](https://codecov.io/gh/Part-DB/Part-DB-server/branch/master/graph/badge.svg)](https://codecov.io/gh/Part-DB/Part-DB-server)
![GitHub License](https://img.shields.io/github/license/Part-DB/Part-DB-symfony) ![GitHub License](https://img.shields.io/github/license/Part-DB/Part-DB-symfony)
![PHP Version](https://img.shields.io/badge/PHP-%3E%3D%208.1-green) ![PHP Version](https://img.shields.io/badge/PHP-%3E%3D%208.2-green)
![Docker Pulls](https://img.shields.io/docker/pulls/jbtronics/part-db1) ![Docker Pulls](https://img.shields.io/docker/pulls/jbtronics/part-db1)
![Docker Build Status](https://github.com/Part-DB/Part-DB-symfony/workflows/Docker%20Image%20Build/badge.svg) ![Docker Build Status](https://github.com/Part-DB/Part-DB-symfony/workflows/Docker%20Image%20Build/badge.svg)
@ -29,8 +29,8 @@ If you want to test Part-DB without installing it, you can use [this](https://de
You can log in with username: *user* and password: *user*. You can log in with username: *user* and password: *user*.
Every change to the master branch gets automatically deployed, so it represents the current development progress and is Every change to the master branch gets automatically deployed, so it represents the current development progress and
may not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading may not be completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
the page the page
for the first time. for the first time.
@ -75,10 +75,10 @@ Part-DB is also used by small companies and universities for managing their inve
* A **web server** (like Apache2 or nginx) that is capable of * A **web server** (like Apache2 or nginx) that is capable of
running [Symfony 6](https://symfony.com/doc/current/reference/requirements.html), running [Symfony 6](https://symfony.com/doc/current/reference/requirements.html),
this includes a minimum PHP version of **PHP 8.1** this includes a minimum PHP version of **PHP 8.2**
* A **MySQL** (at least 5.7) /**MariaDB** (at least 10.4) database server, or **PostgreSQL** 10+ if you do not want to use SQLite. * A **MySQL** (at least 5.7) /**MariaDB** (at least 10.4) database server, or **PostgreSQL** 10+ if you do not want to use SQLite.
* Shell access to your server is highly recommended! * Shell access to your server is highly recommended!
* For building the client-side assets **yarn** and **nodejs** (>= 18.0) is needed. * For building the client-side assets **yarn** and **nodejs** (>= 20.0) is needed.
## Installation ## Installation

View file

@ -1 +1 @@
1.17.3 2.2.1

File diff suppressed because one or more lines are too long

View file

@ -1,66 +1,63 @@
/** import {ClassicEditor} from 'ckeditor5'
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved. import {Alignment} from 'ckeditor5';
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license import {Autoformat} from 'ckeditor5';
*/ import {Base64UploadAdapter} from 'ckeditor5';
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js'; import {BlockQuote} from 'ckeditor5';
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js'; import {Bold} from 'ckeditor5';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js'; import {Code} from 'ckeditor5';
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter.js'; import {CodeBlock} from 'ckeditor5';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js'; import {Essentials} from 'ckeditor5';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js'; import {FindAndReplace} from 'ckeditor5';
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js'; import {FontBackgroundColor} from 'ckeditor5';
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock.js'; import {FontColor} from 'ckeditor5';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js'; import {FontFamily} from 'ckeditor5';
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js'; import {FontSize} from 'ckeditor5';
import FontBackgroundColor from '@ckeditor/ckeditor5-font/src/fontbackgroundcolor.js'; import {GeneralHtmlSupport} from 'ckeditor5';
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor.js'; import {Heading} from 'ckeditor5';
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily.js'; import {Highlight} from 'ckeditor5';
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize.js'; import {HorizontalLine} from 'ckeditor5';
import GeneralHtmlSupport from '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport.js'; import {HtmlComment} from 'ckeditor5';
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js'; import {HtmlEmbed} from 'ckeditor5';
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js'; import {Image} from 'ckeditor5';
import HorizontalLine from '@ckeditor/ckeditor5-horizontal-line/src/horizontalline.js'; import {ImageResize} from 'ckeditor5';
import HtmlComment from '@ckeditor/ckeditor5-html-support/src/htmlcomment.js'; import {ImageStyle} from 'ckeditor5';
import HtmlEmbed from '@ckeditor/ckeditor5-html-embed/src/htmlembed.js'; import {ImageToolbar} from 'ckeditor5';
import Image from '@ckeditor/ckeditor5-image/src/image.js'; import {ImageUpload} from 'ckeditor5';
import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize.js'; import {Indent} from 'ckeditor5';
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle.js'; import {IndentBlock} from 'ckeditor5';
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar.js'; import {Italic} from 'ckeditor5';
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload.js'; import {Link} from 'ckeditor5';
import Indent from '@ckeditor/ckeditor5-indent/src/indent.js'; import {LinkImage} from 'ckeditor5';
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock.js'; import {List} from 'ckeditor5';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js'; import {ListProperties} from 'ckeditor5';
import Link from '@ckeditor/ckeditor5-link/src/link.js'; import {Markdown} from 'ckeditor5';
import LinkImage from '@ckeditor/ckeditor5-link/src/linkimage.js'; import {MediaEmbed} from 'ckeditor5';
import List from '@ckeditor/ckeditor5-list/src/list.js'; import {MediaEmbedToolbar} from 'ckeditor5';
import ListProperties from '@ckeditor/ckeditor5-list/src/listproperties.js'; import {Paragraph} from 'ckeditor5';
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown.js'; import {PasteFromOffice} from 'ckeditor5';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed.js'; import {RemoveFormat} from 'ckeditor5';
import MediaEmbedToolbar from '@ckeditor/ckeditor5-media-embed/src/mediaembedtoolbar.js'; import {SourceEditing} from 'ckeditor5';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js'; import {SpecialCharacters} from 'ckeditor5';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.js'; import {SpecialCharactersArrows} from 'ckeditor5';
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js'; import {SpecialCharactersCurrency} from 'ckeditor5';
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js'; import {SpecialCharactersEssentials} from 'ckeditor5';
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js'; import {SpecialCharactersLatin} from 'ckeditor5';
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js'; import {SpecialCharactersMathematical} from 'ckeditor5';
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js'; import {SpecialCharactersText} from 'ckeditor5';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js'; import {Strikethrough} from 'ckeditor5';
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js'; import {Subscript} from 'ckeditor5';
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js'; import {Superscript} from 'ckeditor5';
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js'; import {Table} from 'ckeditor5';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js'; import {TableCaption} from 'ckeditor5';
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js'; import {TableCellProperties} from 'ckeditor5';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js'; import {TableColumnResize} from 'ckeditor5';
import Table from '@ckeditor/ckeditor5-table/src/table.js'; import {TableProperties} from 'ckeditor5';
import TableCaption from '@ckeditor/ckeditor5-table/src/tablecaption.js'; import {TableToolbar} from 'ckeditor5';
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties'; import {Underline} from 'ckeditor5';
import TableColumnResize from '@ckeditor/ckeditor5-table/src/tablecolumnresize.js'; import {WordCount} from 'ckeditor5';
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties'; import {EditorWatchdog} from 'ckeditor5';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar.js';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js';
import WordCount from '@ckeditor/ckeditor5-word-count/src/wordcount.js';
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js';
import PartDBLabel from "./plugins/PartDBLabel/PartDBLabel"; import PartDBLabel from "./plugins/PartDBLabel/PartDBLabel";
import SpecialCharactersGreek from "./plugins/special_characters_emoji";
class Editor extends ClassicEditor {} class Editor extends ClassicEditor {}
@ -122,7 +119,8 @@ Editor.builtinPlugins = [
Underline, Underline,
WordCount, WordCount,
PartDBLabel PartDBLabel,
SpecialCharactersGreek
]; ];
// Editor configuration. // Editor configuration.

View file

@ -2,68 +2,69 @@
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved. * @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js'; import {ClassicEditor} from 'ckeditor5';
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js'; import {Alignment} from 'ckeditor5';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js'; import {Autoformat} from 'ckeditor5';
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter.js'; import {Base64UploadAdapter} from 'ckeditor5';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js'; import {BlockQuote} from 'ckeditor5';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js'; import {Bold} from 'ckeditor5';
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js'; import {Code} from 'ckeditor5';
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock.js'; import {CodeBlock} from 'ckeditor5';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js'; import {Essentials} from 'ckeditor5';
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js'; import {FindAndReplace} from 'ckeditor5';
import FontBackgroundColor from '@ckeditor/ckeditor5-font/src/fontbackgroundcolor.js'; import {FontBackgroundColor} from 'ckeditor5';
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor.js'; import {FontColor} from 'ckeditor5';
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily.js'; import {FontFamily} from 'ckeditor5';
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize.js'; import {FontSize} from 'ckeditor5';
import GeneralHtmlSupport from '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport.js'; import {GeneralHtmlSupport} from 'ckeditor5';
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js'; import {Heading} from 'ckeditor5';
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js'; import {Highlight} from 'ckeditor5';
import HorizontalLine from '@ckeditor/ckeditor5-horizontal-line/src/horizontalline.js'; import {HorizontalLine} from 'ckeditor5';
import HtmlComment from '@ckeditor/ckeditor5-html-support/src/htmlcomment.js'; import {HtmlComment} from 'ckeditor5';
import HtmlEmbed from '@ckeditor/ckeditor5-html-embed/src/htmlembed.js'; import {HtmlEmbed} from 'ckeditor5';
import Image from '@ckeditor/ckeditor5-image/src/image.js'; import {Image} from 'ckeditor5';
import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize.js'; import {ImageResize} from 'ckeditor5';
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle.js'; import {ImageStyle} from 'ckeditor5';
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar.js'; import {ImageToolbar} from 'ckeditor5';
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload.js'; import {ImageUpload} from 'ckeditor5';
import Indent from '@ckeditor/ckeditor5-indent/src/indent.js'; import {Indent} from 'ckeditor5';
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock.js'; import {IndentBlock} from 'ckeditor5';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js'; import {Italic} from 'ckeditor5';
import Link from '@ckeditor/ckeditor5-link/src/link.js'; import {Link} from 'ckeditor5';
import LinkImage from '@ckeditor/ckeditor5-link/src/linkimage.js'; import {LinkImage} from 'ckeditor5';
import List from '@ckeditor/ckeditor5-list/src/list.js'; import {List} from 'ckeditor5';
import ListProperties from '@ckeditor/ckeditor5-list/src/listproperties.js'; import {ListProperties} from 'ckeditor5';
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown.js'; import {Markdown} from 'ckeditor5';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed.js'; import {MediaEmbed} from 'ckeditor5';
import MediaEmbedToolbar from '@ckeditor/ckeditor5-media-embed/src/mediaembedtoolbar.js'; import {MediaEmbedToolbar} from 'ckeditor5';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js'; import {Paragraph} from 'ckeditor5';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.js'; import {PasteFromOffice} from 'ckeditor5';
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js'; import {RemoveFormat} from 'ckeditor5';
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js'; import {SourceEditing} from 'ckeditor5';
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js'; import {SpecialCharacters} from 'ckeditor5';
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js'; import {SpecialCharactersArrows} from 'ckeditor5';
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js'; import {SpecialCharactersCurrency} from 'ckeditor5';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js'; import {SpecialCharactersEssentials} from 'ckeditor5';
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js'; import {SpecialCharactersLatin} from 'ckeditor5';
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js'; import {SpecialCharactersMathematical} from 'ckeditor5';
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js'; import {SpecialCharactersText} from 'ckeditor5';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js'; import {Strikethrough} from 'ckeditor5';
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js'; import {Subscript} from 'ckeditor5';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js'; import {Superscript} from 'ckeditor5';
import Table from '@ckeditor/ckeditor5-table/src/table.js'; import {Table} from 'ckeditor5';
import TableCaption from '@ckeditor/ckeditor5-table/src/tablecaption.js'; import {TableCaption} from 'ckeditor5';
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties'; import {TableCellProperties} from 'ckeditor5';
import TableColumnResize from '@ckeditor/ckeditor5-table/src/tablecolumnresize.js'; import {TableColumnResize} from 'ckeditor5';
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties'; import {TableProperties} from 'ckeditor5';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar.js'; import {TableToolbar} from 'ckeditor5';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js'; import {Underline} from 'ckeditor5';
import WordCount from '@ckeditor/ckeditor5-word-count/src/wordcount.js'; import {WordCount} from 'ckeditor5';
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js'; import {EditorWatchdog} from 'ckeditor5';
import TodoList from '@ckeditor/ckeditor5-list/src/todolist'; import {TodoList} from 'ckeditor5';
import ExtendedMarkdown from "./plugins/extendedMarkdown.js"; import ExtendedMarkdown from "./plugins/extendedMarkdown.js";
import SpecialCharactersEmoji from "./plugins/special_characters_emoji"; import SpecialCharactersGreek from "./plugins/special_characters_emoji";
import {Mention, Emoji} from "ckeditor5";
class Editor extends ClassicEditor {} class Editor extends ClassicEditor {}
@ -117,9 +118,11 @@ Editor.builtinPlugins = [
Underline, Underline,
TodoList, TodoList,
Mention, Emoji,
//Our own extensions //Our own extensions
ExtendedMarkdown, ExtendedMarkdown,
SpecialCharactersEmoji SpecialCharactersGreek
]; ];
// Editor configuration. // Editor configuration.
@ -148,6 +151,7 @@ Editor.defaultConfig = {
'indent', 'indent',
'|', '|',
'specialCharacters', 'specialCharacters',
"emoji",
'horizontalLine', 'horizontalLine',
'|', '|',
'imageUpload', 'imageUpload',

View file

@ -2,35 +2,36 @@
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved. * @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ */
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js'; import {ClassicEditor} from 'ckeditor5';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js'; import {Autoformat} from 'ckeditor5';
import AutoLink from '@ckeditor/ckeditor5-link/src/autolink.js'; import {AutoLink} from 'ckeditor5';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js'; import {Bold} from 'ckeditor5';
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js'; import {Code} from 'ckeditor5';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js'; import {Essentials} from 'ckeditor5';
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js'; import {FindAndReplace} from 'ckeditor5';
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js'; import {Highlight} from 'ckeditor5';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js'; import {Italic} from 'ckeditor5';
import Link from '@ckeditor/ckeditor5-link/src/link.js'; import {Link} from 'ckeditor5';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js'; import {Paragraph} from 'ckeditor5';
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js'; import {RemoveFormat} from 'ckeditor5';
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js'; import {SourceEditing} from 'ckeditor5';
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js'; import {SpecialCharacters} from 'ckeditor5';
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js'; import {SpecialCharactersArrows} from 'ckeditor5';
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js'; import {SpecialCharactersCurrency} from 'ckeditor5';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js'; import {SpecialCharactersEssentials} from 'ckeditor5';
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js'; import {SpecialCharactersLatin} from 'ckeditor5';
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js'; import {SpecialCharactersMathematical} from 'ckeditor5';
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js'; import {SpecialCharactersText} from 'ckeditor5';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js'; import {Strikethrough} from 'ckeditor5';
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js'; import {Subscript} from 'ckeditor5';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js'; import {Superscript} from 'ckeditor5';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js'; import {Underline} from 'ckeditor5';
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js'; import {EditorWatchdog} from 'ckeditor5';
import {Mention, Emoji} from "ckeditor5";
import ExtendedMarkdownInline from "./plugins/extendedMarkdownInline"; import ExtendedMarkdownInline from "./plugins/extendedMarkdownInline";
import SingleLinePlugin from "./plugins/singleLine"; import SingleLinePlugin from "./plugins/singleLine";
import SpecialCharactersEmoji from "./plugins/special_characters_emoji"; import SpecialCharactersGreek from "./plugins/special_characters_emoji";
class Editor extends ClassicEditor {} class Editor extends ClassicEditor {}
@ -62,7 +63,8 @@ Editor.builtinPlugins = [
ExtendedMarkdownInline, ExtendedMarkdownInline,
SingleLinePlugin, SingleLinePlugin,
SpecialCharactersEmoji SpecialCharactersGreek,
Mention, Emoji
]; ];
// Editor configuration. // Editor configuration.
@ -81,6 +83,7 @@ Editor.defaultConfig = {
'link', 'link',
'code', 'code',
'specialCharacters', 'specialCharacters',
'emoji',
'|', '|',
'undo', 'undo',
'redo', 'redo',

View file

@ -22,7 +22,7 @@ import PartDBLabelEditing from "./PartDBLabelEditing";
import "./PartDBLabel.css"; import "./PartDBLabel.css";
import Plugin from "@ckeditor/ckeditor5-core/src/plugin"; import {Plugin} from "ckeditor5";
export default class PartDBLabel extends Plugin { export default class PartDBLabel extends Plugin {
static get requires() { static get requires() {

View file

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import Command from '@ckeditor/ckeditor5-core/src/command'; import {Command} from 'ckeditor5';
export default class PartDBLabelCommand extends Command { export default class PartDBLabelCommand extends Command {
execute( { value } ) { execute( { value } ) {

View file

@ -17,11 +17,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; import {Plugin} from 'ckeditor5';
import PartDBLabelCommand from "./PartDBLabelCommand"; import PartDBLabelCommand from "./PartDBLabelCommand";
import { toWidget } from '@ckeditor/ckeditor5-widget/src/utils'; import { toWidget } from 'ckeditor5';
import Widget from '@ckeditor/ckeditor5-widget/src/widget'; import {Widget} from 'ckeditor5';
export default class PartDBLabelEditing extends Plugin { export default class PartDBLabelEditing extends Plugin {
static get requires() { // ADDED static get requires() { // ADDED

View file

@ -17,14 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; import {Plugin} from 'ckeditor5';
require('./lang/de.js'); require('./lang/de.js');
require('./lang/en.js');
import { addListToDropdown, createDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils'; import { addListToDropdown, createDropdown } from 'ckeditor5';
import Collection from '@ckeditor/ckeditor5-utils/src/collection'; import {Collection} from 'ckeditor5';
import Model from '@ckeditor/ckeditor5-ui/src/model'; import {UIModel} from 'ckeditor5';
export default class PartDBLabelUI extends Plugin { export default class PartDBLabelUI extends Plugin {
init() { init() {
@ -151,18 +152,28 @@ const PLACEHOLDERS = [
function getDropdownItemsDefinitions(t) { function getDropdownItemsDefinitions(t) {
const itemDefinitions = new Collection(); const itemDefinitions = new Collection();
let first = true;
for ( const group of PLACEHOLDERS) { for ( const group of PLACEHOLDERS) {
//Add group header //Add group header
itemDefinitions.add({
'type': 'separator', //Skip separator for first group
model: new Model( { if (!first) {
withText: true,
}) itemDefinitions.add({
}); 'type': 'separator',
model: new UIModel( {
withText: true,
})
});
} else {
first = false;
}
itemDefinitions.add({ itemDefinitions.add({
type: 'button', type: 'button',
model: new Model( { model: new UIModel( {
label: t(group.label), label: t(group.label),
withText: true, withText: true,
isEnabled: false, isEnabled: false,
@ -173,7 +184,7 @@ function getDropdownItemsDefinitions(t) {
for ( const entry of group.entries) { for ( const entry of group.entries) {
const definition = { const definition = {
type: 'button', type: 'button',
model: new Model( { model: new UIModel( {
commandParam: entry[0], commandParam: entry[0],
label: t(entry[1]), label: t(entry[1]),
tooltip: entry[0], tooltip: entry[0],

View file

@ -17,15 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
// Make sure that the global object is defined. If not, define it. import {add} from "ckeditor5";
window.CKEDITOR_TRANSLATIONS = window.CKEDITOR_TRANSLATIONS || {};
// Make sure that the dictionary for Polish translations exist. add( "de", {
window.CKEDITOR_TRANSLATIONS[ 'de' ] = window.CKEDITOR_TRANSLATIONS[ 'de' ] || {};
window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary = window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary || {};
// Extend the dictionary for Polish translations with your translations:
Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'Label Placeholder': 'Label Platzhalter', 'Label Placeholder': 'Label Platzhalter',
'Part': 'Bauteil', 'Part': 'Bauteil',
@ -88,5 +82,4 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'Instance name': 'Instanzname', 'Instance name': 'Instanzname',
'Target type': 'Zieltyp', 'Target type': 'Zieltyp',
'URL of this Part-DB instance': 'URL dieser Part-DB Instanz', 'URL of this Part-DB instance': 'URL dieser Part-DB Instanz',
});
} );

View file

@ -0,0 +1,84 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {add} from "ckeditor5";
add( "en", {
'Label Placeholder': 'Label placeholder',
'Part': 'Part',
'Database ID': 'Database ID',
'Part name': 'Part name',
'Category': 'Category',
'Category (Full path)': 'Category (full path)',
'Manufacturer': 'Manufacturer',
'Manufacturer (Full path)': 'Manufacturer (full path)',
'Footprint': 'Footprint',
'Footprint (Full path)': 'Footprint (full path)',
'Mass': 'Mass',
'Manufacturer Product Number (MPN)': 'Manufacturer Product Number (MPN)',
'Internal Part Number (IPN)': 'Internal Part Number (IPN)',
'Tags': 'Tags',
'Manufacturing status': 'Manufacturing status',
'Description': 'Description',
'Description (plain text)': 'Description (plain text)',
'Comment': 'Comment',
'Comment (plain text)': 'Comment (plain text)',
'Last modified datetime': 'Last modified datetime',
'Creation datetime': 'Creation datetime',
'IPN as QR code': 'IPN as QR code',
'IPN as Code 128 barcode': 'IPN as Code 128 barcode',
'IPN as Code 39 barcode': 'IPN as Code 39 barcode',
'Lot ID': 'Lot ID',
'Lot name': 'Lot name',
'Lot comment': 'Lot comment',
'Lot expiration date': 'Lot expiration date',
'Lot amount': 'Lot amount',
'Storage location': 'Storage location',
'Storage location (Full path)': 'Storage location (full path)',
'Full name of the lot owner': 'Full name of the lot owner',
'Username of the lot owner': 'Username of the lot owner',
'Barcodes': 'Barcodes',
'Content of the 1D barcodes (like Code 39)': 'Content of the 1D barcodes (like Code 39)',
'Content of the 2D barcodes (QR codes)': 'Content of the 2D barcodes (QR codes)',
'QR code linking to this element': 'QR code linking to this element',
'Code 128 barcode linking to this element': 'Code 128 barcode linking to this element',
'Code 39 barcode linking to this element': 'Code 39 barcode linking to this element',
'Code 93 barcode linking to this element': 'Code 93 barcode linking to this element',
'Datamatrix code linking to this element': 'Datamatrix code linking to this element',
'Location ID': 'Location ID',
'Name': 'Name',
'Full path': 'Full path',
'Parent name': 'Parent name',
'Parent full path': 'Parent full path',
'Full name of the location owner': 'Full name of the location owner',
'Username of the location owner': 'Username of the location owner',
'Username': 'Username',
'Username (including name)': 'Username (including name)',
'Current datetime': 'Current datetime',
'Current date': 'Current date',
'Current time': 'Current time',
'Instance name': 'Instance name',
'Target type': 'Target type',
'URL of this Part-DB instance': 'URL of this Part-DB instance',
} );

View file

@ -17,8 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { Plugin } from 'ckeditor5/src/core'; import { Plugin, MarkdownGfmDataProcessor } from 'ckeditor5';
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor';
const ALLOWED_TAGS = [ const ALLOWED_TAGS = [
//Common elements //Common elements
@ -34,7 +33,6 @@ const ALLOWED_TAGS = [
//Block elements //Block elements
'span', 'span',
'p',
'img', 'img',
@ -57,7 +55,7 @@ export default class ExtendedMarkdown extends Plugin {
constructor( editor ) { constructor( editor ) {
super( editor ); super( editor );
editor.data.processor = new GFMDataProcessor( editor.data.viewDocument ); editor.data.processor = new MarkdownGfmDataProcessor( editor.data.viewDocument );
for (const tag of ALLOWED_TAGS) { for (const tag of ALLOWED_TAGS) {
editor.data.processor.keepHtml(tag); editor.data.processor.keepHtml(tag);
} }

View file

@ -17,8 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { Plugin } from 'ckeditor5/src/core'; import {Plugin} from 'ckeditor5';
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor'; import {MarkdownGfmDataProcessor} from 'ckeditor5';
const ALLOWED_TAGS = [ const ALLOWED_TAGS = [
//Common elements //Common elements
@ -46,7 +46,7 @@ export default class ExtendedMarkdownInline extends Plugin {
constructor( editor ) { constructor( editor ) {
super( editor ); super( editor );
editor.data.processor = new GFMDataProcessor( editor.data.viewDocument ); editor.data.processor = new MarkdownGfmDataProcessor( editor.data.viewDocument );
for (const tag of ALLOWED_TAGS) { for (const tag of ALLOWED_TAGS) {
editor.data.processor.keepHtml(tag); editor.data.processor.keepHtml(tag);
} }

View file

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; import {Plugin} from 'ckeditor5';
export default class SingleLinePlugin extends Plugin { export default class SingleLinePlugin extends Plugin {
init() { init() {

View file

@ -17,14 +17,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters'; import SpecialCharacters from 'ckeditor5';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials'; import SpecialCharactersEssentials from 'ckeditor5';
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; import {Plugin} from 'ckeditor5';
const emoji = require('emoji.json'); export default class SpecialCharactersGreek extends Plugin {
export default class SpecialCharactersEmoji extends Plugin {
init() { init() {
const editor = this.editor; const editor = this.editor;
@ -32,9 +30,6 @@ export default class SpecialCharactersEmoji extends Plugin {
//Add greek characters to special characters //Add greek characters to special characters
specialCharsPlugin.addItems('Greek', this.getGreek()); specialCharsPlugin.addItems('Greek', this.getGreek());
//Add Emojis to special characters
specialCharsPlugin.addItems('Emoji', this.getEmojis());
} }
getGreek() { getGreek() {
@ -96,14 +91,4 @@ export default class SpecialCharactersEmoji extends Plugin {
{ title: 'san', character: 'Ϻ' }, { title: 'san', character: 'Ϻ' },
]; ];
} }
getEmojis() {
//Map our emoji data to the format the plugin expects
return emoji.map(emoji => {
return {
title: emoji.name,
character: emoji.char
};
});
}
} }

View file

@ -0,0 +1,359 @@
import { Controller } from "@hotwired/stimulus"
import { generateCsrfHeaders } from "./csrf_protection_controller"
export default class extends Controller {
static targets = ["progressBar", "progressText"]
static values = {
jobId: Number,
partId: Number,
researchUrl: String,
researchAllUrl: String,
markCompletedUrl: String,
markSkippedUrl: String,
markPendingUrl: String
}
connect() {
// Auto-refresh progress if job is in progress
if (this.hasProgressBarTarget) {
this.startProgressUpdates()
}
// Restore scroll position after page reload (if any)
this.restoreScrollPosition()
}
getHeaders() {
const headers = {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
}
// Add CSRF headers if available
const form = document.querySelector('form')
if (form) {
const csrfHeaders = generateCsrfHeaders(form)
Object.assign(headers, csrfHeaders)
}
return headers
}
async fetchWithErrorHandling(url, options = {}, timeout = 30000) {
const controller = new AbortController()
const timeoutId = setTimeout(() => controller.abort(), timeout)
try {
const response = await fetch(url, {
...options,
headers: { ...this.getHeaders(), ...options.headers },
signal: controller.signal
})
clearTimeout(timeoutId)
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Server error (${response.status}): ${errorText}`)
}
return await response.json()
} catch (error) {
clearTimeout(timeoutId)
if (error.name === 'AbortError') {
throw new Error('Request timed out. Please try again.')
} else if (error.message.includes('Failed to fetch')) {
throw new Error('Network error. Please check your connection and try again.')
} else {
throw error
}
}
}
disconnect() {
if (this.progressInterval) {
clearInterval(this.progressInterval)
}
}
startProgressUpdates() {
// Progress updates are handled via page reload for better reliability
// No need for periodic updates since state changes trigger page refresh
}
restoreScrollPosition() {
const savedPosition = sessionStorage.getItem('bulkImportScrollPosition')
if (savedPosition) {
// Restore scroll position after a small delay to ensure page is fully loaded
setTimeout(() => {
window.scrollTo(0, parseInt(savedPosition))
// Clear the saved position so it doesn't interfere with normal navigation
sessionStorage.removeItem('bulkImportScrollPosition')
}, 100)
}
}
async markCompleted(event) {
const partId = event.currentTarget.dataset.partId
try {
const url = this.markCompletedUrlValue.replace('__PART_ID__', partId)
const data = await this.fetchWithErrorHandling(url, { method: 'POST' })
if (data.success) {
this.updateProgressDisplay(data)
this.markRowAsCompleted(partId)
if (data.job_completed) {
this.showJobCompletedMessage()
}
} else {
this.showErrorMessage(data.error || 'Failed to mark part as completed')
}
} catch (error) {
console.error('Error marking part as completed:', error)
this.showErrorMessage(error.message || 'Failed to mark part as completed')
}
}
async markSkipped(event) {
const partId = event.currentTarget.dataset.partId
const reason = prompt('Reason for skipping (optional):') || ''
try {
const url = this.markSkippedUrlValue.replace('__PART_ID__', partId)
const data = await this.fetchWithErrorHandling(url, {
method: 'POST',
body: JSON.stringify({ reason })
})
if (data.success) {
this.updateProgressDisplay(data)
this.markRowAsSkipped(partId)
} else {
this.showErrorMessage(data.error || 'Failed to mark part as skipped')
}
} catch (error) {
console.error('Error marking part as skipped:', error)
this.showErrorMessage(error.message || 'Failed to mark part as skipped')
}
}
async markPending(event) {
const partId = event.currentTarget.dataset.partId
try {
const url = this.markPendingUrlValue.replace('__PART_ID__', partId)
const data = await this.fetchWithErrorHandling(url, { method: 'POST' })
if (data.success) {
this.updateProgressDisplay(data)
this.markRowAsPending(partId)
} else {
this.showErrorMessage(data.error || 'Failed to mark part as pending')
}
} catch (error) {
console.error('Error marking part as pending:', error)
this.showErrorMessage(error.message || 'Failed to mark part as pending')
}
}
updateProgressDisplay(data) {
if (this.hasProgressBarTarget) {
this.progressBarTarget.style.width = `${data.progress}%`
this.progressBarTarget.setAttribute('aria-valuenow', data.progress)
}
if (this.hasProgressTextTarget) {
this.progressTextTarget.textContent = `${data.completed_count} / ${data.total_count} completed`
}
}
markRowAsCompleted(partId) {
// Save scroll position and refresh page to show updated state
sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString())
window.location.reload()
}
markRowAsSkipped(partId) {
// Save scroll position and refresh page to show updated state
sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString())
window.location.reload()
}
markRowAsPending(partId) {
// Save scroll position and refresh page to show updated state
sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString())
window.location.reload()
}
showJobCompletedMessage() {
const alert = document.createElement('div')
alert.className = 'alert alert-success alert-dismissible fade show'
alert.innerHTML = `
<i class="fas fa-check-circle"></i>
Job completed! All parts have been processed.
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
`
const container = document.querySelector('.card-body')
container.insertBefore(alert, container.firstChild)
}
async researchPart(event) {
event.preventDefault()
event.stopPropagation()
const partId = event.currentTarget.dataset.partId
const spinner = event.currentTarget.querySelector(`[data-research-spinner="${partId}"]`)
const button = event.currentTarget
// Show loading state
if (spinner) {
spinner.style.display = 'inline-block'
}
button.disabled = true
try {
const url = this.researchUrlValue.replace('__PART_ID__', partId)
const controller = new AbortController()
const timeoutId = setTimeout(() => controller.abort(), 30000) // 30 second timeout
const response = await fetch(url, {
method: 'POST',
headers: this.getHeaders(),
signal: controller.signal
})
clearTimeout(timeoutId)
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Server error (${response.status}): ${errorText}`)
}
const data = await response.json()
if (data.success) {
this.showSuccessMessage(`Research completed for part. Found ${data.results_count} results.`)
// Save scroll position and reload to show updated results
sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString())
window.location.reload()
} else {
this.showErrorMessage(data.error || 'Research failed')
}
} catch (error) {
console.error('Error researching part:', error)
if (error.name === 'AbortError') {
this.showErrorMessage('Research timed out. Please try again.')
} else if (error.message.includes('Failed to fetch')) {
this.showErrorMessage('Network error. Please check your connection and try again.')
} else {
this.showErrorMessage(error.message || 'Research failed due to an unexpected error')
}
} finally {
// Hide loading state
if (spinner) {
spinner.style.display = 'none'
}
button.disabled = false
}
}
async researchAllParts(event) {
event.preventDefault()
event.stopPropagation()
const spinner = document.getElementById('research-all-spinner')
const button = event.currentTarget
// Show loading state
if (spinner) {
spinner.style.display = 'inline-block'
}
button.disabled = true
try {
const controller = new AbortController()
const timeoutId = setTimeout(() => controller.abort(), 120000) // 2 minute timeout for bulk operations
const response = await fetch(this.researchAllUrlValue, {
method: 'POST',
headers: this.getHeaders(),
signal: controller.signal
})
clearTimeout(timeoutId)
if (!response.ok) {
const errorText = await response.text()
throw new Error(`Server error (${response.status}): ${errorText}`)
}
const data = await response.json()
if (data.success) {
this.showSuccessMessage(`Research completed for ${data.researched_count} parts.`)
// Save scroll position and reload to show updated results
sessionStorage.setItem('bulkImportScrollPosition', window.scrollY.toString())
window.location.reload()
} else {
this.showErrorMessage(data.error || 'Bulk research failed')
}
} catch (error) {
console.error('Error researching all parts:', error)
if (error.name === 'AbortError') {
this.showErrorMessage('Bulk research timed out. This may happen with large batches. Please try again or process smaller batches.')
} else if (error.message.includes('Failed to fetch')) {
this.showErrorMessage('Network error. Please check your connection and try again.')
} else {
this.showErrorMessage(error.message || 'Bulk research failed due to an unexpected error')
}
} finally {
// Hide loading state
if (spinner) {
spinner.style.display = 'none'
}
button.disabled = false
}
}
showSuccessMessage(message) {
this.showToast('success', message)
}
showErrorMessage(message) {
this.showToast('error', message)
}
showToast(type, message) {
// Create a simple alert that doesn't disrupt layout
const alertId = 'alert-' + Date.now()
const iconClass = type === 'success' ? 'fa-check-circle' : 'fa-exclamation-triangle'
const alertClass = type === 'success' ? 'alert-success' : 'alert-danger'
const alertHTML = `
<div class="alert ${alertClass} alert-dismissible fade show position-fixed"
style="top: 20px; right: 20px; z-index: 9999; max-width: 400px;"
id="${alertId}">
<i class="fas ${iconClass} me-2"></i>
${message}
<button type="button" class="btn-close" onclick="this.parentElement.remove()" aria-label="Close"></button>
</div>
`
// Add alert to body
document.body.insertAdjacentHTML('beforeend', alertHTML)
// Auto-remove after 5 seconds
setTimeout(() => {
const alertElement = document.getElementById(alertId)
if (alertElement) {
alertElement.remove()
}
}, 5000)
}
}

View file

@ -0,0 +1,92 @@
import { Controller } from "@hotwired/stimulus"
import { generateCsrfHeaders } from "./csrf_protection_controller"
export default class extends Controller {
static values = {
deleteUrl: String,
stopUrl: String,
deleteConfirmMessage: String,
stopConfirmMessage: String
}
connect() {
// Controller initialized
}
getHeaders() {
const headers = {
'X-Requested-With': 'XMLHttpRequest'
}
// Add CSRF headers if available
const form = document.querySelector('form')
if (form) {
const csrfHeaders = generateCsrfHeaders(form)
Object.assign(headers, csrfHeaders)
}
return headers
}
async deleteJob(event) {
const jobId = event.currentTarget.dataset.jobId
const confirmMessage = this.deleteConfirmMessageValue || 'Are you sure you want to delete this job?'
if (confirm(confirmMessage)) {
try {
const deleteUrl = this.deleteUrlValue.replace('__JOB_ID__', jobId)
const response = await fetch(deleteUrl, {
method: 'DELETE',
headers: this.getHeaders()
})
if (!response.ok) {
const errorText = await response.text()
throw new Error(`HTTP ${response.status}: ${errorText}`)
}
const data = await response.json()
if (data.success) {
location.reload()
} else {
alert('Error deleting job: ' + (data.error || 'Unknown error'))
}
} catch (error) {
console.error('Error deleting job:', error)
alert('Error deleting job: ' + error.message)
}
}
}
async stopJob(event) {
const jobId = event.currentTarget.dataset.jobId
const confirmMessage = this.stopConfirmMessageValue || 'Are you sure you want to stop this job?'
if (confirm(confirmMessage)) {
try {
const stopUrl = this.stopUrlValue.replace('__JOB_ID__', jobId)
const response = await fetch(stopUrl, {
method: 'POST',
headers: this.getHeaders()
})
if (!response.ok) {
const errorText = await response.text()
throw new Error(`HTTP ${response.status}: ${errorText}`)
}
const data = await response.json()
if (data.success) {
location.reload()
} else {
alert('Error stopping job: ' + (data.error || 'Unknown error'))
}
} catch (error) {
console.error('Error stopping job:', error)
alert('Error stopping job: ' + error.message)
}
}
}
}

View file

@ -56,12 +56,16 @@ export default class MarkdownController extends Controller {
this.element.innerHTML = DOMPurify.sanitize(MarkdownController._marked.parse(this.unescapeHTML(raw))); this.element.innerHTML = DOMPurify.sanitize(MarkdownController._marked.parse(this.unescapeHTML(raw)));
for(let a of this.element.querySelectorAll('a')) { for(let a of this.element.querySelectorAll('a')) {
//Mark all links as external // test if link is absolute
a.classList.add('link-external'); var r = new RegExp('^(?:[a-z+]+:)?//', 'i');
//Open links in new tag if (r.test(a.getAttribute('href'))) {
a.setAttribute('target', '_blank'); //Mark all links as external
//Dont track a.classList.add('link-external');
a.setAttribute('rel', 'noopener'); //Open links in new tag
a.setAttribute('target', '_blank');
//Dont track
a.setAttribute('rel', 'noopener');
}
} }
//Apply bootstrap styles to tables //Apply bootstrap styles to tables

View file

@ -0,0 +1,81 @@
const nameCheck = /^[-_a-zA-Z0-9]{4,22}$/;
const tokenCheck = /^[-_/+a-zA-Z0-9]{24,}$/;
// Generate and double-submit a CSRF token in a form field and a cookie, as defined by Symfony's SameOriginCsrfTokenManager
// Use `form.requestSubmit()` to ensure that the submit event is triggered. Using `form.submit()` will not trigger the event
// and thus this event-listener will not be executed.
document.addEventListener('submit', function (event) {
generateCsrfToken(event.target);
}, true);
// When @hotwired/turbo handles form submissions, send the CSRF token in a header in addition to a cookie
// The `framework.csrf_protection.check_header` config option needs to be enabled for the header to be checked
document.addEventListener('turbo:submit-start', function (event) {
const h = generateCsrfHeaders(event.detail.formSubmission.formElement);
Object.keys(h).map(function (k) {
event.detail.formSubmission.fetchRequest.headers[k] = h[k];
});
});
// When @hotwired/turbo handles form submissions, remove the CSRF cookie once a form has been submitted
document.addEventListener('turbo:submit-end', function (event) {
removeCsrfToken(event.detail.formSubmission.formElement);
});
export function generateCsrfToken (formElement) {
const csrfField = formElement.querySelector('input[data-controller="csrf-protection"], input[name="_csrf_token"]');
if (!csrfField) {
return;
}
let csrfCookie = csrfField.getAttribute('data-csrf-protection-cookie-value');
let csrfToken = csrfField.value;
if (!csrfCookie && nameCheck.test(csrfToken)) {
csrfField.setAttribute('data-csrf-protection-cookie-value', csrfCookie = csrfToken);
csrfField.defaultValue = csrfToken = btoa(String.fromCharCode.apply(null, (window.crypto || window.msCrypto).getRandomValues(new Uint8Array(18))));
}
csrfField.dispatchEvent(new Event('change', { bubbles: true }));
if (csrfCookie && tokenCheck.test(csrfToken)) {
const cookie = csrfCookie + '_' + csrfToken + '=' + csrfCookie + '; path=/; samesite=strict';
document.cookie = window.location.protocol === 'https:' ? '__Host-' + cookie + '; secure' : cookie;
}
}
export function generateCsrfHeaders (formElement) {
const headers = {};
const csrfField = formElement.querySelector('input[data-controller="csrf-protection"], input[name="_csrf_token"]');
if (!csrfField) {
return headers;
}
const csrfCookie = csrfField.getAttribute('data-csrf-protection-cookie-value');
if (tokenCheck.test(csrfField.value) && nameCheck.test(csrfCookie)) {
headers[csrfCookie] = csrfField.value;
}
return headers;
}
export function removeCsrfToken (formElement) {
const csrfField = formElement.querySelector('input[data-controller="csrf-protection"], input[name="_csrf_token"]');
if (!csrfField) {
return;
}
const csrfCookie = csrfField.getAttribute('data-csrf-protection-cookie-value');
if (tokenCheck.test(csrfField.value) && nameCheck.test(csrfCookie)) {
const cookie = csrfCookie + '_' + csrfField.value + '=0; path=/; samesite=strict; max-age=0';
document.cookie = window.location.protocol === 'https:' ? '__Host-' + cookie + '; secure' : cookie;
}
}
/* stimulusFetch: 'lazy' */
export default 'csrf-protection-controller';

View file

@ -34,6 +34,11 @@ export default class extends Controller {
connect() { connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = { let settings = {
persistent: false, persistent: false,
create: true, create: true,
@ -42,6 +47,7 @@ export default class extends Controller {
selectOnTab: true, selectOnTab: true,
//This a an ugly solution to disable the delimiter parsing of the TomSelect plugin //This a an ugly solution to disable the delimiter parsing of the TomSelect plugin
delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING', delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING',
dropdownParent: dropdownParent,
render: { render: {
item: (data, escape) => { item: (data, escape) => {
return '<span>' + escape(data.label) + '</span>'; return '<span>' + escape(data.label) + '</span>';

View file

@ -23,10 +23,32 @@ import { default as FullEditor } from "../../ckeditor/markdown_full";
import { default as SingleLineEditor} from "../../ckeditor/markdown_single_line"; import { default as SingleLineEditor} from "../../ckeditor/markdown_single_line";
import { default as HTMLLabelEditor } from "../../ckeditor/html_label"; import { default as HTMLLabelEditor } from "../../ckeditor/html_label";
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog'; import {EditorWatchdog} from 'ckeditor5';
import "ckeditor5/ckeditor5.css";;
import "../../css/components/ckeditor.css"; import "../../css/components/ckeditor.css";
const translationContext = require.context(
'ckeditor5/translations',
false,
//Only load the translation files we will really need
/(de|it|fr|ru|ja|cs|da|zh|pl|hu)\.js$/
);
function loadTranslation(language) {
if (!language || language === 'en') {
return null;
}
const lang = language.slice(0, 2);
const path = `./${lang}.js`;
if (translationContext.keys().includes(path)) {
const module = translationContext(path);
return module.default;
} else {
return null;
}
}
/* stimulusFetch: 'lazy' */ /* stimulusFetch: 'lazy' */
export default class extends Controller { export default class extends Controller {
connect() { connect() {
@ -51,9 +73,22 @@ export default class extends Controller {
const language = document.body.dataset.locale ?? "en"; const language = document.body.dataset.locale ?? "en";
const emojiURL = new URL('../../ckeditor/emojis.json', import.meta.url).href;
const config = { const config = {
language: language, language: language,
licenseKey: "GPL", licenseKey: "GPL",
emoji: {
definitionsUrl: emojiURL
}
}
//Load translations if not english
let translations = loadTranslation(language);
if (translations) {
//Keep existing translations (e.g. from other plugins), if any
config.translations = [window.CKEDITOR_TRANSLATIONS, translations];
} }
const watchdog = new EditorWatchdog(); const watchdog = new EditorWatchdog();
@ -71,6 +106,15 @@ export default class extends Controller {
editor_div.classList.add(...new_classes.split(",")); editor_div.classList.add(...new_classes.split(","));
} }
// Automatic synchronization of source input
editor.model.document.on("change:data", () => {
editor.updateSourceElement();
// Dispatch the input event for further treatment
const event = new Event("input");
this.element.dispatchEvent(event);
});
//This return is important! Otherwise we get mysterious errors in the console //This return is important! Otherwise we get mysterious errors in the console
//See: https://github.com/ckeditor/ckeditor5/issues/5897#issuecomment-628471302 //See: https://github.com/ckeditor/ckeditor5/issues/5897#issuecomment-628471302
return editor; return editor;

View file

@ -45,8 +45,10 @@ export default class extends DatatablesController {
//Hide/Unhide panel with the selection tools //Hide/Unhide panel with the selection tools
if (count > 0) { if (count > 0) {
selectPanel.classList.remove('d-none'); selectPanel.classList.remove('d-none');
selectPanel.classList.add('sticky-select-bar');
} else { } else {
selectPanel.classList.add('d-none'); selectPanel.classList.add('d-none');
selectPanel.classList.remove('sticky-select-bar');
} }
//Update selection count text //Update selection count text

View file

@ -0,0 +1,250 @@
import { Controller } from "@hotwired/stimulus";
import "../../css/components/autocomplete_bootstrap_theme.css";
export default class extends Controller {
static targets = ["input"];
static values = {
partId: Number,
partCategoryId: Number,
partDescription: String,
suggestions: Object,
commonSectionHeader: String, // Dynamic header for common Prefixes
partIncrementHeader: String, // Dynamic header for new possible part increment
suggestUrl: String,
};
connect() {
this.configureAutocomplete();
this.watchCategoryChanges();
this.watchDescriptionChanges();
}
templates = {
commonSectionHeader({ title, html }) {
return html`
<section class="aa-Source">
<div class="aa-SourceHeader">
<span class="aa-SourceHeaderTitle">${title}</span>
<div class="aa-SourceHeaderLine"></div>
</div>
</section>
`;
},
partIncrementHeader({ title, html }) {
return html`
<section class="aa-Source">
<div class="aa-SourceHeader">
<span class="aa-SourceHeaderTitle">${title}</span>
<div class="aa-SourceHeaderLine"></div>
</div>
</section>
`;
},
list({ html }) {
return html`
<ul class="aa-List" role="listbox"></ul>
`;
},
item({ suggestion, description, html }) {
return html`
<li class="aa-Item" role="option" data-suggestion="${suggestion}" aria-selected="false">
<div class="aa-ItemWrapper">
<div class="aa-ItemContent">
<div class="aa-ItemIcon aa-ItemIcon--noBorder">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9z"></path>
</svg>
</div>
<div class="aa-ItemContentBody">
<div class="aa-ItemContentTitle">${suggestion}</div>
<div class="aa-ItemContentDescription">${description}</div>
</div>
</div>
</div>
</li>
`;
},
};
configureAutocomplete() {
const inputField = this.inputTarget;
const commonPrefixes = this.suggestionsValue.commonPrefixes || [];
const prefixesPartIncrement = this.suggestionsValue.prefixesPartIncrement || [];
const commonHeader = this.commonSectionHeaderValue;
const partIncrementHeader = this.partIncrementHeaderValue;
if (!inputField || (!commonPrefixes.length && !prefixesPartIncrement.length)) return;
// Check whether the panel should be created at the update
if (this.isPanelInitialized) {
const existingPanel = inputField.parentNode.querySelector(".aa-Panel");
if (existingPanel) {
// Only remove the panel in the update phase
existingPanel.remove();
}
}
// Create panel
const panel = document.createElement("div");
panel.classList.add("aa-Panel");
panel.style.display = "none";
// Create panel layout
const panelLayout = document.createElement("div");
panelLayout.classList.add("aa-PanelLayout", "aa-Panel--scrollable");
// Section for prefixes part increment
if (prefixesPartIncrement.length) {
const partIncrementSection = document.createElement("section");
partIncrementSection.classList.add("aa-Source");
const partIncrementHeaderHtml = this.templates.partIncrementHeader({
title: partIncrementHeader,
html: String.raw,
});
partIncrementSection.innerHTML += partIncrementHeaderHtml;
const partIncrementList = document.createElement("ul");
partIncrementList.classList.add("aa-List");
partIncrementList.setAttribute("role", "listbox");
prefixesPartIncrement.forEach((prefix) => {
const itemHTML = this.templates.item({
suggestion: prefix.title,
description: prefix.description,
html: String.raw,
});
partIncrementList.innerHTML += itemHTML;
});
partIncrementSection.appendChild(partIncrementList);
panelLayout.appendChild(partIncrementSection);
}
// Section for common prefixes
if (commonPrefixes.length) {
const commonSection = document.createElement("section");
commonSection.classList.add("aa-Source");
const commonSectionHeader = this.templates.commonSectionHeader({
title: commonHeader,
html: String.raw,
});
commonSection.innerHTML += commonSectionHeader;
const commonList = document.createElement("ul");
commonList.classList.add("aa-List");
commonList.setAttribute("role", "listbox");
commonPrefixes.forEach((prefix) => {
const itemHTML = this.templates.item({
suggestion: prefix.title,
description: prefix.description,
html: String.raw,
});
commonList.innerHTML += itemHTML;
});
commonSection.appendChild(commonList);
panelLayout.appendChild(commonSection);
}
panel.appendChild(panelLayout);
inputField.parentNode.appendChild(panel);
inputField.addEventListener("focus", () => {
panel.style.display = "block";
});
inputField.addEventListener("blur", () => {
setTimeout(() => {
panel.style.display = "none";
}, 100);
});
// Selection of an item
panelLayout.addEventListener("mousedown", (event) => {
const target = event.target.closest("li");
if (target) {
inputField.value = target.dataset.suggestion;
panel.style.display = "none";
}
});
this.isPanelInitialized = true;
};
watchCategoryChanges() {
const categoryField = document.querySelector('[data-ipn-suggestion="categoryField"]');
const descriptionField = document.querySelector('[data-ipn-suggestion="descriptionField"]');
this.previousCategoryId = Number(this.partCategoryIdValue);
if (categoryField) {
categoryField.addEventListener("change", () => {
const categoryId = Number(categoryField.value);
const description = String(descriptionField?.value ?? '');
// Check whether the category has changed compared to the previous ID
if (categoryId !== this.previousCategoryId) {
this.fetchNewSuggestions(categoryId, description);
this.previousCategoryId = categoryId;
}
});
}
}
watchDescriptionChanges() {
const categoryField = document.querySelector('[data-ipn-suggestion="categoryField"]');
const descriptionField = document.querySelector('[data-ipn-suggestion="descriptionField"]');
this.previousDescription = String(this.partDescriptionValue);
if (descriptionField) {
descriptionField.addEventListener("input", () => {
const categoryId = Number(categoryField.value);
const description = String(descriptionField?.value ?? '');
// Check whether the description has changed compared to the previous one
if (description !== this.previousDescription) {
this.fetchNewSuggestions(categoryId, description);
this.previousDescription = description;
}
});
}
}
fetchNewSuggestions(categoryId, description) {
const baseUrl = this.suggestUrlValue;
const partId = this.partIdValue;
const truncatedDescription = description.length > 150 ? description.substring(0, 150) : description;
const encodedDescription = this.base64EncodeUtf8(truncatedDescription);
const url = `${baseUrl}?partId=${partId}&categoryId=${categoryId}` + (description !== '' ? `&description=${encodedDescription}` : '');
fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
},
})
.then((response) => {
if (!response.ok) {
throw new Error(`Error when calling up the IPN-suggestions: ${response.status}`);
}
return response.json();
})
.then((data) => {
this.suggestionsValue = data;
this.configureAutocomplete();
})
.catch((error) => {
console.error("Errors when loading the new IPN-suggestions:", error);
});
};
base64EncodeUtf8(text) {
const utf8Bytes = new TextEncoder().encode(text);
return btoa(String.fromCharCode(...utf8Bytes));
};
}

View file

@ -10,12 +10,19 @@ export default class extends Controller {
connect() { connect() {
//Check if tomselect is inside an modal and do not attach the dropdown to body in that case (as it breaks the modal)
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = { let settings = {
allowEmptyOption: true, allowEmptyOption: true,
plugins: ['dropdown_input'], plugins: ['dropdown_input'],
searchField: ["name", "description", "category", "footprint"], searchField: ["name", "description", "category", "footprint"],
valueField: "id", valueField: "id",
labelField: "name", labelField: "name",
dropdownParent: dropdownParent,
preload: "focus", preload: "focus",
render: { render: {
item: (data, escape) => { item: (data, escape) => {

View file

@ -38,11 +38,17 @@ export default class extends Controller {
this._emptyMessage = this.element.getAttribute('title'); this._emptyMessage = this.element.getAttribute('title');
} }
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = { let settings = {
plugins: ["clear_button"],
allowEmptyOption: true, allowEmptyOption: true,
selectOnTab: true, selectOnTab: true,
maxOptions: null, maxOptions: null,
dropdownParent: dropdownParent,
render: { render: {
item: this.renderItem.bind(this), item: this.renderItem.bind(this),
@ -50,7 +56,24 @@ export default class extends Controller {
} }
}; };
//Load the drag_drop plugin if the select is ordered
if (this.element.dataset.orderedValue) {
settings.plugins.push('drag_drop');
settings.plugins.push("caret_position");
}
//If multiple items can be selected, enable the remove_button plugin
if (this.element.multiple) {
settings.plugins.push('remove_button');
}
this._tomSelect = new TomSelect(this.element, settings); this._tomSelect = new TomSelect(this.element, settings);
//If the select is ordered, we need to update the value field (with the decoded value from the orderedValue field)
if (this.element.dataset.orderedValue) {
const data = JSON.parse(this.element.dataset.orderedValue);
this._tomSelect.setValue(data);
}
} }
getTomSelect() { getTomSelect() {

View file

@ -20,13 +20,21 @@
import {Controller} from "@hotwired/stimulus"; import {Controller} from "@hotwired/stimulus";
import TomSelect from "tom-select"; import TomSelect from "tom-select";
// TODO: Merge with select_controller.js
export default class extends Controller { export default class extends Controller {
_tomSelect; _tomSelect;
connect() { connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
this._tomSelect = new TomSelect(this.element, { this._tomSelect = new TomSelect(this.element, {
maxItems: 1000, maxItems: 1000,
allowEmptyOption: true, allowEmptyOption: true,
dropdownParent: dropdownParent,
plugins: ['remove_button'], plugins: ['remove_button'],
}); });
} }

View file

@ -40,6 +40,11 @@ export default class extends Controller {
connect() { connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = { let settings = {
persistent: false, persistent: false,
create: true, create: true,
@ -50,6 +55,7 @@ export default class extends Controller {
valueField: 'text', valueField: 'text',
searchField: 'text', searchField: 'text',
orderField: 'text', orderField: 'text',
dropdownParent: dropdownParent,
//This a an ugly solution to disable the delimiter parsing of the TomSelect plugin //This a an ugly solution to disable the delimiter parsing of the TomSelect plugin
delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING', delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING',

View file

@ -40,7 +40,10 @@ export default class extends Controller {
const allowAdd = this.element.getAttribute("data-allow-add") === "true"; const allowAdd = this.element.getAttribute("data-allow-add") === "true";
const addHint = this.element.getAttribute("data-add-hint") ?? ""; const addHint = this.element.getAttribute("data-add-hint") ?? "";
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = { let settings = {
@ -54,6 +57,7 @@ export default class extends Controller {
maxItems: 1, maxItems: 1,
delimiter: "$$VERY_LONG_DELIMITER_THAT_SHOULD_NEVER_APPEAR$$", delimiter: "$$VERY_LONG_DELIMITER_THAT_SHOULD_NEVER_APPEAR$$",
splitOn: null, splitOn: null,
dropdownParent: dropdownParent,
searchField: [ searchField: [
{field: "text", weight : 2}, {field: "text", weight : 2},

View file

@ -33,6 +33,11 @@ export default class extends Controller {
_tomSelect; _tomSelect;
connect() { connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = { let settings = {
plugins: { plugins: {
remove_button:{}, remove_button:{},
@ -43,6 +48,7 @@ export default class extends Controller {
selectOnTab: true, selectOnTab: true,
createOnBlur: true, createOnBlur: true,
create: true, create: true,
dropdownParent: dropdownParent,
}; };
if(this.element.dataset.autocomplete) { if(this.element.dataset.autocomplete) {

View file

@ -0,0 +1,136 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["tbody", "addButton", "submitButton"]
static values = {
mappingIndex: Number,
maxMappings: Number,
prototype: String,
maxMappingsReachedMessage: String
}
connect() {
this.updateAddButtonState()
this.updateFieldOptions()
this.attachEventListeners()
}
attachEventListeners() {
// Add event listeners to existing field selects
const fieldSelects = this.tbodyTarget.querySelectorAll('select[name*="[field]"]')
fieldSelects.forEach(select => {
select.addEventListener('change', this.updateFieldOptions.bind(this))
})
// Note: Add button click is handled by Stimulus action in template (data-action="click->field-mapping#addMapping")
// No manual event listener needed
// Form submit handler
const form = this.element.querySelector('form')
if (form && this.hasSubmitButtonTarget) {
form.addEventListener('submit', this.handleFormSubmit.bind(this))
}
}
addMapping() {
const currentMappings = this.tbodyTarget.querySelectorAll('.mapping-row').length
if (currentMappings >= this.maxMappingsValue) {
alert(this.maxMappingsReachedMessageValue)
return
}
const newRowHtml = this.prototypeValue.replace(/__name__/g, this.mappingIndexValue)
const tempDiv = document.createElement('div')
tempDiv.innerHTML = newRowHtml
const fieldWidget = tempDiv.querySelector('select[name*="[field]"]') || tempDiv.children[0]
const providerWidget = tempDiv.querySelector('select[name*="[providers]"]') || tempDiv.children[1]
const priorityWidget = tempDiv.querySelector('input[name*="[priority]"]') || tempDiv.children[2]
const newRow = document.createElement('tr')
newRow.className = 'mapping-row'
newRow.innerHTML = `
<td>${fieldWidget ? fieldWidget.outerHTML : ''}</td>
<td>${providerWidget ? providerWidget.outerHTML : ''}</td>
<td>${priorityWidget ? priorityWidget.outerHTML : ''}</td>
<td>
<button type="button" class="btn btn-danger btn-sm" data-action="click->field-mapping#removeMapping">
<i class="fas fa-trash"></i>
</button>
</td>
`
this.tbodyTarget.appendChild(newRow)
this.mappingIndexValue++
const newFieldSelect = newRow.querySelector('select[name*="[field]"]')
if (newFieldSelect) {
newFieldSelect.value = ''
newFieldSelect.addEventListener('change', this.updateFieldOptions.bind(this))
}
this.updateFieldOptions()
this.updateAddButtonState()
}
removeMapping(event) {
const row = event.target.closest('tr')
row.remove()
this.updateFieldOptions()
this.updateAddButtonState()
}
updateFieldOptions() {
const fieldSelects = this.tbodyTarget.querySelectorAll('select[name*="[field]"]')
const selectedFields = Array.from(fieldSelects)
.map(select => select.value)
.filter(value => value && value !== '')
fieldSelects.forEach(select => {
Array.from(select.options).forEach(option => {
const isCurrentValue = option.value === select.value
const isEmptyOption = !option.value || option.value === ''
const isAlreadySelected = selectedFields.includes(option.value)
if (!isEmptyOption && isAlreadySelected && !isCurrentValue) {
option.disabled = true
option.style.display = 'none'
} else {
option.disabled = false
option.style.display = ''
}
})
})
}
updateAddButtonState() {
const currentMappings = this.tbodyTarget.querySelectorAll('.mapping-row').length
if (this.hasAddButtonTarget) {
if (currentMappings >= this.maxMappingsValue) {
this.addButtonTarget.disabled = true
this.addButtonTarget.title = this.maxMappingsReachedMessageValue
} else {
this.addButtonTarget.disabled = false
this.addButtonTarget.title = ''
}
}
}
handleFormSubmit(event) {
if (this.hasSubmitButtonTarget) {
this.submitButtonTarget.disabled = true
// Disable the entire form to prevent changes during processing
const form = event.target
const formElements = form.querySelectorAll('input, select, textarea, button')
formElements.forEach(element => {
if (element !== this.submitButtonTarget) {
element.disabled = true
}
})
}
}
}

View file

@ -0,0 +1,68 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2022 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Controller } from '@hotwired/stimulus';
export default class extends Controller {
static targets = ['items'];
static values = {
prototype: String,
prototypeName: { type: String, default: '__name__' },
index: { type: Number, default: 0 },
};
connect() {
if (!this.hasIndexValue || Number.isNaN(this.indexValue)) {
this.indexValue = this.itemsTarget?.children.length || 0;
}
}
add(event) {
event.preventDefault();
const encodedProto = this.prototypeValue || '';
const placeholder = this.prototypeNameValue || '__name__';
if (!encodedProto || !this.itemsTarget) return;
const protoHtml = this._decodeHtmlAttribute(encodedProto);
const idx = this.indexValue;
const html = protoHtml.replace(new RegExp(placeholder, 'g'), String(idx));
const wrapper = document.createElement('div');
wrapper.innerHTML = html;
const newItem = wrapper.firstElementChild;
if (newItem) {
this.itemsTarget.appendChild(newItem);
this.indexValue = idx + 1;
}
}
remove(event) {
event.preventDefault();
const row = event.currentTarget.closest('.tc-item');
if (row) row.remove();
}
_decodeHtmlAttribute(str) {
const tmp = document.createElement('textarea');
tmp.innerHTML = str;
return tmp.value || tmp.textContent || '';
}
}

View file

@ -0,0 +1,86 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Controller } from '@hotwired/stimulus';
import '../css/components/toggle_password.css';
export default class extends Controller {
static values = {
visibleLabel: { type: String, default: 'Show' },
visibleIcon: { type: String, default: 'Default' },
hiddenLabel: { type: String, default: 'Hide' },
hiddenIcon: { type: String, default: 'Default' },
buttonClasses: Array,
};
isDisplayed = false;
visibleIcon = `<svg xmlns="http://www.w3.org/2000/svg" class="toggle-password-icon" viewBox="0 0 20 20" fill="currentColor">
<path d="M10 12a2 2 0 100-4 2 2 0 000 4z" />
<path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd" />
</svg>`;
hiddenIcon = `<svg xmlns="http://www.w3.org/2000/svg" class="toggle-password-icon" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z" clip-rule="evenodd" />
<path d="M12.454 16.697L9.75 13.992a4 4 0 01-3.742-3.741L2.335 6.578A9.98 9.98 0 00.458 10c1.274 4.057 5.065 7 9.542 7 .847 0 1.669-.105 2.454-.303z" />
</svg>`;
connect() {
if (this.visibleIconValue !== 'Default') {
this.visibleIcon = this.visibleIconValue;
}
if (this.hiddenIconValue !== 'Default') {
this.hiddenIcon = this.hiddenIconValue;
}
const button = this.createButton();
this.element.insertAdjacentElement('afterend', button);
this.dispatchEvent('connect', { element: this.element, button });
}
/**
* @returns {HTMLButtonElement}
*/
createButton() {
const button = document.createElement('button');
button.type = 'button';
button.classList.add(...this.buttonClassesValue);
button.setAttribute('tabindex', '-1');
button.addEventListener('click', this.toggle.bind(this));
button.innerHTML = `${this.visibleIcon} ${this.visibleLabelValue}`;
return button;
}
/**
* Toggle input type between "text" or "password" and update label accordingly
*/
toggle(event) {
this.isDisplayed = !this.isDisplayed;
const toggleButtonElement = event.currentTarget;
toggleButtonElement.innerHTML = this.isDisplayed
? `${this.hiddenIcon} ${this.hiddenLabelValue}`
: `${this.visibleIcon} ${this.visibleLabelValue}`;
this.element.setAttribute('type', this.isDisplayed ? 'text' : 'password');
this.dispatchEvent(this.isDisplayed ? 'show' : 'hide', { element: this.element, button: toggleButtonElement });
}
dispatchEvent(name, payload) {
this.dispatch(name, { detail: payload, prefix: 'toggle-password' });
}
}

View file

@ -121,3 +121,10 @@ del {
background-color: #f09595; background-color: #f09595;
font-weight: bold; font-weight: bold;
} }
/****************************************
* Password toggle
****************************************/
.toggle-password-button {
top: 0.7rem !important;
}

View file

@ -18,8 +18,8 @@
*/ */
.hoverpic { .hoverpic {
min-width: 10px; min-width: var(--table-image-preview-min-size, 20px);
max-width: 30px; max-width: var(--table-image-preview-max-size, 35px);
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -49,7 +49,7 @@
} }
.part-table-image { .part-table-image {
max-height: 40px; max-height: calc(1.2*var(--table-image-preview-max-size, 35px)); /** Aspect ratio of maximum 1.2 */
object-fit: contain; object-fit: contain;
} }

View file

@ -133,7 +133,7 @@ showing the sidebar (on devices with md or higher)
*/ */
#sidebar-toggle-button { #sidebar-toggle-button {
position: fixed; position: fixed;
left: 3px; left: 2px;
bottom: 50%; bottom: 50%;
} }

View file

@ -17,6 +17,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/****************************************
* Action bar
****************************************/
.sticky-select-bar {
position: sticky;
top: 120px;
z-index: 1000; /* Ensure the bar is above other content */
}
/**************************************** /****************************************
* Tables * Tables
****************************************/ ****************************************/
@ -84,6 +94,11 @@ th.select-checkbox {
display: inline-flex; display: inline-flex;
} }
/** Add spacing between column visibility button and length menu */
.buttons-colvis {
margin-right: 0.2em !important;
}
/** Fix datatables select-checkbox position */ /** Fix datatables select-checkbox position */
table.dataTable tr.selected td.select-checkbox:after table.dataTable tr.selected td.select-checkbox:after
{ {

View file

@ -71,6 +71,8 @@
--ck-color-button-on-hover-background: var(--bs-secondary-bg); --ck-color-button-on-hover-background: var(--bs-secondary-bg);
--ck-color-button-on-active-background: var(--bs-secondary-bg); --ck-color-button-on-active-background: var(--bs-secondary-bg);
--ck-color-button-on-disabled-background: var(--bs-secondary-bg); --ck-color-button-on-disabled-background: var(--bs-secondary-bg);
--ck-color-button-on-color: var(--bs-primary) --ck-color-button-on-color: var(--bs-primary);
--ck-content-font-color: var(--ck-color-base-text);
} }

View file

@ -0,0 +1,41 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
.toggle-password-container {
position: relative;
}
.toggle-password-icon {
height: 1rem;
width: 1rem;
}
.toggle-password-button {
align-items: center;
background-color: transparent;
border: none;
column-gap: 0.25rem;
display: flex;
flex-direction: row;
font-size: 0.875rem;
justify-items: center;
height: 1rem;
line-height: 1.25rem;
position: absolute;
right: 0.5rem;
top: -1.25rem;
}

View file

@ -28,7 +28,7 @@ import '../css/app/treeview.css';
import '../css/app/images.css'; import '../css/app/images.css';
// start the Stimulus application // start the Stimulus application
import '../bootstrap'; import '../stimulus_bootstrap';
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it. // Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
const $ = require('jquery'); const $ = require('jquery');
@ -49,7 +49,7 @@ window.$ = window.jQuery = require("jquery");
//Use the local WASM file for the ZXing library //Use the local WASM file for the ZXing library
import { import {
setZXingModuleOverrides, setZXingModuleOverrides,
} from "barcode-detector/pure"; } from "barcode-detector/ponyfill";
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm"; import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
setZXingModuleOverrides({ setZXingModuleOverrides({
locateFile: (path, prefix) => { locateFile: (path, prefix) => {

View file

@ -75,11 +75,10 @@
request._dt = config.name; request._dt = config.name;
//Try to resolve the original column index when the column was reordered (using the ColReorder plugin) //Try to resolve the original column index when the column was reordered (using the ColReorder plugin)
//Only do this when _ColReorder_iOrigCol is available if (dt.colReorder && dt.colReorder.transpose) {
if (settings.aoColumns && settings.aoColumns.length && settings.aoColumns[0]._ColReorder_iOrigCol !== undefined) {
if (request.order && request.order.length) { if (request.order && request.order.length) {
request.order.forEach(function (order) { request.order.forEach(function (order) {
order.column = settings.aoColumns[order.column]._ColReorder_iOrigCol; order.column = dt.colReorder.transpose(order.column, "toOriginal");
}); });
} }
} }

View file

@ -1,23 +1,4 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
if (!ini_get('date.timezone')) { require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
ini_set('date.timezone', 'UTC');
}
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
if (PHP_VERSION_ID >= 80000) {
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
} else {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
}
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}

View file

@ -3,7 +3,7 @@
"type": "project", "type": "project",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"require": { "require": {
"php": "^8.1", "php": "^8.2",
"ext-ctype": "*", "ext-ctype": "*",
"ext-dom": "*", "ext-dom": "*",
"ext-gd": "*", "ext-gd": "*",
@ -12,9 +12,11 @@
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"amphp/http-client": "^5.1", "amphp/http-client": "^5.1",
"api-platform/core": "^3.1", "api-platform/doctrine-orm": "^4.1",
"api-platform/json-api": "^4.0.0",
"api-platform/symfony": "^4.0.0",
"beberlei/doctrineextensions": "^1.2", "beberlei/doctrineextensions": "^1.2",
"brick/math": "0.12.1 as 0.11.0", "brick/math": "^0.13.1",
"composer/ca-bundle": "^1.5", "composer/ca-bundle": "^1.5",
"composer/package-versions-deprecated": "^1.11.99.5", "composer/package-versions-deprecated": "^1.11.99.5",
"doctrine/data-fixtures": "^2.0.0", "doctrine/data-fixtures": "^2.0.0",
@ -22,67 +24,68 @@
"doctrine/doctrine-bundle": "^2.0", "doctrine/doctrine-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^3.2.0", "doctrine/orm": "^3.2.0",
"dompdf/dompdf": "^v3.0.0", "dompdf/dompdf": "^3.1.2",
"erusev/parsedown": "^1.7",
"florianv/swap": "^4.0",
"florianv/swap-bundle": "dev-master",
"gregwar/captcha-bundle": "^2.1.0", "gregwar/captcha-bundle": "^2.1.0",
"hshn/base64-encoded-file": "^5.0", "hshn/base64-encoded-file": "^5.0",
"jbtronics/2fa-webauthn": "^v2.2.0", "jbtronics/2fa-webauthn": "^3.0.0",
"jbtronics/dompdf-font-loader-bundle": "^1.0.0", "jbtronics/dompdf-font-loader-bundle": "^1.0.0",
"jbtronics/settings-bundle": "^3.0.0",
"jfcherng/php-diff": "^6.14", "jfcherng/php-diff": "^6.14",
"knpuniversity/oauth2-client-bundle": "^2.15", "knpuniversity/oauth2-client-bundle": "^2.15",
"league/commonmark": "^2.7",
"league/csv": "^9.8.0", "league/csv": "^9.8.0",
"league/html-to-markdown": "^5.0.1", "league/html-to-markdown": "^5.0.1",
"liip/imagine-bundle": "^2.2", "liip/imagine-bundle": "^2.2",
"nbgrp/onelogin-saml-bundle": "^1.3", "maennchen/zipstream-php": "2.1",
"nbgrp/onelogin-saml-bundle": "^v2.0.2",
"nelexa/zip": "^4.0", "nelexa/zip": "^4.0",
"nelmio/cors-bundle": "^2.3", "nelmio/cors-bundle": "^2.3",
"nelmio/security-bundle": "^3.0", "nelmio/security-bundle": "^3.0",
"nyholm/psr7": "^1.1", "nyholm/psr7": "^1.1",
"omines/datatables-bundle": "^0.9.1", "omines/datatables-bundle": "^0.10.0",
"paragonie/sodium_compat": "^1.21", "paragonie/sodium_compat": "^1.21",
"part-db/label-fonts": "^1.0", "part-db/label-fonts": "^1.0",
"part-db/swap-bundle": "^6.0.0",
"phpoffice/phpspreadsheet": "^5.0.0",
"rhukster/dom-sanitizer": "^1.0", "rhukster/dom-sanitizer": "^1.0",
"runtime/frankenphp-symfony": "^0.2.0",
"s9e/text-formatter": "^2.1", "s9e/text-formatter": "^2.1",
"scheb/2fa-backup-code": "^6.8.0", "scheb/2fa-backup-code": "^v7.11.0",
"scheb/2fa-bundle": "^6.8.0", "scheb/2fa-bundle": "^v7.11.0",
"scheb/2fa-google-authenticator": "^6.8.0", "scheb/2fa-google-authenticator": "^v7.11.0",
"scheb/2fa-trusted-device": "^6.8.0", "scheb/2fa-trusted-device": "^v7.11.0",
"shivas/versioning-bundle": "^4.0", "shivas/versioning-bundle": "^4.0",
"spatie/db-dumper": "^3.3.1", "spatie/db-dumper": "^3.3.1",
"symfony/apache-pack": "^1.0", "symfony/apache-pack": "^1.0",
"symfony/asset": "6.4.*", "symfony/asset": "7.4.*",
"symfony/console": "6.4.*", "symfony/console": "7.4.*",
"symfony/css-selector": "6.4.*", "symfony/css-selector": "7.4.*",
"symfony/dom-crawler": "6.4.*", "symfony/dom-crawler": "7.4.*",
"symfony/dotenv": "6.4.*", "symfony/dotenv": "7.4.*",
"symfony/expression-language": "6.4.*", "symfony/expression-language": "7.4.*",
"symfony/flex": "^v2.3.1", "symfony/flex": "^v2.3.1",
"symfony/form": "6.4.*", "symfony/form": "7.4.*",
"symfony/framework-bundle": "6.4.*", "symfony/framework-bundle": "7.4.*",
"symfony/http-client": "6.4.*", "symfony/http-client": "7.4.*",
"symfony/http-kernel": "6.4.*", "symfony/http-kernel": "7.4.*",
"symfony/mailer": "6.4.*", "symfony/mailer": "7.4.*",
"symfony/monolog-bundle": "^3.1", "symfony/monolog-bundle": "^3.1",
"symfony/polyfill-php82": "^1.28", "symfony/process": "7.4.*",
"symfony/process": "6.4.*", "symfony/property-access": "7.4.*",
"symfony/property-access": "6.4.*", "symfony/property-info": "7.4.*",
"symfony/property-info": "6.4.*", "symfony/rate-limiter": "7.4.*",
"symfony/rate-limiter": "6.4.*", "symfony/runtime": "7.4.*",
"symfony/runtime": "6.4.*", "symfony/security-bundle": "7.4.*",
"symfony/security-bundle": "6.4.*", "symfony/serializer": "7.4.*",
"symfony/serializer": "6.4.*", "symfony/string": "7.4.*",
"symfony/string": "6.4.*", "symfony/translation": "7.4.*",
"symfony/translation": "6.4.*", "symfony/twig-bundle": "7.4.*",
"symfony/twig-bundle": "6.4.*",
"symfony/ux-translator": "^2.10", "symfony/ux-translator": "^2.10",
"symfony/ux-turbo": "^2.0", "symfony/ux-turbo": "^2.0",
"symfony/validator": "6.4.*", "symfony/validator": "7.4.*",
"symfony/web-link": "6.4.*", "symfony/web-link": "7.4.*",
"symfony/webpack-encore-bundle": "^v2.0.1", "symfony/webpack-encore-bundle": "^v2.0.1",
"symfony/yaml": "6.4.*", "symfony/yaml": "7.4.*",
"symplify/easy-coding-standard": "^12.5.20",
"tecnickcom/tc-lib-barcode": "^2.1.4", "tecnickcom/tc-lib-barcode": "^2.1.4",
"twig/cssinliner-extra": "^3.0", "twig/cssinliner-extra": "^3.0",
"twig/extra-bundle": "^3.8", "twig/extra-bundle": "^3.8",
@ -91,7 +94,7 @@
"twig/intl-extra": "^3.8", "twig/intl-extra": "^3.8",
"twig/markdown-extra": "^3.8", "twig/markdown-extra": "^3.8",
"twig/string-extra": "^3.8", "twig/string-extra": "^3.8",
"web-auth/webauthn-symfony-bundle": "^4.0.0" "web-auth/webauthn-symfony-bundle": "^5.0.0"
}, },
"require-dev": { "require-dev": {
"dama/doctrine-test-bundle": "^v8.0.0", "dama/doctrine-test-bundle": "^v8.0.0",
@ -103,16 +106,22 @@
"phpstan/phpstan-doctrine": "^2.0.1", "phpstan/phpstan-doctrine": "^2.0.1",
"phpstan/phpstan-strict-rules": "^2.0.1", "phpstan/phpstan-strict-rules": "^2.0.1",
"phpstan/phpstan-symfony": "^2.0.0", "phpstan/phpstan-symfony": "^2.0.0",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^11.5.0",
"rector/rector": "^2.0.4", "rector/rector": "^2.0.4",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"symfony/browser-kit": "6.4.*", "symfony/browser-kit": "7.4.*",
"symfony/debug-bundle": "6.4.*", "symfony/debug-bundle": "7.4.*",
"symfony/maker-bundle": "^1.13", "symfony/maker-bundle": "^1.13",
"symfony/phpunit-bridge": "6.4.*", "symfony/phpunit-bridge": "7.4.*",
"symfony/stopwatch": "6.4.*", "symfony/stopwatch": "7.4.*",
"symfony/web-profiler-bundle": "6.4.*", "symfony/web-profiler-bundle": "7.4.*"
"symplify/easy-coding-standard": "^12.0" },
"replace": {
"symfony/polyfill-mbstring": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*",
"symfony/polyfill-php82": "*"
}, },
"suggest": { "suggest": {
"ext-bcmath": "Used to improve price calculation performance", "ext-bcmath": "Used to improve price calculation performance",
@ -123,7 +132,7 @@
"*": "dist" "*": "dist"
}, },
"platform": { "platform": {
"php": "8.1.0" "php": "8.2.0"
}, },
"sort-packages": true, "sort-packages": true,
"allow-plugins": { "allow-plugins": {
@ -155,7 +164,7 @@
"post-update-cmd": [ "post-update-cmd": [
"@auto-scripts" "@auto-scripts"
], ],
"phpstan": "vendor/bin/phpstan analyse src --level 5 --memory-limit 1G" "phpstan": "php -d memory_limit=1G vendor/bin/phpstan analyse src --level 5"
}, },
"conflict": { "conflict": {
"symfony/symfony": "*" "symfony/symfony": "*"
@ -163,7 +172,7 @@
"extra": { "extra": {
"symfony": { "symfony": {
"allow-contrib": false, "allow-contrib": false,
"require": "6.4.*", "require": "7.4.*",
"docker": true "docker": true
} }
} }

7959
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,4 @@
Welcome to Part-DB. **Attention**:
Since Version 2.0.0 this file is no longer used.
<small>If you want to change this banner, edit `config/banner.md` file or set the `BANNER` environment variable.</small> You can now set the banner text directly in the admin interface, or by setting the `BANNER` environment variable.
<blockquote class="pb-0">
<p style="font-size: 12px">
And God said <br>
$\nabla \cdot \vec{D} = \rho$,
$\nabla \cdot \vec{B} = 0$,
$\nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t}$,
$\nabla \times \vec{H} = \vec{j} + \frac{\partial \vec{D}}{\partial t}$, <br>
and then there was light.
</p>
</blockquote>

View file

@ -30,6 +30,7 @@ return [
Jbtronics\DompdfFontLoaderBundle\DompdfFontLoaderBundle::class => ['all' => true], Jbtronics\DompdfFontLoaderBundle\DompdfFontLoaderBundle::class => ['all' => true],
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true], KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], Jbtronics\SettingsBundle\JbtronicsSettingsBundle::class => ['all' => true],
Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true], Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
]; ];

View file

@ -32,7 +32,6 @@ api_platform:
pagination_client_items_per_page: true # Allow clients to override the default items per page pagination_client_items_per_page: true # Allow clients to override the default items per page
keep_legacy_inflector: false
# Need to be true, or some tests will fail # Need to be true, or some tests will fail
use_symfony_listeners: true use_symfony_listeners: true

12
config/packages/csrf.yaml Normal file
View file

@ -0,0 +1,12 @@
# Enable stateless CSRF protection for forms and logins/logouts
framework:
form:
csrf_protection:
token_id: submit
csrf_protection:
check_header: true
stateless_token_ids:
- submit
- authenticate
- logout

View file

@ -9,7 +9,8 @@ datatables:
# Set options, as documented at https://datatables.net/reference/option/ # Set options, as documented at https://datatables.net/reference/option/
options: options:
lengthMenu : [[10, 25, 50, 100], [10, 25, 50, 100]] # We add the "All" option, when part tables are generated lengthMenu : [[10, 25, 50, 100], [10, 25, 50, 100]] # We add the "All" option, when part tables are generated
pageLength: '%partdb.table.default_page_size%' # Set to -1 to disable pagination (i.e. show all rows) by default #pageLength: '%partdb.table.default_page_size%' # Set to -1 to disable pagination (i.e. show all rows) by default
pageLength: 50 #TODO
dom: " <'row' <'col mb-2 input-group flex-nowrap' B l > <'col-auto mb-2' < p >>> dom: " <'row' <'col mb-2 input-group flex-nowrap' B l > <'col-auto mb-2' < p >>>
<'card' <'card'
rt rt
@ -17,7 +18,7 @@ datatables:
> >
<'row' <'col mt-2 input-group flex-nowrap' B l > <'col-auto mt-2' < p >>>" <'row' <'col mt-2 input-group flex-nowrap' B l > <'col-auto mt-2' < p >>>"
pagingType: 'simple_numbers' pagingType: 'simple_numbers'
searching: true searching: false
stateSave: true stateSave: true

View file

@ -0,0 +1,33 @@
<?php
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
/**
* This class extends the default doctrine ORM configuration to enable native lazy objects on PHP 8.4+.
* We have to do this in a PHP file, because the yaml file does not support conditionals on PHP version.
*/
return static function(\Symfony\Config\DoctrineConfig $doctrine) {
//On PHP 8.4+ we can use native lazy objects, which are much more efficient than proxies.
if (PHP_VERSION_ID >= 80400) {
$doctrine->orm()->enableNativeLazyObjects(true);
}
};

View file

@ -25,10 +25,6 @@ doctrine:
tinyint: tinyint:
class: App\Doctrine\Types\TinyIntType class: App\Doctrine\Types\TinyIntType
# This was removed in doctrine/orm 4.0 but we need it for the WebauthnKey entity
array:
class: App\Doctrine\Types\ArrayType
schema_filter: ~^(?!internal)~ schema_filter: ~^(?!internal)~
# Only enable this when needed # Only enable this when needed
profiling_collect_backtrace: false profiling_collect_backtrace: false
@ -39,6 +35,8 @@ doctrine:
report_fields_where_declared: true report_fields_where_declared: true
validate_xml_mapping: true validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
identity_generation_preferences:
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
auto_mapping: true auto_mapping: true
controller_resolver: controller_resolver:
auto_mapping: true auto_mapping: true

View file

@ -1,9 +1,6 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html # see https://symfony.com/doc/current/reference/configuration/framework.html
framework: framework:
secret: '%env(APP_SECRET)%' secret: '%env(APP_SECRET)%'
csrf_protection: true
annotations: false
handle_all_throwables: true
# We set this header by ourselves, so we can disable it here # We set this header by ourselves, so we can disable it here
disallow_search_engine_index: false disallow_search_engine_index: false
@ -30,8 +27,11 @@ framework:
#esi: true #esi: true
#fragments: true #fragments: true
php_errors:
log: true
form: { csrf_protection: { token_id: 'submit' } }
csrf_protection:
stateless_token_ids: ['submit', 'authenticate', 'logout']
when@test: when@test:
framework: framework:

View file

@ -6,8 +6,8 @@ knpu_oauth2_client:
type: generic type: generic
provider_class: '\League\OAuth2\Client\Provider\GenericProvider' provider_class: '\League\OAuth2\Client\Provider\GenericProvider'
client_id: '%env(PROVIDER_DIGIKEY_CLIENT_ID)%' client_id: '%env(settings:digikey:clientId)%'
client_secret: '%env(PROVIDER_DIGIKEY_SECRET)%' client_secret: '%env(settings:digikey:secret)%'
redirect_route: 'oauth_client_check' redirect_route: 'oauth_client_check'
redirect_params: {name: 'ip_digikey_oauth'} redirect_params: {name: 'ip_digikey_oauth'}
@ -26,8 +26,8 @@ knpu_oauth2_client:
type: generic type: generic
provider_class: '\League\OAuth2\Client\Provider\GenericProvider' provider_class: '\League\OAuth2\Client\Provider\GenericProvider'
client_id: '%env(PROVIDER_OCTOPART_CLIENT_ID)%' client_id: '%env(settings:octopart:clientId)%'
client_secret: '%env(PROVIDER_OCTOPART_SECRET)%' client_secret: '%env(settings:octopart:secret)%'
redirect_route: 'oauth_client_check' redirect_route: 'oauth_client_check'
redirect_params: { name: 'ip_octopart_oauth' } redirect_params: { name: 'ip_octopart_oauth' }

View file

@ -10,14 +10,6 @@ when@dev:
path: "%kernel.logs_dir%/%kernel.environment%.log" path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug level: debug
channels: ["!event"] channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console: console:
type: console type: console
process_psr_3_messages: false process_psr_3_messages: false
@ -45,6 +37,7 @@ when@prod:
action_level: error action_level: error
handler: nested handler: nested
excluded_http_codes: [404, 405] excluded_http_codes: [404, 405]
channels: ["!deprecation"]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested: nested:
type: stream type: stream
@ -69,6 +62,7 @@ when@docker:
excluded_http_codes: [404, 405] excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks buffer_size: 50 # How many messages should be saved? Prevent memory leaks
include_stacktraces: true include_stacktraces: true
channels: ["!deprecation"]
nested: nested:
type: stream type: stream
path: "php://stderr" path: "php://stderr"

View file

@ -20,12 +20,6 @@ nelmio_security:
- 'digikey.com' - 'digikey.com'
- 'nexar.com' - 'nexar.com'
# forces Microsoft's XSS-Protection with
# its block mode
xss_protection:
enabled: true
mode_block: true
# Send a full URL in the `Referer` header when performing a same-origin request, # Send a full URL in the `Referer` header when performing a same-origin request,
# only send the origin of the document to secure destination (HTTPS->HTTPS), # only send the origin of the document to secure destination (HTTPS->HTTPS),
# and send no header to a less secure destination (HTTPS->HTTP). # and send no header to a less secure destination (HTTPS->HTTP).
@ -69,9 +63,3 @@ nelmio_security:
- 'data:' - 'data:'
block-all-mixed-content: true # defaults to false, blocks HTTP content over HTTPS transport block-all-mixed-content: true # defaults to false, blocks HTTP content over HTTPS transport
# upgrade-insecure-requests: true # defaults to false, upgrades HTTP requests to HTTPS transport # upgrade-insecure-requests: true # defaults to false, upgrades HTTP requests to HTTPS transport
when@dev:
# disables the Content-Security-Policy header
nelmio_security:
csp:
enabled: false

View file

@ -0,0 +1,3 @@
framework:
property_info:
with_constructor_extractor: true

View file

@ -1,7 +1,5 @@
framework: framework:
router: router:
utf8: true
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands. # Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
default_uri: '%env(DEFAULT_URI)%' default_uri: '%env(DEFAULT_URI)%'

View file

@ -13,7 +13,7 @@ security:
firewalls: firewalls:
dev: dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/ pattern: ^/(_(profiler|wdt)|css|images|js|\.well-known)/
security: false security: false
main: main:
provider: app_user_provider provider: app_user_provider

View file

@ -0,0 +1,15 @@
jbtronics_settings:
default_storage_adapter: Jbtronics\SettingsBundle\Storage\ORMStorageAdapter
cache:
default_cacheable: true
orm_storage:
default_entity_class: App\Entity\SettingsEntry
# Disable caching for development environment
when@dev:
jbtronics_settings:
cache:
default_cacheable: false

View file

@ -5,6 +5,12 @@ florianv_swap:
providers: providers:
european_central_bank: ~ # European Central Bank (only works for EUR base currency) european_central_bank: ~ # European Central Bank (only works for EUR base currency)
fixer: # Fixer.io (needs an API key) central_bank_of_czech_republic: ~
access_key: "%env(FIXER_API_KEY)%" central_bank_of_republic_turkey: ~
#exchange_rates_api: ~ national_bank_of_romania: ~
fixer: # Fixer.io (needs an API key)
access_key: "%env(string:settings:exchange_rate:fixerApiKey)%"
frankfurter: ~
fawazahmed_currency_api: ~

View file

@ -1,11 +1,10 @@
framework: framework:
default_locale: '%partdb.locale%' default_locale: 'en'
# Just enable the locales we need for performance reasons. # Just enable the locales we need for performance reasons.
enabled_locale: '%partdb.locale_menu%' enabled_locale: ['en', 'de', 'it', 'fr', 'ru', 'ja', 'cs', 'da', 'zh', 'pl']
translator: translator:
default_path: '%kernel.project_dir%/translations' default_path: '%kernel.project_dir%/translations'
fallbacks: fallbacks:
- '%partdb.locale%'
- 'en' - 'en'
providers: providers:
# crowdin: # crowdin:

View file

@ -1,27 +1,22 @@
twig: twig:
default_path: '%kernel.project_dir%/templates' default_path: '%kernel.project_dir%/templates'
form_themes: ['bootstrap_5_horizontal_layout.html.twig', 'form/extended_bootstrap_layout.html.twig', 'form/permission_layout.html.twig', 'form/filter_types_layout.html.twig'] form_themes: ['bootstrap_5_horizontal_layout.html.twig', 'form/extended_bootstrap_layout.html.twig', 'form/permission_layout.html.twig', 'form/filter_types_layout.html.twig', 'form/synonyms_collection.html.twig']
paths: paths:
'%kernel.project_dir%/assets/css': css '%kernel.project_dir%/assets/css': css
globals: globals:
partdb_title: '%partdb.title%'
default_currency: '%partdb.default_currency%'
global_theme: '%partdb.global_theme%'
allow_email_pw_reset: '%partdb.users.email_pw_reset%' allow_email_pw_reset: '%partdb.users.email_pw_reset%'
locale_menu: '%partdb.locale_menu%' locale_menu: '%partdb.locale_menu%'
attachment_manager: '@App\Services\Attachments\AttachmentManager' attachment_manager: '@App\Services\Attachments\AttachmentManager'
label_profile_dropdown_helper: '@App\Services\LabelSystem\LabelProfileDropdownHelper' label_profile_dropdown_helper: '@App\Services\LabelSystem\LabelProfileDropdownHelper'
error_page_admin_email: '%partdb.error_pages.admin_email%' error_page_admin_email: '%partdb.error_pages.admin_email%'
error_page_show_help: '%partdb.error_pages.show_help%' error_page_show_help: '%partdb.error_pages.show_help%'
sidebar_items: '%partdb.sidebar.items%'
sidebar_tree_updater: '@App\Services\Trees\SidebarTreeUpdater' sidebar_tree_updater: '@App\Services\Trees\SidebarTreeUpdater'
avatar_helper: '@App\Services\UserSystem\UserAvatarHelper' avatar_helper: '@App\Services\UserSystem\UserAvatarHelper'
available_themes: '%partdb.available_themes%' available_themes: '%partdb.available_themes%'
saml_enabled: '%partdb.saml.enabled%' saml_enabled: '%partdb.saml.enabled%'
part_preview_generator: '@App\Services\Attachments\PartPreviewGenerator' part_preview_generator: '@App\Services\Attachments\PartPreviewGenerator'
img_overlay: '%partdb.show_part_image_overlay%'
when@test: when@test:
twig: twig:

View file

@ -1,4 +0,0 @@
framework:
uid:
default_uuid_version: 7
time_based_uuid_version: 7

View file

@ -0,0 +1,4 @@
# Enable stateless CSRF protection for forms and logins/logouts
framework:
csrf_protection:
check_header: true

View file

@ -1,7 +1,5 @@
framework: framework:
validation: validation:
email_validation_mode: html5
# Enables validator auto-mapping support. # Enables validator auto-mapping support.
# For instance, basic validation constraints will be inferred from Doctrine's metadata. # For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping: #auto_mapping:

View file

@ -1,17 +1,14 @@
when@dev: when@dev:
web_profiler: web_profiler:
toolbar: true toolbar:
intercept_redirects: false ajax_replace: true
framework: framework:
profiler: profiler:
only_exceptions: false
collect_serializer_data: true collect_serializer_data: true
when@test: when@test:
web_profiler:
toolbar: false
intercept_redirects: false
framework: framework:
profiler: { collect: false } profiler:
collect: false
collect_serializer_data: true

View file

@ -5,16 +5,12 @@ parameters:
###################################################################################################################### ######################################################################################################################
# Common # Common
###################################################################################################################### ######################################################################################################################
partdb.locale: '%env(string:DEFAULT_LANG)%' # The default language to use serverwide
partdb.timezone: '%env(string:DEFAULT_TIMEZONE)%' # The default timezone
partdb.title: '%env(trim:string:INSTANCE_NAME)%' # The title shown inside of Part-DB (e.g. in the navbar and on homepage)
partdb.banner: '%env(trim:string:BANNER)%' # The info text shown in the homepage, if empty config/banner.md is used
partdb.default_currency: '%env(string:BASE_CURRENCY)%' # The currency that is used inside the DB (and is assumed when no currency is set). This can not be changed later, so be sure to set it the currency used in your country
partdb.global_theme: '' # The theme to use globally (see public/build/themes/ for choices, use name without .css). Set to '' for default bootstrap theme
partdb.locale_menu: ['en', 'de', 'it', 'fr', 'ru', 'ja', 'cs', 'da', 'zh', 'pl'] # The languages that are shown in user drop down menu
partdb.enforce_change_comments_for: '%env(csv:ENFORCE_CHANGE_COMMENTS_FOR)%' # The actions for which a change comment is required (e.g. "part_edit", "part_create", etc.). If this is empty, change comments are not required at all.
partdb.default_uri: '%env(string:DEFAULT_URI)%' # The default URI to use for the Part-DB instance (e.g. https://part-db.example.com/). This is used for generating links in emails # This is used as workaround for places where we can not access the settings directly (like the 2FA application names)
partdb.title: '%env(string:settings:customization:instanceName)%' # The title shown inside of Part-DB (e.g. in the navbar and on homepage)
partdb.locale_menu: ['en', 'de', 'it', 'fr', 'ru', 'ja', 'cs', 'da', 'zh', 'pl', 'hu'] # The languages that are shown in user drop down menu
partdb.default_uri: '%env(addSlash:string:DEFAULT_URI)%' # The default URI to use for the Part-DB instance (e.g. https://part-db.example.com/). This is used for generating links in emails
partdb.db.emulate_natural_sort: '%env(bool:DATABASE_EMULATE_NATURAL_SORT)%' # If this is set to true, natural sorting is emulated on platforms that do not support it natively. This can be slow on large datasets. partdb.db.emulate_natural_sort: '%env(bool:DATABASE_EMULATE_NATURAL_SORT)%' # If this is set to true, natural sorting is emulated on platforms that do not support it natively. This can be slow on large datasets.
@ -22,11 +18,8 @@ parameters:
# Users and Privacy # Users and Privacy
###################################################################################################################### ######################################################################################################################
partdb.gdpr_compliance: true # If this option is activated, IP addresses are anonymized to be GDPR compliant partdb.gdpr_compliance: true # If this option is activated, IP addresses are anonymized to be GDPR compliant
partdb.users.use_gravatar: '%env(bool:USE_GRAVATAR)%' # Set to false, if no Gravatar images should be used for user profiles.
partdb.users.email_pw_reset: '%env(bool:ALLOW_EMAIL_PW_RESET)%' # Config if users are able, to reset their password by email. By default this enabled, when a mail server is configured. partdb.users.email_pw_reset: '%env(bool:ALLOW_EMAIL_PW_RESET)%' # Config if users are able, to reset their password by email. By default this enabled, when a mail server is configured.
partdb.check_for_updates: '%env(bool:CHECK_FOR_UPDATES)' # Set to false, if Part-DB should not contact the GitHub API to check for updates
###################################################################################################################### ######################################################################################################################
# Mail settings # Mail settings
###################################################################################################################### ######################################################################################################################
@ -36,11 +29,8 @@ parameters:
###################################################################################################################### ######################################################################################################################
# Attachments and files # Attachments and files
###################################################################################################################### ######################################################################################################################
partdb.attachments.allow_downloads: '%env(bool:ALLOW_ATTACHMENT_DOWNLOADS)%' # Allow users to download attachments to server. Warning: This can be dangerous, because via that feature attackers maybe can access ressources on your intranet!
partdb.attachments.download_by_default: '%env(bool:ATTACHMENT_DOWNLOAD_BY_DEFAULT)%' # If this is set the 'download external files' checkbox is set by default for new attachments (only if allow_downloads is set to true)
partdb.attachments.dir.media: 'public/media/' # The folder where uploaded attachment files are saved (must be in public folder) partdb.attachments.dir.media: 'public/media/' # The folder where uploaded attachment files are saved (must be in public folder)
partdb.attachments.dir.secure: 'uploads/' # The folder where secured attachment files are saved (must not be in public/) partdb.attachments.dir.secure: 'uploads/' # The folder where secured attachment files are saved (must not be in public/)
partdb.attachments.max_file_size: '%env(string:MAX_ATTACHMENT_FILE_SIZE)%' # The maximum size of an attachment file (in bytes, you can use M for megabytes and G for gigabytes)
###################################################################################################################### ######################################################################################################################
# Error pages # Error pages
@ -53,28 +43,11 @@ parameters:
###################################################################################################################### ######################################################################################################################
partdb.saml.enabled: '%env(bool:SAML_ENABLED)%' # If this is set to true, SAML authentication is enabled partdb.saml.enabled: '%env(bool:SAML_ENABLED)%' # If this is set to true, SAML authentication is enabled
######################################################################################################################
# Table settings
######################################################################################################################
partdb.table.default_page_size: '%env(int:TABLE_DEFAULT_PAGE_SIZE)%' # The default number of entries shown per page in tables
partdb.table.parts.default_columns: '%env(trim:string:TABLE_PARTS_DEFAULT_COLUMNS)%' # The default columns in part tables and their order
######################################################################################################################
# Sidebar
######################################################################################################################
# You can configures the default shown tree items in the sidebar here. You can add or remove entries here, to change the number of trees in the sidebar. The possible entries are: categories, locations, footprints, manufacturers, suppliers, devices, tools
partdb.sidebar.items:
- categories
- devices
- tools
partdb.sidebar.root_expanded: true # If this is set to true, the root node of the sidebar is expanded by default
partdb.sidebar.root_node_enable: true # Put all entities below a root node in the sidebar
###################################################################################################################### ######################################################################################################################
# Miscellaneous # Miscellaneous
###################################################################################################################### ######################################################################################################################
partdb.demo_mode: '%env(bool:DEMO_MODE)%' # If set to true, all potentially dangerous things are disabled (like changing passwords of the own user) partdb.demo_mode: '%env(bool:DEMO_MODE)%' # If set to true, all potentially dangerous things are disabled (like changing passwords of the own user)
partdb.show_part_image_overlay: '%env(bool:SHOW_PART_IMAGE_OVERLAY)%' # If set to false, the filename overlay of the part image will be disabled
# Set the themes from which the user can choose from in the settings. # Set the themes from which the user can choose from in the settings.
# Themes commented here by default, are not really usable, because of display problems. Enable them at your own risk! # Themes commented here by default, are not really usable, because of display problems. Enable them at your own risk!
@ -111,30 +84,18 @@ parameters:
# Env default values # Env default values
###################################################################################################################### ######################################################################################################################
env(DEFAULT_LANG): 'en'
env(DEFAULT_TIMEZONE): 'Europe/Berlin'
env(INSTANCE_NAME): 'Part-DB'
env(BASE_CURRENCY): 'EUR'
env(USE_GRAVATAR): '0'
env(MAX_ATTACHMENT_FILE_SIZE): '100M'
env(REDIRECT_TO_HTTPS): 0 env(REDIRECT_TO_HTTPS): 0
env(ENFORCE_CHANGE_COMMENTS_FOR): ''
env(ERROR_PAGE_ADMIN_EMAIL): '' env(ERROR_PAGE_ADMIN_EMAIL): ''
env(ERROR_PAGE_SHOW_HELP): 1 env(ERROR_PAGE_SHOW_HELP): 1
env(DEMO_MODE): 0 env(DEMO_MODE): 0
env(BANNER): ''
env(EMAIL_SENDER_EMAIL): 'noreply@partdb.changeme' env(EMAIL_SENDER_EMAIL): 'noreply@partdb.changeme'
env(EMAIL_SENDER_NAME): 'Part-DB Mailer' env(EMAIL_SENDER_NAME): 'Part-DB Mailer'
env(ALLOW_EMAIL_PW_RESET): 0 env(ALLOW_EMAIL_PW_RESET): 0
env(TABLE_DEFAULT_PAGE_SIZE): 50
env(TRUSTED_PROXIES): '127.0.0.1' #By default trust only our own server env(TRUSTED_PROXIES): '127.0.0.1' #By default trust only our own server
env(TRUSTED_HOSTS): '' # Trust all host names by default env(TRUSTED_HOSTS): '' # Trust all host names by default
@ -142,11 +103,10 @@ parameters:
env(SAML_ROLE_MAPPING): '{}' env(SAML_ROLE_MAPPING): '{}'
env(HISTORY_SAVE_CHANGED_DATA): 1
env(HISTORY_SAVE_CHANGED_FIELDS): 1
env(HISTORY_SAVE_REMOVED_DATA): 1
env(HISTORY_SAVE_NEW_DATA): 1
env(EDA_KICAD_CATEGORY_DEPTH): 0
env(DATABASE_EMULATE_NATURAL_SORT): 0 env(DATABASE_EMULATE_NATURAL_SORT): 0
######################################################################################################################
# Bulk Info Provider Import Configuration
######################################################################################################################
partdb.bulk_import.batch_size: 20 # Number of parts to process in each batch during bulk operations
partdb.bulk_import.max_parts_per_operation: 1000 # Maximum number of parts allowed per bulk import operation

View file

@ -18,13 +18,13 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
parts: # e.g. this maps to perms_parts in User/Group database parts: # e.g. this maps to perms_parts in User/Group database
group: "data" group: "data"
label: "perm.parts" label: "{{part}}"
operations: # Here are all possible operations are listed => the op name is mapped to bit value operations: # Here are all possible operations are listed => the op name is mapped to bit value
read: read:
label: "perm.read" label: "perm.read"
# If a part can be read by a user, he can also see all the datastructures (except devices) # If a part can be read by a user, he can also see all the datastructures (except devices)
alsoSet: ['storelocations.read', 'footprints.read', 'categories.read', 'suppliers.read', 'manufacturers.read', alsoSet: ['storelocations.read', 'footprints.read', 'categories.read', 'suppliers.read', 'manufacturers.read',
'currencies.read', 'attachment_types.read', 'measurement_units.read'] 'currencies.read', 'attachment_types.read', 'measurement_units.read', 'part_custom_states.read']
apiTokenRole: ROLE_API_READ_ONLY apiTokenRole: ROLE_API_READ_ONLY
edit: edit:
label: "perm.edit" label: "perm.edit"
@ -71,7 +71,7 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
storelocations: &PART_CONTAINING storelocations: &PART_CONTAINING
label: "perm.storelocations" label: "{{storage_location}}"
group: "data" group: "data"
operations: operations:
read: read:
@ -103,35 +103,39 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
footprints: footprints:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.part.footprints" label: "{{footprint}}"
categories: categories:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.part.categories" label: "{{category}}"
suppliers: suppliers:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.part.supplier" label: "{{supplier}}"
manufacturers: manufacturers:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.part.manufacturers" label: "{{manufacturer}}"
projects: projects:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.projects" label: "{{project}}"
attachment_types: attachment_types:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.part.attachment_types" label: "{{attachment_type}}"
currencies: currencies:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.currencies" label: "{{currency}}"
measurement_units: measurement_units:
<<: *PART_CONTAINING <<: *PART_CONTAINING
label: "perm.measurement_units" label: "{{measurement_unit}}"
part_custom_states:
<<: *PART_CONTAINING
label: "{{part_custom_state}}"
tools: tools:
label: "perm.part.tools" label: "perm.part.tools"
@ -265,17 +269,13 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
# label: "perm.database.write_db_settings" # label: "perm.database.write_db_settings"
# alsoSet: ['read_db_settings', 'see_status'] # alsoSet: ['read_db_settings', 'see_status']
#config: config:
# label: "perm.config" label: "perm.config"
# group: "system" group: "system"
# operations: operations:
# read_config: change_system_settings:
# label: "perm.config.read_config" label: "perm.config.change_system_settings"
# edit_config: apiTokenRole: ROLE_API_ADMIN
# label: "perm.config.edit_config"
# alsoSet: 'read_config'
# server_info:
# label: "perm.config.server_info"
system: system:
label: "perm.system" label: "perm.system"
@ -363,6 +363,10 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
label: "perm.revert_elements" label: "perm.revert_elements"
alsoSet: ['read_profiles', 'edit_profiles', 'create_profiles', 'delete_profiles'] alsoSet: ['read_profiles', 'edit_profiles', 'create_profiles', 'delete_profiles']
apiTokenRole: ROLE_API_EDIT apiTokenRole: ROLE_API_EDIT
import:
label: "perm.import"
alsoSet: ['read_profiles', 'edit_profiles', 'create_profiles' ]
apiTokenRole: ROLE_API_EDIT
api: api:
label: "perm.api" label: "perm.api"

2896
config/reference.php Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,12 @@
# yaml-language-server: $schema=../vendor/symfony/routing/Loader/schema/routing.schema.json
# This file is the entry point to configure the routes of your app.
# Methods with the #[Route] attribute are automatically imported.
# See also https://symfony.com/doc/current/routing.html
# To list all registered routes, run the following command:
# bin/console debug:router
# Redirect every url without an locale to the locale of the user/the global base locale # Redirect every url without an locale to the locale of the user/the global base locale
scan_qr: scan_qr:

View file

@ -1,4 +1,4 @@
when@dev: when@dev:
_errors: _errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml' resource: '@FrameworkBundle/Resources/config/routing/errors.php'
prefix: /_error prefix: /_error

View file

@ -1,8 +1,8 @@
when@dev: when@dev:
web_profiler_wdt: web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
prefix: /_wdt prefix: /_wdt
web_profiler_profiler: web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
prefix: /_profiler prefix: /_profiler

View file

@ -1,5 +1,8 @@
# yaml-language-server: $schema=../vendor/symfony/dependency-injection/Loader/schema/services.schema.json
# This file is the entry point to configure your own services. # This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies. # Files in the packages/ subdirectory configure your dependencies.
# See also https://symfony.com/doc/current/service_container/import.html
# Put parameters here that don't need to change on each machine where the app is deployed # Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
@ -17,8 +20,6 @@ services:
bool $gdpr_compliance: '%partdb.gdpr_compliance%' bool $gdpr_compliance: '%partdb.gdpr_compliance%'
bool $kernel_debug_enabled: '%kernel.debug%' bool $kernel_debug_enabled: '%kernel.debug%'
string $kernel_cache_dir: '%kernel.cache_dir%' string $kernel_cache_dir: '%kernel.cache_dir%'
string $partdb_title: '%partdb.title%'
string $base_currency: '%partdb.default_currency%'
_instanceof: _instanceof:
App\Services\LabelSystem\PlaceholderProviders\PlaceholderProviderInterface: App\Services\LabelSystem\PlaceholderProviders\PlaceholderProviderInterface:
@ -32,9 +33,8 @@ services:
App\: App\:
resource: '../src/' resource: '../src/'
exclude: exclude:
- '../src/DependencyInjection/' - '../src/DataFixtures/'
- '../src/Entity/' - '../src/Doctrine/Purger/'
- '../src/Kernel.php'
# controllers are imported separately to make sure services can be injected # controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class # as action arguments even if you don't extend any base controller class
@ -76,28 +76,10 @@ services:
# Only the event classes specified here are saved to DB (set to []) to log all events # Only the event classes specified here are saved to DB (set to []) to log all events
$whitelist: [] $whitelist: []
App\EventListener\LogSystem\EventLoggerListener:
arguments:
$save_changed_fields: '%env(bool:HISTORY_SAVE_CHANGED_FIELDS)%'
$save_changed_data: '%env(bool:HISTORY_SAVE_CHANGED_DATA)%'
$save_removed_data: '%env(bool:HISTORY_SAVE_REMOVED_DATA)%'
$save_new_data: '%env(bool:HISTORY_SAVE_NEW_DATA)%'
App\Form\AttachmentFormType:
arguments:
$allow_attachments_download: '%partdb.attachments.allow_downloads%'
$max_file_size: '%partdb.attachments.max_file_size%'
$download_by_default: '%partdb.attachments.download_by_default%'
App\Services\Attachments\AttachmentSubmitHandler: App\Services\Attachments\AttachmentSubmitHandler:
arguments: arguments:
$allow_attachments_downloads: '%partdb.attachments.allow_downloads%'
$mimeTypes: '@mime_types' $mimeTypes: '@mime_types'
$max_upload_size: '%partdb.attachments.max_file_size%'
App\Services\LogSystem\EventCommentNeededHelper:
arguments:
$enforce_change_comments_for: '%partdb.enforce_change_comments_for%'
#################################################################################################################### ####################################################################################################################
# Attachment system # Attachment system
@ -156,29 +138,6 @@ services:
tags: tags:
- { name: doctrine.orm.entity_listener } - { name: doctrine.orm.entity_listener }
####################################################################################################################
# Price system
####################################################################################################################
App\Command\Currencies\UpdateExchangeRatesCommand:
arguments:
$base_current: '%partdb.default_currency%'
App\Form\Type\CurrencyEntityType:
arguments:
$base_currency: '%partdb.default_currency%'
App\Services\Parts\PricedetailHelper:
arguments:
$base_currency: '%partdb.default_currency%'
App\Services\Formatters\MoneyFormatter:
arguments:
$base_currency: '%partdb.default_currency%'
App\Services\Tools\ExchangeRateUpdater:
arguments:
$base_currency: '%partdb.default_currency%'
################################################################################################################### ###################################################################################################################
# User system # User system
#################################################################################################################### ####################################################################################################################
@ -186,10 +145,6 @@ services:
arguments: arguments:
$demo_mode: '%partdb.demo_mode%' $demo_mode: '%partdb.demo_mode%'
App\EventSubscriber\UserSystem\SetUserTimezoneSubscriber:
arguments:
$default_timezone: '%partdb.timezone%'
App\Controller\SecurityController: App\Controller\SecurityController:
arguments: arguments:
$allow_email_pw_reset: '%partdb.users.email_pw_reset%' $allow_email_pw_reset: '%partdb.users.email_pw_reset%'
@ -203,10 +158,6 @@ services:
tags: tags:
- { name: 'translation.extractor', alias: 'permissionExtractor'} - { name: 'translation.extractor', alias: 'permissionExtractor'}
App\Services\UserSystem\UserAvatarHelper:
arguments:
$use_gravatar: '%partdb.users.use_gravatar%'
App\Form\Type\ThemeChoiceType: App\Form\Type\ThemeChoiceType:
arguments: arguments:
$available_themes: '%partdb.available_themes%' $available_themes: '%partdb.available_themes%'
@ -222,9 +173,6 @@ services:
#################################################################################################################### ####################################################################################################################
# Table settings # Table settings
#################################################################################################################### ####################################################################################################################
App\DataTables\PartsDataTable:
arguments:
$visible_columns: '%partdb.table.parts.default_columns%'
App\DataTables\Helpers\ColumnSortHelper: App\DataTables\Helpers\ColumnSortHelper:
shared: false # Service has a state so not share it between different tables shared: false # Service has a state so not share it between different tables
@ -246,14 +194,6 @@ services:
$fontDirectory: '%kernel.project_dir%/var/dompdf/fonts/' $fontDirectory: '%kernel.project_dir%/var/dompdf/fonts/'
$tmpDirectory: '%kernel.project_dir%/var/dompdf/tmp/' $tmpDirectory: '%kernel.project_dir%/var/dompdf/tmp/'
####################################################################################################################
# Trees
####################################################################################################################
App\Services\Trees\TreeViewGenerator:
arguments:
$rootNodeExpandedByDefault: '%partdb.sidebar.root_expanded%'
$rootNodeEnabled: '%partdb.sidebar.root_node_enable%'
#################################################################################################################### ####################################################################################################################
# Part info provider system # Part info provider system
#################################################################################################################### ####################################################################################################################
@ -261,76 +201,12 @@ services:
arguments: arguments:
$providers: !tagged_iterator 'app.info_provider' $providers: !tagged_iterator 'app.info_provider'
App\Services\InfoProviderSystem\Providers\Element14Provider:
arguments:
$api_key: '%env(string:PROVIDER_ELEMENT14_KEY)%'
$store_id: '%env(string:PROVIDER_ELEMENT14_STORE_ID)%'
App\Services\InfoProviderSystem\Providers\DigikeyProvider:
arguments:
$clientId: '%env(string:PROVIDER_DIGIKEY_CLIENT_ID)%'
$currency: '%env(string:PROVIDER_DIGIKEY_CURRENCY)%'
$language: '%env(string:PROVIDER_DIGIKEY_LANGUAGE)%'
$country: '%env(string:PROVIDER_DIGIKEY_COUNTRY)%'
App\Services\InfoProviderSystem\Providers\TMEClient:
arguments:
$secret: '%env(string:PROVIDER_TME_SECRET)%'
$token: '%env(string:PROVIDER_TME_KEY)%'
App\Services\InfoProviderSystem\Providers\TMEProvider:
arguments:
$currency: '%env(string:PROVIDER_TME_CURRENCY)%'
$country: '%env(string:PROVIDER_TME_COUNTRY)%'
$language: '%env(string:PROVIDER_TME_LANGUAGE)%'
$get_gross_prices: '%env(bool:PROVIDER_TME_GET_GROSS_PRICES)%'
App\Services\InfoProviderSystem\Providers\OctopartProvider:
arguments:
$clientId: '&env(string:PROVIDER_OCTOPART_CLIENT_ID)%'
$secret: '%env(string:PROVIDER_OCTOPART_SECRET)%'
$country: '%env(string:PROVIDER_OCTOPART_COUNTRY)%'
$currency: '%env(string:PROVIDER_OCTOPART_CURRENCY)%'
$search_limit: '%env(int:PROVIDER_OCTOPART_SEARCH_LIMIT)%'
$onlyAuthorizedSellers: '%env(bool:PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS)%'
App\Services\InfoProviderSystem\Providers\MouserProvider:
arguments:
$api_key: '%env(string:PROVIDER_MOUSER_KEY)%'
$language: '%env(string:PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE)%'
$options: '%env(string:PROVIDER_MOUSER_SEARCH_OPTION)%'
$search_limit: '%env(int:PROVIDER_MOUSER_SEARCH_LIMIT)%'
App\Services\InfoProviderSystem\Providers\LCSCProvider:
arguments:
$enabled: '%env(bool:PROVIDER_LCSC_ENABLED)%'
$currency: '%env(string:PROVIDER_LCSC_CURRENCY)%'
App\Services\InfoProviderSystem\Providers\OEMSecretsProvider:
arguments:
$api_key: '%env(string:PROVIDER_OEMSECRETS_KEY)%'
$country_code: '%env(string:PROVIDER_OEMSECRETS_COUNTRY_CODE)%'
$currency: '%env(PROVIDER_OEMSECRETS_CURRENCY)%'
$zero_price: '%env(PROVIDER_OEMSECRETS_ZERO_PRICE)%'
$set_param: '%env(PROVIDER_OEMSECRETS_SET_PARAM)%'
$sort_criteria: '%env(PROVIDER_OEMSECRETS_SORT_CRITERIA)%'
#################################################################################################################### ####################################################################################################################
# API system # API system
#################################################################################################################### ####################################################################################################################
App\State\PartDBInfoProvider: App\State\PartDBInfoProvider:
arguments: arguments:
$default_uri: '%partdb.default_uri%' $default_uri: '%partdb.default_uri%'
$global_locale: '%partdb.locale%'
$global_timezone: '%partdb.timezone%'
####################################################################################################################
# EDA system
####################################################################################################################
App\Services\EDA\KiCadHelper:
arguments:
$category_depth: '%env(int:EDA_KICAD_CATEGORY_DEPTH)%'
#################################################################################################################### ####################################################################################################################
# Symfony overrides # Symfony overrides
@ -355,12 +231,17 @@ services:
#################################################################################################################### ####################################################################################################################
App\Controller\RedirectController: App\Controller\RedirectController:
arguments: arguments:
$default_locale: '%partdb.locale%'
$enforce_index_php: '%env(bool:NO_URL_REWRITE_AVAILABLE)%' $enforce_index_php: '%env(bool:NO_URL_REWRITE_AVAILABLE)%'
App\Doctrine\Purger\ResetAutoIncrementPurgerFactory: App\Repository\PartRepository:
arguments:
$translator: '@translator'
tags: ['doctrine.repository_service']
App\EventSubscriber\UserSystem\PartUniqueIpnSubscriber:
tags: tags:
- { name: 'doctrine.fixtures.purger_factory', alias: 'reset_autoincrement_purger' } - { name: doctrine.event_listener, event: onFlush, connection: default }
# We are needing this service inside a migration, where only the container is injected. So we need to define it as public, to access it from the container. # We are needing this service inside a migration, where only the container is injected. So we need to define it as public, to access it from the container.
App\Services\UserSystem\PermissionPresetsHelper: App\Services\UserSystem\PermissionPresetsHelper:
@ -370,14 +251,6 @@ services:
arguments: arguments:
$project_dir: '%kernel.project_dir%' $project_dir: '%kernel.project_dir%'
App\Services\System\UpdateAvailableManager:
arguments:
$check_for_updates: '%partdb.check_for_updates%'
App\Services\System\BannerHelper:
arguments:
$partdb_banner: '%partdb.banner%'
$project_dir: '%kernel.project_dir%'
App\Doctrine\Middleware\MySQLSSLConnectionMiddlewareWrapper: App\Doctrine\Middleware\MySQLSSLConnectionMiddlewareWrapper:
arguments: arguments:
@ -401,8 +274,21 @@ services:
tags: tags:
- { name: monolog.processor } - { name: monolog.processor }
when@test: when@test: &test
services: services:
App\DataFixtures\:
resource: '../src/DataFixtures/'
autoconfigure: true
autowire: true
App\Doctrine\Purger\:
resource: '../src/Doctrine/Purger/'
App\Doctrine\Purger\ResetAutoIncrementPurgerFactory:
tags:
- { name: 'doctrine.fixtures.purger_factory', alias: 'reset_autoincrement_purger' }
# Decorate the doctrine fixtures load command to use our custom purger by default # Decorate the doctrine fixtures load command to use our custom purger by default
doctrine.fixtures_load_command.custom: doctrine.fixtures_load_command.custom:
decorates: doctrine.fixtures_load_command decorates: doctrine.fixtures_load_command
@ -411,3 +297,6 @@ when@test:
- '@doctrine.fixtures.loader' - '@doctrine.fixtures.loader'
- '@doctrine' - '@doctrine'
- { default: '@App\Doctrine\Purger\DoNotUsePurgerFactory' } - { default: '@App\Doctrine\Purger\DoNotUsePurgerFactory' }
when@dev:
*test

View file

@ -17,7 +17,7 @@ This allows external applications to interact with Part-DB, extend it or integra
> Some features might be missing or not working yet. > Some features might be missing or not working yet.
> Also be aware, that there might be security issues in the API, which could allow attackers to access or edit data via > Also be aware, that there might be security issues in the API, which could allow attackers to access or edit data via
> the API, which > the API, which
> they normally should be able to access. So currently you should only use the API with trusted users and trusted > they normally should not be able to access. So currently you should only use the API with trusted users and trusted
> applications. > applications.
Part-DB uses [API Platform](https://api-platform.com/) to provide the API, which allows for easy creation of REST APIs Part-DB uses [API Platform](https://api-platform.com/) to provide the API, which allows for easy creation of REST APIs
@ -106,11 +106,11 @@ This is a great way to test the API and see how it works, without having to writ
By default, all list endpoints are paginated, which means only a certain number of results is returned per request. By default, all list endpoints are paginated, which means only a certain number of results is returned per request.
To get another page of the results, you have to use the `page` query parameter, which contains the page number you want To get another page of the results, you have to use the `page` query parameter, which contains the page number you want
to get (e.g. `/api/categoues/?page=2`). to get (e.g. `/api/categories/?page=2`).
When using JSONLD, the links to the next page are also included in the `hydra:view` property of the response. When using JSONLD, the links to the next page are also included in the `hydra:view` property of the response.
To change the size of the pages (the number of items in a single page) use the `itemsPerPage` query parameter ( To change the size of the pages (the number of items in a single page) use the `itemsPerPage` query parameter (
e.g. `/api/categoues/?itemsPerPage=50`). e.g. `/api/categories/?itemsPerPage=50`).
See [API Platform docs](https://api-platform.com/docs/core/pagination) for more infos. See [API Platform docs](https://api-platform.com/docs/core/pagination) for more infos.

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -1,4 +1,7 @@
name;description;category;notes;footprint;tags;quantity;storage_location;mass;ipn;mpn;manufacturing_status;manufacturer;supplier;spn;price;favorite;needs_review;minamount;partUnit;manufacturing_status name;description;category;notes;footprint;tags;quantity;storage_location;mass;ipn;mpn;manufacturing_status;manufacturer;supplier;spn;price;favorite;needs_review;minamount;partUnit;eda_info.reference_prefix;eda_info.value;eda_info.visibility;eda_info.exclude_from_bom;eda_info.exclude_from_board;eda_info.exclude_from_sim;eda_info.kicad_symbol;eda_info.kicad_footprint
BC547;NPN transistor;Transistors -> NPN;very important notes;TO -> TO-92;NPN,Transistor;5;Room 1 -> Shelf 1 -> Box 2;10;;;Manufacturer;;You need to fill this line, to use spn and price;BC547C;2,3;0;;;; "MLCC; 0603; 0.22uF";Multilayer ceramic capacitor;Electrical Components->Passive Components->Capacitors_SMD;High quality MLCC;0603;Capacitor,SMD,MLCC,0603;500;Room 1->Shelf 1->Box 2;0.1;CL10B224KO8NNNC;CL10B224KO8NNNC;active;Samsung;LCSC;C160828;0.0023;0;0;1;pcs;C;0.22uF;1;0;0;0;Device:C;Capacitor_SMD:C_0603_1608Metric
BC557;PNP transistor;<b>HTML</b>;;TO -> TO-92;PNP,Transistor;10;Room 2-> Box 3;;Internal1234;;;;;;;;1;;;active "MLCC; 0402; 10pF";Small MLCC for high frequency;Electrical Components->Passive Components->Capacitors_SMD;;0402;Capacitor,SMD,MLCC,0402;500;Room 1->Shelf 1->Box 3;0.05;FCC0402N100J500AT;FCC0402N100J500AT;active;Fenghua;LCSC;C5137557;0.0015;0;0;1;pcs;C;10pF;1;0;0;0;Device:C;Capacitor_SMD:C_0402_1005Metric
Copper Wire;;Wire;;;;;;;;;;;;;;;;;Meter; "Diode; 1N4148W";Fast switching diode;Electrical Components->Semiconductors->Diodes;Fast recovery time;Diode_SMD:D_SOD-123;Diode,SMD,Schottky;100;Room 2->Box 1;0.2;1N4148W;1N4148W;active;Vishay;LCSC;C917030;0.008;0;0;1;pcs;D;1N4148W;1;0;0;0;Device:D;Diode_SMD:D_SOD-123
BC547;NPN transistor;Transistors->NPN;very important notes;TO->TO-92;NPN,Transistor;5;Room 1->Shelf 1->Box 2;10;BC547;BC547;active;Generic;LCSC;BC547C;2.3;0;0;1;pcs;Q;BC547;1;0;0;0;Device:Q_NPN_EBC;TO_SOT_Packages_SMD:TO-92_HandSolder
BC557;PNP transistor;Transistors->PNP;PNP complement to BC547;TO->TO-92;PNP,Transistor;10;Room 2->Box 3;10;BC557;BC557;active;Generic;LCSC;BC557C;2.1;0;0;1;pcs;Q;BC557;1;0;0;0;Device:Q_PNP_EBC;TO_SOT_Packages_SMD:TO-92_HandSolder
Copper Wire;Bare copper wire;Wire->Copper;For prototyping;Wire;Wire,Copper;50;Room 3->Spool Rack;0.5;CW-22AWG;CW-22AWG;active;Generic;Local Supplier;LS-CW-22;0.15;0;0;1;Meter;W;22AWG;1;0;0;0;Device:Wire;Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical

1 name description category notes footprint tags quantity storage_location mass ipn mpn manufacturing_status manufacturer supplier spn price favorite needs_review minamount partUnit manufacturing_status eda_info.reference_prefix eda_info.value eda_info.visibility eda_info.exclude_from_bom eda_info.exclude_from_board eda_info.exclude_from_sim eda_info.kicad_symbol eda_info.kicad_footprint
2 BC547 MLCC; 0603; 0.22uF NPN transistor Multilayer ceramic capacitor Transistors -> NPN Electrical Components->Passive Components->Capacitors_SMD very important notes High quality MLCC TO -> TO-92 0603 NPN,Transistor Capacitor,SMD,MLCC,0603 5 500 Room 1 -> Shelf 1 -> Box 2 Room 1->Shelf 1->Box 2 10 0.1 CL10B224KO8NNNC CL10B224KO8NNNC Manufacturer active Samsung You need to fill this line, to use spn and price LCSC BC547C C160828 2,3 0.0023 0 0 1 pcs C 0.22uF 1 0 0 0 Device:C Capacitor_SMD:C_0603_1608Metric
3 BC557 MLCC; 0402; 10pF PNP transistor Small MLCC for high frequency <b>HTML</b> Electrical Components->Passive Components->Capacitors_SMD TO -> TO-92 0402 PNP,Transistor Capacitor,SMD,MLCC,0402 10 500 Room 2-> Box 3 Room 1->Shelf 1->Box 3 0.05 Internal1234 FCC0402N100J500AT FCC0402N100J500AT active Fenghua LCSC C5137557 0.0015 0 1 0 1 pcs active C 10pF 1 0 0 0 Device:C Capacitor_SMD:C_0402_1005Metric
4 Copper Wire Diode; 1N4148W Fast switching diode Wire Electrical Components->Semiconductors->Diodes Fast recovery time Diode_SMD:D_SOD-123 Diode,SMD,Schottky 100 Room 2->Box 1 0.2 1N4148W 1N4148W active Vishay LCSC C917030 0.008 0 0 1 Meter pcs D 1N4148W 1 0 0 0 Device:D Diode_SMD:D_SOD-123
5 BC547 NPN transistor Transistors->NPN very important notes TO->TO-92 NPN,Transistor 5 Room 1->Shelf 1->Box 2 10 BC547 BC547 active Generic LCSC BC547C 2.3 0 0 1 pcs Q BC547 1 0 0 0 Device:Q_NPN_EBC TO_SOT_Packages_SMD:TO-92_HandSolder
6 BC557 PNP transistor Transistors->PNP PNP complement to BC547 TO->TO-92 PNP,Transistor 10 Room 2->Box 3 10 BC557 BC557 active Generic LCSC BC557C 2.1 0 0 1 pcs Q BC557 1 0 0 0 Device:Q_PNP_EBC TO_SOT_Packages_SMD:TO-92_HandSolder
7 Copper Wire Bare copper wire Wire->Copper For prototyping Wire Wire,Copper 50 Room 3->Spool Rack 0.5 CW-22AWG CW-22AWG active Generic Local Supplier LS-CW-22 0.15 0 0 1 Meter W 22AWG 1 0 0 0 Device:Wire Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical

View file

@ -28,7 +28,7 @@ A part entity has many fields, which can be used to describe it better. Most of
the comment field or the specifications the comment field or the specifications
* **Category** (Required): The category (see there) to which this part belongs to. * **Category** (Required): The category (see there) to which this part belongs to.
* **Tags**: The list of tags this part belongs to. Tags can be used to group parts logically (similar to the category), * **Tags**: The list of tags this part belongs to. Tags can be used to group parts logically (similar to the category),
but tags are much less strict and formal (they don't have to be defined forehands) and you can assign multiple tags to but tags are much less strict and formal (they don't have to be defined beforehand) and you can assign multiple tags to
a part. When clicking on a tag, a list with all parts which have the same tag, is shown. a part. When clicking on a tag, a list with all parts which have the same tag, is shown.
* **Min Instock**: *Not really implemented yet*. Parts where the total instock is below this value, will show up for * **Min Instock**: *Not really implemented yet*. Parts where the total instock is below this value, will show up for
ordering. ordering.

View file

@ -10,7 +10,7 @@ Part-DBs behavior can be configured to your needs. There are different kinds of
user-changeable (changeable dynamically via frontend), options that can be configured by environment variables, and user-changeable (changeable dynamically via frontend), options that can be configured by environment variables, and
options that are only configurable via Symfony config files. options that are only configurable via Symfony config files.
## User changeable ## User configuration
The following things can be changed for every user and a user can change it for himself (if he has the correct permission The following things can be changed for every user and a user can change it for himself (if he has the correct permission
for it). Configuration is either possible via the user's own settings page (where you can also change the password) or via for it). Configuration is either possible via the user's own settings page (where you can also change the password) or via
@ -24,15 +24,34 @@ the user admin page:
* **Preferred currency**: One of the defined currencies, in which all prices should be shown, if possible. Prices with * **Preferred currency**: One of the defined currencies, in which all prices should be shown, if possible. Prices with
other currencies will be converted to the price selected here other currencies will be converted to the price selected here
## System configuration (via web interface)
Many common configuration options can be changed via the web interface. You can find the settings page in the sidebar under
"System" -> "Settings". You need to have the "Change system settings" permission to access this page.
If a setting is greyed out and cannot be changed, it means that this setting is currently overwritten by an environment
variable. You can either change the environment variable to change the setting, or you can migrate the setting to the
database, so that it can be changed via the web interface. To do this, you can use the `php bin/console settings:migrate-env-to-settings` command
and remove the environment variable afterward.
## Environment variables (.env.local) ## Environment variables (.env.local)
The following configuration options can only be changed by the server administrator, by either changing the server The following configuration options can only be changed by the server administrator, by either changing the server
variables, changing the `.env.local` file or setting env for your docker container. Here are just the most important variables, changing the `.env.local` file or setting env for your docker container. Here are just the most important
options listed, see `.env` file for the full list of possible env variables. options listed, see `.env` file for the full list of possible env variables.
Environment variables allow to overwrite settings in the web interface. This is useful, if you want to enforce certain
settings to be unchangable by users, or if you want to configure settings in a central place in a deployed environment.
On the settings page, you can hover over a setting to see, which environment variable can be used to overwrite it, it
is shown as tooltip. API keys or similar sensitive data which is overwritten by env variables, are redacted on the web
interface, so that even administrators cannot see them (only the last 2 characters and the length).
For technical and security reasons some settings can only be configured via environment variables and not via the web
interface. These settings are marked with "(env only)" in the description below.
### General options ### General options
* `DATABASE_URL`: Configures the database which Part-DB uses: * `DATABASE_URL` (env only): Configures the database which Part-DB uses:
* For MySQL (or MariaDB) use a string in the form of `mysql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<TABLE_NAME>` here * For MySQL (or MariaDB) use a string in the form of `mysql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<TABLE_NAME>` here
(e.g. `DATABASE_URL=mysql://user:password@127.0.0.1:3306/part-db`). (e.g. `DATABASE_URL=mysql://user:password@127.0.0.1:3306/part-db`).
* For SQLite use the following format to specify the * For SQLite use the following format to specify the
@ -42,10 +61,10 @@ options listed, see `.env` file for the full list of possible env variables.
Please note that **`serverVersion=x.y`** variable is required due to dependency of Symfony framework. Please note that **`serverVersion=x.y`** variable is required due to dependency of Symfony framework.
* `DATABASE_MYSQL_USE_SSL_CA`: If this value is set to `1` or `true` and a MySQL connection is used, then the connection * `DATABASE_MYSQL_USE_SSL_CA` (env only): If this value is set to `1` or `true` and a MySQL connection is used, then the connection
is encrypted by SSL/TLS and the server certificate is verified against the system CA certificates or the CA certificate is encrypted by SSL/TLS and the server certificate is verified against the system CA certificates or the CA certificate
bundled with Part-DB. Set `DATABASE_MYSQL_SSL_VERIFY_CERT` if you want to accept all certificates. bundled with Part-DB. Set `DATABASE_MYSQL_SSL_VERIFY_CERT` if you want to accept all certificates.
* `DATABASE_EMULATE_NATURAL_SORT` (default 0): If set to 1, Part-DB will emulate natural sorting, even if the database * `DATABASE_EMULATE_NATURAL_SORT` (default 0) (env only): If set to 1, Part-DB will emulate natural sorting, even if the database
does not support it natively. However this is much slower than the native sorting, and contain bugs or quirks, so use does not support it natively. However this is much slower than the native sorting, and contain bugs or quirks, so use
it only, if you have to. it only, if you have to.
* `DEFAULT_LANG`: The default language to use server-wide (when no language is explicitly specified by a user or via * `DEFAULT_LANG`: The default language to use server-wide (when no language is explicitly specified by a user or via
@ -74,7 +93,7 @@ bundled with Part-DB. Set `DATABASE_MYSQL_SSL_VERIFY_CERT` if you want to accept
to specify the size in kilobytes, megabytes or gigabytes. By default `100M` (100 megabytes). Please note that this is to specify the size in kilobytes, megabytes or gigabytes. By default `100M` (100 megabytes). Please note that this is
only the limit of Part-DB. You still need to configure the php.ini `upload_max_filesize` and `post_max_size` to allow only the limit of Part-DB. You still need to configure the php.ini `upload_max_filesize` and `post_max_size` to allow
bigger files to be uploaded. bigger files to be uploaded.
* `DEFAULT_URI`: The default URI base to use for the Part-DB, when no URL can be determined from the browser request. * `DEFAULT_URI` (env only): The default URI base to use for the Part-DB, when no URL can be determined from the browser request.
This should be the primary URL/Domain, which is used to access Part-DB. This value is used to create correct links in This should be the primary URL/Domain, which is used to access Part-DB. This value is used to create correct links in
emails and other places, where the URL is needed. It is also used, when SAML is enabled.s If you are using a reverse emails and other places, where the URL is needed. It is also used, when SAML is enabled.s If you are using a reverse
proxy, you should set this to the URL of the reverse proxy (e.g. `https://part-db.example.com`). **This value must end proxy, you should set this to the URL of the reverse proxy (e.g. `https://part-db.example.com`). **This value must end
@ -91,14 +110,24 @@ bundled with Part-DB. Set `DATABASE_MYSQL_SSL_VERIFY_CERT` if you want to accept
* `datastructure_create`: Creation of a new datastructure (e.g. category, manufacturer, ...) * `datastructure_create`: Creation of a new datastructure (e.g. category, manufacturer, ...)
* `CHECK_FOR_UPDATES` (default `1`): Set this to 0, if you do not want Part-DB to connect to GitHub to check for new * `CHECK_FOR_UPDATES` (default `1`): Set this to 0, if you do not want Part-DB to connect to GitHub to check for new
versions, or if your server can not connect to the internet. versions, or if your server can not connect to the internet.
* `APP_SECRET`: This variable is a configuration parameter used for various security-related purposes, * `APP_SECRET` (env only): This variable is a configuration parameter used for various security-related purposes,
particularly for securing and protecting various aspects of your application. It's a secret key that is used for particularly for securing and protecting various aspects of your application. It's a secret key that is used for
cryptographic operations and security measures (session management, CSRF protection, etc..). Therefore this cryptographic operations and security measures (session management, CSRF protection, etc..). Therefore this
value should be handled as confidential data and not shared publicly. value should be handled as confidential data and not shared publicly.
* `SHOW_PART_IMAGE_OVERLAY`: Set to 0 to disable the part image overlay, which appears if you hover over an image in the * `SHOW_PART_IMAGE_OVERLAY`: Set to 0 to disable the part image overlay, which appears if you hover over an image in the
part image gallery part image gallery
* `IPN_SUGGEST_REGEX`: A global regular expression, that part IPNs have to fulfill. Enforce your own format for your users.
* `IPN_SUGGEST_REGEX_HELP`: Define your own user help text for the Regex format specification.
* `IPN_AUTO_APPEND_SUFFIX`: When enabled, an incremental suffix will be added to the user input when entering an existing
* IPN again upon saving.
* `IPN_SUGGEST_PART_DIGITS`: Defines the fixed number of digits used as the increment at the end of an IPN (Internal Part Number).
IPN prefixes, maintained within part categories and their hierarchy, form the foundation for suggesting complete IPNs.
These suggestions become accessible during IPN input of a part. The constant specifies the digits used to calculate and assign
unique increments for parts within a category hierarchy, ensuring consistency and uniqueness in IPN generation.
* `IPN_USE_DUPLICATE_DESCRIPTION`: When enabled, the parts description is used to find existing parts with the same
description and to determine the next available IPN by incrementing their numeric suffix for the suggestion list.
### E-Mail settings ### E-Mail settings (all env only)
* `MAILER_DSN`: You can configure the mail provider which should be used for email delivery ( * `MAILER_DSN`: You can configure the mail provider which should be used for email delivery (
see https://symfony.com/doc/current/components/mailer.html for full documentation). If you just want to use an SMTP see https://symfony.com/doc/current/components/mailer.html for full documentation). If you just want to use an SMTP
@ -117,7 +146,7 @@ bundled with Part-DB. Set `DATABASE_MYSQL_SSL_VERIFY_CERT` if you want to accept
* `TABLE_PARTS_DEFAULT_COLUMNS`: The columns in parts tables, which are visible by default (when loading table for first * `TABLE_PARTS_DEFAULT_COLUMNS`: The columns in parts tables, which are visible by default (when loading table for first
time). time).
Also specify the default order of the columns. This is a comma separated list of column names. Available columns Also specify the default order of the columns. This is a comma separated list of column names. Available columns
are: `name`, `id`, `ipn`, `description`, `category`, `footprint`, `manufacturer`, `storage_location`, `amount`, `minamount`, `partUnit`, `addedDate`, `lastModified`, `needs_review`, `favorite`, `manufacturing_status`, `manufacturer_product_number`, `mass`, `tags`, `attachments`, `edit`. are: `name`, `id`, `ipn`, `description`, `category`, `footprint`, `manufacturer`, `storage_location`, `amount`, `minamount`, `partUnit`, `partCustomState`, `addedDate`, `lastModified`, `needs_review`, `favorite`, `manufacturing_status`, `manufacturer_product_number`, `mass`, `tags`, `attachments`, `edit`.
### History/Eventlog-related settings ### History/Eventlog-related settings
@ -138,7 +167,7 @@ The following options are used to configure, which (and how much) data is writte
If you want to use want to revert changes or view older revisions of entities, If you want to use want to revert changes or view older revisions of entities,
then `HISTORY_SAVE_CHANGED_FIELDS`, `HISTORY_SAVE_CHANGED_DATA` and `HISTORY_SAVE_REMOVED_DATA` all have to be true. then `HISTORY_SAVE_CHANGED_FIELDS`, `HISTORY_SAVE_CHANGED_DATA` and `HISTORY_SAVE_REMOVED_DATA` all have to be true.
### Error pages settings ### Error pages settings (all env only)
* `ERROR_PAGE_ADMIN_EMAIL`: You can set an email address here, which is shown on the error page, who should be contacted * `ERROR_PAGE_ADMIN_EMAIL`: You can set an email address here, which is shown on the error page, who should be contacted
about the issue (e.g. an IT support email of your company) about the issue (e.g. an IT support email of your company)
@ -153,7 +182,7 @@ then `HISTORY_SAVE_CHANGED_FIELDS`, `HISTORY_SAVE_CHANGED_DATA` and `HISTORY_SAV
All parts in the selected category and all subcategories are shown in KiCad. Set this to a higher value, if you want to show more categories in KiCad. All parts in the selected category and all subcategories are shown in KiCad. Set this to a higher value, if you want to show more categories in KiCad.
When you set this value to -1, all parts are shown inside a single category in KiCad. When you set this value to -1, all parts are shown inside a single category in KiCad.
### SAML SSO settings ### SAML SSO settings (all env only)
The following settings can be used to enable and configure Single-Sign on via SAML. This allows users to log in to The following settings can be used to enable and configure Single-Sign on via SAML. This allows users to log in to
Part-DB without entering a username and password, but instead they are redirected to a SAML Identity Provider (IdP) and Part-DB without entering a username and password, but instead they are redirected to a SAML Identity Provider (IdP) and
@ -201,26 +230,26 @@ See the [information providers]({% link usage/information_provider_system.md %})
### Other / less-used options ### Other / less-used options
* `TRUSTED_PROXIES`: Set the IP addresses (or IP blocks) of trusted reverse proxies here. This is needed to get correct * `TRUSTED_PROXIES` (env only): Set the IP addresses (or IP blocks) of trusted reverse proxies here. This is needed to get correct
IP information (see [here](https://symfony.com/doc/current/deployment/proxies.html) for more info). IP information (see [here](https://symfony.com/doc/current/deployment/proxies.html) for more info).
* `TRUSTED_HOSTS`: To prevent `HTTP Host header attacks` you can set a regex containing all host names via which Part-DB * `TRUSTED_HOSTS` (env only): To prevent `HTTP Host header attacks` you can set a regex containing all host names via which Part-DB
should be accessible. If accessed via the wrong hostname, an error will be shown. should be accessible. If accessed via the wrong hostname, an error will be shown.
* `DEMO_MODE`: Set Part-DB into demo mode, which forbids users to change their passwords and settings. Used for the demo * `DEMO_MODE` (env only): Set Part-DB into demo mode, which forbids users to change their passwords and settings. Used for the demo
instance. This should not be needed for normal installations. instance. This should not be needed for normal installations.
* `NO_URL_REWRITE_AVAILABLE` (allowed values `true` or `false`): Set this value to true, if your webserver does not * `NO_URL_REWRITE_AVAILABLE` (allowed values `true` or `false`) (env only): Set this value to true, if your webserver does not
support rewrite. In this case, all URL paths will contain index.php/, which is needed then. Normally this setting does support rewrite. In this case, all URL paths will contain index.php/, which is needed then. Normally this setting does
not need to be changed. not need to be changed.
* `REDIRECT_TO_HTTPS`: If this is set to true, all requests to http will be redirected to https. This is useful if your * `REDIRECT_TO_HTTPS` (env only): If this is set to true, all requests to http will be redirected to https. This is useful if your
web server does not already do this (like the one used in the demo instance). If your web server already redirects to web server does not already do this (like the one used in the demo instance). If your web server already redirects to
https, you don't need to set this. Ensure that Part-DB is accessible via HTTPS before you enable this setting. https, you don't need to set this. Ensure that Part-DB is accessible via HTTPS before you enable this setting.
* `FIXER_API_KEY`: If you want to automatically retrieve exchange rates for base currencies other than euros, you have to * `FIXER_API_KEY`: If you want to automatically retrieve exchange rates for base currencies other than euros, you have to
configure an exchange rate provider API. [Fixer.io](https://fixer.io/) is preconfigured, and you just have to register configure an exchange rate provider API. [Fixer.io](https://fixer.io/) is preconfigured, and you just have to register
there and set the retrieved API key in this environment variable. there and set the retrieved API key in this environment variable.
* `APP_ENV`: This value should always be set to `prod` in normal use. Set it to `dev` to enable debug/development * `APP_ENV` (env only): This value should always be set to `prod` in normal use. Set it to `dev` to enable debug/development
mode. (**You should not do this on a publicly accessible server, as it will leak sensitive information!**) mode. (**You should not do this on a publicly accessible server, as it will leak sensitive information!**)
* `BANNER`: You can configure the text that should be shown as the banner on the homepage. Useful especially for docker * `BANNER`: You can configure the text that should be shown as the banner on the homepage. Useful especially for docker
containers. In all other applications you can just change the `config/banner.md` file. containers. In all other applications you can just change the `config/banner.md` file.
* `DISABLE_YEAR2038_BUG_CHECK`: If set to `1`, the year 2038 bug check is disabled on 32-bit systems, and dates after * `DISABLE_YEAR2038_BUG_CHECK` (env only): If set to `1`, the year 2038 bug check is disabled on 32-bit systems, and dates after
2038 are no longer forbidden. However this will lead to 500 error messages when rendering dates after 2038 as all current 2038 are no longer forbidden. However this will lead to 500 error messages when rendering dates after 2038 as all current
32-bit PHP versions can not format these dates correctly. This setting is for the case that future PHP versions will 32-bit PHP versions can not format these dates correctly. This setting is for the case that future PHP versions will
handle this correctly on 32-bit systems. 64-bit systems are not affected by this bug, and the check is always disabled. handle this correctly on 32-bit systems. 64-bit systems are not affected by this bug, and the check is always disabled.
@ -228,7 +257,7 @@ handle this correctly on 32-bit systems. 64-bit systems are not affected by this
## Banner ## Banner
To change the banner you can find on the homepage, you can either set the `BANNER` environment variable to the text you To change the banner you can find on the homepage, you can either set the `BANNER` environment variable to the text you
want to show, or you can edit the `config/banner.md` file. The banner is written in markdown, so you can use all want to show, or change it in the system settings webinterface. The banner is written in markdown, so you can use all
markdown (and even some subset of HTML) syntax to format the text. markdown (and even some subset of HTML) syntax to format the text.
## parameters.yaml ## parameters.yaml
@ -243,8 +272,6 @@ command `bin/console cache:clear`.
The following options are available: The following options are available:
* `partdb.global_theme`: The default theme to use, when no user specific theme is set. Should be one of the themes from
the `partdb.available_themes` config option.
* `partdb.locale_menu`: The codes of the languages, which should be shown in the language chooser menu (the one with the * `partdb.locale_menu`: The codes of the languages, which should be shown in the language chooser menu (the one with the
user icon in the navbar). The first language in the list will be the default language. user icon in the navbar). The first language in the list will be the default language.
* `partdb.gdpr_compliance`: When set to true (default value), IP addresses which are saved in the database will be * `partdb.gdpr_compliance`: When set to true (default value), IP addresses which are saved in the database will be

View file

@ -18,8 +18,7 @@ It is installed on a web server and so can be accessed with any browser without
> You can log in with username: **user** and password: **user**, to change/create data. > You can log in with username: **user** and password: **user**, to change/create data.
> >
> Every change to the master branch gets automatically deployed, so it represents the current development progress and > Every change to the master branch gets automatically deployed, so it represents the current development progress and
> is > may not be completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
> maybe not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
> the page > the page
> for the first time. > for the first time.
@ -53,7 +52,7 @@ It is installed on a web server and so can be accessed with any browser without
KiCad and see available parts from Part-DB directly inside KiCad. KiCad and see available parts from Part-DB directly inside KiCad.
With these features Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory, With these features Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory,
or makerspaces, where many users have should have (controlled) access to the shared inventory. or makerspaces, where many users should have (controlled) access to the shared inventory.
Part-DB is also used by small companies and universities for managing their inventory. Part-DB is also used by small companies and universities for managing their inventory.

View file

@ -38,7 +38,7 @@ you have started creating data**. So you should choose the database type for you
* **Performance**: SQLite is not as fast as MySQL or PostgreSQL, especially when using complex queries or many users. * **Performance**: SQLite is not as fast as MySQL or PostgreSQL, especially when using complex queries or many users.
* **Emulated RegEx search**: SQLite does not support RegEx search natively. Part-DB can emulate it, however that is pretty slow. * **Emulated RegEx search**: SQLite does not support RegEx search natively. Part-DB can emulate it, however that is pretty slow.
* **Emualted natural sorting**: SQLite does not support natural sorting natively. Part-DB can emulate it, but it is pretty slow. * **Emulated natural sorting**: SQLite does not support natural sorting natively. Part-DB can emulate it, but it is pretty slow.
* **Limitations with Unicode**: SQLite has limitations in comparisons and sorting of Unicode characters, which might lead to * **Limitations with Unicode**: SQLite has limitations in comparisons and sorting of Unicode characters, which might lead to
unexpected behavior when using non-ASCII characters in your data. For example `µ` (micro sign) is not seen as equal to unexpected behavior when using non-ASCII characters in your data. For example `µ` (micro sign) is not seen as equal to
`μ` (greek minuscule mu), therefore searching for `µ` (micro sign) will not find parts containing `μ` (mu) and vice versa. `μ` (greek minuscule mu), therefore searching for `µ` (micro sign) will not find parts containing `μ` (mu) and vice versa.
@ -131,7 +131,7 @@ The host (here 127.0.0.1) and port should also be specified according to your My
In the `serverVersion` parameter you can specify the version of the MySQL/MariaDB server you are using, in the way the server returns it In the `serverVersion` parameter you can specify the version of the MySQL/MariaDB server you are using, in the way the server returns it
(e.g. `8.0.37` for MySQL and `10.4.14-MariaDB`). If you do not know it, you can leave the default value. (e.g. `8.0.37` for MySQL and `10.4.14-MariaDB`). If you do not know it, you can leave the default value.
If you want to use a unix socket for the connection instead of a TCP connnection, you can specify the socket path in the `unix_socket` parameter. If you want to use a unix socket for the connection instead of a TCP connection, you can specify the socket path in the `unix_socket` parameter.
```shell ```shell
DATABASE_URL="mysql://user:password@localhost/database?serverVersion=8.0.37&unix_socket=/var/run/mysqld/mysqld.sock" DATABASE_URL="mysql://user:password@localhost/database?serverVersion=8.0.37&unix_socket=/var/run/mysqld/mysqld.sock"
``` ```
@ -150,7 +150,7 @@ In the `serverVersion` parameter you can specify the version of the PostgreSQL s
The `charset` parameter specify the character set of the database. It should be set to `utf8` to ensure that all characters are stored correctly. The `charset` parameter specify the character set of the database. It should be set to `utf8` to ensure that all characters are stored correctly.
If you want to use a unix socket for the connection instead of a TCP connnection, you can specify the socket path in the `host` parameter. If you want to use a unix socket for the connection instead of a TCP connection, you can specify the socket path in the `host` parameter.
```shell ```shell
DATABASE_URL="postgresql://db_user@localhost/db_name?serverVersion=16.6&charset=utf8&host=/var/run/postgresql" DATABASE_URL="postgresql://db_user@localhost/db_name?serverVersion=16.6&charset=utf8&host=/var/run/postgresql"
``` ```
@ -177,6 +177,6 @@ In natural sorting, it would be sorted as:
Part-DB can sort names in part tables and tree views naturally. PostgreSQL and MariaDB 10.7+ support natural sorting natively, Part-DB can sort names in part tables and tree views naturally. PostgreSQL and MariaDB 10.7+ support natural sorting natively,
and it is automatically used if available. and it is automatically used if available.
For SQLite and MySQL < 10.7 it has to be emulated if wanted, which is pretty slow. Therefore it has to be explicity enabled by setting the For SQLite and MySQL < 10.7 it has to be emulated if wanted, which is pretty slow. Therefore it has to be explicitly enabled by setting the
`DATABASE_EMULATE_NATURAL_SORT` environment variable to `1`. If it is 0 the classical binary sorting is used, on these databases. The emulations `DATABASE_EMULATE_NATURAL_SORT` environment variable to `1`. If it is 0 the classical binary sorting is used, on these databases. The emulations
might have some quirks and issues, so it is recommended to use a database which supports natural sorting natively, if you want to use it. might have some quirks and issues, so it is recommended to use a database which supports natural sorting natively, if you want to use it.

View file

@ -19,7 +19,7 @@ automatic mail providers (like MailChimp or SendGrid). If you want to use one of
Mailer documentation for more information. Mailer documentation for more information.
We will only cover the configuration of an SMTP provider here, which is sufficient for most use-cases. We will only cover the configuration of an SMTP provider here, which is sufficient for most use-cases.
You will need an email account, which you can use send emails from via password-bases SMTP authentication, this account You will need an email account, which you can use to send emails from via password-based SMTP authentication, this account
should be dedicated to Part-DB. should be dedicated to Part-DB.
To configure the SMTP provider, you have to set the following environment variables: To configure the SMTP provider, you have to set the following environment variables:

View file

@ -142,28 +142,12 @@ services:
# This feature is currently experimental, so use it at your own risk! # This feature is currently experimental, so use it at your own risk!
# - DB_AUTOMIGRATE=true # - DB_AUTOMIGRATE=true
# You can configure Part-DB using environment variables # You can configure Part-DB using the webUI or environment variables
# Below you can find the most essential ones predefined # However you can add any other environment configuration you want here
# However you can add add any other environment configuration you want here
# See .env file for all available options or https://docs.part-db.de/configuration.html # See .env file for all available options or https://docs.part-db.de/configuration.html
# The language to use serverwide as default (en, de, ru, etc.) # Override value if you want to show a given text on homepage.
- DEFAULT_LANG=en # When this is commented out the webUI can be used to configure the banner
# The default timezone to use serverwide (e.g. Europe/Berlin)
- DEFAULT_TIMEZONE=Europe/Berlin
# The currency that is used inside the DB (and is assumed when no currency is set). This can not be changed later, so be sure to set it the currency used in your country
- BASE_CURRENCY=EUR
# The name of this installation. This will be shown as title in the browser and in the header of the website
- INSTANCE_NAME=Part-DB
# Allow users to download attachments to the server by providing an URL
# This could be a potential security issue, as the user can retrieve any file the server has access to (via internet)
- ALLOW_ATTACHMENT_DOWNLOADS=0
# Use gravatars for user avatars, when user has no own avatar defined
- USE_GRAVATAR=0
# Override value if you want to show to show a given text on homepage.
# When this is empty the content of config/banner.md is used as banner
#- BANNER=This is a test banner<br>with a line break #- BANNER=This is a test banner<br>with a line break
database: database:

View file

@ -1,13 +1,13 @@
--- ---
title: Direct Installation on Debian 11 title: Direct Installation on Debian 12
layout: default layout: default
parent: Installation parent: Installation
nav_order: 4 nav_order: 4
--- ---
# Part-DB installation guide for Debian 11 (Bullseye) # Part-DB installation guide for Debian 12 (Bookworm)
This guide shows you how to install Part-DB directly on Debian 11 using apache2 and SQLite. This guide should work with This guide shows you how to install Part-DB directly on Debian 12 using apache2 and SQLite. This guide should work with
recent Ubuntu and other Debian-based distributions with little to no changes. recent Ubuntu and other Debian-based distributions with little to no changes.
Depending on what you want to do, using the prebuilt docker images may be a better choice, as you don't need to install Depending on what you want to do, using the prebuilt docker images may be a better choice, as you don't need to install
this many dependencies. See [here]({% link installation/installation_docker.md %}) for more information on the docker this many dependencies. See [here]({% link installation/installation_docker.md %}) for more information on the docker
@ -28,40 +28,32 @@ It is recommended to install Part-DB on a 64-bit system, as the 32-bit version o
For the installation of Part-DB, we need some prerequisites. They can be installed by running the following command: For the installation of Part-DB, we need some prerequisites. They can be installed by running the following command:
```bash ```bash
sudo apt install git curl zip ca-certificates software-properties-common apt-transport-https lsb-release nano wget sudo apt update && apt upgrade
sudo apt install git curl zip ca-certificates software-properties-common \
apt-transport-https lsb-release nano wget sqlite3
``` ```
Please run `sqlite3 --version` to assert that the SQLite version is 3.35 or higher.
Otherwise some database migrations will not succeed.
### Install PHP and apache2 ### Install PHP and apache2
Part-DB is written in [PHP](https://php.net) and therefore needs a PHP interpreter to run. Part-DB needs PHP 8.1 or Part-DB is written in [PHP](https://php.net) and therefore needs a PHP interpreter to run. Part-DB needs PHP 8.2 or
higher. However, it is recommended to use the most recent version of PHP for performance reasons and future higher. However, it is recommended to use the most recent version of PHP for performance reasons and future
compatibility. compatibility.
As Debian 11 does not ship PHP 8.1 in its default repositories, we have to add a repository for it. You can skip this Install PHP with required extensions and apache2:
step if your distribution is shipping a recent version of PHP or you want to use the built-in PHP version. If you are
using Debian 12, you can skip this step, as PHP 8.1 is already included in the default repositories.
```bash ```bash
# Add sury repository for PHP 8.1 sudo apt install apache2 php8.2 libapache2-mod-php8.2 \
sudo curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x php8.2-opcache php8.2-curl php8.2-gd php8.2-mbstring \
php8.2-xml php8.2-bcmath php8.2-intl php8.2-zip php8.2-xsl \
# Update package list php8.2-sqlite3 php8.2-mysql
sudo apt update && sudo apt upgrade
``` ```
Now you can install PHP 8.1 and the required packages (change the 8.1 in the package version according to the version you
want to use):
```bash
sudo apt install php8.1 libapache2-mod-php8.1 php8.1-opcache php8.1-curl php8.1-gd php8.1-mbstring php8.1-xml php8.1-bcmath php8.1-intl php8.1-zip php8.1-xsl php8.1-sqlite3 php8.1-mysql
```
The apache2 webserver should be already installed with this command and configured basically.
### Install composer ### Install composer
Part-DB uses [composer](https://getcomposer.org/) to install required PHP libraries. As the version shipped in the Part-DB uses [composer](https://getcomposer.org/) to install required PHP libraries. Install the latest version manually:
repositories is pretty old, we will install it manually:
```bash ```bash
# Download composer installer script # Download composer installer script
@ -78,10 +70,9 @@ To build the front end (the user interface) Part-DB uses [yarn](https://yarnpkg.
shipped versions are pretty old, we install new versions from the official Node.js repository: shipped versions are pretty old, we install new versions from the official Node.js repository:
```bash ```bash
# Add recent node repository (nodejs 18 is supported until 2025) curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs
# Install nodejs
sudo apt install nodejs
``` ```
We can install yarn with the following commands: We can install yarn with the following commands:
@ -117,8 +108,8 @@ Alternatively, you can check out a specific version by running (
see [GitHub Releases page](https://github.com/Part-DB/Part-DB-server/releases) for a list of available versions): see [GitHub Releases page](https://github.com/Part-DB/Part-DB-server/releases) for a list of available versions):
```bash ```bash
# This checks out the version 1.5.2 # This checks out the version 2.0.0
git checkout v1.5.2 git checkout v2.0.0
``` ```
Change ownership of the files to the apache user: Change ownership of the files to the apache user:
@ -142,11 +133,10 @@ configuration:
cp .env .env.local cp .env .env.local
``` ```
In your `.env.local` you can configure Part-DB according to your wishes. A full list of configuration options can be In your `.env.local` you can configure Part-DB according to your wishes and overwrite web interface settings.
found [here](../configuration.md). A full list of configuration options can be found [here](../configuration.md).
Other configuration options like the default language or default currency can be found in `config/parameters.yaml`.
Please check that the `partdb.default_currency` value in `config/parameters.yaml` matches your mainly used currency, as Please check that the configured base currency matches your mainly used currency, as
this can not be changed after creating price information. this can not be changed after creating price information.
### Install dependencies for Part-DB and build frontend ### Install dependencies for Part-DB and build frontend
@ -256,6 +246,7 @@ network to point to the server).
Navigate to the Part-DB web interface and login via the user icon in the top right corner. You can log in using the Navigate to the Part-DB web interface and login via the user icon in the top right corner. You can log in using the
username `admin` and the password you have written down earlier. username `admin` and the password you have written down earlier.
As first steps, you should check out the system settings and check if everything is correct.
## Update Part-DB ## Update Part-DB
@ -291,7 +282,7 @@ sudo -u www-data php bin/console cache:clear
## MySQL/MariaDB database ## MySQL/MariaDB database
To use a MySQL database, follow the steps from above (except the creation of the database, we will do this later). To use a MySQL database, follow the steps from above (except the creation of the database, we will do this later).
Debian 11 does not ship MySQL in its repositories anymore, so we use the compatible MariaDB instead: Debian 12 does not ship MySQL in its repositories anymore, so we use the compatible MariaDB instead:
1. Install maria-db with: 1. Install maria-db with:

Some files were not shown because too many files have changed in this diff Show more