Compare commits

...

1234 commits

Author SHA1 Message Date
Jan Böhmer
e53b72a8d1 Merge remote-tracking branch 'origin/master' 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 ()
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 ()
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 ()
* 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 ()
* 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 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 ()
* 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 
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 
2025-10-19 15:15:25 +02:00
Jan Böhmer
56f82a7587 Fixed phpstan issues 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 
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 
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 
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 
2025-10-18 23:32:20 +02:00
Marc
05839a549c Fix Wrong default number of project builds if BOM is empty 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
This fixes issue 
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 
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 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 
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 
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 
2025-10-17 21:30:40 +02:00
Jan Böhmer
e06d9da186 Load translations for CKEDITOR if language is not english 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 
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
This fixes issue 
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 
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 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 ()
* 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 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
This fixes issue 
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 ()
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 ()
* 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 2025-09-09 23:05:03 +02:00
Jan Böhmer
fcdeb0479a Bumped version 2.1.2 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 
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 2025-09-08 12:53:03 +02:00
Jan Böhmer
8eec606589 Bumped to version 2.1.1 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 2025-09-07 21:59:30 +02:00
Jan Böhmer
e81c8470be Made part table action bar sticky floating
Related to PR 
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  and  obsolete
2025-09-07 21:21:08 +02:00
Jan Böhmer
0d1ae030be Allow to select default info providers for search
This fixes issue 
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 
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  and 
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) () 2025-09-07 17:53:12 +02:00
Jan Böhmer
c5a1df37b9 Fixed tests 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 
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 
2025-09-06 23:49:14 +02:00
Jan Böhmer
ced16620ec Fixed pollin info provider
This fixes issue 
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
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 ()
* 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 ()
* 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 () 2025-09-06 19:42:07 +02:00
Jan Böhmer
3e8ca06177 Fixed text color in ckeditor editors when in dark mode
Fixes issue 
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 
2025-09-06 19:22:59 +02:00
Jan Böhmer
9b17efc12c Fixed phpstan issue 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  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 2025-09-05 19:56:01 +02:00
Jan Böhmer
d3e3c4e3f8 Fixed currency admin page and modernized underlying swap packages
Fixes issue 
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 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 
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 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 ()
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 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 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 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 
2025-08-28 23:04:14 +02:00
Jan Böhmer
e45a56c66a
Bump version from 1.17.3 to 1.17.4 2025-08-28 22:55:32 +02:00
Jan Böhmer
b4a7d18ace
Pass proxy env vars to symfony 2025-08-25 15:55:28 +02:00
Jan Böhmer
d70fe0fbaa Improved styling of help text in settings forms 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 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 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 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
eb7aefb8c0 Bumped to version 1.17.3 2025-08-13 15:34:29 +02:00
Jan Böhmer
475cfe60f9 Fixed phpstan issue 2025-08-13 15:34:12 +02:00
Jan Böhmer
1e9a2e5382 Revert yarn dependencies update 2025-08-13 15:26:56 +02:00
Jan Böhmer
9eaf5042ec Downgraded ckeditor-dev-utils to be compatible with node 18 2025-08-13 14:49:20 +02:00
Jan Böhmer
d9ef9cd7b7 New translations messages.en.xlf (English) 2025-08-13 14:45:00 +02:00
Jan Böhmer
128b428644 Allow to use arrow style full-paths for mass creation of entities
This fixes issue 
2025-08-13 14:37:13 +02:00
Jan Böhmer
23cd51c1ca Updated dependencies 2025-08-12 23:34:06 +02:00
Jan Böhmer
d370f976a7 Return null instead of throwing an exception that could lead to a denial of service when trying to generate a thumbnail for a non-image picture 2025-08-12 23:29:24 +02:00
Jan Böhmer
247fed7d74 Fixed login CSFR token error 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 
2025-08-04 22:15:32 +02:00
Jan Böhmer
496df89e0b Added configuration what should be reported for test coverage by phpunit 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 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 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 2025-07-13 20:06:38 +02:00
Jan Böhmer
db810445fb Updated phpunit recipe 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 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 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
8b417d6441 Bumped version to 1.17.2 2025-07-06 14:02:36 +02:00
Jan Böhmer
ff57b5b270 Fixed static analyis issue 2025-07-06 14:02:16 +02:00
Jan Böhmer
c00edef69c Add fields parsable by KiCost to KiCad part info 2025-07-06 13:58:51 +02:00
Jan Böhmer
a235f05794 Do not update yarn dependencies to maintain compatibility with nodejs 18 2025-07-06 13:41:36 +02:00
Jan Böhmer
bd411ba13b Revert "Downgrade minimatch to to still support nodejs 18"
This reverts commit f8bdbf1fde.
2025-07-06 13:40:47 +02:00
Jan Böhmer
f8bdbf1fde Downgrade minimatch to to still support nodejs 18 2025-07-06 13:24:03 +02:00
Blaž Aristovnik
beea572c47
Add supplier information to KiCad part exports ()
* Add supplier information to KiCad part exports

- Include supplier name and part numbers from order details in KiCad exports
- Handle multiple suppliers with sequential numbering (Supplier 2, Supplier 3, etc.)
- Include both active and obsolete order details for comprehensive supplier info
- Add null checks to prevent errors when supplier or part number is missing

* Add SPN suffix to field name

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-07-06 13:12:04 +02:00
Jan Böhmer
442a7aa235 Updated dependencies 2025-07-06 00:43:02 +02:00
d-buchmann
2226b72d1c
Update AbstractParameter.php ()
* Update AbstractParameter.php

Make lazy null conditionals explicit.
Try to handle LaTeX special chars gracefully.
Fixes 

* Only escape the percentage sign, so that you can still use latex for units

* Only escape previously unescaped percentage signs

* simplify regex

* Render the percentage sign correctly in units in the frontend.

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-07-06 00:20:29 +02:00
d-buchmann
00a74ed96a
Add env option to disable part image overlay ()
* Add env option to disable part image overlay

Fixes  while preserving the state as-is

* Added documentation and use 1 instead of true for new env

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-07-02 22:31:13 +02:00
d-buchmann
699a5c935f
fix sidebar root node links ()
* fix sidebar root node links

link sidebar root nodes to their corresponding "new" route

* Use "Show all parts" for most root categories and started to make it configurable for the future

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-07-02 22:11:28 +02:00
Jan Böhmer
b2946aee0d Moved pollin and reichelt info provider settings to new settings system 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 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 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
d-buchmann
c44535990b
Fix typo and copy-paste error () 2025-05-23 18:09:56 +02:00
Jan Böhmer
b8d5b83eee Bumped version 1.17.1 2025-05-18 22:54:26 +02:00
Jan Böhmer
00da2dedc3 Ignore phpstan issue 2025-05-18 22:54:03 +02:00
Jan Böhmer
4ce1de079e Updated dependencies 2025-05-18 22:41:05 +02:00
Jan Böhmer
6b9c125de4 Added console command to sanitize SVG files 2025-05-18 22:38:43 +02:00
Jan Böhmer
2c4f44e808 Sanatize SVG files when uploading 2025-05-18 21:00:19 +02:00
Jan Böhmer
2b694731ad Added content-security policy for SVG files in webserver config 2025-05-18 20:38:53 +02:00
Michael
7e34535e62
Added Datamatrix and C93 label twigs ()
* Added Datamatrix and C93 label twigs

* Added new barcode placeholders to ckeditor plugin

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-05-11 00:46:38 +02:00
Jan Böhmer
cf791cff1d New translations messages.en.xlf (English) 2025-05-11 00:41:22 +02:00
Jan Böhmer
0bb831fe88 Updated dependencies 2025-05-11 00:33:29 +02:00
Jan Böhmer
42a32ce142 Merge remote-tracking branch 'origin/l10n_master' 2025-05-11 00:32:34 +02:00
Jan Böhmer
23f58b7bf4 New translations security.en.xlf (French) 2025-05-02 08:23:16 +02:00
Jan Böhmer
4e9101fded New translations messages.en.xlf (Italian) 2025-03-30 19:01:21 +02:00
Jan Böhmer
9c700c77a8 New translations messages.en.xlf (English) 2025-03-30 17:21:15 +02:00
Jan Böhmer
cb1f674332 Removed now obsolete notice about requiring digikey v3 api in docs. 2025-03-30 16:24:33 +02:00
Jan Böhmer
6823d94ffb New translations messages.en.xlf (English) 2025-03-30 16:21:19 +02:00
Jan Böhmer
60ab992360 Bumped to version 1.17.0 2025-03-30 16:06:47 +02:00
Jan Böhmer
f9e769a6e3 Fixed phpstan issue 2025-03-30 15:01:28 +02:00
Jan Böhmer
f802c6c176 Exclude automigration-backup folder from clean attachments folder 2025-03-30 14:50:52 +02:00
Jan Böhmer
dedadf0c10 Merge remote-tracking branch 'origin/master' 2025-03-30 14:47:53 +02:00
Jan Böhmer
c8375def1a Added an database automigration feature to the docker image 2025-03-30 14:47:48 +02:00
Jan Böhmer
62ebcde2de
New Crowdin updates ()
* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)
2025-03-30 14:23:21 +02:00
Jan Böhmer
594a5779dc Specify that we mean a column in drop statement. This is more correct
This should help with more strict sql servers like in issue 
2025-03-29 20:57:58 +01:00
Jan Böhmer
c0ef64fb64 Use updated version of translation-editor-bundle 2025-03-29 16:24:32 +01:00
Jan Böhmer
48c70c3bb4 Added way to batch edit the location of parts with a single stock 2025-03-29 16:21:10 +01:00
Jan Böhmer
68124a340b Updated dependencies 2025-03-29 13:45:53 +01:00
Jan Böhmer
0b5003fcf6 We are in development of 1.17 2025-03-29 13:41:30 +01:00
Jan Böhmer
956ece60af Added documentation for attachments download command 2025-03-29 13:35:29 +01:00
Jan Böhmer
53da45d7d7 Added command to download all external-only attachments to the local file system 2025-03-29 13:33:35 +01:00
Jan Böhmer
57f0432a87 Fixed typo in attachmentrepository 2025-03-29 12:52:43 +01:00
Jan Böhmer
fb535ec6f7 Added tests for latex formatted units 2025-03-29 12:37:17 +01:00
Jan Böhmer
4e1b1a4ffa Render units of parameters in upstanding latex
Fixes issue 
2025-03-29 12:33:18 +01:00
Jan Böhmer
5b111d80f1 Invalidate kicad category cache, when parts get changed, as this might affect the visibility of categories too
Related to 
2025-03-29 12:01:26 +01:00
Jan Böhmer
03e1105a8e Fixed phpstan issues 2025-03-27 23:11:49 +01:00
Jan Böhmer
059a9683db Fixed problem that global_theme setting was not respected
This fixes issue 
2025-03-27 21:47:52 +01:00
Jan Böhmer
1daf6f01f4 Fixed error 500 if internal attachment path was not resolvable to an URL
This fixes issue 
2025-03-27 21:40:51 +01:00
Daniel Carrasco
d3b225771c
Modified the DigiKey Provider to works with the V4 API ()
* Modified the DigiKey Provider to works with the V4 API

* Correclty apply the MarketPlaceFilter option to digikey v4 API

* Show the packe type (Tape&Reel, Box, etc.) as footprint in digikey provider search

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-03-27 21:26:18 +01:00
Jan Böhmer
7275db27e7 Manually filter mouser search results to fix the edgecase, that the API returned multiple results for an exact part number
This fixes issue  and issue 
2025-03-27 21:06:50 +01:00
Jan Böhmer
49ee9131d0 Use composer/ca-bundle instead of system CA for element14 provider
This is a workaround for debian systems, where the required root CA is missing as trusted CA in the system CAs. This fixes issue  and 
2025-03-27 20:59:22 +01:00
Jan Böhmer
e75e0c4c0b Add a link to the category part info as category description in KiCAD.
This also fixes issue 
2025-03-27 20:34:32 +01:00
Jan Böhmer
e94d4a7752 Merge remote-tracking branch 'origin/l10n_master' 2025-03-23 19:52:02 +01:00
Jan Böhmer
95206f427d We are in development of 1.16.2-dev now 2025-03-23 19:51:58 +01:00
Jan Böhmer
2d7f88522a Improved attachment download compatibility
Added more headers to make it appear more like a browser request, and try to use TLS1.3, if we get a 403 (which is useful for digikey).

Commit cherry picked from @Treeed
2025-03-23 19:51:21 +01:00
Jan Böhmer
f5c17bc7c8 Fixed Pollin provider exception, if product top features panel does not exist 2025-03-23 19:43:28 +01:00
Jan Böhmer
63e222ed40 Upgraded dependencies 2025-03-23 19:41:40 +01:00
Jan Böhmer
6963ee3b8d New translations messages.en.xlf (Spanish) 2025-03-11 14:02:14 +01:00
Jan Böhmer
bb5e42bf63 New translations security.en.xlf (Spanish) 2025-03-11 14:02:10 +01:00
Jan Böhmer
c48f778648
Update console_commands.md 2025-03-07 11:30:50 +01:00
Jan Böhmer
616aad6403
Added hint to docker install docs, that you need to run sudo with -E command
That should prevent isssues like in  and 
2025-03-07 11:29:58 +01:00
Jan Böhmer
bcc7547d6f
New Crowdin updates ()
* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (English)
2025-03-02 21:14:42 +01:00
Jan Böhmer
5a1a6e9217
Bumped version 1.16.1 2025-02-26 12:28:07 +01:00
Jan Böhmer
eae1fcecab
New translations security.en.xlf (Chinese Simplified) () 2025-02-26 12:27:11 +01:00
Marc
b53989bb9d
Update LCSCProvider.php: fix error in query string ()
Fix typo in query string 'prodctCode' -> 'productCode' introduced in Commit 80527e3
2025-02-25 13:32:36 +01:00
Jan Böhmer
467d50bd31 Use slightly different migration method for attachment system migration
This maybe help with issue 
2025-02-25 00:32:04 +01:00
Jan Böhmer
1935258978 Fixed phpstan issue 2025-02-23 22:55:59 +01:00
Jan Böhmer
2b5030c69f Bumped version to 1.16.0 2025-02-23 22:40:02 +01:00
Jan Böhmer
6537502696
New Crowdin updates ()
* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)
2025-02-23 17:30:33 +01:00
Jan Böhmer
0ba352ab0b Updated composer dependencies 2025-02-23 17:28:39 +01:00
Jan Böhmer
5d3f861728 Use newer version of farnell/element14 api to get the correct links to product pages. Also we can now retrieve a more detailed description, which will be put into the notes field 2025-02-22 23:29:57 +01:00
Jan Böhmer
319b69f6c7 Added an workaround for issue 2025-02-22 22:59:55 +01:00
Jan Böhmer
c4ba28e3a0 Heavily refactored the property metadata attribute logic
The new method is much more universal and fixes issue 
2025-02-22 22:19:38 +01:00
Jan Böhmer
b38ef8ecea Revert "Fixed type error introduced with api-platform upgrade"
This reverts commit a54c2db9b9.
2025-02-22 21:12:58 +01:00
Jan Böhmer
cb0817666d Revert "Use the modular api-platform packages instead of the monolitic api-platform/core package"
This reverts commit 17caf476bf.
2025-02-22 21:12:54 +01:00
Jan Böhmer
a54c2db9b9 Fixed type error introduced with api-platform upgrade 2025-02-22 19:59:12 +01:00
Jan Böhmer
17caf476bf Use the modular api-platform packages instead of the monolitic api-platform/core package 2025-02-22 19:48:36 +01:00
Jan Böhmer
42cb590c75 Fixed deprecations with api platform 2025-02-22 19:35:49 +01:00
Jan Böhmer
6fd05e1456 Fixed migration 2025-02-22 19:23:28 +01:00
Jan Böhmer
bec45d60e5 Fixed migration for postgresql 2025-02-22 18:03:03 +01:00
Jan Böhmer
019e67a676 Migrate legacy attachment discriminator class values to modern format, so that we can make the discriminator map unique and fix a deprecation with doctrine 2025-02-22 17:58:20 +01:00
Jan Böhmer
f146d88aa5 Added additional filters to attachment datatable 2025-02-22 17:48:26 +01:00
Jan Böhmer
48be9a8098 Made attachment datatable sortable by internal filename and external url 2025-02-22 17:41:41 +01:00
Treeed
29f92d9bd3
Split attachment paths ()
* fixed attachment statistics for sqlite

* Split attachment path into internal and external path, so the external source URL can be retained after a file is downloaded

* Make internal and external path for attachments nullable, to make clear that they have no internal or external path

* Added migrations for nullable columns for postgres and mysql

* Added migration for nullable internal and external pathes for sqlite

* Added translations

* Fixed upload error

* Restrict length of filename badge in attachment edit view

* Improved margins with badges in attachment edit

* Added a link to view external version from attachment edit

* Let media_url  stay in API attachments responses for backward compatibility

---------

Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-02-22 17:29:14 +01:00
Jan Böhmer
ebb977e99f Updated dependencies 2025-02-20 22:10:57 +01:00
Jan Böhmer
94bcd3d2d3 Fixed static analysis issue 2025-02-20 20:35:00 +01:00
Jan Böhmer
a9bd4c5606 Use better parameter value parsing for pollin and reichelt parameters 2025-02-20 19:45:05 +01:00
Jan Böhmer
8d9dde0032 Show the desired part, when searching for the pollin part number 2025-02-20 19:39:35 +01:00
Jan Böhmer
b2d4333fff Merge branch 'pollin_provider' 2025-02-20 19:36:36 +01:00
Jan Böhmer
afd5e2b95b Added documentation for pollin info provider 2025-02-20 19:36:31 +01:00
Jan Böhmer
085adf8d71 Throw an exception message, when trying to use an info provider which is not active 2025-02-20 19:35:16 +01:00
Jan Böhmer
9b35b60d61 Use correct price for one unit if there are multiple prices availble
We can still not parse the bulk prices correctly completly
2025-02-20 19:32:31 +01:00
Jan Böhmer
742e57cc5c Added basic provider for pollin 2025-02-20 19:20:14 +01:00
Jan Böhmer
a5961668fe Disable info provider result caching when in debug mode 2025-02-20 16:59:16 +01:00
Jan Böhmer
e7394c165a Undo change to cache expiration 2025-02-20 16:57:16 +01:00
Jan Böhmer
7be966122f Added missing info hint how to enable reichelt provider 2025-02-20 16:56:21 +01:00
Jan Böhmer
d176b68fd2 Merge branch 'reichelt_provider' 2025-02-20 16:46:58 +01:00
Jan Böhmer
1e80be1376 Added documentation for reichelt info provider 2025-02-20 16:46:47 +01:00
Jan Böhmer
3585b08d4b Pass reichelt env through docker container 2025-02-20 16:38:07 +01:00
Jan Böhmer
c51e0eb68f Allow to get prices in non-EUR currencies from reichelt 2025-02-20 16:37:13 +01:00
Jan Böhmer
d05c0579a2 Fixed problem that first batch price was not included 2025-02-20 16:33:37 +01:00
Jan Böhmer
5e40519bc5 Allow to select if VAT should be included or not 2025-02-20 16:29:37 +01:00
Jan Böhmer
d13752114c Allow to configure the reichelt info provider via env vars 2025-02-20 16:06:10 +01:00
Jan Böhmer
90e1b809fe Allow to change language and country 2025-02-20 15:59:35 +01:00
Jan Böhmer
32b4e6812d Undo change to cache expiration 2025-02-20 15:40:26 +01:00
Jan Böhmer
a798aa9c24 Allow to extract MPN from reichelt provider 2025-02-20 15:39:35 +01:00
Jan Böhmer
f1c28b9f46 Allow to parse batch prices 2025-02-20 15:14:59 +01:00
Jan Böhmer
39bc400376 Added basic price info retrieval from reichelt 2025-02-20 00:32:03 +01:00
Jan Böhmer
e287918121 Extract category from reichelt provider 2025-02-20 00:24:46 +01:00
Jan Böhmer
e0bf8e5fbc Allow reichelt provider to parse parameters 2025-02-20 00:18:05 +01:00
Jan Böhmer
376c7e7a6f Allow to parse ranges for ParameterDTO which just contain two dots 2025-02-20 00:17:53 +01:00
Jan Böhmer
5612a790fb Added basic way to retrieve simple part infos and datasheet 2025-02-19 23:55:58 +01:00
Jan Böhmer
80527e35c3 Added basic reichelt search capabilities 2025-02-19 00:44:49 +01:00
Jan Böhmer
f592ab6395 Updated KiCAD library lists to latest KICAD lib 2025-02-16 21:48:30 +01:00
Jan Böhmer
d7c741c652 Disable create option for input selects if an entity with this name already exists 2025-02-16 21:14:57 +01:00
Jan Böhmer
9502f30e1b Add cllear button to entity select type 2025-02-16 20:36:46 +01:00
Jan Böhmer
7286c4bbef Fixed bug in autoselect_typed plugin 2025-02-16 20:24:13 +01:00
Jan Böhmer
a976f97dbb Apply click_to_edit plugin where reasonable 2025-02-16 20:24:01 +01:00
Jan Böhmer
2c9b8c7dea Merge remote-tracking branch 'origin/l10n_master' 2025-02-16 19:48:57 +01:00
Jan Böhmer
787decf4e2 Updated dependencies 2025-02-16 19:48:51 +01:00
Treeed
2fc70b8bdd
Highlightable attachment paths ()
* made autocomplete controller allow selecting text and autocommit typed text on blur

* moved click_to_edit and autoselect_typed into separate plugins

---------

Co-authored-by: jona <a@b.c>
2025-02-16 19:46:29 +01:00
Jan Böhmer
64491a9772 New translations security.en.xlf (Dutch) 2025-02-10 17:11:09 +01:00
Jan Böhmer
b724b05de6 Fixed "implicitly marking parameter as nullable" deprecations in PHP 8.4 fixed 2025-02-08 00:19:20 +01:00
Marc
d94c4af1be
Document that only Digikey API v3 is supported () 2025-02-04 21:41:03 +01:00
Nico Felbinger
8f0f5a5eb4
Fix postgresl unix socket example ()
* Fix postgresl unix socket example

* Fix user defaulting to root
2025-02-02 21:09:10 +01:00
Treeed
edf50a71d1
fixed attachment statistics for sqlite ()
Co-authored-by: jona <a@b.c>
2025-02-02 21:05:47 +01:00
Jan Böhmer
d0937218b9 Bumped version to 1.15.2 2025-02-01 23:47:14 +01:00
Jan Böhmer
3247a97217 Removed "All" page length option for log tables, as this easily causes an out of memory situation on the server
You can easily have thousands of log entries, making it impossible to view them all at once.

This fixes 
2025-02-01 23:44:07 +01:00
Jan Böhmer
edd254ee06 Merge remote-tracking branch 'origin/l10n_master' 2025-02-01 23:14:50 +01:00
Jan Böhmer
42ecb83155 Rename duplicate parameters and attachments when importing from an info provider
This fixes issue 
2025-02-01 23:14:42 +01:00
Jan Böhmer
56f801c058 New translations messages.en.xlf (English) 2025-02-01 21:30:23 +01:00
Marc
2d3d05e956
Added character symbols for degree and registered in keybindings.md () 2025-02-01 21:02:02 +01:00
Marc
4321e51bf5
Update messages.de.xlf ()
Removed "es" in german translation of string tfa_trustedDevices.explanation
2025-02-01 20:58:55 +01:00
Jan Böhmer
be04730906
New Crowdin updates ()
* New translations security.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations messages.en.xlf (Russian)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Italian)
2025-02-01 20:58:35 +01:00
Jan Böhmer
aa06e1df04 Fixed exception when trying to export an empty entity list
Fixes issue 
2025-02-01 20:57:27 +01:00
Jan Böhmer
fd7a0156bc Disable GET_GROSS_PRICES option for TME info provider when using private key. Otherwise we receive an error.
This fixes issue 
2025-02-01 20:20:33 +01:00
Jan Böhmer
1e19ff24ba Updated dependencies 2025-02-01 20:01:33 +01: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
0f4238291f Bumped version to 1.15.1 2025-01-07 21:56:13 +01:00
Jan Böhmer
03a2a10efd Updated dependencies 2025-01-07 16:51:34 +01:00
Jan Böhmer
04310aa2f8 Removed WebpackAutoPathSubscriber, as it seems it not necessary anymore with encore 5 2025-01-07 16:39:51 +01:00
Jan Böhmer
e8ca11a5cf Do not use a slash prefix for .setPublicPath() in webpack config. Webpack encore 5 seemed to have changed something, so that it does not get overriden anymore
We just get a warning, which we can ignore.
2025-01-07 16:14:21 +01:00
Jan Böhmer
24137b30a5 Added tests for RedirectController that simulates the situation of a reverse proxy and subdirectory 2025-01-07 15:52:28 +01:00
Jan Böhmer
4421917333 Revert "Removed baarcode scanner inbox, as we now have enough performance to apply the decoder to the full image"
This reverts commit de0832bece.
2025-01-06 00:49:16 +01:00
Jan Böhmer
25c8660c2e Bumped version to 1.15.0 2025-01-06 00:31:19 +01:00
Jan Böhmer
190e87390d
New Crowdin updates ()
* New translations security.en.xlf (Italian)

* New translations messages.en.xlf (German)

* New translations security.en.xlf (German)
2025-01-06 00:29:40 +01:00
Jan Böhmer
c9aefdd862 Start with an empty selection of category when a new part is created, so that the user has to manually select it 2025-01-06 00:29:26 +01:00
Jan Böhmer
3ad088663f Fixed phpstan issue 2025-01-06 00:21:04 +01:00
Jan Böhmer
a29e87e5ac Fixed phpunit tests 2025-01-06 00:19:31 +01:00
Jan Böhmer
de0832bece Removed baarcode scanner inbox, as we now have enough performance to apply the decoder to the full image 2025-01-06 00:08:42 +01:00
Jan Böhmer
614697ba84 Use zxing-wasm polyfill even if native barcode detector API is available as the polyfill is sometimes better than the native on
See discussion  for more infos
2025-01-05 23:43:17 +01:00
Jan Böhmer
6bdf3d891a Include the JSON encoded response, when throwing an unknown response format in mouser provider
Should help to debug issue 
2025-01-05 22:15:12 +01:00
Jan Böhmer
f75704f77c Allow users to save a new label profiles directly from the label generator dialog
This fixes issue 
2025-01-05 22:00:07 +01:00
Jan Böhmer
9d09543eb9 Added a button to quickly go to all label profiles editor
Related to issue 
2025-01-05 17:50:15 +01:00
Jan Böhmer
a6116398a8 Only run PartDenormalizer when importing files, otherwise it causes problems with API platform
This fixes issue 
2025-01-05 17:37:02 +01:00
Jan Böhmer
39763b84d5 Updated dependencies 2025-01-05 15:37:21 +01:00
Jan Böhmer
8502df08fa Added test for autodetection of EIGP114 barcodes 2025-01-04 18:43:50 +01:00
Jan Böhmer
bf2a776403 Do the EIGP114 detection after userdefined barcode detection, so that users can override it on their partLots 2025-01-04 18:41:27 +01:00
Jan Böhmer
052190c69b Do not trim user_barcode for partLots 2025-01-04 18:40:18 +01:00
Jan Böhmer
8826ba6729 Fixed CSP rules to allow the WASM loading for the barcode scanner 2025-01-04 18:23:57 +01:00
Jan Böhmer
39b5240934 We are in development of version 1.15.0 2025-01-04 18:14:15 +01:00
Jan Böhmer
ddc1c286d9 Merge branch 'detector-api-polyfill' 2025-01-04 18:10:36 +01:00
Jan Böhmer
22fba37d28 Pause the camera and scanner, when navigating away from the scanner page, so that the camera feed is closed 2025-01-04 18:10:26 +01:00
Jan Böhmer
0c627a5636 Use forked version of html5-qrcode to avoid including zxing-js which will never be used then 2025-01-04 18:09:56 +01:00
Jan Böhmer
53dcd24216 Improved scanning FPS to 10 2025-01-04 16:57:41 +01:00
Jan Böhmer
4b09a321ad Polyfill BarcodeDetector API for improved performance of Html5QRcodeScanner 2025-01-04 16:49:17 +01:00
Treeed
9e85b70c17
Added capability to scan Digikey barcodes and open the local part part page based on the result ()
* added capability to scan digikey barcodes and open the local part page based on the digikey part number or manufacturer part number

