2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

PUI Template editor (#6541)

* Added first POC for label editor

* Added preview item selection

* Split code

* Fix import

* Use liquid lang and added custom tooltips

* Auto load first item for preview and add BOM part assembly filter

* Make the save&reload action more obvious

* Make save optional and use server stored template

* Fix icons and inherit model url

* Add label/report extra fields to serializer and default templates

* Bump api version to v176

* Remove generic and pass template to editor

* Added error overlay

* Moved default tempaltes in default folder

* Only show detail drawer back button if necessary

* Rename action dropdown disabled to hidden and add loading disabled to template editor

* Fix types

* Add icons to editor/preview tabs

* Add draggable split pane and make editors use full height

* Add SplitButton component

* add code editor tag description

* fix related model field if empty string

* remove debug console.log

* move code editor/pdf preview into their own folder

* Update api_version.py

* add support for multiple editors

* fix template editor error handleing while loading/saving code

* add documentation for the template editor
This commit is contained in:
Lukas
2024-03-04 21:58:12 +01:00
committed by GitHub
parent 950bda4ef6
commit e4d2e2f96b
40 changed files with 1932 additions and 150 deletions

View File

@ -11,6 +11,7 @@
"compile": "lingui compile --typescript"
},
"dependencies": {
"@codemirror/lang-liquid": "^6.2.1",
"@emotion/react": "^11.11.1",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-regular-svg-icons": "^6.4.2",
@ -30,6 +31,9 @@
"@sentry/react": "^7.74.1",
"@tabler/icons-react": "^2.39.0",
"@tanstack/react-query": "^5.0.0",
"@uiw/codemirror-theme-vscode": "^4.21.22",
"@uiw/react-codemirror": "^4.21.22",
"@uiw/react-split": "^5.9.3",
"axios": "^1.6.0",
"dayjs": "^1.11.10",
"easymde": "^2.18.0",