adminforth 1.2.42 → 1.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.js +5 -0
  2. package/dist/spa/index.html +4 -4
  3. package/dist/spa/package-lock.json +206 -5
  4. package/dist/spa/package.json +8 -2
  5. package/dist/spa/public/assets/favicon.png +0 -0
  6. package/dist/spa/src/App.vue +171 -72
  7. package/dist/spa/src/assets/logo.svg +19 -1
  8. package/dist/spa/src/components/AcceptModal.vue +3 -10
  9. package/dist/spa/src/components/BreadcrumbsWithButtons.vue +1 -1
  10. package/dist/spa/src/components/CustomDatePicker.vue +19 -6
  11. package/dist/spa/src/components/CustomDateRangePicker.vue +14 -5
  12. package/dist/spa/src/components/CustomRangePicker.vue +148 -0
  13. package/dist/spa/src/components/Dropdown.vue +19 -5
  14. package/dist/spa/src/components/Filters.vue +91 -37
  15. package/dist/spa/src/components/MenuLink.vue +2 -2
  16. package/dist/spa/src/components/ResourceForm.vue +163 -103
  17. package/dist/spa/src/components/ResourceListTable.vue +419 -0
  18. package/dist/spa/src/components/Toast.vue +66 -0
  19. package/dist/spa/src/components/ValueRenderer.vue +22 -6
  20. package/dist/spa/src/composables/useFrontendApi.ts +26 -0
  21. package/dist/spa/src/composables/useStores.ts +113 -0
  22. package/dist/spa/src/main.ts +1 -1
  23. package/dist/spa/src/router/index.ts +30 -19
  24. package/dist/spa/src/spa_types/core.ts +51 -0
  25. package/dist/spa/src/stores/core.ts +65 -59
  26. package/dist/spa/src/stores/filters.ts +22 -0
  27. package/dist/spa/src/stores/modal.ts +13 -3
  28. package/dist/spa/src/stores/toast.ts +15 -0
  29. package/dist/spa/src/stores/user.ts +54 -0
  30. package/dist/spa/src/utils.ts +65 -8
  31. package/dist/spa/src/views/CreateView.vue +76 -16
  32. package/dist/spa/src/views/EditView.vue +76 -14
  33. package/dist/spa/src/views/ListView.vue +88 -360
  34. package/dist/spa/src/views/LoginView.vue +17 -5
  35. package/dist/spa/src/views/ResourceParent.vue +1 -1
  36. package/dist/spa/src/views/ShowView.vue +114 -19
  37. package/dist/spa/tailwind.config.js +5 -2
  38. package/dist/spa/vite.config.ts +6 -0
  39. package/index.ts +5 -0
  40. package/package.json +1 -1
  41. package/dist/spa/public/favicon.ico +0 -0
  42. package/dist/spa/spa/public/favicon.ico +0 -0
  43. package/dist/spa/spa/src/views/HomeView.vue +0 -8
  44. package/dist/spa/src/views/HomeView.vue +0 -8
  45. package/dist/types.js +0 -30
