@vc-shell/framework 1.0.109 → 1.0.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/core/composables/useApiClient/index.ts +1 -1
- package/core/composables/useAsync/index.ts +2 -2
- package/core/composables/usePermissions/index.ts +7 -18
- package/core/composables/useUser/index.ts +13 -11
- package/core/directives/loading/index.ts +5 -27
- package/core/directives/loading/styles.css +38 -0
- package/core/plugins/modularity/index.ts +41 -14
- package/core/plugins/permissions/index.ts +3 -3
- package/core/plugins/validation/rules.ts +24 -7
- package/core/types/index.ts +36 -3
- package/dist/core/composables/useApiClient/index.d.ts +1 -1
- package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
- package/dist/core/composables/useAsync/index.d.ts +1 -1
- package/dist/core/composables/useAsync/index.d.ts.map +1 -1
- package/dist/core/composables/useI18n/index.d.ts +1 -1
- package/dist/core/composables/useI18n/index.d.ts.map +1 -1
- package/dist/core/composables/usePermissions/index.d.ts +1 -2
- package/dist/core/composables/usePermissions/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +1 -0
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/directives/loading/index.d.ts +3 -2
- package/dist/core/directives/loading/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +13 -4
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/rules.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +41 -2
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.mjs +30057 -27524
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +14 -23
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +28 -25
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +5 -2
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -1
- package/dist/shared/components/error-interceptor/index.d.ts +3 -3
- package/dist/shared/components/language-selector/language-selector.vue.d.ts +41 -26
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +12 -12
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useContainer/index.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/index.d.ts +11 -11
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +35 -22
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +39 -28
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/index.d.ts +13 -13
- package/dist/shared/modules/assets/index.d.ts +3 -1
- package/dist/shared/modules/assets/index.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +42 -29
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +9 -9
- package/dist/shared/modules/assets-manager/index.d.ts +3 -1
- package/dist/shared/modules/assets-manager/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts +2204 -0
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +220 -0
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/factories.d.ts +15 -0
- package/dist/shared/modules/dynamic/components/factories.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +130 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +128 -0
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +132 -0
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/ValidationField.d.ts +13 -0
- package/dist/shared/modules/dynamic/components/fields/ValidationField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +124 -0
- package/dist/shared/modules/dynamic/components/fields/props.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/index.d.ts +4 -0
- package/dist/shared/modules/dynamic/components/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/composables/index.d.ts +2 -0
- package/dist/shared/modules/dynamic/composables/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts +35 -0
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts +8 -0
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts +22 -0
- package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/index.d.ts +4 -0
- package/dist/shared/modules/dynamic/factories/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +101 -0
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/getters.d.ts +2 -0
- package/dist/shared/modules/dynamic/helpers/getters.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts +13 -0
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/override.d.ts +7 -0
- package/dist/shared/modules/dynamic/helpers/override.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/setters.d.ts +8 -0
- package/dist/shared/modules/dynamic/helpers/setters.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/toolbarReducer.d.ts +11 -0
- package/dist/shared/modules/dynamic/helpers/toolbarReducer.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/unrefNested.d.ts +2 -0
- package/dist/shared/modules/dynamic/helpers/unrefNested.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/helpers/unwrapInterpolation.d.ts +3 -0
- package/dist/shared/modules/dynamic/helpers/unwrapInterpolation.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/index.d.ts +32 -0
- package/dist/shared/modules/dynamic/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +68 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +79 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/index.d.ts +4 -0
- package/dist/shared/modules/dynamic/pages/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/types/index.d.ts +250 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/types/models.d.ts +93 -0
- package/dist/shared/modules/dynamic/types/models.d.ts.map +1 -0
- package/dist/shared/modules/index.d.ts +1 -0
- package/dist/shared/modules/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/index.d.ts +0 -3
- package/dist/shared/pages/InvitePage/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/plugin.d.ts +4 -0
- package/dist/shared/pages/InvitePage/plugin.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +45 -9
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/index.d.ts +14 -0
- package/dist/shared/pages/LoginPage/components/login/index.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/index.d.ts +0 -1
- package/dist/shared/pages/LoginPage/index.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/plugin.d.ts +1 -3
- package/dist/shared/pages/LoginPage/plugin.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/index.d.ts +0 -3
- package/dist/shared/pages/ResetPasswordPage/index.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/plugin.d.ts +4 -0
- package/dist/shared/pages/ResetPasswordPage/plugin.d.ts.map +1 -0
- package/dist/shared/pages/index.d.ts +0 -6
- package/dist/shared/pages/index.d.ts.map +1 -1
- package/dist/shared/pages/plugin.d.ts +4 -0
- package/dist/shared/pages/plugin.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/index.d.ts +1 -0
- package/dist/ui/components/atoms/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +4 -4
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +22 -11
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/index.d.ts +1 -208
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +75 -27
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/index.d.ts +32 -38
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +46 -27
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts +72 -38
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts +69 -28
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +11 -22
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/index.d.ts +5 -5
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +22 -11
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-hint/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/index.d.ts +13 -7
- package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +28 -26
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/index.d.ts +16 -16
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +54 -29
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-info-row/index.d.ts +9 -9
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +30 -23
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/index.d.ts +33 -39
- package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts +33 -26
- package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/index.d.ts +4 -4
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts +22 -11
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts +9 -10
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +19 -24
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-row/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/index.d.ts +1 -142
- package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +29 -28
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts +9 -10
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts +36 -11
- package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/index.d.ts +54 -0
- package/dist/ui/components/atoms/vc-video/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +67 -0
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +28 -11
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts +5 -3
- package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +23 -22
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-code-editor/index.d.ts +28 -28
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +48 -23
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/index.d.ts +1 -226
- package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +74 -28
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +23 -23
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +46 -27
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/index.d.ts +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/index.d.ts +1 -390
- package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +181 -41
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts +90 -90
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +143 -30
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/index.d.ts +74 -10
- package/dist/ui/components/molecules/vc-multivalue/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +74 -10
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts +51 -10
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +6 -6
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +26 -25
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/index.d.ts +19 -19
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +46 -25
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/index.d.ts +65 -103
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +65 -479
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/index.d.ts +21 -21
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts +39 -26
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/index.d.ts +40 -40
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +74 -25
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts +35 -12
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +40 -23
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +47 -28
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts +31 -28
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/index.d.ts +67 -67
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +86 -37
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts +44 -11
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +61 -34
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts +13 -22
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/index.d.ts +39 -39
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +62 -31
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +1 -140
- package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +64 -75
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +58 -35
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +22 -25
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/index.d.ts +37 -31
- package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +130 -46
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/index.d.ts +9 -9
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts +23 -22
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts +28 -22
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts +0 -6
- package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts +36 -10
- package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-template/index.d.ts +4 -4
- package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts +27 -10
- package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +38 -31
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +18 -9
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +12 -19
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +23 -24
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +29 -26
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +14 -14
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/index.d.ts +1 -214
- package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +90 -105
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +9 -8
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +2 -2
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +16 -14
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +37 -30
- package/shared/components/blade-navigation/types/index.ts +7 -3
- package/shared/components/notifications/composables/useContainer/index.ts +2 -5
- package/shared/components/popup-handler/composables/usePopup/index.ts +0 -2
- package/shared/modules/assets/components/assets-details/assets-details.vue +6 -6
- package/shared/modules/assets/index.ts +2 -2
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +3 -3
- package/shared/modules/assets-manager/index.ts +2 -2
- package/shared/modules/dynamic/components/FIELD_MAP.ts +27 -0
- package/shared/modules/dynamic/components/SchemaRender.ts +81 -0
- package/shared/modules/dynamic/components/factories.ts +159 -0
- package/shared/modules/dynamic/components/fields/Button.ts +31 -0
- package/shared/modules/dynamic/components/fields/Card.ts +86 -0
- package/shared/modules/dynamic/components/fields/Checkbox.ts +44 -0
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +99 -0
- package/shared/modules/dynamic/components/fields/EditorField.ts +43 -0
- package/shared/modules/dynamic/components/fields/Fieldset.ts +77 -0
- package/shared/modules/dynamic/components/fields/GalleryField.ts +121 -0
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +49 -0
- package/shared/modules/dynamic/components/fields/InputField.ts +42 -0
- package/shared/modules/dynamic/components/fields/SelectField.ts +55 -0
- package/shared/modules/dynamic/components/fields/StatusField.ts +55 -0
- package/shared/modules/dynamic/components/fields/ValidationField.ts +53 -0
- package/shared/modules/dynamic/components/fields/props.ts +52 -0
- package/shared/modules/dynamic/components/index.ts +4 -0
- package/shared/modules/dynamic/composables/index.ts +1 -0
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +235 -0
- package/shared/modules/dynamic/factories/base/useDetailsFactory.ts +83 -0
- package/shared/modules/dynamic/factories/base/useListFactory.ts +68 -0
- package/shared/modules/dynamic/factories/index.ts +4 -0
- package/shared/modules/dynamic/factories/types/index.ts +103 -0
- package/shared/modules/dynamic/helpers/getters.ts +10 -0
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +112 -0
- package/shared/modules/dynamic/helpers/override.ts +70 -0
- package/shared/modules/dynamic/helpers/setters.ts +15 -0
- package/shared/modules/dynamic/helpers/toolbarReducer.ts +41 -0
- package/shared/modules/dynamic/helpers/unrefNested.ts +14 -0
- package/shared/modules/dynamic/helpers/unwrapInterpolation.ts +15 -0
- package/shared/modules/dynamic/index.ts +163 -0
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +292 -0
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +437 -0
- package/shared/modules/dynamic/pages/index.ts +4 -0
- package/shared/modules/dynamic/types/index.ts +287 -0
- package/shared/modules/dynamic/types/models.ts +140 -0
- package/shared/modules/index.ts +1 -0
- package/shared/pages/InvitePage/index.ts +0 -6
- package/shared/pages/InvitePage/plugin.ts +5 -0
- package/shared/pages/LoginPage/components/login/Login.vue +5 -6
- package/shared/pages/LoginPage/index.ts +0 -1
- package/shared/pages/LoginPage/plugin.ts +1 -13
- package/shared/pages/ResetPasswordPage/index.ts +0 -6
- package/shared/pages/ResetPasswordPage/plugin.ts +5 -0
- package/shared/pages/index.ts +0 -9
- package/shared/pages/plugin.ts +3 -0
- package/ui/components/atoms/index.ts +1 -0
- package/ui/components/atoms/vc-button/index.ts +1 -10
- package/ui/components/atoms/vc-button/vc-button.vue +8 -2
- package/ui/components/atoms/vc-card/index.ts +1 -9
- package/ui/components/atoms/vc-card/vc-card.vue +6 -1
- package/ui/components/atoms/vc-checkbox/index.ts +1 -9
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +32 -10
- package/ui/components/atoms/vc-icon/vc-icon.vue +16 -3
- package/ui/components/atoms/vc-label/index.ts +1 -9
- package/ui/components/atoms/vc-label/vc-label.vue +5 -0
- package/ui/components/atoms/vc-status/index.ts +1 -10
- package/ui/components/atoms/vc-status/vc-status.vue +5 -1
- package/ui/components/atoms/vc-video/index.ts +3 -0
- package/ui/components/atoms/vc-video/vc-video.vue +102 -0
- package/ui/components/atoms/vc-widget/vc-widget.vue +1 -1
- package/ui/components/molecules/vc-editor/index.ts +1 -10
- package/ui/components/molecules/vc-editor/vc-editor.vue +16 -0
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +4 -4
- package/ui/components/molecules/vc-input/index.ts +1 -60
- package/ui/components/molecules/vc-input/vc-input.vue +112 -37
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +1 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +21 -17
- package/ui/components/molecules/vc-select/index.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.vue +11 -37
- package/ui/components/organisms/vc-dynamic-property/index.ts +1 -3
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +199 -257
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +9 -7
- package/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue +10 -1
- package/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue +1 -10
- package/ui/components/organisms/vc-table/index.ts +1 -3
- package/ui/components/organisms/vc-table/vc-table.stories.ts +3 -3
- package/ui/components/organisms/vc-table/vc-table.vue +29 -16
- package/core/api/catalog.ts +0 -8527
- package/dist/core/api/catalog.d.ts +0 -2522
- package/dist/core/api/catalog.d.ts.map +0 -1
- package/dist/typings/index.d.ts +0 -8
- package/dist/typings/index.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## [1.0.111](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.110...v1.0.111) (2023-10-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* open blade on mount fix in import-module ([6644e03](https://github.com/VirtoCommerce/vc-shell/commit/6644e03bcac5b1298db160f3b749c8a44bb8c9c7))
|
|
7
|
+
* override ts-ignore toSpliced ([c360888](https://github.com/VirtoCommerce/vc-shell/commit/c3608889c4bc987f475f9d25a9149aad4b59bac6))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* dynamic app modules samples ([2af411f](https://github.com/VirtoCommerce/vc-shell/commit/2af411fb14c61d9e98da4612057fd157263de397))
|
|
13
|
+
* dynamic modules ([ed4af3a](https://github.com/VirtoCommerce/vc-shell/commit/ed4af3ad65e47b0d633d6e2eb23e9c90d73ff50d))
|
|
14
|
+
* dynamic modules ([200dcde](https://github.com/VirtoCommerce/vc-shell/commit/200dcde3d127f45267f2d259967839d11ea5d01e))
|
|
15
|
+
* improved createAppModule ([3752415](https://github.com/VirtoCommerce/vc-shell/commit/3752415eeae183b8dcfe3f23e47f3bcb07faf136))
|
|
16
|
+
* status type dynamic component ([95f0472](https://github.com/VirtoCommerce/vc-shell/commit/95f0472cd79cb117a94fe467cf4094cdff29373e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [1.0.110](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.109...v1.0.110) (2023-10-16)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* code review improvements ([5c6c6dc](https://github.com/VirtoCommerce/vc-shell/commit/5c6c6dc7a60c1212e4c23e0ddbbc42611f16303b))
|
|
26
|
+
* code review improvements ([5453ba0](https://github.com/VirtoCommerce/vc-shell/commit/5453ba0388a51b2946408b980e119a0ad20f7647))
|
|
27
|
+
* delete index.ts from framework api ([8cc2fee](https://github.com/VirtoCommerce/vc-shell/commit/8cc2feef30ac38bcf229234456cac78c8e23f158))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* vm-1215 vc-video ([52680f6](https://github.com/VirtoCommerce/vc-shell/commit/52680f6f2bd649d7226818f6432e605502ab9eab))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
1
36
|
## [1.0.109](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.108...v1.0.109) (2023-10-13)
|
|
2
37
|
|
|
3
38
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readonly, ref } from "vue";
|
|
2
2
|
import { HasLoading } from "../useLoading";
|
|
3
3
|
|
|
4
|
-
export type AsyncAction<Payload = void, Result = void> = (payload
|
|
4
|
+
export type AsyncAction<Payload = void, Result = void> = (payload: Payload) => Promise<Result>;
|
|
5
5
|
|
|
6
6
|
export interface UseAsync<Payload = void, Result = void> extends HasLoading {
|
|
7
7
|
action: AsyncAction<Payload, Result>;
|
|
@@ -12,7 +12,7 @@ export function useAsync<Payload = void, Result = void>(
|
|
|
12
12
|
): UseAsync<Payload, Result> {
|
|
13
13
|
const loading = ref(false);
|
|
14
14
|
|
|
15
|
-
async function action(payload
|
|
15
|
+
async function action(payload: Payload): Promise<Result> {
|
|
16
16
|
loading.value = true;
|
|
17
17
|
try {
|
|
18
18
|
return await innerAction(payload);
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { Ref, ref } from "vue";
|
|
1
|
+
import { Ref, onMounted, ref } from "vue";
|
|
2
2
|
import { useUser } from "./../useUser";
|
|
3
3
|
|
|
4
4
|
interface IUsePermissions {
|
|
5
|
-
|
|
6
|
-
fetchUserPermissions(): Promise<void>;
|
|
5
|
+
hasAccess(permissions: string | string[]): boolean;
|
|
7
6
|
}
|
|
8
7
|
const userPermissions: Ref<string[]> = ref([]);
|
|
9
8
|
export function usePermissions(): IUsePermissions {
|
|
10
|
-
const { user
|
|
9
|
+
const { user } = useUser();
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
userPermissions.value = user.value?.permissions;
|
|
15
|
-
} else {
|
|
16
|
-
try {
|
|
17
|
-
const userData = await loadUser();
|
|
18
|
-
userPermissions.value = userData.permissions;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
throw new Error("Unable to load user permissions");
|
|
21
|
-
}
|
|
22
|
-
}
|
|
11
|
+
if (user.value) {
|
|
12
|
+
userPermissions.value = user.value?.permissions;
|
|
23
13
|
}
|
|
24
14
|
|
|
25
|
-
function
|
|
15
|
+
function hasAccess(permissions: string | string[] | undefined) {
|
|
26
16
|
if (!permissions) {
|
|
27
17
|
return true;
|
|
28
18
|
} else if (permissions || (permissions && permissions instanceof Array)) {
|
|
@@ -39,7 +29,6 @@ export function usePermissions(): IUsePermissions {
|
|
|
39
29
|
}
|
|
40
30
|
|
|
41
31
|
return {
|
|
42
|
-
|
|
43
|
-
fetchUserPermissions,
|
|
32
|
+
hasAccess,
|
|
44
33
|
};
|
|
45
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, Ref, ref, ComputedRef
|
|
1
|
+
import { computed, Ref, ref, ComputedRef } from "vue";
|
|
2
2
|
import ClientOAuth2 from "client-oauth2";
|
|
3
3
|
import {
|
|
4
4
|
UserDetail,
|
|
@@ -31,6 +31,7 @@ const securityClient = new SecurityClient();
|
|
|
31
31
|
interface IUseUser {
|
|
32
32
|
user: ComputedRef<UserDetail | null>;
|
|
33
33
|
loading: ComputedRef<boolean>;
|
|
34
|
+
isAdministrator: ComputedRef<boolean>;
|
|
34
35
|
getAccessToken: () => Promise<string | null>;
|
|
35
36
|
loadUser: () => Promise<UserDetail>;
|
|
36
37
|
signIn: (username: string, password: string) => Promise<SignInResults>;
|
|
@@ -126,17 +127,17 @@ export function useUser(): IUseUser {
|
|
|
126
127
|
const token = await getAccessToken();
|
|
127
128
|
if (token) {
|
|
128
129
|
securityClient.setAuthToken(token);
|
|
129
|
-
}
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
try {
|
|
132
|
+
loading.value = true;
|
|
133
|
+
user.value = await securityClient.getCurrentUser();
|
|
134
|
+
console.log("[useUser]: an user details has been loaded", user.value);
|
|
135
|
+
} catch (e) {
|
|
136
|
+
console.dir(e);
|
|
137
|
+
throw e;
|
|
138
|
+
} finally {
|
|
139
|
+
loading.value = false;
|
|
140
|
+
}
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
return { ...user.value } as UserDetail;
|
|
@@ -287,6 +288,7 @@ export function useUser(): IUseUser {
|
|
|
287
288
|
return {
|
|
288
289
|
user: computed(() => user.value),
|
|
289
290
|
loading: computed(() => loading.value),
|
|
291
|
+
isAdministrator: computed(() => user.value.isAdministrator),
|
|
290
292
|
isAuthenticated,
|
|
291
293
|
getAccessToken,
|
|
292
294
|
loadUser,
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DirectiveBinding } from "vue";
|
|
2
|
+
import "./styles.css";
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
mounted: function (el: HTMLElement, binding: DirectiveBinding): void {
|
|
7
|
-
console.log("v-loading mount");
|
|
8
|
-
const loader = document.createElement("div");
|
|
9
|
-
loader.className = className;
|
|
10
|
-
loader.innerHTML = "Loading...";
|
|
11
|
-
loader.style.display = binding.value ? "flex" : "none";
|
|
12
|
-
loader.style.position = "absolute";
|
|
13
|
-
loader.style.alignItems = "center";
|
|
14
|
-
loader.style.justifyContent = "center";
|
|
15
|
-
loader.style.background = "rgba(255, 255, 255, 0.75)";
|
|
16
|
-
loader.style.zIndex = "9999";
|
|
17
|
-
loader.style.width = "100%";
|
|
18
|
-
loader.style.height = "100%";
|
|
19
|
-
el.appendChild(loader);
|
|
20
|
-
},
|
|
21
|
-
updated: function (el: HTMLElement, binding: DirectiveBinding): void {
|
|
22
|
-
console.log("v-loading updated");
|
|
23
|
-
const loader = el.querySelector(`.${className}`) as HTMLElement;
|
|
24
|
-
if (loader) {
|
|
25
|
-
loader.style.display = binding.value ? "flex" : "none";
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
} as Directive;
|
|
4
|
+
export const loading = (el: HTMLElement, binding: DirectiveBinding) => {
|
|
5
|
+
el.classList[binding.value ? "add" : "remove"]("v-loading");
|
|
6
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.v-loading {
|
|
2
|
+
position: relative;
|
|
3
|
+
min-height: 30px;
|
|
4
|
+
cursor: wait;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.v-loading::before {
|
|
8
|
+
content: '';
|
|
9
|
+
position: absolute;
|
|
10
|
+
z-index: 99998;
|
|
11
|
+
top: 0;
|
|
12
|
+
right: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
background-color: rgba(255, 255, 255, 75%);
|
|
16
|
+
backdrop-filter: blur(3px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.v-loading::after {
|
|
20
|
+
content: '';
|
|
21
|
+
position: absolute;
|
|
22
|
+
z-index: 99999;
|
|
23
|
+
width: 30px;
|
|
24
|
+
height: 30px;
|
|
25
|
+
border: 4px solid #319ed4;
|
|
26
|
+
border-right-color: transparent;
|
|
27
|
+
animation: 0.75s linear infinite v-loading;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
top: calc(50% - 30px / 2);
|
|
30
|
+
left: calc(50% - 30px / 2);
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes v-loading {
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { App } from "vue";
|
|
1
|
+
import { App, Component } from "vue";
|
|
2
2
|
import { i18n } from "./../i18n";
|
|
3
3
|
import { Router } from "vue-router";
|
|
4
4
|
import { BladeConstructor } from "./../../../shared/components/blade-navigation/types";
|
|
5
5
|
import { kebabToPascal } from "./../../utilities";
|
|
6
6
|
|
|
7
|
-
export const createModule = (components: unknown, locales?: unknown) => ({
|
|
7
|
+
export const createModule = (components: unknown, locales?: unknown, isBladeComponent?: boolean) => ({
|
|
8
8
|
install(app: App): void {
|
|
9
9
|
// Register components
|
|
10
10
|
Object.entries(components).forEach(([componentName, component]) => {
|
|
11
|
-
app.component(componentName, component);
|
|
11
|
+
app.component(componentName, isBladeComponent ? { ...component, isBladeComponent: true } : component);
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
// Load locales
|
|
@@ -20,25 +20,44 @@ export const createModule = (components: unknown, locales?: unknown) => ({
|
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
export const createAppModule = (
|
|
24
|
-
|
|
23
|
+
export const createAppModule = (
|
|
24
|
+
pages: { [key: string]: BladeConstructor },
|
|
25
|
+
locales?: { [key: string]: object },
|
|
26
|
+
notificationTemplates?: { [key: string]: Component },
|
|
27
|
+
moduleComponents?: { [key: string]: Component }
|
|
28
|
+
) => {
|
|
29
|
+
const module = createModule(pages, locales, true);
|
|
25
30
|
|
|
26
31
|
return {
|
|
27
|
-
install(app: App, options
|
|
28
|
-
|
|
32
|
+
install(app: App, options?: { router: Router }): void {
|
|
33
|
+
let routerInstance: Router;
|
|
34
|
+
|
|
35
|
+
if (options && options.router) {
|
|
36
|
+
const { router } = options;
|
|
37
|
+
routerInstance = router;
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
// Register pages
|
|
30
|
-
Object.entries(pages).forEach(([, page]
|
|
41
|
+
Object.entries(pages).forEach(([key, page]) => {
|
|
31
42
|
app.config.globalProperties.pages?.push(page);
|
|
32
43
|
|
|
44
|
+
app.config.globalProperties.bladeRoutes?.push({
|
|
45
|
+
component: page,
|
|
46
|
+
route: page.url,
|
|
47
|
+
name: key,
|
|
48
|
+
});
|
|
49
|
+
|
|
33
50
|
// Dynamically add pages to vue router
|
|
34
51
|
if (page.url) {
|
|
35
|
-
const mainRouteName =
|
|
52
|
+
const mainRouteName = routerInstance.getRoutes().find((r) => r.meta?.root)?.name;
|
|
36
53
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
54
|
+
if (routerInstance && mainRouteName) {
|
|
55
|
+
routerInstance.addRoute(mainRouteName, {
|
|
56
|
+
name: kebabToPascal(page.url.substring(1)),
|
|
57
|
+
path: page.url.substring(1),
|
|
58
|
+
component: page,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
42
61
|
}
|
|
43
62
|
});
|
|
44
63
|
|
|
@@ -48,6 +67,14 @@ export const createAppModule = (pages: unknown, locales?: unknown, notificationT
|
|
|
48
67
|
app.config.globalProperties.notificationTemplates?.push(template);
|
|
49
68
|
});
|
|
50
69
|
}
|
|
70
|
+
|
|
71
|
+
if (moduleComponents) {
|
|
72
|
+
// Register module components globally
|
|
73
|
+
Object.entries(moduleComponents).forEach(([name, component]) => {
|
|
74
|
+
app.component(name, component);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
51
78
|
module.install(app);
|
|
52
79
|
},
|
|
53
80
|
};
|
|
@@ -3,8 +3,8 @@ import { App } from "vue";
|
|
|
3
3
|
|
|
4
4
|
export const permissions = {
|
|
5
5
|
install(app: App) {
|
|
6
|
-
const {
|
|
7
|
-
app.config.globalProperties.$hasAccess =
|
|
8
|
-
app.provide("$hasAccess",
|
|
6
|
+
const { hasAccess } = usePermissions();
|
|
7
|
+
app.config.globalProperties.$hasAccess = hasAccess;
|
|
8
|
+
app.provide("$hasAccess", hasAccess);
|
|
9
9
|
},
|
|
10
10
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineRule } from "vee-validate";
|
|
2
|
-
import
|
|
2
|
+
/*eslint import/namespace: ['error', { allowComputed: true }]*/
|
|
3
|
+
import * as AllRules from "@vee-validate/rules";
|
|
3
4
|
|
|
4
5
|
Object.keys(AllRules).forEach((rule) => {
|
|
5
6
|
defineRule(rule, AllRules[rule]);
|
|
@@ -84,20 +85,35 @@ export const fileWeight = (file: HTMLInputElement, [size]: [number]) => {
|
|
|
84
85
|
defineRule("fileWeight", fileWeight);
|
|
85
86
|
|
|
86
87
|
const compare = (
|
|
87
|
-
value: string,
|
|
88
|
-
[target]: string[],
|
|
88
|
+
value: string | Date,
|
|
89
|
+
[target]: string[] | Date[],
|
|
89
90
|
comparer: (first: number, second: number) => boolean,
|
|
90
91
|
errorMessage: string
|
|
91
92
|
): boolean | string => {
|
|
92
93
|
// The field is empty so it should pass
|
|
93
|
-
if (!value || !value.length) {
|
|
94
|
+
if (!value || (typeof value == "string" && !value.length)) {
|
|
94
95
|
return true;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
let first_date;
|
|
99
|
+
let second_date;
|
|
100
|
+
if (value instanceof Date) {
|
|
101
|
+
first_date = value;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (target instanceof Date) {
|
|
105
|
+
second_date = target;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (typeof value === "string") {
|
|
109
|
+
first_date = new Date(value);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (typeof target === "string") {
|
|
113
|
+
second_date = new Date(target);
|
|
114
|
+
}
|
|
99
115
|
|
|
100
|
-
if (first_date
|
|
116
|
+
if (first_date?.getTime() > 0 && second_date?.getTime() > 0) {
|
|
101
117
|
if (comparer(second_date.getTime(), first_date.getTime())) {
|
|
102
118
|
return errorMessage;
|
|
103
119
|
}
|
|
@@ -114,6 +130,7 @@ defineRule("before", before);
|
|
|
114
130
|
// after
|
|
115
131
|
export const after = (value: string, [target]: string[]) =>
|
|
116
132
|
compare(value, [target], (first, second) => first > second, "End date must be later than start date");
|
|
133
|
+
|
|
117
134
|
defineRule("after", after);
|
|
118
135
|
|
|
119
136
|
export const bigInt = (value: string) => {
|
package/core/types/index.ts
CHANGED
|
@@ -14,16 +14,38 @@ import {
|
|
|
14
14
|
// while it satisfies requirements
|
|
15
15
|
export type IValidationRules = {
|
|
16
16
|
required?: boolean;
|
|
17
|
-
|
|
17
|
+
numeric?: boolean;
|
|
18
18
|
email?: boolean;
|
|
19
19
|
min?: number;
|
|
20
20
|
max?: number;
|
|
21
21
|
regex?: RegExp;
|
|
22
22
|
min_value?: number;
|
|
23
23
|
max_value?: number;
|
|
24
|
-
after?: string;
|
|
25
24
|
maxdimensions?: [string | number, string | number];
|
|
26
25
|
size?: number;
|
|
26
|
+
alpha?: boolean;
|
|
27
|
+
alpha_dash?: boolean;
|
|
28
|
+
alpha_num?: boolean;
|
|
29
|
+
alpha_spaces?: boolean;
|
|
30
|
+
between?: [number, number] | { min: number; max: number };
|
|
31
|
+
confirmed?: `@${string}`;
|
|
32
|
+
digits?: number;
|
|
33
|
+
dimensions?: [number, number] | { width: number; height: number };
|
|
34
|
+
not_one_of?: [number, number];
|
|
35
|
+
ext?: string[];
|
|
36
|
+
image?: boolean;
|
|
37
|
+
integer?: boolean;
|
|
38
|
+
is?: string;
|
|
39
|
+
is_not?: string;
|
|
40
|
+
length?: number;
|
|
41
|
+
mimes?: string[];
|
|
42
|
+
one_of?: number[];
|
|
43
|
+
url?: string;
|
|
44
|
+
mindimensions?: [number, number] | { width: number; height: number };
|
|
45
|
+
fileWeight?: number;
|
|
46
|
+
before?: `@${string}`;
|
|
47
|
+
after?: `@${string}`;
|
|
48
|
+
bigint?: boolean;
|
|
27
49
|
};
|
|
28
50
|
|
|
29
51
|
export interface IBladeDropdownItem {
|
|
@@ -80,7 +102,9 @@ export type ToolbarMenu<T> = T extends {
|
|
|
80
102
|
} & IBladeToolbar
|
|
81
103
|
: T & { component?: ComponentInstanceConstructor };
|
|
82
104
|
|
|
83
|
-
export type NotificationTemplateConstructor = ComponentInstanceConstructor & {
|
|
105
|
+
export type NotificationTemplateConstructor = ComponentInstanceConstructor & {
|
|
106
|
+
notifyType: string;
|
|
107
|
+
};
|
|
84
108
|
|
|
85
109
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
86
110
|
export interface IActionBuilderResult<T = {}> {
|
|
@@ -91,6 +115,15 @@ export interface IActionBuilderResult<T = {}> {
|
|
|
91
115
|
clickHandler(item?: T): void;
|
|
92
116
|
}
|
|
93
117
|
|
|
118
|
+
export interface AssetsHandler<T, A> {
|
|
119
|
+
loading: Ref<boolean>;
|
|
120
|
+
upload: (files: FileList, assetArr: T[], uploadCatalog: string, uploadFolder: string) => Promise<T[]>;
|
|
121
|
+
edit: (assetsArr: T[], asset: A) => Promise<T[]>;
|
|
122
|
+
editBulk: (assets: A[]) => T[];
|
|
123
|
+
remove: (assetArr: T[], asset: A) => Promise<T[]>;
|
|
124
|
+
removeBulk: (assetArr: T[], assetsArrEdited: T[]) => Promise<T[]>;
|
|
125
|
+
}
|
|
126
|
+
|
|
94
127
|
export interface IImage {
|
|
95
128
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
129
|
[x: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useApiClient/index.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useApiClient/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,KAAK,EAAE,MAAM,OAAE;IAC5B,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAE;CACjD;AAED,UAAU,YAAY,CAAC,SAAS,SAAS,YAAY;IACnD,YAAY,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,wBAAgB,YAAY,CAAC,SAAS,SAAS,YAAY,EACzD,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;CAAE,KAAK,SAAS,GAChH,YAAY,CAAC,SAAS,CAAC,CAYzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HasLoading } from "../useLoading";
|
|
2
|
-
export type AsyncAction<Payload = void, Result = void> = (payload
|
|
2
|
+
export type AsyncAction<Payload = void, Result = void> = (payload: Payload) => Promise<Result>;
|
|
3
3
|
export interface UseAsync<Payload = void, Result = void> extends HasLoading {
|
|
4
4
|
action: AsyncAction<Payload, Result>;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useAsync/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,WAAW,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useAsync/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,WAAW,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE/F,MAAM,WAAW,QAAQ,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAE,SAAQ,UAAU;IACzE,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,wBAAgB,QAAQ,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,EACpD,WAAW,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,GACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAmB3B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated use `useI18n({ useScope: "global" })` directly from `vue-i18n` */
|
|
2
|
-
export declare function useI18n(): import("vue-i18n").Composer<{}, {}, {},
|
|
2
|
+
export declare function useI18n(): import("vue-i18n").Composer<{}, {}, {}, string, never, string>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useI18n/index.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useI18n/index.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,OAAO,mEAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/usePermissions/index.ts"],"names":[],"mappings":"AAGA,UAAU,eAAe;IACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/usePermissions/index.ts"],"names":[],"mappings":"AAGA,UAAU,eAAe;IACvB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;CACpD;AAED,wBAAgB,cAAc,IAAI,eAAe,CA0BhD"}
|
|
@@ -4,6 +4,7 @@ import { RequestPasswordResult, SignInResults } from "./../../types";
|
|
|
4
4
|
interface IUseUser {
|
|
5
5
|
user: ComputedRef<UserDetail | null>;
|
|
6
6
|
loading: ComputedRef<boolean>;
|
|
7
|
+
isAdministrator: ComputedRef<boolean>;
|
|
7
8
|
getAccessToken: () => Promise<string | null>;
|
|
8
9
|
loadUser: () => Promise<UserDetail>;
|
|
9
10
|
signIn: (username: string, password: string) => Promise<SignInResults>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useUser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EACL,UAAU,EAGV,cAAc,EAEd,cAAc,EAGd,SAAS,EACT,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,qBAAqB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAgB/E,UAAU,QAAQ;IAChB,IAAI,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,eAAe,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,QAAQ,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAChE,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACnG,oBAAoB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC/E,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1F,yBAAyB,EAAE,MAAM,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;IACvE,cAAc,EAAE,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAClG,YAAY,EAAE,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IACzC,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,OAAO,IAAI,QAAQ,CAgQlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/directives/loading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/directives/loading/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,OAAO,OAAQ,WAAW,WAAW,gBAAgB,SAEjE,CAAC"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { App } from "vue";
|
|
1
|
+
import { App, Component } from "vue";
|
|
2
2
|
import { Router } from "vue-router";
|
|
3
|
-
|
|
3
|
+
import { BladeConstructor } from "./../../../shared/components/blade-navigation/types";
|
|
4
|
+
export declare const createModule: (components: unknown, locales?: unknown, isBladeComponent?: boolean) => {
|
|
4
5
|
install(app: App): void;
|
|
5
6
|
};
|
|
6
|
-
export declare const createAppModule: (pages:
|
|
7
|
-
|
|
7
|
+
export declare const createAppModule: (pages: {
|
|
8
|
+
[key: string]: BladeConstructor;
|
|
9
|
+
}, locales?: {
|
|
10
|
+
[key: string]: object;
|
|
11
|
+
}, notificationTemplates?: {
|
|
12
|
+
[key: string]: Component;
|
|
13
|
+
}, moduleComponents?: {
|
|
14
|
+
[key: string]: Component;
|
|
15
|
+
}) => {
|
|
16
|
+
install(app: App, options?: {
|
|
8
17
|
router: Router;
|
|
9
18
|
}): void;
|
|
10
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAGvF,eAAO,MAAM,YAAY,eAAgB,OAAO,YAAY,OAAO,qBAAqB,OAAO;iBAChF,GAAG,GAAG,IAAI;CAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;iBASX,GAAG,YAAY;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CAiDxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../core/plugins/validation/rules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../core/plugins/validation/rules.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,aAAa,WAAY,gBAAgB,mBAAmB,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,qCAwC1G,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,gBAAgB,UAAU,CAAC,MAAM,CAAC,kBAwBlE,CAAC;AA2CF,eAAO,MAAM,MAAM,UAAW,MAAM,YAAY,MAAM,EAAE,qBACiD,CAAC;AAI1G,eAAO,MAAM,KAAK,UAAW,MAAM,YAAY,MAAM,EAAE,qBACgD,CAAC;AAIxG,eAAO,MAAM,MAAM,UAAW,MAAM,gCAMnC,CAAC"}
|
|
@@ -2,16 +2,47 @@ import { ComponentPublicInstance, ComputedRef, Ref } from "vue";
|
|
|
2
2
|
import { CoreBladeExposed, BladeConstructor, ExtractedBladeOptions, ComponentInstanceConstructor, BladeInstanceConstructor } from "./../../shared";
|
|
3
3
|
export type IValidationRules = {
|
|
4
4
|
required?: boolean;
|
|
5
|
-
|
|
5
|
+
numeric?: boolean;
|
|
6
6
|
email?: boolean;
|
|
7
7
|
min?: number;
|
|
8
8
|
max?: number;
|
|
9
9
|
regex?: RegExp;
|
|
10
10
|
min_value?: number;
|
|
11
11
|
max_value?: number;
|
|
12
|
-
after?: string;
|
|
13
12
|
maxdimensions?: [string | number, string | number];
|
|
14
13
|
size?: number;
|
|
14
|
+
alpha?: boolean;
|
|
15
|
+
alpha_dash?: boolean;
|
|
16
|
+
alpha_num?: boolean;
|
|
17
|
+
alpha_spaces?: boolean;
|
|
18
|
+
between?: [number, number] | {
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
21
|
+
};
|
|
22
|
+
confirmed?: `@${string}`;
|
|
23
|
+
digits?: number;
|
|
24
|
+
dimensions?: [number, number] | {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
not_one_of?: [number, number];
|
|
29
|
+
ext?: string[];
|
|
30
|
+
image?: boolean;
|
|
31
|
+
integer?: boolean;
|
|
32
|
+
is?: string;
|
|
33
|
+
is_not?: string;
|
|
34
|
+
length?: number;
|
|
35
|
+
mimes?: string[];
|
|
36
|
+
one_of?: number[];
|
|
37
|
+
url?: string;
|
|
38
|
+
mindimensions?: [number, number] | {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
fileWeight?: number;
|
|
43
|
+
before?: `@${string}`;
|
|
44
|
+
after?: `@${string}`;
|
|
45
|
+
bigint?: boolean;
|
|
15
46
|
};
|
|
16
47
|
export interface IBladeDropdownItem {
|
|
17
48
|
id: string;
|
|
@@ -69,6 +100,14 @@ export interface IActionBuilderResult<T = {}> {
|
|
|
69
100
|
leftActions?: boolean;
|
|
70
101
|
clickHandler(item?: T): void;
|
|
71
102
|
}
|
|
103
|
+
export interface AssetsHandler<T, A> {
|
|
104
|
+
loading: Ref<boolean>;
|
|
105
|
+
upload: (files: FileList, assetArr: T[], uploadCatalog: string, uploadFolder: string) => Promise<T[]>;
|
|
106
|
+
edit: (assetsArr: T[], asset: A) => Promise<T[]>;
|
|
107
|
+
editBulk: (assets: A[]) => T[];
|
|
108
|
+
remove: (assetArr: T[], asset: A) => Promise<T[]>;
|
|
109
|
+
removeBulk: (assetArr: T[], assetsArrEdited: T[]) => Promise<T[]>;
|
|
110
|
+
}
|
|
72
111
|
export interface IImage {
|
|
73
112
|
[x: string]: any;
|
|
74
113
|
sortOrder?: number;
|