@vc-shell/framework 1.0.109 → 1.0.111
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 +35 -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/plugins/validation/rules.ts +24 -7
- 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/useI18n/index.d.ts +1 -1
- package/dist/core/composables/useI18n/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/plugins/validation/rules.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 +30057 -27524
- 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 +250 -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/index.d.ts +1 -0
- package/dist/ui/components/atoms/index.d.ts.map +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 +28 -26
- 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 +54 -0
- package/dist/ui/components/atoms/vc-video/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +67 -0
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -0
- 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 +9 -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 +55 -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 +437 -0
- package/shared/modules/dynamic/pages/index.ts +4 -0
- package/shared/modules/dynamic/types/index.ts +287 -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/index.ts +1 -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 +16 -3
- 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/index.ts +3 -0
- package/ui/components/atoms/vc-video/vc-video.vue +102 -0
- 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 +16 -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 +29 -16
- 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
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
:modules="modules"
|
|
36
36
|
content-type="html"
|
|
37
37
|
:read-only="disabled"
|
|
38
|
+
:placeholder="placeholder"
|
|
38
39
|
@update:content="onInput"
|
|
39
40
|
/>
|
|
40
41
|
<slot
|
|
@@ -82,6 +83,11 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
82
83
|
|
|
83
84
|
const emit = defineEmits<Emits>();
|
|
84
85
|
|
|
86
|
+
defineSlots<{
|
|
87
|
+
default: (props: any) => any;
|
|
88
|
+
error?: (props: any) => any;
|
|
89
|
+
}>();
|
|
90
|
+
|
|
85
91
|
const content = ref();
|
|
86
92
|
const toolbar = {
|
|
87
93
|
container: [
|
|
@@ -181,6 +187,16 @@ function isQuillEmpty(value: string) {
|
|
|
181
187
|
tw-overflow-x-hidden
|
|
182
188
|
hover:tw-bg-[color:var(--editor-scroll-color-hover)];
|
|
183
189
|
}
|
|
190
|
+
|
|
191
|
+
&.ql-blank:before {
|
|
192
|
+
color: var(--textarea-placeholder-color);
|
|
193
|
+
content: attr(data-placeholder);
|
|
194
|
+
font-style: inherit;
|
|
195
|
+
left: 15px;
|
|
196
|
+
pointer-events: none;
|
|
197
|
+
position: absolute;
|
|
198
|
+
right: 15px;
|
|
199
|
+
}
|
|
184
200
|
}
|
|
185
201
|
}
|
|
186
202
|
|
|
@@ -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>
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<div
|
|
94
94
|
class="tw-bg-[#fbfdfe] tw-border tw-border-solid tw-border-[color:#bdd1df] tw-rounded-[2px] tw-flex tw-items-center tw-h-[28px] tw-box-border tw-px-2"
|
|
95
95
|
>
|
|
96
|
-
<span>{{
|
|
96
|
+
<span>{{ getOptionLabel(item.opt) }}</span>
|
|
97
97
|
<VcIcon
|
|
98
98
|
v-if="!disabled"
|
|
99
99
|
class="tw-text-[#a9bfd2] tw-ml-2 tw-cursor-pointer hover:tw-text-[color:var(--select-clear-color-hover)]"
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
|
|
256
256
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
257
257
|
<script lang="ts" setup generic="T, P extends {results?: T[]; totalCount?: number }">
|
|
258
|
-
import { ref, computed, watch, toRefs,
|
|
258
|
+
import { ref, computed, watch, nextTick, Ref, toRefs, MaybeRef, unref } from "vue";
|
|
259
259
|
import { vOnClickOutside } from "@vueuse/components";
|
|
260
260
|
import * as _ from "lodash-es";
|
|
261
261
|
import { useIntersectionObserver } from "@vueuse/core";
|
|
@@ -435,26 +435,6 @@ const props = withDefaults(
|
|
|
435
435
|
* @returns Label of the current option
|
|
436
436
|
*/
|
|
437
437
|
optionLabel?: OptionProp<Option>;
|
|
438
|
-
/**
|
|
439
|
-
* @requires optionValue
|
|
440
|
-
* @description Similar to optionValue, but used only for displaying selection result in rare cases. **Can't be used without optionValue**
|
|
441
|
-
*
|
|
442
|
-
* Property of option which holds the 'value'
|
|
443
|
-
* Default value: id
|
|
444
|
-
* @param option The current option being processed
|
|
445
|
-
* @returns Value of the current option
|
|
446
|
-
*/
|
|
447
|
-
displayValue?: OptionProp<Option>;
|
|
448
|
-
/**
|
|
449
|
-
* @requires optionLabel
|
|
450
|
-
* @description Similar to optionValue, but used only for displaying selection result in rare cases. **Can't be used without optionLabel**
|
|
451
|
-
*
|
|
452
|
-
* Property of option which holds the 'label'
|
|
453
|
-
* Default value: title
|
|
454
|
-
* @param option The current option being processed
|
|
455
|
-
* @returns Label of the current option
|
|
456
|
-
*/
|
|
457
|
-
displayLabel?: OptionProp<Option>;
|
|
458
438
|
/**
|
|
459
439
|
* Update model with the value of the selected option instead of the whole option
|
|
460
440
|
*/
|
|
@@ -500,15 +480,15 @@ const emit = defineEmits<{
|
|
|
500
480
|
* Emitted when the component needs to change the model; Is also used by v-model
|
|
501
481
|
*/
|
|
502
482
|
|
|
503
|
-
|
|
483
|
+
"update:modelValue": [inputValue: Option | string | (Option | string)[]];
|
|
504
484
|
/**
|
|
505
485
|
* Emitted when user wants to filter a value
|
|
506
486
|
*/
|
|
507
|
-
|
|
487
|
+
search: [inputValue: string];
|
|
508
488
|
/**
|
|
509
489
|
* Emitted when the select options list is hidden
|
|
510
490
|
*/
|
|
511
|
-
|
|
491
|
+
close: [];
|
|
512
492
|
}>();
|
|
513
493
|
|
|
514
494
|
const { t } = useI18n({ useScope: "global" });
|
|
@@ -648,10 +628,6 @@ const getOptionValue = computed(() => getPropValueFn(props.optionValue, "id"));
|
|
|
648
628
|
|
|
649
629
|
const getOptionLabel = computed(() => getPropValueFn(props.optionLabel, "title"));
|
|
650
630
|
|
|
651
|
-
const getDisplayValue = computed(() => getPropValueFn(props.displayValue, "id"));
|
|
652
|
-
|
|
653
|
-
const getDisplayLabel = computed(() => getPropValueFn(props.displayLabel, "title"));
|
|
654
|
-
|
|
655
631
|
const innerValue = computed((): Option[] => {
|
|
656
632
|
const mapNull = props.mapOptions === true && props.multiple !== true;
|
|
657
633
|
|
|
@@ -701,9 +677,7 @@ const selectedScope = computed(
|
|
|
701
677
|
|
|
702
678
|
const hasValue = computed(() => fieldValueIsFilled(innerValue.value));
|
|
703
679
|
|
|
704
|
-
const innerOptionsValue = computed(() =>
|
|
705
|
-
innerValue.value.map((opt) => getOptionValue.value(opt) || getDisplayValue.value(opt))
|
|
706
|
-
);
|
|
680
|
+
const innerOptionsValue = computed(() => innerValue.value.map((opt) => getOptionValue.value(opt)));
|
|
707
681
|
|
|
708
682
|
const optionScope = computed(() => {
|
|
709
683
|
return optionsTemp.value.map((opt, i) => {
|
|
@@ -711,7 +685,7 @@ const optionScope = computed(() => {
|
|
|
711
685
|
index: i,
|
|
712
686
|
opt,
|
|
713
687
|
selected: isOptionSelected(opt) === true,
|
|
714
|
-
label: getOptionLabel.value(opt)
|
|
688
|
+
label: getOptionLabel.value(opt),
|
|
715
689
|
toggleOption,
|
|
716
690
|
};
|
|
717
691
|
});
|
|
@@ -734,7 +708,7 @@ function getPropValueFn(propValue: OptionProp<Option>, defaultVal: OptionProp<Op
|
|
|
734
708
|
}
|
|
735
709
|
|
|
736
710
|
function getOption(value: Option, valueCache: Option[]) {
|
|
737
|
-
const fn = (opt) => _.isEqual(getOptionValue.value(opt), value)
|
|
711
|
+
const fn = (opt) => _.isEqual(getOptionValue.value(opt), value);
|
|
738
712
|
return defaultValue.value.find(fn) || optionsList.value.find(fn) || valueCache.find(fn) || value;
|
|
739
713
|
}
|
|
740
714
|
|
|
@@ -743,7 +717,7 @@ function fieldValueIsFilled(val: Option[]) {
|
|
|
743
717
|
}
|
|
744
718
|
|
|
745
719
|
function getEmittingOptionValue(opt: Option) {
|
|
746
|
-
return
|
|
720
|
+
return getOptionLabel.value(opt);
|
|
747
721
|
}
|
|
748
722
|
|
|
749
723
|
function removeAtIndex(index: number) {
|
|
@@ -759,7 +733,7 @@ function removeAtIndex(index: number) {
|
|
|
759
733
|
}
|
|
760
734
|
|
|
761
735
|
function isOptionSelected(opt: Option) {
|
|
762
|
-
const val = getOptionValue.value(opt)
|
|
736
|
+
const val = getOptionValue.value(opt);
|
|
763
737
|
|
|
764
738
|
return innerOptionsValue.value.find((v) => _.isEqual(v, val)) !== void 0;
|
|
765
739
|
}
|
|
@@ -833,7 +807,7 @@ function toggleOption(opt: Option) {
|
|
|
833
807
|
return;
|
|
834
808
|
}
|
|
835
809
|
|
|
836
|
-
const optValue = getOptionValue.value(opt)
|
|
810
|
+
const optValue = getOptionValue.value(opt);
|
|
837
811
|
|
|
838
812
|
if (props.multiple !== true) {
|
|
839
813
|
if (innerValue.value.length === 0 || _.isEqual(getOptionValue.value(innerValue.value[0]), optValue) !== true) {
|