package/dist/index.js CHANGED
@@ -54,6 +54,11 @@ class AdminForth {
54
54
  for (let resource of this.config.resources) {
55
55
  for (let pluginInstance of resource.plugins || []) {
56
56
  pluginInstance.modifyResourceConfig(this, resource);
57
+ const plugin = this.activatedPlugins.find((p) => p.pluginInstanceId === pluginInstance.pluginInstanceId);
58
+ if (plugin) {
59
+ throw new Error(`Attempt to activate Plugin ${pluginInstance.constructor.name} second time for same resource, but plugin does not support it.
60
+ Tu support multiple plugin instance pre one resource, plugin should return unique string values for each installation from instanceUniqueRepresentation`);
61
+ }
57
62
  this.activatedPlugins.push(pluginInstance);
58
63
  }
59
64
  }
@@ -2,9 +2,9 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
- <link rel="icon" href="/favicon.ico">
5
+ <link rel="icon" href="/* IMPORTANT:ADMINFORTH FAVICON */">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Vite App</title>
7
+ <title>/* IMPORTANT:ADMINFORTH TITLE */</title>
8
8
  <!--
9
9
  <script>
10
10
  // On page load or when changing themes, best to add inline in `head` to avoid FOUC
@@ -16,8 +16,8 @@
16
16
  </script> -->
17
17
 
18
18
  </head>
19
- <body>
20
- <div id="app" class="min-h-screen dark:bg-gray-800"></div>
19
+ <body class=" ">
20
+ <div id="app" class="min-h-screen bg-html-bg dark:bg-gray-800"></div>
21
21
  <script type="module" src="/src/main.ts"></script>
22
22
  </body>
23
23
  </html>
@@ -9,12 +9,18 @@
9
9
  "version": "0.0.0",
10
10
  "dependencies": {
11
11
  "@iconify-prerendered/vue-flowbite": "^0.23.1714023977",
12
+ "@unhead/vue": "^1.9.12",
13
+ "@vueuse/core": "^10.10.0",
12
14
  "dayjs": "^1.11.11",
15
+ "debounce": "^2.1.0",
13
16
  "flowbite": "^2.3.0",
14
17
  "flowbite-datepicker": "^1.2.6",
15
18
  "pinia": "^2.1.7",
19
+ "unhead": "^1.9.12",
20
+ "uuid": "^10.0.0",
16
21
  "vue": "^3.4.21",
17
- "vue-router": "^4.3.0"
22
+ "vue-router": "^4.3.0",
23
+ "vue-slider-component": "^4.1.0-beta.7"
18
24
  },
19
25
  "devDependencies": {
20
26
  "@rushstack/eslint-patch": "^1.8.0",
@@ -31,7 +37,7 @@
31
37
  "sass": "^1.77.2",
32
38
  "tailwindcss": "^3.4.3",
33
39
  "typescript": "~5.4.0",
34
- "vite": "^5.2.12",
40
+ "vite": "^5.2.13",
35
41
  "vue-tsc": "^2.0.11"
36
42
  }
37
43
  },
@@ -950,6 +956,11 @@
950
956
  "undici-types": "~5.26.4"
951
957
  }
952
958
  },
959
+ "node_modules/@types/web-bluetooth": {
960
+ "version": "0.0.20",
961
+ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
962
+ "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="
963
+ },
953
964
  "node_modules/@typescript-eslint/eslint-plugin": {
954
965
  "version": "7.9.0",
955
966
  "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz",
@@ -1141,6 +1152,58 @@
1141
1152
  "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
1142
1153
  "dev": true
1143
1154
  },