* had replaced one too many doublequotes

* Generalized interpretation of format06 barcodes, added ids for mouser

* Renamed vendor_barcode to user_barcode in entities

* Added a own class to parse EIGP114 barcodes

* Added tests to EIGP114Barcode parser

* Refactored code

* Changed BarcodeRedirector to support the new Barcode EIGP114BarcodeScanResult class

* Added possibility to just show all information contained in a barcode

* Dont require trailer for EIGP114 barcodes, as digikey does not seem to put them onto their  barcodes

* Fixed inspection issues

---------

Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-01-04 01:20:51 +01:00
Jan Böhmer
9c99217dee Fixed test errors 2025-01-03 20:21:17 +01:00
Jan Böhmer
afc1dbdd4b Updated recipe for symfony flex 2025-01-03 17:45:13 +01:00
Jan Böhmer
20f58fc07d Updated symfony cli recipe
This adds an error message if no composer dependencies are installed
2025-01-03 17:42:49 +01:00
Jan Böhmer
e6b78dd213 Updated dependencies 2025-01-03 17:41:37 +01:00
Jan Böhmer
63893ffabe Allow to automatically map categories from info providers to local categories using the "alternative names" system
This partially addresses issues discussed in discussion 
2024-12-31 18:31:20 +01:00
Jan Böhmer
c9e519d0b5 Show a warning flash, when creating a part from an info provider that has no category autoprovided
This partially fixes the problems described in discussion 
2024-12-31 18:25:28 +01:00
Jan Böhmer
273bde90f2 Use the providerID as keyword when searching infos for a part with already existing providerreference and preselect the info provider if possible 2024-12-31 18:13:15 +01:00
Treeed
92e4976396
Show when parts from info provider already exist ()
* added button to show existing part with same manufacturer and mpn in provider list

* added button to edit existing part in provider list

* added docstring and comments

* replaced unnecessary double quotes

* Introduced a new twig variable localPart to split up the result

* Highlight a row, if the part is already existing

* Made buttons translatable

* Improved styling of the buttons and added a badge to show a hint

* Extracted database queries for part matching into its own service and optimized the query reducing the required queries by factor 2

* Allow to find existing parts via the stored providerReference

This should allow the database to more quickly find entries

* Allow to use part name and manufacturer alternative names for mapping

* Added a button to update a local part from the info provider and moved some buttons into dropdown menu

---------

Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-12-31 18:03:36 +01:00
Jan Böhmer
e9efbff912 Upgraded typescript version 2024-12-29 20:15:05 +01:00
Jan Böhmer
41089c08f8 Upgraded exports-loader and webpack-cli 2024-12-29 20:08:59 +01:00
Jan Böhmer
9e23e606f8 Updated marked and compression-webpack plugin 2024-12-29 19:59:31 +01:00
Jan Böhmer
b3f0fd368a Updated webpack encore to 5.0.0 2024-12-29 19:50:02 +01:00
Jan Böhmer
12bd5472e2 Fixed sizing of text in label editor input 2024-12-29 19:47:19 +01:00
Jan Böhmer
ef64779759 Updated CKeditor5 to v41 2024-12-29 19:31:04 +01:00
Jan Böhmer
b3d8076ddf Fixed fixture loading process 2024-12-29 19:06:58 +01:00
Jan Böhmer
f775203608 Use new syntax for getReference() in data fixtures 2024-12-29 13:46:22 +01:00
Jan Böhmer
a6083688e4 Upgraded frontend dependencies 2024-12-29 13:43:32 +01:00
Jan Böhmer
50689cd4e6 Updated datatables-bundle 2024-12-29 13:41:30 +01:00
Jan Böhmer
255fcbac1c Removed direct dependency to phpstan-phpdoc-parser, so that it can get removed when updating the webauthn bundle 2024-12-29 13:38:35 +01:00
Jan Böhmer
7f8ffa56e5 Removed (hopefully) unused and unnecessary dependencies 2024-12-29 13:34:10 +01:00
Jan Böhmer
9a2a5f30a3 Updated doctrine fixtures bundle 2024-12-29 13:20:12 +01:00
Jan Böhmer
a9f444cbb4 Added return types to ExponentialNumberTypes for futureproofing the implementation 2024-12-29 13:14:26 +01:00
Jan Böhmer
164efb0551 Fixed phpstan error with NodesListBuilder 2024-12-29 13:14:00 +01:00
Jan Böhmer
a37b8cbb15 Fixed introduced bug in node flattening 2024-12-28 23:19:55 +01:00
Jan Böhmer
946032a101 Fixed phpstan analysis issues and bad code that showed up with phpstan 2.0 2024-12-28 23:08:08 +01:00
Jan Böhmer
a273acbecd Updated PHPstan configuration 2024-12-28 15:12:18 +01:00
Jan Böhmer
0ceee1582e Updated phpstan to 2.0 2024-12-28 14:56:44 +01:00
Jan Böhmer
04a0369d56 Added proxmox LXC installation method to docs 2024-12-25 19:21:30 +01:00
Jan Böhmer
31a288b44d Added recommendation on installation methods 2024-12-25 19:13:28 +01:00
Jan Böhmer
502dc3aa1c Added kubernetes as available installation method. 2024-12-25 19:12:09 +01:00
Jan Böhmer
6874d7ca55 Upgraded dependencies 2024-12-23 20:34:42 +01:00
Jan Böhmer
da8f669aed Test for PHP 8.4 2024-12-23 20:26:31 +01:00
Vedran Vekic
0f92a69b03
Rewrite LCSC datasheet URL () 2024-12-10 14:32:23 +01:00
Bryce Nagaj
8faa3251c4
Update verbiage () 2024-12-10 14:30:47 +01:00
Marc
56fc14003c
Update information_provider_system.md ()
Fixed minor typo in Octopart variable: PROVIDER_OCOTPART_COUNTRY
2024-12-10 14:30:16 +01:00
Jan Böhmer
b3499e4ea5
Fixed (wrongly) failing test on IPAnonymizer 2024-12-02 11:01:39 +01:00
Jan Böhmer
07b1ff9bf5 Bumped version to 1.14.5 2024-12-02 01:00:35 +01:00
Jan Böhmer
5bbf24c92e
New translations security.en.xlf (English) () 2024-12-02 00:22:45 +01:00
Jan Böhmer
eea8b3e679 Merge remote-tracking branch 'origin/master' 2024-12-02 00:22:20 +01:00
Jan Böhmer
e223078af9 Added a custom function to make PostgresSQL searches case insensitive
This is required only for postgres as every other database is case invariant by default. But to achieve a portable way, we implement it via a custom DQL function.

