@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
package/ui/components/index.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/* Atoms */
|
|
2
2
|
export { VcBadge } from "./atoms/vc-badge";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
3
|
+
export { VcButton } from "./atoms/vc-button";
|
|
4
|
+
export { VcCard } from "./atoms/vc-card";
|
|
5
|
+
export { VcCheckbox } from "./atoms/vc-checkbox";
|
|
6
|
+
export { VcCol } from "./atoms/vc-col";
|
|
7
|
+
export { VcContainer } from "./atoms/vc-container";
|
|
8
|
+
export { VcHint } from "./atoms/vc-hint";
|
|
9
|
+
export { VcIcon } from "./atoms/vc-icon";
|
|
10
|
+
export { VcInfoRow } from "./atoms/vc-info-row";
|
|
11
|
+
export { VcImage } from "./atoms/vc-image";
|
|
12
|
+
export { VcLabel } from "./atoms/vc-label";
|
|
13
|
+
export { VcLink } from "./atoms/vc-link";
|
|
14
|
+
export { VcLoading } from "./atoms/vc-loading";
|
|
15
|
+
export { VcProgress } from "./atoms/vc-progress";
|
|
16
|
+
export { VcRow } from "./atoms/vc-row";
|
|
17
|
+
export { VcStatus } from "./atoms/vc-status";
|
|
18
|
+
export { VcStatusIcon } from "./atoms/vc-status-icon";
|
|
19
|
+
export { VcSwitch } from "./atoms/vc-switch";
|
|
20
|
+
export { VcWidget } from "./atoms/vc-widget";
|
|
21
21
|
|
|
22
22
|
/* Molecules */
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
23
|
+
export { VcBreadcrumbs } from "./molecules/vc-breadcrumbs";
|
|
24
|
+
export { VcEditor } from "./molecules/vc-editor";
|
|
25
|
+
export { VcForm } from "./molecules/vc-form";
|
|
26
|
+
export { VcFileUpload } from "./molecules/vc-file-upload";
|
|
27
27
|
export { VcInput } from "./molecules/vc-input";
|
|
28
28
|
export { VcInputCurrency } from "./molecules/vc-input-currency";
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
29
|
+
export { VcNotification } from "./molecules/vc-notification";
|
|
30
|
+
export { VcPagination } from "./molecules/vc-pagination";
|
|
31
|
+
export { VcRating } from "./molecules/vc-rating";
|
|
32
32
|
export { VcSelect } from "./molecules/vc-select";
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
33
|
+
export { VcSlider } from "./molecules/vc-slider";
|
|
34
|
+
export { VcTextarea } from "./molecules/vc-textarea";
|
|
35
35
|
|
|
36
36
|
/* Organisms */
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
37
|
+
export { VcApp } from "./organisms/vc-app";
|
|
38
|
+
export { VcBlade } from "./organisms/vc-blade";
|
|
39
|
+
export { VcDynamicProperty } from "./organisms/vc-dynamic-property";
|
|
40
|
+
export { VcGallery } from "./organisms/vc-gallery";
|
|
41
|
+
export { VcLoginForm } from "./organisms/vc-login-form";
|
|
42
|
+
export { VcPopup } from "./organisms/vc-popup";
|
|
43
|
+
export { VcTable } from "./organisms/vc-table";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcBreadcrumbsProps } from "./vc-breadcrumbs-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import Breadcrumbs from "./vc-breadcrumbs.vue";
|
|
5
|
+
export const VcBreadcrumbs: ComponentConstructor<ComponentPublicInstance<VcBreadcrumbsProps>> = Breadcrumbs;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PropType, VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
|
|
4
|
+
export const breadcrumbsProps = {
|
|
5
|
+
items: {
|
|
6
|
+
type: Array as PropType<
|
|
7
|
+
{
|
|
8
|
+
current: boolean;
|
|
9
|
+
icon: string;
|
|
10
|
+
title: string;
|
|
11
|
+
clickHandler: () => void;
|
|
12
|
+
id: string;
|
|
13
|
+
}[]
|
|
14
|
+
>,
|
|
15
|
+
default: () => [],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type VcBreadcrumbsProps = ExtractTypes<typeof breadcrumbsProps>;
|
|
20
|
+
|
|
21
|
+
export interface VcBreadcrumbsSlots {
|
|
22
|
+
default: () => VNode[];
|
|
23
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
v-if="items"
|
|
4
|
+
class="tw-flex tw-items-center tw-flex-nowrap"
|
|
5
|
+
>
|
|
3
6
|
<VcBreadcrumbsItem
|
|
4
7
|
v-for="(item, i) in items"
|
|
5
8
|
:key="item.id"
|
|
@@ -11,18 +14,7 @@
|
|
|
11
14
|
|
|
12
15
|
<script lang="ts" setup>
|
|
13
16
|
import VcBreadcrumbsItem from "./_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue";
|
|
17
|
+
import { breadcrumbsProps } from "./vc-breadcrumbs-model";
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
items: {
|
|
17
|
-
current: boolean;
|
|
18
|
-
icon: string;
|
|
19
|
-
title: string;
|
|
20
|
-
clickHandler: () => void;
|
|
21
|
-
id: string;
|
|
22
|
-
}[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
withDefaults(defineProps<Props>(), {
|
|
26
|
-
items: () => [],
|
|
27
|
-
});
|
|
19
|
+
defineProps(breadcrumbsProps);
|
|
28
20
|
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcEditorEmits, VcEditorProps } from "./vc-editor-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import Editor from "./vc-editor.vue";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcEditor: ComponentConstructor<ComponentPublicInstance<VcEditorProps, any, any, any, any, VcEditorEmits>> =
|
|
7
|
+
Editor;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
import { isString, isNumber, isDate } from "./../../../utils";
|
|
4
|
+
|
|
5
|
+
export const editorProps = {
|
|
6
|
+
placeholder: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "",
|
|
9
|
+
},
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: [String, Number, Date],
|
|
12
|
+
default: null,
|
|
13
|
+
},
|
|
14
|
+
required: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
disabled: Boolean,
|
|
19
|
+
label: String,
|
|
20
|
+
tooltip: String,
|
|
21
|
+
name: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "Field",
|
|
24
|
+
},
|
|
25
|
+
errorMessage: String,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const editorEmits = {
|
|
29
|
+
"update:modelValue": (value: string | number | Date) => isString(value) || isNumber(value) || isDate(value),
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type VcEditorProps = ExtractTypes<typeof editorProps>;
|
|
33
|
+
export type VcEditorEmits = typeof editorEmits;
|
|
34
|
+
|
|
35
|
+
export interface VcEditorSlots {
|
|
36
|
+
error: () => VNode[];
|
|
37
|
+
}
|
|
@@ -4,26 +4,36 @@
|
|
|
4
4
|
:class="[
|
|
5
5
|
{
|
|
6
6
|
'vc-editor_error': errorMessage,
|
|
7
|
-
'vc-editor_disabled': disabled
|
|
7
|
+
'vc-editor_disabled': disabled,
|
|
8
8
|
},
|
|
9
9
|
]"
|
|
10
10
|
>
|
|
11
11
|
<!-- Editor label -->
|
|
12
|
-
<VcLabel
|
|
12
|
+
<VcLabel
|
|
13
|
+
v-if="label"
|
|
14
|
+
class="tw-mb-2"
|
|
15
|
+
:required="required"
|
|
16
|
+
>
|
|
13
17
|
<span>{{ label }}</span>
|
|
14
|
-
<template
|
|
18
|
+
<template
|
|
19
|
+
v-if="tooltip"
|
|
20
|
+
v-slot:tooltip
|
|
21
|
+
>{{ tooltip }}</template
|
|
22
|
+
>
|
|
15
23
|
</VcLabel>
|
|
16
24
|
|
|
17
25
|
<!-- Editor field -->
|
|
18
26
|
<v-ace-editor
|
|
19
|
-
class="tw-border tw-border-solid tw-border-[color:var(--editor-border-color)] tw-rounded-[var(--editor-border-radius)]"
|
|
27
|
+
class="tw-border tw-border-solid tw-border-[color:var(--editor-border-color)] tw-rounded-[var(--editor-border-radius)] tw-h-[200px]"
|
|
20
28
|
v-model:value="content"
|
|
21
29
|
lang="html"
|
|
22
30
|
theme="chrome"
|
|
23
|
-
style="height: 200px"
|
|
24
31
|
@input="onInput"
|
|
25
32
|
/>
|
|
26
|
-
<slot
|
|
33
|
+
<slot
|
|
34
|
+
v-if="errorMessage"
|
|
35
|
+
name="error"
|
|
36
|
+
>
|
|
27
37
|
<VcHint class="vc-editor__error">
|
|
28
38
|
{{ errorMessage }}
|
|
29
39
|
</VcHint>
|
|
@@ -35,63 +45,22 @@
|
|
|
35
45
|
import { VAceEditor } from "vue3-ace-editor";
|
|
36
46
|
import "ace-builds/src-noconflict/mode-html";
|
|
37
47
|
import "ace-builds/src-noconflict/theme-chrome";
|
|
38
|
-
import {ref, unref, watch} from "vue";
|
|
48
|
+
import { ref, unref, watch } from "vue";
|
|
49
|
+
import { editorEmits, editorProps } from "./vc-editor-model";
|
|
39
50
|
|
|
40
|
-
const props = defineProps(
|
|
41
|
-
placeholder: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "",
|
|
44
|
-
},
|
|
51
|
+
const props = defineProps(editorProps);
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
type: [String, Number, Date],
|
|
48
|
-
default: null,
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
required: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: false,
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
disabled: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false,
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
label: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: undefined,
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
tooltip: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: undefined,
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
name: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: "Field",
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
errorMessage: {
|
|
77
|
-
type: String,
|
|
78
|
-
default: undefined
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
const emit = defineEmits(["update:modelValue"]);
|
|
53
|
+
const emit = defineEmits(editorEmits);
|
|
83
54
|
const content = ref();
|
|
84
|
-
let initialValue = unref(props.modelValue);
|
|
85
55
|
|
|
86
56
|
watch(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
57
|
+
() => props.modelValue,
|
|
58
|
+
(value) => {
|
|
59
|
+
let init = unref(value);
|
|
60
|
+
emit("update:modelValue", init);
|
|
61
|
+
}
|
|
92
62
|
);
|
|
93
63
|
|
|
94
|
-
// Handle input event to propertly validate value and emit changes
|
|
95
64
|
function onInput() {
|
|
96
65
|
emit("update:modelValue", content.value);
|
|
97
66
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcFileUploadEmits, VcFileUploadProps } from "./vc-file-upload-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import FileUpload from "./vc-file-upload.vue";
|
|
5
|
+
export const VcFileUpload: ComponentConstructor<
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
ComponentPublicInstance<VcFileUploadProps, any, any, any, any, VcFileUploadEmits>
|
|
8
|
+
> = FileUpload;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropType, VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
|
|
4
|
+
export const fileUploadProps = {
|
|
5
|
+
variant: {
|
|
6
|
+
type: String as PropType<"gallery" | "file-upload">,
|
|
7
|
+
default: "gallery",
|
|
8
|
+
},
|
|
9
|
+
loading: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
accept: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ".jpg, .png, .jpeg",
|
|
16
|
+
},
|
|
17
|
+
multiple: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
rules: [String, Object] as PropType<string | Record<string, unknown>>,
|
|
22
|
+
name: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "Gallery",
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const fileUploadEmits = {
|
|
29
|
+
upload: (files: FileList) => !!files,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type VcFileUploadProps = ExtractTypes<typeof fileUploadProps>;
|
|
33
|
+
export type VcFileUploadEmits = typeof fileUploadEmits;
|
|
34
|
+
|
|
35
|
+
export interface VcFileUploadSlots {
|
|
36
|
+
error: () => VNode[];
|
|
37
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class=
|
|
2
|
+
<div class="tw-flex tw-flex-col tw-flex-1">
|
|
3
3
|
<div
|
|
4
4
|
class="vc-file-upload tw-relative tw-h-[155px] tw-box-border tw-border tw-border-dashed tw-border-[#c8dbea] tw-rounded-[6px] tw-p-2 tw-p-4 tw-flex tw-flex-col tw-items-center tw-justify-center"
|
|
5
5
|
:class="`vc-file-upload_${variant}`"
|
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
:name="name"
|
|
35
35
|
/>
|
|
36
36
|
</div>
|
|
37
|
-
<slot
|
|
37
|
+
<slot
|
|
38
|
+
v-if="errorMessage"
|
|
39
|
+
name="error"
|
|
40
|
+
>
|
|
38
41
|
<VcHint class="vc-input__error">
|
|
39
42
|
{{ errorMessage }}
|
|
40
43
|
</VcHint>
|
|
@@ -45,46 +48,18 @@
|
|
|
45
48
|
<script lang="ts" setup>
|
|
46
49
|
import { getCurrentInstance, ref, unref } from "vue";
|
|
47
50
|
import { useField } from "vee-validate";
|
|
51
|
+
import { fileUploadEmits, fileUploadProps } from "./vc-file-upload-model";
|
|
52
|
+
|
|
53
|
+
const props = defineProps(fileUploadProps);
|
|
54
|
+
|
|
55
|
+
const emit = defineEmits(fileUploadEmits);
|
|
48
56
|
|
|
49
|
-
const props = defineProps({
|
|
50
|
-
variant: {
|
|
51
|
-
type: String,
|
|
52
|
-
enum: ["gallery", "file-upload"],
|
|
53
|
-
default: "gallery",
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
loading: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false,
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
accept: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: ".jpg, .png, .jpeg",
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
multiple: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: false,
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
rules: {
|
|
72
|
-
type: [String, Object],
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
name: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: "Gallery",
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
const emit = defineEmits(["upload"]);
|
|
82
57
|
const instance = getCurrentInstance();
|
|
83
58
|
// Prepare validation rules using required and rules props combination
|
|
84
59
|
let internalRules = unref(props.rules) || "";
|
|
85
60
|
|
|
86
61
|
// Prepare field-level validation
|
|
87
|
-
const { errorMessage, handleChange,
|
|
62
|
+
const { errorMessage, handleChange, validate } = useField(
|
|
88
63
|
`${props.name === "Gallery" ? instance?.uid : props.name}`,
|
|
89
64
|
internalRules
|
|
90
65
|
);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { ComponentConstructor } from "
|
|
2
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
3
3
|
import Input from "./vc-input.vue";
|
|
4
|
-
import { VcInputProps } from "./vc-input-model";
|
|
5
|
-
|
|
6
|
-
export const VcInput: ComponentConstructor<
|
|
7
|
-
|
|
8
|
-
> = Input;
|
|
4
|
+
import { VcInputEmits, VcInputProps } from "./vc-input-model";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcInput: ComponentConstructor<ComponentPublicInstance<VcInputProps, any, any, any, any, VcInputEmits>> =
|
|
7
|
+
Input;
|
|
@@ -1,96 +1,114 @@
|
|
|
1
|
-
import { VNode } from "vue";
|
|
1
|
+
import { PropType, VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
import { isString, isNumber, isDate } from "./../../../utils";
|
|
2
4
|
|
|
3
|
-
export
|
|
5
|
+
export const inputProps = {
|
|
4
6
|
/**
|
|
5
7
|
* Model of the component; Use with a listener for 'update:model-value' event OR use v-model directive
|
|
6
8
|
*/
|
|
7
|
-
modelValue
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: [String, Number, Date],
|
|
11
|
+
default: null,
|
|
12
|
+
},
|
|
8
13
|
/**
|
|
9
14
|
* Input label text
|
|
10
15
|
*/
|
|
11
|
-
label
|
|
16
|
+
label: String,
|
|
12
17
|
/**
|
|
13
18
|
* Input placeholder text
|
|
14
19
|
*/
|
|
15
|
-
placeholder
|
|
20
|
+
placeholder: String,
|
|
16
21
|
/**
|
|
17
22
|
* Input type
|
|
18
23
|
* Default value: text
|
|
19
24
|
*/
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| "url"
|
|
27
|
-
| "time"
|
|
28
|
-
| "date"
|
|
29
|
-
| "datetime-local"
|
|
30
|
-
| undefined;
|
|
25
|
+
type: {
|
|
26
|
+
type: String as PropType<
|
|
27
|
+
"text" | "password" | "email" | "tel" | "number" | "url" | "time" | "date" | "datetime-local"
|
|
28
|
+
>,
|
|
29
|
+
default: "text",
|
|
30
|
+
},
|
|
31
31
|
/**
|
|
32
32
|
* Input description (hint) text below input component
|
|
33
33
|
*/
|
|
34
|
-
hint
|
|
34
|
+
hint: String,
|
|
35
35
|
/**
|
|
36
36
|
* Appends clearable icon when a value is set;
|
|
37
37
|
* When clicked, model becomes null
|
|
38
38
|
*/
|
|
39
|
-
clearable
|
|
39
|
+
clearable: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
40
43
|
/**
|
|
41
44
|
* Prefix
|
|
42
45
|
*/
|
|
43
|
-
prefix
|
|
46
|
+
prefix: String,
|
|
44
47
|
/**
|
|
45
48
|
* Suffix
|
|
46
49
|
*/
|
|
47
|
-
suffix
|
|
50
|
+
suffix: String,
|
|
48
51
|
/**
|
|
49
52
|
* Used to specify the name of the control; If not specified, it takes the value 'Field'
|
|
50
53
|
*/
|
|
51
|
-
name
|
|
54
|
+
name: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "Field",
|
|
57
|
+
},
|
|
52
58
|
/**
|
|
53
59
|
* Signals the user a process is in progress by displaying a spinner
|
|
54
60
|
*/
|
|
55
|
-
loading
|
|
61
|
+
loading: Boolean,
|
|
56
62
|
/**
|
|
57
63
|
* Debounce amount (in milliseconds) when updating model
|
|
58
64
|
*/
|
|
59
|
-
debounce
|
|
65
|
+
debounce: [String, Number],
|
|
60
66
|
/**
|
|
61
67
|
* Put component in disabled mode
|
|
62
68
|
*/
|
|
63
|
-
disabled
|
|
69
|
+
disabled: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
64
73
|
/**
|
|
65
74
|
* Focus field on initial component render
|
|
66
75
|
*/
|
|
67
|
-
autofocus
|
|
76
|
+
autofocus: Boolean,
|
|
68
77
|
/**
|
|
69
78
|
* Does field have validation errors?
|
|
70
79
|
*/
|
|
71
|
-
error
|
|
80
|
+
error: Boolean,
|
|
72
81
|
/**
|
|
73
82
|
* Validation error message (gets displayed only if 'error' is set to 'true')
|
|
74
83
|
*/
|
|
75
|
-
errorMessage
|
|
84
|
+
errorMessage: String,
|
|
76
85
|
/**
|
|
77
86
|
* Specify a max length of model
|
|
78
87
|
* Default value: 1024
|
|
79
88
|
*/
|
|
80
|
-
maxlength
|
|
89
|
+
maxlength: {
|
|
90
|
+
type: [String, Number],
|
|
91
|
+
default: "1024",
|
|
92
|
+
},
|
|
81
93
|
/**
|
|
82
94
|
* Input tooltip information
|
|
83
95
|
*/
|
|
84
|
-
tooltip
|
|
96
|
+
tooltip: String,
|
|
85
97
|
/**
|
|
86
98
|
* Input required state
|
|
87
99
|
*/
|
|
88
|
-
required
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
100
|
+
required: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const inputEmits = {
|
|
107
|
+
"update:modelValue": (value: string | number | Date | null) => isString(value) || isNumber(value) || isDate(value) || value === null,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type VcInputProps = ExtractTypes<typeof inputProps>;
|
|
111
|
+
export type VcInputEmits = typeof inputEmits;
|
|
94
112
|
|
|
95
113
|
export interface VcInputSlots {
|
|
96
114
|
/**
|