@vc-shell/framework 1.0.110 → 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 +19 -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 +25286 -23535
- 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/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 +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/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 +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
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
notification,
|
|
26
26
|
BladePageComponent,
|
|
27
27
|
} from "../../../..";
|
|
28
|
-
import { bladeNavigationInstance } from "
|
|
28
|
+
import { bladeNavigationInstance } from "../../plugin";
|
|
29
29
|
import pattern from "url-pattern";
|
|
30
30
|
import { useLocalStorage } from "@vueuse/core";
|
|
31
31
|
|
|
@@ -64,11 +64,12 @@ const workspaceOptions: Ref<Record<string, any>> = ref();
|
|
|
64
64
|
const workspaceParam: Ref<string> = ref();
|
|
65
65
|
const activeBlade = ref();
|
|
66
66
|
const lastBladeData = useLocalStorage<BladeData>("VC_BLADE_DATA", {});
|
|
67
|
+
// const resolvedLastBlade = ref<BladePageComponent>();
|
|
67
68
|
|
|
68
69
|
export function useBladeNavigation(): IUseBladeNavigation {
|
|
69
70
|
const router = useRouter();
|
|
70
71
|
const urlPattern = new pattern("(/:workspace(/:blade(/:param)))");
|
|
71
|
-
const {
|
|
72
|
+
const { hasAccess } = usePermissions();
|
|
72
73
|
const isPrevented = ref(false);
|
|
73
74
|
const routes = router.getRoutes();
|
|
74
75
|
|
|
@@ -108,14 +109,27 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
108
109
|
const bladeComponent = unref(blade);
|
|
109
110
|
|
|
110
111
|
if (!isPrevented.value) {
|
|
111
|
-
workspaceOptions.value = unref(options);
|
|
112
|
-
workspaceParam.value = unref(param);
|
|
113
|
-
|
|
114
|
-
await nextTick();
|
|
115
112
|
await router.replace(bladeComponent.url);
|
|
113
|
+
|
|
114
|
+
await nextTick(() => {
|
|
115
|
+
workspaceOptions.value = unref(options);
|
|
116
|
+
workspaceParam.value = unref(param);
|
|
117
|
+
});
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
|
|
121
|
+
function isBladeComponent(
|
|
122
|
+
component: Omit<BladeComponentInternalInstance["vnode"]["type"], "__isFragment"> | BladeConstructor
|
|
123
|
+
) {
|
|
124
|
+
if (!instance) {
|
|
125
|
+
warn("isBladeComponent can only be used in setup().");
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const foundComponent = _.find(instance.appContext.components, component);
|
|
129
|
+
|
|
130
|
+
return foundComponent && "isBladeComponent" in foundComponent && !!foundComponent.isBladeComponent;
|
|
131
|
+
}
|
|
132
|
+
|
|
119
133
|
async function openBlade<Blade extends ComponentPublicInstance>(
|
|
120
134
|
{ blade, param, options, onOpen, onClose }: IBladeEvent<Blade>,
|
|
121
135
|
isWorkspace = false
|
|
@@ -128,12 +142,14 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
128
142
|
return;
|
|
129
143
|
}
|
|
130
144
|
|
|
145
|
+
await nextTick();
|
|
146
|
+
|
|
131
147
|
clearParentData();
|
|
132
148
|
|
|
133
149
|
// caller blade component
|
|
134
|
-
const instanceComponent =
|
|
135
|
-
|
|
136
|
-
(
|
|
150
|
+
const instanceComponent = isBladeComponent(instance.vnode.type)
|
|
151
|
+
? instance.vnode.type
|
|
152
|
+
: navigationInstance.bladesRefs.value.find((item) => item.active)?.blade?.blade;
|
|
137
153
|
|
|
138
154
|
if (instanceComponent) {
|
|
139
155
|
// Caller blade index in blades array
|
|
@@ -207,10 +223,9 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
207
223
|
await closeBlade(index);
|
|
208
224
|
}
|
|
209
225
|
|
|
210
|
-
if (blade &&
|
|
226
|
+
if (blade && hasAccess(blade.permissions)) {
|
|
211
227
|
navigationInstance.blades.value.push({
|
|
212
228
|
blade: markRaw(blade),
|
|
213
|
-
...resolveDynamicProps(blade),
|
|
214
229
|
options,
|
|
215
230
|
param,
|
|
216
231
|
onOpen,
|
|
@@ -228,21 +243,6 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
228
243
|
}
|
|
229
244
|
}
|
|
230
245
|
|
|
231
|
-
function resolveDynamicProps(blade: BladeConstructor) {
|
|
232
|
-
const routerRoutes = router.getRoutes();
|
|
233
|
-
|
|
234
|
-
const selectedRoute = routerRoutes.find((r) => r.path === blade.url);
|
|
235
|
-
|
|
236
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
|
-
const selectedRouteProps = selectedRoute?.props as Record<string, () => any>;
|
|
238
|
-
|
|
239
|
-
if (selectedRouteProps && "default" in selectedRouteProps && typeof selectedRouteProps.default === "function") {
|
|
240
|
-
return selectedRouteProps.default();
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
return {};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
246
|
async function onParentCall(index: number, args: IParentCallArgs) {
|
|
247
247
|
console.debug(`vc-app#onParentCall(${index}, { method: ${args.method} }) called.`);
|
|
248
248
|
|
|
@@ -312,11 +312,20 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
312
312
|
if (lastBladeData.value?.blade) {
|
|
313
313
|
const blade = pages?.find((b) => b.url === lastBladeData.value?.blade);
|
|
314
314
|
setParentData({ param: lastBladeData.value?.param });
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
|
|
316
|
+
if (!isBladeAlreadyOpened({ blade, param: lastBladeData.value?.param })) {
|
|
317
|
+
openBlade({ blade, param: lastBladeData.value?.param });
|
|
318
|
+
clearSavedBladeData();
|
|
319
|
+
}
|
|
317
320
|
}
|
|
318
321
|
}
|
|
319
322
|
|
|
323
|
+
function isBladeAlreadyOpened(args: { blade: BladePageComponent; param?: string }) {
|
|
324
|
+
return navigationInstance?.blades.value.some((x) => {
|
|
325
|
+
return x.blade === args.blade && x.param === args.param;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
320
329
|
function resolveBladeByName(name: string) {
|
|
321
330
|
if (!instance) {
|
|
322
331
|
warn("resolveComponentByName can only be used in setup().");
|
|
@@ -325,8 +334,6 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
325
334
|
if (!name) {
|
|
326
335
|
throw new Error("blade name is required");
|
|
327
336
|
}
|
|
328
|
-
|
|
329
|
-
console.log(instance.appContext.components);
|
|
330
337
|
const components = instance && instance.appContext.components;
|
|
331
338
|
return components[name] as BladeConstructor;
|
|
332
339
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { ComponentPublicInstance, VNode, ComponentInternalInstance, VNodeTypes, Ref } from "vue";
|
|
3
|
-
import { PushNotification } from "./../../../../core/api/platform";
|
|
4
3
|
|
|
5
|
-
export type BladeInstanceConstructor<T extends ComponentPublicInstance =
|
|
4
|
+
export type BladeInstanceConstructor<T extends ComponentPublicInstance = ComponentPublicInstance> = {
|
|
6
5
|
new (...args: any[]): T & { $: ComponentInternalInstance & { exposed: CoreBladeExposed & T["$"]["exposed"] } } & {
|
|
7
6
|
$props: T["$props"] & CoreBladeComponentProps;
|
|
8
7
|
};
|
|
9
|
-
} &
|
|
8
|
+
} & CoreComponentData &
|
|
9
|
+
CoreBladeAdditionalSettings &
|
|
10
10
|
CoreBladeNavigationData;
|
|
11
11
|
|
|
12
12
|
export type ComponentInstanceConstructor<T = any> = {
|
|
@@ -22,6 +22,10 @@ export type CoreBladeComponentProps = {
|
|
|
22
22
|
|
|
23
23
|
export type BladePageComponent = BladeConstructor;
|
|
24
24
|
|
|
25
|
+
export type CoreComponentData = {
|
|
26
|
+
isBladeComponent?: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
25
29
|
export type CoreBladeAdditionalSettings = {
|
|
26
30
|
url?: `/${string}`;
|
|
27
31
|
permissions?: string | string[];
|
|
@@ -3,6 +3,7 @@ import { NotificationOptions } from "../../types";
|
|
|
3
3
|
import { NotificationContainer } from "../../components";
|
|
4
4
|
import { useInstance } from "../useInstance";
|
|
5
5
|
import * as _ from "lodash-es";
|
|
6
|
+
import { generateId } from "../../../../../core/utilities";
|
|
6
7
|
|
|
7
8
|
interface PendingNotification {
|
|
8
9
|
notificationId: string | number;
|
|
@@ -104,10 +105,6 @@ export function useContainer(): IUseContainer {
|
|
|
104
105
|
});
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
function generateNotificationId() {
|
|
108
|
-
return Math.random().toString(36).substring(2, 9);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
108
|
const actions = {
|
|
112
109
|
add(options: NotificationOptions) {
|
|
113
110
|
if (!notificationContainer.value.find((item) => item.notificationId === options.notificationId)) {
|
|
@@ -185,6 +182,6 @@ export function useContainer(): IUseContainer {
|
|
|
185
182
|
getAllNotifications,
|
|
186
183
|
appendInstance,
|
|
187
184
|
getNotification,
|
|
188
|
-
generateNotificationId,
|
|
185
|
+
generateNotificationId: generateId,
|
|
189
186
|
};
|
|
190
187
|
}
|
|
@@ -28,11 +28,9 @@ export function usePopup<T = InstanceType<typeof VcPopup>["$props"]>(props?: May
|
|
|
28
28
|
async function open(customInstance?: UsePopupProps<unknown>) {
|
|
29
29
|
let activeInstance;
|
|
30
30
|
await nextTick();
|
|
31
|
-
console.log("popupInstance", popupInstance);
|
|
32
31
|
if (popupInstance) {
|
|
33
32
|
activeInstance = popupInstance;
|
|
34
33
|
}
|
|
35
|
-
console.log("activeInstance", activeInstance);
|
|
36
34
|
|
|
37
35
|
activeInstance.popups.push(rawPopup || customInstance);
|
|
38
36
|
}
|
|
@@ -126,8 +126,8 @@ export interface Props {
|
|
|
126
126
|
options?: {
|
|
127
127
|
asset: Asset;
|
|
128
128
|
disabled?: boolean;
|
|
129
|
-
assetEditHandler?: (defaultAsset: Asset) => void
|
|
130
|
-
assetRemoveHandler?: (defaultAsset: Asset) => void
|
|
129
|
+
assetEditHandler?: (defaultAsset: Asset) => Promise<void>;
|
|
130
|
+
assetRemoveHandler?: (defaultAsset: Asset) => Promise<void>;
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -170,9 +170,9 @@ const bladeToolbar = ref<IBladeToolbar[]>([
|
|
|
170
170
|
id: "save",
|
|
171
171
|
title: t("ASSETS.PAGES.DETAILS.TOOLBAR.SAVE"),
|
|
172
172
|
icon: "fas fa-save",
|
|
173
|
-
clickHandler() {
|
|
173
|
+
async clickHandler() {
|
|
174
174
|
if (props.options?.assetEditHandler && typeof props.options?.assetEditHandler === "function") {
|
|
175
|
-
props.options?.assetEditHandler(defaultAsset.value);
|
|
175
|
+
await props.options?.assetEditHandler(defaultAsset.value);
|
|
176
176
|
emit("close:blade");
|
|
177
177
|
}
|
|
178
178
|
},
|
|
@@ -182,9 +182,9 @@ const bladeToolbar = ref<IBladeToolbar[]>([
|
|
|
182
182
|
id: "delete",
|
|
183
183
|
title: t("ASSETS.PAGES.DETAILS.TOOLBAR.DELETE"),
|
|
184
184
|
icon: "fas fa-trash",
|
|
185
|
-
clickHandler() {
|
|
185
|
+
async clickHandler() {
|
|
186
186
|
if (props.options?.assetRemoveHandler && typeof props.options?.assetRemoveHandler === "function") {
|
|
187
|
-
props.options?.assetRemoveHandler(defaultAsset.value);
|
|
187
|
+
await props.options?.assetRemoveHandler(defaultAsset.value);
|
|
188
188
|
emit("close:blade");
|
|
189
189
|
}
|
|
190
190
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAppModule } from "../../../core/plugins/modularity";
|
|
2
2
|
import * as components from "./components";
|
|
3
3
|
import * as locales from "./locales";
|
|
4
4
|
|
|
@@ -9,6 +9,6 @@ declare module "@vue/runtime-core" {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const AssetsDetailsModule =
|
|
12
|
+
export const AssetsDetailsModule = createAppModule(components, locales);
|
|
13
13
|
|
|
14
14
|
export * from "./components";
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
@collapse="$emit('collapse:blade')"
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
|
+
v-loading="loading"
|
|
13
14
|
class="tw-relative tw-h-full"
|
|
14
15
|
@dragover.prevent.stop="dragOver"
|
|
15
16
|
@dragleave.prevent="dragLeave"
|
|
16
17
|
@drop.prevent.stop="onDrop"
|
|
17
18
|
>
|
|
18
|
-
<VcLoading :active="loading"></VcLoading>
|
|
19
19
|
<VcTable
|
|
20
20
|
:columns="columns"
|
|
21
21
|
:expanded="expanded"
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
import { Asset, IActionBuilderResult, IBladeToolbar, ITableColumns } from "../../../../../core/types";
|
|
146
146
|
import { ref, computed, onMounted, unref, watch, markRaw } from "vue";
|
|
147
147
|
import { useI18n } from "vue-i18n";
|
|
148
|
-
import { IParentCallArgs, useBladeNavigation } from "./../../../../../shared";
|
|
149
148
|
import moment from "moment";
|
|
150
149
|
import Assets from "./../../../assets/components/assets-details/assets-details.vue";
|
|
151
150
|
import { isImage, getFileThumbnail, readableSize } from "./../../../../utilities/assets";
|
|
152
151
|
import * as _ from "lodash-es";
|
|
152
|
+
import { IParentCallArgs, useBladeNavigation } from "../../../../components";
|
|
153
153
|
|
|
154
154
|
export interface Props {
|
|
155
155
|
expanded?: boolean;
|
|
@@ -340,7 +340,7 @@ function onItemClick(item: Asset) {
|
|
|
340
340
|
options: {
|
|
341
341
|
asset: unref(item),
|
|
342
342
|
disabled: readonly.value,
|
|
343
|
-
assetEditHandler: (asset: Asset) => {
|
|
343
|
+
assetEditHandler: async (asset: Asset) => {
|
|
344
344
|
const mutated = defaultAssets.value.map((x) => {
|
|
345
345
|
if (x.id === asset.id || x.url === asset.url) {
|
|
346
346
|
return asset;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAppModule } from "../../../core/plugins/modularity";
|
|
2
2
|
import * as components from "./components";
|
|
3
3
|
import * as locales from "./locales";
|
|
4
4
|
|
|
@@ -9,6 +9,6 @@ declare module "@vue/runtime-core" {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const AssetsManagerModule =
|
|
12
|
+
export const AssetsManagerModule = createAppModule(components, locales);
|
|
13
13
|
|
|
14
14
|
export * from "./components";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import SelectField from "./fields/SelectField";
|
|
2
|
+
import Card from "./fields/Card";
|
|
3
|
+
import InputField from "./fields/InputField";
|
|
4
|
+
import Fieldset from "./fields/Fieldset";
|
|
5
|
+
import InputCurrency from "./fields/InputCurrency";
|
|
6
|
+
import Checkbox from "./fields/Checkbox";
|
|
7
|
+
import DynamicProperty from "./fields/DynamicProperty";
|
|
8
|
+
import EditorField from "./fields/EditorField";
|
|
9
|
+
import GalleryField from "./fields/GalleryField";
|
|
10
|
+
import Button from "./fields/Button";
|
|
11
|
+
import StatusField from "./fields/StatusField";
|
|
12
|
+
|
|
13
|
+
const FIELD_MAP = {
|
|
14
|
+
"vc-select": SelectField,
|
|
15
|
+
"vc-card": Card,
|
|
16
|
+
"vc-input": InputField,
|
|
17
|
+
"vc-fieldset": Fieldset,
|
|
18
|
+
"vc-input-currency": InputCurrency,
|
|
19
|
+
"vc-checkbox": Checkbox,
|
|
20
|
+
"vc-dynamic-properties": DynamicProperty,
|
|
21
|
+
"vc-editor": EditorField,
|
|
22
|
+
"vc-gallery": GalleryField,
|
|
23
|
+
"vc-button": Button,
|
|
24
|
+
"vc-status": StatusField,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default FIELD_MAP;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { PropType, ref, toRefs, watch, ExtractPropTypes, h, VNode, defineComponent, UnwrapNestedRefs } from "vue";
|
|
3
|
+
import { ControlSchema } from "../types";
|
|
4
|
+
import * as _ from "lodash-es";
|
|
5
|
+
import { DetailsBladeContext } from "../factories/types";
|
|
6
|
+
import { nodeBuilder } from "../helpers/nodeBuilder";
|
|
7
|
+
|
|
8
|
+
const schemeRenderProps = {
|
|
9
|
+
context: {
|
|
10
|
+
type: Object as PropType<UnwrapNestedRefs<DetailsBladeContext>>,
|
|
11
|
+
default: () => ({}),
|
|
12
|
+
},
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: Object as PropType<Record<string, any>>,
|
|
15
|
+
required: true,
|
|
16
|
+
default: () => ({}),
|
|
17
|
+
},
|
|
18
|
+
uiSchema: {
|
|
19
|
+
type: Array as PropType<ControlSchema[]>,
|
|
20
|
+
required: true,
|
|
21
|
+
default: () => [],
|
|
22
|
+
},
|
|
23
|
+
currentLocale: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: undefined,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
name: "SchemaRender",
|
|
31
|
+
props: schemeRenderProps,
|
|
32
|
+
emits: ["update:modelValue"],
|
|
33
|
+
setup(props: ExtractPropTypes<typeof schemeRenderProps>, ctx) {
|
|
34
|
+
const { currentLocale } = toRefs(props);
|
|
35
|
+
const internalFormData = ref();
|
|
36
|
+
|
|
37
|
+
watch(
|
|
38
|
+
() => props.modelValue,
|
|
39
|
+
(newVal) => {
|
|
40
|
+
if (!_.isEqual(internalFormData.value, newVal)) {
|
|
41
|
+
internalFormData.value = newVal;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{ deep: true, immediate: true }
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
watch(
|
|
48
|
+
internalFormData,
|
|
49
|
+
(newVal) => {
|
|
50
|
+
if (!_.isEqual(newVal, props.modelValue)) {
|
|
51
|
+
emitChange(newVal);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{ deep: true }
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
function emitChange(newVal) {
|
|
58
|
+
ctx.emit("update:modelValue", newVal);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return () =>
|
|
62
|
+
h(
|
|
63
|
+
"div",
|
|
64
|
+
{ class: "tw-flex tw-flex-col tw-gap-4" },
|
|
65
|
+
props.uiSchema.reduce(
|
|
66
|
+
(arr, field): VNode[] => [
|
|
67
|
+
...arr,
|
|
68
|
+
nodeBuilder({
|
|
69
|
+
controlSchema: field,
|
|
70
|
+
parentId: field.id,
|
|
71
|
+
internalContext: internalFormData.value,
|
|
72
|
+
bladeContext: props.context,
|
|
73
|
+
currentLocale: currentLocale.value,
|
|
74
|
+
formData: internalFormData.value,
|
|
75
|
+
}),
|
|
76
|
+
],
|
|
77
|
+
[]
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
},
|
|
81
|
+
});
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { markRaw } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
VcButton,
|
|
5
|
+
VcCard,
|
|
6
|
+
VcCheckbox,
|
|
7
|
+
VcDynamicProperty,
|
|
8
|
+
VcEditor,
|
|
9
|
+
VcGallery,
|
|
10
|
+
VcInput,
|
|
11
|
+
VcInputCurrency,
|
|
12
|
+
VcSelect,
|
|
13
|
+
VcStatus,
|
|
14
|
+
} from "../../../../ui/components";
|
|
15
|
+
import {
|
|
16
|
+
IControlBaseProps,
|
|
17
|
+
ISelectField,
|
|
18
|
+
IInputField,
|
|
19
|
+
ICardCollection,
|
|
20
|
+
IEditorField,
|
|
21
|
+
IGallery,
|
|
22
|
+
IDynamicProperties,
|
|
23
|
+
ICheckbox,
|
|
24
|
+
IButton,
|
|
25
|
+
IInputCurrency,
|
|
26
|
+
IFieldset,
|
|
27
|
+
IControlBaseOptions,
|
|
28
|
+
IStatusField,
|
|
29
|
+
} from "../types/models";
|
|
30
|
+
|
|
31
|
+
export const ControlBase = ({ visibility = undefined }: IControlBaseOptions): IControlBaseOptions => ({
|
|
32
|
+
visibility,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const ControlBaseProps = ({
|
|
36
|
+
rules = undefined,
|
|
37
|
+
label = undefined,
|
|
38
|
+
placeholder = undefined,
|
|
39
|
+
disabled = false,
|
|
40
|
+
required = false,
|
|
41
|
+
name = undefined,
|
|
42
|
+
classNames = undefined,
|
|
43
|
+
tooltip = undefined,
|
|
44
|
+
key = undefined,
|
|
45
|
+
...rest
|
|
46
|
+
}: IControlBaseProps): IControlBaseProps => ({
|
|
47
|
+
key,
|
|
48
|
+
rules,
|
|
49
|
+
label,
|
|
50
|
+
placeholder,
|
|
51
|
+
disabled,
|
|
52
|
+
required,
|
|
53
|
+
name,
|
|
54
|
+
classNames,
|
|
55
|
+
tooltip,
|
|
56
|
+
...rest,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const SelectField = ({ props, slots, options }: Partial<ISelectField>): ISelectField => ({
|
|
60
|
+
component: markRaw(VcSelect) as any,
|
|
61
|
+
props: {
|
|
62
|
+
...ControlBaseProps(props),
|
|
63
|
+
...props,
|
|
64
|
+
},
|
|
65
|
+
options: ControlBase(options),
|
|
66
|
+
slots,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const StatusField = ({ props, slots, options }: Partial<IStatusField>): IStatusField => ({
|
|
70
|
+
component: markRaw(VcStatus),
|
|
71
|
+
props: {
|
|
72
|
+
...ControlBaseProps(props),
|
|
73
|
+
...props,
|
|
74
|
+
},
|
|
75
|
+
options: ControlBase(options),
|
|
76
|
+
slots,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const InputField = ({ props, options }: Partial<IInputField>): IInputField => ({
|
|
80
|
+
component: markRaw(VcInput),
|
|
81
|
+
props: {
|
|
82
|
+
...ControlBaseProps(props),
|
|
83
|
+
...props,
|
|
84
|
+
},
|
|
85
|
+
options: ControlBase(options),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const InputCurrency = ({ props, options }: Partial<IInputCurrency>): IInputCurrency => ({
|
|
89
|
+
component: markRaw(VcInputCurrency),
|
|
90
|
+
props: {
|
|
91
|
+
...ControlBaseProps(props),
|
|
92
|
+
...props,
|
|
93
|
+
},
|
|
94
|
+
options: ControlBase(options),
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export const CardCollection = ({ props, options, slots }: Partial<ICardCollection>): ICardCollection => ({
|
|
98
|
+
component: markRaw(VcCard),
|
|
99
|
+
props: {
|
|
100
|
+
...props,
|
|
101
|
+
...ControlBaseProps(props),
|
|
102
|
+
},
|
|
103
|
+
options: ControlBase(options),
|
|
104
|
+
slots,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export const DynamicProperties = ({ props, options }: Partial<IDynamicProperties>): IDynamicProperties => ({
|
|
108
|
+
component: markRaw(VcDynamicProperty) as any,
|
|
109
|
+
props: {
|
|
110
|
+
...props,
|
|
111
|
+
...ControlBaseProps(props),
|
|
112
|
+
},
|
|
113
|
+
options: ControlBase(options),
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export const EditorField = ({ props, options }: Partial<IEditorField>): IEditorField => ({
|
|
117
|
+
component: markRaw(VcEditor),
|
|
118
|
+
props: {
|
|
119
|
+
...ControlBaseProps(props),
|
|
120
|
+
...props,
|
|
121
|
+
},
|
|
122
|
+
options: ControlBase(options),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
export const Gallery = ({ props, options }: Partial<IGallery>): IGallery => ({
|
|
126
|
+
component: markRaw(VcGallery),
|
|
127
|
+
props: {
|
|
128
|
+
...ControlBaseProps(props),
|
|
129
|
+
...props,
|
|
130
|
+
},
|
|
131
|
+
options: ControlBase(options),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export const Checkbox = ({ props, options, slots }: Partial<ICheckbox>): ICheckbox => ({
|
|
135
|
+
component: markRaw(VcCheckbox),
|
|
136
|
+
props: {
|
|
137
|
+
...ControlBaseProps(props),
|
|
138
|
+
...props,
|
|
139
|
+
},
|
|
140
|
+
options: ControlBase(options),
|
|
141
|
+
slots,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export const Button = ({ props, options, slots }: Partial<IButton>): IButton => ({
|
|
145
|
+
component: markRaw(VcButton),
|
|
146
|
+
props: {
|
|
147
|
+
...ControlBaseProps(props),
|
|
148
|
+
...props,
|
|
149
|
+
},
|
|
150
|
+
options: ControlBase(options),
|
|
151
|
+
slots,
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
export const Fieldset = ({ columns, fields, property, remove }: IFieldset): IFieldset => ({
|
|
155
|
+
columns,
|
|
156
|
+
fields,
|
|
157
|
+
property,
|
|
158
|
+
remove,
|
|
159
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ExtractPropTypes, h, unref } from "vue";
|
|
2
|
+
import { Button } from "../factories";
|
|
3
|
+
import componentProps from "./props";
|
|
4
|
+
import { ButtonSchema } from "../../types";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
name: "ButtonEl",
|
|
8
|
+
props: componentProps,
|
|
9
|
+
setup(props: ExtractPropTypes<typeof componentProps> & { element: ButtonSchema }) {
|
|
10
|
+
return () => {
|
|
11
|
+
const field = Button({
|
|
12
|
+
props: {
|
|
13
|
+
...props.baseProps,
|
|
14
|
+
small: props.element.small,
|
|
15
|
+
icon: props.element?.icon,
|
|
16
|
+
iconSize: props.element?.iconSize,
|
|
17
|
+
text: props.element?.text,
|
|
18
|
+
onClick: () => {
|
|
19
|
+
unref(props.bladeContext.scope)[props.element.method]();
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
options: props.baseOptions,
|
|
23
|
+
slots: {
|
|
24
|
+
default: () => props.element.content,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return props.baseOptions.visibility ? h(field.component, field.props, field.slots) : null;
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ExtractPropTypes, computed, h, toValue, VNodeChild, VNodeNormalizedChildren, watch, VNode } from "vue";
|
|
2
|
+
import { CardCollection } from "../factories";
|
|
3
|
+
import componentProps from "./props";
|
|
4
|
+
import { CardSchema } from "../../types";
|
|
5
|
+
import { nodeBuilder } from "../../helpers/nodeBuilder";
|
|
6
|
+
import { useMounted } from "@vueuse/core";
|
|
7
|
+
import * as _ from "lodash-es";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: "CardEl",
|
|
11
|
+
props: componentProps,
|
|
12
|
+
setup(props: ExtractPropTypes<typeof componentProps> & { element: CardSchema }) {
|
|
13
|
+
const isMounted = useMounted();
|
|
14
|
+
|
|
15
|
+
const commentRecursiveNodeCheck = (node: VNodeChild | VNodeNormalizedChildren) => {
|
|
16
|
+
return _.every(Array.isArray(node) ? node : [node], (nodeItem) => {
|
|
17
|
+
if (typeof nodeItem === "object") {
|
|
18
|
+
if (
|
|
19
|
+
"children" in nodeItem &&
|
|
20
|
+
nodeItem.children &&
|
|
21
|
+
Array.isArray(nodeItem.children) &&
|
|
22
|
+
!!nodeItem.children.length
|
|
23
|
+
) {
|
|
24
|
+
return commentRecursiveNodeCheck(nodeItem.children);
|
|
25
|
+
}
|
|
26
|
+
if (
|
|
27
|
+
"el" in nodeItem &&
|
|
28
|
+
nodeItem.el &&
|
|
29
|
+
"nodeType" in (nodeItem.el as VNode["el"]) &&
|
|
30
|
+
(nodeItem.el as VNode["el"]).nodeType
|
|
31
|
+
) {
|
|
32
|
+
return (nodeItem.el as VNode["el"]).nodeType !== 8;
|
|
33
|
+
} else return true;
|
|
34
|
+
} else return true;
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const isNotEmpty = computed(() => {
|
|
39
|
+
if (isMounted.value) {
|
|
40
|
+
const fields = toValue(props.fields);
|
|
41
|
+
if (fields && Array.isArray(fields) && fields.length) {
|
|
42
|
+
return _.every(fields, (w) => commentRecursiveNodeCheck(w));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return () => {
|
|
49
|
+
const field = CardCollection({
|
|
50
|
+
props: {
|
|
51
|
+
...props.baseProps,
|
|
52
|
+
header: props.element.label,
|
|
53
|
+
isCollapsable: props.element.collapsible,
|
|
54
|
+
isCollapsed: restoreCollapsed(props.element.id),
|
|
55
|
+
"onState:collapsed": (e) => handleCollapsed(props.element.id, e),
|
|
56
|
+
},
|
|
57
|
+
options: props.baseOptions,
|
|
58
|
+
|
|
59
|
+
slots: {
|
|
60
|
+
default: () => h("div", { class: "tw-flex tw-flex-col tw-p-4 tw-gap-4" }, toValue(props.fields)),
|
|
61
|
+
actions: () => {
|
|
62
|
+
const elem = nodeBuilder({
|
|
63
|
+
controlSchema: props.element.action,
|
|
64
|
+
parentId: `${props.element.id}`,
|
|
65
|
+
internalContext: props.fieldContext,
|
|
66
|
+
bladeContext: props.bladeContext,
|
|
67
|
+
currentLocale: props.currentLocale,
|
|
68
|
+
formData: props.formData,
|
|
69
|
+
});
|
|
70
|
+
return elem;
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
function handleCollapsed(key: string, value: boolean): void {
|
|
76
|
+
localStorage?.setItem(key, `${value}`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function restoreCollapsed(key: string): boolean {
|
|
80
|
+
return localStorage?.getItem(key) === "true";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return props.baseOptions.visibility && isNotEmpty.value ? h(field.component, field.props, field.slots) : null;
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
};
|