1155
+ "node_modules/@unhead/dom": {
1156
+ "version": "1.9.12",
1157
+ "resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.9.12.tgz",
1158
+ "integrity": "sha512-3MY1TbZmEjGNZapi3wvJW0vWNS2CLKHt7/m57sScDHCNvNBe1mTwrIOhtZFDgAndhml2EVQ68RMa0Vhum/M+cw==",
1159
+ "dependencies": {
1160
+ "@unhead/schema": "1.9.12",
1161
+ "@unhead/shared": "1.9.12"
1162
+ },
1163
+ "funding": {
1164
+ "url": "https://github.com/sponsors/harlan-zw"
1165
+ }
1166
+ },
1167
+ "node_modules/@unhead/schema": {
1168
+ "version": "1.9.12",
1169
+ "resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.9.12.tgz",
1170
+ "integrity": "sha512-ue2FKyIZKsuZDpWJBMlBGwMm4s+vFeU3NUWsNt8Z+2JkOUIqO/VG43LxNgY1M595bOS71Gdxk+G9VtzfKJ5uEA==",
1171
+ "dependencies": {
1172
+ "hookable": "^5.5.3",
1173
+ "zhead": "^2.2.4"
1174
+ },
1175
+ "funding": {
1176
+ "url": "https://github.com/sponsors/harlan-zw"
1177
+ }
1178
+ },
1179
+ "node_modules/@unhead/shared": {
1180
+ "version": "1.9.12",
1181
+ "resolved": "https://registry.npmjs.org/@unhead/shared/-/shared-1.9.12.tgz",
1182
+ "integrity": "sha512-72wlLXG3FP3sXUrwd42Uv8jYpHSg4R6IFJcsl+QisRjKM89JnjOFSw1DqWO4IOftW5xOxS4J5v7SQyJ4NJo7Bw==",
1183
+ "dependencies": {
1184
+ "@unhead/schema": "1.9.12"
1185
+ },
1186
+ "funding": {
1187
+ "url": "https://github.com/sponsors/harlan-zw"
1188
+ }
1189
+ },
1190
+ "node_modules/@unhead/vue": {
1191
+ "version": "1.9.12",
1192
+ "resolved": "https://registry.npmjs.org/@unhead/vue/-/vue-1.9.12.tgz",
1193
+ "integrity": "sha512-keE4EuswgzCqVU7zmZprU+ToMvNWc3s8NoLreH5AtJd2u0FgBygD8sxRVyEnZw1KwFYOJ2C7yD2TChSKZioPGQ==",
1194
+ "dependencies": {
1195
+ "@unhead/schema": "1.9.12",
1196
+ "@unhead/shared": "1.9.12",
1197
+ "hookable": "^5.5.3",
1198
+ "unhead": "1.9.12"
1199
+ },
1200
+ "funding": {
1201
+ "url": "https://github.com/sponsors/harlan-zw"
1202
+ },
1203
+ "peerDependencies": {
1204
+ "vue": ">=2.7 || >=3"
1205
+ }
1206
+ },
1144
1207
  "node_modules/@vitejs/plugin-vue": {
1145
1208
  "version": "5.0.4",
1146
1209
  "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz",
@@ -1330,6 +1393,89 @@
1330
1393
  "integrity": "sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==",
1331
1394
  "dev": true
1332
1395
  },
