@vc-shell/framework 1.0.52 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/composables/index.ts +0 -1
- package/core/composables/useApiClient/index.ts +9 -4
- package/core/composables/useAsync/index.ts +2 -6
- package/core/composables/useAutosave/index.ts +1 -3
- package/core/composables/useFunctions/debounce.ts +1 -4
- package/core/composables/useFunctions/delay.ts +1 -4
- package/core/composables/useFunctions/once.ts +1 -3
- package/core/composables/useFunctions/throttle.ts +1 -4
- package/core/composables/useI18n/index.ts +3 -24
- package/core/composables/useLoading/index.ts +1 -3
- package/core/composables/useNotifications/index.ts +6 -13
- package/core/composables/usePermissions/index.ts +1 -1
- package/core/composables/useSettings/index.ts +3 -4
- package/core/composables/useUser/index.ts +27 -66
- package/core/directives/permissions/index.ts +1 -1
- package/core/plugins/i18n/index.ts +8 -0
- package/core/plugins/index.ts +3 -1
- package/core/plugins/modularity/index.ts +32 -0
- package/core/plugins/moment/humanize.ts +1 -4
- package/core/plugins/validation/index.ts +11 -1
- package/core/plugins/validation/rules.ts +48 -170
- package/core/types/index.ts +7 -9
- package/dist/core/composables/index.d.ts +0 -1
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useApiClient/index.d.ts +9 -3
- package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
- package/dist/core/composables/useAsync/index.d.ts.map +1 -1
- package/dist/core/composables/useAutosave/index.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
- package/dist/core/composables/useI18n/index.d.ts +2 -4
- package/dist/core/composables/useI18n/index.d.ts.map +1 -1
- package/dist/core/composables/useLoading/index.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +2 -2
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/plugins/i18n/index.d.ts +3 -0
- package/dist/core/plugins/i18n/index.d.ts.map +1 -0
- package/dist/core/plugins/index.d.ts +3 -1
- package/dist/core/plugins/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +8 -0
- package/dist/core/plugins/modularity/index.d.ts.map +1 -0
- package/dist/core/plugins/moment/humanize.d.ts.map +1 -1
- package/dist/core/plugins/validation/index.d.ts +3 -1
- package/dist/core/plugins/validation/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/rules.d.ts +32 -11
- package/dist/core/plugins/validation/rules.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +5 -6
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.esm.js +42553 -0
- package/dist/framework.js +74 -72
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
- package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/app-switcher/index.d.ts +2 -3
- package/dist/shared/app-switcher/index.d.ts.map +1 -1
- package/dist/shared/assets/components/index.d.ts +1 -1
- package/dist/shared/assets/components/index.d.ts.map +1 -1
- package/dist/shared/assets/index.d.ts +2 -3
- package/dist/shared/assets/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/composables/index.d.ts +1 -1
- package/dist/shared/blade-navigation/composables/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +2 -2
- package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/index.d.ts +2 -3
- package/dist/shared/blade-navigation/index.d.ts.map +1 -1
- package/dist/shared/blade-navigation/types/index.d.ts +1 -1
- package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/index.d.ts +4 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +3 -3
- package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +20 -20
- package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/index.d.ts +3 -3
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +30 -24
- package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts +33 -0
- package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts +31 -0
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-col/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts +13 -0
- package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-container/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts +25 -0
- package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-hint/index.d.ts +2 -0
- package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts +5 -0
- package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts +17 -0
- package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-image/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts +38 -0
- package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-info-row/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts +25 -0
- package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-label/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts +18 -0
- package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-link/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts +21 -0
- package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-loading/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts +13 -0
- package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-progress/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts +17 -0
- package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-row/index.d.ts +2 -0
- package/dist/ui/components/atoms/vc-row/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts +5 -0
- package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts +21 -0
- package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status-icon/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts +13 -0
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-switch/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts +30 -0
- package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-widget/index.d.ts +5 -0
- package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts +20 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts.map +1 -0
- package/dist/ui/components/index.d.ts +34 -34
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts +19 -0
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts +33 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts +34 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-form/index.d.ts +2 -0
- package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts +5 -0
- package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-input/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +48 -25
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +36 -28
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-notification/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts +18 -0
- package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts +25 -0
- package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-rating/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts +21 -0
- package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-select/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +67 -32
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts +33 -0
- package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-textarea/index.d.ts +5 -0
- package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts +37 -0
- package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts +61 -0
- package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts +34 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts +43 -0
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-gallery/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts +74 -0
- package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-login-form/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts +15 -0
- package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-popup/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts +22 -0
- package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/index.d.ts +5 -0
- package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts +135 -0
- package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts.map +1 -0
- package/dist/ui/types/index.d.ts +76 -6
- package/dist/ui/types/index.d.ts.map +1 -1
- package/dist/ui/types/ts-helpers.d.ts +14 -4
- package/dist/ui/types/ts-helpers.d.ts.map +1 -1
- package/dist/ui/utils/index.d.ts +2 -0
- package/dist/ui/utils/index.d.ts.map +1 -0
- package/dist/ui/utils/types.d.ts +3 -0
- package/dist/ui/utils/types.d.ts.map +1 -0
- package/dist/vite.config.d.ts +1 -1
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +9 -11
- package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -6
- package/shared/app-switcher/composables/useAppSwitcher/index.ts +3 -8
- package/shared/app-switcher/index.ts +3 -10
- package/shared/assets/components/assets-details/assets-details.vue +10 -31
- package/shared/assets/components/index.ts +1 -1
- package/shared/assets/index.ts +3 -15
- package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +2 -7
- package/shared/blade-navigation/composables/index.ts +1 -1
- package/shared/blade-navigation/composables/useBladeNavigation/index.ts +8 -37
- package/shared/blade-navigation/index.ts +3 -10
- package/shared/blade-navigation/types/index.ts +1 -1
- package/shared/index.ts +9 -11
- package/ui/components/atoms/vc-badge/index.ts +5 -5
- package/ui/components/atoms/vc-badge/vc-badge-model.ts +21 -20
- package/ui/components/atoms/vc-badge/vc-badge.vue +5 -11
- package/ui/components/atoms/vc-button/index.ts +5 -5
- package/ui/components/atoms/vc-button/vc-button-model.ts +31 -24
- package/ui/components/atoms/vc-button/vc-button.vue +9 -38
- package/ui/components/atoms/vc-card/index.ts +6 -0
- package/ui/components/atoms/vc-card/vc-card-model.ts +37 -0
- package/ui/components/atoms/vc-card/vc-card.vue +20 -36
- package/ui/components/atoms/vc-checkbox/index.ts +8 -0
- package/ui/components/atoms/vc-checkbox/vc-checkbox-model.ts +35 -0
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +15 -30
- package/ui/components/atoms/vc-col/index.ts +5 -0
- package/ui/components/atoms/vc-col/vc-col-model.ts +15 -0
- package/ui/components/atoms/vc-col/vc-col.vue +2 -6
- package/ui/components/atoms/vc-container/index.ts +8 -0
- package/ui/components/atoms/vc-container/vc-container-model.ts +28 -0
- package/ui/components/atoms/vc-container/vc-container.vue +11 -26
- package/ui/components/atoms/vc-hint/index.ts +2 -0
- package/ui/components/atoms/vc-hint/vc-hint-model.ts +5 -0
- package/ui/components/atoms/vc-icon/index.ts +5 -0
- package/ui/components/atoms/vc-icon/vc-icon-model.ts +19 -0
- package/ui/components/atoms/vc-icon/vc-icon.vue +2 -8
- package/ui/components/atoms/vc-image/index.ts +7 -0
- package/ui/components/atoms/vc-image/vc-image-model.ts +41 -0
- package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -2
- package/ui/components/atoms/vc-image/vc-image.vue +12 -42
- package/ui/components/atoms/vc-info-row/index.ts +5 -0
- package/ui/components/atoms/vc-info-row/vc-info-row-model.ts +27 -0
- package/ui/components/atoms/vc-info-row/vc-info-row.vue +14 -24
- package/ui/components/atoms/vc-label/index.ts +5 -0
- package/ui/components/atoms/vc-label/vc-label-model.ts +20 -0
- package/ui/components/atoms/vc-label/vc-label.vue +11 -15
- package/ui/components/atoms/vc-link/index.ts +6 -0
- package/ui/components/atoms/vc-link/vc-link-model.ts +24 -0
- package/ui/components/atoms/vc-link/vc-link.vue +4 -11
- package/ui/components/atoms/vc-loading/index.ts +5 -0
- package/ui/components/atoms/vc-loading/vc-loading-model.ts +15 -0
- package/ui/components/atoms/vc-loading/vc-loading.vue +5 -11
- package/ui/components/atoms/vc-progress/index.ts +5 -0
- package/ui/components/atoms/vc-progress/vc-progress-model.ts +19 -0
- package/ui/components/atoms/vc-progress/vc-progress.vue +5 -20
- package/ui/components/atoms/vc-row/index.ts +2 -0
- package/ui/components/atoms/vc-row/vc-row-model.ts +5 -0
- package/ui/components/atoms/vc-status/index.ts +5 -0
- package/ui/components/atoms/vc-status/vc-status-model.ts +23 -0
- package/ui/components/atoms/vc-status/vc-status.vue +3 -21
- package/ui/components/atoms/vc-status-icon/index.ts +5 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon-model.ts +15 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +11 -9
- package/ui/components/atoms/vc-switch/index.ts +7 -0
- package/ui/components/atoms/vc-switch/vc-switch-model.ts +34 -0
- package/ui/components/atoms/vc-switch/vc-switch.vue +12 -28
- package/ui/components/atoms/vc-widget/index.ts +7 -0
- package/ui/components/atoms/vc-widget/vc-widget-model.ts +23 -0
- package/ui/components/atoms/vc-widget/vc-widget.vue +15 -22
- package/ui/components/index.ts +34 -34
- package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +1 -1
- package/ui/components/molecules/vc-breadcrumbs/index.ts +5 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.ts +23 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +6 -14
- package/ui/components/molecules/vc-editor/index.ts +7 -0
- package/ui/components/molecules/vc-editor/vc-editor-model.ts +37 -0
- package/ui/components/molecules/vc-editor/vc-editor.vue +25 -56
- package/ui/components/molecules/vc-file-upload/index.ts +8 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload-model.ts +37 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +11 -36
- package/ui/components/molecules/vc-form/index.ts +2 -0
- package/ui/components/molecules/vc-form/vc-form-model.ts +5 -0
- package/ui/components/molecules/vc-input/index.ts +5 -6
- package/ui/components/molecules/vc-input/vc-input-model.ts +53 -35
- package/ui/components/molecules/vc-input/vc-input.vue +41 -29
- package/ui/components/molecules/vc-input-currency/index.ts +4 -3
- package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +42 -32
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +12 -7
- package/ui/components/molecules/vc-notification/index.ts +8 -0
- package/ui/components/molecules/vc-notification/vc-notification-model.ts +21 -0
- package/ui/components/molecules/vc-notification/vc-notification.vue +4 -13
- package/ui/components/molecules/vc-pagination/index.ts +8 -0
- package/ui/components/molecules/vc-pagination/vc-pagination-model.ts +29 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +21 -23
- package/ui/components/molecules/vc-rating/index.ts +5 -0
- package/ui/components/molecules/vc-rating/vc-rating-model.ts +23 -0
- package/ui/components/molecules/vc-rating/vc-rating.vue +11 -13
- package/ui/components/molecules/vc-select/index.ts +5 -5
- package/ui/components/molecules/vc-select/vc-select-model.ts +74 -44
- package/ui/components/molecules/vc-select/vc-select.vue +128 -173
- package/ui/components/molecules/vc-slider/index.ts +5 -0
- package/ui/components/molecules/vc-slider/vc-slider-model.ts +34 -0
- package/ui/components/molecules/vc-slider/vc-slider.vue +2 -26
- package/ui/components/molecules/vc-textarea/index.ts +8 -0
- package/ui/components/molecules/vc-textarea/vc-textarea-model.ts +41 -0
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +19 -53
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +16 -12
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +13 -4
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -15
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +11 -5
- package/ui/components/organisms/vc-app/index.ts +6 -0
- package/ui/components/organisms/vc-app/vc-app-model.ts +65 -0
- package/ui/components/organisms/vc-app/vc-app.vue +10 -52
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +40 -40
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +20 -14
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +14 -12
- package/ui/components/organisms/vc-blade/index.ts +7 -0
- package/ui/components/organisms/vc-blade/vc-blade-model.ts +37 -0
- package/ui/components/organisms/vc-blade/vc-blade.stories.ts +1 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +13 -40
- package/ui/components/organisms/vc-dynamic-property/index.ts +5 -0
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.ts +58 -0
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +101 -125
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +41 -24
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +16 -11
- package/ui/components/organisms/vc-gallery/index.ts +8 -0
- package/ui/components/organisms/vc-gallery/vc-gallery-model.ts +78 -0
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +11 -88
- package/ui/components/organisms/vc-login-form/index.ts +5 -0
- package/ui/components/organisms/vc-login-form/vc-login-form-model.ts +16 -0
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +2 -15
- package/ui/components/organisms/vc-popup/index.ts +7 -0
- package/ui/components/organisms/vc-popup/vc-popup-model.ts +25 -0
- package/ui/components/organisms/vc-popup/vc-popup.vue +7 -18
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +21 -27
- package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +2 -6
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +9 -3
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +31 -43
- package/ui/components/organisms/vc-table/index.ts +7 -0
- package/ui/components/organisms/vc-table/vc-table-model.ts +116 -0
- package/ui/components/organisms/vc-table/vc-table.vue +108 -139
- package/ui/types/index.ts +106 -15
- package/ui/types/ts-helpers.ts +23 -3
- package/ui/utils/index.ts +1 -0
- package/ui/utils/types.ts +2 -0
- package/core/composables/useLogger/index.ts +0 -24
- package/dist/core/composables/useLogger/index.d.ts +0 -5
- package/dist/core/composables/useLogger/index.d.ts.map +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { IActionBuilderResult, ITableColumns } from "./../../../../core/types";
|
|
3
|
+
import { PropType, VNode } from "vue";
|
|
4
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
5
|
+
import { isNumber, isString, isObject } from "./../../../utils";
|
|
6
|
+
|
|
7
|
+
export interface StatusImage {
|
|
8
|
+
image?: string;
|
|
9
|
+
text: string;
|
|
10
|
+
action?: string;
|
|
11
|
+
clickHandler?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const tableProps = {
|
|
15
|
+
columns: { type: Array as PropType<ITableColumns[]>, default: () => [] },
|
|
16
|
+
items: { type: Array as PropType<{ id?: string }[] | any[]>, default: () => [] },
|
|
17
|
+
itemActionBuilder: {
|
|
18
|
+
type: Function as PropType<(item: { id?: string }) => IActionBuilderResult[]>,
|
|
19
|
+
default: undefined,
|
|
20
|
+
},
|
|
21
|
+
sort: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: undefined,
|
|
24
|
+
},
|
|
25
|
+
multiselect: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
expanded: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
totalLabel: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "Totals:",
|
|
36
|
+
},
|
|
37
|
+
totalCount: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 0,
|
|
40
|
+
},
|
|
41
|
+
pages: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0,
|
|
44
|
+
},
|
|
45
|
+
currentPage: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 0,
|
|
48
|
+
},
|
|
49
|
+
searchPlaceholder: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "Search...",
|
|
52
|
+
},
|
|
53
|
+
searchValue: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: undefined,
|
|
56
|
+
},
|
|
57
|
+
loading: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
empty: {
|
|
62
|
+
type: Object as PropType<StatusImage>,
|
|
63
|
+
default: () => ({
|
|
64
|
+
text: "List is empty.",
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
notfound: {
|
|
68
|
+
type: Object as PropType<StatusImage>,
|
|
69
|
+
default: () => ({
|
|
70
|
+
text: "Nothing found.",
|
|
71
|
+
}),
|
|
72
|
+
},
|
|
73
|
+
header: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: true,
|
|
76
|
+
},
|
|
77
|
+
footer: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: true,
|
|
80
|
+
},
|
|
81
|
+
activeFilterCount: {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: 0,
|
|
84
|
+
},
|
|
85
|
+
selectedItemId: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: undefined,
|
|
88
|
+
},
|
|
89
|
+
scrolling: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const tableEmits = {
|
|
96
|
+
paginationClick: (page: number) => isNumber(page),
|
|
97
|
+
selectionChanged: (values: Record<string, boolean>) => isObject(values),
|
|
98
|
+
"search:change": (value: string) => isString(value),
|
|
99
|
+
headerClick: (value: Record<string, unknown>) => isObject(value),
|
|
100
|
+
itemClick: (item: { id?: string }) => isObject(item),
|
|
101
|
+
"scroll:ptr": () => true,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export type VcTableProps = ExtractTypes<typeof tableProps>;
|
|
105
|
+
export type VcTableEmits = typeof tableEmits;
|
|
106
|
+
|
|
107
|
+
export interface VcTableSlots {
|
|
108
|
+
header: () => VNode[];
|
|
109
|
+
filters: (args: { closePanel: () => void }) => VNode[];
|
|
110
|
+
"mobile-item": (args: { item: { [x: string]: any; id: string } }) => VNode[];
|
|
111
|
+
[key: `header_${string}`]: () => VNode[];
|
|
112
|
+
[key: `item_${string}`]: (args: { item?: { [x: string]: any; id: string }; cell?: ITableColumns }) => VNode[];
|
|
113
|
+
notfound: () => VNode[];
|
|
114
|
+
empty: () => VNode[];
|
|
115
|
+
footer: () => VNode[];
|
|
116
|
+
}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="tw-relative tw-overflow-hidden tw-flex tw-flex-col tw-grow tw-basis-0"
|
|
4
|
-
>
|
|
2
|
+
<div class="tw-relative tw-overflow-hidden tw-flex tw-flex-col tw-grow tw-basis-0">
|
|
5
3
|
<!-- Header slot with filter and searchbar -->
|
|
6
4
|
<slot
|
|
7
5
|
name="header"
|
|
8
6
|
v-if="
|
|
9
7
|
($slots['header'] || header) &&
|
|
10
|
-
((items && items.length) ||
|
|
11
|
-
searchValue ||
|
|
12
|
-
searchValue === '' ||
|
|
13
|
-
activeFilterCount)
|
|
8
|
+
((items && items.length) || searchValue || searchValue === '' || activeFilterCount)
|
|
14
9
|
"
|
|
15
10
|
>
|
|
16
|
-
<div
|
|
17
|
-
class="tw-shrink-0 tw-flex tw-items-center tw-justify-between tw-p-4"
|
|
18
|
-
>
|
|
11
|
+
<div class="tw-shrink-0 tw-flex tw-items-center tw-justify-between tw-p-4">
|
|
19
12
|
<!-- Table filter mobile button -->
|
|
20
|
-
<div
|
|
13
|
+
<div
|
|
14
|
+
v-if="$isMobile.value && $slots['filters']"
|
|
15
|
+
class="tw-mr-3"
|
|
16
|
+
>
|
|
21
17
|
<VcTableFilter :counter="activeFilterCount">
|
|
22
18
|
<template v-slot:default="{ closePanel }">
|
|
23
|
-
<slot
|
|
19
|
+
<slot
|
|
20
|
+
name="filters"
|
|
21
|
+
:closePanel="closePanel"
|
|
22
|
+
></slot>
|
|
24
23
|
</template>
|
|
25
24
|
</VcTableFilter>
|
|
26
25
|
</div>
|
|
@@ -36,14 +35,20 @@
|
|
|
36
35
|
></VcInput>
|
|
37
36
|
|
|
38
37
|
<!-- Table filter desktop button -->
|
|
39
|
-
<div
|
|
38
|
+
<div
|
|
39
|
+
v-if="$isDesktop.value && $slots['filters']"
|
|
40
|
+
class="tw-ml-3"
|
|
41
|
+
>
|
|
40
42
|
<VcTableFilter
|
|
41
43
|
:title="$t('Filters')"
|
|
42
44
|
:counter="activeFilterCount"
|
|
43
45
|
:parentExpanded="expanded"
|
|
44
46
|
>
|
|
45
47
|
<template v-slot:default="{ closePanel }">
|
|
46
|
-
<slot
|
|
48
|
+
<slot
|
|
49
|
+
name="filters"
|
|
50
|
+
:closePanel="closePanel"
|
|
51
|
+
></slot>
|
|
47
52
|
</template>
|
|
48
53
|
</VcTableFilter>
|
|
49
54
|
</div>
|
|
@@ -75,7 +80,10 @@
|
|
|
75
80
|
@swipeStart="handleSwipe"
|
|
76
81
|
:swipingItem="mobileSwipeItem"
|
|
77
82
|
>
|
|
78
|
-
<slot
|
|
83
|
+
<slot
|
|
84
|
+
name="mobile-item"
|
|
85
|
+
:item="item"
|
|
86
|
+
></slot>
|
|
79
87
|
</VcTableMobileItem>
|
|
80
88
|
</div>
|
|
81
89
|
</template>
|
|
@@ -89,7 +97,10 @@
|
|
|
89
97
|
'vc-table_multiselect': multiselect,
|
|
90
98
|
}"
|
|
91
99
|
>
|
|
92
|
-
<thead
|
|
100
|
+
<thead
|
|
101
|
+
v-if="columns"
|
|
102
|
+
class="vc-table__header"
|
|
103
|
+
>
|
|
93
104
|
<tr class="vc-table__header-row">
|
|
94
105
|
<th
|
|
95
106
|
v-if="multiselect"
|
|
@@ -121,20 +132,27 @@
|
|
|
121
132
|
<div>
|
|
122
133
|
<slot :name="`header_${item.id}`">{{ item.title }}</slot>
|
|
123
134
|
</div>
|
|
124
|
-
<div
|
|
135
|
+
<div
|
|
136
|
+
v-if="sortField === item.id"
|
|
137
|
+
class="tw-ml-1"
|
|
138
|
+
>
|
|
125
139
|
<VcIcon
|
|
126
140
|
size="xs"
|
|
127
|
-
:icon="`fas fa-caret-${
|
|
128
|
-
sortDirection === 'DESC' ? 'down' : 'up'
|
|
129
|
-
}`"
|
|
141
|
+
:icon="`fas fa-caret-${sortDirection === 'DESC' ? 'down' : 'up'}`"
|
|
130
142
|
></VcIcon>
|
|
131
143
|
</div>
|
|
132
144
|
<div
|
|
133
145
|
class="tw-flex tw-flex-col tw-ml-1 tw-invisible group-hover:tw-visible"
|
|
134
146
|
v-else
|
|
135
147
|
>
|
|
136
|
-
<VcIcon
|
|
137
|
-
|
|
148
|
+
<VcIcon
|
|
149
|
+
size="xs"
|
|
150
|
+
icon="fas fa-caret-up"
|
|
151
|
+
></VcIcon>
|
|
152
|
+
<VcIcon
|
|
153
|
+
size="xs"
|
|
154
|
+
icon="fas fa-caret-down"
|
|
155
|
+
></VcIcon>
|
|
138
156
|
</div>
|
|
139
157
|
</div>
|
|
140
158
|
</th>
|
|
@@ -146,22 +164,26 @@
|
|
|
146
164
|
</tr>
|
|
147
165
|
</thead>
|
|
148
166
|
|
|
149
|
-
<tbody
|
|
167
|
+
<tbody
|
|
168
|
+
v-if="items"
|
|
169
|
+
class="vc-table__body"
|
|
170
|
+
>
|
|
150
171
|
<tr
|
|
151
172
|
v-for="(item, i) in items"
|
|
152
173
|
:key="item.id"
|
|
153
|
-
class="vc-table__body-row tw-h-[60px] tw-bg-white hover:tw-bg-[#dfeef9]"
|
|
174
|
+
class="vc-table__body-row tw-h-[60px] tw-bg-white hover:tw-bg-[#dfeef9] tw-cursor-pointer"
|
|
154
175
|
:class="{
|
|
155
|
-
'tw-cursor-pointer hover:tw-bg-[#dfeef9]': onItemClick,
|
|
156
176
|
'tw-bg-[#f8f8f8]': i % 2 === 1,
|
|
157
|
-
'!tw-bg-[#dfeef9] hover:tw-bg-[#dfeef9]':
|
|
158
|
-
item && item.id ? selectedItemId === item.id : false,
|
|
177
|
+
'!tw-bg-[#dfeef9] hover:tw-bg-[#dfeef9]': item && item.id ? selectedItemId === item.id : false,
|
|
159
178
|
}"
|
|
160
179
|
@click="$emit('itemClick', item)"
|
|
161
180
|
@mouseover="calculateActions(item)"
|
|
162
181
|
@mouseleave="closeActions"
|
|
163
182
|
>
|
|
164
|
-
<td
|
|
183
|
+
<td
|
|
184
|
+
v-if="multiselect"
|
|
185
|
+
width="50"
|
|
186
|
+
>
|
|
165
187
|
<div class="tw-flex tw-justify-center tw-items-center">
|
|
166
188
|
<VcCheckbox
|
|
167
189
|
:modelValue="checkboxes[item.id]"
|
|
@@ -177,8 +199,15 @@
|
|
|
177
199
|
:class="cell.class"
|
|
178
200
|
:width="cell.width"
|
|
179
201
|
>
|
|
180
|
-
<slot
|
|
181
|
-
|
|
202
|
+
<slot
|
|
203
|
+
:name="`item_${cell.id}`"
|
|
204
|
+
:item="item"
|
|
205
|
+
:cell="cell"
|
|
206
|
+
>
|
|
207
|
+
<VcTableCell
|
|
208
|
+
:cell="cell"
|
|
209
|
+
:item="item"
|
|
210
|
+
></VcTableCell>
|
|
182
211
|
</slot>
|
|
183
212
|
</td>
|
|
184
213
|
<td
|
|
@@ -186,9 +215,7 @@
|
|
|
186
215
|
width="44"
|
|
187
216
|
v-if="itemActionBuilder"
|
|
188
217
|
>
|
|
189
|
-
<div
|
|
190
|
-
class="vc-table__body-actions-container tw-relative !tw-hidden tw-justify-center tw-items-center"
|
|
191
|
-
>
|
|
218
|
+
<div class="vc-table__body-actions-container tw-relative !tw-hidden tw-justify-center tw-items-center">
|
|
192
219
|
<button
|
|
193
220
|
class="tw-text-[#319ed4] tw-cursor-pointer tw-border-none tw-bg-transparent disabled:tw-text-[gray]"
|
|
194
221
|
@click.stop="showActions(item, item.id)"
|
|
@@ -196,7 +223,10 @@
|
|
|
196
223
|
aria-describedby="tooltip"
|
|
197
224
|
:disabled="!(itemActions && itemActions.length)"
|
|
198
225
|
>
|
|
199
|
-
<VcIcon
|
|
226
|
+
<VcIcon
|
|
227
|
+
icon="fas fa-cog"
|
|
228
|
+
size="m"
|
|
229
|
+
/>
|
|
200
230
|
</button>
|
|
201
231
|
<div
|
|
202
232
|
class="vc-table__body-tooltip tw-bg-white tw-rounded-l-[4px] tw-p-[15px] tw-z-0 tw-absolute tw-right-0 tw-drop-shadow-[1px_3px_14px_rgba(111,122,131,0.25)]"
|
|
@@ -217,7 +247,10 @@
|
|
|
217
247
|
]"
|
|
218
248
|
@click.stop="itemAction.clickHandler(item)"
|
|
219
249
|
>
|
|
220
|
-
<VcIcon
|
|
250
|
+
<VcIcon
|
|
251
|
+
:icon="itemAction.icon"
|
|
252
|
+
size="m"
|
|
253
|
+
/>
|
|
221
254
|
<div
|
|
222
255
|
class="tw-not-italic tw-font-normal tw-text-base tw-leading-[20px] tw-text-[#3f3f3f] tw-ml-[7px]"
|
|
223
256
|
>
|
|
@@ -247,23 +280,38 @@
|
|
|
247
280
|
v-if="notfound"
|
|
248
281
|
class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center"
|
|
249
282
|
>
|
|
250
|
-
<img
|
|
283
|
+
<img
|
|
284
|
+
v-if="notfound.image"
|
|
285
|
+
:src="notfound.image"
|
|
286
|
+
/>
|
|
251
287
|
<div class="tw-m-4 vc-table__empty-text">
|
|
252
288
|
{{ notfound.text }}
|
|
253
289
|
</div>
|
|
254
|
-
<VcButton
|
|
290
|
+
<VcButton
|
|
291
|
+
v-if="notfound.action"
|
|
292
|
+
@click="notfound.clickHandler"
|
|
293
|
+
>
|
|
255
294
|
{{ notfound.action }}
|
|
256
295
|
</VcButton>
|
|
257
296
|
</div>
|
|
258
297
|
</slot>
|
|
259
|
-
<slot
|
|
298
|
+
<slot
|
|
299
|
+
v-else
|
|
300
|
+
name="empty"
|
|
301
|
+
>
|
|
260
302
|
<div
|
|
261
303
|
v-if="empty"
|
|
262
304
|
class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center"
|
|
263
305
|
>
|
|
264
|
-
<img
|
|
306
|
+
<img
|
|
307
|
+
v-if="empty.image"
|
|
308
|
+
:src="empty.image"
|
|
309
|
+
/>
|
|
265
310
|
<div class="tw-m-4 tw-text-xl tw-font-medium">{{ empty.text }}</div>
|
|
266
|
-
<VcButton
|
|
311
|
+
<VcButton
|
|
312
|
+
v-if="empty.action"
|
|
313
|
+
@click="empty.clickHandler"
|
|
314
|
+
>
|
|
267
315
|
{{ empty.action }}
|
|
268
316
|
</VcButton>
|
|
269
317
|
</div>
|
|
@@ -299,94 +347,23 @@
|
|
|
299
347
|
|
|
300
348
|
<script lang="ts" setup>
|
|
301
349
|
import { computed, nextTick, ref, watch, onBeforeUpdate } from "vue";
|
|
302
|
-
import {
|
|
303
|
-
VcIcon,
|
|
304
|
-
VcLoading,
|
|
305
|
-
VcCheckbox,
|
|
306
|
-
VcContainer,
|
|
307
|
-
VcInput,
|
|
308
|
-
VcPagination,
|
|
309
|
-
} from "@/ui/components";
|
|
350
|
+
import { VcIcon, VcLoading, VcCheckbox, VcContainer, VcInput, VcPagination } from "./../../../components";
|
|
310
351
|
import VcTableCounter from "./_internal/vc-table-counter/vc-table-counter.vue";
|
|
311
352
|
import VcTableFilter from "./_internal/vc-table-filter/vc-table-filter.vue";
|
|
312
353
|
import VcTableMobileItem from "./_internal/vc-table-mobile-item/vc-table-mobile-item.vue";
|
|
313
354
|
import VcTableCell from "./_internal/vc-table-cell/vc-table-cell.vue";
|
|
314
355
|
import { createPopper, Instance } from "@popperjs/core";
|
|
315
|
-
import { IActionBuilderResult
|
|
316
|
-
|
|
317
|
-
export interface Props {
|
|
318
|
-
columns: ITableColumns[];
|
|
319
|
-
items: { id: string }[];
|
|
320
|
-
itemActionBuilder?: (item: { id: string }) => IActionBuilderResult[];
|
|
321
|
-
sort?: string;
|
|
322
|
-
multiselect?: boolean;
|
|
323
|
-
expanded?: boolean;
|
|
324
|
-
totalLabel?: string;
|
|
325
|
-
totalCount?: number;
|
|
326
|
-
pages?: number;
|
|
327
|
-
currentPage?: number;
|
|
328
|
-
searchPlaceholder?: string;
|
|
329
|
-
searchValue?: string;
|
|
330
|
-
loading?: boolean;
|
|
331
|
-
empty?: StatusImage;
|
|
332
|
-
notfound?: StatusImage;
|
|
333
|
-
header?: boolean;
|
|
334
|
-
footer?: boolean;
|
|
335
|
-
activeFilterCount?: number;
|
|
336
|
-
selectedItemId?: string;
|
|
337
|
-
scrolling?: boolean;
|
|
338
|
-
onItemClick?: () => void;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export interface StatusImage {
|
|
342
|
-
image?: string;
|
|
343
|
-
text: string;
|
|
344
|
-
action?: boolean;
|
|
345
|
-
clickHandler?: () => void;
|
|
346
|
-
}
|
|
356
|
+
import { IActionBuilderResult } from "./../../../../core/types";
|
|
357
|
+
import { tableEmits, tableProps } from "./vc-table-model";
|
|
347
358
|
|
|
348
|
-
const props =
|
|
349
|
-
columns: () => [],
|
|
350
|
-
items: () => [],
|
|
351
|
-
itemActionBuilder: undefined,
|
|
352
|
-
sort: undefined,
|
|
353
|
-
multiselect: false,
|
|
354
|
-
expanded: false,
|
|
355
|
-
totalLabel: "Totals:",
|
|
356
|
-
totalCount: 0,
|
|
357
|
-
pages: 0,
|
|
358
|
-
currentPage: 0,
|
|
359
|
-
searchPlaceholder: "Search...",
|
|
360
|
-
searchValue: undefined,
|
|
361
|
-
loading: false,
|
|
362
|
-
empty: () => ({
|
|
363
|
-
text: "List is empty.",
|
|
364
|
-
}),
|
|
365
|
-
notfound: () => ({
|
|
366
|
-
text: "Nothing found.",
|
|
367
|
-
}),
|
|
368
|
-
header: true,
|
|
369
|
-
footer: true,
|
|
370
|
-
activeFilterCount: 0,
|
|
371
|
-
selectedItemId: undefined,
|
|
372
|
-
scrolling: false,
|
|
373
|
-
onItemClick: undefined,
|
|
374
|
-
});
|
|
359
|
+
const props = defineProps(tableProps);
|
|
375
360
|
|
|
376
361
|
interface ITableItemRef {
|
|
377
362
|
element: Element;
|
|
378
363
|
id: string;
|
|
379
364
|
}
|
|
380
365
|
|
|
381
|
-
const emit = defineEmits(
|
|
382
|
-
"paginationClick",
|
|
383
|
-
"selectionChanged",
|
|
384
|
-
"search:change",
|
|
385
|
-
"filter:apply",
|
|
386
|
-
"filter:reset",
|
|
387
|
-
"headerClick",
|
|
388
|
-
"scroll:ptr",
|
|
389
|
-
]);
|
|
366
|
+
const emit = defineEmits(tableEmits);
|
|
390
367
|
|
|
391
368
|
const checkboxes = ref<Record<string, boolean>>({});
|
|
392
369
|
const selectedRow = ref<string>();
|
|
@@ -421,9 +398,7 @@ const tableAlignment = {
|
|
|
421
398
|
evenly: "justify-evenly",
|
|
422
399
|
};
|
|
423
400
|
|
|
424
|
-
const headerCheckbox = computed(() =>
|
|
425
|
-
Object.values(checkboxes.value).every((value) => value)
|
|
426
|
-
);
|
|
401
|
+
const headerCheckbox = computed(() => Object.values(checkboxes.value).every((value) => value));
|
|
427
402
|
|
|
428
403
|
watch(
|
|
429
404
|
() => props.items,
|
|
@@ -454,9 +429,7 @@ function setActionToggleRefs(el: Element, id: string) {
|
|
|
454
429
|
|
|
455
430
|
function processHeaderCheckbox() {
|
|
456
431
|
const currentState = Object.values(checkboxes.value).every((value) => value);
|
|
457
|
-
Object.keys(checkboxes.value).forEach(
|
|
458
|
-
(key) => (checkboxes.value[key] = !currentState)
|
|
459
|
-
);
|
|
432
|
+
Object.keys(checkboxes.value).forEach((key) => (checkboxes.value[key] = !currentState));
|
|
460
433
|
emit("selectionChanged", checkboxes.value);
|
|
461
434
|
}
|
|
462
435
|
|
|
@@ -465,7 +438,7 @@ function processCheckbox(id: string, state: boolean) {
|
|
|
465
438
|
emit("selectionChanged", checkboxes.value);
|
|
466
439
|
}
|
|
467
440
|
|
|
468
|
-
function showActions(item: { id
|
|
441
|
+
function showActions(item: { id?: string }, index: string) {
|
|
469
442
|
selectedRow.value = item.id;
|
|
470
443
|
|
|
471
444
|
const toggleRef = actionToggleRefs.value.find((item) => item.id === index);
|
|
@@ -473,27 +446,23 @@ function showActions(item: { id: string }, index: string) {
|
|
|
473
446
|
|
|
474
447
|
if (toggleRef && tooltipRef) {
|
|
475
448
|
nextTick(() => {
|
|
476
|
-
tooltip.value = createPopper(
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
name: "offset",
|
|
485
|
-
options: {
|
|
486
|
-
offset: [-15, 15],
|
|
487
|
-
},
|
|
449
|
+
tooltip.value = createPopper(toggleRef.element, tooltipRef.element as HTMLElement, {
|
|
450
|
+
placement: "bottom",
|
|
451
|
+
onFirstUpdate: () => tooltip.value?.update(),
|
|
452
|
+
modifiers: [
|
|
453
|
+
{
|
|
454
|
+
name: "offset",
|
|
455
|
+
options: {
|
|
456
|
+
offset: [-15, 15],
|
|
488
457
|
},
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
);
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
});
|
|
492
461
|
});
|
|
493
462
|
}
|
|
494
463
|
}
|
|
495
464
|
|
|
496
|
-
async function calculateActions(item: { id
|
|
465
|
+
async function calculateActions(item: { id?: string }) {
|
|
497
466
|
if (typeof props.itemActionBuilder === "function") {
|
|
498
467
|
itemActions.value = await props.itemActionBuilder(item);
|
|
499
468
|
}
|
package/ui/types/index.ts
CHANGED
|
@@ -1,26 +1,117 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { GlobalComponentConstructor } from "./ts-helpers";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
VcInputSlots,
|
|
5
|
-
} from "../components/molecules/vc-input/vc-input-model";
|
|
6
|
-
import {
|
|
7
|
-
VcSelectProps,
|
|
8
|
-
VcSelectSlots,
|
|
9
|
-
} from "../components/molecules/vc-select/vc-select-model";
|
|
3
|
+
import { VcInputProps, VcInputSlots, VcInputEmits } from "../components/molecules/vc-input/vc-input-model";
|
|
4
|
+
import { VcSelectEmits, VcSelectProps, VcSelectSlots } from "../components/molecules/vc-select/vc-select-model";
|
|
10
5
|
import {
|
|
11
6
|
VcInputCurrencyProps,
|
|
12
7
|
VcInputCurrencySlots,
|
|
8
|
+
VcInputCurrencyEmits,
|
|
13
9
|
} from "../components/molecules/vc-input-currency/vc-input-currency-model";
|
|
10
|
+
import { VcBadgeEmits, VcBadgeProps, VcBadgeSlots } from "../components/atoms/vc-badge/vc-badge-model";
|
|
11
|
+
import { VcButtonProps, VcButtonSlots, VcButtonEmits } from "../components/atoms/vc-button/vc-button-model";
|
|
12
|
+
import { VcCardProps, VcCardSlots, VcCardEmits } from "../components/atoms/vc-card/vc-card-model";
|
|
13
|
+
import { VcCheckboxProps, VcCheckboxSlots, VcCheckboxEmits } from "../components/atoms/vc-checkbox/vc-checkbox-model";
|
|
14
|
+
import { VcColProps, VcColSlots } from "../components/atoms/vc-col/vc-col-model";
|
|
15
|
+
import {
|
|
16
|
+
VcContainerProps,
|
|
17
|
+
VcContainerSlots,
|
|
18
|
+
VcContainerEmits,
|
|
19
|
+
} from "../components/atoms/vc-container/vc-container-model";
|
|
20
|
+
import { VcIconProps, VcIconSlots } from "../components/atoms/vc-icon/vc-icon-model";
|
|
21
|
+
import { VcImageProps, VcImageSlots, VcImageEmits } from "../components/atoms/vc-image/vc-image-model";
|
|
22
|
+
import { VcInfoRowProps, VcInfoRowSlots } from "../components/atoms/vc-info-row/vc-info-row-model";
|
|
23
|
+
import { VcLabelProps, VcLabelSlots } from "../components/atoms/vc-label/vc-label-model";
|
|
24
|
+
import { VcLinkProps, VcLinkSlots, VcLinkEmits } from "../components/atoms/vc-link/vc-link-model";
|
|
25
|
+
import { VcLoadingProps, VcLoadingSlots } from "../components/atoms/vc-loading/vc-loading-model";
|
|
26
|
+
import { VcProgressProps, VcProgressSlots } from "../components/atoms/vc-progress/vc-progress-model";
|
|
27
|
+
import { VcRowSlots } from "../components/atoms/vc-row/vc-row-model";
|
|
28
|
+
import { VcStatusProps, VcStatusSlots } from "../components/atoms/vc-status/vc-status-model";
|
|
29
|
+
import { VcStatusIconProps, VcStatusIconSlots } from "../components/atoms/vc-status-icon/vc-status-icon-model";
|
|
30
|
+
import { VcSwitchProps, VcSwitchSlots, VcSwitchEmits } from "../components/atoms/vc-switch/vc-switch-model";
|
|
31
|
+
import { VcWidgetProps, VcWidgetSlots, VcWidgetEmits } from "../components/atoms/vc-widget/vc-widget-model";
|
|
32
|
+
import { VcBreadcrumbsProps, VcBreadcrumbsSlots } from "../components/molecules/vc-breadcrumbs/vc-breadcrumbs-model";
|
|
33
|
+
import { VcEditorProps, VcEditorSlots, VcEditorEmits } from "../components/molecules/vc-editor/vc-editor-model";
|
|
34
|
+
import {
|
|
35
|
+
VcFileUploadProps,
|
|
36
|
+
VcFileUploadSlots,
|
|
37
|
+
VcFileUploadEmits,
|
|
38
|
+
} from "../components/molecules/vc-file-upload/vc-file-upload-model";
|
|
39
|
+
import {
|
|
40
|
+
VcNotificationProps,
|
|
41
|
+
VcNotificationSlots,
|
|
42
|
+
VcNotificationEmits,
|
|
43
|
+
} from "../components/molecules/vc-notification/vc-notification-model";
|
|
44
|
+
import {
|
|
45
|
+
VcPaginationProps,
|
|
46
|
+
VcPaginationSlots,
|
|
47
|
+
VcPaginationEmits,
|
|
48
|
+
} from "../components/molecules/vc-pagination/vc-pagination-model";
|
|
49
|
+
import { VcRatingProps, VcRatingSlots } from "../components/molecules/vc-rating/vc-rating-model";
|
|
50
|
+
import { VcSliderProps, VcSliderSlots } from "../components/molecules/vc-slider/vc-slider-model";
|
|
51
|
+
import {
|
|
52
|
+
VcTextareaProps,
|
|
53
|
+
VcTextareaSlots,
|
|
54
|
+
VcTextareaEmits,
|
|
55
|
+
} from "../components/molecules/vc-textarea/vc-textarea-model";
|
|
56
|
+
import { VcAppProps, VcAppSlots, VcAppEmits } from "../components/organisms/vc-app/vc-app-model";
|
|
57
|
+
import { VcBladeProps, VcBladeSlots, VcBladeEmits } from "../components/organisms/vc-blade/vc-blade-model";
|
|
58
|
+
import {
|
|
59
|
+
VcDynamicPropertyProps,
|
|
60
|
+
VcDynamicPropertySlots,
|
|
61
|
+
} from "../components/organisms/vc-dynamic-property/vc-dynamic-property-model";
|
|
62
|
+
import { VcGalleryProps, VcGallerySlots, VcGalleryEmits } from "../components/organisms/vc-gallery/vc-gallery-model";
|
|
63
|
+
import { VcLoginFormProps, VcLoginFormSlots } from "../components/organisms/vc-login-form/vc-login-form-model";
|
|
64
|
+
import { VcPopupProps, VcPopupSlots, VcPopupEmits } from "../components/organisms/vc-popup/vc-popup-model";
|
|
65
|
+
import { VcTableProps, VcTableSlots, VcTableEmits } from "../components/organisms/vc-table/vc-table-model";
|
|
66
|
+
import { VcHintSlots } from "./../components/atoms/vc-hint/vc-hint-model";
|
|
67
|
+
import { VcFormSlots } from "./../components/molecules/vc-form/vc-form-model";
|
|
14
68
|
|
|
15
69
|
declare module "@vue/runtime-core" {
|
|
16
70
|
interface GlobalComponents {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
>;
|
|
22
|
-
|
|
71
|
+
// atoms
|
|
72
|
+
VcBadge: GlobalComponentConstructor<VcBadgeProps, VcBadgeSlots, VcBadgeEmits>;
|
|
73
|
+
VcButton: GlobalComponentConstructor<VcButtonProps, VcButtonSlots, VcButtonEmits>;
|
|
74
|
+
VcCard: GlobalComponentConstructor<VcCardProps, VcCardSlots, VcCardEmits>;
|
|
75
|
+
VcCheckbox: GlobalComponentConstructor<VcCheckboxProps, VcCheckboxSlots, VcCheckboxEmits>;
|
|
76
|
+
VcCol: GlobalComponentConstructor<VcColProps, VcColSlots>;
|
|
77
|
+
VcContainer: GlobalComponentConstructor<VcContainerProps, VcContainerSlots, VcContainerEmits>;
|
|
78
|
+
VcHint: GlobalComponentConstructor<any, VcHintSlots>;
|
|
79
|
+
VcIcon: GlobalComponentConstructor<VcIconProps, VcIconSlots>;
|
|
80
|
+
VcImage: GlobalComponentConstructor<VcImageProps, VcImageSlots, VcImageEmits>;
|
|
81
|
+
VcInfoRow: GlobalComponentConstructor<VcInfoRowProps, VcInfoRowSlots>;
|
|
82
|
+
VcLabel: GlobalComponentConstructor<VcLabelProps, VcLabelSlots>;
|
|
83
|
+
VcLink: GlobalComponentConstructor<VcLinkProps, VcLinkSlots, VcLinkEmits>;
|
|
84
|
+
VcLoading: GlobalComponentConstructor<VcLoadingProps, VcLoadingSlots>;
|
|
85
|
+
VcProgress: GlobalComponentConstructor<VcProgressProps, VcProgressSlots>;
|
|
86
|
+
VcRow: GlobalComponentConstructor<any, VcRowSlots>;
|
|
87
|
+
VcStatus: GlobalComponentConstructor<VcStatusProps, VcStatusSlots>;
|
|
88
|
+
VcStatusIcon: GlobalComponentConstructor<VcStatusIconProps, VcStatusIconSlots>;
|
|
89
|
+
VcSwitch: GlobalComponentConstructor<VcSwitchProps, VcSwitchSlots, VcSwitchEmits>;
|
|
90
|
+
VcWidget: GlobalComponentConstructor<VcWidgetProps, VcWidgetSlots, VcWidgetEmits>;
|
|
91
|
+
|
|
92
|
+
// molecules
|
|
93
|
+
VcBreadcrumbs: GlobalComponentConstructor<VcBreadcrumbsProps, VcBreadcrumbsSlots>;
|
|
94
|
+
VcEditor: GlobalComponentConstructor<VcEditorProps, VcEditorSlots, VcEditorEmits>;
|
|
95
|
+
VcFileUpload: GlobalComponentConstructor<VcFileUploadProps, VcFileUploadSlots, VcFileUploadEmits>;
|
|
96
|
+
VcForm: GlobalComponentConstructor<any, VcFormSlots>;
|
|
97
|
+
VcInput: GlobalComponentConstructor<VcInputProps, VcInputSlots, VcInputEmits>;
|
|
98
|
+
VcInputCurrency: GlobalComponentConstructor<VcInputCurrencyProps, VcInputCurrencySlots, VcInputCurrencyEmits>;
|
|
99
|
+
VcNotification: GlobalComponentConstructor<VcNotificationProps, VcNotificationSlots, VcNotificationEmits>;
|
|
100
|
+
VcPagination: GlobalComponentConstructor<VcPaginationProps, VcPaginationSlots, VcPaginationEmits>;
|
|
101
|
+
VcRating: GlobalComponentConstructor<VcRatingProps, VcRatingSlots>;
|
|
102
|
+
VcSelect: GlobalComponentConstructor<VcSelectProps, VcSelectSlots, VcSelectEmits>;
|
|
103
|
+
VcSlider: GlobalComponentConstructor<VcSliderProps, VcSliderSlots>;
|
|
104
|
+
VcTextarea: GlobalComponentConstructor<VcTextareaProps, VcTextareaSlots, VcTextareaEmits>;
|
|
105
|
+
|
|
106
|
+
// organisms
|
|
107
|
+
VcApp: GlobalComponentConstructor<VcAppProps, VcAppSlots, VcAppEmits>;
|
|
108
|
+
VcBlade: GlobalComponentConstructor<VcBladeProps, VcBladeSlots, VcBladeEmits>;
|
|
109
|
+
VcDynamicProperty: GlobalComponentConstructor<VcDynamicPropertyProps, VcDynamicPropertySlots>;
|
|
110
|
+
VcGallery: GlobalComponentConstructor<VcGalleryProps, VcGallerySlots, VcGalleryEmits>;
|
|
111
|
+
VcLoginForm: GlobalComponentConstructor<VcLoginFormProps, VcLoginFormSlots>;
|
|
112
|
+
VcPopup: GlobalComponentConstructor<VcPopupProps, VcPopupSlots, VcPopupEmits>;
|
|
113
|
+
VcTable: GlobalComponentConstructor<VcTableProps, VcTableSlots, VcTableEmits>;
|
|
23
114
|
}
|
|
24
115
|
}
|
|
25
116
|
|
|
26
|
-
export {
|
|
117
|
+
export {};
|