This fixes issue 
2024-12-02 00:17:54 +01:00
dependabot[bot]
b554d0d851
Bump codecov/codecov-action from 4 to 5 ()
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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>
2024-12-01 23:16:37 +01:00
Jan Böhmer
b1ba26e0b9 Allow usernames to contain @-signs as long as it is not at the begininng
This allows to use email addresses as usernames and fixes issue 
2024-12-01 23:05:27 +01:00
Jan Böhmer
ca8ad760d7 Allow SAML users to access the API
This fixes issue .
2024-12-01 22:54:22 +01:00
Jan Böhmer
80129c0a88 Use PHP 8.3 as docker image, and allow for longer error log lines
This fixes issue 
2024-12-01 22:34:05 +01:00
Jan Böhmer
7530e62dfa Do not format error messages as JSON, this makes log files easier to read and reduces line length which can makes problems on FPM
See issue 
2024-12-01 22:33:32 +01:00
Jan Böhmer
baf8977578 Correctly handle IP addresses containing RFC 4007 scoping 2024-12-01 19:19:04 +01:00
Jan Böhmer
c7bf843312 Updated dependencies 2024-12-01 18:48:22 +01:00
Jan Böhmer
ce6fee1682 Merge remote-tracking branch 'origin/dependabot/composer/symfony/http-client-6.4.15' 2024-11-18 15:43:25 +01:00
Jan Böhmer
2653fad488 Merge remote-tracking branch 'origin/dependabot/composer/symfony/security-http-6.4.15' 2024-11-18 15:43:16 +01:00
Jan Böhmer
dd54c46a29 Merge remote-tracking branch 'origin/l10n_master' 2024-11-18 15:43:10 +01:00
dependabot[bot]
724a0e21d3
Bump symfony/security-http from 6.4.14 to 6.4.15
Bumps [symfony/security-http](https://github.com/symfony/security-http) from 6.4.14 to 6.4.15.
- [Release notes](https://github.com/symfony/security-http/releases)
- [Changelog](https://github.com/symfony/security-http/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/security-http/compare/v6.4.14...v6.4.15)

---
updated-dependencies:
- dependency-name: symfony/security-http
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 18:39:42 +00:00
dependabot[bot]
578277d11f
Bump symfony/http-client from 6.4.14 to 6.4.15
Bumps [symfony/http-client](https://github.com/symfony/http-client) from 6.4.14 to 6.4.15.
- [Release notes](https://github.com/symfony/http-client/releases)
- [Changelog](https://github.com/symfony/http-client/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-client/compare/v6.4.14...v6.4.15)

---
updated-dependencies:
- dependency-name: symfony/http-client
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 16:49:40 +00:00
Jan Böhmer
22258e3183 New translations validators.en.xlf (Croatian) 2024-11-10 14:30:20 +01:00
Jan Böhmer
0234463b68 Bumped version to 1.14.4 2024-11-08 23:32:34 +01:00
Jan Böhmer
ef412eef92 Fixed tests 2024-11-08 23:32:14 +01:00
Marc
76ebd22eab
Fixed Typos and mistranslations in GDPR mode (DSGVO Modus) ()
Fixed Typo enviroment

Co-authored-by: Marc Kreidler <kreidler@nedo.com>
2024-11-08 23:22:18 +01:00
Jan Böhmer
5b0ca8e346 Updated dependencies 2024-11-08 23:15:40 +01:00
Jan Böhmer
0b6b10c27b Bumped version to 1.14.3 2024-11-05 00:11:39 +01:00
Jan Böhmer
6225d2c9b3 Implemented an easy to use APIFilter for tags
This makes the process of filters more easily and intuitive. This fixes issue 
2024-11-05 00:07:25 +01:00
Jan Böhmer
01fc6524a4 Added a aggregate function for storelocation sorting to avoid exceptions on Postgres
Actually this was not good on other DB types too, but they just ignored the problems.

This fixes issue 
2024-11-04 23:46:45 +01:00
Jan Böhmer
2575e6a160 Improved size and position of back to top button to avoid overlapping with buttons, etc.
This should fix issue 
2024-11-03 23:58:06 +01:00
Jan Böhmer
484ba5ebd7 If user password set command is run in non-interactive mode, show a warning message if no password is inputted
Related to issue 
2024-11-03 23:39:04 +01:00
Jan Böhmer
b42d98e9f8 Increase font-weight of the <dl> element in part info page to match its look to the <h5> element 2024-11-03 23:21:58 +01:00
Sam Edwards
65b2f045ac
Responsive tweaks ()
* Change datatables markup to be responsive with BS5

* Responsive tweaks to single part info
2024-11-03 23:14:52 +01:00
Jan Böhmer
5e76451d46 Try to guess the character encodings and convert it to UTF-8 on importing
This should fix issue 
2024-11-03 22:27:24 +01:00
Jan Böhmer
a873ad3316 Replace all unicode characters with ASCII chars in FilenameSanatizer to make filenames more sanatized 2024-11-03 22:06:42 +01:00
Jan Böhmer
b1e03f49ee Pass the docker envs for oemsecrets to Part-DB
This fixes issue 
2024-11-03 21:46:53 +01:00
Jan Böhmer
011e23f8e6 Added polish to language selector 2024-11-03 20:04:43 +01:00
Jan Böhmer
646cd8cf22 Merge remote-tracking branch 'origin/l10n_master' 2024-11-03 20:03:28 +01:00
Jan Böhmer
52ac8a70d5 Updated dependencies 2024-11-03 20:03:24 +01:00
Jan Böhmer
e020334b73 New translations messages.en.xlf (Polish) 2024-10-19 22:40:21 +02:00
Jan Böhmer
7698e83f0b New translations messages.en.xlf (Polish) 2024-10-19 21:40:19 +02:00
Jan Böhmer
dd56f5e0c8 New translations messages.en.xlf (Polish) 2024-10-19 19:30:24 +02:00
Jan Böhmer
92c32eef74
New Crowdin updates ()
* New translations validators.en.xlf (Polish)

* New translations messages.en.xlf (Polish)
2024-10-19 19:24:55 +02:00
Jan Böhmer
08770c7dc5 Bumped version to 1.14.2 2024-10-17 00:20:48 +02:00
Priit Laes
808a94e4df
Document APP_SECRET and PostgreSQL specific bits in configuration variables ()
* docs: Mention APP_SECRET

* docs: Add PostgreSQL specific bits to DATABASE_URL description
2024-10-16 23:59:53 +02:00
Jan Böhmer
490086d531 Use the same translation for the panel with enabled search options, like in the checkbox options in navbar 2024-10-16 23:59:23 +02:00
Jan Böhmer
2ef3fbb81b Merge remote-tracking branch 'origin/l10n_master' 2024-10-16 23:57:07 +02:00
Jan Böhmer
7d834ac8d7 Include the query part of the request, when generating the url for the datatables via a custom twig function.
This fixes issue , as without this the query gets not passed to the datatable
2024-10-16 23:57:02 +02:00
Jan Böhmer
15ad0ec9c0 Updated dependencies 2024-10-16 23:40:48 +02:00
Jan Böhmer
f0b78e8b2c New translations validators.en.xlf (Italian) 2024-10-16 13:50:37 +02:00
Jan Böhmer
e616faa76f New translations messages.en.xlf (Italian) 2024-10-16 13:50:36 +02:00
Jan Böhmer
8159f4d8ee Bumped version to 1.14.1 2024-10-13 23:43:55 +02:00
Jan Böhmer
021c576468 Exclude the translation dumper fix files, to avoid phpstan issues, which we cannot control 2024-10-13 23:23:48 +02:00
Jan Böhmer
1b2339a82c Merge remote-tracking branch 'origin/l10n_master' 2024-10-13 23:22:24 +02:00
Jan Böhmer
2b6bb3f773 New translations messages.en.xlf (German) 2024-10-13 23:20:14 +02:00
Jan Böhmer
abc5c61a06 Fixed problem, that search field and search options did not close when clicking outside
This fixes issue . For the search field this was caused by algolia/autocomplete lib, which do not support multiple autocomplete fields on a single page. If initailly loaded on the homepage, which features a second autocomplete, this one "steals" the input listening, and the one in the navbar do not close anymore when clicking outside.
Custom code which triggers the closing of the autocomplete manually when clicking outside, was added as a workaround.
2024-10-13 23:19:03 +02:00
Jan Böhmer
7145bce605 Construct the correct current path, when serving from a subdirectory
This fixes issue 
2024-10-13 22:49:42 +02:00
Jan Böhmer
bb92e5e9ee New translations validators.en.xlf (German) 2024-10-13 21:40:20 +02:00
Jan Böhmer
0c47aa226c Fixed imports of parameters on parts
It was missing the required serialization group. This fixes issue 
2024-10-13 21:35:31 +02:00
Jan Böhmer
76e945bbbd Fixed issue that the document could not be scrolled anymore, when redirected from a modal
This fixes issue 
2024-10-13 21:23:57 +02:00
Jan Böhmer
4a6ec2581d Removed wrongly used controller for merge modal 2024-10-13 20:59:28 +02:00
Jan Böhmer
3d75bf5f9f Added translation for the confirmation code field in the authenticator app 2FA setup section 2024-10-13 20:46:12 +02:00
Jan Böhmer
c27648b89b New translations validators.en.xlf (English) 2024-10-13 20:40:16 +02:00
Jan Böhmer
ccf67c0662 Added translation if authentication confirmation code is wrong 2024-10-13 20:35:56 +02:00
Jan Böhmer
ca116cae91 Keeep the segment annotations in the translation files, when editing them from inside the application 2024-10-13 20:30:56 +02:00
Jan Böhmer
a29d933f99 Fixed 2FA TOTP for non-admins, while also retaining validation of auth code
This fixes issue 
2024-10-13 20:29:22 +02:00
Jan Böhmer
49acf3e0cf Fixed problem preventing non-admins to add TOTP 2FA to their account
This was caused by the no-lockout constraint, which was accidentially triggered here
2024-10-13 20:13:03 +02:00
Jan Böhmer
234b5abb96 Merge remote-tracking branch 'origin/master' 2024-10-13 19:56:29 +02:00
Jan Böhmer
839bcf91d6 Updated dependencies. 2024-10-13 19:56:21 +02:00
Jan Böhmer
58ed57fab7
New translations messages.en.xlf (English) () 2024-09-12 21:52:34 +02:00
Jan Böhmer
fa42997733 Bumped version to 1.14.0 2024-09-09 21:42:29 +02:00
Jan Böhmer
ac416141d0 Merge remote-tracking branch 'origin/master' 2024-09-09 21:42:15 +02:00
Jan Böhmer
c629a85b14 Updated dependencies 2024-09-09 21:42:03 +02:00
Jan Böhmer
7ccfea208f
New Crowdin updates ()
* New translations messages.en.xlf (English)

* New translations validators.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (Italian)
2024-09-09 21:38:07 +02:00
Jan Böhmer
f3c802bcff Made parameter type fields wider to fit more digits 2024-09-09 21:36:05 +02:00
Jan Böhmer
574583bd6a Do not round values of parameters, we can now use the full double precision
This fixes issue 
2024-09-09 21:33:28 +02:00
Jan Böhmer
84c54d0b25 Removed NumberType fixes, as these is now part of the upstream symfony 2024-09-09 21:13:44 +02:00
Jan Böhmer
86d3f87694 [Digikey provider] Do not try to interpret certain parameters (like packages) as numbers
This fixes issue 
2024-09-09 20:44:09 +02:00
André Lademann
ddd7252051
Increase image size in list view () 2024-09-09 20:29:25 +02:00
Jan Böhmer
b4e8136618 Fixed problem with undeleting elements containing an embedded and propertly restore the infos of the embed
This fixes issue 
2024-09-09 20:26:26 +02:00
Jan Böhmer
c2638991f2 Added documentation for OEMSecrets info provider 2024-09-09 17:02:45 +02:00
Jan Böhmer
8554be9abd Show number of results for info provider search and show a notice, if no results were found 2024-09-09 16:41:19 +02:00
Jan Böhmer
87a518703f Escape spaces in unnwrapped urls to avoid invalid URLs 2024-09-09 16:23:12 +02:00
Jan Böhmer
dd03ca943d Fixed phpstan issues 2024-09-09 14:52:18 +02:00
Jan Böhmer
6997861811 [OEMSecrets provider] Extract real URLs and remove tracking parts 2024-09-09 14:52:09 +02:00
Pasquale D'Orsi
1cc1530b20
OEMSecrets provider interface v.1.0 ()
* OEMSecrets provider interface v.1.0

New class for interacting with the OEMSecrets (https://www.oemsecrets.com) API version 3.0.1.

* Refactored info provider to be stateless and independent from session, optimized Part-DB API usage, and fixed PHPStan issues.

Refactored info provider to be stateless and independent from session, now use Psr\Cache, fixed issues identified by PHPStan, additional minor enhancements and bug fixes.

* Prefix cache keys with oemsecrets_ to avoid key collissions

* Use uniqid with more entropy to reduce probability of collisions

* Made $resultData local as it is only used inside searchByKeyword

* Use the parameter name $id from interface declaration for getDetails to avoid problems with named arguments

* Use unicode modifier for preg_match to avoid problems when parameters contain non-unicode strings

* Various small code quality improvements

* Try to retrieve the part from the API in getDetails, if the DTO was not cached before

* Improved code formatting

* Channged OEMSecret default country to DE to be consistent with other default values

* Do not call gc_collect_cycles in the loop to process the results, but only after all processBatch calls

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-09-09 00:59:44 +02:00
Jan Böhmer
98597fb3aa Use new repository pathes (Part-DB-server) instead of the Part-DB-symfony ones 2024-09-08 20:05:06 +02:00
Jan Böhmer
283a445198 Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing
This new bundle has less dependencies and less overhead
2024-09-08 20:03:33 +02:00
Jan Böhmer
7db44f0ec5 Upgraded dependencies 2024-09-08 19:54:31 +02:00
Jan Böhmer
abb5395cae Use "log-bin-trust-function-creators" option for mysql in recommended docker-compose file
This avoids errors, while creating the MySQL functions for the natural sort: "1419 You do not have the SUPER privilege an
  d binary logging is enabled"
2024-09-08 19:46:55 +02:00
Jan Böhmer
8c8b44baef Use debian bookworm, PHP 8.2 and node 20 for the docker image by default 2024-09-08 19:40:43 +02:00
Jan Böhmer
7366a33fe5 Apply the PHP_VERSION arg also to the partdb-entrypoint during build, to make it really version independent 2024-09-08 19:40:19 +02:00
Jan Böhmer
ad02d7e525
New Crowdin updates ()
* New translations messages.en.xlf (English)

* New translations validators.en.xlf (English)

* New translations security.en.xlf (English)

* New translations validators.en.xlf (Italian)
2024-09-08 19:14:02 +02:00
David Girón
b5a0189f29
feat(docker): Refactor Dockerfile ()
* reorder nodejs/yarn install, separate packages per line

* reduce run actions and reorganize commands

* simplify file creation, copy in one layer only

* fix lint LegacyKeyValueFormat

* arg php_version to run different version

* reorder copy from generated config

* update dockerfile-frankenphp
2024-09-08 19:13:13 +02:00
Jan Böhmer
756152dd68 Bumped to version 1.13.3 2024-08-24 15:58:46 +02:00
Jan Böhmer
173a8ee680 Improved assymmetric padding in datatables footer 2024-08-24 15:55:45 +02:00
Jan Böhmer
b99777cde1 Return a 404 message, instead of creating an 500 Runtime exception, when a file associated with an attachment is not existing.
This fails more gracefully, and do not pollute log files.
2024-08-24 15:49:45 +02:00
Jan Böhmer
8193e7a68e Allow to show attachment IDs in attachment table 2024-08-24 15:48:50 +02:00
Jan Böhmer
f18c024daa Remove -> prefix if no element is selected yet 2024-08-24 15:35:30 +02:00
Jan Böhmer
f6577a8f33 Allow to create sub elements for existing elements, by typing "->"
This fixes issue  and 
2024-08-24 15:31:44 +02:00
Jan Böhmer
7fc3153dde Fixed filter logic for exclusion of entities. Before parts with null values as property value were wrongly not shown
This fixes  issue 
2024-08-23 22:58:04 +02:00
Jan Böhmer
5231dbd6e7 Remove project path in twig label error messages to prevent information leakage 2024-08-23 22:28:29 +02:00
Jan Böhmer
77671550a7 Fail gracefully, when an exception occurs during rendering of the example labels for label profiles
This fixes issue 
2024-08-23 22:15:29 +02:00
Jan Böhmer
e231404128 Load HTMLExtension in SandboxedTwig, so that the data_uri filter can be used in twig labels
This fixes issue 
2024-08-23 22:06:37 +02:00
Jan Böhmer
6650e2da3d Updated dependencies 2024-08-23 21:57:37 +02: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
frank-f
fd521acaa4
Update LCSCProvider field for real datasheet URL () 2024-08-21 17:35:55 +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
a169623866 Bump version to 1.13.2 2024-07-28 23:20:47 +02:00
Jan Böhmer
21c3c45150 Introduced a custom ExponentialNumberType for parameter values
This type shows small values in exponential notation instead of rounding it to zero.
2024-07-28 23:18:36 +02:00
Jan Böhmer
1aee0a91c0 Workaround symfonys issue with NumberType and negative exponential e-notation number
This fixes issue 
2024-07-28 22:52:44 +02:00
Jan Böhmer
27a28d4adc Fixed the NatSortKey function where regex characters were improperly escaped in the old migration
This caused a "range out of order in character class" error and propably affected the functionality of the sort function
2024-07-28 17:08:55 +02:00
Jan Böhmer
d6ff22fc44 Show in server info page which natural sorting method is used
This should ease debugging
2024-07-28 14:13:34 +02:00
Jan Böhmer
5ede61118c Use paragonie/sodium_compat v1 as v2 do not support 32-bit PHP anymore 2024-07-28 13:31:27 +02:00
Jan Böhmer
228549ff51 Include pgsql extensions and client in docker images 2024-07-28 13:12:42 +02:00
Jan Böhmer
1ec5cbc301 Merge remote-tracking branch 'origin/l10n_master' 2024-07-28 13:02:58 +02:00
Jan Böhmer
3011cb8fae Updated dependencies 2024-07-28 13:02:39 +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
ff78c3c9a7 New translations security.en.xlf (Vietnamese) 2024-07-10 03:32:31 +02:00
Jan Böhmer
d5980b7620 New translations messages.en.xlf (Spanish) 2024-07-05 11:30:31 +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
a8e1171108 Bumped to version 1.13.1 2024-06-23 21:14:00 +02:00
Jan Böhmer
19e5d302f4 Fixed detection on mariadb natsort capabilities on distributions which use the 5.5.5- prefix for MariaDB version 2024-06-23 21:13:37 +02:00
Jan Böhmer
22e2480feb Bumped version to 1.13.0 2024-06-23 19:06:29 +02:00
Jan Böhmer
88ef1788ac Add small time differences to the datafixtures log entries, to get a defined order 2024-06-23 18:03:54 +02:00
Jan Böhmer
a54ce939ca Merge branch 'timetravel-tests' 2024-06-23 17:45:17 +02:00
Jan Böhmer
528d0c7a26 Added tests for TimeTravel service and fixed applyEntry function for embeddded fields 2024-06-23 17:43:10 +02:00
Jan Böhmer
c68a647e75 Added missing tests for LogEntryRepository 2024-06-23 16:07:42 +02:00
Jan Böhmer
e0e4b74b6f Fixed getElementExistedAtTimestamp function() 2024-06-23 15:46:10 +02:00
Jan Böhmer
204178740c Started adding basic tests for LogEntryRepository 2024-06-23 15:41:57 +02:00
Jan Böhmer
8fdf37261d Fixed phpstan issues 2024-06-23 00:42:49 +02:00
Jan Böhmer
06c8e584a4 Allow to import attachments and parameters via entity import
This fixes issue 
2024-06-23 00:41:25 +02:00
Jan Böhmer
bbf7222a6a Improved EntityExporter to handle recursive exports 2024-06-23 00:11:38 +02:00
Jan Böhmer
f6e955b487 Hide mouser parts with an invalid product ID to avoid the issue described in 2024-06-22 23:37:50 +02:00
Jan Böhmer
32a72bfd23 Defocus show/hide sidbar button after clicking to close tooltip
Fixes issue 
2024-06-22 23:08:51 +02:00
Jan Böhmer
25e0c22de9 Merge branch 'added-scan-button-to-navbar' 2024-06-22 23:04:06 +02:00
Jan Böhmer
2dd1843aac Merge branch 'master' into added-scan-button-to-navbar 2024-06-22 23:03:10 +02:00
Jan Böhmer
f3bf4ca838 New translations validators.en.xlf (English) 2024-06-22 23:02:49 +02:00
Jan Böhmer
b88e5e27d8 Fixed tests 2024-06-22 23:01:40 +02:00
Jan Böhmer
6f91ff1f28 Fixed --overwrite option of the backup command not working
This fixes issue 
2024-06-22 22:59:16 +02:00
Jan Böhmer
b7b941e3a1 Fixed error handling of structural data import
This was the reason for the exception in 
2024-06-22 22:55:15 +02:00
Jan Böhmer
64414fe105 Added missing validator.invalid_range translation 2024-06-22 20:00:16 +02:00
Jan Böhmer
701713e298 Fixed symfony UX translations when using a locale with subregion (e.g. en_US)
Fixes issue described in 
2024-06-22 19:57:49 +02:00
Jan Böhmer
445229976f Allow locales like de_DE in removeLocaleFromPath function
Related to issue 
2024-06-22 19:48:11 +02:00
Jan Böhmer
eb02404d49 Fixed typing of TextConstraint 2024-06-22 19:06:07 +02:00
Jan Böhmer
c780c0bd92 Fixed "__partLot already defined" error when using a between filter for amountSum on postgres 2024-06-22 19:03:30 +02:00
Jan Böhmer
8f631cae63 Split up NumberConstraint and DateTimeConstraint for better type enforcement 2024-06-22 18:53:26 +02:00
Jan Böhmer
07afff8db5 Updated yarn dependencies 2024-06-22 18:02:42 +02:00
Jan Böhmer
a4f440656a Fixed timetravel feature on postgresql 2024-06-22 17:55:54 +02:00
Jan Böhmer
235d572f8c Use DatetimeImmutable instead of DateTime wherever possible 2024-06-22 17:36:54 +02:00
Jan Böhmer
eebc373734 Merge branch 'rector' 2024-06-22 16:54:09 +02:00
Jan Böhmer
002d29a53e Fixed PHPstan issues 2024-06-22 16:53:59 +02:00
Jan Böhmer
5074e2beac Fixed phpunit tests 2024-06-22 00:44:59 +02:00
Jan Böhmer
d898ca736c Applied rector to remaining test files 2024-06-22 00:37:47 +02:00
Jan Böhmer
af325612aa Dont replace our test 'GET' strings with a class constant 2024-06-22 00:36:30 +02:00
Jan Böhmer
590c2c3b0a Excluded a few more rector rules 2024-06-22 00:34:49 +02:00
Jan Böhmer
20f32c7f12 Applied rector suggestions 2024-06-22 00:31:43 +02:00
Jan Böhmer
4106bcef5f Do not rename tableAction controller 2024-06-22 00:06:48 +02:00
Jan Böhmer
0e3b8a2a28 Do not replace our !== null checks with instanceof 2024-06-22 00:03:52 +02:00
Jan Böhmer
272608b4ec Ignore symfony generated files for rector 2024-06-22 00:00:59 +02:00
Jan Böhmer
7a389469b9 Updated rector 2024-06-21 23:51:44 +02:00
Jan Böhmer
9650969c94 Merge branch 'master' of https://github.com/Part-DB/Part-DB-symfony 2024-06-21 23:41:57 +02:00
Jan Böhmer
6821e668e4 Do not inject ObjectNormalizer into StructuralElementDenormalizer directly 2024-06-21 23:41:52 +02:00
Jan Böhmer
43a68b96ae Moved deprecated doctrine subscribers to doctrine event listeners 2024-06-21 23:41:22 +02:00
Jan Böhmer
1f6e3db09e Document natural sorting and the DATABASE_EMULATE_NATURAL_SORT option 2024-06-21 12:31:25 +02:00
Jan Böhmer
2fabcabcc0 Added documentation about the different DATABASE_URL formats for the database types 2024-06-21 11:58:09 +02:00
Jan Böhmer
22855b077d Improved "Choosing database" documentation page 2024-06-21 11:44:24 +02:00
Jan Böhmer
2cad7a67ea Updated requirements in README file and mention PostgreSQL support in features 2024-06-21 10:39:44 +02:00
Jan Böhmer
8ce93a028a Removed deprecated interface from SkippableItemNormalizer 2024-06-19 23:58:15 +02:00
Jan Böhmer
028307b63c Added some return typehints to functions who missed them 2024-06-19 23:56:08 +02:00
Jan Böhmer
7bd6cd7cec Merge remote-tracking branch 'origin/master' 2024-06-19 23:47:46 +02:00
Jan Böhmer
8c45a40f9e Explicitly configure some deprecated configuration options 2024-06-19 23:47:38 +02:00
dependabot[bot]
70c62dab77
Bump docker/build-push-action from 5 to 6 ()
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  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>
2024-06-19 23:33:43 +02:00
Jan Böhmer
b4d8d31c2d partUnit column in part datatable now shows the correct data
This fixes issue 
2024-06-19 23:28:53 +02:00
Jan Böhmer
bc15135f6b We are in development of 1.13 now 2024-06-18 23:44:28 +02:00
Jan Böhmer
16baccc2cb Upgraded rector to latest version 2024-06-18 23:33:53 +02:00
Jan Böhmer
bb2559edc1 Fixed PHPstan issue 2024-06-18 23:31:24 +02:00
Jan Böhmer
f6f736a91f Added amphp/http-client to support HTTP/2 connections, even if libcurl is not enabled 2024-06-18 23:25:40 +02:00
Jan Böhmer
9f477676e2 Removed psalm, as we only use phpstan 2024-06-18 23:24:54 +02:00
Jan Böhmer
6cba6ba52e Updated dependencies 2024-06-18 23:21:45 +02:00
Jan Böhmer
d29dbc9385 Merge branch 'postgres' 2024-06-18 23:17:27 +02:00
Jan Böhmer
cb01302ada Test the backup tool in github actions
This ensures that the tool works for all database types
2024-06-18 23:04:44 +02:00
Jan Böhmer
e3dfbf0e95 Support postgres in the backup command 2024-06-18 23:02:33 +02:00
Jan Böhmer
3f471d0c73 Natsort MPN column in part datatables 2024-06-18 22:34:29 +02:00
Jan Böhmer
4a706ab707 Do not natsort description fields as these can become very long 2024-06-18 22:34:13 +02:00
Jan Böhmer
4946a9ab0d Fixed SQL declaration of NatSortKey function
We do not need the delimiter declarations
2024-06-18 22:32:07 +02:00
Jan Böhmer
123372d93f Allow to emulate natural sort on mysql platforms 2024-06-18 21:42:00 +02:00
Jan Böhmer
272fe0516b Allow to emulate natural sorting on SQLite databases 2024-06-18 00:09:44 +02:00
Jan Böhmer
289c9126d0 Use Natural_SORT_KEY for natural sorting on MariaDB database which support that
This resolves issue  and 
2024-06-17 23:29:38 +02:00
Jan Böhmer
0a482da93e Use postgres native array_position function instead of our FIELD function and pass it as array literal instead of variadic function
Otherwise we will run into errors, that we can not give more than 100 arguments to a function
2024-06-17 23:13:04 +02:00
Jan Böhmer
8bb8118d9f Use natural sorting for trees and others repository functions 2024-06-17 22:33:40 +02:00
Jan Böhmer
9db822eabd Use natural sorting for string datatables columns when using postgres
The natural sorting solution is quite portable, so this should be possible for other database types too later
2024-06-17 21:38:16 +02:00
Jan Böhmer
8a42dfa154 Use the FIELD function on postgres for order by field value 2024-06-17 21:20:23 +02:00
Jan Böhmer
d7a7e22e5a Fixed lessThanDesired Constraint for postgresql 2024-06-17 21:16:46 +02:00
Jan Böhmer
4f75e2641b Define a custom FIELD function to sort tables by list of ids without the emulation via string operations 2024-06-16 23:46:40 +02:00
Jan Böhmer
d3dcefb645 Fixed total amount and less than desired filter on postgresql 2024-06-16 23:26:57 +02:00
Jan Böhmer
6d1553e8d8 Fixed problem with datatable column sorting on postgresql 2024-06-16 22:52:15 +02:00
Jan Böhmer
740985d68f New translations security.en.xlf (Croatian) 2024-06-14 23:40:19 +02:00
Jan Böhmer
7ad2fab53d Fixed exception related that Datetimeimmutables were used were doctrine expected mutable ones
this prevented the saving of parts from info providers
2024-06-13 23:41:35 +02:00
Jan Böhmer
6e9b337b49 Fixed regex function for postgres 2024-06-13 23:18:25 +02:00
Jan Böhmer
c58ff5861d Replaced the non standard IFNULL function which postgres does not know with the COALSCE function 2024-06-13 23:01:53 +02:00
Jan Böhmer
33a5e70b70 Fixed phpunit tests for postgres 2024-06-13 22:19:17 +02:00
Jan Böhmer
07f1ce5822 Configure the postgres server to accept local connections without password 2024-06-13 00:00:51 +02:00
Jan Böhmer
d41996b365 Added SSH connection into test container for debugging 2024-06-12 23:33:05 +02:00
Jan Böhmer
d3c9b7eae1 Configure postgres to accept all connections without password for testing 2024-06-12 23:30:42 +02:00
Jan Böhmer
373a1ab0f4 Change the password of the postgres user 2024-06-12 23:24:37 +02:00
Jan Böhmer
58dd56a89f Supply a password for the postgres database connection 2024-06-12 23:16:24 +02:00
Jan Böhmer
d7eadd9294 Use the builtin postgres user already defined in the github image
It hopefully requires no password
2024-06-12 23:13:20 +02:00
Jan Böhmer
853e29dd83 Removed sqlite database creation
This is not possible anymore for the sqlite driver and is unnesecarry as it is automatically created on migration
2024-06-10 23:47:28 +02:00
Jan Böhmer
0c1c46c045 Fixed MySQL version number
The 8.0 was to short to be detected as newer than 8.0.0. We need to specify the bugfix release to get proper results
2024-06-10 23:46:33 +02:00
Jan Böhmer
be97ea08a2 Specify a version number on the MySQL database URL, so that doctrine does not need to start a connection while cache clearing 2024-06-10 23:35:13 +02:00
Jan Böhmer
1c8b81ca2c Run a SSH session in the github actions container for better debugging 2024-06-10 23:05:16 +02:00
Jan Böhmer
8266f230d7 For debugging disable fast failing of phpunit tests 2024-06-10 22:58:54 +02:00
Jan Böhmer
0b53542716 Added postgres to github tests actions 2024-06-10 22:52:11 +02:00
Jan Böhmer
eab1c7096c Use the postgres migration code generated by the new doctrine orm versions
This now uses IDENTITY columns for ID columns, which makes their behavior more similar to the behavior of MySQL and SQLite
2024-06-10 22:38:46 +02:00
Jan Böhmer
8ee3aaf4f4 Added Sqlite migrations required by new doctrine/orm version and fixed migration duplication for sqlite 2024-06-10 21:54:15 +02:00
Jan Böhmer
427b8659c9 Added MySQL migrations required by the doctrine upgrades
The new ORM versions, do not have anymore column comments, so these got removed
2024-06-10 21:43:25 +02:00
Jan Böhmer
3c3af824cf Merge branch 'doctrine-upgrade' into postgres 2024-06-10 21:26:00 +02:00
Jan Böhmer
d40ce470d3 Fixed some invalid class constant use in ResetAutoIncrementORMPurger 2024-06-10 21:25:51 +02:00
Jan Böhmer
07c7f07c35 Removed usage of partial flush which is not supported with the recent doctrine ORM version 2024-06-10 21:25:23 +02:00
Jan Böhmer
fe732ecf45 Fixed minor inspection issue 2024-06-10 21:16:46 +02:00
Jan Böhmer
971bb92a8c Fixed error caused by ArrayType fields which is required by the webauthn bundle but was removed in doctrine/orm 4.0
We simple forward port the ArrayType class from orm 3.8 to fix this error
2024-06-10 21:11:11 +02:00
Jan Böhmer
777f6ba738 Fixed error caused by immutable datetime passed to mutable datetime doctrine type 2024-06-10 20:47:06 +02:00
Jan Böhmer
4d927c5870 Use a better exception format for UTCDateTimeType 2024-06-10 20:17:57 +02:00
Jan Böhmer
1830e9da3d Fixed errors caused by change on how setParameters on query builder works
We replaced them by individual setParameter calls as this seems to be the easiest way to fix this
2024-06-10 00:08:53 +02:00
Jan Böhmer
5eb29746af Revert "Fixed errors that query builder setParameters now expects an ArrayCollection instead of an array"
This reverts commit 78671b0bfe.
2024-06-10 00:04:22 +02:00
Jan Böhmer
afb816cc41 Use the getReference function in TimeTravel service instead of the removed getPartialReference()
This is probably the better choice anyway
2024-06-09 23:58:03 +02:00
Jan Böhmer
bd640c19a4 Fixed type of token object is now a property instead of array value in Field2 2024-06-09 23:55:12 +02:00
Jan Böhmer
0d445b6a21 Fixed some minor inspection issues caused by the doctrine upgrades 2024-06-09 23:51:41 +02:00
Jan Böhmer
78671b0bfe Fixed errors that query builder setParameters now expects an ArrayCollection instead of an array 2024-06-09 23:51:11 +02:00
Jan Böhmer
60325e797d Fixed the use of the removed ClassMetadataInfo constants 2024-06-09 23:45:22 +02:00
Jan Böhmer
7d9be5ae76 Fixed wrong casing of SQLitePlatform 2024-06-09 23:36:00 +02:00
Jan Böhmer
777bfed813 Fixed doctrine middlewares
We now look directly onto the driver arguments instead of retrieving a database platform, for which we would need the database version.

As we modify driver specific options there, this might be the better choice anyway
2024-06-09 23:28:46 +02:00
Jan Böhmer
43ca543651 Fixed wrong signature of UTCDateTimeType 2024-06-09 23:15:14 +02:00
Jan Böhmer
205d5f8f58 Updated doctrine dbal and orm to next major version 2024-06-09 23:11:08 +02:00
RaptorDE
ee37852a72
added scan button navbar in mobile view 2024-06-09 13:02:49 +02:00
Jan Böhmer
dc14b58d73 Fixed DBInfoHelper compatibility with postgres 2024-06-09 00:46:23 +02:00
Jan Böhmer
a88a2e04cf Added the required initial users and groups for the database migration 2024-06-09 00:11:58 +02:00
Jan Böhmer
c620beb965 Merge branch 'master' into postgres 2024-06-08 19:49:07 +02:00
Jan Böhmer
92cb9f70a1 Bumped version to 1.12.1 2024-06-08 19:23:22 +02:00
Jan Böhmer
b2059b6910 Use outline-secondary style for the sidebar toggle button
This makes the button a bit more subtle and fixes issue  that the button were not visible in darkmode
2024-06-07 23:28:59 +02:00
Jan Böhmer
0b21effb13
New Crowdin updates ()
* New translations security.en.xlf (Dutch)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (English)
2024-06-07 22:49:18 +02:00
Jan Böhmer
02acafc348 Added postgres to the AbstractMultiPlatformMigration class 2024-06-06 23:11:11 +02:00
Jan Böhmer
d202ecf06f Added support of the custom TinyInt type for postgres 2024-06-06 22:38:33 +02:00
Jan Böhmer
5402d7bedb Increased phpunit memory limit to 1G
This hopefully fixed the failing github action
2024-06-06 20:04:50 +02:00
Jan Böhmer
39247f1ece Updated dompdf to 3.0 2024-06-06 19:44:26 +02:00
Jan Böhmer
55b824d777 Updated dependencies 2024-06-06 19:40:49 +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
SapuSeven
4eb223c401
Update LCSC API URL () 2024-05-12 18:21:23 +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
Jan Böhmer
4a99a5e68f Bumped version to 1.12.0 2024-04-29 00:11:47 +02:00
Jan Böhmer
a96c10a13e Made KiCAD bom import independent from the language of the header rows
This fixes issue 
2024-04-29 00:09:10 +02:00
Jan Böhmer
b3b2782f45 Fixed wrong url to KiCad API in user settings if using a prefixed reverse proxy
This fixes issue 
2024-04-28 23:54:52 +02:00
Jan Böhmer
1bf9f25ded Fixed problem with kicad footprint autcomplete when using a reverse proxy in a prefixed path
This fixes issue 
2024-04-28 23:27:15 +02:00
Jan Böhmer
75df0198fc Fixed tests 2024-04-28 23:12:10 +02:00
Jan Böhmer
b70d74ae4b Perform the duplicate check of parameter names already on initial creation
This fixes issue 
2024-04-28 19:38:39 +02:00
Jan Böhmer
dfe4568991 Use a better translation for the "Is not" filter when children should also be excluded 2024-04-28 18:19:47 +02:00
Jan Böhmer
3fff354833 Fixed type conversion error in ProjectBuildType
This seemed only to occur, if the form field was disabled. This fixes issue 
2024-04-28 18:09:17 +02:00
Jan Böhmer
db72dac243 Save the date when a webauthn key was used last time for 2 factor authentication and show it in user settings 2024-04-28 17:50:19 +02:00
Jan Böhmer
b886c0aeae Removed a now unecessary workaround in the WebatuthnKey entity 2024-04-28 00:43:36 +02:00
Jan Böhmer
91b7f2752f Added the database fields required by the new webauthn bundle versions 2024-04-28 00:31:38 +02:00
Jan Böhmer
f4a67c0224 Merge remote-tracking branch 'origin/l10n_master' 2024-04-27 23:57:44 +02:00
Jan Böhmer
c6ac0302ed Updated dependencies 2024-04-27 23:57:31 +02:00
Jan Böhmer
39f1960135 New translations messages.en.xlf (Chinese Simplified) 2024-04-27 21:30:19 +02:00
Jan Böhmer
ffb659b228 New translations validators.en.xlf (Chinese Simplified) 2024-04-27 20:30:18 +02:00
Jan Böhmer
e93148304e New translations messages.en.xlf (English) 2024-04-26 17:22:47 +02:00
Jan Böhmer
34940dd950
New translations messages.en.xlf (Russian) () 2024-04-22 16:06:13 +02:00
Morgan Diepart
eda0e2fe26
Update Measurement Unit concept () 2024-04-16 12:15:45 +02:00
Jan Böhmer
4aecfaf4e0 Fixed typo in DATABASE_URL env in debian installation guide
Fixes issue 
2024-04-15 23:42:44 +02:00
Jan Böhmer
767de1dd65 Updated dependencies 2024-04-15 23:42:08 +02:00
frank-f
7a6b045030
Improve parameter parsing ()
* DigiKey: Skip empty values

* Move improved range detection from LCSCProvider to ParameterDTO class
Improve numeric value detection by moving extra info to value_text

* ParameterDTO: Add micro unit prefix

* Bring $value_text2 to a defined state

* ParameterDTO: Don't overwrite $unit if it's not empty

* ParameterDTO: Don't overwrite $unit if it's not empty

* Correct some inaccuacies in comments

* Added tests and fixed certain edge cases in parsing parameters

* Added more tests for parameter parsing

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-04-15 22:33:27 +02:00
Jan Böhmer
fdf64f9e9a
New Crowdin updates ()
* New translations security.en.xlf (Polish)

* New translations validators.en.xlf (Polish)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations messages.en.xlf (Italian)
2024-04-15 21:33:58 +02:00
Henning Kleen
835b954140
fix import of parts containing shopping information () 2024-04-15 21:32:04 +02:00
frank-f
9770ffa46b
LCSC: Follow first 'pdfUrl' link to get real datasheet URL ()
* Follow first 'pdfUrl' link to get real datasheet URL

* Fix @param

* Fix @param

* Remove User-Agent header
It's not needed - LCSC was just having some server troubles over the weekend

* Added comment explaining the json_decode in getRealDatasheetUrl

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-04-03 12:38:20 +02:00
Jan Böhmer
da75cca97c Fixed missing/wrong group attributes on Parameters
This fixes issue 
2024-04-02 22:41:30 +02:00
Jan Böhmer
d767e7472d Updated dependencies 2024-04-02 22:19:58 +02:00
Jan Böhmer
9b8d4c518a Updated dependencies 2024-03-23 20:45:09 +01:00
Jan Böhmer
96f5b2beab Bumped version to 1.11.3 2024-03-16 18:55:21 +01:00
Jan Böhmer
b9dc349d9a Merge remote-tracking branch 'origin/l10n_master' 2024-03-16 18:50:49 +01:00
Jan Böhmer
07d6e5c1d6 Updated dependencies 2024-03-16 18:45:06 +01:00
Jan Böhmer
488c8c5526 KiCAD API: Inherit the reference prefix from category if it was defined 2024-03-16 18:31:35 +01:00
Jan Böhmer
fb0abf3c1a New translations messages.en.xlf (English) 2024-03-16 01:20:29 +01:00
Jan Böhmer
a954712197
New Crowdin updates ()
* New translations messages.en.xlf (Czech)

* New translations validators.en.xlf (Czech)
2024-03-14 15:08:17 +01:00
au-ee
7c258d231b
install sudo to be able to do db migrations from the container's console () 2024-03-12 11:03:33 +01:00
Jan Böhmer
c4bc1a4c51 Merge branch 'pr-564' 2024-03-11 22:24:26 +01:00
Jan Böhmer
0d9c86fcd3 Added brackets around if body 2024-03-11 22:24:21 +01:00
Frank Fenor
5454bb5b07
Avoid throwing an exception if Content-Disposition header doesn't exist or contains illegal things 2024-03-11 19:16:01 +01:00
Jan Böhmer
04d5cd741b Merge remote-tracking branch 'origin/frankenphp' 2024-03-11 11:04:45 +01:00
Jan Böhmer
3191028f74 Added an github action to build the frankenPHP docker image 2024-03-10 23:44:34 +01:00
Jan Böhmer
49f82127aa Do not copy the content of public/media to docker image 2024-03-10 20:49:33 +01:00
Jan Böhmer
28d86c8885 Show info about kernel runtime parameters on server info page 2024-03-10 20:32:43 +01:00
Jan Böhmer
1548b9f8c8 FrankenPHP dockerfile is now working 2024-03-10 20:22:47 +01:00
Jan Böhmer
7271c8c6f1 Restructured frankenphp structure 2024-03-10 19:50:21 +01:00
Jan Böhmer
aa0ec15e67 Allow to override the root user CLI check with COMPOSER_ALLOW_SUPERUSER 2024-03-10 19:30:14 +01:00
Jan Böhmer
7f78822a12 Added frankenphp runtime for symfony 2024-03-10 18:49:54 +01:00
Jan Böhmer
f8e92f98d0 Updated the dockerignore from the values of frankenphp 2024-03-10 18:09:56 +01:00
Jan Böhmer
8d816ab1ee Updated recipes to update docker related files 2024-03-10 18:08:22 +01:00
Jan Böhmer
19967bd42e Added files from frankenphp symfony skeleton 2024-03-10 18:05:21 +01:00
Jan Böhmer
d3a819613f Bumped version to 1.11.2 2024-03-10 01:40:04 +01:00
Jan Böhmer
e33f6a20bb Merge remote-tracking branch 'origin/l10n_master' 2024-03-10 01:39:21 +01:00
Jan Böhmer
02b736c92f New translations messages.en.xlf (German) 2024-03-10 01:31:46 +01:00
Jan Böhmer
e339c79c5a New translations messages.en.xlf (English) 2024-03-10 01:20:25 +01:00
Jan Böhmer
945fb9384e Remove preview image attachment during if the attachment got deleted during cloning
This fixes issue 
2024-03-10 01:19:52 +01:00
Jan Böhmer
a792a140f7 Show a success flash message, after mass creation submit 2024-03-10 00:55:22 +01:00
Jan Böhmer
ed4728fdb1 Correcty handle already existing elements in mass creation
This fixes issue 
2024-03-10 00:51:37 +01:00
Jan Böhmer
92a8107b9d Bumped to 1.11.2-dev 2024-03-10 00:20:05 +01:00
Jan Böhmer
1af8558cf4 Use position: fixed for footer in error pages to get better positioning in the popup details fram 2024-03-10 00:19:47 +01:00
Jan Böhmer
b781150ee9 Show the error page in a pop up in prod environment too 2024-03-10 00:12:54 +01:00
Jan Böhmer
59c4248efe Strip HTML tags from more LCSC fields
This should hopefully fix issue 
2024-03-09 23:09:49 +01:00
Jan Böhmer
a5b101a0ea Fixed error, when retrieving prices in USD from LCSC
This fixes issue . It seems that LCSC changed their currency symbol for US-Dollar
2024-03-09 22:54:12 +01:00
Jan Böhmer
03854aa207 Updated dependencies 2024-03-09 21:42:43 +01:00
Jan Böhmer
c989be2719 Retrieve the part mass from mouser API if available 2024-03-09 21:34:05 +01:00
Jan Böhmer
d22e3ddcd7 New translations validators.en.xlf (German) 2024-03-09 21:20:19 +01:00
Jan Böhmer
040168b3d4 New translations validators.en.xlf (Italian) 2024-03-09 08:20:18 +01:00
Jan Böhmer
ac5c5555d5 New translations validators.en.xlf (English) 2024-03-09 00:30:36 +01:00
Jan Böhmer
1e6065f732 Show 64-bit recommendation in check requirements CLI and server info page 2024-03-09 00:23:18 +01:00
Jan Böhmer
cb7be460d7 Add 64-bit recommendation to installation docs 2024-03-09 00:13:40 +01:00
Jan Böhmer
206bcebdb7 Forbid users to select dates after 2038 on 32-bit systems to prevent errors caused by Year2038 bug
See discussion  and 
2024-03-09 00:11:00 +01:00
Jan Böhmer
18c697f472 Document the available Part-DB specific filters and functions in twig mode 2024-03-07 13:23:58 +01:00
Jan Böhmer
4adb9a5266 Document available fields in twig mode
Related to 
2024-03-07 13:11:17 +01:00
Jan Böhmer
a72a7ed1fc Explain the advantages of the twig mode 2024-03-07 12:46:30 +01:00
Jan Böhmer
838997b959 Updated the list of allowed object methods in twig label mode 2024-03-06 21:39:49 +01:00
Jan Böhmer
5736816b2b Document on how to use the placeholder function and placeholder twig filter in label twig mode
Related with 
2024-03-06 21:22:47 +01:00
Jan Böhmer
38b5a84c4f Added some more useful variables to the twig label generator 2024-03-06 21:11:31 +01:00
Jan Böhmer
dff1ef04bf Added placeholders filter to utilize the placeholders in twig mode
Fixes 
2024-03-06 21:00:49 +01:00
Jan Böhmer
757201cafa Allow access of twig sandbox to a few more extensions and functions 2024-03-06 20:21:07 +01:00
Jan Böhmer
1da3225e1d Renamed SandboxedTwigProvider to SandboxedTwig Factory 2024-03-06 20:08:35 +01:00
Jan Böhmer
a2cd5652d2 Updated the list of tags, filters and functions which are allowed inside the sandboxed twig 2024-03-06 20:03:12 +01:00
Jan Böhmer
dc7c13479c Add proper length constraint validations to all string mapped ORM fields, so they show a nice validation error, instead of a 500 error
Fixes issue 
2024-03-06 19:46:11 +01:00
Jan Böhmer
113e5b3bcd Escape not only the pathes of FileDTO objects returned by info providers but the preview image url too.
This fixes the second issue in 
2024-03-05 22:52:27 +01:00
Jan Böhmer
925f5c0ce0 Fixed phpstan bug 2024-03-04 22:42:24 +01:00
Jan Böhmer
0c53f5e186 Bumped to version 1.11.1 2024-03-04 22:38:43 +01:00
Jan Böhmer
2bcbe1d0be Made mouser price info parsing more flexible
Austrian mouser returned some other formatted string, which caused problems on the old method. This fixes issue 
2024-03-04 22:38:15 +01:00
Jan Böhmer
0e68f0783f Assume that a mouser part is active, if mouser has parts instock even if it is marked as "new part"
Related to 
2024-03-04 22:18:35 +01:00
Jan Böhmer
91e8711fdf Fixed problems with dynamically adding structural entities, when the arrows had spaces around them
Related to 
2024-03-04 22:10:28 +01:00
Jan Böhmer
cf39e1f259 Do not split up pasted input on structrual entity selectors. This caused a part of the string to get split/lost
Fixes issue 
2024-03-04 21:51:26 +01:00
Jan Böhmer
0cd631774b Fixed compatibility error with webauthn library which prevented 2FA via webauthn 2024-03-04 21:20:57 +01:00
Jan Böhmer
df53cf2540 Pass LCSC related env from the docker container to Part-DB
This fixes issue 
2024-03-04 20:44:49 +01:00
Jan Böhmer
b734fc09f3 Release of version 1.11.0 2024-03-03 23:16:52 +01:00
Jan Böhmer
1fe5c56d02 Merge remote-tracking branch 'origin/l10n_master' 2024-03-03 23:08:10 +01:00
Jan Böhmer
af98842090 Added tests for the remaining API endpoints 2024-03-03 23:07:55 +01:00
Jan Böhmer
3d67ad870a Added tests for all API endpoints of Structural elements 2024-03-03 21:52:26 +01:00
Jan Böhmer
7b5ae70de3 Added tests for the Attachments API endpoint 2024-03-03 21:02:15 +01:00
Jan Böhmer
18c80f6b64 Use the route attribute from the correct namespace 2024-03-03 20:37:33 +01:00
Jan Böhmer
d49bb1f4b5 Removed unused import statements 2024-03-03 20:34:36 +01:00
Jan Böhmer
87533b6031 Fixed further inspection issues 2024-03-03 20:33:24 +01:00
Jan Böhmer
33e36f3d2b Fixed issue with EntityImported that was caused by the changes to PartNormalizer
We now have a possibility to skip API Platforms serializer subsystem
2024-03-03 20:24:24 +01:00
Jan Böhmer
42e604245c Fixed some inspection issues 2024-03-03 19:57:31 +01:00
Jan Böhmer
33475dca66 Updated dependencies 2024-03-03 19:51:47 +01:00
Jan Böhmer
7a90d3f281 Rewrote PartNormalizer so that it does not use ObjectNormalizer directly 2024-03-03 19:28:44 +01:00
Jan Böhmer
e53da5ad06 Added documentation on how to upload files and download URLs through the API on attachments 2024-03-03 19:04:25 +01:00
Jan Böhmer
f5bbb8bdd6 Merge branch 'upload_overhaul' 2024-03-03 18:55:58 +01:00
Jan Böhmer
d5b07bbaa3 Added additional type hints 2024-03-03 18:55:50 +01:00
Jan Böhmer
3585b8a56a Adapter attachment upload forms to the new system 2024-03-03 18:52:06 +01:00
Jan Böhmer
0c33059c4e Allow to upload files to attachments by passing a base64 encoded file 2024-03-03 18:40:35 +01:00
Jan Böhmer
0824e11570 Fixed infinite loop during deserialization on attachment PATCH operations 2024-03-03 17:58:25 +01:00
Jan Böhmer
0c4f5bcb3a New translations messages.en.xlf (German) 2024-03-03 16:50:19 +01:00
Jan Böhmer
aad8dcbadf New translations messages.en.xlf (Italian) 2024-03-03 11:03:22 +01:00
Jan Böhmer
193d5c8663 New translations messages.en.xlf (Czech) 2024-03-03 10:03:25 +01:00
Jan Böhmer
3734541743 Describe the new way to create attachments and parameters via API 2024-03-03 00:49:44 +01:00
Jan Böhmer
f3bea68011 Automatically detect the discriminator type of attachments and parameters based on the chosen element IRI
Related to issue 
2024-03-02 23:15:00 +01:00
Jan Böhmer
e843286ea7 Allow to create parameters via the API 2024-03-02 21:49:16 +01:00
Jan Böhmer
e3d2012809 Use a own discriminator map for the Attachment API Platform discriminator 2024-03-02 21:45:16 +01:00
Jan Böhmer
ce768764cc Allow to create Attachments for all entity types using the API
This fixes issue 
2024-03-02 21:39:30 +01:00
Jan Böhmer
16b3d58242 Implemented basic discriminator map for Attachment API access. Now we can properly create part attachments using a POST operation 2024-03-02 21:21:16 +01:00
Jan Böhmer
fad8f26eaa Added additional projects related filters to part table views 2024-03-02 19:18:55 +01:00
Jan Böhmer
04d1e84596 Added a filter to filter for parts which are used in a specific project
Related to issue 
2024-03-02 19:00:30 +01:00
Jan Böhmer
934acca934 Added an column to part table view to show which projects a part uses.
Fixes issue 
2024-03-02 18:48:31 +01:00
Jan Böhmer
639c98237a New translations messages.en.xlf (English) 2024-03-02 18:40:50 +01:00
Jan Böhmer
a6db67ab33 Fixed margins of the upload files button 2024-03-02 18:33:20 +01:00
Jan Böhmer
b92553f480 Added button to create attachments by uploading multiple files
This fixes issue 
2024-03-02 18:26:50 +01:00
Jan Böhmer
f5d53dc305 Make the checkboxes of datatables look like regular bootstrap checkboxes 2024-03-02 01:28:15 +01:00
Jan Böhmer
b7ce91e2d8 Use the new system of datatables-select 2.0 where checkboxes are true checkbox fields 2024-03-02 01:04:28 +01:00
Jan Böhmer
4295141fb6 Updated dependencies 2024-03-01 21:42:42 +01:00
Jan Böhmer
973709c2f4 Updated dependencies 2024-02-29 23:46:39 +01:00
Jan Böhmer
a72a61091a Only add the amountSum select for part tables if it is really required 2024-02-29 23:35:05 +01:00
Jan Böhmer
c635637c00 Fixed problem that tables could not be sorted by manufacturers, categories, etc. 2024-02-29 23:13:17 +01:00
Jan Böhmer
77a5cadf51 Merge branch 'quicksearch' 2024-02-29 23:04:42 +01:00
Jan Böhmer
e0ef376cf0 Fixed various problems with the quicksearch 2024-02-29 23:00:21 +01:00
Jan Böhmer
04aeab7ea6 Renamed the quicksearch controller 2024-02-29 22:50:26 +01:00
Jan Böhmer
0dea26f67d Do not allow search if query is empty 2024-02-29 22:48:07 +01:00
Jan Böhmer
1815162907 Added a search bar to homepage 2024-02-29 22:46:19 +01:00
Jan Böhmer
e00988047c Added highlighting to search results 2024-02-29 22:20:30 +01:00
Jan Böhmer
faadd8e9a4 Improved layout for autocomplete dropdown 2024-02-29 21:53:28 +01:00
Jan Böhmer
409dcce3c7 Use correct translations for livesearch field in navbar 2024-02-29 20:39:27 +01:00
Jan Böhmer
746ba398a9 Fixed missing dropdown after some link navigations 2024-02-28 22:08:32 +01:00
Jan Böhmer
faa3bea3ab Allow to navigate to dropdown entries by keyboard 2024-02-28 22:06:54 +01:00
Jan Böhmer
f70f6c39ce Fixed error that algolia autocomplete input appeared multiple times after a link was clicked 2024-02-28 22:00:12 +01:00
Jan Böhmer
25a8642749 Make algolia autocomplete headers blue in bootstrap theme 2024-02-28 21:41:45 +01:00
Jan Böhmer
41e45599d4 Use a modified theme for algolia/autocomplete, which plays better with bootstrap 2024-02-28 21:38:11 +01:00
Jan Böhmer
293afc3998
New Crowdin updates ()
* New translations messages.en.xlf (Chinese Simplified)

* New translations messages.en.xlf (Chinese Simplified)
2024-02-28 13:00:59 +01:00
Jan Böhmer
c662dcfcd9 Started to make the autocomplete theme more bootstrap like 2024-02-27 23:39:49 +01:00
Jan Böhmer
e16aa31ddf Fixed z-index of autocomplete dropdown 2024-02-27 23:05:24 +01:00
Jan Böhmer
c87f809d12 Added header to part livesearch dropdown part results 2024-02-27 23:02:05 +01:00
Jan Böhmer
a3dcd1a0a8 Added recent searches to search 2024-02-27 00:39:38 +01:00
Jan Böhmer
4398b8698c Set proper darkmode attribute for algolia autocomplete 2024-02-27 00:33:48 +01:00
Jan Böhmer
18eb0467ee Integrated algolia autocomplete search into navbar 2024-02-27 00:28:17 +01:00
Jan Böhmer
60942c8254 Added very basic livesearch feauture using algolia autocomplete 2024-02-27 00:08:21 +01:00
Jan Böhmer
c7fac06b65 Updated dependencies 2024-02-25 19:44:34 +01:00
Jan Böhmer
2e5b2c8b7d Removed amountSum subquery from the detail query, as its result is not used anywhere 2024-02-25 01:46:35 +01:00
Jan Böhmer
fbd095ab50 Only add the joins to the parts table filter query if they are really required
This should improve the performance of the queries slightly
2024-02-25 01:40:25 +01:00
Jan Böhmer
b176cb1ae1 Use a much faster query to retrieve the total number of rows in datatables
This should increase performance on part tables
2024-02-25 00:58:26 +01:00
Jan Böhmer
2b65926865 Cache the sidebar trees to save some database calls 2024-02-25 00:48:15 +01:00
Jan Böhmer
a5d184baef Use rawurlencode instead of urlencode to sanatize URL-unsafe characters returned by the info providers. 2024-02-24 23:58:27 +01:00
Jan Böhmer
12e9497ccf Sanatize remaining invalid URL characters somehow returned by InfoProviders
This fixes issue 
2024-02-24 23:55:31 +01:00
Jan Böhmer
4b7d200aa2 Retrieve category info from LCSC 2024-02-24 23:32:50 +01:00
Jan Böhmer
e937432d1e Fixed phpstan issue 2024-02-24 23:23:46 +01:00
Jan Böhmer
e1f1d10833 Added test for change on ParamterDTO done by PR 2024-02-24 22:51:02 +01:00
Jan Böhmer
05ec7ab665 Merge branch 'master' of https://github.com/Part-DB/Part-DB-symfony 2024-02-24 22:49:05 +01:00
Jan Böhmer
dbd841a723 Updated dependencies 2024-02-24 22:48:52 +01:00
frank-f
e8bc93f67a
Fix RegEx to handle negative values and Ohms without prefix ()
* Fix RegEx to include negative values

* Update RegEx to handle Ω without prefix

* Update RegEx to include %

* Handle plus/minus values as range

* Fix copy&paste error

* Change minimum value to negative

* Escape decimal point and add slash to valid unit characters to be able to pick up for example "ppm/°C"

* Skip empty values
2024-02-24 22:48:38 +01:00
Jan Böhmer
0d6ab793ce Fixed typos in README.md 2024-02-23 14:59:28 +01:00
Jan Böhmer
eab4d6f600 Added documentation about LCSC provider 2024-02-23 14:55:56 +01:00
Jan Böhmer
861c0174df Fixed more typos and grammar issues in docs 2024-02-23 14:26:17 +01:00
Jan Böhmer
5d68922f2e Fixed some typos and grammar issues in documentation 2024-02-23 13:56:23 +01:00
Cody Jacob
20ee16e3c0
Update eda_integration.md ()
spelling mistakes.
--grammerly was used
2024-02-23 13:13:15 +01:00
Jan Böhmer
20be83c345 Allow to configure the currency to get prices in for the LCSCProvider 2024-02-22 23:57:57 +01:00
Jan Böhmer
015b69e601 Merge branch 'lcsc-master' 2024-02-22 23:33:46 +01:00
Jan Böhmer
95ef97fcc2 Added possibility to enable/disable the LCSC provider 2024-02-22 23:32:12 +01:00
Jan Böhmer
d600cb4b9a Improved parsing of parameters. Values with unit and ranges get now properly parsed into the Part-DB structures 2024-02-22 23:22:52 +01:00
Jan Böhmer
0bbfaf9893 Improved typing and formatting of LCSC provider slightly 2024-02-22 22:41:09 +01:00
Nexrem
e3e562a154 Add LCSC Info Provider using their public API 2024-02-22 15:32:33 +01:00
Jan Böhmer
49034fabf2 Added phpstan template annotations to Voters to fix phpstan issues 2024-02-19 00:01:16 +01:00
Jan Böhmer
e9d03a0c95 Fixed "Loading..." message on datatables with no content 2024-02-18 20:31:31 +01:00
Jan Böhmer
d7e68605c9 Fixed row coloring issue with the new datatables 2024-02-18 20:10:52 +01:00
Jan Böhmer
51900b4b62 Fixed visual bugs introduced by the datatables upgrade 2024-02-18 19:58:13 +01:00
Jan Böhmer
67a1d06f37 Updated datatables version 2024-02-18 19:32:54 +01:00
Jan Böhmer
395af17d96 Updated dependencies 2024-02-18 19:25:52 +01:00
Jan Böhmer
88f4feaa81 Revert "Updated dependencies"
This reverts commit 4d4570701b.
2024-02-15 11:41:21 +01:00
Jan Böhmer
b6b2e44231 Dont prefetch settings page in navbar with turbos instaclick behavior as this page might not be accessible without additional authentication 2024-02-14 22:48:36 +01:00
Jan Böhmer
4d4570701b Updated dependencies 2024-02-14 22:46:01 +01:00
Jan Böhmer
178a825e93
New Crowdin updates ()
* New translations messages.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations security.en.xlf (Russian)
2024-02-12 18:37:42 +01:00
Jan Böhmer
f67ce2b0a3 Updated unifont to latest version 2024-02-08 22:48:50 +01:00
Jan Böhmer
10918ccb0d Merge branch 'turbo-upgrade' 2024-02-08 22:20:50 +01:00
Jan Böhmer
698fadc00c Upgraded markedjs package 2024-02-08 22:20:44 +01:00
Jan Böhmer
b16760988d Updated CKEDITOR to version 41 2024-02-08 22:17:00 +01:00
Jan Böhmer
7e3e1e2705 Use new turbo morph features 2024-02-08 22:05:57 +01:00
Jan Böhmer
e5e039a1ca Use hotwired/turbo 8 2024-02-08 22:01:05 +01:00
Jan Böhmer
43d8c3c208 Bumped version to 1.10.7 2024-02-06 22:50:08 +01:00
Jan Böhmer
3cc1fb40f0 Fixed problem that no datastructures with an parent element could be created/edited via API
This fixes issue .
The error was introduced when trying to allow the modification of attachments/parameters throught the parent element. We need a seperate write scope to the element, or we end up with an infinite loop.
2024-02-06 22:42:25 +01:00
Jan Böhmer
fea8109789 Fixed permission denied error, when accessing a user info page 2024-02-06 22:21:43 +01:00
Jan Böhmer
ff2aafabbd Fixed permission denied error on log details page for BOMEntries 2024-02-06 22:18:09 +01:00
Jan Böhmer
e27b15691a Fixed permission denied error, when trying to access the log details page of a LabelProfile 2024-02-06 22:09:02 +01:00
Jan Böhmer
47ddcca065 Fixed exception on label profile admin, if the label profile had an preview attachment 2024-02-06 21:59:53 +01:00
Jan Böhmer
0a7a7c979c Fixed problem with navbar height if search button has two words text 2024-02-06 21:53:13 +01:00
Jan Böhmer
b37ae97673 Added chinese to navbar language picker 2024-02-06 21:50:07 +01:00
Jan Böhmer
fa9e571b41 Merge branch 'dependabot/github_actions/codecov/codecov-action-4' 2024-02-06 21:47:30 +01:00
Jan Böhmer
f0fd3d8c1d Updated dependencies 2024-02-06 21:47:18 +01:00
dependabot[bot]
a1bdfab80f
Bump codecov/codecov-action from 3 to 4 ()
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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>
2024-02-06 21:44:36 +01:00
Jan Böhmer
0d5b7a0711
New translations messages.en.xlf (Chinese Simplified) () 2024-02-06 21:42:33 +01:00
Jan Böhmer
852107f7f6
New Crowdin updates ()
* New translations messages.en.xlf (Chinese Simplified)

* New translations validators.en.xlf (Chinese Simplified)

* New translations security.en.xlf (Chinese Simplified)

* New translations messages.en.xlf (Chinese Simplified)

* New translations security.en.xlf (Chinese Simplified)
2024-02-06 09:41:15 +01:00
dependabot[bot]
77b017381a
Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 17:15:54 +00:00
Jan Böhmer
75ce9c4370 Fixed problem with multi escaping in title tag
This should fix issue 
2024-02-03 00:50:38 +01:00
Jan Böhmer
a8d12c9c4c Updated dependencies 2024-02-03 00:40:37 +01:00
Jan Böhmer
3294ba5964 Mention czech and danish translation in README 2024-02-02 23:44:06 +01:00
Jan Böhmer
2bd3a6a745 Updated bs-treeview to 1.0.6 where the issue that child nodes of already expanded nodes dont get expanded on an select all
This fixes issue 
2024-02-02 23:42:36 +01:00
Jan Böhmer
0d3c670f9d Release version 1.10.6 2024-01-29 21:30:18 +01:00
Jan Böhmer
998b3ed075 Fixed typo in german translation 2024-01-29 21:29:14 +01:00
Jan Böhmer
a390b1e2a0 Upgraded dependencies 2024-01-29 21:28:21 +01:00
Jan Böhmer
fb493cc837 Fixed export of entities, if their name contained slash or other reserved charcters 2024-01-29 21:25:30 +01:00
Jan Böhmer
2f17d5f3f5 Fixed problem that trying to request nl language version of a page caused an exception
If the translation files dont contain any content, they are seen as invalid and cause this error. Therefore delete it.
2024-01-29 21:12:01 +01:00
Jan Böhmer
3a2f3ce1cc Fix problem with cache key generation if the username contained an @ sign or any other special character
This fixes issue 
2024-01-29 21:08:25 +01:00
Jan Böhmer
1b5eea4750 Register the unselect handler on turbo:load instead of visit, to avoid problems that the newly clicked treeview node gets unselected too. 2024-01-28 21:57:42 +01:00
Jan Böhmer
cb9e90ddc9 Load the link again when clicking a already selected treeview node, instead of just unselecting it 2024-01-28 21:48:32 +01:00
Jan Böhmer
03c7a71311 Release version 1.10.5 2024-01-28 21:20:05 +01:00
Jan Böhmer
e5b9ce9c25 Describe the creation of parameters/attachments workaround in API docs
Related to issue 
2024-01-28 20:59:13 +01:00
Jan Böhmer
c8cde94ee3 Fixed problem that attachment API responses, did not contain an @id and @context attribute 2024-01-28 20:26:03 +01:00
Jan Böhmer
aad62f2599 Disable POST operations for Attachment and AbstractParameter groups for now, as they can not work properly
As they work on abstract classes, they can not be initialized directly currently and you need to create them via a PATCH operation on their owning elements.
2024-01-28 19:53:33 +01:00
Jan Böhmer
7ae0fad356 Allow to create attachments and parameters via PATCH operations on their owning elemens as direct POST operations are not possible yet
This partly fixes issue 
2024-01-28 19:50:59 +01:00
Jan Böhmer
3548f12deb Added info on how to execute commands inside docker container to docs 2024-01-28 18:30:16 +01:00
Jan Böhmer
a161e3a520 Load the link again when clicking a already selected treeview node, instead of just unselecting it
This fixes the somehow unintuitive behavior described in issue 
2024-01-27 22:22:07 +01:00
Jan Böhmer
8018e8687b Unselect a treeview node, if the referenced page changes
Related to issue 
2024-01-27 21:12:21 +01:00
Jan Böhmer
e6ae73db00 Merge remote-tracking branch 'origin/l10n_master' 2024-01-27 20:33:31 +01:00
Jan Böhmer
d720cde693 Upgraded dependencies 2024-01-27 20:33:27 +01:00
Jan Böhmer
d111905ba0 Added hint to docs, that the mouser API dont provide all infos availble
See issue 
2024-01-27 20:31:12 +01:00
Jan Böhmer
4b41e932d2 New translations messages.en.xlf (Czech) 2024-01-26 09:44:31 +01:00
Jan Böhmer
ee3ad403fb Fixed exception if no content type or accept header are given 2024-01-26 00:36:14 +01:00
Jan Böhmer
2a7c131786 New translations messages.en.xlf (German) 2024-01-26 00:28:58 +01:00
Jan Böhmer
2861f4fdb8 New translations messages.en.xlf (English) 2024-01-26 00:16:07 +01:00
Jan Böhmer
6f24e7f077 Fixed phpunit tests caused by typo in Autowire attribute
This caused the whole thing to behave very very weirdly
2024-01-26 00:12:37 +01:00
Jan Böhmer
08e7e3f2bf Fixed phpstan issue 2024-01-25 23:41:43 +01:00
Jan Böhmer
f0519ae0b3 Return a 401 message with an JSON encoded body, if no authentication header is passed for an API request.
Also for browser requests, a flash message is shown in that case, prompting the user to authenticate.

This follows a suggestion from issue 
2024-01-25 23:35:42 +01:00
Jan Böhmer
631c364179 Added option to redirect https requests to http via Part-DB
This is especially useful for the heroku demo instance, where the webserver can not do the automatic redirect
2024-01-25 22:58:52 +01:00
Jan Böhmer
e8d670971e Merge remote-tracking branch 'origin/dependabot/github_actions/actions/cache-4' 2024-01-25 22:19:32 +01:00
Jan Böhmer
fa43ae91cb Merge remote-tracking branch 'origin/l10n_master' 2024-01-25 22:19:26 +01:00
Jan Böhmer
e8eb102feb Updated dependencies 2024-01-25 22:19:06 +01:00
Jan Böhmer
e4634ecc2c Fixed wrong header in API authentication docs
This fix issue 
2024-01-25 13:22:01 +01:00
Jan Böhmer
0307a50890 New translations messages.en.xlf (Czech) 2024-01-24 20:01:38 +01:00
Jan Böhmer
af1852bb3f
We are in development of 1.10.5 now 2024-01-24 11:57:17 +01:00
Jan Böhmer
046803b9c4
Added danish to prefered languages 2024-01-24 11:56:56 +01:00
Jan Böhmer
daabb9f55e
New Crowdin updates ()
* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations security.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)
2024-01-24 11:53:55 +01:00
dependabot[bot]
b177db82f5
Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 17:15:29 +00:00
Jan Böhmer
6b2ebd2434
New Crowdin updates ()
* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)
2024-01-22 11:52:37 +01:00
Jan Böhmer
ef6dd0febc Bumped version to 1.10.4 2024-01-16 23:06:20 +01:00
Jan Böhmer
2cb8cf72ba Merge remote-tracking branch 'origin/l10n_master' 2024-01-16 23:05:53 +01:00
Jan Böhmer
7430ecd7a6 Invalidate part related cache tags properly, if a part is created, changed or removed
This fixes the issue with KiCAD integration described in issue 
2024-01-16 22:49:01 +01:00
Jan Böhmer
dcf85f9d5e Add hint about bad unicode treatment in sqlite to dabase choosing guide
Related to issue 
2024-01-16 22:10:29 +01:00
Jan Böhmer
427a31f1b6 New translations messages.en.xlf (Czech) 2024-01-15 23:30:23 +01:00
Jan Böhmer
be4268c6cd New translations messages.en.xlf (Czech) 2024-01-15 22:32:00 +01:00
Jan Böhmer
a1660cd888 Bumped version to 1.10.3 2024-01-15 20:46:07 +01:00
Jan Böhmer
4645227a40 Upgraded dependencies 2024-01-15 20:44:51 +01:00
Jan Böhmer
1da2b9eecb Fixed javascript error caused by CKEDITOR
This was not really a problem, just annoying. But now it is fixed.
Fixes issue 
2024-01-15 20:39:27 +01:00
Jan Böhmer
f83d4103a6 Use a own marked instance for the MarkdownController instead of the global one
This prevents from configuring plugins multiple times which can lead to a heap overflow.
This fixes issue 
2024-01-15 20:19:10 +01:00
Jan Böhmer
9e28d39095 Upgraded markedjs 2024-01-15 20:05:16 +01:00
Jan Böhmer
6d838c41ce Merge remote-tracking branch 'origin/l10n_master' 2024-01-15 20:00:29 +01:00
Jan Böhmer
af0931a86e New translations messages.en.xlf (Czech) 2024-01-15 11:40:38 +01:00
Jan Böhmer
a4117d024e New translations messages.en.xlf (Czech) 2024-01-15 10:41:53 +01:00
Jan Böhmer
6b122d6040 New translations messages.en.xlf (Czech) 2024-01-15 09:41:58 +01:00
Jan Böhmer
6e66a2bf7a New translations messages.en.xlf (Danish) 2024-01-14 22:41:43 +01:00
Jan Böhmer
37edb73b3e New translations messages.en.xlf (Danish) 2024-01-14 21:41:53 +01:00
Jan Böhmer
a3b5243ffc Install mysqldump in docker, so the builtin backup solution can be used
Fixes issue 
2024-01-14 21:31:37 +01:00
Jan Böhmer
b12a2c6aab Added czech to language picker in navbar 2024-01-14 20:55:51 +01:00
Jan Böhmer
1379f896c9 Merge remote-tracking branch 'origin/l10n_master' 2024-01-14 20:54:52 +01:00
Jan Böhmer
0a31714717 Upgraded dependencies 2024-01-14 20:54:35 +01:00
Jan Böhmer
5f8d822e8a New translations messages.en.xlf (Czech) 2024-01-14 20:40:18 +01:00
Jan Böhmer
ff6624b7b3 New translations messages.en.xlf (Czech) 2024-01-14 17:30:21 +01:00
Jan Böhmer
645837dd67 New translations validators.en.xlf (Czech) 2024-01-14 16:30:19 +01:00
Jan Böhmer
eac8f4cd37 New translations messages.en.xlf (Czech) 2024-01-14 16:30:18 +01:00
Jan Böhmer
7e4e9138d3 New translations messages.en.xlf (Czech) 2024-01-14 15:30:21 +01:00
Jan Böhmer
ede7fa3149 New translations messages.en.xlf (Czech) 2024-01-14 12:30:17 +01:00
Jan Böhmer
aa1405a64b New translations messages.en.xlf (Czech) 2024-01-14 11:31:54 +01:00
Jan Böhmer
507c2640a9 New translations messages.en.xlf (Danish) 2024-01-14 01:40:19 +01:00
Jan Böhmer
f6e403d552 New translations messages.en.xlf (Danish) 2024-01-14 00:40:19 +01:00
Jan Böhmer
c1fe3b9d97 New translations messages.en.xlf (Danish) 2024-01-13 20:10:21 +01:00
Jan Böhmer
c85882a0b1 New translations messages.en.xlf (Danish) 2024-01-13 19:10:17 +01:00
Jan Böhmer
21203fc527 New translations messages.en.xlf (Danish) 2024-01-13 18:10:18 +01:00
Jan Böhmer
69cfe51db0 New translations messages.en.xlf (Danish) 2024-01-13 17:10:17 +01:00
Jan Böhmer
9a2133d176 New translations messages.en.xlf (Danish) 2024-01-13 14:21:52 +01:00
Jan Böhmer
f2861fbcf0 New translations messages.en.xlf (Danish) 2024-01-13 13:21:59 +01:00
Jan Böhmer
83d7de0a22
New Crowdin updates ()
* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)
2024-01-12 10:59:08 +01:00
Jan Böhmer
d80e9bab12
New Crowdin updates ()
* New translations messages.en.xlf (Danish)

* New translations validators.en.xlf (Danish)

* New translations security.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations validators.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Czech)

* New translations validators.en.xlf (Czech)

* New translations security.en.xlf (Czech)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Czech)

* New translations validators.en.xlf (Czech)

* New translations security.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 (Dutch)

* New translations messages.en.xlf (Dutch)
2024-01-12 10:01:44 +01:00
Jan Böhmer
d9f58b935a Fixed some issues when importing parameters from partkeepr
Before values were not properly imported, if there was not a normalized version yet and units were not correctly imported
2024-01-11 00:02:32 +01:00
Jan Böhmer
301ecf6c95 Do not import prices with zero price as pricedetails during partkeepr import
These are useless placeholders by partkeepr
2024-01-10 23:40:06 +01:00
Jan Böhmer
be1e17b3be Merge remote-tracking branch 'origin/l10n_master' 2024-01-10 23:19:29 +01:00
Jan Böhmer
86f19d6b25 Updated dependencies 2024-01-10 23:19:16 +01:00
Jan Böhmer
e2146332dc Fixed problems with invalid dates during PartKeepr import with MySQL
See issue 
2024-01-10 23:18:02 +01:00
Jan Böhmer
e283e2db57 New translations messages.en.xlf (Danish) 2024-01-10 22:50:23 +01:00
Jan Böhmer
22377daa8d New translations messages.en.xlf (Danish) 2024-01-10 21:50:24 +01:00
Jan Böhmer
498e0ae2c7 New translations messages.en.xlf (Russian) 2024-01-10 19:10:49 +01:00
Jan Böhmer
12ea949739 New translations messages.en.xlf (Russian) 2024-01-10 18:10:29 +01:00
Jan Böhmer
436e73a2e9 New translations messages.en.xlf (Russian) 2024-01-10 15:05:35 +01:00
Jan Böhmer
1b65dcfcf1 New translations messages.en.xlf (Russian) 2024-01-10 14:01:39 +01:00
Jan Böhmer
8095f1b995 New translations security.en.xlf (Danish) 2024-01-10 00:12:25 +01:00
Jan Böhmer
a20a3e65fa New translations validators.en.xlf (Danish) 2024-01-10 00:12:25 +01:00
Jan Böhmer
e8a047a28f New translations messages.en.xlf (Danish) 2024-01-10 00:12:24 +01:00
Jan Böhmer
d9ba631173 New translations messages.en.xlf (Russian) 2024-01-09 20:44:32 +01:00
Jan Böhmer
8dc0e014ba New translations messages.en.xlf (Russian) 2024-01-09 19:41:53 +01:00
Jan Böhmer
530476f917 New translations messages.en.xlf (Russian) 2024-01-08 13:30:36 +01:00
Jan Böhmer
8634ff26a7 New translations messages.en.xlf (Russian) 2024-01-08 12:31:58 +01:00
Jan Böhmer
c8f3acaa9d New translations messages.en.xlf (Russian) 2024-01-07 23:00:19 +01:00
Jan Böhmer
74ec7d4c9c New translations messages.en.xlf (Russian) 2024-01-07 22:00:21 +01:00
Jan Böhmer
72c21313dc New translations messages.en.xlf (Russian) 2024-01-07 21:00:18 +01:00
Jan Böhmer
b7660bc778 New translations messages.en.xlf (Russian) 2024-01-07 13:30:27 +01:00
Jan Böhmer
22b197012b New translations messages.en.xlf (Russian) 2024-01-07 12:30:17 +01:00
Jan Böhmer
78bd858ebb Bumped version to 1.10.2 2024-01-06 15:57:59 +01:00
Jan Böhmer
19819454fa Dont split up links when extracting parameters from notes and description
This partly fixes issue 
2024-01-06 15:14:07 +01:00
Jan Böhmer
26a4b57cfb Fixed tests related to PartNormalizer 2024-01-06 15:01:50 +01:00
Jan Böhmer
f3729ef9db Merge remote-tracking branch 'origin/l10n_master' 2024-01-06 01:07:20 +01:00
Jan Böhmer
ab09d319e9 Fixed wrong path for assets managed by webpack and loaded via twig asset() function.
This had also the effect that 2FA via webauthn were not working, as the request the invalid path resetted the webauthn request saved in session.
2024-01-06 01:06:56 +01:00
Jan Böhmer
df23ba07ba Fixed excpetion that no IRI could be generated if a new Part was created via POST operation via API
This was because the objectSerializer in PartNormalizer messed up the JSONLD IRI generation of the paramaters property. It tried to generate this IRI via the Part ressource class, which is not possible
2024-01-05 23:38:49 +01:00
Jan Böhmer
d20b668e87 Decorate error handler of API platform to show a better error message, if a user tries to cascade persist a new entity through an API operation 2024-01-05 23:10:46 +01:00
Jan Böhmer
f0646597fe Updated dependencies 2024-01-05 22:33:00 +01:00
Jan Böhmer
6d783fd581 New translations messages.en.xlf (Dutch) 2024-01-04 10:00:32 +01:00
Jan Böhmer
14fbf18733 New translations messages.en.xlf (Dutch) 2024-01-04 09:00:23 +01:00
Jan Böhmer
e35c7c496f New translations security.en.xlf (Dutch) 2024-01-03 16:00:42 +01:00
Jan Böhmer
a218b8fdd6 New translations validators.en.xlf (Dutch) 2024-01-03 16:00:41 +01:00
Jan Böhmer
1491672cf8 New translations messages.en.xlf (Dutch) 2024-01-03 16:00:40 +01:00
Jan Böhmer
f9894ffff7 New translations messages.en.xlf (Italian) 2023-12-30 19:00:21 +01:00
Jan Böhmer
7b565817d6 Disable update checking for tests 2023-12-24 15:50:42 +01:00
Jan Böhmer
a03b2ecf73 Use sqlite database for testing by default 2023-12-24 15:27:05 +01:00
Jan Böhmer
dd2f74e19e Merge branch 'master' of github.com:Part-DB/Part-DB-server 2023-12-24 15:21:04 +01:00
Jan Böhmer
c1dcaf926a Updated dependencies 2023-12-24 15:20:52 +01:00
dependabot[bot]
c116db9593
Bump actions/upload-artifact from 3 to 4 ()
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2023-12-24 15:03:39 +01:00
Jan Böhmer
1b92b9f171 Bump to 1.10.1 release 2023-12-12 22:42:53 +01:00
Jan Böhmer
17e79207f0 Suppress static analysis issue 2023-12-12 22:42:34 +01:00
Jan Böhmer
4d187741e0 Added the right copyright header to the foundation emails CSS asset 2023-12-12 22:39:44 +01:00
Jan Böhmer
85c3031fcd Upgraded dependencies 2023-12-12 22:30:45 +01:00
Jan Böhmer
a3e012d754 Added an event listener for console commands which shows a warning if the console is called as root or as wrong user
The idea is to prevent permission issues, by accidential calling the console wrong.
2023-12-12 22:23:19 +01:00
Jan Böhmer
60f8e754c2 Use the DEFAULT_URI setting for SAML base url instead of auto determining it.
This should fix issue 
2023-12-10 22:52:59 +01:00
Jan Böhmer
3e13a0d9d9 Disable update checking in tests to prevent false-negatives in github actions caused by github api blocking 2023-12-10 22:52:01 +01:00
Jan Böhmer
cd91dc8b5a Fixed wrong path for event log datatables, when accessing via a prefixed reverse proxy 2023-12-10 21:40:49 +01:00
Jan Böhmer
bcaf96ed59 Use a svg file as default user avatar instead of SVG. Also changed path generation logic
This should also fix the path issue described in issue 
2023-12-10 21:25:40 +01:00
Jan Böhmer
e2437d4c33 Updated dependencies 2023-12-10 00:40:39 +01:00
Jan Böhmer
3798217abc Use PDO constant instead of magic number in SetSQLModeMiddleware 2023-12-10 00:37:58 +01:00
Jan Böhmer
57423436ce Added options to use MySQL connection via SSL 2023-12-10 00:36:29 +01:00
Jan Böhmer
e824f6376a Mention update capability of part info providers in docs 2023-12-07 16:27:25 +01:00
Jan Böhmer
1f4bedc9b0
New Crowdin updates ()
* New translations messages.en.xlf (English)

* New translations validators.en.xlf (English)

* New translations security.en.xlf (English)

* New translations messages.en.xlf (German)
2023-12-07 13:32:29 +01:00
Jan Böhmer
aa66285909
Bumped to version 1.10.0 2023-12-07 13:19:07 +01:00
Jan Böhmer
c6229568c5 Added an workaround to github CI issue. setup php action has php-psr ext enabled somehow, which causes trouble. 2023-12-07 00:42:44 +01:00
Jan Böhmer
6110f5be40 Added an workaround to github CI issue. setup php action has php-psr ext enabled somehow, which causes trouble. 2023-12-07 00:41:07 +01:00
Jan Böhmer
ea9cc6723f Show a meaningful flash warning if trying to add/withdraw an amount of 0 instead of throwing an exception
Fixes issue 
2023-12-07 00:36:16 +01:00
Jan Böhmer
b5721dcfd0 Revert "Migrated deprecated doctrine event subsrcibers"
For some very very weird reasoning this cause issues with the ObjectNormalizer, which does not get an an serializer injected anymore.
When the EventLoggerSubscriber is a doctrine subscriber it seems that the serializer service is initialized (as its requested in constructor but not used) and later injected into the object normalizer.
When its an listener, this does not work anymore.
2023-12-07 00:17:27 +01:00
Jan Böhmer
d7383539ba Merge remote-tracking branch 'origin/l10n_master' 2023-12-06 14:00:29 +01:00
Jan Böhmer
11cdc282d2 Mention KiCad integration in README 2023-12-06 14:00:15 +01:00
Jan Böhmer
b23f59271b New translations messages.en.xlf (German) 2023-12-06 13:11:47 +01:00
Jan Böhmer
999fe48a31 Removed SnakeCasePropertyAccessor as this fix is now part of the symfony property-info component 2023-12-06 00:05:37 +01:00
Jan Böhmer
963079afbf Fixed static analysis issue 2023-12-06 00:00:32 +01:00
Jan Böhmer
a6d508205b Fixed SQLite regex test 2023-12-06 00:00:20 +01:00
Jan Böhmer
fdf52a59fe Fixed error in sqlite regex implementation in certain edge cases 2023-12-05 23:51:54 +01:00
Jan Böhmer
dd0f8ec97c Implement the SQLite extension for doctrine via a middleware instead of an deprecated event listener 2023-12-05 23:50:07 +01:00
Jan Böhmer
641b47b189 Updated omines/datatables-bundle 2023-12-05 23:36:26 +01:00
Jan Böhmer
e1120dbfa7 Upgraded own bundle dependencies to fix some deprecations 2023-12-05 23:30:59 +01:00
Jan Böhmer
f9d47e0865 Migrated deprecated doctrine event subscribers to doctrine event listeners 2023-12-05 22:08:07 +01:00
Jan Böhmer
d991643b0e Removed deprecated google 2FA option 2023-12-05 22:07:48 +01:00
Jan Böhmer
8b8079a6f1 Fixed deprecations 2023-12-05 21:55:20 +01:00
Jan Böhmer
5faeb5dd56 Fixed problem with loading Fixtures on MySQL in combination with savepoints
We must now load the fixtures using custom command partdb:fixtures:load
2023-12-05 21:33:29 +01:00
Jan Böhmer
5b3156ccf4 Merge branch 'symfony6.4-upgrade' 2023-12-04 00:04:57 +01:00
Jan Böhmer
dc355773c9 Updated tecnickcom/tc-lib-barcode 2023-12-04 00:01:47 +01:00
Jan Böhmer
1daf556206 Updated brick/math 2023-12-04 00:00:00 +01:00
Jan Böhmer
1911c62edd Upgraded DAMA doctrine test bundle 2023-12-03 23:58:19 +01:00
Jan Böhmer
2fe2740b62 Updated dompdf 2023-12-03 23:40:16 +01:00
Jan Böhmer
4d7d624033 Updated web-auth/webauthn-symfony-bundle recipe 2023-12-03 23:32:34 +01:00
Jan Böhmer
0abe3f0e61 Updated webpack-encore-bundle recipe 2023-12-03 23:31:34 +01:00
Jan Böhmer
77a6204798 Updated symfony/translation bundle 2023-12-03 23:28:26 +01:00
Jan Böhmer
64af418be2 Updated security-bundle recipe 2023-12-03 23:27:18 +01:00
Jan Böhmer
15411d6c81 Updated phpunit-bridge recipe 2023-12-03 23:24:33 +01:00
Jan Böhmer
fd645a0bce Updated symfony-framework-bundle recipe
This removes the annotation reader services, which are not needed anymore
2023-12-03 23:04:35 +01:00
Jan Böhmer
f888028823 Updated phpstan recipe 2023-12-03 22:46:20 +01:00
Jan Böhmer
abc554c7b8 Updated doctrine recipe 2023-12-03 22:44:55 +01:00
Jan Böhmer
07cc8a9534 Updated API platform recipe 2023-12-03 22:43:42 +01:00
Jan Böhmer
60ecbc7c32 Upgraded all symfony components to 6.4 2023-12-03 22:18:44 +01:00
Jan Böhmer
b7af538cbf Updated symbols list, to include symbols containing special chars 2023-12-03 22:12:25 +01:00
Jan Böhmer
49c8b8003b New translations messages.en.xlf (Italian) 2023-12-03 21:43:16 +01:00
Jan Böhmer
65d04d4afb New translations messages.en.xlf (English) 2023-12-03 20:43:38 +01:00
Jan Böhmer
a449e82a22 New translations messages.en.xlf (Italian) 2023-12-03 20:43:30 +01:00
Jan Böhmer
34fd611946 Merge branch 'kicad-api' 2023-12-03 20:30:58 +01:00
Jan Böhmer
62cbc168fb Updated documentation about new visibility changes. 2023-12-03 20:30:49 +01:00
Jan Böhmer
74d1904df1 Only show parts and their categories in KiCad if they have useful info defined on them 2023-12-03 20:22:47 +01:00
Jan Böhmer
7d69d6ba30 Changed logic of invisible to a (forced) visibility field 2023-12-03 15:29:17 +01:00
Jan Böhmer
bc37d11f13 Fixed static analysis issue 2023-12-03 15:11:06 +01:00
Jan Böhmer
1825080d9e Added documentation about the EDA_KICAD_CATEGORY_DEPTH env 2023-12-03 15:07:41 +01:00
Jan Böhmer
6926f6b233 Allow to show all parts of all categories in a single KiCad category by setting EDA_KICAD_CATEGORY_DEPTH to -1 2023-12-03 15:03:00 +01:00
Jan Böhmer
459ae163da Restrict the depth of the category tree shown inside KiCAD to improve performance
The depth can be controlled via the EDA_KICAD_CATEGORY_DEPTH env
2023-12-03 14:42:33 +01:00
Jan Böhmer
fc7b1e6d31 Merge branch 'master' into kicad-api 2023-12-03 14:15:44 +01:00
Jan Böhmer
3198e5d750 New translations messages.en.xlf (Italian) 2023-12-03 09:40:17 +01:00
Jan Böhmer
f31cac580a New translations messages.en.xlf (Italian) 2023-12-03 08:40:16 +01:00
Jan Böhmer
753a12765b New translations messages.en.xlf (English) 2023-12-03 01:31:09 +01:00
Jan Böhmer
cbffc485f3 Updated dependencies 2023-12-03 01:20:39 +01:00
Jan Böhmer
c15ddcdf9f We are in development of Part-DB 1.10.0 now 2023-12-03 01:18:07 +01:00
Jan Böhmer
264ed3aaab Merge branch 'kicad-api' 2023-12-03 01:17:39 +01:00
Jan Böhmer
61a5ebde6b Show the correct KICad API endpoint on the user settings page. 2023-12-03 01:16:16 +01:00
Jan Böhmer
f4b4f14a67 Added ability to modify the EDA data via the Part-DB API 2023-12-03 00:57:11 +01:00
Jan Böhmer
9994dbd9db Added tests to test the KICad API endpoints 2023-12-03 00:43:34 +01:00
Jan Böhmer
d976865e7a Fixed static analysis issues 2023-12-03 00:05:41 +01:00
Jan Böhmer
0445b87567 Added EDA column migration for SQLite 2023-12-03 00:00:46 +01:00
Jan Böhmer
64c86fa11d Show EDA metadata in extended info table of part info page 2023-12-02 23:55:42 +01:00
Jan Böhmer
548339911f Added info about autocomplete to documentation 2023-12-02 19:57:55 +01:00
Jan Böhmer
e914a32894 Updated KiCad library autocomplete lists 2023-12-02 19:54:55 +01:00
Jan Böhmer
f28e369c01 Added an autocomplete feature for Kicad symbols and footprints 2023-12-02 19:40:26 +01:00
Jan Böhmer
30b2c8b841 Added forms to change EDA infos of footprints and categories 2023-12-01 22:47:05 +01:00
Jan Böhmer
b5c7a789a2 Made EDA form for parts prettier 2023-12-01 22:36:14 +01:00
Jan Böhmer
168b4f6c15 Started to write documentation on KiCAD integration 2023-12-01 14:09:19 +01:00
Jan Böhmer
bf5ed030fe Use the EDAInfo data to send info to KiCAD 2023-11-30 19:34:50 +01:00
Jan Böhmer
b76b2740a7 Use Embeddables for EDACategoryInfo instead of a json column 2023-11-30 19:13:32 +01:00
Jan Böhmer
d5f002ac20 Added basic ability to store EDA Data in a Part
But that might change, as it is currently not ideal
2023-11-30 12:54:30 +01:00
Jan Böhmer
2ec1a10623 Add various info from the Part-DB database to the KICAD parts 2023-11-29 21:28:06 +01:00
Jan Böhmer
ee69f9e576 Cache the results for the parts of a category for KiCAD 2023-11-29 20:57:11 +01:00
Jan Böhmer
b7af08503c Refactored cache tags and invalidation 2023-11-29 20:49:16 +01:00
Jan Böhmer
08a1ce5f64 Moved some logic from KICAD controller into its own service 2023-11-29 20:17:17 +01:00
Jan Böhmer
22f8448c65 Added an very basic API implementation for KICAD 2023-11-28 14:24:22 +01:00
Jan Böhmer
6b0f0d31b9 Allow to authenticate using Authorization: Token header, which the KiCAD API uses 2023-11-28 14:24:22 +01:00
Jan Böhmer
feca20ef77 Added a hint about quotes and TRUSTED_PROXIES setting in docker-compose example 2023-11-28 13:44:17 +01:00
Jan Böhmer
9e04a3405f New translations messages.en.xlf (English) 2023-11-28 00:22:20 +01:00
1009 changed files with 193457 additions and 31660 deletions
.docker
.dockerignore.editorconfig.env.env.dev.env.test
.github/workflows
.gitignoreDockerfileDockerfile-frankenphpMakefileREADME.mdVERSION
assets
bin
composer.jsoncomposer.lock
config

View file

@ -0,0 +1,55 @@
{
{$CADDY_GLOBAL_OPTIONS}
frankenphp {
{$FRANKENPHP_CONFIG}
}
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm
order mercure after encode
order vulcain after reverse_proxy
order php_server before file_server
}
{$CADDY_EXTRA_CONFIG}
{$SERVER_NAME:localhost} {
log {
# Redact the authorization query parameter that can be set by Mercure
format filter {
wrap console
fields {
uri query {
replace authorization REDACTED
}
}
}
}
root * /app/public
encode zstd br gzip
mercure {
# Transport to use (default to Bolt)
transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db}
# Publisher JWT key
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG}
# Subscriber JWT key
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG}
# Allow anonymous subscribers (double-check that it's what you want)
anonymous
# Enable the subscription API (double-check that it's what you want)
subscriptions
# Extra directives
{$MERCURE_EXTRA_DIRECTIVES}
}
vulcain
{$CADDY_SERVER_EXTRA_DIRECTIVES}
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
header ?Permissions-Policy "browsing-topics=()"
php_server
}

