@vc-shell/framework 1.0.53 → 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 +1 -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 +5 -12
- package/core/composables/useSettings/index.ts +2 -3
- package/core/composables/useUser/index.ts +25 -64
- 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 +3 -5
- 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.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.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- 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 +0 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.esm.js +42553 -0
- package/dist/framework.js +77 -75
- package/dist/index.d.ts.map +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 +1 -1
- 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/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 +2 -2
- 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 -15
- 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 +2 -2
- 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 -10
- 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 +2 -2
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts +28 -11
- package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts +2 -2
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts +25 -8
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts +8 -3
- package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/index.d.ts +2 -2
- package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts +20 -6
- package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts +13 -5
- package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/index.d.ts +2 -2
- package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts +34 -11
- package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts +21 -7
- package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts +12 -4
- package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/index.d.ts +2 -2
- package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts +16 -5
- package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts +8 -3
- package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts +13 -5
- package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts +17 -6
- package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts +8 -3
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-switch/index.d.ts +2 -2
- package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts +25 -8
- package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/index.d.ts +2 -2
- package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts +15 -7
- package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts.map +1 -1
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts +15 -10
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/index.d.ts +2 -2
- package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts +28 -11
- package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +2 -2
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts +30 -10
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts.map +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts +13 -5
- package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +2 -2
- package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts +20 -6
- package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts +17 -9
- package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/index.d.ts +2 -2
- 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.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts +25 -8
- package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/index.d.ts +2 -2
- package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts +32 -12
- package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/index.d.ts +2 -2
- package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts +52 -17
- package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/index.d.ts +2 -2
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts +28 -11
- package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts +39 -10
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/index.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts +69 -27
- package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts +10 -5
- package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/index.d.ts +2 -2
- package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts +18 -7
- package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/index.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts +103 -34
- package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts.map +1 -1
- package/dist/ui/types/index.d.ts +48 -46
- 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 +8 -11
- package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -5
- package/shared/app-switcher/composables/useAppSwitcher/index.ts +2 -7
- package/shared/app-switcher/index.ts +3 -10
- package/shared/assets/components/assets-details/assets-details.vue +7 -28
- 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 +7 -36
- package/shared/blade-navigation/index.ts +3 -10
- package/shared/index.ts +9 -11
- package/ui/components/atoms/vc-badge/index.ts +4 -4
- package/ui/components/atoms/vc-badge/vc-badge-model.ts +22 -15
- package/ui/components/atoms/vc-badge/vc-badge.vue +5 -10
- package/ui/components/atoms/vc-button/index.ts +4 -4
- package/ui/components/atoms/vc-button/vc-button-model.ts +32 -17
- package/ui/components/atoms/vc-button/vc-button.vue +8 -13
- package/ui/components/atoms/vc-card/index.ts +3 -4
- package/ui/components/atoms/vc-card/vc-card-model.ts +31 -11
- package/ui/components/atoms/vc-card/vc-card.vue +20 -11
- package/ui/components/atoms/vc-checkbox/index.ts +3 -2
- package/ui/components/atoms/vc-checkbox/vc-checkbox-model.ts +28 -8
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +15 -11
- package/ui/components/atoms/vc-col/index.ts +1 -2
- package/ui/components/atoms/vc-col/vc-col-model.ts +9 -3
- package/ui/components/atoms/vc-col/vc-col.vue +2 -4
- package/ui/components/atoms/vc-container/index.ts +3 -2
- package/ui/components/atoms/vc-container/vc-container-model.ts +24 -8
- package/ui/components/atoms/vc-container/vc-container.vue +6 -14
- package/ui/components/atoms/vc-hint/vc-hint-model.ts +5 -0
- package/ui/components/atoms/vc-icon/index.ts +1 -3
- package/ui/components/atoms/vc-icon/vc-icon-model.ts +15 -6
- package/ui/components/atoms/vc-icon/vc-icon.vue +2 -5
- package/ui/components/atoms/vc-image/index.ts +4 -4
- package/ui/components/atoms/vc-image/vc-image-model.ts +36 -22
- package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -2
- package/ui/components/atoms/vc-image/vc-image.vue +13 -17
- package/ui/components/atoms/vc-info-row/index.ts +1 -3
- package/ui/components/atoms/vc-info-row/vc-info-row-model.ts +22 -7
- package/ui/components/atoms/vc-info-row/vc-info-row.vue +13 -9
- package/ui/components/atoms/vc-label/index.ts +1 -3
- package/ui/components/atoms/vc-label/vc-label-model.ts +13 -4
- package/ui/components/atoms/vc-label/vc-label.vue +6 -6
- package/ui/components/atoms/vc-link/index.ts +3 -4
- package/ui/components/atoms/vc-link/vc-link-model.ts +18 -5
- package/ui/components/atoms/vc-link/vc-link.vue +4 -6
- package/ui/components/atoms/vc-loading/index.ts +1 -3
- package/ui/components/atoms/vc-loading/vc-loading-model.ts +9 -3
- package/ui/components/atoms/vc-loading/vc-loading.vue +4 -9
- package/ui/components/atoms/vc-progress/index.ts +1 -3
- package/ui/components/atoms/vc-progress/vc-progress-model.ts +14 -5
- package/ui/components/atoms/vc-progress/vc-progress.vue +4 -13
- package/ui/components/atoms/vc-status/index.ts +1 -3
- package/ui/components/atoms/vc-status/vc-status-model.ts +18 -12
- package/ui/components/atoms/vc-status/vc-status.vue +3 -11
- package/ui/components/atoms/vc-status-icon/index.ts +1 -3
- package/ui/components/atoms/vc-status-icon/vc-status-icon-model.ts +9 -3
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +2 -4
- package/ui/components/atoms/vc-switch/index.ts +4 -4
- package/ui/components/atoms/vc-switch/vc-switch-model.ts +28 -8
- package/ui/components/atoms/vc-switch/vc-switch.vue +12 -10
- package/ui/components/atoms/vc-widget/index.ts +4 -4
- package/ui/components/atoms/vc-widget/vc-widget-model.ts +17 -7
- package/ui/components/atoms/vc-widget/vc-widget.vue +16 -7
- package/ui/components/index.ts +1 -1
- package/ui/components/molecules/vc-breadcrumbs/index.ts +1 -3
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.ts +18 -10
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +6 -5
- package/ui/components/molecules/vc-editor/index.ts +4 -4
- package/ui/components/molecules/vc-editor/vc-editor-model.ts +31 -11
- package/ui/components/molecules/vc-editor/vc-editor.vue +17 -11
- package/ui/components/molecules/vc-file-upload/index.ts +3 -2
- package/ui/components/molecules/vc-file-upload/vc-file-upload-model.ts +33 -11
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +10 -14
- package/ui/components/molecules/vc-form/vc-form-model.ts +5 -0
- package/ui/components/molecules/vc-input/index.ts +4 -5
- 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 +3 -2
- 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 +4 -3
- package/ui/components/molecules/vc-notification/vc-notification-model.ts +15 -5
- package/ui/components/molecules/vc-notification/vc-notification.vue +3 -5
- package/ui/components/molecules/vc-pagination/index.ts +4 -3
- package/ui/components/molecules/vc-pagination/vc-pagination-model.ts +23 -6
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +19 -11
- package/ui/components/molecules/vc-rating/index.ts +2 -4
- package/ui/components/molecules/vc-rating/vc-rating-model.ts +18 -9
- package/ui/components/molecules/vc-rating/vc-rating.vue +10 -4
- 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 +126 -171
- package/ui/components/molecules/vc-slider/index.ts +2 -4
- package/ui/components/molecules/vc-slider/vc-slider-model.ts +30 -11
- package/ui/components/molecules/vc-slider/vc-slider.vue +2 -8
- package/ui/components/molecules/vc-textarea/index.ts +4 -3
- package/ui/components/molecules/vc-textarea/vc-textarea-model.ts +35 -12
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +16 -12
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +13 -9
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +12 -3
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -16
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +8 -2
- package/ui/components/organisms/vc-app/index.ts +4 -4
- package/ui/components/organisms/vc-app/vc-app-model.ts +55 -17
- package/ui/components/organisms/vc-app/vc-app.vue +8 -25
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +22 -7
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +19 -13
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +13 -11
- package/ui/components/organisms/vc-blade/index.ts +5 -5
- package/ui/components/organisms/vc-blade/vc-blade-model.ts +30 -11
- package/ui/components/organisms/vc-blade/vc-blade.stories.ts +1 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +12 -14
- package/ui/components/organisms/vc-dynamic-property/index.ts +2 -4
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.ts +53 -20
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +41 -37
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +9 -2
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +14 -9
- package/ui/components/organisms/vc-gallery/index.ts +4 -3
- package/ui/components/organisms/vc-gallery/vc-gallery-model.ts +72 -27
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +7 -20
- package/ui/components/organisms/vc-login-form/index.ts +2 -4
- package/ui/components/organisms/vc-login-form/vc-login-form-model.ts +10 -5
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +2 -4
- package/ui/components/organisms/vc-popup/index.ts +5 -5
- package/ui/components/organisms/vc-popup/vc-popup-model.ts +20 -7
- package/ui/components/organisms/vc-popup/vc-popup.vue +7 -7
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +19 -25
- 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 +8 -2
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +27 -39
- package/ui/components/organisms/vc-table/index.ts +5 -5
- package/ui/components/organisms/vc-table/vc-table-model.ts +98 -38
- package/ui/components/organisms/vc-table/vc-table.vue +105 -103
- package/ui/types/index.ts +64 -160
- 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
|
@@ -1,24 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
import { VNode, PropType } from "vue";
|
|
2
4
|
|
|
3
|
-
export
|
|
4
|
-
property
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
export const dynamicPropertyProps = {
|
|
6
|
+
property: Object as PropType<{
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
displayNames?: { languageCode: string; name: string }[];
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
dictionary?: string | undefined;
|
|
11
|
+
isDictionary?: string | undefined;
|
|
12
|
+
multivalue?: string | undefined;
|
|
13
|
+
displayName?: string | undefined;
|
|
14
|
+
defaultValue?: string | undefined;
|
|
15
|
+
valueType?: "ShortText" | "Number" | "Integer" | "DateTime" | "LongText" | "Boolean" | "Html" | undefined;
|
|
16
|
+
values?: any | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
isRequired?: boolean | undefined;
|
|
19
|
+
validationRule?:
|
|
20
|
+
| {
|
|
21
|
+
charCountMin?: string;
|
|
22
|
+
charCountMax?: string;
|
|
23
|
+
regExp?: string;
|
|
24
|
+
}
|
|
25
|
+
| undefined;
|
|
26
|
+
}>,
|
|
27
|
+
dictionaries: Object as PropType<Record<string, any>>,
|
|
28
|
+
getter: Function as PropType<
|
|
29
|
+
(
|
|
30
|
+
property: Record<string, any>,
|
|
31
|
+
isDictionary?: boolean
|
|
32
|
+
) => Record<string, any> | string | number | boolean | Date | undefined
|
|
33
|
+
>,
|
|
34
|
+
optionsGetter: Function as PropType<
|
|
35
|
+
(property: Record<string, any>, keyword?: string) => Promise<any[] | undefined> | any[]
|
|
36
|
+
>,
|
|
37
|
+
setter: Function as PropType<
|
|
38
|
+
(
|
|
39
|
+
property: Record<string, any>,
|
|
40
|
+
value: Record<string, any> | string | number | boolean,
|
|
41
|
+
dictionary?: any[]
|
|
42
|
+
) => void | undefined
|
|
43
|
+
>,
|
|
44
|
+
culture: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "en-US",
|
|
47
|
+
},
|
|
48
|
+
disabled: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type VcDynamicPropertyProps = ExtractTypes<typeof dynamicPropertyProps>;
|
|
22
55
|
|
|
23
56
|
export interface VcDynamicPropertySlots {
|
|
24
57
|
default: () => VNode[];
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Field
|
|
3
|
-
v-if="
|
|
4
|
-
(property['dictionary'] || property['isDictionary']) && !property['multivalue']
|
|
5
|
-
"
|
|
3
|
+
v-if="(property['dictionary'] || property['isDictionary']) && !property['multivalue']"
|
|
6
4
|
v-slot="{ errorMessage, handleChange, errors }"
|
|
5
|
+
:label="handleDisplayName || property['displayName']"
|
|
7
6
|
:name="property['displayName'] || property['name']"
|
|
8
7
|
:modelValue="getter(property, true)"
|
|
9
8
|
:rules="rules"
|
|
@@ -38,13 +37,15 @@
|
|
|
38
37
|
property['multivalue'] &&
|
|
39
38
|
!(property['dictionary'] || property['isDictionary'])
|
|
40
39
|
"
|
|
41
|
-
v-slot="{ errorMessage, handleChange }"
|
|
40
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
41
|
+
:label="handleDisplayName"
|
|
42
42
|
:name="property['name']"
|
|
43
43
|
:modelValue="property['values']"
|
|
44
44
|
:rules="rules"
|
|
45
45
|
>
|
|
46
|
-
<
|
|
46
|
+
<VcSelect
|
|
47
47
|
v-bind="$attrs"
|
|
48
|
+
:error="!!errors.length"
|
|
48
49
|
:error-message="errorMessage"
|
|
49
50
|
:label="handleDisplayName"
|
|
50
51
|
:modelValue="property['values']"
|
|
@@ -57,7 +58,8 @@
|
|
|
57
58
|
:required="property['required'] || property['isRequired']"
|
|
58
59
|
placeholder="Add value"
|
|
59
60
|
:disabled="disabled"
|
|
60
|
-
|
|
61
|
+
:multiple="true"
|
|
62
|
+
></VcSelect>
|
|
61
63
|
</Field>
|
|
62
64
|
|
|
63
65
|
<Field
|
|
@@ -66,13 +68,15 @@
|
|
|
66
68
|
property['multivalue'] &&
|
|
67
69
|
(property['dictionary'] || property['isDictionary'])
|
|
68
70
|
"
|
|
69
|
-
v-slot="{ errorMessage, handleChange }"
|
|
71
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
72
|
+
:label="handleDisplayName"
|
|
70
73
|
:name="property['name']"
|
|
71
74
|
:modelValue="property['values']"
|
|
72
75
|
:rules="rules"
|
|
73
76
|
>
|
|
74
|
-
<
|
|
77
|
+
<VcSelect
|
|
75
78
|
v-bind="$attrs"
|
|
79
|
+
:error="!!errors.length"
|
|
76
80
|
:error-message="errorMessage"
|
|
77
81
|
:label="handleDisplayName"
|
|
78
82
|
:modelValue="property['values']"
|
|
@@ -84,19 +88,20 @@
|
|
|
84
88
|
"
|
|
85
89
|
:required="property['required'] || property['isRequired']"
|
|
86
90
|
placeholder="Add value"
|
|
87
|
-
:multivalue="property['multivalue']"
|
|
88
91
|
:disabled="disabled"
|
|
89
92
|
:options="items"
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
option-label="alias"
|
|
94
|
+
option-value="id"
|
|
92
95
|
@search="onSearch"
|
|
93
96
|
@close="onClose"
|
|
94
|
-
|
|
97
|
+
:multiple="property['multivalue']"
|
|
98
|
+
></VcSelect>
|
|
95
99
|
</Field>
|
|
96
100
|
|
|
97
101
|
<Field
|
|
98
102
|
v-else-if="property['valueType'] === 'ShortText'"
|
|
99
103
|
v-slot="{ errorMessage, handleChange, errors }"
|
|
104
|
+
:label="handleDisplayName || property['displayName']"
|
|
100
105
|
:name="property['displayName'] || property['name']"
|
|
101
106
|
:modelValue="getter(property)"
|
|
102
107
|
:rules="rules"
|
|
@@ -123,6 +128,7 @@
|
|
|
123
128
|
<Field
|
|
124
129
|
v-else-if="property['valueType'] === 'Number' && property['multivalue']"
|
|
125
130
|
v-slot="{ errorMessage, handleChange, errors }"
|
|
131
|
+
:label="handleDisplayName"
|
|
126
132
|
:name="property['name']"
|
|
127
133
|
:modelValue="property['values']"
|
|
128
134
|
:rules="rules"
|
|
@@ -153,6 +159,7 @@
|
|
|
153
159
|
<Field
|
|
154
160
|
v-else-if="property['valueType'] === 'Number'"
|
|
155
161
|
v-slot="{ errorMessage, handleChange, errors }"
|
|
162
|
+
:label="handleDisplayName"
|
|
156
163
|
:name="property['name']"
|
|
157
164
|
:modelValue="getter(property)"
|
|
158
165
|
:rules="rules"
|
|
@@ -180,6 +187,7 @@
|
|
|
180
187
|
<Field
|
|
181
188
|
v-else-if="property['valueType'] === 'Integer'"
|
|
182
189
|
v-slot="{ errorMessage, handleChange, errors }"
|
|
190
|
+
:label="handleDisplayName"
|
|
183
191
|
:name="property['name']"
|
|
184
192
|
:modelValue="getter(property)"
|
|
185
193
|
:rules="rules"
|
|
@@ -208,6 +216,7 @@
|
|
|
208
216
|
<Field
|
|
209
217
|
v-else-if="property['valueType'] === 'DateTime'"
|
|
210
218
|
v-slot="{ errorMessage, handleChange, errors }"
|
|
219
|
+
:label="handleDisplayName"
|
|
211
220
|
:name="property['name']"
|
|
212
221
|
:modelValue="getter(property)"
|
|
213
222
|
:rules="rules"
|
|
@@ -234,6 +243,7 @@
|
|
|
234
243
|
<Field
|
|
235
244
|
v-else-if="property['valueType'] === 'LongText'"
|
|
236
245
|
v-slot="{ errorMessage, handleChange }"
|
|
246
|
+
:label="handleDisplayName"
|
|
237
247
|
:name="property['name']"
|
|
238
248
|
:modelValue="getter(property)"
|
|
239
249
|
:rules="rules"
|
|
@@ -258,6 +268,7 @@
|
|
|
258
268
|
<Field
|
|
259
269
|
v-else-if="property['valueType'] === 'Boolean'"
|
|
260
270
|
v-slot="{ errorMessage, handleChange }"
|
|
271
|
+
:label="handleDisplayName || property['displayName']"
|
|
261
272
|
:name="property['displayName'] || property['name']"
|
|
262
273
|
:modelValue="getter(property)"
|
|
263
274
|
:rules="rules"
|
|
@@ -276,13 +287,14 @@
|
|
|
276
287
|
:disabled="disabled"
|
|
277
288
|
:name="property['displayName'] || property['name']"
|
|
278
289
|
>
|
|
279
|
-
{{ handleDisplayName || property[
|
|
290
|
+
{{ handleDisplayName || property["displayName"] }}
|
|
280
291
|
</VcCheckbox>
|
|
281
292
|
</Field>
|
|
282
293
|
|
|
283
294
|
<Field
|
|
284
295
|
v-else-if="property['valueType'] === 'Html'"
|
|
285
296
|
v-slot="{ errorMessage, handleChange }"
|
|
297
|
+
:label="handleDisplayName || property['displayName']"
|
|
286
298
|
:name="property['displayName'] || property['name']"
|
|
287
299
|
:modelValue="getter(property)"
|
|
288
300
|
:rules="rules"
|
|
@@ -311,7 +323,7 @@
|
|
|
311
323
|
import { ref, onMounted, computed } from "vue";
|
|
312
324
|
import { useI18n } from "./../../../../core/composables";
|
|
313
325
|
import { Field } from "vee-validate";
|
|
314
|
-
import {
|
|
326
|
+
import { dynamicPropertyProps } from "./vc-dynamic-property-model";
|
|
315
327
|
|
|
316
328
|
type IValidationRules = {
|
|
317
329
|
required?: boolean;
|
|
@@ -325,35 +337,27 @@ interface IDisplayName {
|
|
|
325
337
|
name?: string;
|
|
326
338
|
}
|
|
327
339
|
|
|
328
|
-
const props =
|
|
329
|
-
culture: "en-US",
|
|
330
|
-
disabled: false,
|
|
331
|
-
});
|
|
340
|
+
const props = defineProps(dynamicPropertyProps);
|
|
332
341
|
|
|
333
342
|
const { locale, te, t } = useI18n();
|
|
334
343
|
|
|
335
344
|
const rules: IValidationRules = {};
|
|
336
345
|
const items = ref([]);
|
|
337
346
|
const handleDisplayProperty = computed(() => {
|
|
338
|
-
return items.value?.some((x: { alias: string }) => x.alias)
|
|
339
|
-
? "alias"
|
|
340
|
-
: "name";
|
|
347
|
+
return items.value?.some((x: { alias: string }) => x.alias) ? "alias" : "name";
|
|
341
348
|
});
|
|
342
349
|
const handleDisplayName = computed(() => {
|
|
343
350
|
let localized: string;
|
|
344
|
-
const isLocaleExists = props.property
|
|
345
|
-
x.languageCode
|
|
346
|
-
?.toLowerCase()
|
|
347
|
-
.startsWith((locale.value as string)?.toLowerCase())
|
|
351
|
+
const isLocaleExists = props.property["displayNames"]?.find((x: IDisplayName) =>
|
|
352
|
+
x.languageCode?.toLowerCase().startsWith((locale.value as string)?.toLowerCase())
|
|
348
353
|
);
|
|
349
354
|
if (isLocaleExists && isLocaleExists.name) {
|
|
350
355
|
localized = isLocaleExists.name;
|
|
351
356
|
} else {
|
|
352
|
-
const fallback = props.property
|
|
357
|
+
const fallback = props.property["displayNames"]?.find((x: IDisplayName) =>
|
|
353
358
|
x.languageCode?.toLowerCase().includes(props.culture?.toLowerCase())
|
|
354
359
|
);
|
|
355
|
-
localized =
|
|
356
|
-
fallback && fallback?.name ? fallback.name : props.property.name;
|
|
360
|
+
localized = fallback && fallback?.name ? fallback.name : props.property["name"];
|
|
357
361
|
}
|
|
358
362
|
|
|
359
363
|
return localized && te(localized.toUpperCase())
|
|
@@ -367,24 +371,24 @@ onMounted(async () => {
|
|
|
367
371
|
}
|
|
368
372
|
});
|
|
369
373
|
|
|
370
|
-
if (props.property
|
|
374
|
+
if (props.property["required"] || props.property["isRequired"]) {
|
|
371
375
|
rules.required = true;
|
|
372
376
|
}
|
|
373
|
-
if (props.property
|
|
374
|
-
rules.min = Number(props.property
|
|
377
|
+
if (props.property["validationRule"]?.charCountMin) {
|
|
378
|
+
rules.min = Number(props.property["validationRule"].charCountMin);
|
|
375
379
|
}
|
|
376
|
-
if (props.property
|
|
377
|
-
rules.max = Number(props.property
|
|
380
|
+
if (props.property["validationRule"]?.charCountMax) {
|
|
381
|
+
rules.max = Number(props.property["validationRule"].charCountMax);
|
|
378
382
|
}
|
|
379
|
-
if (props.property
|
|
380
|
-
rules.regex = new RegExp(props.property
|
|
383
|
+
if (props.property["validationRule"]?.regExp) {
|
|
384
|
+
rules.regex = new RegExp(props.property["validationRule"]?.regExp);
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
/*function getLabel() {
|
|
384
388
|
return (
|
|
385
|
-
(props.property
|
|
389
|
+
(props.property['displayNames'] as { culture: string }[]).find(
|
|
386
390
|
(item) => item.culture === props.culture
|
|
387
|
-
) || props.property
|
|
391
|
+
) || props.property['name']
|
|
388
392
|
);
|
|
389
393
|
}
|
|
390
394
|
*/
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
@tap.stop="hover = !hover"
|
|
9
9
|
v-click-outside="onClose"
|
|
10
10
|
>
|
|
11
|
-
<VcImage
|
|
11
|
+
<VcImage
|
|
12
|
+
aspect="1x1"
|
|
13
|
+
:src="image.url"
|
|
14
|
+
background="contain"
|
|
15
|
+
></VcImage>
|
|
12
16
|
<div class="vc-gallery-item__overlay">
|
|
13
17
|
<div class="tw-flex">
|
|
14
18
|
<VcIcon
|
|
@@ -17,7 +21,10 @@
|
|
|
17
21
|
icon="fas fa-arrows-alt"
|
|
18
22
|
size="s"
|
|
19
23
|
></VcIcon>
|
|
20
|
-
<div
|
|
24
|
+
<div
|
|
25
|
+
class="tw-truncate"
|
|
26
|
+
:title="image.name"
|
|
27
|
+
>
|
|
21
28
|
{{ image.name }}
|
|
22
29
|
</div>
|
|
23
30
|
</div>
|
package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<VcPopup
|
|
2
|
+
<VcPopup
|
|
3
|
+
:title="currentImage.title"
|
|
4
|
+
@close="$emit('close')"
|
|
5
|
+
>
|
|
3
6
|
<template v-slot:title>
|
|
4
7
|
<div>
|
|
5
8
|
<span>{{ currentImage.name }} (</span>
|
|
@@ -7,9 +10,7 @@
|
|
|
7
10
|
<span>)</span>
|
|
8
11
|
</div>
|
|
9
12
|
</template>
|
|
10
|
-
<div
|
|
11
|
-
class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center"
|
|
12
|
-
>
|
|
13
|
+
<div class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center">
|
|
13
14
|
<div class="tw-box-border p-5 tw-grow tw-basis-0 tw-w-full">
|
|
14
15
|
<div
|
|
15
16
|
class="bg-contain tw-bg-no-repeat tw-bg-center tw-w-full tw-h-full tw-box-border"
|
|
@@ -20,19 +21,23 @@
|
|
|
20
21
|
class="tw-absolute tw-top-2/4 -tw-mt-9 tw-h-[72px] tw-w-[72px] tw-flex tw-items-center tw-justify-center tw-rounded-full tw-bg-[#f1f6fa] tw-cursor-pointer tw-text-[#a1c0d4] [--icon-size-xl: 36px] hover:tw-shadow-[0_0_20px_rgba(31,40,50,0.15)] tw-left-[25px]"
|
|
21
22
|
@click="localIndex--"
|
|
22
23
|
>
|
|
23
|
-
<VcIcon
|
|
24
|
+
<VcIcon
|
|
25
|
+
icon="fas fa-arrow-left"
|
|
26
|
+
size="xl"
|
|
27
|
+
></VcIcon>
|
|
24
28
|
</div>
|
|
25
29
|
<div
|
|
26
30
|
v-if="localIndex < images.length - 1"
|
|
27
31
|
class="tw-absolute tw-top-2/4 -tw-mt-9 tw-h-[72px] tw-w-[72px] tw-flex tw-items-center tw-justify-center tw-rounded-full tw-bg-[#f1f6fa] tw-cursor-pointer tw-text-[#a1c0d4] [--icon-size-xl: 36px] hover:tw-shadow-[0_0_20px_rgba(31,40,50,0.15)] tw-right-[25px]"
|
|
28
32
|
@click="localIndex++"
|
|
29
33
|
>
|
|
30
|
-
<VcIcon
|
|
34
|
+
<VcIcon
|
|
35
|
+
icon="fas fa-arrow-right"
|
|
36
|
+
size="xl"
|
|
37
|
+
></VcIcon>
|
|
31
38
|
</div>
|
|
32
39
|
</div>
|
|
33
|
-
<div
|
|
34
|
-
class="tw-p-4 tw-pb-[40px] tw-max-w-full tw-overflow-x-auto tw-box-border tw-shrink tw-flex"
|
|
35
|
-
>
|
|
40
|
+
<div class="tw-p-4 tw-pb-[40px] tw-max-w-full tw-overflow-x-auto tw-box-border tw-shrink tw-flex">
|
|
36
41
|
<div
|
|
37
42
|
v-for="(item, i) in images"
|
|
38
43
|
:key="i"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcGalleryProps } from "./vc-gallery-model";
|
|
3
|
-
import { ComponentConstructor } from "./../../../types/ts-helpers"
|
|
2
|
+
import { VcGalleryEmits, VcGalleryProps } from "./vc-gallery-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Gallery from "./vc-gallery.vue";
|
|
5
5
|
export const VcGallery: ComponentConstructor<
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
ComponentPublicInstance<VcGalleryProps, any, any, any, any, VcGalleryEmits>
|
|
7
8
|
> = Gallery;
|
|
@@ -1,32 +1,77 @@
|
|
|
1
|
+
import { isArray, isObject } from "./../../../utils";
|
|
1
2
|
import { IImage } from "./../../../../core/types";
|
|
2
|
-
import { VNode } from "vue";
|
|
3
|
+
import { PropType, VNode } from "vue";
|
|
4
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
5
|
|
|
4
|
-
export
|
|
5
|
-
images
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
export const galleryProps = {
|
|
7
|
+
images: {
|
|
8
|
+
type: Array as PropType<IImage[]>,
|
|
9
|
+
default: () => [],
|
|
10
|
+
},
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false,
|
|
14
|
+
},
|
|
15
|
+
required: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
label: String,
|
|
20
|
+
tooltip: String,
|
|
21
|
+
tooltipIcon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "fas fa-info",
|
|
24
|
+
},
|
|
25
|
+
uploadIcon: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "fas fa-upload",
|
|
28
|
+
},
|
|
29
|
+
multiple: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
variant: {
|
|
34
|
+
type: String as PropType<"gallery" | "file-upload">,
|
|
35
|
+
default: "gallery",
|
|
36
|
+
},
|
|
37
|
+
itemActions: {
|
|
38
|
+
type: Object as PropType<{
|
|
39
|
+
name?: string | undefined;
|
|
40
|
+
preview: boolean | undefined;
|
|
41
|
+
edit: boolean | undefined;
|
|
42
|
+
remove: boolean | undefined;
|
|
43
|
+
}>,
|
|
44
|
+
default: () => ({
|
|
45
|
+
preview: true,
|
|
46
|
+
edit: true,
|
|
47
|
+
remove: true,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
disableDrag: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
hideAfterUpload: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
rules: [String, Object] as PropType<string | Record<string, unknown>>,
|
|
59
|
+
name: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "Gallery",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const galleryEmits = {
|
|
66
|
+
upload: (files: FileList) => !!files,
|
|
67
|
+
sort: (sorted: IImage[]) => isArray(sorted),
|
|
68
|
+
"item:edit": (image: IImage) => isObject(image),
|
|
69
|
+
"item:remove": (image: IImage) => isObject(image),
|
|
70
|
+
"item:move": (image: IImage) => isObject(image),
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type VcGalleryProps = ExtractTypes<typeof galleryProps>;
|
|
74
|
+
export type VcGalleryEmits = typeof galleryEmits;
|
|
30
75
|
|
|
31
76
|
export interface VcGallerySlots {
|
|
32
77
|
default: () => VNode[];
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
</draggable>
|
|
50
50
|
</div>
|
|
51
51
|
</template>
|
|
52
|
-
<div
|
|
52
|
+
<div
|
|
53
|
+
v-else
|
|
54
|
+
class="tw-flex tw-justify-center tw-p-5"
|
|
55
|
+
>
|
|
53
56
|
<VcHint>Gallery is empty</VcHint>
|
|
54
57
|
</div>
|
|
55
58
|
|
|
@@ -67,27 +70,11 @@ import { computed, ref } from "vue";
|
|
|
67
70
|
import { VcLabel, VcFileUpload } from "./../../../components";
|
|
68
71
|
import VcGalleryItem from "./_internal/vc-gallery-item/vc-gallery-item.vue";
|
|
69
72
|
import VcGalleryPreview from "./_internal/vc-gallery-preview/vc-gallery-preview.vue";
|
|
70
|
-
import {
|
|
73
|
+
import { galleryEmits, galleryProps } from "./vc-gallery-model";
|
|
71
74
|
|
|
72
|
-
const props =
|
|
73
|
-
images: () => [],
|
|
74
|
-
disabled: false,
|
|
75
|
-
required: false,
|
|
76
|
-
tooltipIcon: "fas fa-info",
|
|
77
|
-
uploadIcon: "fas fa-upload",
|
|
78
|
-
multiple: false,
|
|
79
|
-
variant: "gallery",
|
|
80
|
-
itemActions: () => ({
|
|
81
|
-
preview: true,
|
|
82
|
-
edit: true,
|
|
83
|
-
remove: true,
|
|
84
|
-
}),
|
|
85
|
-
disableDrag: false,
|
|
86
|
-
hideAfterUpload: false,
|
|
87
|
-
name: "Gallery",
|
|
88
|
-
});
|
|
75
|
+
const props = defineProps(galleryProps);
|
|
89
76
|
|
|
90
|
-
const emit = defineEmits(
|
|
77
|
+
const emit = defineEmits(galleryEmits);
|
|
91
78
|
|
|
92
79
|
const preview = ref(false);
|
|
93
80
|
const previewImageIndex = ref();
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
2
|
import { VcLoginFormProps } from "./vc-login-form-model";
|
|
3
|
-
import { ComponentConstructor } from "./../../../types/ts-helpers"
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import LoginForm from "./vc-login-form.vue";
|
|
5
|
-
export const VcLoginForm: ComponentConstructor<
|
|
6
|
-
ComponentPublicInstance<VcLoginFormProps>
|
|
7
|
-
> = LoginForm;
|
|
5
|
+
export const VcLoginForm: ComponentConstructor<ComponentPublicInstance<VcLoginFormProps>> = LoginForm;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
logo
|
|
5
|
-
background
|
|
6
|
-
title
|
|
7
|
-
|
|
4
|
+
export const loginFormProps = {
|
|
5
|
+
logo: String,
|
|
6
|
+
background: String,
|
|
7
|
+
title: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "Login",
|
|
10
|
+
},
|
|
11
|
+
};
|
|
8
12
|
|
|
13
|
+
export type VcLoginFormProps = ExtractTypes<typeof loginFormProps>;
|
|
9
14
|
export interface VcLoginFormSlots {
|
|
10
15
|
default: () => VNode[];
|
|
11
16
|
}
|
|
@@ -27,11 +27,9 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts" setup>
|
|
30
|
-
import {
|
|
30
|
+
import { loginFormProps } from "./vc-login-form-model";
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
title: "Login",
|
|
34
|
-
});
|
|
32
|
+
defineProps(loginFormProps);
|
|
35
33
|
|
|
36
34
|
console.debug("Init vc-login-form");
|
|
37
35
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcPopupProps } from "./vc-popup-model";
|
|
3
|
-
import { ComponentConstructor } from "./../../../types/ts-helpers"
|
|
2
|
+
import { VcPopupEmits, VcPopupProps } from "./vc-popup-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Popup from "./vc-popup.vue";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcPopup: ComponentConstructor<ComponentPublicInstance<VcPopupProps, any, any, any, any, VcPopupEmits>> =
|
|
7
|
+
Popup;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import { VNode } from "vue";
|
|
1
|
+
import { PropType, VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
title
|
|
5
|
-
closable
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
export const popupProps = {
|
|
5
|
+
title: String,
|
|
6
|
+
closable: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: true,
|
|
9
|
+
},
|
|
10
|
+
variant: {
|
|
11
|
+
type: String as PropType<"small" | "medium" | "fullscreen">,
|
|
12
|
+
default: "fullscreen",
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const popupEmits = {
|
|
17
|
+
close: () => true,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type VcPopupProps = ExtractTypes<typeof popupProps>;
|
|
21
|
+
export type VcPopupEmits = typeof popupEmits;
|
|
9
22
|
|
|
10
23
|
export interface VcPopupSlots {
|
|
11
24
|
default: () => VNode[];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="vc-popup"
|
|
4
|
+
:class="`vc-popup_${variant}`"
|
|
5
|
+
>
|
|
3
6
|
<div class="vc-popup__wrapper">
|
|
4
7
|
<div class="vc-popup__inner">
|
|
5
8
|
<div class="vc-popup__header">
|
|
@@ -23,14 +26,11 @@
|
|
|
23
26
|
</template>
|
|
24
27
|
|
|
25
28
|
<script lang="ts" setup>
|
|
26
|
-
import {
|
|
29
|
+
import { popupEmits, popupProps } from "./vc-popup-model";
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
closable: true,
|
|
30
|
-
variant: "fullscreen",
|
|
31
|
-
});
|
|
31
|
+
defineProps(popupProps);
|
|
32
32
|
|
|
33
|
-
defineEmits(
|
|
33
|
+
defineEmits(popupEmits);
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<style lang="scss">
|