@vc-shell/framework 1.0.52 → 1.0.54
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/composables/index.ts +0 -1
- package/core/composables/useApiClient/index.ts +9 -4
- package/core/composables/useAsync/index.ts +2 -6
- package/core/composables/useAutosave/index.ts +1 -3
- package/core/composables/useFunctions/debounce.ts +1 -4
- package/core/composables/useFunctions/delay.ts +1 -4
- package/core/composables/useFunctions/once.ts +1 -3
- package/core/composables/useFunctions/throttle.ts +1 -4
- package/core/composables/useI18n/index.ts +3 -24
- package/core/composables/useLoading/index.ts +1 -3
- package/core/composables/useNotifications/index.ts +6 -13
- package/core/composables/usePermissions/index.ts +1 -1
- package/core/composables/useSettings/index.ts +3 -4
- package/core/composables/useUser/index.ts +27 -66
- package/core/directives/permissions/index.ts +1 -1
- package/core/plugins/i18n/index.ts +8 -0
- package/core/plugins/index.ts +3 -1
- package/core/plugins/modularity/index.ts +32 -0
- package/core/plugins/moment/humanize.ts +1 -4
- package/core/plugins/validation/index.ts +11 -1
- package/core/plugins/validation/rules.ts +48 -170
- package/core/types/index.ts +7 -9
- package/dist/core/composables/index.d.ts +0 -1
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useApiClient/index.d.ts +9 -3
- package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
- package/dist/core/composables/useAsync/index.d.ts.map +1 -1
- package/dist/core/composables/useAutosave/index.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
- package/dist/core/composables/useI18n/index.d.ts +2 -4
- package/dist/core/composables/useI18n/index.d.ts.map +1 -1
- package/dist/core/composables/useLoading/index.d.ts.map +1 -1
- 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.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/i18n/index.d.ts +3 -0
- package/dist/core/plugins/i18n/index.d.ts.map +1 -0
- package/dist/core/plugins/index.d.ts +3 -1
- package/dist/core/plugins/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +8 -0
- package/dist/core/plugins/modularity/index.d.ts.map +1 -0
- package/dist/core/plugins/moment/humanize.d.ts.map +1 -1
- package/dist/core/plugins/validation/index.d.ts +3 -1
- package/dist/core/plugins/validation/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/rules.d.ts +32 -11
- package/dist/core/plugins/validation/rules.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +5 -6
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.esm.js +42553 -0
- package/dist/framework.js +74 -72
- 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 -3
- package/dist/shared/app-switcher/index.d.ts.map +1 -1
- package/dist/shared/assets/components/index.d.ts +1 -1
- package/dist/shared/assets/components/index.d.ts.map +1 -1
- package/dist/shared/assets/index.d.ts +2 -3
- package/dist/shared/assets/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/composables/index.d.ts +1 -1
- package/dist/shared/blade-navigation/composables/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +2 -2
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/index.d.ts +2 -3
- package/dist/shared/blade-navigation/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/shared/index.d.ts +4 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +3 -3
- package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +20 -20
- package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/index.d.ts +3 -3
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +30 -24
- package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts +33 -0
- package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts +31 -0
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-col/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts +13 -0
- package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-container/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts +25 -0
- package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-hint/index.d.ts +2 -0
- package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts +5 -0
- package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts +17 -0
- package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-image/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts +38 -0
- package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-info-row/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts +25 -0
- package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-label/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts +18 -0
- package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-link/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts +21 -0
- package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-loading/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts +13 -0
- package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-progress/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts +17 -0
- package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-row/index.d.ts +2 -0
- package/dist/ui/components/atoms/vc-row/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts +5 -0
- package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts +21 -0
- package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status-icon/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts +13 -0
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-switch/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts +30 -0
- package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-widget/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts +20 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts.map +1 -0
- package/dist/ui/components/index.d.ts +34 -34
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts +19 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts +33 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts +34 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-form/index.d.ts +2 -0
- package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts +5 -0
- package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-input/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +48 -25
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +36 -28
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-notification/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts +18 -0
- package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts +25 -0
- package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-rating/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts +21 -0
- package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-select/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +67 -32
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts +33 -0
- package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-textarea/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts +37 -0
- package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts +61 -0
- package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts +34 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts +43 -0
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-gallery/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts +74 -0
- package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-login-form/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts +15 -0
- package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-popup/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts +22 -0
- package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts +135 -0
- package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts.map +1 -0
- package/dist/ui/types/index.d.ts +76 -6
- package/dist/ui/types/index.d.ts.map +1 -1
- package/dist/ui/types/ts-helpers.d.ts +14 -4
- package/dist/ui/types/ts-helpers.d.ts.map +1 -1
- package/dist/ui/utils/index.d.ts +2 -0
- package/dist/ui/utils/index.d.ts.map +1 -0
- package/dist/ui/utils/types.d.ts +3 -0
- package/dist/ui/utils/types.d.ts.map +1 -0
- package/dist/vite.config.d.ts +1 -1
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +9 -11
- package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -6
- package/shared/app-switcher/composables/useAppSwitcher/index.ts +3 -8
- package/shared/app-switcher/index.ts +3 -10
- package/shared/assets/components/assets-details/assets-details.vue +10 -31
- package/shared/assets/components/index.ts +1 -1
- package/shared/assets/index.ts +3 -15
- package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +2 -7
- package/shared/blade-navigation/composables/index.ts +1 -1
- package/shared/blade-navigation/composables/useBladeNavigation/index.ts +8 -37
- package/shared/blade-navigation/index.ts +3 -10
- package/shared/blade-navigation/types/index.ts +1 -1
- package/shared/index.ts +9 -11
- package/ui/components/atoms/vc-badge/index.ts +5 -5
- package/ui/components/atoms/vc-badge/vc-badge-model.ts +21 -20
- package/ui/components/atoms/vc-badge/vc-badge.vue +5 -11
- package/ui/components/atoms/vc-button/index.ts +5 -5
- package/ui/components/atoms/vc-button/vc-button-model.ts +31 -24
- package/ui/components/atoms/vc-button/vc-button.vue +9 -38
- package/ui/components/atoms/vc-card/index.ts +6 -0
- package/ui/components/atoms/vc-card/vc-card-model.ts +37 -0
- package/ui/components/atoms/vc-card/vc-card.vue +20 -36
- package/ui/components/atoms/vc-checkbox/index.ts +8 -0
- package/ui/components/atoms/vc-checkbox/vc-checkbox-model.ts +35 -0
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +15 -30
- package/ui/components/atoms/vc-col/index.ts +5 -0
- package/ui/components/atoms/vc-col/vc-col-model.ts +15 -0
- package/ui/components/atoms/vc-col/vc-col.vue +2 -6
- package/ui/components/atoms/vc-container/index.ts +8 -0
- package/ui/components/atoms/vc-container/vc-container-model.ts +28 -0
- package/ui/components/atoms/vc-container/vc-container.vue +11 -26
- package/ui/components/atoms/vc-hint/index.ts +2 -0
- package/ui/components/atoms/vc-hint/vc-hint-model.ts +5 -0
- package/ui/components/atoms/vc-icon/index.ts +5 -0
- package/ui/components/atoms/vc-icon/vc-icon-model.ts +19 -0
- package/ui/components/atoms/vc-icon/vc-icon.vue +2 -8
- package/ui/components/atoms/vc-image/index.ts +7 -0
- package/ui/components/atoms/vc-image/vc-image-model.ts +41 -0
- package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -2
- package/ui/components/atoms/vc-image/vc-image.vue +12 -42
- package/ui/components/atoms/vc-info-row/index.ts +5 -0
- package/ui/components/atoms/vc-info-row/vc-info-row-model.ts +27 -0
- package/ui/components/atoms/vc-info-row/vc-info-row.vue +14 -24
- package/ui/components/atoms/vc-label/index.ts +5 -0
- package/ui/components/atoms/vc-label/vc-label-model.ts +20 -0
- package/ui/components/atoms/vc-label/vc-label.vue +11 -15
- package/ui/components/atoms/vc-link/index.ts +6 -0
- package/ui/components/atoms/vc-link/vc-link-model.ts +24 -0
- package/ui/components/atoms/vc-link/vc-link.vue +4 -11
- package/ui/components/atoms/vc-loading/index.ts +5 -0
- package/ui/components/atoms/vc-loading/vc-loading-model.ts +15 -0
- package/ui/components/atoms/vc-loading/vc-loading.vue +5 -11
- package/ui/components/atoms/vc-progress/index.ts +5 -0
- package/ui/components/atoms/vc-progress/vc-progress-model.ts +19 -0
- package/ui/components/atoms/vc-progress/vc-progress.vue +5 -20
- package/ui/components/atoms/vc-row/index.ts +2 -0
- package/ui/components/atoms/vc-row/vc-row-model.ts +5 -0
- package/ui/components/atoms/vc-status/index.ts +5 -0
- package/ui/components/atoms/vc-status/vc-status-model.ts +23 -0
- package/ui/components/atoms/vc-status/vc-status.vue +3 -21
- package/ui/components/atoms/vc-status-icon/index.ts +5 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon-model.ts +15 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +11 -9
- package/ui/components/atoms/vc-switch/index.ts +7 -0
- package/ui/components/atoms/vc-switch/vc-switch-model.ts +34 -0
- package/ui/components/atoms/vc-switch/vc-switch.vue +12 -28
- package/ui/components/atoms/vc-widget/index.ts +7 -0
- package/ui/components/atoms/vc-widget/vc-widget-model.ts +23 -0
- package/ui/components/atoms/vc-widget/vc-widget.vue +15 -22
- package/ui/components/index.ts +34 -34
- package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +1 -1
- package/ui/components/molecules/vc-breadcrumbs/index.ts +5 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.ts +23 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +6 -14
- package/ui/components/molecules/vc-editor/index.ts +7 -0
- package/ui/components/molecules/vc-editor/vc-editor-model.ts +37 -0
- package/ui/components/molecules/vc-editor/vc-editor.vue +25 -56
- package/ui/components/molecules/vc-file-upload/index.ts +8 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload-model.ts +37 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +11 -36
- package/ui/components/molecules/vc-form/index.ts +2 -0
- package/ui/components/molecules/vc-form/vc-form-model.ts +5 -0
- package/ui/components/molecules/vc-input/index.ts +5 -6
- package/ui/components/molecules/vc-input/vc-input-model.ts +53 -35
- package/ui/components/molecules/vc-input/vc-input.vue +41 -29
- package/ui/components/molecules/vc-input-currency/index.ts +4 -3
- package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +42 -32
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +12 -7
- package/ui/components/molecules/vc-notification/index.ts +8 -0
- package/ui/components/molecules/vc-notification/vc-notification-model.ts +21 -0
- package/ui/components/molecules/vc-notification/vc-notification.vue +4 -13
- package/ui/components/molecules/vc-pagination/index.ts +8 -0
- package/ui/components/molecules/vc-pagination/vc-pagination-model.ts +29 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +21 -23
- package/ui/components/molecules/vc-rating/index.ts +5 -0
- package/ui/components/molecules/vc-rating/vc-rating-model.ts +23 -0
- package/ui/components/molecules/vc-rating/vc-rating.vue +11 -13
- package/ui/components/molecules/vc-select/index.ts +5 -5
- package/ui/components/molecules/vc-select/vc-select-model.ts +74 -44
- package/ui/components/molecules/vc-select/vc-select.vue +128 -173
- package/ui/components/molecules/vc-slider/index.ts +5 -0
- package/ui/components/molecules/vc-slider/vc-slider-model.ts +34 -0
- package/ui/components/molecules/vc-slider/vc-slider.vue +2 -26
- package/ui/components/molecules/vc-textarea/index.ts +8 -0
- package/ui/components/molecules/vc-textarea/vc-textarea-model.ts +41 -0
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +19 -53
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +16 -12
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +13 -4
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -15
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +11 -5
- package/ui/components/organisms/vc-app/index.ts +6 -0
- package/ui/components/organisms/vc-app/vc-app-model.ts +65 -0
- package/ui/components/organisms/vc-app/vc-app.vue +10 -52
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +40 -40
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +20 -14
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +14 -12
- package/ui/components/organisms/vc-blade/index.ts +7 -0
- package/ui/components/organisms/vc-blade/vc-blade-model.ts +37 -0
- package/ui/components/organisms/vc-blade/vc-blade.stories.ts +1 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +13 -40
- package/ui/components/organisms/vc-dynamic-property/index.ts +5 -0
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.ts +58 -0
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +101 -125
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +41 -24
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +16 -11
- package/ui/components/organisms/vc-gallery/index.ts +8 -0
- package/ui/components/organisms/vc-gallery/vc-gallery-model.ts +78 -0
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +11 -88
- package/ui/components/organisms/vc-login-form/index.ts +5 -0
- package/ui/components/organisms/vc-login-form/vc-login-form-model.ts +16 -0
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +2 -15
- package/ui/components/organisms/vc-popup/index.ts +7 -0
- package/ui/components/organisms/vc-popup/vc-popup-model.ts +25 -0
- package/ui/components/organisms/vc-popup/vc-popup.vue +7 -18
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +21 -27
- package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +2 -6
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +9 -3
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +31 -43
- package/ui/components/organisms/vc-table/index.ts +7 -0
- package/ui/components/organisms/vc-table/vc-table-model.ts +116 -0
- package/ui/components/organisms/vc-table/vc-table.vue +108 -139
- package/ui/types/index.ts +106 -15
- package/ui/types/ts-helpers.ts +23 -3
- package/ui/utils/index.ts +1 -0
- package/ui/utils/types.ts +2 -0
- package/core/composables/useLogger/index.ts +0 -24
- package/dist/core/composables/useLogger/index.d.ts +0 -5
- package/dist/core/composables/useLogger/index.d.ts.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcSliderProps } from "./vc-slider-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import Slider from "./vc-slider.vue";
|
|
5
|
+
export const VcSlider: ComponentConstructor<ComponentPublicInstance<VcSliderProps>> = Slider;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { PropType, VNode } from "vue";
|
|
3
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
4
|
+
|
|
5
|
+
export const sliderProps = {
|
|
6
|
+
slides: {
|
|
7
|
+
type: Array as PropType<Record<string, unknown>[] | any[]>,
|
|
8
|
+
default: () => [],
|
|
9
|
+
},
|
|
10
|
+
navigation: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false,
|
|
13
|
+
},
|
|
14
|
+
overflow: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
slidesPerView: {
|
|
19
|
+
type: String as PropType<string | "auto">,
|
|
20
|
+
default: "auto",
|
|
21
|
+
},
|
|
22
|
+
spaceBetweenSlides: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 10,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type VcSliderProps = ExtractTypes<typeof sliderProps>;
|
|
29
|
+
|
|
30
|
+
export interface VcSliderSlots {
|
|
31
|
+
default: (args: { slide: Record<string, unknown> | any }) => VNode[];
|
|
32
|
+
prevBtn: () => VNode[];
|
|
33
|
+
nextBtn: () => VNode[];
|
|
34
|
+
}
|
|
@@ -48,34 +48,10 @@ import SwiperCore, { Navigation } from "swiper";
|
|
|
48
48
|
import "swiper/swiper-bundle.min.css";
|
|
49
49
|
import "swiper/swiper.min.css";
|
|
50
50
|
import "swiper/components/navigation/navigation.min.css";
|
|
51
|
+
import { sliderProps } from "./vc-slider-model";
|
|
51
52
|
SwiperCore.use([Navigation]);
|
|
52
53
|
|
|
53
|
-
defineProps(
|
|
54
|
-
slides: {
|
|
55
|
-
type: Array,
|
|
56
|
-
default: () => [],
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
navigation: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false,
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
overflow: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false,
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
slidesPerView: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: "auto",
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
spaceBetweenSlides: {
|
|
75
|
-
type: Number,
|
|
76
|
-
default: 10,
|
|
77
|
-
},
|
|
78
|
-
});
|
|
54
|
+
defineProps(sliderProps);
|
|
79
55
|
|
|
80
56
|
const buttonsList = computed(() => ({
|
|
81
57
|
nextEl: ".vc-slider__next",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcTextareaEmits, VcTextareaProps } from "./vc-textarea-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import Textarea from "./vc-textarea.vue";
|
|
5
|
+
export const VcTextarea: ComponentConstructor<
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
ComponentPublicInstance<VcTextareaProps, any, any, any, any, VcTextareaEmits>
|
|
8
|
+
> = Textarea;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
import { isString } from "./../../../utils";
|
|
4
|
+
|
|
5
|
+
export const textareaProps = {
|
|
6
|
+
placeholder: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "",
|
|
9
|
+
},
|
|
10
|
+
modelValue: String,
|
|
11
|
+
required: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false,
|
|
14
|
+
},
|
|
15
|
+
disabled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
label: String,
|
|
20
|
+
tooltip: String,
|
|
21
|
+
name: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "Field",
|
|
24
|
+
},
|
|
25
|
+
maxchars: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "1024",
|
|
28
|
+
},
|
|
29
|
+
errorMessage: String,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const textareaEmits = {
|
|
33
|
+
"update:modelValue": (value: string) => isString(value),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type VcTextareaProps = ExtractTypes<typeof textareaProps>;
|
|
37
|
+
export type VcTextareaEmits = typeof textareaEmits;
|
|
38
|
+
|
|
39
|
+
export interface VcTextareaSlots {
|
|
40
|
+
error: () => VNode[];
|
|
41
|
+
}
|
|
@@ -7,9 +7,16 @@
|
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<!-- Textarea label -->
|
|
10
|
-
<VcLabel
|
|
10
|
+
<VcLabel
|
|
11
|
+
v-if="label"
|
|
12
|
+
class="tw-mb-2"
|
|
13
|
+
:required="required"
|
|
14
|
+
>
|
|
11
15
|
<span>{{ label }}</span>
|
|
12
|
-
<template
|
|
16
|
+
<template
|
|
17
|
+
v-if="tooltip"
|
|
18
|
+
v-slot:tooltip
|
|
19
|
+
>
|
|
13
20
|
<span v-html="tooltip"></span>
|
|
14
21
|
</template>
|
|
15
22
|
</VcLabel>
|
|
@@ -26,7 +33,10 @@
|
|
|
26
33
|
></textarea>
|
|
27
34
|
</div>
|
|
28
35
|
|
|
29
|
-
<slot
|
|
36
|
+
<slot
|
|
37
|
+
v-if="errorMessage"
|
|
38
|
+
name="error"
|
|
39
|
+
>
|
|
30
40
|
<VcHint class="vc-textarea__error">
|
|
31
41
|
{{ errorMessage }}
|
|
32
42
|
</VcHint>
|
|
@@ -36,56 +46,12 @@
|
|
|
36
46
|
|
|
37
47
|
<script lang="ts" setup>
|
|
38
48
|
import { watch } from "vue";
|
|
39
|
-
import { VcLabel } from "
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
modelValue: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: undefined,
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
isRequired: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false,
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
disabled: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false,
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
label: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: undefined,
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
tooltip: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: undefined,
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
name: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: "Field",
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
maxchars: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: "1024",
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
errorMessage: {
|
|
83
|
-
type: String,
|
|
84
|
-
default: undefined,
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
const emit = defineEmits(["update:modelValue"]);
|
|
49
|
+
import { VcLabel } from "./../../../components";
|
|
50
|
+
import { textareaEmits, textareaProps } from "./vc-textarea-model";
|
|
51
|
+
|
|
52
|
+
const props = defineProps(textareaProps);
|
|
53
|
+
|
|
54
|
+
const emit = defineEmits(textareaEmits);
|
|
89
55
|
|
|
90
56
|
watch(
|
|
91
57
|
() => props.modelValue,
|
|
@@ -32,8 +32,14 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<!-- Show back link when more than one blade is opened -->
|
|
35
|
-
<VcLink
|
|
36
|
-
|
|
35
|
+
<VcLink
|
|
36
|
+
v-else-if="blades.length > 1"
|
|
37
|
+
@click="$emit('backlink:click')"
|
|
38
|
+
>
|
|
39
|
+
<VcIcon
|
|
40
|
+
icon="fas fa-chevron-left"
|
|
41
|
+
size="s"
|
|
42
|
+
></VcIcon>
|
|
37
43
|
<span class="tw-ml-2 tw-text-lg">{{ $t("Back") }}</span>
|
|
38
44
|
</VcLink>
|
|
39
45
|
</template>
|
|
@@ -43,7 +49,10 @@
|
|
|
43
49
|
|
|
44
50
|
<!-- Toolbar container -->
|
|
45
51
|
<div class="tw-flex tw-h-full tw-box-border">
|
|
46
|
-
<template
|
|
52
|
+
<template
|
|
53
|
+
v-for="(item, index) in buttons"
|
|
54
|
+
:key="index"
|
|
55
|
+
>
|
|
47
56
|
<template v-if="item.isVisible === undefined || item.isVisible">
|
|
48
57
|
<!-- Draw custom component is it is passed -->
|
|
49
58
|
<component
|
|
@@ -82,9 +91,9 @@
|
|
|
82
91
|
</template>
|
|
83
92
|
|
|
84
93
|
<script lang="ts" setup>
|
|
85
|
-
import { VcIcon } from "
|
|
86
|
-
import { IBladeToolbar } from "
|
|
87
|
-
import { IBladeElement } from "
|
|
94
|
+
import { VcIcon } from "./../../../../../components";
|
|
95
|
+
import { IBladeToolbar } from "./../../../../../../core/types";
|
|
96
|
+
import { IBladeElement } from "./../../../../../../shared";
|
|
88
97
|
|
|
89
98
|
export interface Props {
|
|
90
99
|
logo: string;
|
|
@@ -99,12 +108,7 @@ withDefaults(defineProps<Props>(), {
|
|
|
99
108
|
buttons: () => [],
|
|
100
109
|
});
|
|
101
110
|
|
|
102
|
-
defineEmits([
|
|
103
|
-
"logo:click",
|
|
104
|
-
"backlink:click",
|
|
105
|
-
"toolbarbutton:click",
|
|
106
|
-
"menubutton:click",
|
|
107
|
-
]);
|
|
111
|
+
defineEmits(["logo:click", "backlink:click", "toolbarbutton:click", "menubutton:click"]);
|
|
108
112
|
</script>
|
|
109
113
|
|
|
110
114
|
<style lang="scss">
|
|
@@ -11,10 +11,19 @@
|
|
|
11
11
|
class="vc-app-menu-item__handler"
|
|
12
12
|
:class="{ 'vc-app-menu-item__handler_enabled': !sticky }"
|
|
13
13
|
>
|
|
14
|
-
<VcIcon
|
|
14
|
+
<VcIcon
|
|
15
|
+
icon="fas fa-ellipsis-v"
|
|
16
|
+
size="m"
|
|
17
|
+
/>
|
|
15
18
|
</div>
|
|
16
|
-
<div
|
|
17
|
-
|
|
19
|
+
<div
|
|
20
|
+
v-if="icon"
|
|
21
|
+
class="vc-app-menu-item__icon"
|
|
22
|
+
>
|
|
23
|
+
<VcIcon
|
|
24
|
+
:icon="icon"
|
|
25
|
+
size="m"
|
|
26
|
+
/>
|
|
18
27
|
</div>
|
|
19
28
|
<div class="vc-app-menu-item__title">
|
|
20
29
|
{{ title }}
|
|
@@ -28,7 +37,7 @@
|
|
|
28
37
|
</div>
|
|
29
38
|
</template>
|
|
30
39
|
<script lang="ts" setup>
|
|
31
|
-
import { ExtendedComponent } from "
|
|
40
|
+
import { ExtendedComponent } from "./../../../../../../../../../shared";
|
|
32
41
|
|
|
33
42
|
export interface Props {
|
|
34
43
|
isActive?: boolean;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<template v-if="component && component.url">
|
|
4
|
-
<router-link
|
|
4
|
+
<router-link
|
|
5
|
+
:to="component.url"
|
|
6
|
+
custom
|
|
7
|
+
v-slot="{ isActive, navigate }"
|
|
8
|
+
>
|
|
5
9
|
<vc-app-menu-link
|
|
6
10
|
:isActive="isActive"
|
|
7
11
|
:children="children"
|
|
@@ -23,8 +27,14 @@
|
|
|
23
27
|
/>
|
|
24
28
|
|
|
25
29
|
<!-- Nested menu items -->
|
|
26
|
-
<div
|
|
27
|
-
|
|
30
|
+
<div
|
|
31
|
+
class="vc-app-menu-item__child"
|
|
32
|
+
v-if="isOpened"
|
|
33
|
+
>
|
|
34
|
+
<template
|
|
35
|
+
v-for="(nested, i) in children"
|
|
36
|
+
:key="i"
|
|
37
|
+
>
|
|
28
38
|
<router-link
|
|
29
39
|
:to="nested.component.url"
|
|
30
40
|
custom
|
|
@@ -39,9 +49,7 @@
|
|
|
39
49
|
]"
|
|
40
50
|
v-if="nested.isVisible === undefined || nested.isVisible"
|
|
41
51
|
:key="i"
|
|
42
|
-
@click="
|
|
43
|
-
$emit('child:click', { item: nested, navigationCb: navigate })
|
|
44
|
-
"
|
|
52
|
+
@click="$emit('child:click', { item: nested, navigationCb: navigate })"
|
|
45
53
|
>
|
|
46
54
|
{{ nested.title }}
|
|
47
55
|
</div>
|
|
@@ -54,9 +62,10 @@
|
|
|
54
62
|
|
|
55
63
|
<script lang="ts" setup>
|
|
56
64
|
import { onMounted, ref, computed } from "vue";
|
|
57
|
-
import {
|
|
65
|
+
import { IBladeToolbar, IMenuItems } from "./../../../../../../../../core/types";
|
|
58
66
|
import VcAppMenuLink from "./_internal/vc-app-menu-link.vue";
|
|
59
67
|
import { NavigationFailure, useRoute } from "vue-router";
|
|
68
|
+
import { ExtendedComponent } from "./../../../../../../../../shared";
|
|
60
69
|
|
|
61
70
|
export interface Props {
|
|
62
71
|
sticky?: boolean;
|
|
@@ -103,18 +112,12 @@ const isOpened = ref(false);
|
|
|
103
112
|
const isHomePage = computed(() => route.path === "/");
|
|
104
113
|
|
|
105
114
|
onMounted(() => {
|
|
106
|
-
if (
|
|
107
|
-
props.children &&
|
|
108
|
-
props.children.length &&
|
|
109
|
-
props.children.find((x) => x.component?.url === route?.path)
|
|
110
|
-
) {
|
|
115
|
+
if (props.children && props.children.length && props.children.find((x) => x.component?.url === route?.path)) {
|
|
111
116
|
isOpened.value = true;
|
|
112
117
|
}
|
|
113
118
|
});
|
|
114
119
|
|
|
115
|
-
function onMenuItemClick(
|
|
116
|
-
navigationCb?: () => Promise<void | NavigationFailure>
|
|
117
|
-
) {
|
|
120
|
+
function onMenuItemClick(navigationCb?: () => Promise<void | NavigationFailure>) {
|
|
118
121
|
if (!props.children?.length) {
|
|
119
122
|
emit("click", navigationCb);
|
|
120
123
|
} else {
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
29
|
<!-- Show scrollable area with menu items -->
|
|
30
|
-
<VcContainer
|
|
30
|
+
<VcContainer
|
|
31
|
+
:noPadding="true"
|
|
32
|
+
class="tw-grow tw-basis-0"
|
|
33
|
+
>
|
|
31
34
|
<div class="tw-gap-[5px] tw-flex tw-flex-col tw-px-4 tw-h-full">
|
|
32
35
|
<template
|
|
33
36
|
v-for="(item, index) in mobileMenuItems"
|
|
@@ -42,7 +45,10 @@
|
|
|
42
45
|
></component>
|
|
43
46
|
</template>
|
|
44
47
|
</template>
|
|
45
|
-
<template
|
|
48
|
+
<template
|
|
49
|
+
v-for="(item, index) in items"
|
|
50
|
+
:key="index"
|
|
51
|
+
>
|
|
46
52
|
<VcAppMenuItem
|
|
47
53
|
v-if="item.isVisible === undefined || item.isVisible"
|
|
48
54
|
v-bind="item"
|
|
@@ -77,9 +83,9 @@
|
|
|
77
83
|
<script lang="ts" setup>
|
|
78
84
|
import { ref } from "vue";
|
|
79
85
|
import VcAppMenuItem from "./_internal/vc-app-menu-item/vc-app-menu-item.vue";
|
|
80
|
-
import { VcContainer } from "
|
|
81
|
-
import { IMenuItems } from "
|
|
82
|
-
import { IMenuClickEvent } from "
|
|
86
|
+
import { VcContainer } from "./../../../../../components";
|
|
87
|
+
import { IMenuItems } from "./../../../../../../core/types";
|
|
88
|
+
import { IMenuClickEvent } from "./../../../../../../shared";
|
|
83
89
|
|
|
84
90
|
export interface Props {
|
|
85
91
|
items?: IMenuItems[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcAppEmits, VcAppProps } from "./vc-app-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import App from "./vc-app.vue";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcApp: ComponentConstructor<ComponentPublicInstance<VcAppProps, any, any, any, any, VcAppEmits>> = App;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ExtendedComponent, IBladeElement, IOpenBlade } from "./../../../../shared";
|
|
2
|
+
import { IBladeToolbar, IMenuItems } from "./../../../../core/types";
|
|
3
|
+
import { PropType, VNode } from "vue";
|
|
4
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
5
|
+
import { isObject, isNumber } from "./../../../utils";
|
|
6
|
+
|
|
7
|
+
export const appProps = {
|
|
8
|
+
pages: {
|
|
9
|
+
type: Array as PropType<ExtendedComponent[]>,
|
|
10
|
+
default: () => [],
|
|
11
|
+
},
|
|
12
|
+
menuItems: {
|
|
13
|
+
type: Array as PropType<IMenuItems[]>,
|
|
14
|
+
default: () => [],
|
|
15
|
+
},
|
|
16
|
+
mobileMenuItems: {
|
|
17
|
+
type: Array as PropType<IMenuItems[]>,
|
|
18
|
+
default: () => [],
|
|
19
|
+
},
|
|
20
|
+
toolbarItems: {
|
|
21
|
+
type: Array as PropType<IBladeToolbar[]>,
|
|
22
|
+
default: () => [],
|
|
23
|
+
},
|
|
24
|
+
isReady: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
isAuthorized: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
logo: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: undefined,
|
|
35
|
+
},
|
|
36
|
+
version: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: undefined,
|
|
39
|
+
},
|
|
40
|
+
theme: {
|
|
41
|
+
type: String as PropType<"light" | "dark">,
|
|
42
|
+
default: "light",
|
|
43
|
+
},
|
|
44
|
+
bladesRefs: {
|
|
45
|
+
type: Array as PropType<IBladeElement[]>,
|
|
46
|
+
default: () => [],
|
|
47
|
+
},
|
|
48
|
+
title: String,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const appEmits = {
|
|
52
|
+
open: (args: IOpenBlade) => isObject(args),
|
|
53
|
+
close: (index: number) => isNumber(index),
|
|
54
|
+
"backlink:click": (index: number) => isNumber(index),
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type VcAppProps = ExtractTypes<typeof appProps>;
|
|
58
|
+
export type VcAppEmits = typeof appEmits;
|
|
59
|
+
|
|
60
|
+
export interface VcAppSlots {
|
|
61
|
+
appSwitcher: () => VNode[];
|
|
62
|
+
bladeNavigation: () => VNode[];
|
|
63
|
+
notifications: () => VNode[];
|
|
64
|
+
passwordChange: () => VNode[];
|
|
65
|
+
}
|
|
@@ -17,11 +17,7 @@
|
|
|
17
17
|
:blades="bladesRefs"
|
|
18
18
|
:buttons="toolbarItems"
|
|
19
19
|
@toolbarbutton:click="onToolbarButtonClick"
|
|
20
|
-
@menubutton:click="
|
|
21
|
-
(
|
|
22
|
-
$refs.menu as Record<'isMobileVisible', boolean>
|
|
23
|
-
).isMobileVisible = true
|
|
24
|
-
"
|
|
20
|
+
@menubutton:click="($refs.menu as Record<'isMobileVisible', boolean>).isMobileVisible = true"
|
|
25
21
|
@backlink:click="$emit('backlink:click', bladesRefs.length - 2)"
|
|
26
22
|
@logo:click="openDashboard"
|
|
27
23
|
:title="title"
|
|
@@ -43,9 +39,7 @@
|
|
|
43
39
|
></VcAppMenu>
|
|
44
40
|
|
|
45
41
|
<!-- Workspace blades -->
|
|
46
|
-
<div
|
|
47
|
-
class="vc-app__workspace tw-px-2 tw-w-full tw-overflow-hidden !tw-flex tw-grow tw-basis-0"
|
|
48
|
-
>
|
|
42
|
+
<div class="vc-app__workspace tw-px-2 tw-w-full tw-overflow-hidden !tw-flex tw-grow tw-basis-0">
|
|
49
43
|
<slot name="bladeNavigation"></slot>
|
|
50
44
|
</div>
|
|
51
45
|
|
|
@@ -73,48 +67,12 @@ export default defineComponent({
|
|
|
73
67
|
import { useRouter } from "vue-router";
|
|
74
68
|
import VcAppBar from "./_internal/vc-app-bar/vc-app-bar.vue";
|
|
75
69
|
import VcAppMenu from "./_internal/vc-app-menu/vc-app-menu.vue";
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
IBladeElement,
|
|
79
|
-
ExtendedComponent,
|
|
80
|
-
IMenuClickEvent,
|
|
81
|
-
IOpenBlade,
|
|
82
|
-
} from "@/shared";
|
|
83
|
-
|
|
84
|
-
export interface Props {
|
|
85
|
-
pages: ExtendedComponent[];
|
|
86
|
-
menuItems: IMenuItems[];
|
|
87
|
-
mobileMenuItems: IMenuItems[];
|
|
88
|
-
toolbarItems: IBladeToolbar[];
|
|
89
|
-
isReady: boolean;
|
|
90
|
-
isAuthorized: boolean;
|
|
91
|
-
logo: string;
|
|
92
|
-
version: string;
|
|
93
|
-
theme?: "light" | "dark";
|
|
94
|
-
bladesRefs: IBladeElement[];
|
|
95
|
-
title?: string;
|
|
96
|
-
}
|
|
70
|
+
import { IMenuClickEvent } from "./../../../../shared";
|
|
71
|
+
import { appEmits, appProps } from "./vc-app-model";
|
|
97
72
|
|
|
98
|
-
|
|
99
|
-
(event: "onOpen", args: IOpenBlade): void;
|
|
100
|
-
(event: "onClose", index: number): void;
|
|
101
|
-
(event: "backlink:click", index: number): void;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
withDefaults(defineProps<Props>(), {
|
|
105
|
-
pages: () => [],
|
|
106
|
-
menuItems: () => [],
|
|
107
|
-
mobileMenuItems: () => [],
|
|
108
|
-
toolbarItems: () => [],
|
|
109
|
-
isReady: false,
|
|
110
|
-
isAuthorized: false,
|
|
111
|
-
logo: undefined,
|
|
112
|
-
version: undefined,
|
|
113
|
-
theme: "light",
|
|
114
|
-
bladesRefs: () => [],
|
|
115
|
-
});
|
|
73
|
+
defineProps(appProps);
|
|
116
74
|
|
|
117
|
-
const emit = defineEmits
|
|
75
|
+
const emit = defineEmits(appEmits);
|
|
118
76
|
|
|
119
77
|
console.debug("vc-app: Init vc-app");
|
|
120
78
|
|
|
@@ -127,7 +85,7 @@ const onMenuItemClick = function ({ item, navigationCb }: IMenuClickEvent) {
|
|
|
127
85
|
if (item.clickHandler && typeof item.clickHandler === "function") {
|
|
128
86
|
item.clickHandler(instance?.exposed);
|
|
129
87
|
} else {
|
|
130
|
-
emit("
|
|
88
|
+
emit("open", { parentBlade: item.component, id: 0, navigationCb });
|
|
131
89
|
}
|
|
132
90
|
};
|
|
133
91
|
|
|
@@ -143,7 +101,7 @@ const openDashboard = async () => {
|
|
|
143
101
|
console.debug(`openDashboard() called.`);
|
|
144
102
|
|
|
145
103
|
// Close all opened pages with onBeforeClose callback
|
|
146
|
-
await emit("
|
|
104
|
+
await emit("close", 0);
|
|
147
105
|
|
|
148
106
|
router.push("/");
|
|
149
107
|
};
|
|
@@ -157,8 +115,8 @@ defineExpose({
|
|
|
157
115
|
|
|
158
116
|
<style lang="scss">
|
|
159
117
|
:root {
|
|
160
|
-
--app-background: linear-gradient(180deg, #e4f5fb 5.06%, #e8f3f2 100%),
|
|
161
|
-
|
|
118
|
+
--app-background: linear-gradient(180deg, #e4f5fb 5.06%, #e8f3f2 100%), linear-gradient(0deg, #e8f2f3, #e8f2f3),
|
|
119
|
+
#eef2f8;
|
|
162
120
|
}
|
|
163
121
|
|
|
164
122
|
.vc-app {
|