View file

@ -0,0 +1,5 @@
; See https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
; See https://github.com/docker/for-linux/issues/264
; The `client_host` below may optionally be replaced with `discover_client_host=yes`
; Add `start_with_request=yes` to start debug session on each request
xdebug.client_host = host.docker.internal

View file

@ -0,0 +1,18 @@
expose_php = 0
date.timezone = UTC
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0
; https://symfony.com/doc/current/performance.html
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.enable_file_override = 1
memory_limit = 256M
upload_max_filesize=256M
post_max_size=300M

View file

@ -0,0 +1,2 @@
opcache.preload_user = root
opcache.preload = /app/config/preload.php

View file

@ -0,0 +1,60 @@
#!/bin/sh
set -e
if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
# Install the project the first time PHP is started
# After the installation, the following block can be deleted
if [ ! -f composer.json ]; then
rm -Rf tmp/
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install
cd tmp
cp -Rp . ..
cd -
rm -Rf tmp/
composer require "php:>=$PHP_VERSION" runtime/frankenphp-symfony
composer config --json extra.symfony.docker 'true'
if grep -q ^DATABASE_URL= .env; then
echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build -d --wait"
sleep infinity
fi
fi
if [ -z "$(ls -A 'vendor/' 2>/dev/null)" ]; then
composer install --prefer-dist --no-progress --no-interaction
fi
if grep -q ^DATABASE_URL= .env; then
echo "Waiting for database to be ready..."
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(php bin/console dbal:run-sql -q "SELECT 1" 2>&1); do
if [ $? -eq 255 ]; then
# If the Doctrine command exits with 255, an unrecoverable error occurred
ATTEMPTS_LEFT_TO_REACH_DATABASE=0
break
fi
sleep 1
ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1))
echo "Still waiting for database to be ready... Or maybe the database is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left."
done
if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then
echo "The database is not up or not reachable:"
echo "$DATABASE_ERROR"
exit 1
else
echo "The database is now ready and reachable"
fi
if [ "$( find ./migrations -iname '*.php' -print -quit )" ]; then
php bin/console doctrine:migrations:migrate --no-interaction
fi
fi
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
fi
exec docker-php-entrypoint "$@"

