@vc-shell/framework 1.0.110 → 1.0.112
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/CHANGELOG.md +28 -0
- package/core/composables/useApiClient/index.ts +1 -1
- package/core/composables/useAsync/index.ts +2 -2
- package/core/composables/usePermissions/index.ts +7 -18
- package/core/composables/useUser/index.ts +13 -11
- package/core/directives/loading/index.ts +5 -27
- package/core/directives/loading/styles.css +38 -0
- package/core/plugins/modularity/index.ts +41 -14
- package/core/plugins/permissions/index.ts +3 -3
- package/core/types/index.ts +36 -3
- package/dist/core/composables/useApiClient/index.d.ts +1 -1
- package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
- package/dist/core/composables/useAsync/index.d.ts +1 -1
- package/dist/core/composables/useAsync/index.d.ts.map +1 -1
- package/dist/core/composables/usePermissions/index.d.ts +1 -2
- package/dist/core/composables/usePermissions/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +1 -0
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/directives/loading/index.d.ts +3 -2
- package/dist/core/directives/loading/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +13 -4
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +41 -2
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.mjs +25840 -24070
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +14 -23
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +28 -25
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +5 -2
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -1
- package/dist/shared/components/error-interceptor/index.d.ts +3 -3
- package/dist/shared/components/language-selector/language-selector.vue.d.ts +41 -26
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +12 -12
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useContainer/index.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/index.d.ts +11 -11
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +35 -22
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +39 -28
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/index.d.ts +13 -13
- package/dist/shared/modules/assets/index.d.ts +3 -1
- package/dist/shared/modules/assets/index.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +42 -29
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +9 -9
- package/dist/shared/modules/assets-manager/index.d.ts +3 -1
- package/dist/shared/modules/assets-manager/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts +2204 -0
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +220 -0
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/factories.d.ts +15 -0
- package/dist/shared/modules/dynamic/components/factories.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +130 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +128 -0
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +132 -0
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/ValidationField.d.ts +13 -0
- package/dist/shared/modules/dynamic/components/fields/ValidationField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +124 -0
- package/dist/shared/modules/dynamic/components/fields/props.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/index.d.ts +4 -0
- package/dist/shared/modules/dynamic/components/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/composables/index.d.ts +2 -0
- package/dist/shared/modules/dynamic/composables/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts +35 -0
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts +8 -0
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts +22 -0
- package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/index.d.ts +4 -0
- package/dist/shared/modules/dynamic/factories/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +101 -0
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/getters.d.ts +2 -0
- package/dist/shared/modules/dynamic/helpers/getters.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts +13 -0
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/override.d.ts +7 -0
- package/dist/shared/modules/dynamic/helpers/override.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/setters.d.ts +8 -0
- package/dist/shared/modules/dynamic/helpers/setters.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/toolbarReducer.d.ts +11 -0
- package/dist/shared/modules/dynamic/helpers/toolbarReducer.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/unrefNested.d.ts +2 -0
- package/dist/shared/modules/dynamic/helpers/unrefNested.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/unwrapInterpolation.d.ts +3 -0
- package/dist/shared/modules/dynamic/helpers/unwrapInterpolation.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/index.d.ts +32 -0
- package/dist/shared/modules/dynamic/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +68 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +79 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/index.d.ts +4 -0
- package/dist/shared/modules/dynamic/pages/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/types/index.d.ts +252 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/types/models.d.ts +93 -0
- package/dist/shared/modules/dynamic/types/models.d.ts.map +1 -0
- package/dist/shared/modules/index.d.ts +1 -0
- package/dist/shared/modules/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/index.d.ts +0 -3
- package/dist/shared/pages/InvitePage/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/plugin.d.ts +4 -0
- package/dist/shared/pages/InvitePage/plugin.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +45 -9
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/index.d.ts +14 -0
- package/dist/shared/pages/LoginPage/components/login/index.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/index.d.ts +0 -1
- package/dist/shared/pages/LoginPage/index.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/plugin.d.ts +1 -3
- package/dist/shared/pages/LoginPage/plugin.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/index.d.ts +0 -3
- package/dist/shared/pages/ResetPasswordPage/index.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/plugin.d.ts +4 -0
- package/dist/shared/pages/ResetPasswordPage/plugin.d.ts.map +1 -0
- package/dist/shared/pages/index.d.ts +0 -6
- package/dist/shared/pages/index.d.ts.map +1 -1
- package/dist/shared/pages/plugin.d.ts +4 -0
- package/dist/shared/pages/plugin.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +4 -4
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +22 -11
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/index.d.ts +1 -208
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +75 -27
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/index.d.ts +32 -38
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +46 -27
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts +72 -38
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts +69 -28
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +11 -22
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/index.d.ts +5 -5
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +22 -11
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-hint/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/index.d.ts +13 -7
- package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +27 -25
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/index.d.ts +16 -16
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +54 -29
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-info-row/index.d.ts +9 -9
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +30 -23
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/index.d.ts +33 -39
- package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts +33 -26
- package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/index.d.ts +4 -4
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts +22 -11
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts +9 -10
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +19 -24
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-row/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/index.d.ts +1 -142
- package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +29 -28
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts +9 -10
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts +36 -11
- package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/index.d.ts +13 -13
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +49 -24
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +28 -11
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts +5 -3
- package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +23 -22
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-code-editor/index.d.ts +28 -28
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +48 -23
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/index.d.ts +1 -226
- package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +74 -28
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +23 -23
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +46 -27
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/index.d.ts +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/index.d.ts +1 -390
- package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +181 -41
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts +90 -90
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +143 -30
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/index.d.ts +74 -10
- package/dist/ui/components/molecules/vc-multivalue/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +74 -10
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts +51 -10
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +6 -6
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +26 -25
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/index.d.ts +19 -19
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +46 -25
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/index.d.ts +65 -103
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +65 -479
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/index.d.ts +21 -21
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts +39 -26
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/index.d.ts +40 -40
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +74 -25
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts +35 -12
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +40 -23
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +47 -28
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts +31 -28
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/index.d.ts +67 -67
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +86 -37
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts +44 -11
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +61 -34
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts +13 -22
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/index.d.ts +39 -39
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +62 -31
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +1 -140
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +64 -75
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +58 -35
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +22 -25
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/index.d.ts +37 -31
- package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +130 -46
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/index.d.ts +9 -9
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts +23 -22
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts +28 -22
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts +0 -6
- package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts +36 -10
- package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-template/index.d.ts +4 -4
- package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts +27 -10
- package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +38 -31
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +18 -9
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +12 -19
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +23 -24
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +29 -26
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +14 -14
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/index.d.ts +1 -214
- package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +90 -105
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +8 -8
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +2 -2
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +16 -14
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +37 -30
- package/shared/components/blade-navigation/types/index.ts +7 -3
- package/shared/components/notifications/composables/useContainer/index.ts +2 -5
- package/shared/components/popup-handler/composables/usePopup/index.ts +0 -2
- package/shared/modules/assets/components/assets-details/assets-details.vue +6 -6
- package/shared/modules/assets/index.ts +2 -2
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +3 -3
- package/shared/modules/assets-manager/index.ts +2 -2
- package/shared/modules/dynamic/components/FIELD_MAP.ts +27 -0
- package/shared/modules/dynamic/components/SchemaRender.ts +81 -0
- package/shared/modules/dynamic/components/factories.ts +159 -0
- package/shared/modules/dynamic/components/fields/Button.ts +31 -0
- package/shared/modules/dynamic/components/fields/Card.ts +86 -0
- package/shared/modules/dynamic/components/fields/Checkbox.ts +44 -0
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +99 -0
- package/shared/modules/dynamic/components/fields/EditorField.ts +43 -0
- package/shared/modules/dynamic/components/fields/Fieldset.ts +77 -0
- package/shared/modules/dynamic/components/fields/GalleryField.ts +121 -0
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +49 -0
- package/shared/modules/dynamic/components/fields/InputField.ts +42 -0
- package/shared/modules/dynamic/components/fields/SelectField.ts +54 -0
- package/shared/modules/dynamic/components/fields/StatusField.ts +55 -0
- package/shared/modules/dynamic/components/fields/ValidationField.ts +53 -0
- package/shared/modules/dynamic/components/fields/props.ts +52 -0
- package/shared/modules/dynamic/components/index.ts +4 -0
- package/shared/modules/dynamic/composables/index.ts +1 -0
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +235 -0
- package/shared/modules/dynamic/factories/base/useDetailsFactory.ts +83 -0
- package/shared/modules/dynamic/factories/base/useListFactory.ts +68 -0
- package/shared/modules/dynamic/factories/index.ts +4 -0
- package/shared/modules/dynamic/factories/types/index.ts +103 -0
- package/shared/modules/dynamic/helpers/getters.ts +10 -0
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +112 -0
- package/shared/modules/dynamic/helpers/override.ts +70 -0
- package/shared/modules/dynamic/helpers/setters.ts +15 -0
- package/shared/modules/dynamic/helpers/toolbarReducer.ts +41 -0
- package/shared/modules/dynamic/helpers/unrefNested.ts +14 -0
- package/shared/modules/dynamic/helpers/unwrapInterpolation.ts +15 -0
- package/shared/modules/dynamic/index.ts +163 -0
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +292 -0
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +467 -0
- package/shared/modules/dynamic/pages/index.ts +4 -0
- package/shared/modules/dynamic/types/index.ts +289 -0
- package/shared/modules/dynamic/types/models.ts +140 -0
- package/shared/modules/index.ts +1 -0
- package/shared/pages/InvitePage/index.ts +0 -6
- package/shared/pages/InvitePage/plugin.ts +5 -0
- package/shared/pages/LoginPage/components/login/Login.vue +5 -6
- package/shared/pages/LoginPage/index.ts +0 -1
- package/shared/pages/LoginPage/plugin.ts +1 -13
- package/shared/pages/ResetPasswordPage/index.ts +0 -6
- package/shared/pages/ResetPasswordPage/plugin.ts +5 -0
- package/shared/pages/index.ts +0 -9
- package/shared/pages/plugin.ts +3 -0
- package/ui/components/atoms/vc-button/index.ts +1 -10
- package/ui/components/atoms/vc-button/vc-button.vue +8 -2
- package/ui/components/atoms/vc-card/index.ts +1 -9
- package/ui/components/atoms/vc-card/vc-card.vue +6 -1
- package/ui/components/atoms/vc-checkbox/index.ts +1 -9
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +32 -10
- package/ui/components/atoms/vc-icon/vc-icon.vue +13 -1
- package/ui/components/atoms/vc-label/index.ts +1 -9
- package/ui/components/atoms/vc-label/vc-label.vue +5 -0
- package/ui/components/atoms/vc-status/index.ts +1 -10
- package/ui/components/atoms/vc-status/vc-status.vue +5 -1
- package/ui/components/atoms/vc-video/vc-video.vue +2 -2
- package/ui/components/atoms/vc-widget/vc-widget.vue +1 -1
- package/ui/components/molecules/vc-editor/index.ts +1 -10
- package/ui/components/molecules/vc-editor/vc-editor.vue +15 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +4 -4
- package/ui/components/molecules/vc-input/index.ts +1 -60
- package/ui/components/molecules/vc-input/vc-input.vue +112 -37
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +1 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +21 -17
- package/ui/components/molecules/vc-select/index.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.vue +11 -37
- package/ui/components/organisms/vc-dynamic-property/index.ts +1 -3
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +199 -257
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +9 -7
- package/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue +10 -1
- package/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue +1 -10
- package/ui/components/organisms/vc-table/index.ts +1 -3
- package/ui/components/organisms/vc-table/vc-table.stories.ts +3 -3
- package/ui/components/organisms/vc-table/vc-table.vue +30 -17
- package/core/api/catalog.ts +0 -8527
- package/dist/core/api/catalog.d.ts +0 -2522
- package/dist/core/api/catalog.d.ts.map +0 -1
- package/dist/typings/index.d.ts +0 -8
- package/dist/typings/index.d.ts.map +0 -1
|
@@ -3,13 +3,22 @@
|
|
|
3
3
|
class="vc-checkbox"
|
|
4
4
|
:class="{ 'vc-checkbox_disabled': disabled }"
|
|
5
5
|
>
|
|
6
|
+
<!-- Input label -->
|
|
7
|
+
<VcLabel
|
|
8
|
+
v-if="label"
|
|
9
|
+
class="tw-mb-2"
|
|
10
|
+
:required="required"
|
|
11
|
+
>
|
|
12
|
+
<span>{{ label }}</span>
|
|
13
|
+
</VcLabel>
|
|
6
14
|
<label class="vc-checkbox__label">
|
|
7
15
|
<input
|
|
16
|
+
v-model="value"
|
|
8
17
|
type="checkbox"
|
|
9
18
|
class="vc-checkbox__input"
|
|
10
|
-
:checked="modelValue"
|
|
11
19
|
:disabled="disabled"
|
|
12
|
-
|
|
20
|
+
:true-value="trueValue"
|
|
21
|
+
:false-value="falseValue"
|
|
13
22
|
/>
|
|
14
23
|
<span class="vc-checkbox__checkmark"></span>
|
|
15
24
|
<span
|
|
@@ -19,7 +28,7 @@
|
|
|
19
28
|
<slot></slot>
|
|
20
29
|
</span>
|
|
21
30
|
<span
|
|
22
|
-
v-if="required"
|
|
31
|
+
v-if="!label && required"
|
|
23
32
|
class="tw-text-[color:var(--checkbox-required-color)] tw-ml-1"
|
|
24
33
|
>*</span
|
|
25
34
|
>
|
|
@@ -35,28 +44,41 @@
|
|
|
35
44
|
</slot>
|
|
36
45
|
</div>
|
|
37
46
|
</template>
|
|
38
|
-
|
|
47
|
+
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
39
48
|
<script lang="ts" setup>
|
|
49
|
+
import { MaybeRef, computed, unref } from "vue";
|
|
40
50
|
import { VcHint } from "./../vc-hint";
|
|
41
51
|
export interface Props {
|
|
42
|
-
modelValue?: boolean
|
|
52
|
+
modelValue?: MaybeRef<boolean>;
|
|
43
53
|
disabled?: boolean;
|
|
44
54
|
required?: boolean;
|
|
45
55
|
name?: string;
|
|
46
56
|
errorMessage?: string;
|
|
57
|
+
trueValue?: boolean;
|
|
58
|
+
falseValue?: boolean;
|
|
59
|
+
label?: string;
|
|
47
60
|
}
|
|
48
61
|
|
|
49
62
|
export interface Emits {
|
|
50
63
|
(event: "update:modelValue", value: boolean): void;
|
|
51
64
|
}
|
|
52
65
|
|
|
53
|
-
withDefaults(defineProps<Props>(), { name: "Field" });
|
|
66
|
+
const props = withDefaults(defineProps<Props>(), { name: "Field", trueValue: true, falseValue: false });
|
|
54
67
|
const emit = defineEmits<Emits>();
|
|
55
68
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
69
|
+
defineSlots<{
|
|
70
|
+
default: (props: any) => any;
|
|
71
|
+
error: (props: any) => any;
|
|
72
|
+
}>();
|
|
73
|
+
|
|
74
|
+
const value = computed({
|
|
75
|
+
get() {
|
|
76
|
+
return unref(props.modelValue);
|
|
77
|
+
},
|
|
78
|
+
set(newValue: boolean) {
|
|
79
|
+
emit("update:modelValue", newValue);
|
|
80
|
+
},
|
|
81
|
+
});
|
|
60
82
|
</script>
|
|
61
83
|
|
|
62
84
|
<style lang="scss">
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<i :class="`vc-icon vc-icon_${size} ${(icon as string).toLowerCase()}`" />
|
|
2
|
+
<i :class="`vc-icon vc-icon_${size} vc-icon_${variant} ${(icon as string).toLowerCase()}`" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
6
|
export interface Props {
|
|
7
7
|
icon?: string;
|
|
8
8
|
size?: "xs" | "s" | "m" | "l" | "xl" | "xxl" | "xxxl";
|
|
9
|
+
variant?: "warning" | "danger" | "success";
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
withDefaults(defineProps<Props>(), {
|
|
@@ -23,9 +24,14 @@ withDefaults(defineProps<Props>(), {
|
|
|
23
24
|
--icon-size-xl: 22px;
|
|
24
25
|
--icon-size-xxl: 30px;
|
|
25
26
|
--icon-size-xxxl: 64px;
|
|
27
|
+
|
|
28
|
+
--icon-color-success: #99c17a;
|
|
29
|
+
--icon-color-danger: #f34747;
|
|
30
|
+
--icon-color-warning: #f89406;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
$sizes: xs, s, m, l, xl, xxl, xxxl;
|
|
34
|
+
$variants: warning, danger, success;
|
|
29
35
|
|
|
30
36
|
.vc-icon {
|
|
31
37
|
@each $size in $sizes {
|
|
@@ -33,5 +39,11 @@ $sizes: xs, s, m, l, xl, xxl, xxxl;
|
|
|
33
39
|
@apply tw-text-[length:var(--icon-size-#{$size})];
|
|
34
40
|
}
|
|
35
41
|
}
|
|
42
|
+
|
|
43
|
+
@each $variant in $variants {
|
|
44
|
+
&_#{$variant} {
|
|
45
|
+
@apply tw-text-[color:var(--icon-color-#{$variant})];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
36
48
|
}
|
|
37
49
|
</style>
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import _Label from "./vc-label.vue";
|
|
2
|
-
import { VNode } from "vue";
|
|
3
2
|
|
|
4
|
-
export const VcLabel = _Label as typeof _Label
|
|
5
|
-
new (): {
|
|
6
|
-
$slots: {
|
|
7
|
-
default: () => VNode[];
|
|
8
|
-
tooltip: () => VNode[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
3
|
+
export const VcLabel = _Label as typeof _Label;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<slot></slot>
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
|
-
|
|
9
|
+
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
10
10
|
<script lang="ts" setup>
|
|
11
11
|
export interface Props {
|
|
12
12
|
variant?: "info" | "warning" | "danger" | "success" | "light-danger";
|
|
@@ -18,6 +18,10 @@ withDefaults(defineProps<Props>(), {
|
|
|
18
18
|
variant: "info",
|
|
19
19
|
outline: true,
|
|
20
20
|
});
|
|
21
|
+
|
|
22
|
+
defineSlots<{
|
|
23
|
+
default: (props?: any) => any;
|
|
24
|
+
}>();
|
|
21
25
|
</script>
|
|
22
26
|
|
|
23
27
|
<style lang="scss">
|
|
@@ -67,11 +67,11 @@ export interface Emits {
|
|
|
67
67
|
(event: "click"): void;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
withDefaults(defineProps<Props>(), {
|
|
71
71
|
size: "auto",
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
defineEmits<Emits>();
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
77
|
<style lang="scss">
|
|
@@ -82,6 +82,11 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
82
82
|
|
|
83
83
|
const emit = defineEmits<Emits>();
|
|
84
84
|
|
|
85
|
+
defineSlots<{
|
|
86
|
+
default: (props: any) => any;
|
|
87
|
+
error?: (props: any) => any;
|
|
88
|
+
}>();
|
|
89
|
+
|
|
85
90
|
const content = ref();
|
|
86
91
|
const toolbar = {
|
|
87
92
|
container: [
|
|
@@ -181,6 +186,16 @@ function isQuillEmpty(value: string) {
|
|
|
181
186
|
tw-overflow-x-hidden
|
|
182
187
|
hover:tw-bg-[color:var(--editor-scroll-color-hover)];
|
|
183
188
|
}
|
|
189
|
+
|
|
190
|
+
&.ql-blank:before {
|
|
191
|
+
color: var(--textarea-placeholder-color);
|
|
192
|
+
content: attr(data-placeholder);
|
|
193
|
+
font-style: inherit;
|
|
194
|
+
left: 15px;
|
|
195
|
+
pointer-events: none;
|
|
196
|
+
position: absolute;
|
|
197
|
+
right: 15px;
|
|
198
|
+
}
|
|
184
199
|
}
|
|
185
200
|
}
|
|
186
201
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tw-flex tw-flex-col tw-flex-1">
|
|
3
3
|
<div
|
|
4
|
+
v-loading="loading"
|
|
4
5
|
class="vc-file-upload tw-relative tw-h-[155px] tw-box-border tw-border tw-border-dashed tw-border-[#c8dbea] tw-rounded-[6px] tw-p-4 tw-flex tw-flex-col tw-items-center tw-justify-center"
|
|
5
6
|
:class="[
|
|
6
7
|
`vc-file-upload_${variant}`,
|
|
@@ -16,7 +17,6 @@
|
|
|
16
17
|
@dragenter.stop.prevent
|
|
17
18
|
@dragleave.stop.prevent="dragLeave"
|
|
18
19
|
>
|
|
19
|
-
<VcLoading :active="loading"></VcLoading>
|
|
20
20
|
<VcIcon
|
|
21
21
|
class="tw-text-[#c8dbea]"
|
|
22
22
|
icon="fas fa-cloud-upload-alt"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<script lang="ts" setup>
|
|
55
55
|
import { getCurrentInstance, ref, unref } from "vue";
|
|
56
56
|
import { useField } from "vee-validate";
|
|
57
|
-
import {
|
|
57
|
+
import { VcIcon, VcLink, VcHint } from "./../../";
|
|
58
58
|
import { useI18n } from "vue-i18n";
|
|
59
59
|
|
|
60
60
|
export interface Props {
|
|
@@ -80,6 +80,8 @@ const emit = defineEmits<Emits>();
|
|
|
80
80
|
|
|
81
81
|
const { t } = useI18n({ useScope: "global" });
|
|
82
82
|
|
|
83
|
+
// TODO refactor component and remove field-level validation
|
|
84
|
+
|
|
83
85
|
const instance = getCurrentInstance();
|
|
84
86
|
// Prepare validation rules using required and rules props combination
|
|
85
87
|
const internalRules = unref(props.rules) || "";
|
|
@@ -102,8 +104,6 @@ const upload = async (event: Event) => {
|
|
|
102
104
|
const target = event.target as HTMLInputElement;
|
|
103
105
|
const fileList = target.files;
|
|
104
106
|
|
|
105
|
-
console.log(fileList);
|
|
106
|
-
|
|
107
107
|
if (fileList && fileList.length) {
|
|
108
108
|
emit("upload", fileList);
|
|
109
109
|
}
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import _Input from "./vc-input.vue";
|
|
3
|
-
|
|
4
|
-
export const VcInput = _Input as typeof _Input & {
|
|
5
|
-
new (): {
|
|
6
|
-
$slots: {
|
|
7
|
-
/**
|
|
8
|
-
* Slot for controls
|
|
9
|
-
* @param scope
|
|
10
|
-
*/
|
|
11
|
-
control: (scope: {
|
|
12
|
-
/**
|
|
13
|
-
* Field is editable
|
|
14
|
-
*/
|
|
15
|
-
editable: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Field has focus
|
|
18
|
-
*/
|
|
19
|
-
focused: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Field's value
|
|
22
|
-
*/
|
|
23
|
-
modelValue: string | number | Date | null;
|
|
24
|
-
/**
|
|
25
|
-
* Function that emits an @input event in the context of the field
|
|
26
|
-
* @param value Value to be emitted
|
|
27
|
-
*/
|
|
28
|
-
emitValue: (value: string | number | Date | null) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Field placeholder text
|
|
31
|
-
*/
|
|
32
|
-
placeholder: string | undefined;
|
|
33
|
-
}) => VNode[];
|
|
34
|
-
/**
|
|
35
|
-
* Prepend outer field
|
|
36
|
-
*/
|
|
37
|
-
prepend: () => VNode[];
|
|
38
|
-
/**
|
|
39
|
-
* Prepend inner field
|
|
40
|
-
*/
|
|
41
|
-
"prepend-inner": () => VNode[];
|
|
42
|
-
/**
|
|
43
|
-
* Append to inner field
|
|
44
|
-
*/
|
|
45
|
-
"append-inner": () => VNode[];
|
|
46
|
-
/**
|
|
47
|
-
* Append outer field
|
|
48
|
-
*/
|
|
49
|
-
append: () => VNode[];
|
|
50
|
-
/**
|
|
51
|
-
* Slot for errors
|
|
52
|
-
*/
|
|
53
|
-
error: () => VNode[];
|
|
54
|
-
/**
|
|
55
|
-
* Slot for hint text
|
|
56
|
-
*/
|
|
57
|
-
hint: () => VNode[];
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
};
|
|
1
|
+
export { default as VcInput } from "./vc-input.vue";
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
'vc-input_clearable': clearable,
|
|
8
8
|
'vc-input_error': error,
|
|
9
9
|
'vc-input_disabled': disabled,
|
|
10
|
-
'tw-pb-[20px]': error || hint,
|
|
11
10
|
},
|
|
12
11
|
]"
|
|
13
12
|
>
|
|
@@ -80,7 +79,7 @@
|
|
|
80
79
|
{{ suffix }}
|
|
81
80
|
</div>
|
|
82
81
|
<div
|
|
83
|
-
v-if="clearable &&
|
|
82
|
+
v-if="clearable && mutatedModel && !disabled && type !== 'password'"
|
|
84
83
|
class="vc-input__clear"
|
|
85
84
|
@click="onReset"
|
|
86
85
|
>
|
|
@@ -131,33 +130,32 @@
|
|
|
131
130
|
</div>
|
|
132
131
|
</div>
|
|
133
132
|
</div>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
</div>
|
|
133
|
+
|
|
134
|
+
<Transition
|
|
135
|
+
name="slide-up"
|
|
136
|
+
mode="out-in"
|
|
137
|
+
>
|
|
138
|
+
<div v-if="error">
|
|
139
|
+
<slot name="error">
|
|
140
|
+
<VcHint
|
|
141
|
+
v-if="errorMessage"
|
|
142
|
+
class="vc-input__error"
|
|
143
|
+
>
|
|
144
|
+
{{ errorMessage }}
|
|
145
|
+
</VcHint>
|
|
146
|
+
</slot>
|
|
147
|
+
</div>
|
|
148
|
+
<div v-else>
|
|
149
|
+
<slot name="hint">
|
|
150
|
+
<VcHint
|
|
151
|
+
v-if="hint"
|
|
152
|
+
class="vc-input__desc"
|
|
153
|
+
>
|
|
154
|
+
{{ hint }}
|
|
155
|
+
</VcHint>
|
|
156
|
+
</slot>
|
|
157
|
+
</div>
|
|
158
|
+
</Transition>
|
|
161
159
|
</div>
|
|
162
160
|
|
|
163
161
|
<div
|
|
@@ -170,10 +168,11 @@
|
|
|
170
168
|
</div>
|
|
171
169
|
</div>
|
|
172
170
|
</template>
|
|
173
|
-
|
|
171
|
+
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
174
172
|
<script lang="ts" setup>
|
|
175
|
-
import { computed, ref, unref, watch } from "vue";
|
|
173
|
+
import { computed, ref, unref, watch, MaybeRef } from "vue";
|
|
176
174
|
import { VcLabel, VcIcon, VcHint } from "./../../";
|
|
175
|
+
import moment from "moment";
|
|
177
176
|
|
|
178
177
|
export interface Props {
|
|
179
178
|
/**
|
|
@@ -276,6 +275,60 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
276
275
|
|
|
277
276
|
const emit = defineEmits<Emits>();
|
|
278
277
|
|
|
278
|
+
defineSlots<{
|
|
279
|
+
/**
|
|
280
|
+
* Slot for controls
|
|
281
|
+
* @param scope
|
|
282
|
+
*/
|
|
283
|
+
control: (scope: {
|
|
284
|
+
/**
|
|
285
|
+
* Field is editable
|
|
286
|
+
*/
|
|
287
|
+
editable: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Field has focus
|
|
290
|
+
*/
|
|
291
|
+
focused: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Field's value
|
|
294
|
+
*/
|
|
295
|
+
modelValue: string | number | Date | null;
|
|
296
|
+
/**
|
|
297
|
+
* Function that emits an @input event in the context of the field
|
|
298
|
+
* @param value Value to be emitted
|
|
299
|
+
*/
|
|
300
|
+
emitValue: (value: string | number | Date | null) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Field placeholder text
|
|
303
|
+
*/
|
|
304
|
+
placeholder: string | undefined;
|
|
305
|
+
}) => any;
|
|
306
|
+
/**
|
|
307
|
+
* Prepend outer field
|
|
308
|
+
*/
|
|
309
|
+
prepend: (props: any) => any;
|
|
310
|
+
/**
|
|
311
|
+
* Prepend inner field
|
|
312
|
+
*/
|
|
313
|
+
"prepend-inner": (props: any) => any;
|
|
314
|
+
/**
|
|
315
|
+
* Append to inner field
|
|
316
|
+
*/
|
|
317
|
+
"append-inner": (props: any) => any;
|
|
318
|
+
/**
|
|
319
|
+
* Append outer field
|
|
320
|
+
*/
|
|
321
|
+
append: (props: any) => any;
|
|
322
|
+
/**
|
|
323
|
+
* Slot for errors
|
|
324
|
+
*/
|
|
325
|
+
error: (props: any) => any;
|
|
326
|
+
/**
|
|
327
|
+
* Slot for hint text
|
|
328
|
+
*/
|
|
329
|
+
hint: (props: any) => any;
|
|
330
|
+
}>();
|
|
331
|
+
|
|
279
332
|
let emitTimer;
|
|
280
333
|
let emitValueFn;
|
|
281
334
|
const temp = ref();
|
|
@@ -285,11 +338,24 @@ const internalType = ref(unref(props.type));
|
|
|
285
338
|
|
|
286
339
|
const maxDate = computed(() => (props.type === "date" && "9999-12-31") || undefined);
|
|
287
340
|
|
|
341
|
+
const rawModel = computed(() => unref(props.modelValue));
|
|
342
|
+
const mutatedModel = ref();
|
|
343
|
+
|
|
288
344
|
watch(
|
|
289
|
-
() =>
|
|
290
|
-
() => {
|
|
291
|
-
if (
|
|
292
|
-
|
|
345
|
+
() => rawModel.value,
|
|
346
|
+
(newVal) => {
|
|
347
|
+
if (internalType.value === "datetime-local" || internalType.value === "date") {
|
|
348
|
+
if (newVal instanceof Date && !isNaN(newVal.valueOf())) {
|
|
349
|
+
mutatedModel.value = moment(newVal).format("YYYY-MM-DDTHH:mm");
|
|
350
|
+
} else {
|
|
351
|
+
mutatedModel.value = undefined;
|
|
352
|
+
}
|
|
353
|
+
} else {
|
|
354
|
+
mutatedModel.value = newVal;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (temp.value !== mutatedModel.value) {
|
|
358
|
+
temp.value = mutatedModel.value;
|
|
293
359
|
}
|
|
294
360
|
},
|
|
295
361
|
{ immediate: true }
|
|
@@ -307,8 +373,17 @@ function onInput(e: Event) {
|
|
|
307
373
|
|
|
308
374
|
function emitValue(val: string) {
|
|
309
375
|
emitValueFn = () => {
|
|
310
|
-
if (
|
|
311
|
-
|
|
376
|
+
if (mutatedModel.value !== val) {
|
|
377
|
+
let value;
|
|
378
|
+
if (internalType.value === "datetime-local" || internalType.value === "date") {
|
|
379
|
+
value = moment(val).toDate();
|
|
380
|
+
} else if (internalType.value === "number") {
|
|
381
|
+
value = +val;
|
|
382
|
+
} else {
|
|
383
|
+
value = val;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
emit("update:modelValue", value);
|
|
312
387
|
}
|
|
313
388
|
emitValueFn = undefined;
|
|
314
389
|
};
|
|
@@ -13,7 +13,7 @@ type Story = StoryObj<typeof VcInputCurrency>;
|
|
|
13
13
|
|
|
14
14
|
export const Primary: Story = {
|
|
15
15
|
render: (args) => ({
|
|
16
|
-
components: { VcInputCurrency, VcSelect, VcInput },
|
|
16
|
+
// components: { VcInputCurrency, VcSelect, VcInput },
|
|
17
17
|
setup() {
|
|
18
18
|
const price = ref(0);
|
|
19
19
|
const option = ref("USD");
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
<template #control="{ toggleHandler }">
|
|
14
14
|
<VcInput
|
|
15
15
|
:placeholder="placeholder"
|
|
16
|
-
:model-value="modelValue"
|
|
17
16
|
:hint="hint"
|
|
18
17
|
:clearable="clearable"
|
|
19
18
|
:prefix="prefix"
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
:maxlength="maxlength"
|
|
28
27
|
:tooltip="tooltip"
|
|
29
28
|
class="tw-w-full"
|
|
30
|
-
|
|
29
|
+
type="number"
|
|
31
30
|
>
|
|
32
31
|
<template #append-inner>
|
|
33
32
|
<slot
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
class="tw-text-[#43b0e6] tw-not-italic tw-font-medium tw-text-[13px] tw-leading-[20px] tw-cursor-pointer"
|
|
39
38
|
@click.stop.prevent="toggleHandler"
|
|
40
39
|
>
|
|
41
|
-
{{ option }}
|
|
40
|
+
{{ unref(option) }}
|
|
42
41
|
</button>
|
|
43
42
|
</slot>
|
|
44
43
|
</template>
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
|
|
57
56
|
<script lang="ts" setup>
|
|
58
57
|
import { useCurrencyInput, CurrencyDisplay } from "vue-currency-input";
|
|
59
|
-
import { watch } from "vue";
|
|
58
|
+
import { MaybeRef, unref, watch } from "vue";
|
|
60
59
|
import { VcSelect, VcInput } from "./../../";
|
|
61
60
|
|
|
62
61
|
export type OptionProp = ((option: string | Record<string, unknown>) => string) | string | undefined;
|
|
@@ -65,7 +64,7 @@ export interface Props {
|
|
|
65
64
|
/**
|
|
66
65
|
* Model of the currency component; Use with a listener for 'update:price' event OR use v-model:price directive
|
|
67
66
|
*/
|
|
68
|
-
modelValue:
|
|
67
|
+
modelValue: number | null | undefined;
|
|
69
68
|
/**
|
|
70
69
|
* Input label text
|
|
71
70
|
*/
|
|
@@ -159,8 +158,8 @@ export interface Props {
|
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
export interface Emits {
|
|
162
|
-
(event: "update:
|
|
163
|
-
(event: "update:option", value:
|
|
161
|
+
(event: "update:model-value", value: string | number | null): void;
|
|
162
|
+
(event: "update:option", value: unknown): void;
|
|
164
163
|
(event: "change", value: string | number | null): void;
|
|
165
164
|
}
|
|
166
165
|
|
|
@@ -168,15 +167,17 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
168
167
|
debounce: 0,
|
|
169
168
|
});
|
|
170
169
|
|
|
171
|
-
defineEmits<Emits>();
|
|
170
|
+
const emit = defineEmits<Emits>();
|
|
172
171
|
|
|
173
|
-
const { inputRef, setOptions } = useCurrencyInput(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
172
|
+
const { inputRef, setOptions, numberValue } = useCurrencyInput(
|
|
173
|
+
{
|
|
174
|
+
locale: navigator.language,
|
|
175
|
+
currency: props.option || "USD",
|
|
176
|
+
currencyDisplay: CurrencyDisplay.hidden,
|
|
177
|
+
hideGroupingSeparatorOnFocus: false,
|
|
178
|
+
},
|
|
179
|
+
false
|
|
180
|
+
);
|
|
180
181
|
|
|
181
182
|
// Change currency settings
|
|
182
183
|
watch(
|
|
@@ -184,11 +185,14 @@ watch(
|
|
|
184
185
|
(newVal) => {
|
|
185
186
|
setOptions({
|
|
186
187
|
locale: navigator.language,
|
|
187
|
-
currency: newVal
|
|
188
|
-
autoSign: false,
|
|
188
|
+
currency: newVal,
|
|
189
189
|
currencyDisplay: CurrencyDisplay.hidden,
|
|
190
190
|
hideGroupingSeparatorOnFocus: false,
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
|
+
|
|
195
|
+
watch(numberValue, (value) => {
|
|
196
|
+
emit("update:model-value", value);
|
|
197
|
+
});
|
|
194
198
|
</script>
|