adminforth 1.3.54-next.9 → 1.3.55-next.2
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.
- package/dist/auth.d.ts +31 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +42 -56
- package/dist/auth.js.map +1 -0
- package/dist/basePlugin.d.ts +18 -0
- package/dist/basePlugin.d.ts.map +1 -0
- package/dist/basePlugin.js +1 -0
- package/dist/basePlugin.js.map +1 -0
- package/dist/dataConnectors/baseConnector.d.ts +94 -0
- package/dist/dataConnectors/baseConnector.d.ts.map +1 -0
- package/dist/dataConnectors/baseConnector.js +108 -122
- package/dist/dataConnectors/baseConnector.js.map +1 -0
- package/dist/dataConnectors/clickhouse.d.ts +92 -0
- package/dist/dataConnectors/clickhouse.d.ts.map +1 -0
- package/dist/dataConnectors/clickhouse.js +132 -149
- package/dist/dataConnectors/clickhouse.js.map +1 -0
- package/dist/dataConnectors/mongo.d.ts +93 -0
- package/dist/dataConnectors/mongo.d.ts.map +1 -0
- package/dist/dataConnectors/mongo.js +75 -101
- package/dist/dataConnectors/mongo.js.map +1 -0
- package/dist/dataConnectors/postgres.d.ts +71 -0
- package/dist/dataConnectors/postgres.d.ts.map +1 -0
- package/dist/dataConnectors/postgres.js +124 -143
- package/dist/dataConnectors/postgres.js.map +1 -0
- package/dist/dataConnectors/sqlite.d.ts +67 -0
- package/dist/dataConnectors/sqlite.d.ts.map +1 -0
- package/dist/dataConnectors/sqlite.js +113 -130
- package/dist/dataConnectors/sqlite.js.map +1 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +197 -217
- package/dist/index.js.map +1 -0
- package/dist/modules/codeInjector.d.ts +35 -0
- package/dist/modules/codeInjector.d.ts.map +1 -0
- package/dist/modules/codeInjector.js +480 -486
- package/dist/modules/codeInjector.js.map +1 -0
- package/dist/modules/configValidator.d.ts +12 -0
- package/dist/modules/configValidator.d.ts.map +1 -0
- package/dist/modules/configValidator.js +31 -22
- package/dist/modules/configValidator.js.map +1 -0
- package/dist/modules/operationalResource.d.ts +17 -0
- package/dist/modules/operationalResource.d.ts.map +1 -0
- package/dist/modules/operationalResource.js +50 -70
- package/dist/modules/operationalResource.js.map +1 -0
- package/dist/modules/restApi.d.ts +10 -0
- package/dist/modules/restApi.d.ts.map +1 -0
- package/dist/modules/restApi.js +104 -116
- package/dist/modules/restApi.js.map +1 -0
- package/dist/modules/styleGenerator.d.ts +9 -0
- package/dist/modules/styleGenerator.d.ts.map +1 -0
- package/dist/modules/styleGenerator.js +1 -0
- package/dist/modules/styleGenerator.js.map +1 -0
- package/dist/modules/styles.d.ts +96 -0
- package/dist/modules/styles.d.ts.map +1 -0
- package/dist/modules/styles.js +1 -0
- package/dist/modules/styles.js.map +1 -0
- package/dist/modules/utils.d.ts +39 -0
- package/dist/modules/utils.d.ts.map +1 -0
- package/dist/modules/utils.js +1 -0
- package/dist/modules/utils.js.map +1 -0
- package/dist/plugins/audit-log/types.d.ts +35 -0
- package/dist/plugins/audit-log/types.d.ts.map +1 -0
- package/dist/plugins/audit-log/types.js +2 -0
- package/dist/plugins/audit-log/types.js.map +1 -0
- package/dist/plugins/chat-gpt/types.d.ts +82 -0
- package/dist/plugins/chat-gpt/types.d.ts.map +1 -0
- package/dist/plugins/chat-gpt/types.js +2 -0
- package/dist/plugins/chat-gpt/types.js.map +1 -0
- package/dist/plugins/email-password-reset/types.d.ts +28 -0
- package/dist/plugins/email-password-reset/types.d.ts.map +1 -0
- package/dist/plugins/email-password-reset/types.js +2 -0
- package/dist/plugins/email-password-reset/types.js.map +1 -0
- package/dist/plugins/foreign-inline-list/types.d.ts +19 -0
- package/dist/plugins/foreign-inline-list/types.d.ts.map +1 -0
- package/dist/plugins/foreign-inline-list/types.js +2 -0
- package/dist/plugins/foreign-inline-list/types.js.map +1 -0
- package/dist/plugins/import-export/types.d.ts +3 -0
- package/dist/plugins/import-export/types.d.ts.map +1 -0
- package/dist/plugins/import-export/types.js +2 -0
- package/dist/plugins/import-export/types.js.map +1 -0
- package/dist/plugins/rich-editor/custom/async-queue.d.ts +8 -0
- package/dist/plugins/rich-editor/custom/async-queue.d.ts.map +1 -0
- package/dist/plugins/rich-editor/custom/async-queue.js +29 -0
- package/dist/plugins/rich-editor/custom/async-queue.js.map +1 -0
- package/dist/plugins/rich-editor/dist/custom/async-queue.d.ts +8 -0
- package/dist/plugins/rich-editor/dist/custom/async-queue.d.ts.map +1 -0
- package/dist/plugins/rich-editor/dist/custom/async-queue.js +29 -0
- package/dist/plugins/rich-editor/dist/custom/async-queue.js.map +1 -0
- package/dist/plugins/rich-editor/types.d.ts +153 -0
- package/dist/plugins/rich-editor/types.d.ts.map +1 -0
- package/dist/plugins/rich-editor/types.js +16 -0
- package/dist/plugins/rich-editor/types.js.map +1 -0
- package/dist/plugins/two-factors-auth/types.d.ts +18 -0
- package/dist/plugins/two-factors-auth/types.d.ts.map +1 -0
- package/dist/plugins/two-factors-auth/types.js +2 -0
- package/dist/plugins/two-factors-auth/types.js.map +1 -0
- package/dist/plugins/upload/types.d.ts +132 -0
- package/dist/plugins/upload/types.d.ts.map +1 -0
- package/dist/plugins/upload/types.js +2 -0
- package/dist/plugins/upload/types.js.map +1 -0
- package/dist/servers/express.d.ts +18 -0
- package/dist/servers/express.d.ts.map +1 -0
- package/dist/servers/express.js +30 -42
- package/dist/servers/express.js.map +1 -0
- package/dist/spa/index.html +2 -2
- package/dist/spa/package-lock.json +87 -1
- package/dist/spa/package.json +4 -1
- package/dist/spa/src/App.vue +154 -50
- package/dist/spa/src/components/AcceptModal.vue +1 -1
- package/dist/spa/src/components/Breadcrumbs.vue +1 -1
- package/dist/spa/src/components/CustomDatePicker.vue +1 -1
- package/dist/spa/src/components/CustomDateRangePicker.vue +1 -1
- package/dist/spa/src/components/CustomRangePicker.vue +9 -5
- package/dist/spa/src/components/Dropdown.vue +4 -4
- package/dist/spa/src/components/Filters.vue +2 -2
- package/dist/spa/src/components/MenuLink.vue +3 -0
- package/dist/spa/src/components/ResourceForm.vue +67 -36
- package/dist/spa/src/components/ResourceListTable.vue +216 -144
- package/dist/spa/src/components/SkeleteLoader.vue +4 -4
- package/dist/spa/src/components/Toast.vue +3 -2
- package/dist/spa/src/components/ValueRenderer.vue +81 -6
- package/dist/spa/src/composables/useFrontendApi.ts +1 -1
- package/dist/spa/src/composables/useStores.ts +18 -14
- package/dist/spa/src/index.scss +4 -0
- package/{spa → dist/spa}/src/renderers/CompactUUID.vue +4 -4
- package/{spa → dist/spa}/src/renderers/CountryFlag.vue +2 -2
- package/dist/spa/src/router/index.ts +4 -8
- package/dist/spa/src/spa_types/core.ts +2 -0
- package/dist/spa/src/stores/core.ts +6 -2
- package/dist/spa/src/stores/filters.ts +15 -10
- package/dist/spa/src/stores/toast.ts +22 -6
- package/dist/spa/src/types/AdminForthConfig.ts +340 -55
- package/dist/spa/src/types/FrontendAPI.ts +52 -30
- package/dist/spa/src/utils.ts +59 -2
- package/dist/spa/src/views/CreateView.vue +15 -4
- package/dist/spa/src/views/EditView.vue +20 -7
- package/dist/spa/src/views/ListView.vue +132 -38
- package/dist/spa/src/views/LoginView.vue +50 -18
- package/dist/spa/src/views/ShowView.vue +25 -15
- package/dist/types/AdminForthConfig.d.ts +1619 -0
- package/dist/types/AdminForthConfig.d.ts.map +1 -0
- package/dist/types/AdminForthConfig.js +1 -0
- package/dist/types/AdminForthConfig.js.map +1 -0
- package/{types/FrontendAPI.ts → dist/types/FrontendAPI.d.ts} +27 -52
- package/dist/types/FrontendAPI.d.ts.map +1 -0
- package/dist/types/FrontendAPI.js +1 -0
- package/dist/types/FrontendAPI.js.map +1 -0
- package/package.json +16 -6
- package/auth.ts +0 -140
- package/basePlugin.ts +0 -70
- package/dataConnectors/baseConnector.ts +0 -216
- package/dataConnectors/clickhouse.ts +0 -338
- package/dataConnectors/mongo.ts +0 -202
- package/dataConnectors/postgres.ts +0 -306
- package/dataConnectors/sqlite.ts +0 -254
- package/index.ts +0 -428
- package/modules/codeInjector.ts +0 -736
- package/modules/configValidator.ts +0 -571
- package/modules/operationalResource.ts +0 -98
- package/modules/restApi.ts +0 -718
- package/modules/styleGenerator.ts +0 -55
- package/modules/styles.ts +0 -126
- package/modules/utils.ts +0 -472
- package/servers/express.ts +0 -259
- package/spa/.eslintrc.cjs +0 -14
- package/spa/README.md +0 -39
- package/spa/env.d.ts +0 -1
- package/spa/index.html +0 -23
- package/spa/package-lock.json +0 -4602
- package/spa/package.json +0 -51
- package/spa/postcss.config.js +0 -6
- package/spa/public/assets/favicon.png +0 -0
- package/spa/src/App.vue +0 -418
- package/spa/src/assets/base.css +0 -2
- package/spa/src/assets/logo.svg +0 -19
- package/spa/src/components/AcceptModal.vue +0 -45
- package/spa/src/components/Breadcrumbs.vue +0 -41
- package/spa/src/components/BreadcrumbsWithButtons.vue +0 -26
- package/spa/src/components/CustomDatePicker.vue +0 -176
- package/spa/src/components/CustomDateRangePicker.vue +0 -218
- package/spa/src/components/CustomRangePicker.vue +0 -156
- package/spa/src/components/Dropdown.vue +0 -168
- package/spa/src/components/Filters.vue +0 -222
- package/spa/src/components/HelloWorld.vue +0 -17
- package/spa/src/components/MenuLink.vue +0 -27
- package/spa/src/components/ResourceForm.vue +0 -290
- package/spa/src/components/ResourceListTable.vue +0 -466
- package/spa/src/components/SingleSkeletLoader.vue +0 -13
- package/spa/src/components/SkeleteLoader.vue +0 -23
- package/spa/src/components/Toast.vue +0 -78
- package/spa/src/components/ValueRenderer.vue +0 -114
- package/spa/src/components/icons/IconCalendar.vue +0 -5
- package/spa/src/components/icons/IconCommunity.vue +0 -7
- package/spa/src/components/icons/IconDocumentation.vue +0 -7
- package/spa/src/components/icons/IconEcosystem.vue +0 -7
- package/spa/src/components/icons/IconSupport.vue +0 -7
- package/spa/src/components/icons/IconTime.vue +0 -5
- package/spa/src/components/icons/IconTooling.vue +0 -19
- package/spa/src/composables/useFrontendApi.ts +0 -26
- package/spa/src/composables/useStores.ts +0 -131
- package/spa/src/index.scss +0 -31
- package/spa/src/main.ts +0 -18
- package/spa/src/router/index.ts +0 -59
- package/spa/src/spa_types/core.ts +0 -53
- package/spa/src/stores/core.ts +0 -148
- package/spa/src/stores/filters.ts +0 -27
- package/spa/src/stores/modal.ts +0 -48
- package/spa/src/stores/toast.ts +0 -31
- package/spa/src/stores/user.ts +0 -72
- package/spa/src/utils.ts +0 -160
- package/spa/src/views/CreateView.vue +0 -167
- package/spa/src/views/EditView.vue +0 -170
- package/spa/src/views/ListView.vue +0 -352
- package/spa/src/views/LoginView.vue +0 -192
- package/spa/src/views/ResourceParent.vue +0 -17
- package/spa/src/views/ShowView.vue +0 -186
- package/spa/tailwind.config.js +0 -17
- package/spa/tsconfig.app.json +0 -14
- package/spa/tsconfig.json +0 -11
- package/spa/tsconfig.node.json +0 -19
- package/spa/vite.config.ts +0 -56
- package/tsconfig.json +0 -112
- package/types/AdminForthConfig.ts +0 -1762
- /package/{spa → dist/spa}/src/components/ThreeDotsMenu.vue +0 -0
|
@@ -34,13 +34,16 @@
|
|
|
34
34
|
"autoprefixer": "^10.4.19",
|
|
35
35
|
"eslint": "^8.57.0",
|
|
36
36
|
"eslint-plugin-vue": "^9.23.0",
|
|
37
|
+
"flag-icons": "^7.2.3",
|
|
38
|
+
"i18n-iso-countries": "^7.12.0",
|
|
37
39
|
"npm-run-all2": "^6.1.2",
|
|
38
40
|
"postcss": "^8.4.38",
|
|
39
41
|
"sass": "^1.77.2",
|
|
40
42
|
"tailwindcss": "^3.4.3",
|
|
41
43
|
"typescript": "~5.4.0",
|
|
42
44
|
"vite": "^5.2.13",
|
|
43
|
-
"vue-tsc": "^2.0.11"
|
|
45
|
+
"vue-tsc": "^2.0.11",
|
|
46
|
+
"vue3-json-viewer": "^2.2.2"
|
|
44
47
|
}
|
|
45
48
|
},
|
|
46
49
|
"node_modules/@alloc/quick-lru": {
|
|
@@ -1783,6 +1786,18 @@
|
|
|
1783
1786
|
"node": ">= 6"
|
|
1784
1787
|
}
|
|
1785
1788
|
},
|
|
1789
|
+
"node_modules/clipboard": {
|
|
1790
|
+
"version": "2.0.11",
|
|
1791
|
+
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
|
|
1792
|
+
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
|
|
1793
|
+
"dev": true,
|
|
1794
|
+
"license": "MIT",
|
|
1795
|
+
"dependencies": {
|
|
1796
|
+
"good-listener": "^1.2.2",
|
|
1797
|
+
"select": "^1.1.2",
|
|
1798
|
+
"tiny-emitter": "^2.0.0"
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1786
1801
|
"node_modules/color-convert": {
|
|
1787
1802
|
"version": "2.0.1",
|
|
1788
1803
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
@@ -1906,6 +1921,20 @@
|
|
|
1906
1921
|
"node": ">=0.10.0"
|
|
1907
1922
|
}
|
|
1908
1923
|
},
|
|
1924
|
+
"node_modules/delegate": {
|
|
1925
|
+
"version": "3.2.0",
|
|
1926
|
+
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
|
|
1927
|
+
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==",
|
|
1928
|
+
"dev": true,
|
|
1929
|
+
"license": "MIT"
|
|
1930
|
+
},
|
|
1931
|
+
"node_modules/diacritics": {
|
|
1932
|
+
"version": "1.3.0",
|
|
1933
|
+
"resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz",
|
|
1934
|
+
"integrity": "sha512-wlwEkqcsaxvPJML+rDh/2iS824jbREk6DUMUKkEaSlxdYHeS43cClJtsWglvw2RfeXGm6ohKDqsXteJ5sP5enA==",
|
|
1935
|
+
"dev": true,
|
|
1936
|
+
"license": "MIT"
|
|
1937
|
+
},
|
|
1909
1938
|
"node_modules/didyoumean": {
|
|
1910
1939
|
"version": "1.2.2",
|
|
1911
1940
|
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
|
@@ -2371,6 +2400,13 @@
|
|
|
2371
2400
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2372
2401
|
}
|
|
2373
2402
|
},
|
|
2403
|
+
"node_modules/flag-icons": {
|
|
2404
|
+
"version": "7.2.3",
|
|
2405
|
+
"resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-7.2.3.tgz",
|
|
2406
|
+
"integrity": "sha512-X2gUdteNuqdNqob2KKTJTS+ZCvyWeLCtDz9Ty8uJP17Y4o82Y+U/Vd4JNrdwTAjagYsRznOn9DZ+E/Q52qbmqg==",
|
|
2407
|
+
"dev": true,
|
|
2408
|
+
"license": "MIT"
|
|
2409
|
+
},
|
|
2374
2410
|
"node_modules/flat-cache": {
|
|
2375
2411
|
"version": "3.2.0",
|
|
2376
2412
|
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
|
|
@@ -2555,6 +2591,16 @@
|
|
|
2555
2591
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
2556
2592
|
}
|
|
2557
2593
|
},
|
|
2594
|
+
"node_modules/good-listener": {
|
|
2595
|
+
"version": "1.2.2",
|
|
2596
|
+
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
|
|
2597
|
+
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
|
|
2598
|
+
"dev": true,
|
|
2599
|
+
"license": "MIT",
|
|
2600
|
+
"dependencies": {
|
|
2601
|
+
"delegate": "^3.1.2"
|
|
2602
|
+
}
|
|
2603
|
+
},
|
|
2558
2604
|
"node_modules/graphemer": {
|
|
2559
2605
|
"version": "1.4.0",
|
|
2560
2606
|
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
|
|
@@ -2622,6 +2668,19 @@
|
|
|
2622
2668
|
"entities": "^4.4.0"
|
|
2623
2669
|
}
|
|
2624
2670
|
},
|
|
2671
|
+
"node_modules/i18n-iso-countries": {
|
|
2672
|
+
"version": "7.12.0",
|
|
2673
|
+
"resolved": "https://registry.npmjs.org/i18n-iso-countries/-/i18n-iso-countries-7.12.0.tgz",
|
|
2674
|
+
"integrity": "sha512-NDFf5j/raA5JrcPT/NcHP3RUMH7TkdkxQKAKdvDlgb+MS296WJzzqvV0Y5uwavSm7A6oYvBeSV0AxoHdDiHIiw==",
|
|
2675
|
+
"dev": true,
|
|
2676
|
+
"license": "MIT",
|
|
2677
|
+
"dependencies": {
|
|
2678
|
+
"diacritics": "1.3.0"
|
|
2679
|
+
},
|
|
2680
|
+
"engines": {
|
|
2681
|
+
"node": ">= 12"
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2625
2684
|
"node_modules/ignore": {
|
|
2626
2685
|
"version": "5.3.1",
|
|
2627
2686
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
|
@@ -3713,6 +3772,13 @@
|
|
|
3713
3772
|
"node": ">=14.0.0"
|
|
3714
3773
|
}
|
|
3715
3774
|
},
|
|
3775
|
+
"node_modules/select": {
|
|
3776
|
+
"version": "1.1.2",
|
|
3777
|
+
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
|
|
3778
|
+
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==",
|
|
3779
|
+
"dev": true,
|
|
3780
|
+
"license": "MIT"
|
|
3781
|
+
},
|
|
3716
3782
|
"node_modules/semver": {
|
|
3717
3783
|
"version": "7.6.2",
|
|
3718
3784
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
|
@@ -4018,6 +4084,13 @@
|
|
|
4018
4084
|
"node": ">=0.8"
|
|
4019
4085
|
}
|
|
4020
4086
|
},
|
|
4087
|
+
"node_modules/tiny-emitter": {
|
|
4088
|
+
"version": "2.1.0",
|
|
4089
|
+
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
|
4090
|
+
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
|
|
4091
|
+
"dev": true,
|
|
4092
|
+
"license": "MIT"
|
|
4093
|
+
},
|
|
4021
4094
|
"node_modules/to-regex-range": {
|
|
4022
4095
|
"version": "5.0.1",
|
|
4023
4096
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
|
@@ -4404,6 +4477,19 @@
|
|
|
4404
4477
|
"typescript": "*"
|
|
4405
4478
|
}
|
|
4406
4479
|
},
|
|
4480
|
+
"node_modules/vue3-json-viewer": {
|
|
4481
|
+
"version": "2.2.2",
|
|
4482
|
+
"resolved": "https://registry.npmjs.org/vue3-json-viewer/-/vue3-json-viewer-2.2.2.tgz",
|
|
4483
|
+
"integrity": "sha512-56l3XDGggnpwEqZieXsSMhNT4NhtO6d7zuSAxHo4i0UVxymyY2jRb7UMQOU1ztChKALZCAzX7DlgrsnEhxu77A==",
|
|
4484
|
+
"dev": true,
|
|
4485
|
+
"license": "ISC",
|
|
4486
|
+
"dependencies": {
|
|
4487
|
+
"clipboard": "^2.0.10"
|
|
4488
|
+
},
|
|
4489
|
+
"peerDependencies": {
|
|
4490
|
+
"vue": "^3.2.0"
|
|
4491
|
+
}
|
|
4492
|
+
},
|
|
4407
4493
|
"node_modules/which": {
|
|
4408
4494
|
"version": "2.0.2",
|
|
4409
4495
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
package/dist/spa/package.json
CHANGED
|
@@ -38,12 +38,15 @@
|
|
|
38
38
|
"autoprefixer": "^10.4.19",
|
|
39
39
|
"eslint": "^8.57.0",
|
|
40
40
|
"eslint-plugin-vue": "^9.23.0",
|
|
41
|
+
"flag-icons": "^7.2.3",
|
|
42
|
+
"i18n-iso-countries": "^7.12.0",
|
|
41
43
|
"npm-run-all2": "^6.1.2",
|
|
42
44
|
"postcss": "^8.4.38",
|
|
43
45
|
"sass": "^1.77.2",
|
|
44
46
|
"tailwindcss": "^3.4.3",
|
|
45
47
|
"typescript": "~5.4.0",
|
|
46
48
|
"vite": "^5.2.13",
|
|
47
|
-
"vue-tsc": "^2.0.11"
|
|
49
|
+
"vue-tsc": "^2.0.11",
|
|
50
|
+
"vue3-json-viewer": "^2.2.2"
|
|
48
51
|
}
|
|
49
52
|
}
|
package/dist/spa/src/App.vue
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="flex items-center justify-between">
|
|
9
9
|
<div class="flex items-center justify-start rtl:justify-end">
|
|
10
10
|
<button @click="sideBarOpen = !sideBarOpen"
|
|
11
|
-
|
|
11
|
+
type="button" class="inline-flex items-center p-2 text-sm rounded-lg sm:hidden hover:bg-lightSidebarItemHover focus:outline-none focus:ring-2 focus:ring-lightSidebarDevider dark:text-darkSidebarIcons dark:hover:bg-darkSidebarHover dark:focus:ring-lightSidebarDevider">
|
|
12
12
|
<span class="sr-only">Open sidebar</span>
|
|
13
13
|
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
14
14
|
<path clip-rule="evenodd" fill-rule="evenodd" d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path>
|
|
@@ -17,8 +17,25 @@
|
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
<div class="flex items-center">
|
|
20
|
+
|
|
21
|
+
<component
|
|
22
|
+
v-for="c in coreStore?.config?.globalInjections?.header || []"
|
|
23
|
+
:is="getCustomComponent(c)"
|
|
24
|
+
:meta="c.meta"
|
|
25
|
+
:adminUser="coreStore.adminUser"
|
|
26
|
+
/>
|
|
27
|
+
|
|
20
28
|
<div class="flex items-center ms-3 ">
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<span
|
|
33
|
+
@click="toggleTheme" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-lightHtml dark:text-darkSidebarTextHover dark:hover:bg-darkHtml dark:hover:text-darkSidebarTextActive" role="menuitem">
|
|
34
|
+
<IconMoonSolid class="w-5 h-5 text-blue-300" v-if="theme !== 'dark'" />
|
|
35
|
+
<IconSunSolid class="w-5 h-5 text-yellow-300" v-else />
|
|
36
|
+
</span>
|
|
21
37
|
<div>
|
|
38
|
+
|
|
22
39
|
<button type="button" class="flex text-sm bg- rounded-full focus:ring-4 focus:ring-lightSidebarDevider dark:focus:ring-darkSidebarDevider dark:bg-" aria-expanded="false" data-dropdown-toggle="dropdown-user">
|
|
23
40
|
<span class="sr-only">Open user menu</span>
|
|
24
41
|
<svg class="w-8 h-8 text-lightNavbarIcons dark:text-darkNavbarIcons" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
|
@@ -36,13 +53,13 @@
|
|
|
36
53
|
</p>
|
|
37
54
|
</div>
|
|
38
55
|
<ul class="py-1" role="none">
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
|
|
57
|
+
<li v-for="c in coreStore?.config?.globalInjections?.userMenu || []" >
|
|
58
|
+
<component
|
|
59
|
+
:is="getCustomComponent(c)"
|
|
60
|
+
:meta="c.meta"
|
|
61
|
+
:adminUser="coreStore.adminUser"
|
|
62
|
+
/>
|
|
46
63
|
</li>
|
|
47
64
|
<li>
|
|
48
65
|
<button @click="logout" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-html dark:text-darkSidebarTextHover dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextActive w-full" role="menuitem">Sign out</button>
|
|
@@ -68,48 +85,95 @@
|
|
|
68
85
|
<div class="h-full px-3 pb-4 overflow-y-auto bg-lightSidebar dark:bg-darkSidebar border-r border-lightSidebarBorder dark:border-darkSidebarBorder">
|
|
69
86
|
<div class="flex ms-2 md:me-24 m-4 ">
|
|
70
87
|
<img :src="loadFile(coreStore.config?.brandLogo || '@/assets/logo.svg')" :alt="`${ coreStore.config?.brandName } Logo`" class="h-8 me-3" />
|
|
71
|
-
<span
|
|
88
|
+
<span
|
|
89
|
+
v-if="coreStore.config?.showBrandNameInSidebar"
|
|
90
|
+
class="self-center text-lightNavbarText-size font-semibold sm:text-lightNavbarText-size whitespace-nowrap dark:text-darkSidebarText text-lightSidebarText"
|
|
91
|
+
>
|
|
72
92
|
{{ coreStore.config?.brandName }}
|
|
73
93
|
</span>
|
|
74
94
|
</div>
|
|
75
95
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
<ul class="space-y-2 font-medium">
|
|
97
|
+
<template v-for="(item, i) in coreStore.menu" :key="`menu-${i}`">
|
|
98
|
+
<div v-if="item.type === 'divider'" class="border-t border-lightSidebarDevider dark:border-darkSidebarDevider"></div>
|
|
99
|
+
<div v-else-if="item.type === 'gap'" class="flex items-center justify-center h-8"></div>
|
|
100
|
+
<div v-else-if="item.type === 'heading'" class="flex items-center justify-left pl-2 h-8 text-lightSidebarHeading dark:text-darkSidebarHeading
|
|
101
|
+
">{{ item.label }}</div>
|
|
102
|
+
<li v-else-if="item.children" class=" ">
|
|
103
|
+
<button @click="clickOnMenuItem(i)" type="button" class="flex items-center w-full p-2 text-base text-lightSidebarText rounded-default transition duration-75 group hover:bg-lightSidebarItemHover hover:text-lightSidebarTextHover dark:text-darkSidebarText dark:hover:bg-darkSidebarHover dark:hover:text-darkSidebarTextHover"
|
|
104
|
+
:aria-controls="`dropdown-example${i}`"
|
|
105
|
+
:data-collapse-toggle="`dropdown-example${i}`"
|
|
106
|
+
>
|
|
107
|
+
|
|
108
|
+
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons group-hover:text-lightSidebarIconsHover transition duration-75 dark:group-hover:text-darkSidebarIconsHover dark:text-darkSidebarIcons" ></component>
|
|
109
|
+
|
|
110
|
+
<span class="flex-1 ms-3 text-left rtl:text-right whitespace-nowrap">{{ item.label }}
|
|
111
|
+
|
|
112
|
+
<span v-if="item.badge" class="inline-flex items-center justify-center w-3 h-3 p-3 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
|
|
113
|
+
fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent">{{ item.badge }}</span>
|
|
114
|
+
</span>
|
|
115
|
+
|
|
116
|
+
<svg :class="{'rotate-180': opened.includes(i) }" class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
|
117
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
|
118
|
+
</svg>
|
|
119
|
+
</button>
|
|
94
120
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
121
|
+
<ul :id="`dropdown-example${i}`" role="none" class="pt-1 space-y-1" :class="{ 'hidden': !opened.includes(i) }">
|
|
122
|
+
<template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
|
|
123
|
+
<li>
|
|
98
124
|
<MenuLink :item="child" isChild="true" />
|
|
99
125
|
</li>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
126
|
+
</template>
|
|
127
|
+
</ul>
|
|
128
|
+
</li>
|
|
129
|
+
<li v-else>
|
|
130
|
+
<MenuLink :item="item" />
|
|
131
|
+
</li>
|
|
132
|
+
</template>
|
|
133
|
+
</ul>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
<div id="dropdown-cta" class="p-4 mt-6 rounded-lg bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
|
|
137
|
+
fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent text-sm" role="alert"
|
|
138
|
+
v-if="ctaBadge"
|
|
139
|
+
>
|
|
140
|
+
<div class="flex items-center mb-3" :class="!ctaBadge.title ? 'float-right' : ''">
|
|
141
|
+
<!-- <span class="bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity text-sm font-semibold me-2 px-2.5 py-0.5 rounded "
|
|
142
|
+
v-if="ctaBadge.title"
|
|
143
|
+
> -->
|
|
144
|
+
<span>
|
|
145
|
+
{{ctaBadge.title}}
|
|
146
|
+
</span>
|
|
147
|
+
<button type="button"
|
|
148
|
+
class="ms-auto -mx-1.5 -my-1.5 bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity inline-flex justify-center items-center w-6 h-6 rounded-lg p-1 hover:brightness-110"
|
|
149
|
+
|
|
150
|
+
data-dismiss-target="#dropdown-cta" aria-label="Close"
|
|
151
|
+
v-if="ctaBadge?.closable" @click="closeCTA"
|
|
152
|
+
>
|
|
153
|
+
<span class="sr-only">Close</span>
|
|
154
|
+
<svg class="w-2.5 h-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
155
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
156
|
+
</svg>
|
|
157
|
+
</button>
|
|
158
|
+
</div>
|
|
159
|
+
<p class="mb-3 text-sm " v-if="ctaBadge.html" v-html="ctaBadge.html"></p>
|
|
160
|
+
<p class="mb-3 text-sm fill-lightNavbarText dark:fill-darkPrimary text-lightNavbarText dark:text-darkNavbarPrimary" v-else>
|
|
161
|
+
{{ ctaBadge.text }}
|
|
162
|
+
</p>
|
|
163
|
+
<!-- <a class="text-sm text-lightPrimary underline font-medium hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300" href="#">Turn new navigation off</a> -->
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<component
|
|
167
|
+
v-for="c in coreStore?.config?.globalInjections?.sidebar || []"
|
|
168
|
+
:is="getCustomComponent(c)"
|
|
169
|
+
:meta="c.meta"
|
|
170
|
+
:adminUser="coreStore.adminUser"
|
|
171
|
+
/>
|
|
108
172
|
</div>
|
|
109
173
|
</aside>
|
|
110
174
|
|
|
111
175
|
|
|
112
|
-
<div class="sm:ml-64" v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady">
|
|
176
|
+
<div class="sm:ml-64 max-w-[100vw]" v-if="loggedIn && routerIsReady && loginRedirectCheckIsReady">
|
|
113
177
|
<div class="p-0 dark:border-gray-700 mt-14">
|
|
114
178
|
<RouterView/>
|
|
115
179
|
</div>
|
|
@@ -125,7 +189,7 @@
|
|
|
125
189
|
</div>
|
|
126
190
|
</div>
|
|
127
191
|
<AcceptModal />
|
|
128
|
-
<div v-if="toastStore.toasts.length>0" class="fixed bottom-5 right-5 flex gap-1 flex-col-reverse">
|
|
192
|
+
<div v-if="toastStore.toasts.length>0" class="fixed bottom-5 right-5 flex gap-1 flex-col-reverse z-50">
|
|
129
193
|
<transition-group
|
|
130
194
|
name="fade"
|
|
131
195
|
tag="div"
|
|
@@ -182,7 +246,7 @@
|
|
|
182
246
|
<script setup lang="ts">
|
|
183
247
|
import { computed, onMounted, ref, watch, defineComponent, onBeforeMount } from 'vue';
|
|
184
248
|
import { RouterLink, RouterView } from 'vue-router';
|
|
185
|
-
import { initFlowbite } from 'flowbite'
|
|
249
|
+
import { initFlowbite, Dropdown } from 'flowbite'
|
|
186
250
|
import './index.scss'
|
|
187
251
|
import { useCoreStore } from '@/stores/core';
|
|
188
252
|
import { useUserStore } from '@/stores/user';
|
|
@@ -197,7 +261,9 @@ import { createHead } from 'unhead'
|
|
|
197
261
|
import { loadFile } from '@/utils';
|
|
198
262
|
import Toast from './components/Toast.vue';
|
|
199
263
|
import {useToastStore} from '@/stores/toast';
|
|
200
|
-
import { FrontendAPI } from '@/composables/useStores'
|
|
264
|
+
import { FrontendAPI } from '@/composables/useStores';
|
|
265
|
+
import { getCustomComponent } from '@/utils';
|
|
266
|
+
|
|
201
267
|
// import { link } from 'fs';
|
|
202
268
|
const coreStore = useCoreStore();
|
|
203
269
|
const modalStore = useModalStore();
|
|
@@ -229,7 +295,7 @@ const theme = ref('light');
|
|
|
229
295
|
function toggleTheme() {
|
|
230
296
|
theme.value = theme.value === 'light' ? 'dark' : 'light';
|
|
231
297
|
document.documentElement.classList.toggle('dark');
|
|
232
|
-
window.localStorage.setItem('
|
|
298
|
+
window.localStorage.setItem('af__theme', theme.value);
|
|
233
299
|
|
|
234
300
|
}
|
|
235
301
|
|
|
@@ -257,7 +323,11 @@ async function initRouter() {
|
|
|
257
323
|
}
|
|
258
324
|
|
|
259
325
|
async function loadMenu() {
|
|
260
|
-
await
|
|
326
|
+
await initRouter();
|
|
327
|
+
if (!route.meta.customLayout) {
|
|
328
|
+
// for custom layouts we don't need to fetch menu
|
|
329
|
+
await coreStore.fetchMenuAndResource();
|
|
330
|
+
}
|
|
261
331
|
loginRedirectCheckIsReady.value = true;
|
|
262
332
|
}
|
|
263
333
|
|
|
@@ -269,16 +339,21 @@ function handleCustomLayout() {
|
|
|
269
339
|
}
|
|
270
340
|
}
|
|
271
341
|
|
|
342
|
+
function humanizeSnake(str: string): string {
|
|
343
|
+
if (!str) {
|
|
344
|
+
return '';
|
|
345
|
+
}
|
|
346
|
+
return str.split('_').map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
347
|
+
}
|
|
272
348
|
|
|
273
|
-
|
|
274
|
-
watch(route, () => {
|
|
349
|
+
watch([route, () => coreStore.resourceById], async () => {
|
|
275
350
|
handleCustomLayout()
|
|
276
|
-
|
|
351
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
352
|
+
const resourceTitle = coreStore.resourceById[route.params?.resourceId as string]?.label || humanizeSnake(Object.values(route.params)[0] as string);
|
|
353
|
+
title.value = `${coreStore.config?.title || coreStore.config?.brandName || 'Adminforth'} | ${ resourceTitle || route.meta.title || ' '}`;
|
|
277
354
|
useHead({
|
|
278
355
|
title: title.value,
|
|
279
356
|
})
|
|
280
|
-
|
|
281
|
-
|
|
282
357
|
});
|
|
283
358
|
|
|
284
359
|
watch (()=>coreStore.menu, () => {
|
|
@@ -293,6 +368,14 @@ watch([loggedIn, routerIsReady, loginRedirectCheckIsReady], ([l,r,lr]) => {
|
|
|
293
368
|
if (l && r && lr) {
|
|
294
369
|
setTimeout(() => {
|
|
295
370
|
initFlowbite();
|
|
371
|
+
|
|
372
|
+
const dd = new Dropdown(
|
|
373
|
+
document.querySelector('#dropdown-user') as HTMLElement,
|
|
374
|
+
document.querySelector('[data-dropdown-toggle="dropdown-user"]') as HTMLElement,
|
|
375
|
+
);
|
|
376
|
+
window.adminforth.closeUserMenuDropdown = () => {
|
|
377
|
+
dd.hide();
|
|
378
|
+
}
|
|
296
379
|
});
|
|
297
380
|
}
|
|
298
381
|
})
|
|
@@ -307,8 +390,29 @@ onMounted(async () => {
|
|
|
307
390
|
})
|
|
308
391
|
|
|
309
392
|
onBeforeMount(()=>{
|
|
310
|
-
theme.value = window.localStorage.getItem('
|
|
393
|
+
theme.value = window.localStorage.getItem('af__theme') || 'light';
|
|
311
394
|
document.documentElement.classList.toggle('dark', theme.value === 'dark');
|
|
312
395
|
})
|
|
313
396
|
|
|
397
|
+
|
|
398
|
+
const ctaBadge = computed(() => {
|
|
399
|
+
const badge = coreStore.config?.announcementBadge;
|
|
400
|
+
if (!badge) {
|
|
401
|
+
return null;
|
|
402
|
+
}
|
|
403
|
+
const hash = badge.closable ? JSON.stringify(badge).split('').reduce((a,b)=>{a=((a<<5)-a)+b.charCodeAt(0);return a&a},0) : '';
|
|
404
|
+
if (badge.closable && window.localStorage.getItem(`ctaBadge-${hash}`)) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
return {...badge, hash};
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
function closeCTA() {
|
|
411
|
+
const hash = ctaBadge.value.hash;
|
|
412
|
+
window.localStorage.setItem(`ctaBadge-${hash}`, '1');
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
314
418
|
</script>
|
|
@@ -24,7 +24,7 @@ const modalStore = useModalStore();
|
|
|
24
24
|
<button @click="()=>{ modalStore.onAcceptFunction(true);modalStore.togleModal()}" type="button" class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center">
|
|
25
25
|
{{ modalStore?.modalContent?.acceptText }}
|
|
26
26
|
</button>
|
|
27
|
-
<button @click="()=>{modalStore.onAcceptFunction(false);modalStore.togleModal()}" type="button" class="py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-
|
|
27
|
+
<button @click="()=>{modalStore.onAcceptFunction(false);modalStore.togleModal()}" type="button" class="py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">{{ modalStore?.modalContent?.cancelText }}</button>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<nav class="flex" aria-label="Breadcrumb">
|
|
3
3
|
<ol class="inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse flex-wrap">
|
|
4
4
|
<li class="inline-flex items-center">
|
|
5
|
-
<RouterLink :to="{name: 'home'}" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-
|
|
5
|
+
<RouterLink :to="{name: 'home'}" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-lightPrimary dark:text-gray-400 dark:hover:text-white">
|
|
6
6
|
<svg class="w-3 h-3 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
|
7
7
|
<path d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z"/>
|
|
8
8
|
</svg>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<button type="button"
|
|
35
|
-
class="text-
|
|
35
|
+
class="text-lightPrimary dark:text-darkPrimary text-base font-medium hover:underline p-0 inline-flex items-center mb-2"
|
|
36
36
|
@click="toggleTimeInputs">{{ showTimeInputs ? 'Hide time' : 'Show time' }}
|
|
37
37
|
<svg class="w-8 h-8 ms-0.5" :class="{'rotate-180': showTimeInputs}" aria-hidden="true"
|
|
38
38
|
xmlns="http://www.w3.org/2000/svg" width="24" height="24"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<button type="button"
|
|
53
|
-
class="text-
|
|
53
|
+
class="text-lightPrimary dark:text-darkPrimary text-base font-medium hover:underline p-0 inline-flex items-center mb-2"
|
|
54
54
|
@click="toggleTimeInputs">{{ showTimeInputs ? 'Hide time' : 'Show time' }}
|
|
55
55
|
<svg class="w-8 h-8 ms-0.5 relative top-px" :class="{'rotate-180': showTimeInputs}" aria-hidden="true"
|
|
56
56
|
xmlns="http://www.w3.org/2000/svg" width="24" height="24"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<button
|
|
22
22
|
v-if="isChanged"
|
|
23
23
|
type="button"
|
|
24
|
-
class="flex items-center p-0.5 ml-auto px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-
|
|
24
|
+
class="flex items-center p-0.5 ml-auto px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
25
25
|
@click="clear">Clear
|
|
26
26
|
</button>
|
|
27
27
|
|
|
@@ -130,23 +130,27 @@ function setSliderValues(start, end) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
&:deep(.vue-slider-dot-handle) {
|
|
133
|
-
|
|
133
|
+
// apply bg-blue-500 to the handle when active
|
|
134
|
+
@apply bg-lightPrimary;
|
|
134
135
|
border: none;
|
|
135
136
|
box-shadow: none;
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
&:deep(.vue-slider-dot-handle:hover) {
|
|
139
|
-
|
|
140
|
+
@apply bg-lightPrimary;
|
|
141
|
+
filter: brightness(1.1);
|
|
140
142
|
border: none;
|
|
141
143
|
box-shadow: none;
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
&:deep(.vue-slider-process) {
|
|
145
|
-
|
|
147
|
+
@apply bg-lightPrimaryOpacity;
|
|
148
|
+
|
|
146
149
|
}
|
|
147
150
|
|
|
148
151
|
&:deep(.vue-slider-process:hover) {
|
|
149
|
-
|
|
152
|
+
filter: brightness(1.1);
|
|
153
|
+
@apply bg-lightPrimaryOpacity;
|
|
150
154
|
}
|
|
151
155
|
}
|
|
152
156
|
</style>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
/>
|
|
11
11
|
<div class="absolute inset-y-0 left-2 flex items-center pr-2 flex-wrap">
|
|
12
12
|
{{ }}
|
|
13
|
-
<div v-for="item in selectedItems" :key="item?.name" class="bg-
|
|
13
|
+
<div v-for="item in selectedItems" :key="item?.name" class="bg-lightPrimaryOpacity text-lightPrimary text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-darkPrimaryOpacity dark:text-darkPrimary">
|
|
14
14
|
<span>{{ item.label }}</span>
|
|
15
15
|
<button
|
|
16
16
|
type="button"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
v-for="item in filteredItems"
|
|
41
41
|
:key="item.value"
|
|
42
42
|
class="px-4 py-2 cursor-pointer hover:bg-gray-100"
|
|
43
|
-
:class="{ 'bg-
|
|
43
|
+
:class="{ 'bg-lightPrimaryOpacity': selectedItems.includes(item) }"
|
|
44
44
|
@click="toogleItem(item)"
|
|
45
45
|
>
|
|
46
46
|
<label :for="item.value">{{ item.label }}</label>
|
|
@@ -147,10 +147,10 @@ const toogleItem = (item) => {
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
const list = selectedItems.value.map(item => item.value);
|
|
150
|
-
const updValue = list.length ? list :
|
|
150
|
+
const updValue = list.length ? list : null;
|
|
151
151
|
let emitValue;
|
|
152
152
|
if (props.single) {
|
|
153
|
-
emitValue = updValue ? updValue[0] :
|
|
153
|
+
emitValue = updValue ? updValue[0] : null;
|
|
154
154
|
} else {
|
|
155
155
|
emitValue = updValue;
|
|
156
156
|
}
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
<button
|
|
104
104
|
:disabled="!filtersStore.filters.length"
|
|
105
105
|
type="button"
|
|
106
|
-
class="flex items-center py-1 px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-
|
|
106
|
+
class="flex items-center py-1 px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
107
107
|
@click="clear">Clear all</button>
|
|
108
108
|
|
|
109
109
|
</div>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
</template>
|
|
116
116
|
|
|
117
117
|
<script setup>
|
|
118
|
-
import { watch, computed
|
|
118
|
+
import { watch, computed } from 'vue'
|
|
119
119
|
import Dropdown from '@/components/Dropdown.vue';
|
|
120
120
|
import CustomDateRangePicker from '@/components/CustomDateRangePicker.vue';
|
|
121
121
|
import { callAdminForthApi } from '@/utils';
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
>
|
|
13
13
|
<component v-if="item.icon" :is="getIcon(item.icon)" class="w-5 h-5 text-lightSidebarIcons dark:text-darkSidebarIcons transition duration-75 group-hover:text-lightSidebarIconsHover dark:group-hover:text-darkSidebarIconsHover" ></component>
|
|
14
14
|
<span class="ms-3">{{ item.label }}</span>
|
|
15
|
+
<span v-if="item.badge" class="inline-flex items-center justify-center w-3 h-3 p-3 ms-3 text-sm font-medium rounded-full bg-lightAnnouncementBG dark:bg-darkAnnouncementBG
|
|
16
|
+
fill-lightAnnouncementText dark:fill-darkAccent text-lightAnnouncementText dark:text-darkAccent">{{ item.badge }}</span>
|
|
17
|
+
|
|
15
18
|
</RouterLink>
|
|
16
19
|
</template>
|
|
17
20
|
|