View file

@ -0,0 +1,4 @@
worker {
file ./public/index.php
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime
}

View file

@ -39,8 +39,50 @@ if [ -d /var/www/html/var/db ]; then
fi
fi
# Start PHP-FPM
service php8.1-fpm start
# Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile)
php-fpmPHP_VERSION -F &
# Run migrations if automigration is enabled via env variable DB_AUTOMIGRATE
if [ "$DB_AUTOMIGRATE" = "true" ]; then
echo "Waiting for database to be ready..."
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(sudo -E -u www-data php bin/console dbal:run-sql -q "SELECT 1" 2>&1); do
if [ $? -eq 255 ]; then
# If the Doctrine command exits with 255, an unrecoverable error occurred
ATTEMPTS_LEFT_TO_REACH_DATABASE=0
break
fi
sleep 1
ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1))
echo "Still waiting for database to be ready... Or maybe the database is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left."
done
if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then
echo "The database is not up or not reachable:"
echo "$DATABASE_ERROR"
exit 1
else
echo "The database is now ready and reachable"
fi
# Check if there are any available migrations to do, by executing doctrine:migrations:up-to-date
# and checking if the exit code is 0 (up to date) or 1 (not up to date)
if sudo -E -u www-data php bin/console doctrine:migrations:up-to-date --no-interaction; then
echo "Database is up to date, no migrations necessary."
else
echo "Migrations available..."
echo "Do backup of database..."
sudo -E -u www-data mkdir -p /var/www/html/uploads/.automigration-backup/
# Backup the database
sudo -E -u www-data php bin/console partdb:backup -n --database /var/www/html/uploads/.automigration-backup/backup-$(date +%Y-%m-%d_%H-%M-%S).zip
# Check if there are any migration files
sudo -E -u www-data php bin/console doctrine:migrations:migrate --no-interaction
fi
fi
# first arg is `-f` or `--some-option` (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/docker-php-entrypoint)
if [ "${1#-}" != "$1" ]; then

View file

@ -24,25 +24,6 @@
ErrorLog ${APACHE_LOG_DIR}/error.log
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
PassEnv TRUSTED_PROXIES TRUSTED_HOSTS LOCK_DSN
PassEnv DATABASE_URL ENFORCE_CHANGE_COMMENTS_FOR
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
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the

View file

@ -5,6 +5,8 @@ tests/
docs/
.git
/public/media/*
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
@ -42,3 +44,39 @@ yarn-error.log
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
### From frankenphp
**/*.log
**/*.php~
**/*.dist.php
**/*.dist
**/*.cache
**/._*
**/.dockerignore
**/.DS_Store
**/.git/
**/.gitattributes
**/.gitignore
**/.gitmodules
**/compose.*.yaml
**/compose.*.yml
**/compose.yaml
**/compose.yml
**/docker-compose.*.yaml
**/docker-compose.*.yml
**/docker-compose.yaml
**/docker-compose.yml
**/Dockerfile
**/Thumbs.db
.github/
public/bundles/
var/
vendor/
.editorconfig
.env.*.local
.env.local
.env.local.php
.env.test

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

145
.env
View file

@ -14,41 +14,27 @@ DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
# Uncomment this line (and comment the line above to use a MySQL database
#DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7
# Set this value to 1, if you want to use SSL to connect to the MySQL server. It will be tried to use the CA certificate
# otherwise a CA bundle shipped with PHP will be used.
# Leave it at 0, if you do not want to use SSL or if your server does not support it
DATABASE_MYSQL_USE_SSL_CA=0
# Set this value to 0, if you don't want to verify the CA certificate of the MySQL server
# Only do this, if you know what you are doing!
DATABASE_MYSQL_SSL_VERIFY_CERT=1
# Emulate natural sorting of strings even on databases that do not support it (like SQLite, MySQL or MariaDB < 10.7)
# This can be slow on big databases and might have some problems and quirks, so use it with caution
DATABASE_EMULATE_NATURAL_SORT=0
###################################################################################
# General settings
###################################################################################
# The language to use serverwide as default (en, de, ru, etc.)
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 to the website in emails and so on
# 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/"
# 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
###################################################################################
@ -65,21 +51,6 @@ EMAIL_SENDER_NAME="Part-DB Mailer"
# Set this to 1 to allow reset of a password per email
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
###################################################################################
@ -89,80 +60,12 @@ 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...
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
# Set this to 1 to get gross prices (including VAT) instead of net prices
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'
###################################################################################
# SAML Single sign on-settings
###################################################################################
# Set this to 1 to enable SAML single sign on
# Be also sure to set the correct values for DEFAULT_URI
SAML_ENABLED=0
# Set to 1, if your Part-DB installation is behind a reverse proxy and you want to use SAML
@ -207,16 +110,11 @@ DEMO_MODE=0
# In that case all URL contains the index.php front controller in URL
NO_URL_REWRITE_AVAILABLE=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=""
APP_ENV=prod
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
# 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
# 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
# Set the trusted IPs here, when using an reverse proxy
#TRUSTED_PROXIES=127.0.0.0/8,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
@ -232,3 +130,8 @@ LOCK_DSN=flock
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###
###> symfony/framework-bundle ###
APP_ENV=prod
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
###< symfony/framework-bundle ###

