@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,78 @@
|
|
|
1
|
+
import { isArray, isObject } from "./../../../utils";
|
|
2
|
+
import { IImage } from "./../../../../core/types";
|
|
3
|
+
import { PropType, VNode } from "vue";
|
|
4
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
5
|
+
|
|
6
|
+
export const galleryProps = {
|
|
7
|
+
images: {
|
|
8
|
+
type: Array as PropType<IImage[]>,
|
|
9
|
+
default: () => [],
|
|
10
|
+
},
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false,
|
|
14
|
+
},
|
|
15
|
+
required: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
label: String,
|
|
20
|
+
tooltip: String,
|
|
21
|
+
tooltipIcon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "fas fa-info",
|
|
24
|
+
},
|
|
25
|
+
uploadIcon: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "fas fa-upload",
|
|
28
|
+
},
|
|
29
|
+
multiple: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
variant: {
|
|
34
|
+
type: String as PropType<"gallery" | "file-upload">,
|
|
35
|
+
default: "gallery",
|
|
36
|
+
},
|
|
37
|
+
itemActions: {
|
|
38
|
+
type: Object as PropType<{
|
|
39
|
+
name?: string | undefined;
|
|
40
|
+
preview: boolean | undefined;
|
|
41
|
+
edit: boolean | undefined;
|
|
42
|
+
remove: boolean | undefined;
|
|
43
|
+
}>,
|
|
44
|
+
default: () => ({
|
|
45
|
+
preview: true,
|
|
46
|
+
edit: true,
|
|
47
|
+
remove: true,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
disableDrag: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
hideAfterUpload: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
rules: [String, Object] as PropType<string | Record<string, unknown>>,
|
|
59
|
+
name: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "Gallery",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const galleryEmits = {
|
|
66
|
+
upload: (files: FileList) => !!files,
|
|
67
|
+
sort: (sorted: IImage[]) => isArray(sorted),
|
|
68
|
+
"item:edit": (image: IImage) => isObject(image),
|
|
69
|
+
"item:remove": (image: IImage) => isObject(image),
|
|
70
|
+
"item:move": (image: IImage) => isObject(image),
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type VcGalleryProps = ExtractTypes<typeof galleryProps>;
|
|
74
|
+
export type VcGalleryEmits = typeof galleryEmits;
|
|
75
|
+
|
|
76
|
+
export interface VcGallerySlots {
|
|
77
|
+
default: () => VNode[];
|
|
78
|
+
}
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
</VcLabel>
|
|
11
11
|
|
|
12
12
|
<template v-if="(images && images.length) || !disabled">
|
|
13
|
-
<div class=
|
|
13
|
+
<div class="tw-flex tw-flex-wrap">
|
|
14
14
|
<draggable
|
|
15
15
|
:list="images"
|
|
16
|
-
class=
|
|
16
|
+
class="tw-flex tw-flex-wrap tw-w-full"
|
|
17
17
|
tag="transition-group"
|
|
18
18
|
v-bind="dragOptions"
|
|
19
19
|
@change="updateOrder"
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
</draggable>
|
|
50
50
|
</div>
|
|
51
51
|
</template>
|
|
52
|
-
<div
|
|
52
|
+
<div
|
|
53
|
+
v-else
|
|
54
|
+
class="tw-flex tw-justify-center tw-p-5"
|
|
55
|
+
>
|
|
53
56
|
<VcHint>Gallery is empty</VcHint>
|
|
54
57
|
</div>
|
|
55
58
|
|
|
@@ -63,95 +66,15 @@
|
|
|
63
66
|
</template>
|
|
64
67
|
|
|
65
68
|
<script lang="ts" setup>
|
|
66
|
-
import { computed,
|
|
67
|
-
import { VcLabel, VcFileUpload } from "
|
|
69
|
+
import { computed, ref } from "vue";
|
|
70
|
+
import { VcLabel, VcFileUpload } from "./../../../components";
|
|
68
71
|
import VcGalleryItem from "./_internal/vc-gallery-item/vc-gallery-item.vue";
|
|
69
72
|
import VcGalleryPreview from "./_internal/vc-gallery-preview/vc-gallery-preview.vue";
|
|
70
|
-
import {
|
|
71
|
-
|
|
72
|
-
const props = defineProps({
|
|
73
|
-
images: {
|
|
74
|
-
type: Array as PropType<IImage[]>,
|
|
75
|
-
default: () => [],
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
disabled: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: false,
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
required: {
|
|
84
|
-
type: Boolean,
|
|
85
|
-
default: false,
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
label: {
|
|
89
|
-
type: String,
|
|
90
|
-
default: undefined,
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
tooltip: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: undefined,
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
tooltipIcon: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: "fas fa-info",
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
uploadIcon: {
|
|
104
|
-
type: String,
|
|
105
|
-
default: "fas fa-upload",
|
|
106
|
-
},
|
|
73
|
+
import { galleryEmits, galleryProps } from "./vc-gallery-model";
|
|
107
74
|
|
|
108
|
-
|
|
109
|
-
type: Boolean,
|
|
110
|
-
default: false,
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
variant: {
|
|
114
|
-
type: String,
|
|
115
|
-
default: "gallery",
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
itemActions: {
|
|
119
|
-
type: Object,
|
|
120
|
-
default: () => ({
|
|
121
|
-
preview: true,
|
|
122
|
-
edit: true,
|
|
123
|
-
remove: true,
|
|
124
|
-
}),
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
disableDrag: {
|
|
128
|
-
type: Boolean,
|
|
129
|
-
default: false,
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
hideAfterUpload: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false,
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
rules: {
|
|
138
|
-
type: [String, Object],
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
name: {
|
|
142
|
-
type: String,
|
|
143
|
-
default: "Gallery",
|
|
144
|
-
},
|
|
145
|
-
});
|
|
75
|
+
const props = defineProps(galleryProps);
|
|
146
76
|
|
|
147
|
-
const emit = defineEmits(
|
|
148
|
-
"upload",
|
|
149
|
-
"sort",
|
|
150
|
-
"item:preview",
|
|
151
|
-
"item:edit",
|
|
152
|
-
"item:remove",
|
|
153
|
-
"item:move",
|
|
154
|
-
]);
|
|
77
|
+
const emit = defineEmits(galleryEmits);
|
|
155
78
|
|
|
156
79
|
const preview = ref(false);
|
|
157
80
|
const previewImageIndex = ref();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcLoginFormProps } from "./vc-login-form-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import LoginForm from "./vc-login-form.vue";
|
|
5
|
+
export const VcLoginForm: ComponentConstructor<ComponentPublicInstance<VcLoginFormProps>> = LoginForm;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
|
|
4
|
+
export const loginFormProps = {
|
|
5
|
+
logo: String,
|
|
6
|
+
background: String,
|
|
7
|
+
title: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "Login",
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type VcLoginFormProps = ExtractTypes<typeof loginFormProps>;
|
|
14
|
+
export interface VcLoginFormSlots {
|
|
15
|
+
default: () => VNode[];
|
|
16
|
+
}
|
|
@@ -27,22 +27,9 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts" setup>
|
|
30
|
-
|
|
31
|
-
logo: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: undefined,
|
|
34
|
-
},
|
|
30
|
+
import { loginFormProps } from "./vc-login-form-model";
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
type: String,
|
|
38
|
-
default: undefined,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
title: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "Login",
|
|
44
|
-
},
|
|
45
|
-
});
|
|
32
|
+
defineProps(loginFormProps);
|
|
46
33
|
|
|
47
34
|
console.debug("Init vc-login-form");
|
|
48
35
|
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcPopupEmits, VcPopupProps } from "./vc-popup-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import Popup from "./vc-popup.vue";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcPopup: ComponentConstructor<ComponentPublicInstance<VcPopupProps, any, any, any, any, VcPopupEmits>> =
|
|
7
|
+
Popup;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PropType, VNode } from "vue";
|
|
2
|
+
import { ExtractTypes } from "./../../../types/ts-helpers";
|
|
3
|
+
|
|
4
|
+
export const popupProps = {
|
|
5
|
+
title: String,
|
|
6
|
+
closable: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: true,
|
|
9
|
+
},
|
|
10
|
+
variant: {
|
|
11
|
+
type: String as PropType<"small" | "medium" | "fullscreen">,
|
|
12
|
+
default: "fullscreen",
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const popupEmits = {
|
|
17
|
+
close: () => true,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type VcPopupProps = ExtractTypes<typeof popupProps>;
|
|
21
|
+
export type VcPopupEmits = typeof popupEmits;
|
|
22
|
+
|
|
23
|
+
export interface VcPopupSlots {
|
|
24
|
+
default: () => VNode[];
|
|
25
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="vc-popup"
|
|
4
|
+
:class="`vc-popup_${variant}`"
|
|
5
|
+
>
|
|
3
6
|
<div class="vc-popup__wrapper">
|
|
4
7
|
<div class="vc-popup__inner">
|
|
5
8
|
<div class="vc-popup__header">
|
|
@@ -23,25 +26,11 @@
|
|
|
23
26
|
</template>
|
|
24
27
|
|
|
25
28
|
<script lang="ts" setup>
|
|
26
|
-
|
|
27
|
-
title: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: undefined,
|
|
30
|
-
},
|
|
29
|
+
import { popupEmits, popupProps } from "./vc-popup-model";
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: true,
|
|
35
|
-
},
|
|
31
|
+
defineProps(popupProps);
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
type: String,
|
|
39
|
-
default: "fullscreen",
|
|
40
|
-
enum: ["small", "medium", "fullscreen"],
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
defineEmits(["close"]);
|
|
33
|
+
defineEmits(popupEmits);
|
|
45
34
|
</script>
|
|
46
35
|
|
|
47
36
|
<style lang="scss">
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
<template v-if="value > 0">
|
|
5
5
|
<span>{{ Math.trunc(Number(value)) }}</span
|
|
6
6
|
><span class="tw-text-[#a5a5a5] tw-text-xs"
|
|
7
|
-
>.{{
|
|
8
|
-
`${(Number(value) * 100) % 100}`.padEnd(2, "0").slice(0, 2)
|
|
9
|
-
}}</span
|
|
7
|
+
>.{{ `${(Number(value) * 100) % 100}`.padEnd(2, "0").slice(0, 2) }}</span
|
|
10
8
|
>
|
|
11
9
|
</template>
|
|
12
10
|
<template v-else>
|
|
@@ -15,7 +13,10 @@
|
|
|
15
13
|
</template>
|
|
16
14
|
|
|
17
15
|
<!-- Date ago cell -->
|
|
18
|
-
<span
|
|
16
|
+
<span
|
|
17
|
+
v-else-if="cell.type === 'date-ago'"
|
|
18
|
+
class="tw-text-[#a5a5a5]"
|
|
19
|
+
>
|
|
19
20
|
<template v-if="value">
|
|
20
21
|
{{ moment(value).fromNow() }}
|
|
21
22
|
</template>
|
|
@@ -24,9 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
<!-- Date exact cell -->
|
|
26
27
|
<span
|
|
27
|
-
v-else-if="
|
|
28
|
-
cell.type === 'date' || cell.type === 'time' || cell.type === 'date-time'
|
|
29
|
-
"
|
|
28
|
+
v-else-if="cell.type === 'date' || cell.type === 'time' || cell.type === 'date-time'"
|
|
30
29
|
class="tw-text-[#a5a5a5]"
|
|
31
30
|
>
|
|
32
31
|
<template v-if="value">
|
|
@@ -34,15 +33,9 @@
|
|
|
34
33
|
{{ moment(value).locale(locale).format(cell.format) }}
|
|
35
34
|
</template>
|
|
36
35
|
<template v-else>
|
|
37
|
-
<template v-if="cell.type === 'date'">{{
|
|
38
|
-
|
|
39
|
-
}}</template>
|
|
40
|
-
<template v-if="cell.type === 'time'">{{
|
|
41
|
-
value.toLocaleTimeString()
|
|
42
|
-
}}</template>
|
|
43
|
-
<template v-if="cell.type === 'date-time'">{{
|
|
44
|
-
value.toLocaleString()
|
|
45
|
-
}}</template>
|
|
36
|
+
<template v-if="cell.type === 'date'">{{ value.toLocaleDateString() }}</template>
|
|
37
|
+
<template v-if="cell.type === 'time'">{{ value.toLocaleTimeString() }}</template>
|
|
38
|
+
<template v-if="cell.type === 'date-time'">{{ value.toLocaleString() }}</template>
|
|
46
39
|
</template>
|
|
47
40
|
</template>
|
|
48
41
|
<template v-else>N/A</template>
|
|
@@ -73,7 +66,10 @@
|
|
|
73
66
|
</div>
|
|
74
67
|
|
|
75
68
|
<!-- Number cell -->
|
|
76
|
-
<span
|
|
69
|
+
<span
|
|
70
|
+
v-else-if="cell.type === 'number'"
|
|
71
|
+
class="tw-text-right"
|
|
72
|
+
>
|
|
77
73
|
{{ Number(value).toFixed(0) }}
|
|
78
74
|
</span>
|
|
79
75
|
|
|
@@ -91,8 +87,8 @@
|
|
|
91
87
|
<script lang="ts" setup>
|
|
92
88
|
import { computed } from "vue";
|
|
93
89
|
import moment from "moment";
|
|
94
|
-
import { ITableColumns } from "
|
|
95
|
-
import { VcImage, VcStatus, VcStatusIcon, VcLink } from "
|
|
90
|
+
import { ITableColumns } from "./../../../../../../core/types";
|
|
91
|
+
import { VcImage, VcStatus, VcStatusIcon, VcLink } from "./../../../../../components";
|
|
96
92
|
|
|
97
93
|
export interface Props {
|
|
98
94
|
cell: ITableColumns;
|
|
@@ -106,13 +102,11 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
106
102
|
|
|
107
103
|
const locale = window.navigator.language;
|
|
108
104
|
const value = computed(() => {
|
|
109
|
-
return (props.cell.field || props.cell.id)
|
|
110
|
-
.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return (p && p[c]) || null;
|
|
116
|
-
}, props.item);
|
|
105
|
+
return (props.cell.field || props.cell.id).split(".").reduce((p: { [x: string]: unknown }, c: string) => {
|
|
106
|
+
if (p && Array.isArray(p) && p.length) {
|
|
107
|
+
return (p && p[0][c]) || null;
|
|
108
|
+
}
|
|
109
|
+
return (p && p[c]) || null;
|
|
110
|
+
}, props.item);
|
|
117
111
|
});
|
|
118
112
|
</script>
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tw-font-medium tw-text-base">
|
|
3
|
-
<span class="tw-text-[color:var(--table-counter-label-color)]"
|
|
4
|
-
|
|
5
|
-
>
|
|
6
|
-
<span class="tw-text-[color:var(--table-counter-value-color)]">{{
|
|
7
|
-
value
|
|
8
|
-
}}</span>
|
|
3
|
+
<span class="tw-text-[color:var(--table-counter-label-color)]">{{ label }} </span>
|
|
4
|
+
<span class="tw-text-[color:var(--table-counter-value-color)]">{{ value }}</span>
|
|
9
5
|
</div>
|
|
10
6
|
</template>
|
|
11
7
|
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
@click="openPanel($isMobile.value)"
|
|
7
7
|
ref="filterToggle"
|
|
8
8
|
>
|
|
9
|
-
<VcIcon
|
|
10
|
-
|
|
9
|
+
<VcIcon
|
|
10
|
+
icon="fas fa-filter"
|
|
11
|
+
size="m"
|
|
12
|
+
/>
|
|
13
|
+
<span
|
|
14
|
+
v-if="title"
|
|
15
|
+
class="tw-ml-[10px] tw-font-medium"
|
|
16
|
+
>
|
|
11
17
|
{{ title }}
|
|
12
18
|
</span>
|
|
13
19
|
<div
|
|
@@ -59,7 +65,7 @@ export default defineComponent({
|
|
|
59
65
|
|
|
60
66
|
<script lang="ts" setup>
|
|
61
67
|
import { createPopper, Instance } from "@popperjs/core";
|
|
62
|
-
import { VcIcon } from "
|
|
68
|
+
import { VcIcon } from "./../../../../../components";
|
|
63
69
|
|
|
64
70
|
export interface Props {
|
|
65
71
|
title: string;
|
package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="tw-relative tw-flex tw-flex-nowrap tw-items-stretch tw-transition
|
|
3
|
+
class="tw-relative tw-flex tw-flex-nowrap tw-items-stretch tw-transition tw-duration-200"
|
|
4
4
|
:class="{ ' tw-transition-none': isMoving }"
|
|
5
5
|
:style="`transform: translateX(${offsetX}px)`"
|
|
6
6
|
@click="$emit('click')"
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
>
|
|
12
12
|
<!-- Left swipe actions-->
|
|
13
13
|
<div
|
|
14
|
-
class=
|
|
14
|
+
class="tw-flex-shrink-0 tw-w-[80px] tw-flex tw-flex-col [justify-content:stretch] tw-bg-[#a9bfd2]"
|
|
15
15
|
v-if="leftSwipeActions && leftSwipeActions.length"
|
|
16
16
|
>
|
|
17
17
|
<div
|
|
18
|
-
class=
|
|
18
|
+
class="tw-flex tw-grow tw-basis-[1] tw-flex-col tw-justify-center tw-items-center tw-text-white"
|
|
19
19
|
:class="[`vc-table-mobile__item-action_${leftSwipeActions[0].variant}`]"
|
|
20
20
|
@click.stop="leftSwipeActions[0].clickHandler(item)"
|
|
21
21
|
>
|
|
@@ -26,22 +26,20 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<div class=
|
|
29
|
+
<div class="tw-flex-shrink-0 tw-w-full">
|
|
30
30
|
<!-- Mobile item slot content -->
|
|
31
31
|
<slot></slot>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<!-- Item actions -->
|
|
35
35
|
<div
|
|
36
|
-
class=
|
|
36
|
+
class="tw-flex-shrink-0 tw-w-[80px] tw-flex tw-flex-col [justify-content:stretch] tw-bg-[#a9bfd2]"
|
|
37
37
|
v-if="rightSwipeActions && rightSwipeActions.length"
|
|
38
38
|
>
|
|
39
39
|
<!-- First available action -->
|
|
40
40
|
<div
|
|
41
|
-
class=
|
|
42
|
-
:class="[
|
|
43
|
-
`vc-table-mobile__item-action_${rightSwipeActions[0].variant}`,
|
|
44
|
-
]"
|
|
41
|
+
class="tw-flex tw-grow tw-basis-[1] tw-flex-col tw-justify-center tw-items-center tw-text-white"
|
|
42
|
+
:class="[`vc-table-mobile__item-action_${rightSwipeActions[0].variant}`]"
|
|
45
43
|
@click.stop="rightSwipeActions[0].clickHandler(item)"
|
|
46
44
|
>
|
|
47
45
|
<VcIcon :icon="rightSwipeActions[0].icon"></VcIcon>
|
|
@@ -53,10 +51,8 @@
|
|
|
53
51
|
<!-- Second available action -->
|
|
54
52
|
<div
|
|
55
53
|
v-if="rightSwipeActions.length === 2"
|
|
56
|
-
class=
|
|
57
|
-
:class="[
|
|
58
|
-
`vc-table-mobile__item-action_${rightSwipeActions[1].variant}`,
|
|
59
|
-
]"
|
|
54
|
+
class="tw-flex tw-grow tw-basis-[1] tw-flex-col tw-justify-center tw-items-center tw-text-white"
|
|
55
|
+
:class="[`vc-table-mobile__item-action_${rightSwipeActions[1].variant}`]"
|
|
60
56
|
@click.stop="rightSwipeActions[1].clickHandler(item)"
|
|
61
57
|
>
|
|
62
58
|
<VcIcon :icon="rightSwipeActions[1].icon"></VcIcon>
|
|
@@ -68,7 +64,7 @@
|
|
|
68
64
|
<!-- Other available actions -->
|
|
69
65
|
<template v-if="rightSwipeActions.length > 2">
|
|
70
66
|
<div
|
|
71
|
-
class=
|
|
67
|
+
class="tw-flex tw-grow tw-basis-[1] tw-flex-col tw-justify-center tw-items-center tw-text-white"
|
|
72
68
|
@click.stop="isActionsPopupVisible = true"
|
|
73
69
|
>
|
|
74
70
|
<VcIcon icon="fas fa-ellipsis-h"></VcIcon>
|
|
@@ -76,17 +72,18 @@
|
|
|
76
72
|
</div>
|
|
77
73
|
|
|
78
74
|
<!-- Actions popup -->
|
|
79
|
-
<teleport
|
|
75
|
+
<teleport
|
|
76
|
+
to="body"
|
|
77
|
+
v-if="isActionsPopupVisible"
|
|
78
|
+
>
|
|
80
79
|
<div
|
|
81
80
|
class="tw-absolute tw-left-0 tw-top-0 tw-right-0 tw-bottom-0 tw-bg-[rgba(107,121,135,0.15)] tw-flex tw-items-center tw-justify-center tw-z-[99]"
|
|
82
81
|
>
|
|
83
82
|
<div
|
|
84
83
|
class="tw-bg-white tw-rounded-[6px] tw-overflow-hidden tw-p-5 tw-max-w-[80%] tw-w-[350px] tw-border tw-border-solid tw-border-[#eef0f2] tw-box-border tw-shadow-[1px_1px_22px_rgba(126,142,157,0.2)]"
|
|
85
84
|
>
|
|
86
|
-
<div class=
|
|
87
|
-
<span
|
|
88
|
-
class="tw-grow tw-text-[#2e3d4e] tw-text-[19px] tw-font-semibold tw-tracking-[-0.01em]"
|
|
89
|
-
>
|
|
85
|
+
<div class="tw-flex tw-w-full tw-items-center">
|
|
86
|
+
<span class="tw-grow tw-text-[#2e3d4e] tw-text-[19px] tw-font-semibold tw-tracking-[-0.01em]">
|
|
90
87
|
{{ $t("All actions") }}
|
|
91
88
|
</span>
|
|
92
89
|
<VcIcon
|
|
@@ -97,14 +94,17 @@
|
|
|
97
94
|
></VcIcon>
|
|
98
95
|
</div>
|
|
99
96
|
|
|
100
|
-
<div class=
|
|
97
|
+
<div class="tw-flex tw-flex-wrap tw-my-5 tw-justify-between">
|
|
101
98
|
<div
|
|
102
99
|
v-for="(itemAction, i) in itemActions"
|
|
103
100
|
:key="i"
|
|
104
|
-
class=
|
|
101
|
+
class="tw-flex tw-grow tw-shrink-0 tw-flex-col tw-items-center tw-text-[#319ed4] tw-my-2 tw-box-border tw-p-1 tw-max-w-[80px]"
|
|
105
102
|
@click="itemAction.clickHandler(item)"
|
|
106
103
|
>
|
|
107
|
-
<VcIcon
|
|
104
|
+
<VcIcon
|
|
105
|
+
:icon="itemAction.icon"
|
|
106
|
+
size="xl"
|
|
107
|
+
></VcIcon>
|
|
108
108
|
<div class="tw-text-base tw-mt-2 tw-text-center">
|
|
109
109
|
{{ itemAction.title }}
|
|
110
110
|
</div>
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
|
|
121
121
|
<script lang="ts" setup>
|
|
122
122
|
import { computed, ref, watch } from "vue";
|
|
123
|
-
import { IActionBuilderResult } from "
|
|
124
|
-
import { VcIcon } from "
|
|
123
|
+
import { IActionBuilderResult } from "./../../../../../../core/types";
|
|
124
|
+
import { VcIcon } from "./../../../../../components";
|
|
125
125
|
|
|
126
126
|
export interface Props {
|
|
127
127
|
item: {
|
|
128
|
-
id
|
|
128
|
+
id?: string;
|
|
129
129
|
};
|
|
130
|
-
actionBuilder?: (item: { id
|
|
130
|
+
actionBuilder?: (item: { id?: string }) => IActionBuilderResult[];
|
|
131
131
|
swipingItem?: string;
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -165,23 +165,17 @@ const rightSwipeActions = computed(
|
|
|
165
165
|
() =>
|
|
166
166
|
itemActions.value &&
|
|
167
167
|
itemActions.value.length &&
|
|
168
|
-
itemActions.value.filter(
|
|
169
|
-
(actions: IActionBuilderResult) => !actions.leftActions
|
|
170
|
-
)
|
|
168
|
+
itemActions.value.filter((actions: IActionBuilderResult) => !actions.leftActions)
|
|
171
169
|
);
|
|
172
170
|
const leftSwipeActions = computed(
|
|
173
171
|
() =>
|
|
174
172
|
itemActions.value &&
|
|
175
173
|
itemActions.value.length &&
|
|
176
|
-
itemActions.value.filter(
|
|
177
|
-
(actions: IActionBuilderResult) => actions.leftActions
|
|
178
|
-
)
|
|
174
|
+
itemActions.value.filter((actions: IActionBuilderResult) => actions.leftActions)
|
|
179
175
|
);
|
|
180
176
|
|
|
181
177
|
function handleOffset() {
|
|
182
|
-
if (
|
|
183
|
-
itemActions.value.some((action: IActionBuilderResult) => action.leftActions)
|
|
184
|
-
) {
|
|
178
|
+
if (itemActions.value.some((action: IActionBuilderResult) => action.leftActions)) {
|
|
185
179
|
offsetX.value = -maxWidth;
|
|
186
180
|
startOffsetX.value = offsetX.value;
|
|
187
181
|
} else {
|
|
@@ -233,10 +227,7 @@ function touchEnd(): void {
|
|
|
233
227
|
if (absoluteOffsetX < maxWidth) {
|
|
234
228
|
offsetX.value = absoluteOffsetX < maxWidth / 2 ? 0 : -maxWidth;
|
|
235
229
|
} else {
|
|
236
|
-
offsetX.value =
|
|
237
|
-
absoluteOffsetX <= maxWidth * 2 - threshold * 2
|
|
238
|
-
? -maxWidth
|
|
239
|
-
: -maxWidth * 2;
|
|
230
|
+
offsetX.value = absoluteOffsetX <= maxWidth * 2 - threshold * 2 ? -maxWidth : -maxWidth * 2;
|
|
240
231
|
}
|
|
241
232
|
|
|
242
233
|
isMoving.value = false;
|
|
@@ -247,10 +238,7 @@ function touchCancel(): void {
|
|
|
247
238
|
if (absoluteOffsetX < maxWidth) {
|
|
248
239
|
offsetX.value = absoluteOffsetX < maxWidth / 2 ? 0 : -maxWidth;
|
|
249
240
|
} else {
|
|
250
|
-
offsetX.value =
|
|
251
|
-
absoluteOffsetX <= maxWidth * 2 - threshold * 2
|
|
252
|
-
? -maxWidth
|
|
253
|
-
: -maxWidth * 2;
|
|
241
|
+
offsetX.value = absoluteOffsetX <= maxWidth * 2 - threshold * 2 ? -maxWidth : -maxWidth * 2;
|
|
254
242
|
}
|
|
255
243
|
|
|
256
244
|
isMoving.value = false;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
import { VcTableEmits, VcTableProps } from "./vc-table-model";
|
|
3
|
+
import { ComponentConstructor } from "./../../../types/ts-helpers";
|
|
4
|
+
import Table from "./vc-table.vue";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
export const VcTable: ComponentConstructor<ComponentPublicInstance<VcTableProps, any, any, any, any, VcTableEmits>> =
|
|
7
|
+
Table;
|