@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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as _ from "lodash-es";
|
|
2
|
+
import { DynamicSchema, OverridesSchema, OverridesUpsert } from "../types";
|
|
3
|
+
|
|
4
|
+
export const handleOverrides = (overrides, schemaCopy: { [key: string]: DynamicSchema }) => {
|
|
5
|
+
let schema = _.cloneDeep(schemaCopy);
|
|
6
|
+
|
|
7
|
+
// REMOVE
|
|
8
|
+
if (overrides.remove && overrides.remove.length > 0) {
|
|
9
|
+
schema = removeHelper(overrides, schema);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// UPSERT
|
|
13
|
+
if (overrides.upsert && overrides.upsert.length > 0) {
|
|
14
|
+
schema = upsertHelper(overrides, schema);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return schema;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const upsertHelper = (overrides: OverridesSchema, schemaCopy: { [key: string]: DynamicSchema }) => {
|
|
21
|
+
return Object.entries(schemaCopy).reduce((obj, [name, schema]) => {
|
|
22
|
+
const clonedSchema = _.cloneDeep(schema);
|
|
23
|
+
overrides.upsert
|
|
24
|
+
.filter((x) => clonedSchema.settings.id === x.id)
|
|
25
|
+
.forEach(
|
|
26
|
+
({
|
|
27
|
+
index,
|
|
28
|
+
path,
|
|
29
|
+
value,
|
|
30
|
+
id: overrideId,
|
|
31
|
+
}: {
|
|
32
|
+
index: OverridesUpsert["index"];
|
|
33
|
+
path: OverridesUpsert["path"];
|
|
34
|
+
value: OverridesUpsert["value"];
|
|
35
|
+
id: OverridesUpsert["id"];
|
|
36
|
+
}) => {
|
|
37
|
+
const valueByPath = _.get(clonedSchema, path);
|
|
38
|
+
if (Array.isArray(valueByPath) && valueByPath.length && typeof value === "object") {
|
|
39
|
+
const findIndex = _.findIndex(valueByPath, { id: value.id });
|
|
40
|
+
|
|
41
|
+
const spliced = valueByPath /* @ts-ignore */
|
|
42
|
+
.toSpliced(findIndex >= 0 ? findIndex : index, findIndex >= 0 ? 1 : 0, value);
|
|
43
|
+
_.set(clonedSchema, path, spliced);
|
|
44
|
+
} else {
|
|
45
|
+
_.set(clonedSchema, path, value);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{}
|
|
49
|
+
);
|
|
50
|
+
obj[name] = clonedSchema;
|
|
51
|
+
return obj;
|
|
52
|
+
}, {});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const removeHelper = (overrides, schemaCopy: { [key: string]: DynamicSchema }) => {
|
|
56
|
+
return Object.entries(schemaCopy).reduce((obj, [name, schema]) => {
|
|
57
|
+
const clonedSchema = _.cloneDeep(schema);
|
|
58
|
+
overrides.remove
|
|
59
|
+
.filter((x) => clonedSchema.settings.id === x.id)
|
|
60
|
+
.forEach(({ path, id: overrideId }) => {
|
|
61
|
+
if (path) {
|
|
62
|
+
const parentPath = path.slice(0, path.lastIndexOf("["));
|
|
63
|
+
_.unset(clonedSchema, path);
|
|
64
|
+
_.update(clonedSchema, parentPath, _.compact);
|
|
65
|
+
}
|
|
66
|
+
}, {});
|
|
67
|
+
obj[name] = clonedSchema;
|
|
68
|
+
return obj;
|
|
69
|
+
}, {});
|
|
70
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import * as _ from "lodash-es";
|
|
3
|
+
|
|
4
|
+
function setModel(args: {
|
|
5
|
+
property: string;
|
|
6
|
+
value: string | number | Record<string, any>;
|
|
7
|
+
option?: string;
|
|
8
|
+
context: Record<string, any>;
|
|
9
|
+
}) {
|
|
10
|
+
const { property, value, option, context } = args;
|
|
11
|
+
|
|
12
|
+
_.set(context, property, option ? value[option] : value);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { setModel };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { IBladeToolbar } from "../../../../core/types";
|
|
3
|
+
import * as _ from "lodash-es";
|
|
4
|
+
import { UnwrapNestedRefs, computed, ref, ComputedRef } from "vue";
|
|
5
|
+
import { SettingsBase } from "../types";
|
|
6
|
+
import { BaseBladeScope, DetailsBladeContext, ListBladeContext } from "../factories/types";
|
|
7
|
+
|
|
8
|
+
export const toolbarReducer = (args: {
|
|
9
|
+
defaultToolbarSchema: SettingsBase["toolbar"];
|
|
10
|
+
defaultToolbarBindings: BaseBladeScope["toolbarOverrides"];
|
|
11
|
+
customToolbarConfig: BaseBladeScope["toolbarOverrides"];
|
|
12
|
+
context: UnwrapNestedRefs<DetailsBladeContext> | UnwrapNestedRefs<ListBladeContext>;
|
|
13
|
+
}): UnwrapNestedRefs<ComputedRef<IBladeToolbar[]>> => {
|
|
14
|
+
if (!args) return;
|
|
15
|
+
const toolbarMethodsMerge = _.merge(ref({}), ref(args.defaultToolbarBindings), ref(args.customToolbarConfig));
|
|
16
|
+
return computed(() =>
|
|
17
|
+
args.defaultToolbarSchema.reduce((acc, curr) => {
|
|
18
|
+
const toolbarItemCtx = toolbarMethodsMerge.value[curr.method];
|
|
19
|
+
if (toolbarItemCtx) {
|
|
20
|
+
const context =
|
|
21
|
+
typeof toolbarItemCtx === "function"
|
|
22
|
+
? {
|
|
23
|
+
clickHandler: async () => await (toolbarItemCtx as (ctx: typeof args.context) => any)(args.context),
|
|
24
|
+
}
|
|
25
|
+
: {
|
|
26
|
+
...toolbarItemCtx,
|
|
27
|
+
clickHandler() {
|
|
28
|
+
return toolbarItemCtx.clickHandler.call(null, args.context);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
acc.push({
|
|
33
|
+
...curr,
|
|
34
|
+
...context,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return acc;
|
|
39
|
+
}, [])
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { unref } from "vue";
|
|
2
|
+
|
|
3
|
+
export function unrefNested<T>(field: T) {
|
|
4
|
+
const unreffedProps = {} as T;
|
|
5
|
+
|
|
6
|
+
if (field) {
|
|
7
|
+
Object.keys(field).forEach((key) => {
|
|
8
|
+
unreffedProps[key] = unref(field[key]);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
return unreffedProps;
|
|
12
|
+
}
|
|
13
|
+
return field;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getModel } from "./getters";
|
|
2
|
+
|
|
3
|
+
function unwrapInterpolation<T>(property: string, context: T) {
|
|
4
|
+
const pattern = /{(.*)}/g;
|
|
5
|
+
|
|
6
|
+
const match = property.match(pattern);
|
|
7
|
+
|
|
8
|
+
if (match !== null) {
|
|
9
|
+
return getModel(property.replace(/{|}/g, ""), context);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return property;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { unwrapInterpolation };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import * as pages from "./pages";
|
|
3
|
+
import { App, Component, DefineComponent, defineComponent } from "vue";
|
|
4
|
+
import { DynamicSchema, OverridesSchema } from "./types";
|
|
5
|
+
import * as _ from "lodash-es";
|
|
6
|
+
import { handleOverrides } from "./helpers/override";
|
|
7
|
+
import { reactiveComputed } from "@vueuse/core";
|
|
8
|
+
import { kebabToPascal } from "../../../core/utilities";
|
|
9
|
+
import { BladeConstructor } from "../../index";
|
|
10
|
+
import { createAppModule } from "../../../core/plugins";
|
|
11
|
+
import { BladeMenu, NavigationMenu } from "../../../core/types";
|
|
12
|
+
|
|
13
|
+
interface Registered {
|
|
14
|
+
component: BladeConstructor;
|
|
15
|
+
name: string;
|
|
16
|
+
model: DynamicSchema;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const createAppModuleWrapper = (args: {
|
|
20
|
+
bladeName: string;
|
|
21
|
+
bladeComponent: BladeConstructor;
|
|
22
|
+
appModuleContent: {
|
|
23
|
+
locales?: { [key: string]: object };
|
|
24
|
+
notificationTemplates?: { [key: string]: Component };
|
|
25
|
+
moduleComponents?: { [key: string]: Component };
|
|
26
|
+
};
|
|
27
|
+
}) => {
|
|
28
|
+
const { bladeName, bladeComponent, appModuleContent } = args;
|
|
29
|
+
return createAppModule(
|
|
30
|
+
{ [bladeName]: bladeComponent },
|
|
31
|
+
appModuleContent?.locales,
|
|
32
|
+
appModuleContent?.notificationTemplates,
|
|
33
|
+
appModuleContent?.moduleComponents
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const register = (
|
|
38
|
+
args: {
|
|
39
|
+
app: App;
|
|
40
|
+
component: BladeConstructor;
|
|
41
|
+
composables: { [key: string]: (...args: any[]) => any };
|
|
42
|
+
json: DynamicSchema;
|
|
43
|
+
options?: { router: any };
|
|
44
|
+
},
|
|
45
|
+
appModuleContent: {
|
|
46
|
+
locales?: { [key: string]: object };
|
|
47
|
+
notificationTemplates?: { [key: string]: Component };
|
|
48
|
+
moduleComponents?: { [key: string]: Component };
|
|
49
|
+
}
|
|
50
|
+
): Registered => {
|
|
51
|
+
const { app, component, json, options } = args;
|
|
52
|
+
const bladeComponent = _.cloneDeep(component);
|
|
53
|
+
let rawUrl: `/${string}`;
|
|
54
|
+
|
|
55
|
+
const bladeName = kebabToPascal(json.settings.id);
|
|
56
|
+
|
|
57
|
+
if (json.settings.url) {
|
|
58
|
+
rawUrl = json.settings.url as `/${string}`;
|
|
59
|
+
bladeComponent.url = rawUrl;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (json.settings.permissions) {
|
|
63
|
+
bladeComponent.permissions = json.settings.permissions;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const defineBladeComponent = defineComponent({
|
|
67
|
+
...bladeComponent,
|
|
68
|
+
name: bladeName,
|
|
69
|
+
setup: (props, ctx) =>
|
|
70
|
+
(bladeComponent as DefineComponent).setup(
|
|
71
|
+
reactiveComputed(() => ({
|
|
72
|
+
...props,
|
|
73
|
+
model: json,
|
|
74
|
+
composables: args.composables,
|
|
75
|
+
})),
|
|
76
|
+
reactiveComputed(() => ctx)
|
|
77
|
+
),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const module = createAppModuleWrapper({
|
|
81
|
+
bladeName,
|
|
82
|
+
bladeComponent: defineBladeComponent,
|
|
83
|
+
appModuleContent,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
module.install(app, options);
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
component: defineBladeComponent,
|
|
90
|
+
name: bladeName,
|
|
91
|
+
model: json,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleError = (errorKey: string, schema: { [key: string]: DynamicSchema }, text?: string) => {
|
|
96
|
+
console.error(
|
|
97
|
+
`Module initialization aborted. '${errorKey}' key not found in files: ${Object.keys(schema).join(
|
|
98
|
+
", "
|
|
99
|
+
)}. '${errorKey}' key ${text}`
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const createDynamicAppModule = <T extends BladeMenu>(args: {
|
|
104
|
+
schema: { [key: string]: DynamicSchema };
|
|
105
|
+
composables: { [key: string]: (...args: any[]) => any };
|
|
106
|
+
menuConfig?: { [I in keyof T]: NavigationMenu<T[I]> };
|
|
107
|
+
overrides?: OverridesSchema;
|
|
108
|
+
moduleComponents?: { [key: string]: Component };
|
|
109
|
+
locales?: { [key: string]: object };
|
|
110
|
+
notificationTemplates?: { [key: string]: Component };
|
|
111
|
+
}) => {
|
|
112
|
+
const moduleInitializer = _.findKey(args.schema, (o) => "isWorkspace" in o.settings && o.settings.isWorkspace);
|
|
113
|
+
const everyHasTemplate = _.every(Object.values(args.schema), (o) => o.settings.component);
|
|
114
|
+
|
|
115
|
+
if (!everyHasTemplate) handleError("component", args.schema, "must be included in 'settings' of every file");
|
|
116
|
+
if (!moduleInitializer)
|
|
117
|
+
handleError(
|
|
118
|
+
"isWorkspace",
|
|
119
|
+
args.schema,
|
|
120
|
+
"must be included in one of this files to initialize module workspace blade"
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
if (moduleInitializer && everyHasTemplate) {
|
|
124
|
+
let schemaCopy = _.cloneDeep({ ...args.schema });
|
|
125
|
+
|
|
126
|
+
if (args.overrides) {
|
|
127
|
+
schemaCopy = handleOverrides(args.overrides, schemaCopy);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
install(app: App, options: { router: any }) {
|
|
132
|
+
const bladePages = { ...pages };
|
|
133
|
+
const appModuleContent = {
|
|
134
|
+
locales: args?.locales,
|
|
135
|
+
notificationTemplates: args?.notificationTemplates,
|
|
136
|
+
moduleComponents: args?.moduleComponents,
|
|
137
|
+
};
|
|
138
|
+
Object.entries(schemaCopy).forEach(([JsonName, JsonSchema], index) => {
|
|
139
|
+
const blade = register(
|
|
140
|
+
{
|
|
141
|
+
app,
|
|
142
|
+
component: bladePages[JsonSchema.settings.component],
|
|
143
|
+
composables: { ...args.composables },
|
|
144
|
+
json: JsonSchema,
|
|
145
|
+
options,
|
|
146
|
+
},
|
|
147
|
+
index === 0 ? appModuleContent : undefined
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
if (!blade) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export * from "./pages";
|
|
160
|
+
export * from "./composables";
|
|
161
|
+
export * from "./components";
|
|
162
|
+
export * from "./factories";
|
|
163
|
+
export * from "./types";
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VcBlade
|
|
3
|
+
v-loading="loading"
|
|
4
|
+
:expanded="expanded"
|
|
5
|
+
:closable="closable"
|
|
6
|
+
width="50%"
|
|
7
|
+
:toolbar-items="toolbarComputed"
|
|
8
|
+
:title="title"
|
|
9
|
+
@close="$emit('close:blade')"
|
|
10
|
+
@expand="$emit('expand:blade')"
|
|
11
|
+
@collapse="$emit('collapse:blade')"
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-if="bladeOptions"
|
|
15
|
+
#actions
|
|
16
|
+
>
|
|
17
|
+
<div class="tw-flex tw-flex-row tw-items-center tw-gap-3">
|
|
18
|
+
<template
|
|
19
|
+
v-for="(value, key, index) in bladeOptions"
|
|
20
|
+
:key="`blade-actions-slot-${key}-${index}`"
|
|
21
|
+
>
|
|
22
|
+
<component :is="value" />
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<VcContainer :no-padding="true">
|
|
28
|
+
<div
|
|
29
|
+
v-if="isReady && item && Object.keys(item)"
|
|
30
|
+
class="item-details__inner"
|
|
31
|
+
>
|
|
32
|
+
<div class="item-details__content">
|
|
33
|
+
<VcForm class="tw-grow tw-p-4">
|
|
34
|
+
<SchemaRender
|
|
35
|
+
v-model="item"
|
|
36
|
+
:ui-schema="form.children"
|
|
37
|
+
:context="bladeContext"
|
|
38
|
+
:current-locale="scope.multilanguage?.currentLocale"
|
|
39
|
+
></SchemaRender>
|
|
40
|
+
</VcForm>
|
|
41
|
+
</div>
|
|
42
|
+
<div
|
|
43
|
+
v-if="bladeWidgets && bladeWidgets.length"
|
|
44
|
+
class="item-details__widgets"
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
v-for="(item, index) in bladeWidgets"
|
|
48
|
+
:key="index"
|
|
49
|
+
>
|
|
50
|
+
<component
|
|
51
|
+
:is="item"
|
|
52
|
+
v-model="bladeContext"
|
|
53
|
+
></component>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</VcContainer>
|
|
58
|
+
</VcBlade>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script lang="ts" setup>
|
|
62
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
63
|
+
import { useI18n } from "vue-i18n";
|
|
64
|
+
import {
|
|
65
|
+
computed,
|
|
66
|
+
h,
|
|
67
|
+
nextTick,
|
|
68
|
+
reactive,
|
|
69
|
+
ref,
|
|
70
|
+
resolveComponent,
|
|
71
|
+
toValue,
|
|
72
|
+
unref,
|
|
73
|
+
watch,
|
|
74
|
+
onBeforeMount,
|
|
75
|
+
UnwrapRef,
|
|
76
|
+
} from "vue";
|
|
77
|
+
import { DynamicDetailsSchema, FormContentSchema } from "../types";
|
|
78
|
+
import { reactiveComputed } from "@vueuse/core";
|
|
79
|
+
import * as _ from "lodash-es";
|
|
80
|
+
import { IBladeToolbar } from "../../../../core/types";
|
|
81
|
+
import { DetailsBladeContext, DetailsBaseBladeScope, IParentCallArgs, UseDetails, usePopup } from "../../../index";
|
|
82
|
+
import SchemaRender from "../components/SchemaRender";
|
|
83
|
+
import { VcSelect } from "../../../../ui/components";
|
|
84
|
+
import { toolbarReducer } from "../helpers/toolbarReducer";
|
|
85
|
+
|
|
86
|
+
interface Props {
|
|
87
|
+
expanded?: boolean;
|
|
88
|
+
closable?: boolean;
|
|
89
|
+
param?: string;
|
|
90
|
+
model?: DynamicDetailsSchema;
|
|
91
|
+
options?: {
|
|
92
|
+
[x: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
composables?: Record<string, (...args: any[]) => Record<string, any>>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface Emits {
|
|
98
|
+
(event: "parent:call", args: IParentCallArgs): void;
|
|
99
|
+
(event: "close:blade"): void;
|
|
100
|
+
(event: "collapse:blade"): void;
|
|
101
|
+
(event: "expand:blade"): void;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
105
|
+
expanded: true,
|
|
106
|
+
closable: true,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
defineOptions({
|
|
110
|
+
isBladeComponent: true,
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const emit = defineEmits<Emits>();
|
|
114
|
+
|
|
115
|
+
const { t } = useI18n({ useScope: "global" });
|
|
116
|
+
|
|
117
|
+
const { showConfirmation } = usePopup();
|
|
118
|
+
|
|
119
|
+
const { loading, item, validationState, scope, load, remove, saveChanges, bladeTitle } = props.composables[
|
|
120
|
+
props.model?.settings?.composable
|
|
121
|
+
]({ emit, props }) as UseDetails<Record<string, any>, DetailsBaseBladeScope>;
|
|
122
|
+
|
|
123
|
+
const title = ref();
|
|
124
|
+
const isReady = ref(false);
|
|
125
|
+
|
|
126
|
+
const unwatchTitle = watch(
|
|
127
|
+
() => bladeTitle.value,
|
|
128
|
+
(newVal) => {
|
|
129
|
+
if (newVal) {
|
|
130
|
+
title.value = newVal;
|
|
131
|
+
|
|
132
|
+
nextTick(() => unwatchTitle());
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{ immediate: true }
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
const settings = computed(() => props.model?.settings);
|
|
139
|
+
|
|
140
|
+
const form = computed(
|
|
141
|
+
(): FormContentSchema => props.model?.content.find((x) => x.component === "vc-form") as FormContentSchema
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
const widgets = computed(() => props.model.content.find((x) => x.component === "vc-widgets"));
|
|
145
|
+
|
|
146
|
+
const bladeContext = ref<DetailsBladeContext>({
|
|
147
|
+
loading,
|
|
148
|
+
item,
|
|
149
|
+
validationState,
|
|
150
|
+
scope,
|
|
151
|
+
load,
|
|
152
|
+
remove,
|
|
153
|
+
saveChanges,
|
|
154
|
+
bladeTitle,
|
|
155
|
+
settings,
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
const bladeStatus = computed(() => {
|
|
159
|
+
if ("status" in props.model.settings && props.model.settings.status) {
|
|
160
|
+
if (!("component" in props.model.settings.status))
|
|
161
|
+
throw new Error(`Component is required in status: ${props.model.settings.status}`);
|
|
162
|
+
return reactive(h(resolveComponent(props.model.settings.status.component), { context: bladeContext.value }));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return null;
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
const bladeMultilanguage = reactiveComputed(() => {
|
|
169
|
+
if ("multilanguage" in toValue(scope) && toValue(scope).multilanguage) {
|
|
170
|
+
return {
|
|
171
|
+
component: () =>
|
|
172
|
+
h(VcSelect as any, {
|
|
173
|
+
name: "currentLocale",
|
|
174
|
+
modelValue: toValue(scope).multilanguage.currentLocale,
|
|
175
|
+
options: toValue(scope).multilanguage.localesOptions,
|
|
176
|
+
optionValue: "value",
|
|
177
|
+
optionLabel: "label",
|
|
178
|
+
disabled: "disabled" in toValue(scope) && toValue(scope).disabled,
|
|
179
|
+
required: true,
|
|
180
|
+
clearable: false,
|
|
181
|
+
"onUpdate:modelValue": (e: string) => {
|
|
182
|
+
toValue(scope).multilanguage.setLocale(e);
|
|
183
|
+
},
|
|
184
|
+
}),
|
|
185
|
+
currentLocale: toValue(scope).multilanguage.currentLocale,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return {};
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const bladeWidgets = computed(() => {
|
|
193
|
+
return widgets.value?.children?.map((x) => resolveComponent(x));
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
const bladeOptions = reactive({
|
|
197
|
+
multilanguage: bladeMultilanguage.component,
|
|
198
|
+
status: bladeStatus,
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const toolbarComputed = toolbarReducer({
|
|
202
|
+
defaultToolbarSchema: settings.value.toolbar,
|
|
203
|
+
defaultToolbarBindings: {
|
|
204
|
+
saveChanges: {
|
|
205
|
+
async clickHandler() {
|
|
206
|
+
await saveChanges(item.value);
|
|
207
|
+
|
|
208
|
+
emit("parent:call", {
|
|
209
|
+
method: "reload",
|
|
210
|
+
});
|
|
211
|
+
if (!props.param) {
|
|
212
|
+
emit("close:blade");
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
disabled: computed(() => !validationState.value.validated),
|
|
216
|
+
},
|
|
217
|
+
remove: {
|
|
218
|
+
async clickHandler() {
|
|
219
|
+
if (
|
|
220
|
+
await showConfirmation(
|
|
221
|
+
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.DETAILS.ALERTS.DELETE`))
|
|
222
|
+
)
|
|
223
|
+
) {
|
|
224
|
+
if (props.param) {
|
|
225
|
+
await remove({ id: props.param });
|
|
226
|
+
emit("parent:call", {
|
|
227
|
+
method: "reload",
|
|
228
|
+
});
|
|
229
|
+
emit("close:blade");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
disabled: computed(() => toValue(scope)?.disabled),
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
customToolbarConfig: toValue(scope)?.toolbarOverrides,
|
|
237
|
+
context: bladeContext.value,
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
onBeforeMount(async () => {
|
|
241
|
+
if (props.param) {
|
|
242
|
+
await load({ id: props.param });
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
await nextTick(() => {
|
|
246
|
+
isReady.value = true;
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
async function onBeforeClose() {
|
|
251
|
+
if (validationState.value.modified) {
|
|
252
|
+
return await showConfirmation(
|
|
253
|
+
unref(
|
|
254
|
+
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.ALERTS.CLOSE_CONFIRMATION`))
|
|
255
|
+
)
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
defineExpose({
|
|
261
|
+
title: bladeTitle,
|
|
262
|
+
onBeforeClose,
|
|
263
|
+
});
|
|
264
|
+
</script>
|
|
265
|
+
|
|
266
|
+
<style lang="scss">
|
|
267
|
+
.item-details {
|
|
268
|
+
&__inner {
|
|
269
|
+
@apply tw-overflow-hidden tw-min-h-full tw-flex tw-grow tw-basis-0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
&__content {
|
|
273
|
+
@apply tw-border-r tw-border-solid tw-border-r-[#eaedf3] tw-overflow-hidden tw-grow tw-basis-0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&__decline-icon {
|
|
277
|
+
@apply tw-text-[#ff4a4a] tw-mr-3;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.app_phone &__inner {
|
|
281
|
+
@apply tw-flex-col;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.app_phone &__content {
|
|
285
|
+
@apply tw-border-r-0 tw-border-b tw-border-solid tw-border-b-[#eaedf3] tw-overflow-visible;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.app_phone &__widgets {
|
|
289
|
+
@apply tw-flex tw-flex-row;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
</style>
|