4
.env.dev Normal file
View file

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

View file

@ -5,5 +5,11 @@ SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="sqlite:///%kernel.project_dir%/var/app_test.db"
# Doctrine automatically adds an _test suffix to database name in test env
DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db
#DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db
# Disable update checks, as tests would fail, when github is not reachable
CHECK_FOR_UPDATES=0
INSTANCE_NAME="Part-DB"

View file

@ -1,5 +1,8 @@
name: Build assets artifact
permissions:
contents: read
on:
push:
branches:
@ -19,7 +22,7 @@ jobs:
APP_ENV: prod
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
@ -27,14 +30,14 @@ jobs:
php-version: '8.2'
coverage: none
ini-values: xdebug.max_nesting_level=1000
extensions: mbstring, intl, gd, xsl, gmp, bcmath
extensions: mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@ -48,7 +51,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@ -57,9 +60,9 @@ jobs:
${{ runner.os }}-yarn-
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '18'
node-version: '20'
- name: Install yarn dependencies
run: yarn install
@ -77,13 +80,13 @@ jobs:
run: zip -r /tmp/partdb_assets.zip public/build/ vendor/
- name: Upload assets artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: Only dependencies and built assets
path: /tmp/partdb_assets.zip
- name: Upload full artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: Full Part-DB including dependencies and built assets
path: /tmp/partdb_with_assets.zip

View file

@ -1,5 +1,8 @@
name: Docker Image Build
permissions:
contents: read
on:
#schedule:
# - cron: '0 10 * * *' # everyday at 10am
@ -17,7 +20,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
-
name: Docker meta
id: docker_meta
@ -65,7 +68,7 @@ jobs:
-
name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7

80
.github/workflows/docker_frankenphp.yml vendored Normal file
View file

@ -0,0 +1,80 @@
name: Docker Image Build (FrankenPHP)
permissions:
contents: read
on:
#schedule:
# - cron: '0 10 * * *' # everyday at 10am
push:
branches:
- '**'
- '!l10n_**'
tags:
- 'v*.*.*'
- 'v*.*.*-**'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
-
name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
partdborg/part-db
# Mark the image build from master as latest (as we dont have really releases yet)
tags: |
type=edge,branch=master
type=ref,event=branch,
type=ref,event=tag,
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=Part-DB
org.opencontainers.image.description=Part-DB is a web application for managing electronic components and your inventory.
org.opencontainers.image.url=https://github.com/Part-DB/Part-DB-server
org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-server
org.opencontainers.image.authors=Jan Böhmer
org.opencontainers.licenses=AGPL-3.0-or-later
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: 'arm64,arm'
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-frankenphp
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -1,5 +1,8 @@
name: Static analysis
permissions:
contents: read
on:
push:
branches:
@ -16,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
@ -24,14 +27,14 @@ jobs:
php-version: '8.2'
coverage: none
ini-values: xdebug.max_nesting_level=1000
extensions: mbstring, intl, gd, xsl, gmp, bcmath
extensions: mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

View file

@ -1,5 +1,8 @@
name: PHPUnit Tests
permissions:
contents: read
on:
push:
branches:
@ -16,9 +19,10 @@ jobs:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
db-type: [ 'mysql', 'sqlite' ]
php-versions: ['8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql', 'sqlite', 'postgres' ]
env:
# Note that we set DATABASE URL later based on our db-type matrix value
@ -26,18 +30,23 @@ jobs:
SYMFONY_DEPRECATIONS_HELPER: disabled
PHP_VERSION: ${{ matrix.php-versions }}
DB_TYPE: ${{ matrix.db-type }}
CHECK_FOR_UPDATES: false # Disable update checks for tests
steps:
- name: Set Database env for MySQL
run: echo "DATABASE_URL=mysql://root:root@127.0.0.1:3306/test" >> $GITHUB_ENV
run: echo "DATABASE_URL=mysql://root:root@127.0.0.1:3306/partdb?serverVersion=8.0.35" >> $GITHUB_ENV
if: matrix.db-type == 'mysql'
- name: Set Database env for SQLite
run: echo "DATABASE_URL="sqlite:///%kernel.project_dir%/var/app_test.db"" >> $GITHUB_ENV
if: matrix.db-type == 'sqlite'
- name: Set Database env for PostgreSQL
run: echo "DATABASE_URL=postgresql://postgres:postgres @127.0.0.1:5432/partdb?serverVersion=14&charset=utf8" >> $GITHUB_ENV
if: matrix.db-type == 'postgres'
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
@ -45,10 +54,19 @@ jobs:
php-version: ${{ matrix.php-versions }}
coverage: pcov
ini-values: xdebug.max_nesting_level=1000
extensions: mbstring, intl, gd, xsl, gmp, bcmath
extensions: mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
- name: Start MySQL
run: sudo systemctl start mysql.service
if: matrix.db-type == 'mysql'
# Replace the scram-sha-256 with trust for host connections, to avoid password authentication
- name: Start PostgreSQL
run: |
sudo sed -i 's/^\(host.*all.*all.*\)scram-sha-256/\1trust/' /etc/postgresql/14/main/pg_hba.conf
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
if: matrix.db-type == 'postgres'
#- name: Setup MySQL
# uses: mirromutth/mysql-action@v1.1
@ -63,7 +81,7 @@ jobs:
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@ -74,7 +92,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@ -86,9 +104,9 @@ jobs:
run: composer install --prefer-dist --no-progress
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '18'
node-version: '20'
- name: Install yarn dependencies
run: yarn install
@ -98,24 +116,20 @@ jobs:
- name: Create DB
run: php bin/console --env test doctrine:database:create --if-not-exists -n
if: matrix.db-type == 'mysql'
# Checkinf for existance is not supported for sqlite, so do it without it
- name: Create DB
run: php bin/console --env test doctrine:database:create -n
if: matrix.db-type == 'sqlite'
if: matrix.db-type == 'mysql' || matrix.db-type == 'postgres'
- name: Do migrations
run: php bin/console --env test doctrine:migrations:migrate -n
# Use our own custom fixtures loading command to circumvent some problems with reset the autoincrement values
- name: Load fixtures
run: php bin/console --env test doctrine:fixtures:load -n
run: php bin/console --env test partdb:fixtures:load -n
- name: Run PHPunit and generate coverage
run: ./bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
env_vars: PHP_VERSION,DB_TYPE
token: ${{ secrets.CODECOV_TOKEN }}
@ -133,11 +147,11 @@ jobs:
- name: Test check-requirements command
run: php bin/console partdb:check-requirements -n
- name: Test partdb:backup command
run: php bin/console partdb:backup -n --full /tmp/test_backup.zip
- name: Test legacy Part-DB import
run: bash .github/assets/legacy_import/test_legacy_import.sh
if: matrix.db-type == 'mysql' && matrix.php-versions == '8.2'
env:
DATABASE_URL: mysql://root:root@localhost:3306/legacy_db

6
.gitignore vendored
View file

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

View file

