@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
|
@@ -33,17 +33,12 @@
|
|
|
33
33
|
<script lang="ts" setup>
|
|
34
34
|
import { computed, onBeforeUpdate, ref } from "vue";
|
|
35
35
|
import { useRoute } from "vue-router";
|
|
36
|
-
import {
|
|
37
|
-
IBladeContainer,
|
|
38
|
-
IBladeElement,
|
|
39
|
-
IBladeEvent,
|
|
40
|
-
IParentCallArgs,
|
|
41
|
-
} from "./../../../../shared";
|
|
36
|
+
import { IBladeContainer, IBladeElement, IBladeEvent, IParentCallArgs } from "./../../../../shared";
|
|
42
37
|
|
|
43
38
|
export interface Props {
|
|
44
39
|
blades: IBladeContainer[];
|
|
45
40
|
parentBladeOptions: Record<string, unknown>;
|
|
46
|
-
parentBladeParam
|
|
41
|
+
parentBladeParam?: string | undefined;
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
export interface Emits {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {default as useBladeNavigation} from
|
|
1
|
+
export { default as useBladeNavigation } from "./useBladeNavigation";
|
|
@@ -2,13 +2,7 @@ import { computed, ref, unref, watch, Ref } from "vue";
|
|
|
2
2
|
import { isEqual } from "lodash-es";
|
|
3
3
|
import { useRouter, useRoute, NavigationFailure } from "vue-router";
|
|
4
4
|
import { usePermissions } from "./../../../../core/composables";
|
|
5
|
-
import {
|
|
6
|
-
ExtendedComponent,
|
|
7
|
-
IBladeContainer,
|
|
8
|
-
IBladeElement,
|
|
9
|
-
IBladeEvent,
|
|
10
|
-
IParentCallArgs,
|
|
11
|
-
} from "./../../../../shared";
|
|
5
|
+
import { ExtendedComponent, IBladeContainer, IBladeElement, IBladeEvent, IParentCallArgs } from "./../../../../shared";
|
|
12
6
|
|
|
13
7
|
interface IUseBladeNavigation {
|
|
14
8
|
readonly blades: Ref<IBladeContainer[]>;
|
|
@@ -16,14 +10,7 @@ interface IUseBladeNavigation {
|
|
|
16
10
|
readonly parentBladeParam: Ref<string>;
|
|
17
11
|
bladesRefs: Ref<IBladeElement[]>;
|
|
18
12
|
openBlade: (
|
|
19
|
-
{
|
|
20
|
-
parentBlade,
|
|
21
|
-
component,
|
|
22
|
-
param,
|
|
23
|
-
bladeOptions,
|
|
24
|
-
onOpen,
|
|
25
|
-
onClose,
|
|
26
|
-
}: IBladeEvent,
|
|
13
|
+
{ parentBlade, component, param, bladeOptions, onOpen, onClose }: IBladeEvent,
|
|
27
14
|
index?: number,
|
|
28
15
|
navigationCb?: () => Promise<void | NavigationFailure>
|
|
29
16
|
) => void;
|
|
@@ -61,14 +48,7 @@ export default (): IUseBladeNavigation => {
|
|
|
61
48
|
);
|
|
62
49
|
|
|
63
50
|
async function openBlade(
|
|
64
|
-
{
|
|
65
|
-
parentBlade,
|
|
66
|
-
component: blade,
|
|
67
|
-
param,
|
|
68
|
-
bladeOptions,
|
|
69
|
-
onOpen,
|
|
70
|
-
onClose,
|
|
71
|
-
}: IBladeEvent,
|
|
51
|
+
{ parentBlade, component: blade, param, bladeOptions, onOpen, onClose }: IBladeEvent,
|
|
72
52
|
index?: number,
|
|
73
53
|
navigationCb?: () => Promise<void | NavigationFailure>
|
|
74
54
|
) {
|
|
@@ -102,9 +82,7 @@ export default (): IUseBladeNavigation => {
|
|
|
102
82
|
if (existingChild === undefined) {
|
|
103
83
|
child.idx = index + 1;
|
|
104
84
|
} else if (existingChild) {
|
|
105
|
-
await closeBlade(
|
|
106
|
-
blades.value.findIndex((x) => x.idx === existingChild.idx)
|
|
107
|
-
);
|
|
85
|
+
await closeBlade(blades.value.findIndex((x) => x.idx === existingChild.idx));
|
|
108
86
|
child.idx = existingChild.idx;
|
|
109
87
|
}
|
|
110
88
|
|
|
@@ -118,10 +96,7 @@ export default (): IUseBladeNavigation => {
|
|
|
118
96
|
|
|
119
97
|
isPrevented.value = false;
|
|
120
98
|
for (let i = 0; i < children.length; i++) {
|
|
121
|
-
if (
|
|
122
|
-
children[i]?.onBeforeClose &&
|
|
123
|
-
typeof children[i].onBeforeClose === "function"
|
|
124
|
-
) {
|
|
99
|
+
if (children[i]?.onBeforeClose && typeof children[i].onBeforeClose === "function") {
|
|
125
100
|
const result = await children[i].onBeforeClose();
|
|
126
101
|
if (result === false) {
|
|
127
102
|
isPrevented.value = true;
|
|
@@ -172,18 +147,14 @@ export default (): IUseBladeNavigation => {
|
|
|
172
147
|
}
|
|
173
148
|
|
|
174
149
|
async function onParentCall(index: number, args: IParentCallArgs) {
|
|
175
|
-
console.debug(
|
|
176
|
-
`vc-app#onParentCall(${index}, { method: ${args.method} }) called.`
|
|
177
|
-
);
|
|
150
|
+
console.debug(`vc-app#onParentCall(${index}, { method: ${args.method} }) called.`);
|
|
178
151
|
|
|
179
152
|
if (index >= 0) {
|
|
180
153
|
const currentParent = unref(bladesRefs.value[index]);
|
|
181
154
|
|
|
182
155
|
if (currentParent) {
|
|
183
156
|
if (args.method && typeof currentParent[args.method] === "function") {
|
|
184
|
-
const method = currentParent[args.method] as (
|
|
185
|
-
args: unknown
|
|
186
|
-
) => Promise<unknown>;
|
|
157
|
+
const method = currentParent[args.method] as (args: unknown) => Promise<unknown>;
|
|
187
158
|
const result = await method(args.args);
|
|
188
159
|
if (typeof args.callback === "function") {
|
|
189
160
|
args.callback(result);
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createModule } from "../../core/plugins/modularity";
|
|
2
2
|
import * as components from "./components";
|
|
3
3
|
|
|
4
|
-
export default
|
|
5
|
-
install(app: App): void {
|
|
6
|
-
// Register exported pages
|
|
7
|
-
Object.entries(components).forEach(([componentName, component]) => {
|
|
8
|
-
app.component(componentName, component);
|
|
9
|
-
});
|
|
10
|
-
},
|
|
11
|
-
};
|
|
4
|
+
export default createModule(components);
|
|
12
5
|
|
|
13
6
|
export * from "./components";
|
|
14
7
|
export * from "./composables";
|
|
15
|
-
export * from
|
|
8
|
+
export * from "./types";
|
package/shared/index.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { App } from "vue";
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return app;
|
|
12
|
-
}
|
|
2
|
+
import { default as AssetsDetailsModule } from "./assets";
|
|
3
|
+
import { default as VcAppSwitcherModule } from "./app-switcher";
|
|
4
|
+
import { default as VcBladeNavigationModule } from "./blade-navigation";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
install(app: App): void {
|
|
8
|
+
app.use(AssetsDetailsModule).use(VcAppSwitcherModule).use(VcBladeNavigationModule);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
13
11
|
|
|
14
12
|
export * from "./assets";
|
|
15
13
|
export * from "./app-switcher";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcBadgeProps } from "./vc-badge-model";
|
|
2
|
+
import { VcBadgeEmits, VcBadgeProps } from "./vc-badge-model";
|
|
3
3
|
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Badge from "./vc-badge.vue";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcBadge: ComponentConstructor<ComponentPublicInstance<VcBadgeProps, any, any, any, any, VcBadgeEmits>> =
|
|
7
|
+
Badge;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
1
2
|
import { VNode } from "vue";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
export const badgeProps = {
|
|
5
|
+
active: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false,
|
|
8
|
+
},
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
clickable: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const badgeEmits = {
|
|
20
|
+
click: () => true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type VcBadgeProps = ExtractTypes<typeof badgeProps>;
|
|
24
|
+
export type VcBadgeEmits = typeof badgeEmits;
|
|
18
25
|
|
|
19
26
|
export interface VcBadgeSlots {
|
|
20
27
|
/**
|
|
@@ -16,16 +16,11 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script lang="ts" setup>
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
active: false,
|
|
25
|
-
disabled: false,
|
|
26
|
-
clickable: true,
|
|
27
|
-
});
|
|
28
|
-
const emit = defineEmits(["click"]);
|
|
19
|
+
import { badgeProps, badgeEmits } from "./vc-badge-model";
|
|
20
|
+
|
|
21
|
+
const props = defineProps(badgeProps);
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits(badgeEmits);
|
|
29
24
|
|
|
30
25
|
function onClick(): void {
|
|
31
26
|
if (props.clickable && !props.disabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcButtonProps } from "./vc-button-model";
|
|
2
|
+
import { VcButtonEmits, VcButtonProps } from "./vc-button-model";
|
|
3
3
|
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Button from "./vc-button.vue";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcButton: ComponentConstructor<ComponentPublicInstance<VcButtonProps, any, any, any, any, VcButtonEmits>> =
|
|
7
|
+
Button;
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
2
|
+
import { VNode, PropType } from "vue";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
icon
|
|
5
|
-
variant
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
export const buttonProps = {
|
|
5
|
+
icon: String,
|
|
6
|
+
variant: {
|
|
7
|
+
type: String as PropType<"primary" | "secondary" | "special" | "danger" | "widget" | "onlytext">,
|
|
8
|
+
default: "primary",
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false,
|
|
13
|
+
},
|
|
14
|
+
small: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
outline: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
selected: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const buttonEmits = {
|
|
29
|
+
click: () => true,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type VcButtonProps = ExtractTypes<typeof buttonProps>;
|
|
33
|
+
export type VcButtonEmits = typeof buttonEmits;
|
|
19
34
|
|
|
20
35
|
export interface VcButtonSlots {
|
|
21
36
|
default: () => VNode[];
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
:icon="icon"
|
|
19
19
|
:size="small ? 'xs' : 's'"
|
|
20
20
|
></VcIcon>
|
|
21
|
-
<span
|
|
21
|
+
<span
|
|
22
|
+
v-if="$slots['default']"
|
|
23
|
+
class="vc-button__title"
|
|
24
|
+
>
|
|
22
25
|
<slot></slot>
|
|
23
26
|
</span>
|
|
24
27
|
</button>
|
|
@@ -26,22 +29,14 @@
|
|
|
26
29
|
|
|
27
30
|
<script lang="ts" setup>
|
|
28
31
|
import { VcIcon } from "./../../../components";
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
const props = withDefaults(defineProps<VcButtonProps>(), {
|
|
32
|
-
variant: "primary",
|
|
33
|
-
disabled: false,
|
|
34
|
-
small: false,
|
|
35
|
-
outline: false,
|
|
36
|
-
selected: false,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const emit = defineEmits(["click"]);
|
|
32
|
+
import { buttonProps, buttonEmits } from "./vc-button-model";
|
|
40
33
|
|
|
34
|
+
const props = defineProps(buttonProps);
|
|
35
|
+
const emit = defineEmits(buttonEmits);
|
|
41
36
|
function onClick(e: Event): void {
|
|
42
37
|
if (!props.disabled) {
|
|
43
38
|
e.preventDefault();
|
|
44
|
-
emit("click"
|
|
39
|
+
emit("click");
|
|
45
40
|
}
|
|
46
41
|
}
|
|
47
42
|
</script>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcCardProps } from "./vc-card-model";
|
|
2
|
+
import { VcCardEmits, VcCardProps } from "./vc-card-model";
|
|
3
3
|
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Card from "./vc-card.vue";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> = Card;
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcCard: ComponentConstructor<ComponentPublicInstance<VcCardProps, any, any, any, any, VcCardEmits>> = Card;
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import { VNode } from "vue";
|
|
1
|
+
import { VNode, PropType } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
import { isBoolean } from "./../../../utils";
|
|
2
4
|
|
|
3
|
-
export
|
|
4
|
-
header
|
|
5
|
-
icon
|
|
6
|
-
isCollapsable
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
export const cardProps = {
|
|
6
|
+
header: String,
|
|
7
|
+
icon: String,
|
|
8
|
+
isCollapsable: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false,
|
|
11
|
+
},
|
|
12
|
+
isCollapsed: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false,
|
|
15
|
+
},
|
|
16
|
+
fill: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
variant: {
|
|
21
|
+
type: String as PropType<"default" | "success" | "danger">,
|
|
22
|
+
default: "default",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const cardEmits = {
|
|
27
|
+
"header:click": () => true,
|
|
28
|
+
"state:collapsed": (isCollapsedState: boolean) => isBoolean(isCollapsedState),
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type VcCardProps = ExtractTypes<typeof cardProps>;
|
|
32
|
+
export type VcCardEmits = typeof cardEmits;
|
|
13
33
|
|
|
14
34
|
export interface VcCardSlots {
|
|
15
35
|
default: () => VNode[];
|
|
@@ -3,10 +3,22 @@
|
|
|
3
3
|
class="vc-card"
|
|
4
4
|
:class="[{ 'vc-card_collapsable': isCollapsable }, `vc-card_${variant}`]"
|
|
5
5
|
>
|
|
6
|
-
<div
|
|
7
|
-
|
|
6
|
+
<div
|
|
7
|
+
class="vc-card__header"
|
|
8
|
+
v-if="header"
|
|
9
|
+
@click="onHeaderClick"
|
|
10
|
+
>
|
|
11
|
+
<VcIcon
|
|
12
|
+
v-if="icon"
|
|
13
|
+
class="vc-card__icon"
|
|
14
|
+
:icon="icon"
|
|
15
|
+
size="xl"
|
|
16
|
+
></VcIcon>
|
|
8
17
|
<div class="vc-card__title">{{ header }}</div>
|
|
9
|
-
<div
|
|
18
|
+
<div
|
|
19
|
+
v-if="$slots['actions']"
|
|
20
|
+
class="vc-card__actions"
|
|
21
|
+
>
|
|
10
22
|
<slot name="actions"></slot>
|
|
11
23
|
</div>
|
|
12
24
|
<VcIcon
|
|
@@ -29,14 +41,11 @@
|
|
|
29
41
|
|
|
30
42
|
<script lang="ts" setup>
|
|
31
43
|
import { ref } from "vue";
|
|
32
|
-
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
variant: "default",
|
|
38
|
-
});
|
|
39
|
-
const emit = defineEmits(["header:click", "state:collapsed"]);
|
|
44
|
+
import { cardProps, cardEmits } from "./vc-card-model";
|
|
45
|
+
|
|
46
|
+
const props = defineProps(cardProps);
|
|
47
|
+
|
|
48
|
+
const emit = defineEmits(cardEmits);
|
|
40
49
|
const isCollapsedInternal = ref(props.isCollapsed);
|
|
41
50
|
|
|
42
51
|
function onHeaderClick() {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcCheckboxProps } from "./vc-checkbox-model";
|
|
2
|
+
import { VcCheckboxEmits, VcCheckboxProps } from "./vc-checkbox-model";
|
|
3
3
|
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Checkbox from "./vc-checkbox.vue";
|
|
5
5
|
export const VcCheckbox: ComponentConstructor<
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
ComponentPublicInstance<VcCheckboxProps, any, any, any, any, VcCheckboxEmits>
|
|
7
8
|
> = Checkbox;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import { VNode } from "vue";
|
|
2
|
+
import { isBoolean } from "./../../../utils";
|
|
3
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
2
4
|
|
|
3
|
-
export
|
|
4
|
-
modelValue
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export const checkboxProps = {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: false,
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false,
|
|
13
|
+
},
|
|
14
|
+
required: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "Field",
|
|
21
|
+
},
|
|
22
|
+
errorMessage: String,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const checkboxEmits = {
|
|
26
|
+
"update:modelValue": (value: boolean) => isBoolean(value),
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type VcCheckboxProps = ExtractTypes<typeof checkboxProps>;
|
|
30
|
+
export type VcCheckboxEmits = typeof checkboxEmits;
|
|
11
31
|
|
|
12
32
|
export interface VcCheckboxSlots {
|
|
13
33
|
default: () => VNode[];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="vc-checkbox"
|
|
4
|
+
:class="{ 'vc-checkbox_disabled': disabled }"
|
|
5
|
+
>
|
|
3
6
|
<label class="vc-checkbox__label">
|
|
4
7
|
<input
|
|
5
8
|
type="checkbox"
|
|
@@ -9,7 +12,10 @@
|
|
|
9
12
|
@change="onChange"
|
|
10
13
|
/>
|
|
11
14
|
<span class="vc-checkbox__checkmark"></span>
|
|
12
|
-
<span
|
|
15
|
+
<span
|
|
16
|
+
v-if="$slots['default']"
|
|
17
|
+
class="tw-ml-2"
|
|
18
|
+
>
|
|
13
19
|
<slot></slot>
|
|
14
20
|
</span>
|
|
15
21
|
<span
|
|
@@ -19,7 +25,10 @@
|
|
|
19
25
|
>
|
|
20
26
|
</label>
|
|
21
27
|
|
|
22
|
-
<slot
|
|
28
|
+
<slot
|
|
29
|
+
v-if="errorMessage"
|
|
30
|
+
name="error"
|
|
31
|
+
>
|
|
23
32
|
<VcHint class="vc-checkbox__error tw-mt-1">
|
|
24
33
|
{{ errorMessage }}
|
|
25
34
|
</VcHint>
|
|
@@ -29,15 +38,10 @@
|
|
|
29
38
|
|
|
30
39
|
<script lang="ts" setup>
|
|
31
40
|
import { watch } from "vue";
|
|
32
|
-
import {
|
|
41
|
+
import { checkboxProps, checkboxEmits } from "./vc-checkbox-model";
|
|
33
42
|
|
|
34
|
-
const props =
|
|
35
|
-
|
|
36
|
-
disabled: false,
|
|
37
|
-
required: false,
|
|
38
|
-
name: "Field",
|
|
39
|
-
});
|
|
40
|
-
const emit = defineEmits(["update:modelValue"]);
|
|
43
|
+
const props = defineProps(checkboxProps);
|
|
44
|
+
const emit = defineEmits(checkboxEmits);
|
|
41
45
|
|
|
42
46
|
watch(
|
|
43
47
|
() => props.modelValue,
|
|
@@ -2,5 +2,4 @@ import { ComponentPublicInstance } from "vue";
|
|
|
2
2
|
import { VcColProps } from "./vc-col-model";
|
|
3
3
|
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Col from "./vc-col.vue";
|
|
5
|
-
export const VcCol: ComponentConstructor<ComponentPublicInstance<VcColProps>> =
|
|
6
|
-
Col;
|
|
5
|
+
export const VcCol: ComponentConstructor<ComponentPublicInstance<VcColProps>> = Col;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
size
|
|
5
|
-
|
|
4
|
+
export const colProps = {
|
|
5
|
+
size: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "1",
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type VcColProps = ExtractTypes<typeof colProps>;
|
|
6
12
|
|
|
7
13
|
export interface VcColSlots {
|
|
8
14
|
default: () => VNode[];
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script lang="ts" setup>
|
|
11
|
-
import {
|
|
11
|
+
import { colProps } from "./vc-col-model";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
size: "1",
|
|
15
|
-
});
|
|
13
|
+
defineProps(colProps);
|
|
16
14
|
</script>
|
|
17
15
|
|
|
18
16
|
<style lang="scss">
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPublicInstance } from "vue";
|
|
2
|
-
import { VcContainerProps } from "./vc-container-model";
|
|
2
|
+
import { VcContainerEmits, VcContainerProps } from "./vc-container-model";
|
|
3
3
|
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
4
|
import Container from "./vc-container.vue";
|
|
5
5
|
export const VcContainer: ComponentConstructor<
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
ComponentPublicInstance<VcContainerProps, any, any, any, any, VcContainerEmits>
|
|
7
8
|
> = Container;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
import {VNode} from "vue";
|
|
1
|
+
import { VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export const containerProps = {
|
|
5
|
+
shadow: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false,
|
|
8
|
+
},
|
|
9
|
+
noPadding: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
usePtr: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const containerEmits = {
|
|
20
|
+
"scroll:ptr": () => true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type VcContainerProps = ExtractTypes<typeof containerProps>;
|
|
24
|
+
export type VcContainerEmits = typeof containerEmits;
|
|
9
25
|
|
|
10
26
|
export interface VcContainerSlots {
|
|
11
|
-
|
|
27
|
+
default: () => VNode[];
|
|
12
28
|
}
|