@vc-shell/framework 1.0.38 → 1.0.40
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/core/api/index.ts +1 -0
- package/core/api/platform.ts +8332 -0
- package/core/composables/index.ts +8 -0
- package/core/composables/useAutosave/index.ts +57 -0
- package/core/composables/useFunctions/debounce.ts +18 -0
- package/core/composables/useFunctions/delay.ts +7 -0
- package/core/composables/useFunctions/index.ts +21 -0
- package/core/composables/useFunctions/once.ts +14 -0
- package/core/composables/useFunctions/sleep.ts +4 -0
- package/core/composables/useFunctions/throttle.ts +17 -0
- package/core/composables/useI18n/index.ts +28 -0
- package/core/composables/useLogger/index.ts +24 -0
- package/core/composables/useNotifications/index.ts +116 -0
- package/core/composables/usePermissions/index.ts +32 -0
- package/core/composables/useSettings/index.ts +62 -0
- package/core/composables/useUser/index.ts +266 -0
- package/core/directives/autofocus/index.ts +9 -0
- package/core/directives/click-outside/index.ts +21 -0
- package/core/directives/index.ts +4 -0
- package/core/directives/loading/index.ts +28 -0
- package/core/directives/permissions/index.ts +20 -0
- package/core/plugins/index.ts +1 -0
- package/core/plugins/validation/index.ts +2 -0
- package/core/plugins/validation/rules.ts +196 -0
- package/core/types/index.ts +92 -0
- package/core/utilities/camelToSnake.ts +7 -0
- package/core/utilities/index.ts +1 -0
- package/dist/core/composables/useNotifications/index.d.ts +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts +10 -1
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +2 -2
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +72 -99
- package/dist/framework.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
- package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/app-switcher/index.d.ts +2 -2
- package/dist/shared/app-switcher/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +1 -1
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/types/index.d.ts +1 -1
- package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/components/atoms/vc-badge/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +28 -0
- package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-badge/vc-badge.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-button/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +28 -0
- package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-button/vc-button.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-container/vc-container.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-container/vc-container.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-hint/vc-hint.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-icon/vc-icon.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-image/vc-image.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-label/vc-label.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-link/vc-link.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-progress/vc-progress.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-status/vc-status.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/atoms/vc-switch/vc-switch.stories.d.ts +0 -0
- package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/index.d.ts +4 -3
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +0 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/molecules/vc-form/vc-form.stories.d.ts +0 -0
- package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-input/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +140 -0
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +124 -0
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -0
- package/dist/{components → ui/components}/molecules/vc-pagination/vc-pagination.stories.d.ts +0 -0
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/molecules/vc-rating/vc-rating.stories.d.ts +0 -0
- package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-select/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +207 -0
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -0
- package/dist/{components → ui/components}/molecules/vc-textarea/vc-textarea.stories.d.ts +0 -0
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/organisms/vc-app/vc-app.stories.d.ts +0 -0
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/organisms/vc-blade/vc-blade.stories.d.ts +0 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/organisms/vc-login-form/vc-login-form.stories.d.ts +0 -0
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/organisms/vc-popup/vc-popup.stories.d.ts +0 -0
- package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts.map +1 -0
- package/dist/{components → ui/components}/organisms/vc-table/vc-table.stories.d.ts +0 -0
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -0
- package/dist/ui/types/index.d.ts +13 -0
- package/dist/ui/types/index.d.ts.map +1 -0
- package/dist/ui/types/ts-helpers.d.ts +13 -0
- package/dist/ui/types/ts-helpers.d.ts.map +1 -0
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +30 -10
- package/shared/app-switcher/components/index.ts +1 -0
- package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +90 -0
- package/shared/app-switcher/composables/index.ts +1 -0
- package/shared/app-switcher/composables/useAppSwitcher/index.ts +54 -0
- package/shared/app-switcher/index.ts +14 -0
- package/shared/assets/components/assets-details/assets-details.vue +138 -0
- package/shared/assets/components/index.ts +1 -0
- package/shared/assets/index.ts +19 -0
- package/shared/assets/locales/en.json +29 -0
- package/shared/assets/locales/index.ts +2 -0
- package/shared/blade-navigation/components/index.ts +1 -0
- package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +84 -0
- package/shared/blade-navigation/composables/index.ts +1 -0
- package/shared/blade-navigation/composables/useBladeNavigation/index.ts +216 -0
- package/shared/blade-navigation/index.ts +15 -0
- package/shared/blade-navigation/types/index.ts +52 -0
- package/shared/index.ts +16 -0
- package/tailwind.config.js +4 -3
- package/ui/components/atoms/vc-badge/index.ts +7 -0
- package/ui/components/atoms/vc-badge/vc-badge-model.ts +30 -0
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +27 -0
- package/ui/components/atoms/vc-badge/vc-badge.vue +57 -0
- package/ui/components/atoms/vc-button/index.ts +7 -0
- package/ui/components/atoms/vc-button/vc-button-model.ts +30 -0
- package/ui/components/atoms/vc-button/vc-button.stories.ts +34 -0
- package/ui/components/atoms/vc-button/vc-button.vue +219 -0
- package/ui/components/atoms/vc-card/vc-card.vue +137 -0
- package/ui/components/atoms/vc-checkbox/vc-checkbox.stories.ts +25 -0
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +130 -0
- package/ui/components/atoms/vc-col/vc-col.vue +22 -0
- package/ui/components/atoms/vc-container/vc-container.stories.ts +31 -0
- package/ui/components/atoms/vc-container/vc-container.vue +222 -0
- package/ui/components/atoms/vc-hint/vc-hint.stories.ts +23 -0
- package/ui/components/atoms/vc-hint/vc-hint.vue +11 -0
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +32 -0
- package/ui/components/atoms/vc-icon/vc-icon.vue +36 -0
- package/ui/components/atoms/vc-image/vc-image.stories.ts +40 -0
- package/ui/components/atoms/vc-image/vc-image.vue +122 -0
- package/ui/components/atoms/vc-info-row/vc-info-row.vue +42 -0
- package/ui/components/atoms/vc-label/vc-label.stories.ts +23 -0
- package/ui/components/atoms/vc-label/vc-label.vue +49 -0
- package/ui/components/atoms/vc-link/vc-link.stories.ts +30 -0
- package/ui/components/atoms/vc-link/vc-link.vue +46 -0
- package/ui/components/atoms/vc-loading/vc-loading.vue +33 -0
- package/ui/components/atoms/vc-progress/vc-progress.stories.ts +25 -0
- package/ui/components/atoms/vc-progress/vc-progress.vue +65 -0
- package/ui/components/atoms/vc-row/vc-row.vue +13 -0
- package/ui/components/atoms/vc-status/vc-status.stories.ts +26 -0
- package/ui/components/atoms/vc-status/vc-status.vue +78 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +21 -0
- package/ui/components/atoms/vc-switch/vc-switch.stories.ts +27 -0
- package/ui/components/atoms/vc-switch/vc-switch.vue +100 -0
- package/ui/components/atoms/vc-widget/vc-widget.vue +85 -0
- package/ui/components/index.ts +44 -0
- package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +103 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +39 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +21 -0
- package/ui/components/molecules/vc-currency-input/vc-input.vue +436 -0
- package/ui/components/molecules/vc-editor/vc-editor.vue +117 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +134 -0
- package/ui/components/molecules/vc-form/vc-form.stories.ts +23 -0
- package/ui/components/molecules/vc-form/vc-form.vue +5 -0
- package/ui/components/molecules/vc-input/index.ts +8 -0
- package/ui/components/molecules/vc-input/vc-input-model.ts +150 -0
- package/ui/components/molecules/vc-input/vc-input.vue +324 -0
- package/ui/components/molecules/vc-input-currency/index.ts +8 -0
- package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +128 -0
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +86 -0
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +447 -0
- package/ui/components/molecules/vc-notification/vc-notification.vue +101 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +23 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +169 -0
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +23 -0
- package/ui/components/molecules/vc-rating/vc-rating.vue +77 -0
- package/ui/components/molecules/vc-select/index.ts +7 -0
- package/ui/components/molecules/vc-select/vc-select-model.ts +216 -0
- package/ui/components/molecules/vc-select/vc-select.vue +727 -0
- package/ui/components/molecules/vc-slider/vc-slider.vue +106 -0
- package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +23 -0
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +155 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +150 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +148 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +157 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +110 -0
- package/ui/components/organisms/vc-app/vc-app.stories.ts +75 -0
- package/ui/components/organisms/vc-app/vc-app.vue +169 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +126 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +223 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +67 -0
- package/ui/components/organisms/vc-blade/vc-blade.stories.ts +46 -0
- package/ui/components/organisms/vc-blade/vc-blade.vue +87 -0
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +426 -0
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +123 -0
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +93 -0
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +186 -0
- package/ui/components/organisms/vc-login-form/vc-login-form.stories.ts +55 -0
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +48 -0
- package/ui/components/organisms/vc-popup/vc-popup.stories.ts +23 -0
- package/ui/components/organisms/vc-popup/vc-popup.vue +97 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +113 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +29 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +152 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +272 -0
- package/ui/components/organisms/vc-table/vc-table.stories.ts +99 -0
- package/ui/components/organisms/vc-table/vc-table.vue +638 -0
- package/ui/types/index.ts +38 -0
- package/ui/types/ts-helpers.ts +46 -0
- package/dist/components/atoms/vc-badge/vc-badge.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-button/vc-button.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-container/vc-container.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-hint/vc-hint.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-icon/vc-icon.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-image/vc-image.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-label/vc-label.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-link/vc-link.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-progress/vc-progress.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-status/vc-status.stories.d.ts.map +0 -1
- package/dist/components/atoms/vc-switch/vc-switch.stories.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +0 -1
- package/dist/components/molecules/vc-form/vc-form.stories.d.ts.map +0 -1
- package/dist/components/molecules/vc-input/vc-input.stories.d.ts +0 -7
- package/dist/components/molecules/vc-input/vc-input.stories.d.ts.map +0 -1
- package/dist/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +0 -1
- package/dist/components/molecules/vc-rating/vc-rating.stories.d.ts.map +0 -1
- package/dist/components/molecules/vc-select/vc-select.stories.d.ts +0 -7
- package/dist/components/molecules/vc-select/vc-select.stories.d.ts.map +0 -1
- package/dist/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +0 -1
- package/dist/components/organisms/vc-app/vc-app.stories.d.ts.map +0 -1
- package/dist/components/organisms/vc-blade/vc-blade.stories.d.ts.map +0 -1
- package/dist/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +0 -1
- package/dist/components/organisms/vc-popup/vc-popup.stories.d.ts.map +0 -1
- package/dist/components/organisms/vc-table/vc-table.stories.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBA2CE"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"main": "./dist/framework.js",
|
|
5
|
+
"module": "./dist/framework.js",
|
|
5
6
|
"types": "./dist/index.d.ts",
|
|
6
7
|
"style": "./dist/style.css",
|
|
7
8
|
"files": [
|
|
8
|
-
"dist
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"dist",
|
|
10
|
+
"tailwind.config.js",
|
|
11
|
+
"ui",
|
|
12
|
+
"core",
|
|
13
|
+
"shared"
|
|
11
14
|
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/framework.js",
|
|
18
|
+
"require": "./dist/framework.js",
|
|
19
|
+
"types": "./dist/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./client": {
|
|
22
|
+
"types": "./dist/ui/types/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./dist/style.css": "./dist/style.css",
|
|
25
|
+
"./tailwind.config": "./tailwind.config.js",
|
|
26
|
+
"./*": "./*"
|
|
27
|
+
},
|
|
12
28
|
"scripts": {
|
|
13
29
|
"build": "vite build",
|
|
30
|
+
"development": "vite build --watch -m development",
|
|
14
31
|
"watch": "vite build --watch"
|
|
15
32
|
},
|
|
16
33
|
"dependencies": {
|
|
17
34
|
"@popperjs/core": "^2.11.0",
|
|
18
35
|
"@vee-validate/rules": "^4.5.5",
|
|
19
|
-
"@vueuse/
|
|
20
|
-
"@vueuse/
|
|
36
|
+
"@vueuse/components": "^9.9.0",
|
|
37
|
+
"@vueuse/core": "^9.9.0",
|
|
38
|
+
"@vueuse/integrations": "^9.9.0",
|
|
21
39
|
"client-oauth2": "^4.3.3",
|
|
22
40
|
"moment": "^2.29.1",
|
|
23
41
|
"normalize.css": "^8.0.1",
|
|
24
42
|
"swiper": "^6.7.5",
|
|
25
|
-
"vue-currency-input": "
|
|
43
|
+
"vue-currency-input": "~2.5.1",
|
|
26
44
|
"vue-i18n": "^9.1.7",
|
|
27
45
|
"vue-logger-plugin": "^2.1.2",
|
|
28
46
|
"vue3-ace-editor": "^2.2.2",
|
|
@@ -32,10 +50,12 @@
|
|
|
32
50
|
"devDependencies": {
|
|
33
51
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
34
52
|
"@rollup/plugin-commonjs": "^21.0.2",
|
|
35
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
36
|
-
"@vc-shell/config-generator": "^1.0.
|
|
53
|
+
"@vc-shell/api-client-generator": "^1.0.40",
|
|
54
|
+
"@vc-shell/config-generator": "^1.0.40",
|
|
55
|
+
"@vue-macros/volar": "^0.5.7",
|
|
37
56
|
"sass": "^1.49.0",
|
|
38
57
|
"typescript": "^4.6.2",
|
|
58
|
+
"unplugin-vue-macros": "^1.1.1",
|
|
39
59
|
"url-pattern": "^1.0.3"
|
|
40
60
|
},
|
|
41
61
|
"peerDependencies": {
|
|
@@ -47,5 +67,5 @@
|
|
|
47
67
|
"access": "public",
|
|
48
68
|
"registry": "https://registry.npmjs.org/"
|
|
49
69
|
},
|
|
50
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "826168937f288def939c0a249181bc3fcc87d7f2"
|
|
51
71
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VcAppSwitcher } from "./vc-app-switcher/vc-app-switcher.vue";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="tw-relative tw-h-full tw-flex tw-items-center tw-justify-center tw-ml-2 tw-mr-[15px] tw-shrink-0"
|
|
4
|
+
v-click-outside="onClose"
|
|
5
|
+
>
|
|
6
|
+
<button
|
|
7
|
+
class="hover:[&>img] hover:[&_div]:tw-bg-[color:var(--app-bar-button-color-hover)]"
|
|
8
|
+
@click.stop="toggleAppSwitch"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
class="tw-h-[22px] tw-w-[22px] [mask:url(/assets/app-select.svg)] tw-bg-[color:var(--app-bar-button-color)] tw-duration-200"
|
|
12
|
+
/>
|
|
13
|
+
</button>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
v-if="isVisible && appsList && appsList.length"
|
|
17
|
+
class="tw-px-4 tw-py-3.5 tw-bg-white tw-drop-shadow-[4px_4px_20px_rgba(47,86,108,0.25)] tw-absolute tw-z-[10000] tw-rounded tw-top-[var(--app-bar-height)] tw-left-0"
|
|
18
|
+
>
|
|
19
|
+
<ul class="tw-flex tw-flex-col tw-gap-3 tw-overflow-hidden">
|
|
20
|
+
<li
|
|
21
|
+
v-for="item in appsList"
|
|
22
|
+
:key="item.id"
|
|
23
|
+
@click="switchApp(item)"
|
|
24
|
+
class="tw-flex tw-flex-row tw-items-center tw-cursor-pointer tw-group"
|
|
25
|
+
:class="{ '[&>p]:tw-font-extrabold': locationHandler(item.relativeUrl) }"
|
|
26
|
+
>
|
|
27
|
+
<img
|
|
28
|
+
:src="imageUrl(item.iconUrl)"
|
|
29
|
+
:alt="`icon_${item.id}`"
|
|
30
|
+
class="tw-w-5 tw-h-5 tw-mr-2 tw-shrink-0"
|
|
31
|
+
/>
|
|
32
|
+
<p
|
|
33
|
+
class="tw-font-normal tw-text-sm tw-text-[#727C87] tw-truncate group-hover:tw-opacity-80"
|
|
34
|
+
>
|
|
35
|
+
{{ item.title }}
|
|
36
|
+
</p>
|
|
37
|
+
</li>
|
|
38
|
+
</ul>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts" setup>
|
|
44
|
+
import { ref } from "vue";
|
|
45
|
+
import { AppDescriptor } from "@/core/api";
|
|
46
|
+
|
|
47
|
+
export interface Props {
|
|
48
|
+
appsList: AppDescriptor[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface Emits {
|
|
52
|
+
(event: "onClick", item: AppDescriptor): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
56
|
+
appsList: undefined,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const emit = defineEmits<Emits>();
|
|
60
|
+
|
|
61
|
+
const isVisible = ref(false);
|
|
62
|
+
|
|
63
|
+
const imageUrl = (url: string) => window.location.origin + url;
|
|
64
|
+
|
|
65
|
+
const locationHandler = (url: string) => {
|
|
66
|
+
const cleanUrl = window.location.pathname.replace(/\/+$/, "");
|
|
67
|
+
const match = url.match(cleanUrl);
|
|
68
|
+
if (match) {
|
|
69
|
+
return match[0];
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const switchApp = (app: AppDescriptor) => {
|
|
75
|
+
emit("onClick", app);
|
|
76
|
+
onClose();
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const toggleAppSwitch = () => {
|
|
80
|
+
if (props.appsList && props.appsList.length) {
|
|
81
|
+
isVisible.value = !isVisible.value;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const onClose = () => {
|
|
86
|
+
isVisible.value = false;
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style lang="less" scoped></style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useAppSwitcher } from "./useAppSwitcher";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed, Ref, ref } from "vue";
|
|
2
|
+
import { AppDescriptor, AppsClient } from "@/core/api";
|
|
3
|
+
import {
|
|
4
|
+
useLogger,
|
|
5
|
+
useUser,
|
|
6
|
+
usePermissions,
|
|
7
|
+
} from "@/core/composables";
|
|
8
|
+
|
|
9
|
+
interface IUseAppSwitcher {
|
|
10
|
+
readonly appsList: Ref<AppDescriptor[]>;
|
|
11
|
+
getApps: () => void;
|
|
12
|
+
switchApp: (app: AppDescriptor) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default (): IUseAppSwitcher => {
|
|
16
|
+
const logger = useLogger();
|
|
17
|
+
const { checkPermission } = usePermissions();
|
|
18
|
+
const appsList = ref<AppDescriptor[]>([]);
|
|
19
|
+
|
|
20
|
+
async function getApiClient(): Promise<AppsClient> {
|
|
21
|
+
const { getAccessToken } = useUser();
|
|
22
|
+
const client = new AppsClient();
|
|
23
|
+
client.setAuthToken((await getAccessToken()) as string);
|
|
24
|
+
return client;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function getApps() {
|
|
28
|
+
const client = await getApiClient();
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
appsList.value = await client.getApps();
|
|
32
|
+
} catch (e) {
|
|
33
|
+
logger.error(e);
|
|
34
|
+
throw e;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function switchApp(app: AppDescriptor) {
|
|
39
|
+
if (checkPermission(app.permission)) {
|
|
40
|
+
if (app.relativeUrl) {
|
|
41
|
+
window.location.href = window.location.origin + app.relativeUrl;
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
// TODO temporary alert
|
|
45
|
+
alert("Access restricted");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
appsList: computed(() => appsList.value),
|
|
51
|
+
getApps,
|
|
52
|
+
switchApp,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { App } from "vue";
|
|
2
|
+
import * as components from "./components";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
install(app: App): void {
|
|
6
|
+
// Register exported components
|
|
7
|
+
Object.entries(components).forEach(([componentName, component]) => {
|
|
8
|
+
app.component(componentName, component);
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export * from "./composables";
|
|
14
|
+
export * from "./components";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VcBlade
|
|
3
|
+
:title="options.editableAsset.name"
|
|
4
|
+
:subtitle="$t('ASSETS.PAGES.DETAILS.SUBTITLE')"
|
|
5
|
+
:expanded="expanded"
|
|
6
|
+
:closable="closable"
|
|
7
|
+
:toolbarItems="bladeToolbar"
|
|
8
|
+
@close="$emit('close:blade')"
|
|
9
|
+
>
|
|
10
|
+
<!-- Blade contents -->
|
|
11
|
+
<div class= "tw-flex tw-grow-1 tw-border-t tw-border-solid tw-border-t-[#eaedf3]">
|
|
12
|
+
<div class="assets-details__content tw-grow tw-basis-0">
|
|
13
|
+
<VcContainer :no-padding="true">
|
|
14
|
+
<div class="tw-p-4">
|
|
15
|
+
<VcForm>
|
|
16
|
+
<VcImage
|
|
17
|
+
class="tw-mb-4"
|
|
18
|
+
:src="localImage.url"
|
|
19
|
+
size="xl"
|
|
20
|
+
:bordered="true"
|
|
21
|
+
></VcImage>
|
|
22
|
+
<VcInput
|
|
23
|
+
class="tw-mb-4"
|
|
24
|
+
:label="$t('ASSETS.PAGES.DETAILS.FIELDS.NAME.TITLE')"
|
|
25
|
+
v-model="localImage.name"
|
|
26
|
+
clearable
|
|
27
|
+
required
|
|
28
|
+
:placeholder="
|
|
29
|
+
$t('ASSETS.PAGES.DETAILS.FIELDS.NAME.PLACEHOLDER')
|
|
30
|
+
"
|
|
31
|
+
></VcInput>
|
|
32
|
+
<VcInput
|
|
33
|
+
class="tw-mb-4"
|
|
34
|
+
:label="$t('ASSETS.PAGES.DETAILS.FIELDS.ALT.TITLE')"
|
|
35
|
+
v-model="localImage.altText"
|
|
36
|
+
clearable
|
|
37
|
+
:placeholder="$t('ASSETS.PAGES.DETAILS.FIELDS.ALT.PLACEHOLDER')"
|
|
38
|
+
:tooltip="$t('ASSETS.PAGES.DETAILS.FIELDS.ALT.TOOLTIP')"
|
|
39
|
+
required
|
|
40
|
+
></VcInput>
|
|
41
|
+
<VcTextarea
|
|
42
|
+
class="tw-mb-4"
|
|
43
|
+
:label="$t('ASSETS.PAGES.DETAILS.FIELDS.DESCRIPTION.TITLE')"
|
|
44
|
+
v-model="localImage.description"
|
|
45
|
+
:placeholder="
|
|
46
|
+
$t('ASSETS.PAGES.DETAILS.FIELDS.DESCRIPTION.PLACEHOLDER')
|
|
47
|
+
"
|
|
48
|
+
is-required
|
|
49
|
+
></VcTextarea>
|
|
50
|
+
</VcForm>
|
|
51
|
+
</div>
|
|
52
|
+
</VcContainer>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</VcBlade>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script lang="ts" setup>
|
|
59
|
+
import { computed, reactive, unref } from "vue";
|
|
60
|
+
import { useI18n } from "@/core/composables";
|
|
61
|
+
import { IParentCallArgs } from "@/shared";
|
|
62
|
+
import {
|
|
63
|
+
VcBlade,
|
|
64
|
+
VcContainer,
|
|
65
|
+
VcForm,
|
|
66
|
+
VcImage,
|
|
67
|
+
VcInput,
|
|
68
|
+
VcTextarea,
|
|
69
|
+
} from "@/ui/components";
|
|
70
|
+
|
|
71
|
+
interface ILocalImage {
|
|
72
|
+
url: string;
|
|
73
|
+
name: string;
|
|
74
|
+
altText: string;
|
|
75
|
+
description: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface Props {
|
|
79
|
+
expanded?: boolean;
|
|
80
|
+
closable?: boolean;
|
|
81
|
+
options?: {
|
|
82
|
+
editableAsset?: ILocalImage;
|
|
83
|
+
sortHandler?: (remove: boolean, localImage: ILocalImage) => void;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Emits {
|
|
88
|
+
(event: "parent:call", args: IParentCallArgs): void;
|
|
89
|
+
(event: "close:blade"): void;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
93
|
+
expanded: true,
|
|
94
|
+
closable: true,
|
|
95
|
+
options: () => ({}),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const emit = defineEmits<Emits>();
|
|
99
|
+
const { t } = useI18n();
|
|
100
|
+
const localImage = reactive({ ...props.options.editableAsset });
|
|
101
|
+
|
|
102
|
+
const bladeToolbar = [
|
|
103
|
+
{
|
|
104
|
+
id: "save",
|
|
105
|
+
title: t("ASSETS.PAGES.DETAILS.TOOLBAR.SAVE"),
|
|
106
|
+
icon: "fas fa-save",
|
|
107
|
+
clickHandler() {
|
|
108
|
+
if (
|
|
109
|
+
props.options.sortHandler &&
|
|
110
|
+
typeof props.options.sortHandler === "function"
|
|
111
|
+
) {
|
|
112
|
+
props.options.sortHandler(false, localImage);
|
|
113
|
+
emit("close:blade");
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "delete",
|
|
119
|
+
title: t("ASSETS.PAGES.DETAILS.TOOLBAR.DELETE"),
|
|
120
|
+
icon: "fas fa-trash",
|
|
121
|
+
clickHandler() {
|
|
122
|
+
if (
|
|
123
|
+
window.confirm(
|
|
124
|
+
unref(computed(() => t("ASSETS.PAGES.DETAILS.DELETE_CONFIRMATION")))
|
|
125
|
+
)
|
|
126
|
+
) {
|
|
127
|
+
if (
|
|
128
|
+
props.options.sortHandler &&
|
|
129
|
+
typeof props.options.sortHandler === "function"
|
|
130
|
+
) {
|
|
131
|
+
props.options.sortHandler(true, localImage);
|
|
132
|
+
emit("close:blade");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
];
|
|
138
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {default as AssetsDetails} from './assets-details/assets-details.vue'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { App } from "vue";
|
|
2
|
+
import * as components from "./components";
|
|
3
|
+
import * as locales from "./locales";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
install(app: App): void {
|
|
7
|
+
Object.entries(components).forEach(([pageName, page]) => {
|
|
8
|
+
app.component(pageName, page);
|
|
9
|
+
app.config.globalProperties.pages?.push(page);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
// Load locales
|
|
13
|
+
Object.entries(locales).forEach(([key, message]) => {
|
|
14
|
+
app.config.globalProperties.$mergeLocaleMessage(key, message);
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export * from './components'
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ASSETS": {
|
|
3
|
+
"PAGES": {
|
|
4
|
+
"DETAILS": {
|
|
5
|
+
"SUBTITLE": "Image edit",
|
|
6
|
+
"TOOLBAR": {
|
|
7
|
+
"SAVE": "Save",
|
|
8
|
+
"DELETE": "Delete"
|
|
9
|
+
},
|
|
10
|
+
"FIELDS": {
|
|
11
|
+
"NAME": {
|
|
12
|
+
"TITLE": "Image name",
|
|
13
|
+
"PLACEHOLDER": "Enter image name"
|
|
14
|
+
},
|
|
15
|
+
"ALT": {
|
|
16
|
+
"TITLE": "Image alternative text",
|
|
17
|
+
"PLACEHOLDER": "Enter image alt text",
|
|
18
|
+
"TOOLTIP": "This text will be displayed in case of disabled/unloaded image on the page"
|
|
19
|
+
},
|
|
20
|
+
"DESCRIPTION": {
|
|
21
|
+
"TITLE": "Meta description",
|
|
22
|
+
"PLACEHOLDER": "Enter meta description"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"DELETE_CONFIRMATION": "Are you sure you want to delete this image?"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VcBladeNavigation } from "./vc-blade-navigation/vc-blade-navigation.vue";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<router-view v-slot="{ Component, route }">
|
|
3
|
+
<component
|
|
4
|
+
:is="Component"
|
|
5
|
+
:closable="false"
|
|
6
|
+
v-show="$isMobile.value ? !blades.length : blades.length <= 1"
|
|
7
|
+
@open:blade="$emit('onOpen', { blade: $event, id: 0 })"
|
|
8
|
+
:options="parentBladeOptions"
|
|
9
|
+
:expanded="blades.length === 0"
|
|
10
|
+
:param="resolveParam"
|
|
11
|
+
:key="route"
|
|
12
|
+
ref="parentRef"
|
|
13
|
+
>
|
|
14
|
+
</component>
|
|
15
|
+
</router-view>
|
|
16
|
+
<component
|
|
17
|
+
v-for="(blade, i) in blades"
|
|
18
|
+
v-show="i >= blades.length - ($isMobile.value ? 1 : 2)"
|
|
19
|
+
:key="`blade_${i}`"
|
|
20
|
+
:is="blade.component"
|
|
21
|
+
:param="blade.param"
|
|
22
|
+
:closable="i >= 0"
|
|
23
|
+
:expanded="i === blades.length - 1"
|
|
24
|
+
:options="blade.bladeOptions"
|
|
25
|
+
@open:blade="$emit('onOpen', { blade: $event, id: blade.idx })"
|
|
26
|
+
@close:blade="$emit('onClose', i)"
|
|
27
|
+
@close:children="$emit('onClose', i + 1)"
|
|
28
|
+
@parent:call="$emit('onParentCall', { id: i, cb: $event })"
|
|
29
|
+
:ref="setBladesRef"
|
|
30
|
+
></component>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import { computed, onBeforeUpdate, ref } from "vue";
|
|
35
|
+
import { useRoute } from "vue-router";
|
|
36
|
+
import {
|
|
37
|
+
IBladeContainer,
|
|
38
|
+
IBladeElement,
|
|
39
|
+
IBladeEvent,
|
|
40
|
+
IParentCallArgs,
|
|
41
|
+
} from "@/shared";
|
|
42
|
+
|
|
43
|
+
export interface Props {
|
|
44
|
+
blades: IBladeContainer[];
|
|
45
|
+
parentBladeOptions: Record<string, unknown>;
|
|
46
|
+
parentBladeParam: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface Emits {
|
|
50
|
+
(event: "onOpen", blade: { blade: IBladeEvent; id: number }): void;
|
|
51
|
+
(event: "onClose", index: number): void;
|
|
52
|
+
(event: "onParentCall", args: { id: number; args: IParentCallArgs }): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
defineEmits<Emits>();
|
|
56
|
+
|
|
57
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
58
|
+
blades: () => [],
|
|
59
|
+
parentBladeOptions: () => ({}),
|
|
60
|
+
parentBladeParam: undefined,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const route = useRoute();
|
|
64
|
+
const bladesRefs = ref([]);
|
|
65
|
+
const parentRef = ref();
|
|
66
|
+
|
|
67
|
+
onBeforeUpdate(() => {
|
|
68
|
+
bladesRefs.value = [parentRef.value];
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const setBladesRef = (el: IBladeElement) => {
|
|
72
|
+
if (el && Object.keys(el).length) {
|
|
73
|
+
bladesRefs.value.push(el);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const resolveParam = computed(() => {
|
|
78
|
+
return props.parentBladeParam ? props.parentBladeParam : route.params.param;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
defineExpose({
|
|
82
|
+
bladesRefs,
|
|
83
|
+
});
|
|
84
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {default as useBladeNavigation} from './useBladeNavigation'
|