1396
+ "node_modules/@vueuse/core": {
1397
+ "version": "10.10.0",
1398
+ "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.10.0.tgz",
1399
+ "integrity": "sha512-vexJ/YXYs2S42B783rI95lMt3GzEwkxzC8Hb0Ndpd8rD+p+Lk/Za4bd797Ym7yq4jXqdSyj3JLChunF/vyYjUw==",
1400
+ "dependencies": {
1401
+ "@types/web-bluetooth": "^0.0.20",
1402
+ "@vueuse/metadata": "10.10.0",
1403
+ "@vueuse/shared": "10.10.0",
1404
+ "vue-demi": ">=0.14.7"
1405
+ },
1406
+ "funding": {
1407
+ "url": "https://github.com/sponsors/antfu"
1408
+ }
1409
+ },
1410
+ "node_modules/@vueuse/core/node_modules/vue-demi": {
1411
+ "version": "0.14.8",
1412
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
1413
+ "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
1414
+ "hasInstallScript": true,
1415
+ "bin": {
1416
+ "vue-demi-fix": "bin/vue-demi-fix.js",
1417
+ "vue-demi-switch": "bin/vue-demi-switch.js"
1418
+ },
1419
+ "engines": {
1420
+ "node": ">=12"
1421
+ },
1422
+ "funding": {
1423
+ "url": "https://github.com/sponsors/antfu"
1424
+ },
1425
+ "peerDependencies": {
1426
+ "@vue/composition-api": "^1.0.0-rc.1",
1427
+ "vue": "^3.0.0-0 || ^2.6.0"
1428
+ },
1429
+ "peerDependenciesMeta": {
1430
+ "@vue/composition-api": {
1431
+ "optional": true
1432
+ }
1433
+ }
1434
+ },
1435
+ "node_modules/@vueuse/metadata": {
1436
+ "version": "10.10.0",
1437
+ "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.10.0.tgz",
1438
+ "integrity": "sha512-UNAo2sTCAW5ge6OErPEHb5z7NEAg3XcO9Cj7OK45aZXfLLH1QkexDcZD77HBi5zvEiLOm1An+p/4b5K3Worpug==",
1439
+ "funding": {
1440
+ "url": "https://github.com/sponsors/antfu"
1441
+ }
1442
+ },
1443
+ "node_modules/@vueuse/shared": {
1444
+ "version": "10.10.0",
1445
+ "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.10.0.tgz",
1446
+ "integrity": "sha512-2aW33Ac0Uk0U+9yo3Ypg9s5KcR42cuehRWl7vnUHadQyFvCktseyxxEPBi1Eiq4D2yBGACOnqLZpx1eMc7g5Og==",
1447
+ "dependencies": {
1448
+ "vue-demi": ">=0.14.7"
1449
+ },
1450
+ "funding": {
1451
+ "url": "https://github.com/sponsors/antfu"
1452
+ }
1453
+ },
1454
+ "node_modules/@vueuse/shared/node_modules/vue-demi": {
1455
+ "version": "0.14.8",
1456
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
1457
+ "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
1458
+ "hasInstallScript": true,
1459
+ "bin": {
1460
+ "vue-demi-fix": "bin/vue-demi-fix.js",
1461
+ "vue-demi-switch": "bin/vue-demi-switch.js"
1462
+ },
1463
+ "engines": {
1464
+ "node": ">=12"
1465
+ },
1466
+ "funding": {
1467
+ "url": "https://github.com/sponsors/antfu"
1468
+ },
1469
+ "peerDependencies": {
1470
+ "@vue/composition-api": "^1.0.0-rc.1",
1471
+ "vue": "^3.0.0-0 || ^2.6.0"
1472
+ },
1473
+ "peerDependenciesMeta": {
1474
+ "@vue/composition-api": {
1475
+ "optional": true
1476
+ }
1477
+ }
1478
+ },
1333
1479
  "node_modules/acorn": {
1334
1480
  "version": "8.11.3",
1335
1481
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
@@ -1716,6 +1862,17 @@
1716
1862
  "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
1717
1863
  "dev": true
1718
1864
  },
1865
+ "node_modules/debounce": {
1866
+ "version": "2.1.0",
1867
+ "resolved": "https://registry.npmjs.org/debounce/-/debounce-2.1.0.tgz",
1868
+ "integrity": "sha512-OkL3+0pPWCqoBc/nhO9u6TIQNTK44fnBnzuVtJAbp13Naxw9R6u21x+8tVTka87AhDZ3htqZ2pSSsZl9fqL2Wg==",
1869
+ "engines": {
1870
+ "node": ">=18"
1871
+ },
1872
+ "funding": {
1873
+ "url": "https://github.com/sponsors/sindresorhus"
1874
+ }
1875
+ },
1719
1876
  "node_modules/debug": {
1720
1877
  "version": "4.3.4",
1721
1878
  "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -2369,6 +2526,11 @@
2369
2526
  "he": "bin/he"
2370
2527
  }
2371
2528
  },
2529
+ "node_modules/hookable": {
2530
+ "version": "5.5.3",
2531
+ "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz",
2532
+ "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ=="
2533
+ },
2372
2534
  "node_modules/ignore": {
2373
2535
  "version": "5.3.1",
2374
2536
  "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@@ -3812,6 +3974,20 @@
3812
3974
  "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
3813
3975
  "dev": true
3814
3976
  },
3977
+ "node_modules/unhead": {
3978
+ "version": "1.9.12",
3979
+ "resolved": "https://registry.npmjs.org/unhead/-/unhead-1.9.12.tgz",
3980
+ "integrity": "sha512-s6VxcTV45hy8c/IioKQOonFnAO+kBOSpgDfqEHhnU0YVSQYaRPEp9pzW1qSPf0lx+bg9RKeOQyNNbSGGUP26aQ==",
3981
+ "dependencies": {
3982
+ "@unhead/dom": "1.9.12",
3983
+ "@unhead/schema": "1.9.12",
3984
+ "@unhead/shared": "1.9.12",
3985
+ "hookable": "^5.5.3"
3986
+ },
3987
+ "funding": {
3988
+ "url": "https://github.com/sponsors/harlan-zw"
3989
+ }
3990
+ },
3815
3991
  "node_modules/update-browserslist-db": {
3816
3992
  "version": "1.0.16",
3817
3993
  "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz",
@@ -3857,10 +4033,22 @@
3857
4033
  "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
3858
4034
  "dev": true
3859
4035
  },
