@vc-shell/framework 1.0.128 → 1.0.130
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 +38 -0
- package/core/api/platform.ts +514 -92
- package/core/composables/index.ts +2 -1
- package/core/composables/useApiClient/index.ts +1 -7
- package/core/composables/useAssets/index.ts +0 -6
- package/core/composables/useBeforeUnload/index.ts +20 -0
- package/core/composables/useMenuService/index.ts +96 -0
- package/core/composables/useNotifications/index.ts +29 -40
- package/core/composables/useSettings/index.ts +23 -29
- package/core/composables/useUser/index.ts +61 -132
- package/core/directives/loading/styles.css +5 -5
- package/core/interceptors/index.ts +75 -0
- package/core/plugins/i18n/index.ts +1 -0
- package/core/plugins/modularity/index.ts +63 -20
- package/core/plugins/moment/moment.ts +2 -2
- package/core/plugins/signalR/index.ts +23 -3
- package/core/types/index.ts +18 -35
- package/core/utilities/kebabToCamel.ts +1 -1
- package/dist/core/api/platform.d.ts +125 -87
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/core/composables/index.d.ts +2 -1
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
- package/dist/core/composables/useAssets/index.d.ts.map +1 -1
- package/dist/core/composables/useBeforeUnload/index.d.ts +5 -0
- package/dist/core/composables/useBeforeUnload/index.d.ts.map +1 -0
- package/dist/core/composables/useMenuService/index.d.ts +16 -0
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -0
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts +2 -2
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +8 -6
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts +3 -0
- package/dist/core/interceptors/index.d.ts.map +1 -0
- package/dist/core/plugins/i18n/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/moment/moment.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +16 -29
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/{framework.mjs → framework.js} +32147 -32235
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts +1 -19
- package/dist/shared/components/app-switcher/components/vc-app-switcher/index.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +3 -0
- 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/index.d.ts +1 -70
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +1 -82
- 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/components/vc-blade-view/vc-blade-view.d.ts +28 -0
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -0
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +11 -27
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/injectionKeys.d.ts +4 -0
- package/dist/shared/components/blade-navigation/injectionKeys.d.ts.map +1 -0
- package/dist/shared/components/blade-navigation/plugin.d.ts +4 -1
- package/dist/shared/components/blade-navigation/plugin.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +48 -35
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/error-interceptor/index.d.ts +33 -67
- package/dist/shared/components/error-interceptor/index.d.ts.map +1 -1
- package/dist/shared/components/index.d.ts +2 -0
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/index.d.ts +1 -49
- package/dist/shared/components/language-selector/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/language-selector.vue.d.ts +1 -40
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/{ui/components/organisms/vc-notification-dropdown → shared/components/notification-dropdown}/_internal/notification/notification.vue.d.ts +2 -2
- package/dist/shared/components/notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -0
- package/dist/shared/components/notification-dropdown/index.d.ts +7 -0
- package/dist/shared/components/notification-dropdown/index.d.ts.map +1 -0
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts +3 -0
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -0
- package/dist/shared/components/notification-template/index.d.ts +91 -0
- package/dist/shared/components/notification-template/index.d.ts.map +1 -0
- package/dist/{ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts → shared/components/notification-template/notification-template.vue.d.ts} +2 -2
- package/dist/shared/components/notification-template/notification-template.vue.d.ts.map +1 -0
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.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 +10 -16
- package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +7 -4
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/index.d.ts +4 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +3 -0
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +3 -0
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +3 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/index.d.ts +1 -3
- package/dist/shared/modules/dynamic/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +12 -10
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +5 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +16 -1
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shared/utilities/vueUtils.d.ts.map +1 -1
- package/dist/tailwind.config.d.ts +56 -0
- package/dist/tailwind.config.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +32 -67
- package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +6 -1
- 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 +66 -102
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts +7 -0
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +7 -1
- 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 +91 -129
- 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 +7 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +6 -1
- 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 +36 -71
- package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -1
- 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 +8 -38
- package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +3 -0
- 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 +42 -74
- 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 +7 -1
- 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 +32 -66
- package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/ui/components/atoms/vc-progress/index.d.ts +30 -63
- package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts +3 -1
- package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +6 -1
- 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.map +1 -1
- package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +3 -0
- 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.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +3 -0
- 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 +59 -98
- package/dist/ui/components/molecules/vc-code-editor/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +1 -0
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +4 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +3 -0
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +67 -105
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +3 -0
- 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 +8 -38
- package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +56 -1
- 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 +159 -214
- package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +3 -0
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +27 -9
- 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.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +3 -0
- 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 +59 -96
- package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +3 -0
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +257 -8
- 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 +55 -91
- package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts +3 -0
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +6 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/index.d.ts +0 -2
- package/dist/ui/components/organisms/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts +2 -4
- 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 +10 -7
- 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 +10 -18
- 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 +16 -16
- 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 +1 -292
- package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +17 -56
- 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.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 +3 -0
- 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 +3 -0
- 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 +89 -131
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +21 -18
- 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 +4 -1
- 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 +4 -1
- 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/vc-gallery.vue.d.ts +3 -0
- 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 +32 -66
- package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.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-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 +3 -0
- 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 +3 -0
- 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 +3 -0
- 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/vc-table.vue.d.ts +57 -6
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/dist/ui/types/index.d.ts +5 -45
- package/dist/ui/types/index.d.ts.map +1 -1
- package/package.json +26 -30
- package/shared/components/app-switcher/components/vc-app-switcher/index.ts +1 -3
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +2 -2
- package/shared/components/blade-navigation/components/vc-blade-navigation/index.ts +1 -3
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +46 -157
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +81 -0
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +323 -261
- package/shared/components/blade-navigation/injectionKeys.ts +4 -0
- package/shared/components/blade-navigation/plugin.ts +8 -10
- package/shared/components/blade-navigation/types/index.ts +53 -44
- package/shared/components/index.ts +2 -0
- package/shared/components/language-selector/language-selector.vue +12 -12
- package/{ui/components/organisms/vc-notification-dropdown → shared/components/notification-dropdown}/_internal/notification/notification.vue +6 -5
- package/shared/components/notification-dropdown/index.ts +10 -0
- package/{ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue → shared/components/notification-dropdown/notification-dropdown.vue} +21 -17
- package/shared/components/notification-template/index.ts +10 -0
- package/{ui/components/organisms/vc-notification-template/vc-notification-template.vue → shared/components/notification-template/notification-template.vue} +2 -2
- package/shared/components/popup-handler/composables/usePopup/index.ts +29 -9
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +58 -17
- package/shared/index.ts +3 -2
- package/shared/locales/en.json +7 -0
- package/shared/modules/assets/components/assets-details/assets-details.vue +5 -0
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +8 -5
- package/shared/modules/dynamic/components/fields/GalleryField.ts +7 -7
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +2 -1
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +42 -36
- package/shared/modules/dynamic/factories/base/useDetailsFactory.ts +5 -3
- package/shared/modules/dynamic/factories/types/index.ts +6 -2
- package/shared/modules/dynamic/helpers/override.ts +38 -32
- package/shared/modules/dynamic/helpers/safeIn.ts +1 -1
- package/shared/modules/dynamic/index.ts +12 -12
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +96 -57
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +133 -118
- package/shared/modules/dynamic/types/index.ts +16 -1
- package/shared/pages/InvitePage/components/invite/Invite.vue +2 -2
- package/shared/pages/LoginPage/components/login/Login.vue +23 -16
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +3 -3
- package/shared/utilities/vueUtils.ts +7 -7
- package/tailwind.config.ts +50 -0
- package/ui/components/atoms/vc-button/vc-button.vue +1 -1
- package/ui/components/atoms/vc-card/vc-card.stories.ts +25 -0
- package/ui/components/atoms/vc-card/vc-card.vue +1 -1
- package/ui/components/atoms/vc-container/vc-container.vue +1 -1
- package/ui/components/atoms/vc-icon/vc-icon.vue +1 -1
- package/ui/components/molecules/vc-editor/vc-editor.vue +2 -7
- package/ui/components/molecules/vc-notification/vc-notification.vue +2 -2
- package/ui/components/molecules/vc-select/vc-select.vue +13 -13
- package/ui/components/organisms/index.ts +0 -2
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +25 -42
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +123 -25
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +11 -103
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +34 -52
- package/ui/components/organisms/vc-app/index.ts +1 -12
- package/ui/components/organisms/vc-app/vc-app.stories.ts +36 -36
- package/ui/components/organisms/vc-app/vc-app.vue +122 -61
- package/ui/components/organisms/vc-blade/vc-blade.vue +5 -13
- package/ui/components/organisms/vc-table/vc-table.vue +9 -9
- package/ui/locales/en.json +2 -4
- package/ui/types/index.ts +7 -51
- package/core/composables/useMenuComposer/index.ts +0 -25
- package/dist/core/composables/useMenuComposer/index.d.ts +0 -12
- package/dist/core/composables/useMenuComposer/index.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts +0 -38
- package/dist/ui/components/organisms/vc-notification-dropdown/index.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts +0 -21
- package/dist/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-notification-template/index.d.ts +0 -2
- package/dist/ui/components/organisms/vc-notification-template/index.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-notification-template/vc-notification-template.vue.d.ts.map +0 -1
- package/dist/utils/isInDemoMode.d.ts +0 -2
- package/dist/utils/isInDemoMode.d.ts.map +0 -1
- package/dist/vite.config.d.ts +0 -3
- package/dist/vite.config.d.ts.map +0 -1
- package/tailwind.config.js +0 -50
- package/ui/components/organisms/vc-notification-dropdown/index.ts +0 -3
- package/ui/components/organisms/vc-notification-template/index.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VcBlade
|
|
3
|
+
v-if="!composables"
|
|
3
4
|
v-loading="loading"
|
|
4
5
|
:expanded="expanded"
|
|
5
6
|
:closable="closable"
|
|
@@ -77,10 +78,21 @@ import {
|
|
|
77
78
|
} from "vue";
|
|
78
79
|
import { DynamicDetailsSchema, FormContentSchema, SettingsSchema } from "../types";
|
|
79
80
|
import { reactiveComputed, useMounted } from "@vueuse/core";
|
|
80
|
-
import {
|
|
81
|
+
import {
|
|
82
|
+
DetailsBladeContext,
|
|
83
|
+
DetailsBaseBladeScope,
|
|
84
|
+
IParentCallArgs,
|
|
85
|
+
UseDetails,
|
|
86
|
+
usePopup,
|
|
87
|
+
useBladeNavigation,
|
|
88
|
+
} from "../../../index";
|
|
81
89
|
import SchemaRender from "../components/SchemaRender";
|
|
82
90
|
import { VcSelect } from "../../../../ui/components";
|
|
83
91
|
import { toolbarReducer } from "../helpers/toolbarReducer";
|
|
92
|
+
import { onBeforeRouteLeave } from "vue-router";
|
|
93
|
+
import { useBeforeUnload } from "../../../../core/composables/useBeforeUnload";
|
|
94
|
+
import * as _ from "lodash-es";
|
|
95
|
+
import { IBladeToolbar } from "../../../../core/types";
|
|
84
96
|
|
|
85
97
|
interface Props {
|
|
86
98
|
expanded?: boolean;
|
|
@@ -105,19 +117,29 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
105
117
|
closable: true,
|
|
106
118
|
});
|
|
107
119
|
|
|
108
|
-
defineOptions({
|
|
109
|
-
isBladeComponent: true,
|
|
110
|
-
});
|
|
111
|
-
|
|
112
120
|
const emit = defineEmits<Emits>();
|
|
113
121
|
|
|
114
122
|
const { t } = useI18n({ useScope: "global" });
|
|
115
123
|
|
|
116
124
|
const { showConfirmation } = usePopup();
|
|
117
125
|
|
|
118
|
-
const {
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
const { currentBladeNavigationData } = useBladeNavigation();
|
|
127
|
+
|
|
128
|
+
const { loading, item, validationState, scope, load, remove, saveChanges, bladeTitle } = props.composables
|
|
129
|
+
? (props.composables?.[props.model?.settings?.composable ?? ""]({ emit, props, mounted: useMounted() }) as UseDetails<
|
|
130
|
+
Record<string, any>,
|
|
131
|
+
DetailsBaseBladeScope
|
|
132
|
+
>)
|
|
133
|
+
: ({
|
|
134
|
+
loading: true,
|
|
135
|
+
item: undefined,
|
|
136
|
+
validationState: undefined,
|
|
137
|
+
scope: undefined,
|
|
138
|
+
load: undefined,
|
|
139
|
+
remove: undefined,
|
|
140
|
+
saveChanges: undefined,
|
|
141
|
+
bladeTitle: undefined,
|
|
142
|
+
} as unknown as UseDetails<Record<string, any>, DetailsBaseBladeScope>);
|
|
121
143
|
|
|
122
144
|
const title = ref();
|
|
123
145
|
const isReady = ref(false);
|
|
@@ -125,19 +147,26 @@ const isReady = ref(false);
|
|
|
125
147
|
const unwatchTitle = watch(
|
|
126
148
|
() => bladeTitle?.value,
|
|
127
149
|
(newVal) => {
|
|
128
|
-
if (newVal) {
|
|
150
|
+
if (newVal && props.composables) {
|
|
129
151
|
title.value = newVal;
|
|
130
152
|
|
|
131
153
|
nextTick(() => unwatchTitle());
|
|
132
154
|
}
|
|
133
155
|
},
|
|
134
|
-
{ immediate: true }
|
|
156
|
+
{ immediate: true },
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
useBeforeUnload(
|
|
160
|
+
computed(() => {
|
|
161
|
+
const toolBarSave = _.get(toValue(scope)?.toolbarOverrides, "saveChanges") as unknown as IBladeToolbar;
|
|
162
|
+
return !unref(toolBarSave && "disabled" in toolBarSave && toolBarSave.disabled) || validationState.value.validated;
|
|
163
|
+
}),
|
|
135
164
|
);
|
|
136
165
|
|
|
137
166
|
const settings = computed(() => props.model?.settings);
|
|
138
167
|
|
|
139
168
|
const form = computed(
|
|
140
|
-
(): FormContentSchema => props.model?.content.find((x) => x?.component === "vc-form") as FormContentSchema
|
|
169
|
+
(): FormContentSchema => props.model?.content.find((x) => x?.component === "vc-form") as FormContentSchema,
|
|
141
170
|
);
|
|
142
171
|
|
|
143
172
|
const widgets = computed(() => props.model?.content.find((x) => x?.component === "vc-widgets"));
|
|
@@ -201,48 +230,69 @@ const bladeOptions = reactive({
|
|
|
201
230
|
status: bladeStatus,
|
|
202
231
|
});
|
|
203
232
|
|
|
204
|
-
const toolbarComputed =
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
});
|
|
215
|
-
if (!props.param) {
|
|
216
|
-
emit("close:blade");
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
disabled: computed(() => !validationState.value.validated),
|
|
221
|
-
},
|
|
222
|
-
remove: {
|
|
223
|
-
async clickHandler() {
|
|
224
|
-
if (
|
|
225
|
-
await showConfirmation(
|
|
226
|
-
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.DETAILS.ALERTS.DELETE`))
|
|
227
|
-
)
|
|
228
|
-
) {
|
|
229
|
-
if (props.param) {
|
|
230
|
-
await remove?.({ id: props.param });
|
|
233
|
+
const toolbarComputed =
|
|
234
|
+
props.composables &&
|
|
235
|
+
toolbarReducer({
|
|
236
|
+
defaultToolbarSchema: settings.value?.toolbar ?? [],
|
|
237
|
+
defaultToolbarBindings: {
|
|
238
|
+
saveChanges: {
|
|
239
|
+
async clickHandler() {
|
|
240
|
+
if (item.value) {
|
|
241
|
+
await saveChanges(item.value);
|
|
242
|
+
|
|
231
243
|
emit("parent:call", {
|
|
232
244
|
method: "reload",
|
|
233
245
|
});
|
|
234
|
-
|
|
246
|
+
if (!props.param) {
|
|
247
|
+
emit("close:blade");
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
// TODO validate fields without validation
|
|
252
|
+
disabled: computed(() => !validationState.value.validated),
|
|
253
|
+
},
|
|
254
|
+
remove: {
|
|
255
|
+
async clickHandler() {
|
|
256
|
+
if (
|
|
257
|
+
await showConfirmation(
|
|
258
|
+
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.ALERTS.DELETE`)),
|
|
259
|
+
)
|
|
260
|
+
) {
|
|
261
|
+
if (props.param) {
|
|
262
|
+
await remove?.({ id: props.param });
|
|
263
|
+
emit("parent:call", {
|
|
264
|
+
method: "reload",
|
|
265
|
+
});
|
|
266
|
+
emit("close:blade");
|
|
267
|
+
}
|
|
235
268
|
}
|
|
236
|
-
}
|
|
269
|
+
},
|
|
270
|
+
disabled: computed(() => toValue(scope)?.disabled),
|
|
237
271
|
},
|
|
238
|
-
disabled: computed(() => toValue(scope)?.disabled),
|
|
239
272
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
});
|
|
273
|
+
customToolbarConfig: toValue(scope)?.toolbarOverrides,
|
|
274
|
+
context: bladeContext.value,
|
|
275
|
+
});
|
|
244
276
|
|
|
245
277
|
onBeforeMount(async () => {
|
|
278
|
+
if (props.composables) await init();
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
onBeforeRouteLeave(async (to, from) => {
|
|
282
|
+
if (
|
|
283
|
+
currentBladeNavigationData.value?.fullPath &&
|
|
284
|
+
!to.path.includes(currentBladeNavigationData.value?.fullPath) &&
|
|
285
|
+
validationState.value.modified
|
|
286
|
+
) {
|
|
287
|
+
return await showConfirmation(
|
|
288
|
+
unref(
|
|
289
|
+
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.ALERTS.CLOSE_CONFIRMATION`)),
|
|
290
|
+
),
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
async function init() {
|
|
246
296
|
if (props.param) {
|
|
247
297
|
await load({ id: props.param });
|
|
248
298
|
}
|
|
@@ -250,21 +300,10 @@ onBeforeMount(async () => {
|
|
|
250
300
|
await nextTick(() => {
|
|
251
301
|
isReady.value = true;
|
|
252
302
|
});
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
async function onBeforeClose() {
|
|
256
|
-
if (validationState.value.modified) {
|
|
257
|
-
return await showConfirmation(
|
|
258
|
-
unref(
|
|
259
|
-
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.ALERTS.CLOSE_CONFIRMATION`))
|
|
260
|
-
)
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
303
|
}
|
|
264
304
|
|
|
265
305
|
defineExpose({
|
|
266
|
-
title: bladeTitle,
|
|
267
|
-
onBeforeClose,
|
|
306
|
+
title: bladeTitle ?? "",
|
|
268
307
|
...scope?.value,
|
|
269
308
|
});
|
|
270
309
|
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
3
|
:is="isWidgetView ? 'template' : 'VcBlade'"
|
|
4
|
+
v-if="!composables"
|
|
4
5
|
:expanded="expanded"
|
|
5
6
|
:closable="closable"
|
|
6
7
|
width="50%"
|
|
@@ -27,9 +28,9 @@
|
|
|
27
28
|
class="tw-grow tw-basis-0"
|
|
28
29
|
:loading="loading"
|
|
29
30
|
:expanded="expanded"
|
|
30
|
-
:columns="(
|
|
31
|
-
:state-key="stateKey"
|
|
32
|
-
:items="
|
|
31
|
+
:columns="(tableData?.columns as ITableColumns[]) ?? []"
|
|
32
|
+
:state-key="stateKey ?? ''"
|
|
33
|
+
:items="itemsProxy as Record<string, any>[]"
|
|
33
34
|
:multiselect="isWidgetView ? false : tableData?.multiselect"
|
|
34
35
|
:header="isWidgetView ? false : tableData?.header"
|
|
35
36
|
:footer="!isWidgetView"
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
|
|
62
63
|
<!-- Not found template -->
|
|
63
64
|
<template #notfound>
|
|
64
|
-
<template v-if="bladeOptions
|
|
65
|
+
<template v-if="bladeOptions?.notFound">
|
|
65
66
|
<component
|
|
66
67
|
:is="bladeOptions.notFound"
|
|
67
68
|
@reset="resetSearch"
|
|
@@ -83,9 +84,12 @@
|
|
|
83
84
|
|
|
84
85
|
<!-- Empty template -->
|
|
85
86
|
<template #empty>
|
|
86
|
-
<template v-if="bladeOptions
|
|
87
|
+
<template v-if="bladeOptions?.empty">
|
|
87
88
|
<component
|
|
88
89
|
:is="bladeOptions.empty"
|
|
90
|
+
:class="{
|
|
91
|
+
'tw-py-6': isWidgetView,
|
|
92
|
+
}"
|
|
89
93
|
@add="openDetailsBlade"
|
|
90
94
|
></component>
|
|
91
95
|
</template>
|
|
@@ -113,7 +117,7 @@
|
|
|
113
117
|
<!-- Override table mobile view -->
|
|
114
118
|
|
|
115
119
|
<template
|
|
116
|
-
v-if="bladeOptions
|
|
120
|
+
v-if="bladeOptions?.mobileView"
|
|
117
121
|
#mobile-item="itemData"
|
|
118
122
|
>
|
|
119
123
|
<component
|
|
@@ -129,7 +133,6 @@
|
|
|
129
133
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
130
134
|
import {
|
|
131
135
|
Ref,
|
|
132
|
-
VNode,
|
|
133
136
|
computed,
|
|
134
137
|
inject,
|
|
135
138
|
onMounted,
|
|
@@ -144,6 +147,7 @@ import {
|
|
|
144
147
|
ShallowRef,
|
|
145
148
|
ConcreteComponent,
|
|
146
149
|
ComputedRef,
|
|
150
|
+
onBeforeMount,
|
|
147
151
|
} from "vue";
|
|
148
152
|
import { useI18n } from "vue-i18n";
|
|
149
153
|
import { DynamicGridSchema, ListContentSchema, SettingsSchema } from "../types";
|
|
@@ -156,7 +160,6 @@ import { ListBaseBladeScope, ListBladeContext, UseList } from "../factories/type
|
|
|
156
160
|
import { IParentCallArgs } from "../../../index";
|
|
157
161
|
import * as _ from "lodash-es";
|
|
158
162
|
import { useMounted } from "@vueuse/core";
|
|
159
|
-
import { safeIn } from "../helpers/safeIn";
|
|
160
163
|
|
|
161
164
|
export interface Props {
|
|
162
165
|
expanded?: boolean;
|
|
@@ -190,35 +193,24 @@ const { debounce } = useFunctions();
|
|
|
190
193
|
|
|
191
194
|
const emit = defineEmits<Emits>();
|
|
192
195
|
|
|
193
|
-
defineOptions({
|
|
194
|
-
isBladeComponent: true,
|
|
195
|
-
});
|
|
196
|
-
|
|
197
196
|
const settings = computed(() => props.model?.settings);
|
|
198
197
|
const title = computed(() => settings.value?.titleTemplate);
|
|
199
198
|
const allSelected = ref(false);
|
|
200
199
|
const searchValue = ref();
|
|
201
|
-
const selectedItemId =
|
|
202
|
-
const sort =
|
|
203
|
-
const selectedIds =
|
|
200
|
+
const selectedItemId = shallowRef();
|
|
201
|
+
const sort = shallowRef("createdDate:DESC");
|
|
202
|
+
const selectedIds = shallowRef<string[]>([]);
|
|
204
203
|
const isDesktop = inject("isDesktop") as Ref<boolean>;
|
|
205
204
|
const itemsProxy = ref<Record<string, any>[]>();
|
|
206
|
-
const modified =
|
|
205
|
+
const modified = shallowRef(false);
|
|
207
206
|
|
|
208
207
|
const { moduleNotifications, markAsRead } = useNotifications(settings.value?.pushNotificationType);
|
|
209
|
-
const { load, remove, items, loading, pagination, query, scope } = props.composables?.[
|
|
210
|
-
props.model?.settings?.composable ?? ""
|
|
211
|
-
]({
|
|
212
|
-
emit,
|
|
213
|
-
props,
|
|
214
|
-
mounted: useMounted(),
|
|
215
|
-
}) as UseList<Record<string, any>[], Record<string, any>, ListBaseBladeScope>;
|
|
216
208
|
|
|
217
209
|
watch(
|
|
218
210
|
moduleNotifications,
|
|
219
211
|
(newVal) => {
|
|
220
212
|
newVal.forEach((message) => {
|
|
221
|
-
if (message.title) {
|
|
213
|
+
if (message.title && props.composables) {
|
|
222
214
|
notification.success(message.title, {
|
|
223
215
|
onClose() {
|
|
224
216
|
markAsRead(message);
|
|
@@ -227,17 +219,41 @@ watch(
|
|
|
227
219
|
}
|
|
228
220
|
});
|
|
229
221
|
},
|
|
230
|
-
{ deep: true }
|
|
222
|
+
{ deep: true },
|
|
231
223
|
);
|
|
232
224
|
|
|
233
|
-
const tableData =
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
225
|
+
const tableData =
|
|
226
|
+
props.composables &&
|
|
227
|
+
computed(() => props.model?.content.find((type: ListContentSchema) => type.component === "vc-table"));
|
|
228
|
+
const stateKey =
|
|
229
|
+
props.composables &&
|
|
230
|
+
computed(() => {
|
|
231
|
+
if (tableData?.value?.id) {
|
|
232
|
+
return tableData.value?.id + props.isWidgetView ? "_dashboard" : "";
|
|
233
|
+
}
|
|
238
234
|
|
|
239
|
-
|
|
240
|
-
});
|
|
235
|
+
throw new Error('Table id is not defined. Please provide "id" property in table schema');
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
const { load, remove, items, loading, pagination, query, scope } = props.composables
|
|
239
|
+
? (props.composables?.[props.model?.settings?.composable ?? ""]({
|
|
240
|
+
emit,
|
|
241
|
+
props,
|
|
242
|
+
mounted: useMounted(),
|
|
243
|
+
}) as UseList<Record<string, any>[], Record<string, any>, ListBaseBladeScope>)
|
|
244
|
+
: ({
|
|
245
|
+
load: ref(true),
|
|
246
|
+
remove: undefined,
|
|
247
|
+
items: undefined,
|
|
248
|
+
loading: undefined,
|
|
249
|
+
pagination: undefined,
|
|
250
|
+
query: undefined,
|
|
251
|
+
scope: undefined,
|
|
252
|
+
} as unknown as UseList<Record<string, any>[], Record<string, any>, ListBaseBladeScope>);
|
|
253
|
+
|
|
254
|
+
if (props.isWidgetView) {
|
|
255
|
+
query.value.take = 5;
|
|
256
|
+
}
|
|
241
257
|
|
|
242
258
|
const calculateColumns = (columns: ListContentSchema["columns"]) => {
|
|
243
259
|
const result = columns?.map((column) => {
|
|
@@ -247,25 +263,23 @@ const calculateColumns = (columns: ListContentSchema["columns"]) => {
|
|
|
247
263
|
? scope?.value[column.visible?.method]()
|
|
248
264
|
: scope?.value[column.visible?.method];
|
|
249
265
|
|
|
250
|
-
console.log("result", result);
|
|
251
|
-
|
|
252
266
|
column.visible = result;
|
|
253
267
|
}
|
|
254
268
|
return column;
|
|
255
269
|
});
|
|
256
270
|
|
|
257
|
-
console.log(result);
|
|
258
|
-
|
|
259
271
|
return result;
|
|
260
272
|
};
|
|
261
273
|
|
|
262
|
-
const table =
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
274
|
+
const table =
|
|
275
|
+
props.composables &&
|
|
276
|
+
computed(() => {
|
|
277
|
+
const tableScope = {
|
|
278
|
+
columns: calculateColumns(tableData?.value?.columns),
|
|
279
|
+
};
|
|
266
280
|
|
|
267
|
-
|
|
268
|
-
});
|
|
281
|
+
return tableScope;
|
|
282
|
+
});
|
|
269
283
|
|
|
270
284
|
const bladeOptions = reactive({
|
|
271
285
|
tableData,
|
|
@@ -276,10 +290,6 @@ const bladeOptions = reactive({
|
|
|
276
290
|
empty: resolveTemplateComponent("emptyTemplate"),
|
|
277
291
|
});
|
|
278
292
|
|
|
279
|
-
if (props.isWidgetView) {
|
|
280
|
-
query.value.take = 5;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
293
|
const {
|
|
284
294
|
filterComponent,
|
|
285
295
|
activeFilterCount,
|
|
@@ -303,67 +313,53 @@ const bladeContext = ref<ListBladeContext>({
|
|
|
303
313
|
settings: settings as ComputedRef<SettingsSchema>,
|
|
304
314
|
});
|
|
305
315
|
|
|
306
|
-
const toolbarComputed =
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
316
|
+
const toolbarComputed =
|
|
317
|
+
props.composables &&
|
|
318
|
+
toolbarReducer({
|
|
319
|
+
defaultToolbarSchema: settings.value?.toolbar ?? [],
|
|
320
|
+
defaultToolbarBindings: {
|
|
321
|
+
save: {
|
|
322
|
+
clickHandler() {
|
|
323
|
+
emit("close:blade");
|
|
324
|
+
},
|
|
325
|
+
disabled: computed(() => !modified.value),
|
|
312
326
|
},
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
} else throw new Error("openDetailsBlade method is not defined in scope");
|
|
327
|
+
openAddBlade: {
|
|
328
|
+
async clickHandler() {
|
|
329
|
+
if (
|
|
330
|
+
scope &&
|
|
331
|
+
"openDetailsBlade" in toValue(scope) &&
|
|
332
|
+
toValue(scope).openDetailsBlade &&
|
|
333
|
+
typeof toValue(scope).openDetailsBlade === "function"
|
|
334
|
+
) {
|
|
335
|
+
toValue(scope).openDetailsBlade();
|
|
336
|
+
} else throw new Error("openDetailsBlade method is not defined in scope");
|
|
337
|
+
},
|
|
325
338
|
},
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
339
|
+
refresh: {
|
|
340
|
+
async clickHandler() {
|
|
341
|
+
await reload();
|
|
342
|
+
},
|
|
330
343
|
},
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
344
|
+
removeItems: {
|
|
345
|
+
async clickHandler() {
|
|
346
|
+
removeItems();
|
|
347
|
+
},
|
|
348
|
+
disabled: computed(() => !selectedIds.value?.length),
|
|
349
|
+
isVisible: isDesktop.value,
|
|
335
350
|
},
|
|
336
|
-
disabled: computed(() => !selectedIds.value?.length),
|
|
337
|
-
isVisible: isDesktop.value,
|
|
338
351
|
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
onMounted(async () => {
|
|
345
|
-
await load({ ...query.value, sort: sort.value });
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
watch(
|
|
349
|
-
() => itemsProxy.value,
|
|
350
|
-
(newVal) => {
|
|
351
|
-
modified.value = !_.isEqual(newVal, items.value);
|
|
352
|
-
},
|
|
353
|
-
{ deep: true }
|
|
354
|
-
);
|
|
355
|
-
|
|
356
|
-
watch(sort, async (value) => {
|
|
357
|
-
await load({ ...query.value, sort: value });
|
|
358
|
-
});
|
|
352
|
+
customToolbarConfig: toValue(scope)?.toolbarOverrides,
|
|
353
|
+
context: bladeContext.value,
|
|
354
|
+
});
|
|
359
355
|
|
|
360
|
-
|
|
361
|
-
|
|
356
|
+
onBeforeMount(async () => {
|
|
357
|
+
if (props.composables) await load({ ...query.value, sort: sort.value });
|
|
362
358
|
});
|
|
363
359
|
|
|
364
360
|
watch(
|
|
365
361
|
() => props.param,
|
|
366
|
-
(newVal) => {
|
|
362
|
+
async (newVal) => {
|
|
367
363
|
if (newVal) {
|
|
368
364
|
if (
|
|
369
365
|
scope &&
|
|
@@ -371,7 +367,7 @@ watch(
|
|
|
371
367
|
toValue(scope).openDetailsBlade &&
|
|
372
368
|
typeof toValue(scope).openDetailsBlade === "function"
|
|
373
369
|
) {
|
|
374
|
-
toValue(scope).openDetailsBlade({
|
|
370
|
+
await toValue(scope).openDetailsBlade({
|
|
375
371
|
param: newVal,
|
|
376
372
|
onOpen() {
|
|
377
373
|
selectedItemId.value = newVal;
|
|
@@ -383,10 +379,26 @@ watch(
|
|
|
383
379
|
}
|
|
384
380
|
}
|
|
385
381
|
},
|
|
386
|
-
{ immediate: true }
|
|
382
|
+
{ immediate: true },
|
|
387
383
|
);
|
|
388
384
|
|
|
389
|
-
|
|
385
|
+
watch(
|
|
386
|
+
() => itemsProxy.value,
|
|
387
|
+
(newVal) => {
|
|
388
|
+
modified.value = !_.isEqual(newVal, items.value);
|
|
389
|
+
},
|
|
390
|
+
{ deep: true },
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
watch(sort, async (value) => {
|
|
394
|
+
await load({ ...query.value, sort: value });
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
watch(items, (newVal) => {
|
|
398
|
+
itemsProxy.value = newVal;
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
const openDetailsBlade = async () => {
|
|
390
402
|
if (!props.isWidgetView) {
|
|
391
403
|
if (
|
|
392
404
|
scope &&
|
|
@@ -394,7 +406,7 @@ const openDetailsBlade = () => {
|
|
|
394
406
|
toValue(scope).openDetailsBlade &&
|
|
395
407
|
typeof toValue(scope).openDetailsBlade === "function"
|
|
396
408
|
) {
|
|
397
|
-
toValue(scope).openDetailsBlade();
|
|
409
|
+
await toValue(scope).openDetailsBlade();
|
|
398
410
|
}
|
|
399
411
|
} else {
|
|
400
412
|
emit("add");
|
|
@@ -441,10 +453,10 @@ async function removeItems() {
|
|
|
441
453
|
`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.LIST.DELETE_SELECTED_CONFIRMATION.ALL`,
|
|
442
454
|
{
|
|
443
455
|
totalCount: pagination.value.totalCount,
|
|
444
|
-
}
|
|
456
|
+
},
|
|
445
457
|
)
|
|
446
458
|
: selectedIds.value.length,
|
|
447
|
-
})
|
|
459
|
+
}),
|
|
448
460
|
)
|
|
449
461
|
) {
|
|
450
462
|
emit("close:children");
|
|
@@ -530,27 +542,30 @@ async function resetSearch() {
|
|
|
530
542
|
|
|
531
543
|
function templateOverrideComponents(): Record<string, ShallowRef<ConcreteComponent>> {
|
|
532
544
|
return {
|
|
533
|
-
...table
|
|
534
|
-
|
|
535
|
-
if (
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
545
|
+
...table?.value.columns?.reduce(
|
|
546
|
+
(acc, curr) => {
|
|
547
|
+
if ("customTemplate" in curr && curr.customTemplate) {
|
|
548
|
+
if (!("component" in curr.customTemplate)) {
|
|
549
|
+
throw new Error(
|
|
550
|
+
`Component name must be provided in 'customTemplate' property, column: ${JSON.stringify(curr)}`,
|
|
551
|
+
);
|
|
552
|
+
} else if ("component" in curr.customTemplate && curr.customTemplate.component) {
|
|
553
|
+
const component = resolveComponent(curr.customTemplate.component);
|
|
554
|
+
|
|
555
|
+
if (typeof component !== "string") {
|
|
556
|
+
acc[curr.id] = shallowRef(component);
|
|
557
|
+
}
|
|
544
558
|
}
|
|
545
559
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
560
|
+
return acc;
|
|
561
|
+
},
|
|
562
|
+
{} as Record<string, ShallowRef<ConcreteComponent>>,
|
|
563
|
+
),
|
|
549
564
|
};
|
|
550
565
|
}
|
|
551
566
|
|
|
552
567
|
function resolveTemplateComponent(name: keyof ListContentSchema) {
|
|
553
|
-
if (!tableData
|
|
568
|
+
if (!tableData?.value) return;
|
|
554
569
|
const value = tableData.value[name];
|
|
555
570
|
if (value && typeof value === "object" && "component" in value) {
|
|
556
571
|
const componentName = value.component;
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from "./../../../../ui/components";
|
|
11
11
|
import { ITableColumns, IValidationRules } from "../../../../core/types";
|
|
12
12
|
import type { ComponentProps } from "./../../../utilities/vueUtils";
|
|
13
|
+
import { MenuItemConfig } from "../../../components/blade-navigation/types";
|
|
13
14
|
|
|
14
15
|
export type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
15
16
|
|
|
@@ -106,6 +107,20 @@ export interface SettingsBase {
|
|
|
106
107
|
* This option is used to determine which view should be the default view.
|
|
107
108
|
*/
|
|
108
109
|
isWorkspace?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Blade menu item
|
|
112
|
+
* @description If not set - blade will not be added to the menu
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* {
|
|
116
|
+
* title: "Products",
|
|
117
|
+
* icon: "fas fa-box-open",
|
|
118
|
+
* group: "Products",
|
|
119
|
+
* }
|
|
120
|
+
* @type {{title: string, icon: string, path: string/string}}
|
|
121
|
+
* @default undefined
|
|
122
|
+
*/
|
|
123
|
+
menuItem?: MenuItemConfig;
|
|
109
124
|
}
|
|
110
125
|
|
|
111
126
|
export interface ListContentSchema {
|
|
@@ -798,7 +813,7 @@ export interface OverridesUpsert extends OverridesReplace {
|
|
|
798
813
|
export interface OverridesReplace {
|
|
799
814
|
path: string;
|
|
800
815
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
801
|
-
value: ControlSchema | SettingsSchema["toolbar"][number] | string | boolean;
|
|
816
|
+
value: ControlSchema | SettingsSchema["toolbar"][number] | SettingsSchema["menuItem"] | string | boolean;
|
|
802
817
|
id: string;
|
|
803
818
|
}
|
|
804
819
|
|