@ -1,22 +1,64 @@
FROM debian:bullseye-slim
ARG BASE_IMAGE=debian:bookworm-slim
ARG PHP_VERSION=8.4
FROM ${BASE_IMAGE} AS base
ARG PHP_VERSION
# Install needed dependencies for PHP build
#RUN apt-get update && apt-get install -y pkg-config curl libcurl4-openssl-dev libicu-dev \
# libpng-dev libjpeg-dev libfreetype6-dev gnupg zip libzip-dev libjpeg62-turbo-dev libonig-dev libxslt-dev libwebp-dev vim \
# && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get -y install apt-transport-https lsb-release ca-certificates curl zip \
RUN apt-get update && apt-get -y install \
apt-transport-https \
lsb-release \
ca-certificates \
curl \
zip \
mariadb-client \
postgresql-client \
&& curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \
&& sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \
&& apt-get update && apt-get upgrade -y \
&& apt-get install -y apache2 php8.1 php8.1-fpm 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 gpg \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
&& apt-get install -y \
apache2 \
php${PHP_VERSION} \
php${PHP_VERSION}-fpm \
php${PHP_VERSION}-opcache \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-gd \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-xsl \
php${PHP_VERSION}-sqlite3 \
php${PHP_VERSION}-mysql \
php${PHP_VERSION}-pgsql \
gpg \
sudo \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/* \
# Create workdir and set permissions if directory does not exists
RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html
&& mkdir -p /var/www/html \
&& chown -R www-data:www-data /var/www/html \
# delete the "index.html" that installing Apache drops in here
&& rm -rvf /var/www/html/*
# Install node and yarn
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 && \
curl -sL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get update && apt-get install -y \
nodejs \
yarn \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV APACHE_CONFDIR=/etc/apache2
ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars
# Configure apache 2 (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/Dockerfile)
# generically convert lines like
@ -27,8 +69,6 @@ RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html
# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...")
RUN sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"; \
set -eux; . "$APACHE_ENVVARS"; \
# delete the "index.html" that installing Apache drops in here
rm -rvf /var/www/html/*; \
\
# logs should go to stdout / stderr
ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"; \
@ -36,82 +76,87 @@ RUN sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"
ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"; \
chown -R --no-dereference "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$APACHE_LOG_DIR";
# Enable php-fpm
RUN a2enmod proxy_fcgi setenvif && a2enconf php8.1-fpm
# ---
FROM scratch AS apache-config
ARG PHP_VERSION
# Configure php-fpm to log to stdout of the container (stdout of PID 1)
# We have to use /proc/1/fd/1 because /dev/stdout or /proc/self/fd/1 does not point to the container stdout (because we use apache as entrypoint)
# We also disable the clear_env option to allow the use of environment variables in php-fpm
RUN { \
echo '[global]'; \
echo 'error_log = /proc/1/fd/1'; \
echo; \
echo '[www]'; \
echo 'access.log = /proc/1/fd/1'; \
echo 'catch_workers_output = yes'; \
echo 'decorate_workers_output = no'; \
echo 'clear_env = no'; \
} | tee "/etc/php/8.1/fpm/pool.d/zz-docker.conf"
COPY <<EOF /etc/php/${PHP_VERSION}/fpm/pool.d/zz-docker.conf
[global]
error_log = /proc/1/fd/1
[www]
access.log = /proc/1/fd/1
catch_workers_output = yes
decorate_workers_output = no
clear_env = no
EOF
# PHP files should be handled by PHP, and should be preferred over any other file type
RUN { \
echo '<FilesMatch \.php$>'; \
echo '\tSetHandler application/x-httpd-php'; \
echo '</FilesMatch>'; \
echo; \
echo 'DirectoryIndex disabled'; \
echo 'DirectoryIndex index.php index.html'; \
echo; \
echo '<Directory /var/www/>'; \
echo '\tOptions -Indexes'; \
echo '\tAllowOverride All'; \
echo '</Directory>'; \
} | tee "$APACHE_CONFDIR/conf-available/docker-php.conf" \
&& a2enconf docker-php
COPY <<EOF /etc/apache2/conf-available/docker-php.conf
<FilesMatch \\.php$>
SetHandler application/x-httpd-php
</FilesMatch>
DirectoryIndex disabled
DirectoryIndex index.php index.html
<Directory /var/www/>
Options -Indexes
AllowOverride All
</Directory>
EOF
# Enable opcache and configure it recommended for symfony (see https://symfony.com/doc/current/performance.html)
RUN \
{ \
echo 'opcache.memory_consumption=256'; \
echo 'opcache.max_accelerated_files=20000'; \
echo 'opcache.validate_timestamp=0'; \
# Configure Realpath cache for performance
echo 'realpath_cache_size=4096K'; \
echo 'realpath_cache_ttl=600'; \
} > /etc/php/8.1/fpm/conf.d/symfony-recommended.ini
COPY <<EOF /etc/php/${PHP_VERSION}/fpm/conf.d/symfony-recommended.ini
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.validate_timestamp=0
# Configure Realpath cache for performance
realpath_cache_size=4096K
realpath_cache_ttl=600
EOF
# Increase upload limit and enable preloading
RUN \
{ \
echo 'upload_max_filesize=256M'; \
echo 'post_max_size=300M'; \
echo 'opcache.preload_user=www-data'; \
echo 'opcache.preload=/var/www/html/config/preload.php'; \
} > /etc/php/8.1/fpm/conf.d/partdb.ini
# 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
upload_max_filesize=256M
post_max_size=300M
;opcache.preload_user=www-data
;opcache.preload=/var/www/html/config/preload.php
log_limit=8096
EOF
# Install node and yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get update && apt-get install -y nodejs yarn && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf
# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# ---
FROM base
ARG PHP_VERSION
# Set working dir
WORKDIR /var/www/html
COPY --from=apache-config / /
COPY --chown=www-data:www-data . .
# Setup apache2
RUN a2dissite 000-default.conf
COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf
RUN a2ensite symfony.conf
RUN a2enmod rewrite
RUN a2dissite 000-default.conf && \
a2ensite symfony.conf && \
# Enable php-fpm
a2enmod proxy_fcgi setenvif && \
a2enconf php${PHP_VERSION}-fpm && \
a2enconf docker-php && \
a2enmod rewrite
# Install composer and yarn dependencies for Part-DB
USER www-data
RUN composer install -a --no-dev && composer clear-cache
RUN yarn install --network-timeout 600000 && yarn build && yarn cache clean && rm -rf node_modules/
RUN composer install -a --no-dev && \
composer clear-cache
RUN yarn install --network-timeout 600000 && \
yarn build && \
yarn cache clean && \
rm -rf node_modules/
# Use docker env to output logs to stdout
ENV APP_ENV=docker
@ -119,10 +164,12 @@ ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db"
USER root
# Copy entrypoint to /usr/local/bin and make it executable
RUN cp ./.docker/partdb-entrypoint.sh /usr/local/bin/partdb-entrypoint.sh && chmod +x /usr/local/bin/partdb-entrypoint.sh
# Copy apache2-foreground to /usr/local/bin and make it executable
RUN cp ./.docker/apache2-foreground /usr/local/bin/apache2-foreground && chmod +x /usr/local/bin/apache2-foreground
# Replace the php version placeholder in the entry point, with our php version
RUN sed -i "s/PHP_VERSION/${PHP_VERSION}/g" ./.docker/partdb-entrypoint.sh
# Copy entrypoint and apache2-foreground to /usr/local/bin and make it executable
RUN install ./.docker/partdb-entrypoint.sh /usr/local/bin && \
install ./.docker/apache2-foreground /usr/local/bin
ENTRYPOINT ["partdb-entrypoint.sh"]
CMD ["apache2-foreground"]

121
Dockerfile-frankenphp Normal file
View file

@ -0,0 +1,121 @@
FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream
RUN apt-get update && apt-get -y install \
curl \
ca-certificates \
mariadb-client \
postgresql-client \
file \
acl \
git \
gettext \
gnupg \
zip \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
RUN set -eux; \
# Prepare keyrings directory
mkdir -p /etc/apt/keyrings; \
\
# Import Yarn GPG key
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg \
| 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
RUN set -eux; \
install-php-extensions \
@composer \
apcu \
intl \
opcache \
zip \
pdo_mysql \
pdo_sqlite \
pdo_pgsql \
gd \
bcmath \
xsl \
;
# Copy config files for php and caddy
COPY --link .docker/frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/
COPY --chmod=755 .docker/frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
COPY --link .docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
COPY --link .docker/frankenphp/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/
COPY --link .docker/frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile
ENV FRANKENPHP_CONFIG="import worker.Caddyfile"
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Install composer
ENV COMPOSER_ALLOW_SUPERUSER=1
#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create workdir and set permissions if directory does not exists
WORKDIR /app
# prevent the reinstallation of vendors at every changes in the source code
COPY --link composer.* symfony.* ./
RUN set -eux; \
composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress
# copy sources
COPY --link . ./
# Install composer and yarn dependencies for Part-DB
RUN set -eux; \
mkdir -p var/cache var/log; \
composer dump-autoload --classmap-authoritative --no-dev; \
composer dump-env prod; \
composer run-script --no-dev post-install-cmd; \
chmod +x bin/console; sync;
RUN yarn install --network-timeout 600000 && \
yarn build && \
yarn cache clean && \
rm -rf node_modules/
# Use docker env to output logs to stdout
ENV APP_ENV=docker
ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db"
USER root
ENTRYPOINT ["docker-entrypoint"]
CMD ["frankenphp", "run", "--config", "/etc/caddy/Caddyfile"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"]
HEALTHCHECK --start-period=60s CMD curl -f http://localhost:2019/metrics || exit 1
# See https://caddyserver.com/docs/conventions#file-locations for details
ENV XDG_CONFIG_HOME /config
ENV XDG_DATA_HOME /data
EXPOSE 80
EXPOSE 443
EXPOSE 443/udp
EXPOSE 2019

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)
[![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)
![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 Build Status](https://github.com/Part-DB/Part-DB-symfony/workflows/Docker%20Image%20Build/badge.svg)
@ -30,7 +30,7 @@ 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*.
Every change to the master branch gets automatically deployed, so it represents the current development progress and is
maybe not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
may not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
the page
for the first time.
@ -39,44 +39,46 @@ for the first time.
## Features
* Inventory management of your electronic parts. Each part can be assigned to a category, footprint, manufacturer
* Inventory management of your electronic parts. Each part can be assigned to a category, footprint, manufacturer,
and multiple store locations and price information. Parts can be grouped using tags. You can associate various files
like datasheets or pictures with the parts.
* Multi-Language support (currently German, English, Russian, Japanese and French (experimental))
* Multi-language support (currently German, English, Russian, Japanese, French, Czech, Danish, and Chinese)
* Barcodes/Labels generator for parts and storage locations, scan barcodes via webcam using the builtin barcode scanner
* User system with groups and detailed (fine granular) permissions.
Two-factor authentication is supported (Google Authenticator and Webauthn/U2F keys) and can be enforced for groups.
Password reset via email can be setup.
Password reset via email can be set up.
* Optional support for single sign-on (SSO) via SAML (using an intermediate service
like [Keycloak](https://www.keycloak.org/) you can connect Part-DB to an existing LDAP or Active Directory server)
* Import/Export system for parts and datastructure. BOM import for projects from KiCAD is supported.
* Import/Export system for parts and data structure. BOM import for projects from KiCAD is supported.
* Project management: Create projects and assign parts to the bill of material (BOM), to show how often you could build
this project and directly withdraw all components needed from DB
* Event log: Track what changes happens to your inventory, track which user does what. Revert your parts to older
* Event log: Track what changes happen to your inventory, track which user does what. Revert your parts to older
versions.
* Responsive design: You can use Part-DB on your PC, your tablet and your smartphone using the same interface.
* MySQL and SQLite supported as database backends
* Responsive design: You can use Part-DB on your PC, your tablet, and your smartphone using the same interface.
* MySQL, SQLite and PostgreSQL are supported as database backends
* Support for rich text descriptions and comments in parts
* Support for multiple currencies and automatic update of exchange rates supported
* Powerful search and filter function, including parametric search (search for parts according to some specifications)
* Automatic thumbnail generation for pictures
* Use cloud providers (like Octopart, Digikey, farnell or TME) to automatically get part information, datasheets and
* Use cloud providers (like Octopart, Digikey, Farnell, LCSC or TME) to automatically get part information, datasheets, and
prices for parts
* API to access Part-DB from other applications/scripts
* [Integration with KiCad](https://docs.part-db.de/usage/eda_integration.html): Use Part-DB as the central datasource for your
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,
or makerspaces, where many users have should have (controlled) access to the shared inventory.
With these features, Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory,
or maker spaces, 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.
## Requirements
* A **web server** (like Apache2 or nginx) that is capable of
running [Symfony 5](https://symfony.com/doc/current/reference/requirements.html),
this includes a minimum PHP version of **PHP 8.1**
* A **MySQL** (at least 5.7) /**MariaDB** (at least 10.2.2) database server if you do not want to use SQLite.
* Shell access to your server is highly suggested!
* For building the client side assets **yarn** and **nodejs** (>= 18.0) is needed.
running [Symfony 6](https://symfony.com/doc/current/reference/requirements.html),
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.
* Shell access to your server is highly recommended!
* For building the client-side assets **yarn** and **nodejs** (>= 20.0) is needed.
## Installation
@ -86,8 +88,8 @@ read [this](https://docs.part-db.de/upgrade_legacy.html) first.
*Hint:* A docker image is available under [jbtronics/part-db1](https://hub.docker.com/r/jbtronics/part-db1). How to set
up Part-DB via docker is described [here](https://docs.part-db.de/installation/installation_docker.html).
**Below you find some very rough outline of the installation process, see [here](https://docs.part-db.de/installation/)
for a detailed guide how to install Part-DB.**
**Below you find a very rough outline of the installation process, see [here](https://docs.part-db.de/installation/)
for a detailed guide on how to install Part-DB.**
1. Copy or clone this repository into a folder on your server.
2. Configure your webserver to serve from the `public/` folder.
@ -105,13 +107,13 @@ for a detailed guide how to install Part-DB.**
6. _Optional_ (speeds up first load): Warmup cache: `php bin/console cache:warmup`
7. Upgrade database to new scheme (or create it, when it was empty): `php bin/console doctrine:migrations:migrate` and
follow the instructions given. During the process the password for the admin is user is shown. Copy it. **Caution**:
This steps tamper with your database and could potentially destroy it. So make sure to make a backup of your
These steps tamper with your database and could potentially destroy it. So make sure to make a backup of your
database.
8. You can configure Part-DB via `config/parameters.yaml`. You should check if settings match your expectations, after
8. You can configure Part-DB via `config/parameters.yaml`. You should check if settings match your expectations after
you installed/upgraded Part-DB. Check if `partdb.default_currency` matches your mainly used currency (this can not be
changed after creating price information).
Run `php bin/console cache:clear` when you changed something.
9. Access Part-DB in your browser (under the URL you put it) and login with user *admin*. Password is the one outputted
Run `php bin/console cache:clear` when you change something.
9. Access Part-DB in your browser (under the URL you put it) and log in with user *admin*. Password is the one outputted
during DB setup.
If you can not remember the password, set a new one with `php bin/console app:set-password admin`. You can create
new users with the admin user and start using Part-DB.
@ -120,23 +122,23 @@ When you want to upgrade to a newer version, then just copy the new files into t
and repeat the steps 4. to 7.
Normally a random password is generated when the admin user is created during initial database creation,
however you can set the initial admin password, by setting the `INITIAL_ADMIN_PW` env var.
however, you can set the initial admin password, by setting the `INITIAL_ADMIN_PW` env var.
You can configure Part-DB to your needs by changing environment variables in the `.env.local` file.
See [here](https://docs.part-db.de/configuration.html) for more information.
### Reverse proxy
If you are using a reverse proxy, you have to ensure that the proxies sets the `X-Forwarded-*` headers correctly, or you
If you are using a reverse proxy, you have to ensure that the proxies set the `X-Forwarded-*` headers correctly, or you
will get HTTP/HTTPS mixup and wrong hostnames.
If the reverse proxy is on a different server (or it cannot access Part-DB via localhost) you have to set
the `TRUSTED_PROXIES` env variable to match your reverse proxies IP-address (or IP block). You can do this in
the `TRUSTED_PROXIES` env variable to match your reverse proxy's IP address (or IP block). You can do this in
your `.env.local` or (when using docker) in your `docker-compose.yml` file.
## Donate for development
If you want to donate to the Part-DB developer, see the sponsor button in the top bar (next to the repo name).
There you will find various methods to support development on a monthly or a one time base.
There you will find various methods to support development on a monthly or a one-time base.
## Built with

View file

@ -1 +1 @@
1.9.1
2.2.1

File diff suppressed because one or more lines are too long

View file

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

View file

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

View file

@ -2,35 +2,36 @@
* @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
*/
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js';
import AutoLink from '@ckeditor/ckeditor5-link/src/autolink.js';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js';
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js';
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js';
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js';
import Link from '@ckeditor/ckeditor5-link/src/link.js';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js';
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js';
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js';
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js';
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js';
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js';
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js';
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js';
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js';
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js';
import {ClassicEditor} from 'ckeditor5';
import {Autoformat} from 'ckeditor5';
import {AutoLink} from 'ckeditor5';
import {Bold} from 'ckeditor5';
import {Code} from 'ckeditor5';
import {Essentials} from 'ckeditor5';
import {FindAndReplace} from 'ckeditor5';
import {Highlight} from 'ckeditor5';
import {Italic} from 'ckeditor5';
import {Link} from 'ckeditor5';
import {Paragraph} from 'ckeditor5';
import {RemoveFormat} from 'ckeditor5';
import {SourceEditing} from 'ckeditor5';
import {SpecialCharacters} from 'ckeditor5';
import {SpecialCharactersArrows} from 'ckeditor5';
import {SpecialCharactersCurrency} from 'ckeditor5';
import {SpecialCharactersEssentials} from 'ckeditor5';
import {SpecialCharactersLatin} from 'ckeditor5';
import {SpecialCharactersMathematical} from 'ckeditor5';
import {SpecialCharactersText} from 'ckeditor5';
import {Strikethrough} from 'ckeditor5';
import {Subscript} from 'ckeditor5';
import {Superscript} from 'ckeditor5';
import {Underline} from 'ckeditor5';
import {EditorWatchdog} from 'ckeditor5';
import {Mention, Emoji} from "ckeditor5";
import ExtendedMarkdownInline from "./plugins/extendedMarkdownInline";
import SingleLinePlugin from "./plugins/singleLine";
import SpecialCharactersEmoji from "./plugins/special_characters_emoji";
import SpecialCharactersGreek from "./plugins/special_characters_emoji";
class Editor extends ClassicEditor {}
@ -62,7 +63,8 @@ Editor.builtinPlugins = [
ExtendedMarkdownInline,
SingleLinePlugin,
SpecialCharactersEmoji
SpecialCharactersGreek,
Mention, Emoji
];
// Editor configuration.
@ -81,6 +83,7 @@ Editor.defaultConfig = {
'link',
'code',
'specialCharacters',
'emoji',
'|',
'undo',
'redo',

View file

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

View file

@ -17,7 +17,7 @@
* 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 {
execute( { value } ) {

View file

@ -17,11 +17,11 @@
* 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 { toWidget } from '@ckeditor/ckeditor5-widget/src/utils';
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
import { toWidget } from 'ckeditor5';
import {Widget} from 'ckeditor5';
export default class PartDBLabelEditing extends Plugin {
static get requires() { // ADDED

View file

@ -17,14 +17,15 @@
* 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/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 Model from '@ckeditor/ckeditor5-ui/src/model';
import {Collection} from 'ckeditor5';
import {UIModel} from 'ckeditor5';
export default class PartDBLabelUI extends Plugin {
init() {
@ -128,6 +129,8 @@ const PLACEHOLDERS = [
['[[BARCODE_QR]]', 'QR code linking to this element'],
['[[BARCODE_C128]]', 'Code 128 barcode linking to this element'],
['[[BARCODE_C39]]', 'Code 39 barcode linking to this element'],
['[[BARCODE_C93]]', 'Code 93 barcode linking to this element'],
['[[BARCODE_DATAMATRIX]]', 'Datamatrix code linking to this element'],
]
},
{
@ -149,18 +152,28 @@ const PLACEHOLDERS = [
function getDropdownItemsDefinitions(t) {
const itemDefinitions = new Collection();
let first = true;
for ( const group of PLACEHOLDERS) {
//Add group header
//Skip separator for first group
if (!first) {
itemDefinitions.add({
'type': 'separator',
model: new Model( {
model: new UIModel( {
withText: true,
})
});
} else {
first = false;
}
itemDefinitions.add({
type: 'button',
model: new Model( {
model: new UIModel( {
label: t(group.label),
withText: true,
isEnabled: false,
@ -171,7 +184,7 @@ function getDropdownItemsDefinitions(t) {
for ( const entry of group.entries) {
const definition = {
type: 'button',
model: new Model( {
model: new UIModel( {
commandParam: entry[0],
label: t(entry[1]),
tooltip: entry[0],

View file

@ -17,15 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Make sure that the global object is defined. If not, define it.
window.CKEDITOR_TRANSLATIONS = window.CKEDITOR_TRANSLATIONS || {};
import {add} from "ckeditor5";
// Make sure that the dictionary for Polish translations exist.
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, {
add( "de", {
'Label Placeholder': 'Label Platzhalter',
'Part': 'Bauteil',
@ -69,6 +63,8 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'QR code linking to this element': 'QR Code verknüpft mit diesem Element',
'Code 128 barcode linking to this element': 'Code 128 Barcode verknüpft mit diesem Element',
'Code 39 barcode linking to this element': 'Code 39 Barcode verknüpft mit diesem Element',
'Code 93 barcode linking to this element': 'Code 93 Barcode verknüpft mit diesem Element',
'Datamatrix code linking to this element': 'Datamatrix Code verknüpft mit diesem Element',
'Location ID': 'Lagerort ID',
'Name': 'Name',
@ -86,5 +82,4 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'Instance name': 'Instanzname',
'Target type': 'Zieltyp',
'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/>.
*/
import { Plugin } from 'ckeditor5/src/core';
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor';
import { Plugin, MarkdownGfmDataProcessor } from 'ckeditor5';
const ALLOWED_TAGS = [
//Common elements
@ -34,7 +33,6 @@ const ALLOWED_TAGS = [
//Block elements
'span',
'p',
'img',
@ -57,7 +55,7 @@ export default class ExtendedMarkdown extends Plugin {
constructor( 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) {
editor.data.processor.keepHtml(tag);
}

View file

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

View file

@ -17,7 +17,7 @@
* 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 {
init() {

View file

@ -17,14 +17,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials';
import SpecialCharacters from 'ckeditor5';
import SpecialCharactersEssentials from 'ckeditor5';
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import {Plugin} from 'ckeditor5';
const emoji = require('emoji.json');
export default class SpecialCharactersEmoji extends Plugin {
export default class SpecialCharactersGreek extends Plugin {
init() {
const editor = this.editor;
@ -32,9 +30,6 @@ export default class SpecialCharactersEmoji extends Plugin {
//Add greek characters to special characters
specialCharsPlugin.addItems('Greek', this.getGreek());
//Add Emojis to special characters
specialCharsPlugin.addItems('Emoji', this.getEmojis());
}
getGreek() {
@ -96,14 +91,4 @@ export default class SpecialCharactersEmoji extends Plugin {
{ 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

@ -88,5 +88,8 @@ export default class extends Controller {
} else {
this.hideSidebar();
}
//Hide the tootip on the button
this._toggle_button.blur();
}
}

View file

@ -20,18 +20,26 @@
'use strict';
import { Controller } from '@hotwired/stimulus';
import { marked } from "marked";
import { Marked } from "marked";
import { mangle } from "marked-mangle";
import { gfmHeadingId } from "marked-gfm-heading-id";
import DOMPurify from 'dompurify';
import "../../css/app/markdown.css";
export default class extends Controller {
export default class MarkdownController extends Controller {
static _marked = new Marked([
{
gfm: true,
},
gfmHeadingId(),
mangle(),
])
;
connect()
{
this.configureMarked();
this.render();
//Dispatch an event that we are now finished
@ -45,9 +53,12 @@ export default class extends Controller {
let raw = this.element.dataset['markdown'];
//Apply purified parsed markdown
this.element.innerHTML = DOMPurify.sanitize(marked(this.unescapeHTML(raw)));
this.element.innerHTML = DOMPurify.sanitize(MarkdownController._marked.parse(this.unescapeHTML(raw)));
for(let a of this.element.querySelectorAll('a')) {
// test if link is absolute
var r = new RegExp('^(?:[a-z+]+:)?//', 'i');
if (r.test(a.getAttribute('href'))) {
//Mark all links as external
a.classList.add('link-external');
//Open links in new tag
@ -55,6 +66,7 @@ export default class extends Controller {
//Dont track
a.setAttribute('rel', 'noopener');
}
}
//Apply bootstrap styles to tables
for(let table of this.element.querySelectorAll('table')) {
@ -81,8 +93,17 @@ export default class extends Controller {
/**
* Configure the marked parser
*/
configureMarked()
/*static newMarked()
{
const marked = new Marked([
{
gfm: true,
},
gfmHeadingId(),
mangle(),
])
;
marked.use(mangle());
marked.use(gfmHeadingId({
}));
@ -90,5 +111,5 @@ export default class extends Controller {
marked.setOptions({
gfm: true,
});
}
}*/
}

View file

@ -0,0 +1,79 @@
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
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

@ -23,11 +23,22 @@ import "tom-select/dist/css/tom-select.bootstrap5.css";
import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
export default class extends Controller {
_tomSelect;
connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = {
persistent: false,
create: true,
@ -36,6 +47,7 @@ export default class extends Controller {
selectOnTab: true,
//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',
dropdownParent: dropdownParent,
render: {
item: (data, escape) => {
return '<span>' + escape(data.label) + '</span>';
@ -46,6 +58,12 @@ export default class extends Controller {
}
return '<div>' + escape(data.label) + '</div>';
}
},
plugins: {
'autoselect_typed': {},
'click_to_edit': {},
'clear_button': {},
"restore_on_backspace": {}
}
};

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 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";
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' */
export default class extends Controller {
connect() {
@ -51,8 +73,22 @@ export default class extends Controller {
const language = document.body.dataset.locale ?? "en";
const emojiURL = new URL('../../ckeditor/emojis.json', import.meta.url).href;
const config = {
language: language,
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();
@ -70,7 +106,18 @@ export default class extends Controller {
editor_div.classList.add(...new_classes.split(","));
}
console.log(editor);
// 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
//See: https://github.com/ckeditor/ckeditor5/issues/5897#issuecomment-628471302
return editor;
})
.catch(error => {
console.error(error);

View file

@ -75,13 +75,49 @@ export default class extends Controller {
//Insert new html after the last child element
//If the table has a tbody, insert it there
//Afterwards return the newly created row
if(targetTable.tBodies[0]) {
targetTable.tBodies[0].insertAdjacentHTML('beforeend', newElementStr);
return targetTable.tBodies[0].lastElementChild;
} else { //Otherwise just insert it
targetTable.insertAdjacentHTML('beforeend', newElementStr);
return targetTable.lastElementChild;
}
}
/**
* This action opens a file dialog to select multiple files and then creates a new element for each file, where
* the file is assigned to the input field.
* This should only be used for attachments collection types
* @param event
*/
uploadMultipleFiles(event) {
//Open a file dialog to select multiple files
const input = document.createElement('input');
input.type = 'file';
input.multiple = true;
input.click();
input.addEventListener('change', (event) => {
//Create a element for each file
for (let i = 0; i < input.files.length; i++) {
const file = input.files[i];
const newElement = this.createElement(event);
const rowInput = newElement.querySelector("input[type='file']");
//We can not directly assign the file to the input, so we have to create a new DataTransfer object
const dataTransfer = new DataTransfer();
dataTransfer.items.add(file);
rowInput.files = dataTransfer.files;
}
});
}
/**
* Similar to createEvent Pricedetails need some special handling to fill min amount
* @param event

View file

@ -24,18 +24,25 @@ import 'datatables.net-bs5/css/dataTables.bootstrap5.css'
import 'datatables.net-buttons-bs5/css/buttons.bootstrap5.css'
import 'datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.css'
import 'datatables.net-responsive-bs5/css/responsive.bootstrap5.css';
import 'datatables.net-select-bs5/css/select.bootstrap5.css';
//Use our own styles for the select extension which fit the bootstrap theme better
//import 'datatables.net-select-bs5/css/select.bootstrap5.css';
import '../../../css/components/datatables_select_bs5.css';
//JS
import 'datatables.net-bs5';
import 'datatables.net-buttons-bs5';
import 'datatables.net-buttons/js/buttons.colVis.js';
import 'datatables.net-fixedheader-bs5';
import 'datatables.net-select-bs5';
import 'datatables.net-colreorder-bs5';
import 'datatables.net-responsive-bs5';
import '../../../js/lib/datatables';
//import 'datatables.net-select-bs5';
//Use the local version containing the fix for the select extension
import '../../../js/lib/dataTables.select.mjs';
const EVENT_DT_LOADED = 'dt:loaded';
export default class extends Controller {
@ -132,7 +139,7 @@ export default class extends Controller {
if(this.isSelectable()) {
options.select = {
style: 'multi+shift',
selector: 'td.select-checkbox'
selector: 'td.dt-select',
};
}
@ -145,6 +152,12 @@ export default class extends Controller {
//Fix height of the length selector
promise.then((dt) => {
//Draw the rows to make sure the correct status text is displayed ("No matching records found" instead of "Loading...")
if (dt.data().length === 0) {
dt.rows().draw()
}
//Find all length selectors (select with name dt_length), which are inside a label
const lengthSelectors = document.querySelectorAll('label select[name="dt_length"]');
//And remove the surrounding label, while keeping the select with all event handlers
@ -180,27 +193,6 @@ export default class extends Controller {
dt.fixedHeader.headerOffset($("#navbar").outerHeight());
});
//Register event handler to selectAllRows checkbox if available
if (this.isSelectable()) {
promise.then((dt) => {
const selectAllCheckbox = this.element.querySelector('thead th.select-checkbox');
selectAllCheckbox.addEventListener('click', () => {
if(selectAllCheckbox.parentElement.classList.contains('selected')) {
dt.rows().deselect();
selectAllCheckbox.parentElement.classList.remove('selected');
} else {
dt.rows().select();
selectAllCheckbox.parentElement.classList.add('selected');
}
});
//When any row is deselected, also deselect the selectAll checkbox
dt.on('deselect.dt', () => {
selectAllCheckbox.parentElement.classList.remove('selected');
});
});
}
//Allow to further configure the datatable
promise.then(this._afterLoaded.bind(this));

View file

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

@ -0,0 +1,200 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2024 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 { autocomplete } from '@algolia/autocomplete-js';
//import "@algolia/autocomplete-theme-classic/dist/theme.css";
import "../../css/components/autocomplete_bootstrap_theme.css";
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches';
import {marked} from "marked";
import {
trans,
SEARCH_PLACEHOLDER,
SEARCH_SUBMIT,
STATISTICS_PARTS
} from '../../translator';
/**
* This controller is responsible for the search fields in the navbar and the homepage.
* It uses the Algolia Autocomplete library to provide a fast and responsive search.
*/
export default class extends Controller {
static targets = ["input"];
_autocomplete;
// Highlight the search query in the results
_highlight = (text, query) => {
if (!text) return text;
if (!query) return text;
const HIGHLIGHT_PRE_TAG = '__aa-highlight__'
const HIGHLIGHT_POST_TAG = '__/aa-highlight__'
const escaped = query.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
const regex = new RegExp(escaped, 'gi');
return text.replace(regex, (match) => `${HIGHLIGHT_PRE_TAG}${match}${HIGHLIGHT_POST_TAG}`);
}
initialize() {
// The endpoint for searching parts
const base_url = this.element.dataset.autocomplete;
// The URL template for the part detail pages
const part_detail_uri_template = this.element.dataset.detailUrl;
//The URL of the placeholder picture
const placeholder_image = this.element.dataset.placeholderImage;
//If the element is in navbar mode, or not
const navbar_mode = this.element.dataset.navbarMode === "true";
const that = this;
const recentSearchesPlugin = createLocalStorageRecentSearchesPlugin({
key: 'RECENT_SEARCH',
limit: 5,
});
this._autocomplete = autocomplete({
container: this.element,
//Place the panel in the navbar, if the element is in navbar mode
panelContainer: navbar_mode ? document.getElementById("navbar-search-form") : document.body,
panelPlacement: this.element.dataset.panelPlacement,
plugins: [recentSearchesPlugin],
openOnFocus: true,
placeholder: trans(SEARCH_PLACEHOLDER),
translations: {
submitButtonTitle: trans(SEARCH_SUBMIT)
},
// Use a navigator compatible with turbo:
navigator: {
navigate({ itemUrl }) {
window.Turbo.visit(itemUrl, { action: "advance" });
},
navigateNewTab({ itemUrl }) {
const windowReference = window.open(itemUrl, '_blank', 'noopener');
if (windowReference) {
windowReference.focus();
}
},
navigateNewWindow({ itemUrl }) {
window.open(itemUrl, '_blank', 'noopener');
},
},
// If the form is submitted, forward the term to the form
onSubmit({state, event, ...setters}) {
//Put the current text into each target input field
const input = that.inputTarget;
if (!input) {
return;
}
//Do not submit the form, if the input is empty
if (state.query === "") {
return;
}
input.value = state.query;
input.form.requestSubmit();
},
getSources({ query }) {
return [
// The parts source
{
sourceId: 'parts',
getItems() {
const url = base_url.replace('__QUERY__', encodeURIComponent(query));
const data = fetch(url)
.then((response) => response.json())
;
//Iterate over all fields besides the id and highlight them
const fields = ["name", "description", "category", "footprint"];
data.then((items) => {
items.forEach((item) => {
for (const field of fields) {
item[field] = that._highlight(item[field], query);
}
});
});
return data;
},
getItemUrl({ item }) {
return part_detail_uri_template.replace('__ID__', item.id);
},
templates: {
header({ html }) {
return html`<span class="aa-SourceHeaderTitle">${trans(STATISTICS_PARTS)}</span>
<div class="aa-SourceHeaderLine" />`;
},
item({item, components, html}) {
const details_url = part_detail_uri_template.replace('__ID__', item.id);
return html`
<a class="aa-ItemLink" href="${details_url}">
<div class="aa-ItemContent">
<div class="aa-ItemIcon aa-ItemIcon--picture aa-ItemIcon--alignTop">
<img src="${item.image !== "" ? item.image : placeholder_image}" alt="${item.name}" width="30" height="30"/>
</div>
<div class="aa-ItemContentBody">
<div class="aa-ItemContentTitle">
<b>
${components.Highlight({hit: item, attribute: 'name'})}
</b>
</div>
<div class="aa-ItemContentDescription">
${components.Highlight({hit: item, attribute: 'description'})}
${item.category ? html`<p class="m-0"><span class="fa-solid fa-tags fa-fw"></span>${components.Highlight({hit: item, attribute: 'category'})}</p>` : ""}
${item.footprint ? html`<p class="m-0"><span class="fa-solid fa-microchip fa-fw"></span>${components.Highlight({hit: item, attribute: 'footprint'})}</p>` : ""}
</div>
</div>
</div>
</a>
`;
},
},
},
];
},
});
//Try to find the input field and register a defocus handler. This is necessarry, as by default the autocomplete
//lib has problems when multiple inputs are present on the page. (see https://github.com/algolia/autocomplete/issues/1216)
const inputs = this.element.getElementsByClassName('aa-Input');
for (const input of inputs) {
input.addEventListener('blur', () => {
this._autocomplete.setIsOpen(false);
});
}
}
}

View file

@ -10,12 +10,19 @@ export default class extends Controller {
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 = {
allowEmptyOption: true,
plugins: ['dropdown_input'],
searchField: ["name", "description", "category", "footprint"],
valueField: "id",
labelField: "name",
dropdownParent: dropdownParent,
preload: "focus",
render: {
item: (data, escape) => {

View file

@ -38,11 +38,17 @@ export default class extends Controller {
this._emptyMessage = this.element.getAttribute('title');
}
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = {
plugins: ["clear_button"],
allowEmptyOption: true,
selectOnTab: true,
maxOptions: null,
dropdownParent: dropdownParent,
render: {
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);
//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() {

View file

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

View file

@ -0,0 +1,112 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 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 "tom-select/dist/css/tom-select.bootstrap5.css";
import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
/**
* This is the frontend controller for StaticFileAutocompleteType form element.
* Basically it loads a text file from the given url (via data-url) and uses it as a source for the autocomplete.
* The file is just a list of strings, one per line, which will be used as the autocomplete options.
* Lines starting with # will be ignored.
*/
export default class extends Controller {
_tomSelect;
connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = {
persistent: false,
create: true,
maxItems: 1,
maxOptions: 100,
createOnBlur: true,
selectOnTab: true,
valueField: 'text',
searchField: 'text',
orderField: 'text',
dropdownParent: dropdownParent,
//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',
plugins: {
'autoselect_typed': {},
'click_to_edit': {},
'clear_button': {},
'restore_on_backspace': {}
}
};
if (this.element.dataset.url) {
const url = this.element.dataset.url;
settings.load = (query, callback) => {
const self = this;
if (self.loading > 1) {
callback();
return;
}
fetch(url)
.then(response => response.text())
.then(text => {
// Convert the text file to array
let lines = text.split("\n");
//Remove all lines beginning with #
lines = lines.filter(x => !x.startsWith("#"));
//Convert the array to an object, where each line is in the text field
lines = lines.map(x => {
return {text: x};
});
//Unset the load function to prevent endless recursion
self._tomSelect.settings.load = null;
callback(lines);
}).catch(() => {
callback();
});
};
}
this._tomSelect = new TomSelect(this.element, settings);
}
disconnect() {
super.disconnect();
//Destroy the TomSelect instance
this._tomSelect.destroy();
}
}

View file

@ -24,6 +24,8 @@ import {Controller} from "@hotwired/stimulus";
import {trans, ENTITY_SELECT_GROUP_NEW_NOT_ADDED_TO_DB} from '../../translator.js'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
export default class extends Controller {
_tomSelect;
@ -38,11 +40,24 @@ export default class extends Controller {
const allowAdd = this.element.getAttribute("data-allow-add") === "true";
const addHint = this.element.getAttribute("data-add-hint") ?? "";
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = {
allowEmptyOption: true,
selectOnTab: true,
maxOptions: null,
create: allowAdd ? this.createItem.bind(this) : false,
createFilter: this.createFilter.bind(this),
// This three options allow us to paste element names with commas: (see issue #538)
maxItems: 1,
delimiter: "$$VERY_LONG_DELIMITER_THAT_SHOULD_NEVER_APPEAR$$",
splitOn: null,
dropdownParent: dropdownParent,
searchField: [
{field: "text", weight : 2},
@ -53,7 +68,21 @@ export default class extends Controller {
render: {
item: this.renderItem.bind(this),
option: this.renderOption.bind(this),
option_create: function(data, escape) {
option_create: (data, escape) => {
//If the input starts with "->", we prepend the current selected value, for easier extension of existing values
//This here handles the display part, while the createItem function handles the actual creation
if (data.input.startsWith("->")) {
//Get current selected value
const current = this._tomSelect.getItem(this._tomSelect.getValue()).textContent.replaceAll("→", "->").trim();
//Prepend it to the input
if (current) {
data.input = current + " " + data.input;
} else {
//If there is no current value, we remove the "->"
data.input = data.input.substring(2);
}
}
return '<div class="create"><i class="fa-solid fa-plus fa-fw"></i>&nbsp;<strong>' + escape(data.input) + '</strong>&hellip;&nbsp;' +
'<small class="text-muted float-end">(' + addHint +')</small>' +
'</div>';
@ -63,14 +92,39 @@ export default class extends Controller {
//Add callbacks to update validity
onInitialize: this.updateValidity.bind(this),
onChange: this.updateValidity.bind(this),
plugins: {
"autoselect_typed": {},
}
};
//Add clear button plugin, if an empty option is present
if (this.element.querySelector("option[value='']") !== null) {
settings.plugins["clear_button"] = {};
}
this._tomSelect = new TomSelect(this.element, settings);
//Do not do a sync here as this breaks the initial rendering of the empty option
//this._tomSelect.sync();
}
createItem(input, callback) {
//If the input starts with "->", we prepend the current selected value, for easier extension of existing values
if (input.startsWith("->")) {
//Get current selected value
let current = this._tomSelect.getItem(this._tomSelect.getValue()).textContent.replaceAll("→", "->").trim();
//Replace no break spaces with normal spaces
current = current.replaceAll("\u00A0", " ");
//Prepend it to the input
if (current) {
input = current + " " + input;
} else {
//If there is no current value, we remove the "->"
input = input.substring(2);
}
}
callback({
//$%$ is a special value prefix, that is used to identify items, that are not yet in the DB
value: '$%$' + input,
@ -79,6 +133,31 @@ export default class extends Controller {
});
}
createFilter(input) {
//Normalize the input (replace spacing around arrows)
if (input.includes("->")) {
const inputs = input.split("->");
inputs.forEach((value, index) => {
inputs[index] = value.trim();
});
input = inputs.join("->");
} else {
input = input.trim();
}
const options = this._tomSelect.options;
//Iterate over all options and check if the input is already present
for (let index in options) {
const option = options[index];
if (option.path === input) {
return false;
}
}
return true;
}
updateValidity() {
//Mark this input as invalid, if the selected option is disabled

View file

@ -23,19 +23,32 @@ import "tom-select/dist/css/tom-select.bootstrap5.css";
import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
export default class extends Controller {
_tomSelect;
connect() {
let dropdownParent = "body";
if (this.element.closest('.modal')) {
dropdownParent = null
}
let settings = {
plugins: {
remove_button:{
}
remove_button:{},
'autoselect_typed': {},
'click_to_edit': {},
},
persistent: false,
selectOnTab: true,
createOnBlur: true,
create: true,
dropdownParent: dropdownParent,
};
if(this.element.dataset.autocomplete) {

View file

@ -94,13 +94,15 @@ export default class extends Controller {
showTags: this._showTags,
data: data,
showIcon: true,
preventUnselect: true,
allowReselect: true,
onNodeSelected: (event) => {
const node = event.detail.node;
if (node.href) {
window.Turbo.visit(node.href, {action: "advance"});
this._registerURLWatcher(node);
}
},
//onNodeContextmenu: contextmenu_handler,
}, [BS5Theme, BS53Theme, FAIconTheme]);
this.treeTarget.addEventListener(EVENT_INITIALIZED, (event) => {
@ -108,12 +110,42 @@ export default class extends Controller {
const treeView = event.detail.treeView;
treeView.revealNode(treeView.getSelected());
//Add the url watcher to all selected nodes
for (const node of treeView.getSelected()) {
this._registerURLWatcher(node);
}
//Add contextmenu event listener to the tree, which allows us to open the links in a new tab with a right click
treeView.getTreeElement().addEventListener("contextmenu", this._onContextMenu.bind(this));
});
}
_registerURLWatcher(node)
{
//Register a watcher for a location change, which will unselect the node, if the location changes
const desired_url = node.href;
//Ensure that the node is unselected, if the location changes
const unselectNode = () => {
//Parse url so we can properly compare them
const desired = new URL(node.href, window.location.origin);
//We only compare the pathname, because the hash and parameters should not matter
if(window.location.pathname !== desired.pathname) {
//The ignore parameter is important here, otherwise the node will not be unselected
node.setSelected(false, {silent: true, ignorePreventUnselect: true});
//Unregister the watcher
document.removeEventListener('turbo:load', unselectNode);
}
};
//Register the watcher via hotwire turbo
//We must just load to have the new url in window.location
document.addEventListener('turbo:load', unselectNode);
}
_onContextMenu(event)
{
//Find the node that was clicked and open link in new tab

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

@ -20,7 +20,7 @@
import {Controller} from "@hotwired/stimulus";
//import * as ZXing from "@zxing/library";
import {Html5QrcodeScanner, Html5Qrcode} from "html5-qrcode";
import {Html5QrcodeScanner, Html5Qrcode} from "@part-db/html5-qrcode";
/* stimulusFetch: 'lazy' */
export default class extends Controller {
@ -50,7 +50,7 @@ export default class extends Controller {
});
this._scanner = new Html5QrcodeScanner(this.element.id, {
fps: 2,
fps: 10,
qrbox: qrboxFunction,
experimentalFeatures: {
//This option improves reading quality on android chrome
@ -61,6 +61,11 @@ export default class extends Controller {
this._scanner.render(this.onScanSuccess.bind(this));
}
disconnect() {
this._scanner.pause();
this._scanner.clear();
}
onScanSuccess(decodedText, decodedResult) {
//Put our decoded Text into the input box
document.getElementById('scan_dialog_input').value = decodedText;

View file

@ -25,9 +25,23 @@ import "katex/dist/katex.css";
export default class extends Controller {
static targets = ["input", "preview"];
static values = {
unit: {type: Boolean, default: false} //Render as upstanding (non-italic) text, useful for units
}
updatePreview()
{
katex.render(this.inputTarget.value, this.previewTarget, {
let value = "";
if (this.unitValue) {
//Escape percentage signs
value = this.inputTarget.value.replace(/%/g, '\\%');
value = "\\mathrm{" + value + "}";
} else {
value = this.inputTarget.value;
}
katex.render(value, this.previewTarget, {
throwOnError: false,
});
}

View file

@ -22,6 +22,13 @@ import TomSelect from "tom-select";
import katex from "katex";
import "katex/dist/katex.css";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
/* stimulusFetch: 'lazy' */
export default class extends Controller
{
@ -53,7 +60,10 @@ export default class extends Controller
connect() {
const settings = {
plugins: {
clear_button:{}
'autoselect_typed': {},
'click_to_edit': {},
'clear_button': {},
'restore_on_backspace': {}
},
persistent: false,
maxItems: 1,
@ -75,7 +85,9 @@ export default class extends Controller
tmp += '<span>' + katex.renderToString(data.symbol) + '</span>'
}
if (data.unit) {
tmp += '<span class="ms-2">' + katex.renderToString('[' + data.unit + ']') + '</span>'
let unit = data.unit.replace(/%/g, '\\%');
unit = "\\mathrm{" + unit + "}";
tmp += '<span class="ms-2">' + katex.renderToString('[' + unit + ']') + '</span>'
}

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;
font-weight: bold;
}
/****************************************
* Password toggle
****************************************/
.toggle-password-button {
top: 0.7rem !important;
}

View file

@ -112,3 +112,10 @@ ul.structural_link li a:hover {
background-color: var(--bs-success);
border-color: var(--bs-success);
}
/***********************************************
* Katex rendering with same height as text
***********************************************/
.katex-same-height-as-text .katex {
font-size: 1.0em;
}

View file

@ -18,8 +18,8 @@
*/
.hoverpic {
min-width: 10px;
max-width: 30px;
min-width: var(--table-image-preview-min-size, 20px);
max-width: var(--table-image-preview-max-size, 35px);
display: block;
margin-left: auto;
margin-right: auto;
@ -49,9 +49,8 @@
}
.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;
width: 100%;
}
.part-info-image {

View file

@ -108,8 +108,8 @@ body {
.back-to-top {
cursor: pointer;
position: fixed;
bottom: 20px;
right: 20px;
bottom: 60px;
right: 40px;
display:none;
z-index: 1030;
}

View file

@ -17,6 +17,16 @@
* 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
****************************************/
@ -63,10 +73,6 @@ table.dataTable > tbody > tr.selected > td > a {
margin-block-end: 0;
}
.card-footer-table {
padding-top: 0;
}
table.dataTable {
margin-top: 0 !important;
}
@ -84,16 +90,31 @@ th.select-checkbox {
* Datatables definitions/overrides
********************************************************************/
.dataTables_length {
.dt-length {
display: inline-flex;
}
/** Add spacing between column visibility button and length menu */
.buttons-colvis {
margin-right: 0.2em !important;
}
/** Fix datatables select-checkbox position */
table.dataTable tr.selected td.select-checkbox:after
{
margin-top: -20px !important;
}
/** Show pagination right aligned */
.dt-paging .pagination {
justify-content: flex-end;
}
/** Fix table row coloring */
table.table.dataTable > :not(caption) > * > * {
background-color: var(--bs-table-bg);
}
/******************************************************
Classes for Datatables export
@ -104,52 +125,3 @@ Classes for Datatables export
.export-helper{
display: none;
}
/******************************************************
* Styling for the select all checkbox in the parts table
* Should match the styling of the select checkbox
******************************************************/
table.dataTable > thead > tr > th.select-checkbox {
position: relative;
}
table.dataTable > thead > tr > th.select-checkbox:before,
table.dataTable > thead > tr > th.select-checkbox:after {
display: block;
position: absolute;
top: 0.9em;
left: 50%;
width: 1em !important;
height: 1em !important;
box-sizing: border-box;
}
table.dataTable > thead > tr > th.select-checkbox:before {
content: " ";
margin-top: -5px;
margin-left: -6px;
border: 2px solid var(--bs-tertiary-color);
border-radius: 3px;
}
table.dataTable > tbody > tr > td.select-checkbox:before, table.dataTable > tbody > tr > th.select-checkbox:before {
border: 2px solid var(--bs-tertiary-color) !important;
}
table.dataTable > tbody > tr > td.select-checkbox:before, table.dataTable > tbody > tr > td.select-checkbox:after, table.dataTable > tbody > tr > th.select-checkbox:before, table.dataTable > tbody > tr > th.select-checkbox:after {
width: 1em !important;
height: 1em !important;
}
table.dataTable > thead > tr.selected > th.select-checkbox:after {
content: "✓";
font-size: 20px;
margin-top: -20px;
margin-left: -6px;
text-align: center;
/*text-shadow: 1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9; */
}
table.dataTable.compact > thead > tr > th.select-checkbox:before {
margin-top: -12px;
}
table.dataTable.compact > thead > tr.selected > th.select-checkbox:after {
margin-top: -16px;
}

File diff suppressed because it is too large Load diff

View file

@ -24,9 +24,8 @@
/** Should be the same settings, as in label_style.css */
.ck-html-label .ck-content {
font-family: "DejaVu Sans Mono", monospace;
font-size: 12px;
font-size: 12pt;
line-height: 1.0;
font-size-adjust: 1.5;
}
.ck-html-label .ck-content p {
@ -72,6 +71,8 @@
--ck-color-button-on-hover-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-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,69 @@
/******************************************************************************************
* This styles the checkboxes of the select extension exactly like the ones in bootstrap 5
******************************************************************************************/
table.dataTable > tbody > tr > .selected {
background-color: var(--bs-primary-bg-subtle) !important;
color: white;
}
table.dataTable > tbody > tr > .dt-select {
text-align: center;
vertical-align: middle;
}
table.dataTable > thead > tr > .dt-select {
text-align: center;
}
table.dataTable input.dt-select-checkbox {
--bs-form-check-bg: var(--bs-body-bg);
flex-shrink: 0;
width: 1em;
height: 1em;
margin-top: 0.25em;
vertical-align: top;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: var(--bs-form-check-bg);
background-image: var(--bs-form-check-bg-image);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
border: var(--bs-border-width) solid var(--bs-border-color);
-webkit-print-color-adjust: exact;
color-adjust: exact;
print-color-adjust: exact;
border-radius: 0.25em;
}
table.dataTable input.dt-select-checkbox:checked {
background-color: rgb(var(--bs-secondary-rgb));
border-color: rgb(var(--bs-secondary-rgb));
--bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
table.dataTable input.dt-select-checkbox:indeterminate {
background-color: rgb(var(--bs-secondary-rgb));
border-color: rgb(var(--bs-secondary-rgb));
--bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}
div.dt-container span.select-info,
div.dt-container span.select-item {
margin-left: 0.5em;
}
@media screen and (max-width: 640px) {
div.dt-container span.select-info,
div.dt-container span.select-item {
margin-left: 0;
display: block;
}
}
table.dataTable.table-sm tbody td.select-checkbox::before {
margin-top: -9px;
}

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;
}

File diff suppressed because it is too large Load diff

View file

@ -44,4 +44,18 @@ import "./register_events";
import "./tristate_checkboxes";
//Define jquery globally
window.$ = window.jQuery = require("jquery")
window.$ = window.jQuery = require("jquery");
//Use the local WASM file for the ZXing library
import {
setZXingModuleOverrides,
} from "barcode-detector/ponyfill";
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
setZXingModuleOverrides({
locateFile: (path, prefix) => {
if (path.endsWith(".wasm")) {
return wasmFile;
}
return prefix + path;
},
});

File diff suppressed because it is too large Load diff

View file

@ -75,11 +75,10 @@
request._dt = config.name;
//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 (settings.aoColumns && settings.aoColumns.length && settings.aoColumns[0]._ColReorder_iOrigCol !== undefined) {
if (dt.colReorder && dt.colReorder.transpose) {
if (request.order && request.order.length) {
request.order.forEach(function (order) {
order.column = settings.aoColumns[order.column]._ColReorder_iOrigCol;
order.column = dt.colReorder.transpose(order.column, "toOriginal");
});
}
}
@ -98,6 +97,15 @@
dtOpts = config.options(dtOpts);
}
//Choose the column where the className contains "select-column" and apply the select extension to its render field
//Added for Part-DB
for (let column of dtOpts.columns) {
if (column.className && column.className.includes('dt-select')) {
column.render = $.fn.dataTable.render.select();
}
}
root.html(data.template);
dt = $('table', root).DataTable(dtOpts);
if (config.state !== 'none') {

View file

@ -21,6 +21,7 @@
import {Dropdown} from "bootstrap";
import ClipboardJS from "clipboard";
import {Modal} from "bootstrap";
class RegisterEventHelper {
constructor() {
@ -31,9 +32,11 @@ class RegisterEventHelper {
//Initialize ClipboardJS
this.registerLoadHandler(() => {
new ClipboardJS('.btn');
})
});
this.registerModalDropRemovalOnFormSubmit();
}
registerModalDropRemovalOnFormSubmit() {
@ -43,6 +46,15 @@ class RegisterEventHelper {
if (back_drop) {
back_drop.remove();
}
//Remove scroll-lock if it is still active
if (document.body.classList.contains('modal-open')) {
document.body.classList.remove('modal-open');
//Remove the padding-right and overflow:hidden from the body
document.body.style.paddingRight = '';
document.body.style.overflow = '';
}
});
}

View file

@ -0,0 +1,63 @@
/**
* Autoselect Typed plugin for Tomselect
*
* This plugin allows automatically selecting an option matching the typed text when the Tomselect element goes out of
* focus (is blurred) and/or when the delimiter is typed.
*
* #select_on_blur option
* Tomselect natively supports the "createOnBlur" option. This option picks up any remaining text in the input field
* and uses it to create a new option and selects that option. It does behave a bit strangely though, in that it will
* not select an already existing option when the input is blurred, so if you typed something that matches an option in
* the list and then click outside the box (without pressing enter) the entered text is just removed (unless you have
* allow duplicates on in which case it will create a new option).
* This plugin fixes that, such that Tomselect will first try to select an option matching the remaining uncommitted
* text and only when no matching option is found tries to create a new one (if createOnBlur and create is on)
*
* #select_on_delimiter option
* Normally when typing the delimiter (space by default) Tomselect will try to create a new option (and select it) (if
* create is on), but if the typed text matches an option (and allow duplicates is off) it refuses to react at all until
* you press enter. With this option, the delimiter will also allow selecting an option, not just creating it.
*/
function select_current_input(self){
if(self.isLocked){
return
}
const val = self.inputValue()
//Do nothing if the input is empty
if (!val) {
return
}
if (self.options[val]) {
self.addItem(val)
self.setTextboxValue()
}
}
export default function(plugin_options_) {
const plugin_options = Object.assign({
//Autoselect the typed text when the input element goes out of focus
select_on_blur: true,
//Autoselect the typed text when the delimiter is typed
select_on_delimiter: true,
}, plugin_options_);
const self = this
if(plugin_options.select_on_blur) {
this.hook("before", "onBlur", function () {
select_current_input(self)
})
}
if(plugin_options.select_on_delimiter) {
this.hook("before", "onKeyPress", function (e) {
const character = String.fromCharCode(e.keyCode || e.which);
if (self.settings.mode === 'multi' && character === self.settings.delimiter) {
select_current_input(self)
}
})
}
}

View file

@ -0,0 +1,93 @@
/**
* click_to_edit plugin for Tomselect
*
* This plugin allows editing (and selecting text in) any selected item by clicking it.
*
* Usually, when the user typed some text and created an item in Tomselect that item cannot be edited anymore. To make
* a change, the item has to be deleted and retyped completely. There is also generally no way to copy text out of a
* tomselect item. The "restore_on_backspace" plugin improves that somewhat, by allowing the user to edit an item after
* pressing backspace. However, it is somewhat confusing to first have to focus the field an then hit backspace in order
* to copy a piece of text. It may also not be immediately obvious for editing.
* This plugin transforms an item into editable text when it is clicked, e.g. when the user tries to place the caret
* within an item or when they try to drag across the text to highlight it.
* It also plays nice with the remove_button plugin which still removes (deselects) an option entirely.
*
* It is recommended to also enable the autoselect_typed plugin when using this plugin. Without it, the text in the
* input field (i.e. the item that was just clicked) is lost when the user clicks outside the field. Also, when the user
* clicks an option (making it text) and then tries to enter another one by entering the delimiter (e.g. space) nothing
* happens until enter is pressed or the text is changed from what it was.
*/
/**
* Return a dom element from either a dom query string, jQuery object, a dom element or html string
* https://stackoverflow.com/questions/494143/creating-a-new-dom-element-from-an-html-string-using-built-in-dom-methods-or-pro/35385518#35385518
*
* param query should be {}
*/
const getDom = query => {
if (query.jquery) {
return query[0];
}
if (query instanceof HTMLElement) {
return query;
}
if (isHtmlString(query)) {
var tpl = document.createElement('template');
tpl.innerHTML = query.trim(); // Never return a text node of whitespace as the result
return tpl.content.firstChild;
}
return document.querySelector(query);
};
const isHtmlString = arg => {
if (typeof arg === 'string' && arg.indexOf('<') > -1) {
return true;
}
return false;
};
function plugin(plugin_options_) {
const self = this
const plugin_options = Object.assign({
//If there is unsubmitted text in the input field, should that text be automatically used to select a matching
//element? If this is off, clicking on item1 and then clicking on item2 will result in item1 being deselected
auto_select_before_edit: true,
//If there is unsubmitted text in the input field, should that text be automatically used to create a matching
//element if no matching element was found or auto_select_before_edit is off?
auto_create_before_edit: true,
//customize this function to change which text the item is replaced with when clicking on it
text: option => {
return option[self.settings.labelField];
}
}, plugin_options_);
self.hook('after', 'setupTemplates', () => {
const orig_render_item = self.settings.render.item;
self.settings.render.item = (data, escape) => {
const item = getDom(orig_render_item.call(self, data, escape));
item.addEventListener('click', evt => {
if (self.isLocked) {
return;
}
const val = self.inputValue();
if (self.options[val]) {
self.addItem(val)
} else if (self.settings.create) {
self.createItem();
}
const option = self.options[item.dataset.value]
self.setTextboxValue(plugin_options.text.call(self, option));
self.focus();
self.removeItem(item);
}
);
return item;
}
});
}
export { plugin as default };

View file

@ -4,6 +4,10 @@
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}
//Increase xdebug.max_nesting_level to 1000 if required (see issue #411)
//Check if xdebug extension is active, and xdebug.max_nesting_level is set to 256 or lower
if (extension_loaded('xdebug') && ((int) ini_get('xdebug.max_nesting_level')) <= 256) {

View file

@ -6,9 +6,13 @@ if (!ini_get('date.timezone')) {
}
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";

View file

@ -1,8 +1,9 @@
{
"name": "part-db/part-db-server",
"type": "project",
"license": "AGPL-3.0-or-later",
"require": {
"php": "^8.1",
"php": "^8.2",
"ext-ctype": "*",
"ext-dom": "*",
"ext-gd": "*",
@ -10,107 +11,112 @@
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"api-platform/core": "^3.1",
"amphp/http-client": "^5.1",
"api-platform/doctrine-orm": "^4.1",
"api-platform/json-api": "^4.0.0",
"api-platform/symfony": "^4.0.0",
"beberlei/doctrineextensions": "^1.2",
"brick/math": "^0.11.0",
"brick/math": "^0.13.1",
"composer/ca-bundle": "^1.5",
"composer/package-versions-deprecated": "^1.11.99.5",
"doctrine/annotations": "1.14.3",
"doctrine/data-fixtures": "^1.6.6",
"doctrine/dbal": "^3.4.6",
"doctrine/data-fixtures": "^2.0.0",
"doctrine/dbal": "^4.0.0",
"doctrine/doctrine-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.16",
"dompdf/dompdf": "dev-master#87bea32efe0b0db309e1d31537201f64d5508280 as v2.0.3",
"erusev/parsedown": "^1.7",
"florianv/swap": "^4.0",
"florianv/swap-bundle": "dev-master",
"doctrine/orm": "^3.2.0",
"dompdf/dompdf": "^3.1.2",
"gregwar/captcha-bundle": "^2.1.0",
"jbtronics/2fa-webauthn": "^v2.0.0",
"hshn/base64-encoded-file": "^5.0",
"jbtronics/2fa-webauthn": "^3.0.0",
"jbtronics/dompdf-font-loader-bundle": "^1.0.0",
"jbtronics/settings-bundle": "^3.0.0",
"jfcherng/php-diff": "^6.14",
"knpuniversity/oauth2-client-bundle": "^2.15",
"league/commonmark": "^2.7",
"league/csv": "^9.8.0",
"league/html-to-markdown": "^5.0.1",
"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",
"nelmio/cors-bundle": "^2.3",
"nelmio/security-bundle": "^3.0",
"nyholm/psr7": "^1.1",
"ocramius/proxy-manager": "2.2.*",
"omines/datatables-bundle": "^0.7.2",
"omines/datatables-bundle": "^0.10.0",
"paragonie/sodium_compat": "^1.21",
"part-db/label-fonts": "^1.0",
"php-translation/symfony-bundle": "^0.14.0",
"phpdocumentor/reflection-docblock": "^5.2",
"phpstan/phpdoc-parser": "^1.23",
"part-db/swap-bundle": "^6.0.0",
"phpoffice/phpspreadsheet": "^5.0.0",
"rhukster/dom-sanitizer": "^1.0",
"runtime/frankenphp-symfony": "^0.2.0",
"s9e/text-formatter": "^2.1",
"scheb/2fa-backup-code": "^6.8.0",
"scheb/2fa-bundle": "^6.8.0",
"scheb/2fa-google-authenticator": "^6.8.0",
"scheb/2fa-trusted-device": "^6.8.0",
"scheb/2fa-backup-code": "^v7.11.0",
"scheb/2fa-bundle": "^v7.11.0",
"scheb/2fa-google-authenticator": "^v7.11.0",
"scheb/2fa-trusted-device": "^v7.11.0",
"shivas/versioning-bundle": "^4.0",
"spatie/db-dumper": "^3.3.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "6.3.*",
"symfony/console": "6.3.*",
"symfony/dotenv": "6.3.*",
"symfony/expression-language": "6.3.*",
"symfony/asset": "7.3.*",
"symfony/console": "7.3.*",
"symfony/css-selector": "7.3.*",
"symfony/dom-crawler": "7.3.*",
"symfony/dotenv": "7.3.*",
"symfony/expression-language": "7.3.*",
"symfony/flex": "^v2.3.1",
"symfony/form": "6.3.*",
"symfony/framework-bundle": "6.3.*",
"symfony/http-client": "6.3.*",
"symfony/http-kernel": "6.3.*",
"symfony/mailer": "6.3.*",
"symfony/form": "7.3.*",
"symfony/framework-bundle": "7.3.*",
"symfony/http-client": "7.3.*",
"symfony/http-kernel": "7.3.*",
"symfony/mailer": "7.3.*",
"symfony/monolog-bundle": "^3.1",
"symfony/process": "6.3.*",
"symfony/property-access": "6.3.*",
"symfony/property-info": "6.3.*",
"symfony/proxy-manager-bridge": "6.3.*",
"symfony/rate-limiter": "6.3.*",
"symfony/runtime": "6.3.*",
"symfony/security-bundle": "6.3.*",
"symfony/serializer": "6.3.*",
"symfony/string": "6.3.*",
"symfony/translation": "6.3.*",
"symfony/twig-bundle": "6.3.*",
"symfony/polyfill-php82": "^1.28",
"symfony/process": "7.3.*",
"symfony/property-access": "7.3.*",
"symfony/property-info": "7.3.*",
"symfony/rate-limiter": "7.3.*",
"symfony/runtime": "7.3.*",
"symfony/security-bundle": "7.3.*",
"symfony/serializer": "7.3.*",
"symfony/string": "7.3.*",
"symfony/translation": "7.3.*",
"symfony/twig-bundle": "7.3.*",
"symfony/ux-translator": "^2.10",
"symfony/ux-turbo": "^2.0",
"symfony/validator": "6.3.*",
"symfony/web-link": "6.3.*",
"symfony/validator": "7.3.*",
"symfony/web-link": "7.3.*",
"symfony/webpack-encore-bundle": "^v2.0.1",
"symfony/yaml": "6.3.*",
"tecnickcom/tc-lib-barcode": "^1.15",
"symfony/yaml": "7.3.*",
"symplify/easy-coding-standard": "^12.5.20",
"tecnickcom/tc-lib-barcode": "^2.1.4",
"twig/cssinliner-extra": "^3.0",
"twig/extra-bundle": "^3.0",
"twig/html-extra": "^3.0",
"twig/extra-bundle": "^3.8",
"twig/html-extra": "^3.8",
"twig/inky-extra": "^3.0",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.0",
"web-auth/webauthn-symfony-bundle": "^4.0.0",
"webmozart/assert": "^1.4"
"twig/intl-extra": "^3.8",
"twig/markdown-extra": "^3.8",
"twig/string-extra": "^3.8",
"web-auth/webauthn-symfony-bundle": "^5.0.0"
},
"require-dev": {
"dama/doctrine-test-bundle": "^7.0",
"doctrine/doctrine-fixtures-bundle": "^3.2",
"ekino/phpstan-banned-code": "^v1.0.0",
"dama/doctrine-test-bundle": "^v8.0.0",
"doctrine/doctrine-fixtures-bundle": "^4.0.0",
"ekino/phpstan-banned-code": "^v3.0.0",
"jbtronics/translation-editor-bundle": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.4.7",
"phpstan/phpstan-doctrine": "^1.2.11",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/phpstan-symfony": "^1.1.7",
"phpunit/phpunit": "^9.5",
"psalm/plugin-symfony": "^v5.0.1",
"rector/rector": "^0.18.0",
"phpstan/phpstan": "^2.0.4",
"phpstan/phpstan-doctrine": "^2.0.1",
"phpstan/phpstan-strict-rules": "^2.0.1",
"phpstan/phpstan-symfony": "^2.0.0",
"phpunit/phpunit": "^11.5.0",
"rector/rector": "^2.0.4",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "6.3.*",
"symfony/css-selector": "6.3.*",
"symfony/debug-bundle": "6.3.*",
"symfony/browser-kit": "7.3.*",
"symfony/debug-bundle": "7.3.*",
"symfony/maker-bundle": "^1.13",
"symfony/phpunit-bridge": "6.3.*",
"symfony/stopwatch": "6.3.*",
"symfony/web-profiler-bundle": "6.3.*",
"symplify/easy-coding-standard": "^12.0",
"vimeo/psalm": "^5.6.0"
"symfony/phpunit-bridge": "7.3.*",
"symfony/stopwatch": "7.3.*",
"symfony/web-profiler-bundle": "7.3.*"
},
"suggest": {
"ext-bcmath": "Used to improve price calculation performance",
@ -121,7 +127,7 @@
"*": "dist"
},
"platform": {
"php": "8.1.0"
"php": "8.2.0"
},
"sort-packages": true,
"allow-plugins": {
@ -153,7 +159,7 @@
"post-update-cmd": [
"@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": {
"symfony/symfony": "*"
@ -161,7 +167,8 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.3.*"
"require": "7.3.*",
"docker": true
}
}
}

13423
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>
<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>
You can now set the banner text directly in the admin interface, or by setting the `BANNER` environment variable.

View file

@ -18,13 +18,11 @@ return [
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true],
Translation\Bundle\TranslationBundle::class => ['all' => true],
Florianv\SwapBundle\FlorianvSwapBundle::class => ['all' => true],
Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true],
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
Jbtronics\TFAWebauthn\TFAWebauthnBundle::class => ['all' => true],
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
SpomkyLabs\CborBundle\SpomkyLabsCborBundle::class => ['all' => true],
Webauthn\Bundle\WebauthnBundle::class => ['all' => true],
Nbgrp\OneloginSamlBundle\NbgrpOneloginSamlBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
@ -32,5 +30,7 @@ return [
Jbtronics\DompdfFontLoaderBundle\DompdfFontLoaderBundle::class => ['all' => true],
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Jbtronics\SettingsBundle\JbtronicsSettingsBundle::class => ['all' => true],
Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
];

View file

@ -1,14 +1,18 @@
api_platform:
title: 'Part-DB API'
description: 'API of Part-DB'
version: '0.1.0'
# eager_loading:
# max_joins: 100
formats:
jsonld: ['application/ld+json']
json: ['application/json']
jsonapi: ['application/vnd.api+json']
keep_legacy_inflector: false
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
json: ['application/vnd.openapi+json']
swagger:
api_keys:
@ -24,5 +28,13 @@ api_platform:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
pagination_client_items_per_page: true # Allow clients to override the default items per page
# Need to be true, or some tests will fail
use_symfony_listeners: true
serializer:
# Change this to false later, to remove the hydra prefix on the API
hydra_prefix: 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

@ -0,0 +1,5 @@
when@test:
dama_doctrine_test:
enable_static_connection: true
enable_static_meta_data_cache: true
enable_static_query_cache: true

View file

@ -8,17 +8,17 @@ datatables:
# Set options, as documented at https://datatables.net/reference/option/
options:
lengthMenu : [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
pageLength: '%partdb.table.default_page_size%' # Set to -1 to disable pagination (i.e. show all rows) by default
#dom: "<'row' <'col-sm-12' tr>><'row' <'col-sm-6'l><'col-sm-6 text-right'pif>>"
dom: " <'row'<'col mb-2 input-group' B l> <'col mb-2' <'pull-end' p>>>
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: 50 #TODO
dom: " <'row' <'col mb-2 input-group flex-nowrap' B l > <'col-auto mb-2' < p >>>
<'card'
rt
<'card-footer card-footer-table text-muted' i >
>
<'row'<'col mt-2 input-group' B l> <'col mt-2' <'pull-right' p>>>"
<'row' <'col mt-2 input-group flex-nowrap' B l > <'col-auto mt-2' < p >>>"
pagingType: 'simple_numbers'
searching: true
searching: false
stateSave: true

View file

@ -1,5 +0,0 @@
translation:
symfony_profiler:
enabled: true
webui:
enabled: 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

@ -2,14 +2,24 @@ doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# Required for DAMA doctrine test bundle
use_savepoints: true
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
types:
# UTC datetimes
datetime:
class: App\Doctrine\Types\UTCDateTimeType
date:
class: App\Doctrine\Types\UTCDateTimeType
datetime_immutable:
class: App\Doctrine\Types\UTCDateTimeImmutableType
date_immutable:
class: App\Doctrine\Types\UTCDateTimeImmutableType
big_decimal:
class: App\Doctrine\Types\BigDecimalType
tinyint:
@ -25,21 +35,27 @@ doctrine:
report_fields_where_declared: true
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
identity_generation_preferences:
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
auto_mapping: true
controller_resolver:
auto_mapping: true
mappings:
App:
is_bundle: false
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
dql:
string_functions:
regexp: DoctrineExtensions\Query\Mysql\Regexp
ifnull: DoctrineExtensions\Query\Mysql\IfNull
regexp: App\Doctrine\Functions\Regexp
field: DoctrineExtensions\Query\Mysql\Field
field2: App\Doctrine\Functions\Field2
natsort: App\Doctrine\Functions\Natsort
array_position: App\Doctrine\Functions\ArrayPosition
ilike: App\Doctrine\Functions\ILike
when@test:
doctrine:

View file

@ -1,10 +1,8 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
csrf_protection: true
handle_all_throwables: true
# We set this header by ourself, so we can disable it here
# We set this header by ourselves, so we can disable it here
disallow_search_engine_index: false
# Must be set to true, to enable the change of HTTP method via _method parameter, otherwise our delete routines does not work anymore
@ -26,12 +24,14 @@ framework:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native
#esi: true
#fragments: true
php_errors:
log: true
form: { csrf_protection: { token_id: 'submit' } }
csrf_protection:
stateless_token_ids: ['submit', 'authenticate', 'logout']
when@test:
framework:

View file

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

View file

@ -50,7 +50,6 @@ when@prod:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
@ -70,11 +69,11 @@ when@docker:
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
include_stacktraces: true
channels: ["!deprecation"]
nested:
type: stream
path: "php://stderr"
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false

View file

@ -32,7 +32,7 @@ nbgrp_onelogin_saml:
privateKey: '%env(string:default:saml.sp.privateKey:string:SAMLP_SP_PRIVATE_KEY)%'
# Optional settings
#baseurl: 'http://myapp.com'
baseurl: '%partdb.default_uri%saml/'
strict: true
debug: false
security:

View file

@ -20,12 +20,6 @@ nelmio_security:
- 'digikey.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,
# only send the origin of the document to secure destination (HTTPS->HTTPS),
# and send no header to a less secure destination (HTTPS->HTTP).
@ -51,12 +45,16 @@ nelmio_security:
img-src:
- '*'
- 'data:'
# Required for be able to load pictures in the QR code scanner
- 'blob:'
style-src:
- 'self'
- 'unsafe-inline'
- 'data:'
script-src:
- 'self'
# Required for loading the Wasm for the barcode scanner:
- 'wasm-unsafe-eval'
object-src:
- 'self'
- 'data:'
@ -65,9 +63,3 @@ nelmio_security:
- 'data:'
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
when@dev:
# disables the Content-Security-Policy header
nelmio_security:
csp:
enabled: false

View file

@ -1,11 +0,0 @@
translation:
locales: ["en", "de"]
edit_in_place:
enabled: false
config_name: app
configs:
app:
dirs: ["%kernel.project_dir%/templates", "%kernel.project_dir%/src"]
output_dir: "%kernel.project_dir%/translations"
excluded_names: ["*TestCase.php", "*Test.php"]
excluded_dirs: [cache, data, logs]

View file

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

View file

@ -1,7 +1,5 @@
framework:
router:
utf8: true
# 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
default_uri: '%env(DEFAULT_URI)%'

View file

@ -6,7 +6,7 @@ scheb_two_factor:
server_name: '$$DOMAIN$$' # This field is replaced by the domain name of the server in DecoratedGoogleAuthenticator
issuer: '%partdb.title%' # Issuer name used in QR code
digits: 6 # Number of digits in authentication code
window: 1 # How many codes before/after the current one would be accepted as valid
leeway: 5 # Acceptable time drift in seconds
template: security/2fa_form.html.twig
backup_codes:

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