4036
+ "node_modules/uuid": {
4037
+ "version": "10.0.0",
4038
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
4039
+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
4040
+ "funding": [
4041
+ "https://github.com/sponsors/broofa",
4042
+ "https://github.com/sponsors/ctavan"
4043
+ ],
4044
+ "bin": {
4045
+ "uuid": "dist/bin/uuid"
4046
+ }
4047
+ },
3860
4048
  "node_modules/vite": {
3861
- "version": "5.2.12",
3862
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz",
3863
- "integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==",
4049
+ "version": "5.2.13",
4050
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.13.tgz",
4051
+ "integrity": "sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==",
3864
4052
  "dev": true,
3865
4053
  "dependencies": {
3866
4054
  "esbuild": "^0.20.1",
@@ -3970,6 +4158,11 @@
3970
4158
  "vue": "^3.2.0"
3971
4159
  }
3972
4160
  },
4161
+ "node_modules/vue-slider-component": {
4162
+ "version": "4.1.0-beta.7",
4163
+ "resolved": "https://registry.npmjs.org/vue-slider-component/-/vue-slider-component-4.1.0-beta.7.tgz",
4164
+ "integrity": "sha512-Qb7K920ZG7PoQswoF6Ias+i3W2rd3k4fpk04JUl82kEUcN86Yg6et7bVSKWt/7VpQe8a5IT3BqCKSCOZ7AJgCA=="
4165
+ },
3973
4166
  "node_modules/vue-template-compiler": {
3974
4167
  "version": "2.7.16",
3975
4168
  "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz",
@@ -4153,6 +4346,14 @@
4153
4346
  "funding": {
4154
4347
  "url": "https://github.com/sponsors/sindresorhus"
4155
4348
  }
4349
+ },
4350
+ "node_modules/zhead": {
4351
+ "version": "2.2.4",
4352
+ "resolved": "https://registry.npmjs.org/zhead/-/zhead-2.2.4.tgz",
4353
+ "integrity": "sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==",
4354
+ "funding": {
4355
+ "url": "https://github.com/sponsors/harlan-zw"
4356
+ }
4156
4357
  }
4157
4358
  }
4158
4359
  }
@@ -13,12 +13,18 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@iconify-prerendered/vue-flowbite": "^0.23.1714023977",
16
+ "@unhead/vue": "^1.9.12",
17
+ "@vueuse/core": "^10.10.0",
16
18
  "dayjs": "^1.11.11",
19
+ "debounce": "^2.1.0",
17
20
  "flowbite": "^2.3.0",
18
21
  "flowbite-datepicker": "^1.2.6",
19
22
  "pinia": "^2.1.7",
23
+ "unhead": "^1.9.12",
24
+ "uuid": "^10.0.0",
20
25
  "vue": "^3.4.21",
21
- "vue-router": "^4.3.0"
26
+ "vue-router": "^4.3.0",
27
+ "vue-slider-component": "^4.1.0-beta.7"
22
28
  },
23
29
  "devDependencies": {
24
30
  "@rushstack/eslint-patch": "^1.8.0",
@@ -35,7 +41,7 @@
35
41
  "sass": "^1.77.2",
36
42
  "tailwindcss": "^3.4.3",
37
43
  "typescript": "~5.4.0",
38
- "vite": "^5.2.12",
44
+ "vite": "^5.2.13",
39
45
  "vue-tsc": "^2.0.11"
40
46
  }
41
47
  }