@vc-shell/framework 1.0.340 → 1.1.0-alpha.2
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 +22 -0
- package/core/api/platform.ts +9883 -9883
- package/core/composables/index.ts +17 -16
- package/core/composables/useApiClient/index.ts +22 -22
- package/core/composables/useBeforeUnload/index.ts +25 -25
- package/core/composables/useFunctions/debounce.ts +16 -16
- package/core/composables/useFunctions/delay.ts +4 -4
- package/core/composables/useFunctions/index.ts +21 -21
- package/core/composables/useFunctions/once.ts +12 -12
- package/core/composables/useFunctions/sleep.ts +4 -4
- package/core/composables/useFunctions/throttle.ts +14 -14
- package/core/composables/useGlobalSearch.ts +44 -0
- package/core/composables/useLanguages/index.ts +78 -78
- package/core/composables/useLoading/index.ts +9 -9
- package/core/composables/useMenuService/index.ts +110 -110
- package/core/composables/useTheme/index.ts +62 -61
- package/core/composables/useWidgets/index.ts +18 -0
- package/core/directives/autofocus/index.ts +9 -9
- package/core/directives/loading/index.ts +30 -1
- package/core/directives/loading/styles.css +36 -7
- package/core/plugins/i18n/index.ts +11 -11
- package/core/plugins/modularity/index.ts +28 -26
- package/core/plugins/moment/humanize.ts +74 -74
- package/core/plugins/moment/index.ts +1 -1
- package/core/plugins/permissions/index.ts +10 -10
- package/core/plugins/validation/index.ts +1 -1
- package/core/plugins/validation/rules.ts +145 -145
- package/core/services/toolbarbus-service.ts +34 -0
- package/core/services/widget-service.ts +130 -0
- package/core/types/index.ts +12 -16
- package/core/types/widget.ts +15 -0
- package/core/utilities/camelToSnake.ts +7 -7
- package/core/utilities/camelize.ts +5 -5
- package/core/utilities/generateId.ts +3 -3
- package/core/utilities/kebabToCamel.ts +7 -7
- package/dist/{asn1-DF4fnRHj.js → asn1-jKiBa2Ya.js} +20 -18
- package/dist/{clike-l4mx49Q1.js → clike-BUuHEmgZ.js} +0 -1
- package/dist/{cobol-CJVkMW0i.js → cobol-BlTKFDRj.js} +0 -1
- package/dist/core/composables/index.d.ts +8 -7
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useGlobalSearch.d.ts +10 -0
- package/dist/core/composables/useGlobalSearch.d.ts.map +1 -0
- package/dist/core/composables/useTheme/index.d.ts.map +1 -1
- package/dist/core/composables/useWidgets/index.d.ts +4 -0
- package/dist/core/composables/useWidgets/index.d.ts.map +1 -0
- package/dist/core/directives/loading/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +7 -7
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/services/toolbarbus-service.d.ts +10 -0
- package/dist/core/services/toolbarbus-service.d.ts.map +1 -0
- package/dist/core/services/widget-service.d.ts +35 -0
- package/dist/core/services/widget-service.d.ts.map +1 -0
- package/dist/core/types/index.d.ts +11 -14
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/widget.d.ts +12 -0
- package/dist/core/types/widget.d.ts.map +1 -0
- package/dist/{dockerfile-CFG_IPGn.js → dockerfile-Bo-KZxHS.js} +1 -1
- package/dist/{factor-DJHfQ4a1.js → factor-Bny6SIz6.js} +1 -1
- package/dist/framework.js +252 -223
- package/dist/{haxe-pdDS1aE8.js → haxe-70NVW1pR.js} +1 -1
- package/dist/{index-Ce86fM2z.js → index-3eLJLrzP.js} +94187 -91660
- package/dist/{index-Dho4-wXM.js → index-B7KsNz2e.js} +8 -8
- package/dist/{index-bAD1-blW.js → index-BbLSuXfB.js} +7 -7
- package/dist/{index-YvFwPxsI.js → index-CUuop2Pm.js} +9 -9
- package/dist/index-D5mVNTjP.js +308 -0
- package/dist/index-D7HzlheD.js +243 -0
- package/dist/{index-lnO7rLKk.js → index-D8YubeMT.js} +9 -9
- package/dist/{index-DSefVRVC.js → index-DQXUkbse.js} +19 -19
- package/dist/{index-n48DzlNW.js → index-DY3kTJtR.js} +9 -9
- package/dist/{index-DK6ijkM9.js → index-DdgLwPZH.js} +171 -162
- package/dist/{index-BXTIkfHT.js → index-DkfZxmI7.js} +42 -42
- package/dist/{index-CV4fOhK1.js → index-Dn54TX9M.js} +6 -6
- package/dist/{index-Dcdjgpoe.js → index-DnpVJexS.js} +5 -5
- package/dist/{index-Ck9pr8TI.js → index-Yc2AandF.js} +16 -16
- package/dist/{index-wsG2MecP.js → index-h6Tp1RYq.js} +7 -7
- package/dist/{index-BON_eF-3.js → index-lE5Ov0XL.js} +9 -9
- package/dist/{index-CT72nbMk.js → index-q2J1GObW.js} +10 -10
- package/dist/index.css +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +10 -0
- package/dist/injection-keys.d.ts.map +1 -0
- package/dist/{javascript-CWGekh08.js → javascript-WMWNx-Vj.js} +1 -1
- package/dist/{livescript-CE_BxZmN.js → livescript-CanGTf8u.js} +25 -25
- package/dist/locales/de.json +5 -2
- package/dist/locales/en.json +3 -1
- package/dist/{mllike-1yy7Y7jE.js → mllike-BSnXJBGA.js} +0 -3
- package/dist/{nsis-BtA0qkjU.js → nsis-BEzMtmb7.js} +1 -1
- package/dist/{pascal-ixanSKUz.js → pascal-De0D6mP7.js} +1 -1
- package/dist/{pug-CW1q1xhQ.js → pug-BqUR2bBq.js} +1 -1
- 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/_internal/vc-mobile-back-button.vue.d.ts +19 -0
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue.d.ts.map +1 -0
- 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 +32 -2
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +5 -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 +9 -0
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/change-password-button/change-password-button.vue.d.ts +3 -0
- package/dist/shared/components/change-password-button/change-password-button.vue.d.ts.map +1 -0
- package/dist/shared/components/change-password-button/index.d.ts +2 -0
- package/dist/shared/components/change-password-button/index.d.ts.map +1 -0
- package/dist/shared/components/generic-dropdown/generic-dropdown.vue.d.ts +122 -0
- package/dist/shared/components/generic-dropdown/generic-dropdown.vue.d.ts.map +1 -0
- package/dist/shared/components/generic-dropdown/index.d.ts +2 -0
- package/dist/shared/components/generic-dropdown/index.d.ts.map +1 -0
- package/dist/shared/components/index.d.ts +2 -1
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/logout-button/index.d.ts +2 -0
- package/dist/shared/components/logout-button/index.d.ts.map +1 -0
- package/dist/shared/components/logout-button/logout-button.vue.d.ts +3 -0
- package/dist/shared/components/logout-button/logout-button.vue.d.ts.map +1 -0
- package/dist/shared/components/notification-dropdown/_internal/notification/index.d.ts +2 -0
- package/dist/shared/components/notification-dropdown/_internal/notification/index.d.ts.map +1 -0
- package/dist/shared/components/notification-dropdown/index.d.ts +13 -1
- package/dist/shared/components/notification-dropdown/index.d.ts.map +1 -1
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts +27 -1
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -1
- package/dist/shared/components/notification-template/index.d.ts +4 -31
- package/dist/shared/components/notification-template/index.d.ts.map +1 -1
- package/dist/shared/components/notification-template/notification-template.vue.d.ts +4 -14
- package/dist/shared/components/notification-template/notification-template.vue.d.ts.map +1 -1
- 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/settings-menu/index.d.ts +2 -0
- package/dist/shared/components/settings-menu/index.d.ts.map +1 -0
- package/dist/shared/components/settings-menu/settings-menu.vue.d.ts +3 -0
- package/dist/shared/components/settings-menu/settings-menu.vue.d.ts.map +1 -0
- package/dist/shared/components/settings-menu-item/index.d.ts +2 -0
- package/dist/shared/components/settings-menu-item/index.d.ts.map +1 -0
- package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts +57 -0
- package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts.map +1 -0
- package/dist/shared/components/sidebar/sidebar.vue.d.ts +7 -2
- package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -1
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/_internal/user-info.vue.d.ts +18 -0
- package/dist/shared/components/user-dropdown-button/_internal/user-info.vue.d.ts.map +1 -0
- package/dist/shared/components/user-dropdown-button/_internal/user-sidebar.vue.d.ts +23 -0
- package/dist/shared/components/user-dropdown-button/_internal/user-sidebar.vue.d.ts.map +1 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts +9 -25
- 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 +1 -18
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/composables/useMenuExpanded.d.ts +5 -0
- package/dist/shared/composables/useMenuExpanded.d.ts.map +1 -0
- package/dist/shared/composables/useSettingsMenu.d.ts +180 -0
- package/dist/shared/composables/useSettingsMenu.d.ts.map +1 -0
- 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.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +16 -16
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +1 -7
- package/dist/shared/modules/dynamic/components/fields/props.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Button.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/Button.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Card.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/Card.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/ContentField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/ContentField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/EditorField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/EditorField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/ImageField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/ImageField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/InputField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/InputField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/RatingField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/RatingField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/SelectField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/SelectField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/StatusField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/StatusField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/VideoField.stories.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/VideoField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +3 -21
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -14
- 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 +3 -17
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +5 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts +10 -10
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +10 -10
- package/dist/{simple-mode-HGTvdazT.js → simple-mode-BqqHn0g6.js} +1 -1
- package/dist/{sql-uoWIYwDX.js → sql-mMre1Bo3.js} +0 -2
- package/dist/tailwind.config.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ttcn-DmjTzZb6.js → ttcn-Bsa4sfRm.js} +20 -22
- package/dist/{ttcn-cfg-B2U3U7dn.js → ttcn-cfg-Bac_acMi.js} +15 -17
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts +156 -156
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +2 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts +24 -24
- package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts +18 -0
- package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts +20 -0
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-icon/index.d.ts +1 -0
- package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts +3 -3
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +3 -2
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-skeleton/vc-skeleton.vue.d.ts +35 -0
- package/dist/ui/components/atoms/vc-skeleton/vc-skeleton.vue.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts +15 -0
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +7 -0
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts +4 -0
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/index.d.ts +6 -0
- package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts +6 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +1 -3
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/index.d.ts +1 -0
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +67 -33
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +25 -11
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts +996 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +332 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.stories.d.ts +3 -3
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts +12 -12
- package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts +24 -24
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts +18 -18
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.stories.d.ts +84 -84
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +12 -12
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.stories.d.ts +240 -240
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +24 -24
- 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 +9 -9
- package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts +9 -9
- package/dist/ui/components/organisms/vc-app/_internal/composables/useAppMenuState.d.ts +23 -0
- package/dist/ui/components/organisms/vc-app/_internal/composables/useAppMenuState.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue.d.ts +24 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue.d.ts +35 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarOverlay.vue.d.ts +29 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarOverlay.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue.d.ts +39 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue.d.ts.map +1 -0
- package/dist/{shared → ui/components/organisms/vc-app/_internal/vc-app-bar}/components/app-bar-button/app-bar-button.vue.d.ts +9 -5
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/composables/useAppBarOverlay.d.ts +19 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/composables/useAppBarOverlay.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts +9 -16
- 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 +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.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts +3 -12
- 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/composables/useToolbarSlots.d.ts +5 -0
- package/dist/ui/components/organisms/vc-app/composables/useToolbarSlots.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/index.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +16 -146
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +16 -146
- 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 +1 -2
- 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-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts +48 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/{vc-blade-toolbar-button → vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button}/vc-blade-toolbar-button.vue.d.ts +10 -4
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts +40 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/desktop/vc-blade-toolbar-desktop.vue.d.ts +19 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/desktop/vc-blade-toolbar-desktop.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/mobile/vc-blade-toolbar-mobile.vue.d.ts +17 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/mobile/vc-blade-toolbar-mobile.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/vc-blade-toolbar-buttons.vue.d.ts +19 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/vc-blade-toolbar-buttons.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts +9 -2
- 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/_internal/vc-blade-widget-container/_internal/index.d.ts +3 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/index.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue.d.ts +16 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts +16 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue.d.ts +15 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts +2 -16
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +56 -2
- 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 +3 -3
- 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 +2 -2
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts +13 -13
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +2 -2
- 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 +2 -1
- 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-desktop-view/_internal/vc-table-body/vc-table-body.vue.d.ts +219 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-body/vc-table-body.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-header/vc-table-header.vue.d.ts +114 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-header/vc-table-header.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts +236 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-select-all-header/vc-table-select-all-header.vue.d.ts +24 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-select-all-header/vc-table-select-all-header.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue.d.ts +315 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
- 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-footer/vc-table-footer.vue.d.ts +44 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-footer/vc-table-footer.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue.d.ts +66 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +6 -13
- 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/_internal/vc-table-mobile-view/vc-table-mobile-view.vue.d.ts +199 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-view/vc-table-mobile-view.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-select-all/vc-table-select-all.vue.d.ts +38 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-select-all/vc-table-select-all.vue.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableActions.d.ts +17 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableActions.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnReorder.d.ts +407 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnReorder.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnResize.d.ts +9 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnResize.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableRowReorder.d.ts +16 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableRowReorder.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableSelection.d.ts +23 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableSelection.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableState.d.ts +19 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableState.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableSwipe.d.ts +12 -0
- package/dist/ui/components/organisms/vc-table/composables/useTableSwipe.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/types.d.ts +19 -0
- package/dist/ui/components/organisms/vc-table/types.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +105 -735
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +49 -142
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/dist/ui/composables/useVisibleElements.d.ts +19 -0
- package/dist/ui/composables/useVisibleElements.d.ts.map +1 -0
- package/dist/{xquery-xQxle02u.js → xquery-BUQdORAS.js} +72 -76
- package/package.json +11 -6
- package/shared/components/app-switcher/components/vc-app-switcher/index.ts +1 -1
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +31 -134
- package/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue +77 -0
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +23 -10
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +30 -6
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +9 -1
- package/shared/components/blade-navigation/types/index.ts +117 -107
- package/shared/components/change-password/change-password.vue +2 -1
- package/shared/components/change-password-button/change-password-button.vue +20 -0
- package/shared/components/change-password-button/index.ts +1 -0
- package/shared/components/error-interceptor/interceptor.ts +44 -44
- package/shared/components/generic-dropdown/generic-dropdown.vue +219 -0
- package/shared/components/generic-dropdown/index.ts +1 -0
- package/shared/components/index.ts +2 -1
- package/shared/components/language-selector/language-selector.vue +56 -65
- package/shared/components/logout-button/index.ts +1 -0
- package/shared/components/logout-button/logout-button.vue +27 -0
- package/shared/components/notification-dropdown/_internal/notification/index.ts +1 -0
- package/shared/components/notification-dropdown/notification-dropdown.vue +44 -74
- package/shared/components/notification-template/notification-template.vue +26 -61
- package/shared/components/notifications/styles/index.scss +10 -10
- package/shared/components/settings-menu/index.ts +1 -0
- package/shared/components/settings-menu/settings-menu.vue +24 -0
- package/shared/components/settings-menu-item/index.ts +1 -0
- package/shared/components/settings-menu-item/settings-menu-item.vue +136 -0
- package/shared/components/sidebar/sidebar.vue +45 -11
- package/shared/components/theme-selector/theme-selector.vue +55 -66
- package/shared/components/user-dropdown-button/_internal/user-info.vue +82 -0
- package/shared/components/user-dropdown-button/_internal/user-sidebar.vue +48 -0
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +73 -289
- package/shared/composables/useMenuExpanded.ts +16 -0
- package/shared/composables/useSettingsMenu.ts +44 -0
- package/shared/modules/assets/index.ts +0 -1
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +0 -1
- package/shared/modules/dynamic/components/FIELD_MAP.ts +53 -53
- package/shared/modules/dynamic/components/SchemaRender.ts +102 -102
- package/shared/modules/dynamic/components/factories.ts +244 -244
- package/shared/modules/dynamic/components/fields/Button.ts +44 -44
- package/shared/modules/dynamic/components/fields/Card.ts +119 -119
- package/shared/modules/dynamic/components/fields/Checkbox.ts +53 -53
- package/shared/modules/dynamic/components/fields/ContentField.ts +33 -33
- package/shared/modules/dynamic/components/fields/CustomComponent.ts +29 -29
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +141 -141
- package/shared/modules/dynamic/components/fields/EditorField.ts +46 -46
- package/shared/modules/dynamic/components/fields/Fieldset.ts +65 -65
- package/shared/modules/dynamic/components/fields/GalleryField.ts +161 -161
- package/shared/modules/dynamic/components/fields/ImageField.ts +35 -35
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +79 -79
- package/shared/modules/dynamic/components/fields/InputField.ts +81 -81
- package/shared/modules/dynamic/components/fields/MultivalueField.ts +68 -68
- package/shared/modules/dynamic/components/fields/RadioButtonGroup.ts +82 -82
- package/shared/modules/dynamic/components/fields/RatingField.ts +28 -28
- package/shared/modules/dynamic/components/fields/SelectField.ts +72 -72
- package/shared/modules/dynamic/components/fields/StatusField.ts +110 -110
- package/shared/modules/dynamic/components/fields/SwitchField.ts +29 -29
- package/shared/modules/dynamic/components/fields/Table.ts +1 -2
- package/shared/modules/dynamic/components/fields/TextareaField.ts +46 -46
- package/shared/modules/dynamic/components/fields/ValidationField.ts +54 -54
- package/shared/modules/dynamic/components/fields/VideoField.ts +30 -30
- package/shared/modules/dynamic/components/fields/props.ts +39 -39
- package/shared/modules/dynamic/components/fields/storybook/Button.stories.ts +247 -247
- package/shared/modules/dynamic/components/fields/storybook/Card.stories.ts +176 -176
- package/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.ts +185 -185
- package/shared/modules/dynamic/components/fields/storybook/ContentField.stories.ts +245 -245
- package/shared/modules/dynamic/components/fields/storybook/EditorField.stories.ts +192 -192
- package/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.ts +347 -347
- package/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.ts +239 -239
- package/shared/modules/dynamic/components/fields/storybook/ImageField.stories.ts +186 -186
- package/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.ts +281 -281
- package/shared/modules/dynamic/components/fields/storybook/InputField.stories.ts +312 -312
- package/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.ts +361 -361
- package/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.ts +224 -224
- package/shared/modules/dynamic/components/fields/storybook/RatingField.stories.ts +131 -131
- package/shared/modules/dynamic/components/fields/storybook/SelectField.stories.ts +666 -666
- package/shared/modules/dynamic/components/fields/storybook/StatusField.stories.ts +202 -202
- package/shared/modules/dynamic/components/fields/storybook/SwitchField.stories.ts +178 -178
- package/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.ts +203 -203
- package/shared/modules/dynamic/components/fields/storybook/VideoField.stories.ts +92 -92
- package/shared/modules/dynamic/components/fields/storybook/common/args.ts +130 -130
- package/shared/modules/dynamic/components/fields/storybook/common/templates.ts +8 -8
- package/shared/modules/dynamic/components/index.ts +4 -4
- package/shared/modules/dynamic/composables/index.ts +4 -4
- package/shared/modules/dynamic/composables/useDynamicViewsUtils/index.ts +46 -46
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +31 -22
- package/shared/modules/dynamic/composables/useTableTemplates/index.ts +67 -67
- package/shared/modules/dynamic/composables/useToolbarReducer/index.ts +70 -70
- package/shared/modules/dynamic/factories/base/useDetailsFactory.ts +144 -144
- package/shared/modules/dynamic/factories/base/useListFactory.ts +68 -68
- package/shared/modules/dynamic/factories/index.ts +4 -4
- package/shared/modules/dynamic/factories/types/index.ts +229 -229
- package/shared/modules/dynamic/helpers/getters.ts +12 -12
- package/shared/modules/dynamic/helpers/methodHandler.ts +22 -22
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +242 -242
- package/shared/modules/dynamic/helpers/override.ts +153 -153
- package/shared/modules/dynamic/helpers/safeIn.ts +6 -6
- package/shared/modules/dynamic/helpers/setters.ts +24 -24
- package/shared/modules/dynamic/helpers/unrefNested.ts +14 -14
- package/shared/modules/dynamic/helpers/unwrapInterpolation.ts +16 -16
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +69 -31
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +17 -16
- package/shared/modules/dynamic/types/index.ts +5 -0
- package/shared/pages/ChangePasswordPage/components/change-password/index.ts +3 -3
- package/shared/pages/ChangePasswordPage/components/index.ts +1 -1
- package/shared/pages/ChangePasswordPage/index.ts +1 -1
- package/shared/pages/ChangePasswordPage/plugin.ts +4 -4
- package/shared/pages/InvitePage/components/index.ts +1 -1
- package/shared/pages/InvitePage/components/invite/Invite.vue +216 -216
- package/shared/pages/InvitePage/components/invite/index.ts +3 -3
- package/shared/pages/InvitePage/index.ts +1 -1
- package/shared/pages/InvitePage/plugin.ts +4 -4
- package/shared/pages/LoginPage/components/index.ts +1 -1
- package/shared/pages/LoginPage/components/login/index.ts +3 -3
- package/shared/pages/LoginPage/index.ts +1 -1
- package/shared/pages/LoginPage/plugin.ts +4 -4
- package/shared/pages/ResetPasswordPage/components/index.ts +1 -1
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +218 -218
- package/shared/pages/ResetPasswordPage/components/reset-password/index.ts +3 -3
- package/shared/pages/ResetPasswordPage/index.ts +1 -1
- package/shared/pages/ResetPasswordPage/plugin.ts +4 -4
- package/shared/pages/index.ts +4 -4
- package/shared/pages/plugin.ts +4 -4
- package/shared/utilities/assets.ts +42 -42
- package/shared/utilities/vueUtils.ts +50 -50
- package/tailwind.config.ts +126 -126
- package/ui/components/atoms/vc-badge/index.ts +1 -1
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +53 -53
- package/ui/components/atoms/vc-badge/vc-badge.vue +10 -9
- package/ui/components/atoms/vc-button/vc-button.vue +2 -2
- package/ui/components/atoms/vc-card/index.ts +3 -3
- package/ui/components/atoms/vc-card/vc-card.stories.ts +102 -102
- package/ui/components/atoms/vc-card/vc-card.vue +159 -162
- package/ui/components/atoms/vc-col/index.ts +1 -1
- package/ui/components/atoms/vc-col/vc-col.stories.ts +22 -22
- package/ui/components/atoms/vc-col/vc-col.vue +29 -29
- package/ui/components/atoms/vc-container/index.ts +10 -10
- package/ui/components/atoms/vc-container/vc-container.stories.ts +29 -29
- package/ui/components/atoms/vc-hint/index.ts +10 -10
- package/ui/components/atoms/vc-hint/vc-hint.stories.ts +23 -23
- package/ui/components/atoms/vc-hint/vc-hint.vue +17 -17
- package/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue +15 -0
- package/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue +20 -0
- package/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue +13 -0
- package/ui/components/atoms/vc-icon/icons/BellIcon.vue +14 -0
- package/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue +13 -0
- package/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue +13 -0
- package/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue +13 -0
- package/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue +13 -0
- package/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue +16 -0
- package/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue +20 -0
- package/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue +14 -0
- package/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue +14 -0
- package/ui/components/atoms/vc-icon/icons/LogoutIcon.vue +13 -0
- package/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue +20 -0
- package/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue +14 -0
- package/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue +20 -0
- package/ui/components/atoms/vc-icon/icons/SearchIcon.vue +14 -0
- package/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue +21 -0
- package/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue +19 -0
- package/ui/components/atoms/vc-icon/icons/index.ts +19 -0
- package/ui/components/atoms/vc-icon/index.ts +1 -0
- package/ui/components/atoms/vc-icon/vc-icon.vue +82 -49
- package/ui/components/atoms/vc-image/index.ts +1 -1
- package/ui/components/atoms/vc-image/vc-image.stories.ts +85 -85
- package/ui/components/atoms/vc-label/index.ts +1 -1
- package/ui/components/atoms/vc-label/vc-label.stories.ts +31 -31
- package/ui/components/atoms/vc-label/vc-label.vue +92 -92
- package/ui/components/atoms/vc-link/index.ts +10 -10
- package/ui/components/atoms/vc-link/vc-link.stories.ts +37 -37
- package/ui/components/atoms/vc-link/vc-link.vue +54 -54
- package/ui/components/atoms/vc-loading/index.ts +3 -3
- package/ui/components/atoms/vc-loading/vc-loading.stories.ts +18 -18
- package/ui/components/atoms/vc-loading/vc-loading.vue +58 -58
- package/ui/components/atoms/vc-progress/index.ts +10 -10
- package/ui/components/atoms/vc-progress/vc-progress.stories.ts +30 -30
- package/ui/components/atoms/vc-progress/vc-progress.vue +68 -68
- package/ui/components/atoms/vc-row/index.ts +1 -1
- package/ui/components/atoms/vc-row/vc-row.stories.ts +20 -20
- package/ui/components/atoms/vc-row/vc-row.vue +22 -22
- package/ui/components/atoms/vc-skeleton/vc-skeleton.vue +51 -0
- package/ui/components/atoms/vc-status/index.ts +1 -1
- package/ui/components/atoms/vc-status/vc-status.stories.ts +85 -85
- package/ui/components/atoms/vc-status/vc-status.vue +64 -17
- package/ui/components/atoms/vc-status-icon/index.ts +1 -1
- package/ui/components/atoms/vc-switch/index.ts +1 -1
- package/ui/components/atoms/vc-tooltip/index.ts +1 -1
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +26 -11
- package/ui/components/atoms/vc-video/index.ts +1 -1
- package/ui/components/atoms/vc-video/vc-video.stories.ts +19 -19
- package/ui/components/atoms/vc-widget/index.ts +3 -3
- package/ui/components/atoms/vc-widget/vc-widget.stories.ts +20 -20
- package/ui/components/atoms/vc-widget/vc-widget.vue +86 -59
- package/ui/components/index.ts +2 -0
- package/ui/components/molecules/index.ts +16 -16
- package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +89 -92
- package/ui/components/molecules/vc-breadcrumbs/index.ts +1 -1
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +43 -43
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +157 -121
- package/ui/components/molecules/vc-checkbox/index.ts +3 -3
- package/ui/components/molecules/vc-checkbox/vc-checkbox.stories.ts +84 -84
- package/ui/components/molecules/vc-editor/index.ts +1 -1
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +29 -29
- package/ui/components/molecules/vc-editor/vc-editor.vue +2 -2
- package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +96 -96
- package/ui/components/molecules/vc-field/index.ts +1 -1
- package/ui/components/molecules/vc-field/vc-field.stories.ts +114 -114
- package/ui/components/molecules/vc-file-upload/index.ts +1 -1
- package/ui/components/molecules/vc-file-upload/vc-file-upload.stories.ts +39 -39
- package/ui/components/molecules/vc-form/index.ts +10 -10
- package/ui/components/molecules/vc-form/vc-form.stories.ts +25 -25
- package/ui/components/molecules/vc-form/vc-form.vue +5 -5
- package/ui/components/molecules/vc-input/index.ts +1 -1
- package/ui/components/molecules/vc-input/vc-input.stories.ts +165 -165
- package/ui/components/molecules/vc-input-currency/index.ts +1 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +83 -83
- package/ui/components/molecules/vc-multivalue/index.ts +1 -1
- package/ui/components/molecules/vc-multivalue/vc-multivalue.stories.ts +120 -120
- package/ui/components/molecules/vc-notification/index.ts +1 -1
- package/ui/components/molecules/vc-pagination/index.ts +3 -3
- package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +24 -24
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +48 -110
- package/ui/components/molecules/vc-radio-button/index.ts +1 -1
- package/ui/components/molecules/vc-radio-button/vc-radio-button.stories.ts +97 -97
- package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +192 -192
- package/ui/components/molecules/vc-rating/index.ts +1 -1
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +59 -59
- package/ui/components/molecules/vc-select/index.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.stories.ts +685 -685
- package/ui/components/molecules/vc-slider/index.ts +13 -13
- package/ui/components/molecules/vc-slider/vc-slider.stories.ts +61 -61
- package/ui/components/molecules/vc-slider/vc-slider.vue +118 -118
- package/ui/components/molecules/vc-textarea/index.ts +1 -1
- package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +53 -53
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +151 -151
- package/ui/components/organisms/index.ts +7 -7
- package/ui/components/organisms/vc-app/_internal/composables/useAppMenuState.ts +49 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarContent.vue +47 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarHeader.vue +175 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarOverlay.vue +87 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue +171 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/components/app-bar-button/app-bar-button.vue +213 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/composables/useAppBarOverlay.ts +78 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +216 -148
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +133 -109
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +80 -128
- package/ui/components/organisms/vc-app/composables/useToolbarSlots.ts +37 -0
- package/ui/components/organisms/vc-app/index.ts +1 -0
- package/ui/components/organisms/vc-app/vc-app.stories.ts +214 -214
- package/ui/components/organisms/vc-app/vc-app.vue +105 -90
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +137 -87
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue +136 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/{vc-blade-toolbar-button → vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button}/vc-blade-toolbar-button.vue +61 -85
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue +101 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/desktop/vc-blade-toolbar-desktop.vue +182 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/mobile/vc-blade-toolbar-mobile.vue +146 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/vc-blade-toolbar-buttons.vue +32 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +32 -47
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/index.ts +2 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue +96 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +181 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue +113 -0
- package/ui/components/organisms/vc-blade/index.ts +1 -1
- package/ui/components/organisms/vc-blade/vc-blade.stories.ts +83 -83
- package/ui/components/organisms/vc-blade/vc-blade.vue +170 -115
- package/ui/components/organisms/vc-dynamic-property/index.ts +1 -1
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +163 -163
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +166 -166
- package/ui/components/organisms/vc-gallery/index.ts +1 -1
- package/ui/components/organisms/vc-gallery/vc-gallery.stories.ts +91 -91
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +348 -348
- package/ui/components/organisms/vc-login-form/index.ts +1 -1
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +99 -99
- package/ui/components/organisms/vc-popup/index.ts +3 -3
- package/ui/components/organisms/vc-popup/vc-popup.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue +63 -63
- package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue +22 -16
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +5 -5
- package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +2 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +3 -2
- package/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-body/vc-table-body.vue +134 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-header/vc-table-header.vue +244 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue +237 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-select-all-header/vc-table-select-all-header.vue +54 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue +215 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +58 -31
- package/ui/components/organisms/vc-table/_internal/vc-table-footer/vc-table-footer.vue +70 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue +106 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +46 -68
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-view/vc-table-mobile-view.vue +343 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-select-all/vc-table-select-all.vue +118 -0
- package/ui/components/organisms/vc-table/composables/useTableActions.ts +56 -0
- package/ui/components/organisms/vc-table/composables/useTableColumnReorder.ts +255 -0
- package/ui/components/organisms/vc-table/composables/useTableColumnResize.ts +147 -0
- package/ui/components/organisms/vc-table/composables/useTableRowReorder.ts +174 -0
- package/ui/components/organisms/vc-table/composables/useTableSelection.ts +118 -0
- package/ui/components/organisms/vc-table/composables/useTableState.ts +229 -0
- package/ui/components/organisms/vc-table/composables/useTableSwipe.ts +32 -0
- package/ui/components/organisms/vc-table/index.ts +1 -1
- package/ui/components/organisms/vc-table/types.ts +25 -0
- package/ui/components/organisms/vc-table/vc-table.stories.ts +214 -214
- package/ui/components/organisms/vc-table/vc-table.vue +271 -1264
- package/ui/composables/useVisibleElements.ts +146 -0
- package/dist/index-DiJJUsG2.js +0 -243
- package/dist/index-PaekRinB.js +0 -312
- package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts.map +0 -1
- package/dist/shared/components/app-bar-button/index.d.ts +0 -2
- package/dist/shared/components/app-bar-button/index.d.ts.map +0 -1
- package/dist/shared/components/blade-navigation/injectionKeys.d.ts +0 -4
- package/dist/shared/components/blade-navigation/injectionKeys.d.ts.map +0 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +0 -1
- package/shared/components/app-bar-button/app-bar-button.vue +0 -169
- package/shared/components/app-bar-button/index.ts +0 -1
- package/shared/components/blade-navigation/injectionKeys.ts +0 -4
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import * as _ from "lodash-es";
|
|
2
|
-
import { default as moment, Duration, RelativeTimeKey } from "moment";
|
|
3
|
-
|
|
4
|
-
type momentUnit = Extract<moment.RelativeTimeKey, "s" | "m" | "h" | "d" | "w" | "M" | "y">;
|
|
5
|
-
|
|
6
|
-
const momentUnits: momentUnit[] = ["s", "m", "h", "d", "w", "M", "y"];
|
|
7
|
-
|
|
8
|
-
const intlUnits = ["second", "minute", "hour", "day", "week", "month", "year"];
|
|
9
|
-
|
|
10
|
-
const intlNumberFormats = intlUnits.map((intlUnit) =>
|
|
11
|
-
Intl?.NumberFormat(moment.locale(), {
|
|
12
|
-
style: "unit",
|
|
13
|
-
unit: intlUnit,
|
|
14
|
-
unitDisplay: "long",
|
|
15
|
-
}),
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
const getIntlNumberFormat = (unit: momentUnit) => {
|
|
19
|
-
return intlNumberFormats[momentUnits.indexOf(unit)];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// Workaround because of lacking precise (1 hour 42 minutes 35 seconds)
|
|
23
|
-
// duration formatting in moment and Intl
|
|
24
|
-
export function humanize(this: Duration & number, withSuffix?: boolean): string {
|
|
25
|
-
const localeData = moment.localeData();
|
|
26
|
-
|
|
27
|
-
const units = _.clone(momentUnits);
|
|
28
|
-
const lastUnit = units.pop();
|
|
29
|
-
|
|
30
|
-
// format string as "value unit" (e.g. "35", "ss" => "35 seconds", "1", "dd" => "1 day")
|
|
31
|
-
const humanize = (unit: momentUnit, value: number) => {
|
|
32
|
-
// Use Intl if available to get proper formatting and pluralization:
|
|
33
|
-
// Intl: 1 day, 2 days
|
|
34
|
-
// moment: a day, 2 days
|
|
35
|
-
return Intl
|
|
36
|
-
? getIntlNumberFormat(unit).format(value)
|
|
37
|
-
: localeData.relativeTime(
|
|
38
|
-
value,
|
|
39
|
-
true,
|
|
40
|
-
value === 1 ? unit : ((unit + unit) as RelativeTimeKey), // pluralize
|
|
41
|
-
this > 0,
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// convert duration to the map
|
|
46
|
-
// "1:42:35" => [{ key: "ss", value: 35 }, { key: "mm", value: 42 }, { key: "hh", value: 1 }]
|
|
47
|
-
let map = units.map((unit) => ({
|
|
48
|
-
unit,
|
|
49
|
-
value: this.get(unit),
|
|
50
|
-
}));
|
|
51
|
-
// add value of last unit as double-precision float, if it's greater than 0
|
|
52
|
-
map.push({
|
|
53
|
-
unit: lastUnit as momentUnit,
|
|
54
|
-
value: this.get(lastUnit as momentUnit) > 0 ? this.as(lastUnit as momentUnit) : 0,
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
// drop zero values from the beginning and the end of the array
|
|
58
|
-
// [{ y: 0 }, { m: 0 }, { d: 0 }, { h: 1 }, { m: 42 }, { s: 0 }] => [{ h: 1 }, { m: 42 }]
|
|
59
|
-
const isZeroValue = (item: { value: number }) => item.value === 0;
|
|
60
|
-
map = _.chain(map).dropWhile(isZeroValue).dropRightWhile(isZeroValue).value();
|
|
61
|
-
|
|
62
|
-
// convert map to array of formatted strings
|
|
63
|
-
// [{ key: "mm", value: 42 }, { key: "hh", value: 1 }] => ["42 minutes", "1 hour"]
|
|
64
|
-
const values = map.map((entry) => humanize(entry.unit, entry.value));
|
|
65
|
-
|
|
66
|
-
// ["42 minutes", "1 hour"] => "1 hour 42 minutes"
|
|
67
|
-
let result = values.reverse().join(" ");
|
|
68
|
-
|
|
69
|
-
if (withSuffix) {
|
|
70
|
-
result = localeData.pastFuture(this, result);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return result;
|
|
74
|
-
}
|
|
1
|
+
import * as _ from "lodash-es";
|
|
2
|
+
import { default as moment, Duration, RelativeTimeKey } from "moment";
|
|
3
|
+
|
|
4
|
+
type momentUnit = Extract<moment.RelativeTimeKey, "s" | "m" | "h" | "d" | "w" | "M" | "y">;
|
|
5
|
+
|
|
6
|
+
const momentUnits: momentUnit[] = ["s", "m", "h", "d", "w", "M", "y"];
|
|
7
|
+
|
|
8
|
+
const intlUnits = ["second", "minute", "hour", "day", "week", "month", "year"];
|
|
9
|
+
|
|
10
|
+
const intlNumberFormats = intlUnits.map((intlUnit) =>
|
|
11
|
+
Intl?.NumberFormat(moment.locale(), {
|
|
12
|
+
style: "unit",
|
|
13
|
+
unit: intlUnit,
|
|
14
|
+
unitDisplay: "long",
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const getIntlNumberFormat = (unit: momentUnit) => {
|
|
19
|
+
return intlNumberFormats[momentUnits.indexOf(unit)];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Workaround because of lacking precise (1 hour 42 minutes 35 seconds)
|
|
23
|
+
// duration formatting in moment and Intl
|
|
24
|
+
export function humanize(this: Duration & number, withSuffix?: boolean): string {
|
|
25
|
+
const localeData = moment.localeData();
|
|
26
|
+
|
|
27
|
+
const units = _.clone(momentUnits);
|
|
28
|
+
const lastUnit = units.pop();
|
|
29
|
+
|
|
30
|
+
// format string as "value unit" (e.g. "35", "ss" => "35 seconds", "1", "dd" => "1 day")
|
|
31
|
+
const humanize = (unit: momentUnit, value: number) => {
|
|
32
|
+
// Use Intl if available to get proper formatting and pluralization:
|
|
33
|
+
// Intl: 1 day, 2 days
|
|
34
|
+
// moment: a day, 2 days
|
|
35
|
+
return Intl
|
|
36
|
+
? getIntlNumberFormat(unit).format(value)
|
|
37
|
+
: localeData.relativeTime(
|
|
38
|
+
value,
|
|
39
|
+
true,
|
|
40
|
+
value === 1 ? unit : ((unit + unit) as RelativeTimeKey), // pluralize
|
|
41
|
+
this > 0,
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// convert duration to the map
|
|
46
|
+
// "1:42:35" => [{ key: "ss", value: 35 }, { key: "mm", value: 42 }, { key: "hh", value: 1 }]
|
|
47
|
+
let map = units.map((unit) => ({
|
|
48
|
+
unit,
|
|
49
|
+
value: this.get(unit),
|
|
50
|
+
}));
|
|
51
|
+
// add value of last unit as double-precision float, if it's greater than 0
|
|
52
|
+
map.push({
|
|
53
|
+
unit: lastUnit as momentUnit,
|
|
54
|
+
value: this.get(lastUnit as momentUnit) > 0 ? this.as(lastUnit as momentUnit) : 0,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// drop zero values from the beginning and the end of the array
|
|
58
|
+
// [{ y: 0 }, { m: 0 }, { d: 0 }, { h: 1 }, { m: 42 }, { s: 0 }] => [{ h: 1 }, { m: 42 }]
|
|
59
|
+
const isZeroValue = (item: { value: number }) => item.value === 0;
|
|
60
|
+
map = _.chain(map).dropWhile(isZeroValue).dropRightWhile(isZeroValue).value();
|
|
61
|
+
|
|
62
|
+
// convert map to array of formatted strings
|
|
63
|
+
// [{ key: "mm", value: 42 }, { key: "hh", value: 1 }] => ["42 minutes", "1 hour"]
|
|
64
|
+
const values = map.map((entry) => humanize(entry.unit, entry.value));
|
|
65
|
+
|
|
66
|
+
// ["42 minutes", "1 hour"] => "1 hour 42 minutes"
|
|
67
|
+
let result = values.reverse().join(" ");
|
|
68
|
+
|
|
69
|
+
if (withSuffix) {
|
|
70
|
+
result = localeData.pastFuture(this, result);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as moment } from "./moment";
|
|
1
|
+
export { default as moment } from "./moment";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { usePermissions } from "./../../composables";
|
|
2
|
-
import { App } from "vue";
|
|
3
|
-
|
|
4
|
-
export const permissions = {
|
|
5
|
-
install(app: App) {
|
|
6
|
-
const { hasAccess } = usePermissions();
|
|
7
|
-
app.config.globalProperties.$hasAccess = hasAccess;
|
|
8
|
-
app.provide("$hasAccess", hasAccess);
|
|
9
|
-
},
|
|
10
|
-
};
|
|
1
|
+
import { usePermissions } from "./../../composables";
|
|
2
|
+
import { App } from "vue";
|
|
3
|
+
|
|
4
|
+
export const permissions = {
|
|
5
|
+
install(app: App) {
|
|
6
|
+
const { hasAccess } = usePermissions();
|
|
7
|
+
app.config.globalProperties.$hasAccess = hasAccess;
|
|
8
|
+
app.provide("$hasAccess", hasAccess);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./rules";
|
|
1
|
+
export * from "./rules";
|
|
@@ -1,145 +1,145 @@
|
|
|
1
|
-
import { i18n } from "..";
|
|
2
|
-
import { defineRule } from "vee-validate";
|
|
3
|
-
import { all } from "@vee-validate/rules";
|
|
4
|
-
|
|
5
|
-
Object.keys(all).forEach((rule: string) => {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
-
defineRule(rule, (all as Record<string, any>)[rule]);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Check if an image dimension larger than a given size.
|
|
12
|
-
*/
|
|
13
|
-
export const mindimensions = (images: HTMLInputElement, [width, height]: [string | number, string | number]) => {
|
|
14
|
-
// The field is empty so it should pass
|
|
15
|
-
if (!images?.files || !images.files?.length) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const validateImage = (file: File, width: string | number, height: string | number) => {
|
|
20
|
-
const URL = window.URL || window.webkitURL;
|
|
21
|
-
return new Promise((resolve) => {
|
|
22
|
-
const image = new Image();
|
|
23
|
-
image.onerror = () => resolve(false);
|
|
24
|
-
image.onload = () => {
|
|
25
|
-
const isValid = image.width >= Number(width) && image.height >= Number(height);
|
|
26
|
-
if (isValid) {
|
|
27
|
-
resolve(true);
|
|
28
|
-
} else {
|
|
29
|
-
resolve(i18n.global.t("messages.min_dimensions.error", { width, height }));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
image.src = URL.createObjectURL(file);
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
const list = [];
|
|
37
|
-
const fileList = images.files;
|
|
38
|
-
for (let i = 0; i < fileList.length; i++) {
|
|
39
|
-
if (!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(fileList[i].name)) {
|
|
40
|
-
return Promise.resolve(i18n.global.t("messages.min_dimensions.not_image_error"));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
list.push(fileList[i]);
|
|
44
|
-
}
|
|
45
|
-
return Promise.all(list.map((file) => validateImage(file, width, height))).then((res) => {
|
|
46
|
-
const isInvalid = res.find((x) => x !== true);
|
|
47
|
-
if (isInvalid === false || typeof isInvalid === "string") {
|
|
48
|
-
return isInvalid;
|
|
49
|
-
} else {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
defineRule("mindimensions", mindimensions);
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Check if image not exceeding a given size in kilobytes
|
|
59
|
-
*/
|
|
60
|
-
export const fileWeight = (file: HTMLInputElement, [size]: [number]) => {
|
|
61
|
-
if (!file?.files || !file.files?.length) {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const maxSize = size * 1000;
|
|
66
|
-
|
|
67
|
-
const fileSizeChecker = (file: File) => {
|
|
68
|
-
return file.size > maxSize;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const list = [];
|
|
72
|
-
for (let i = 0; i < file.files.length; i++) {
|
|
73
|
-
list.push(file.files[i]);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const checker = list.map((x) => fileSizeChecker(x));
|
|
77
|
-
|
|
78
|
-
const isInvalid = checker.find((x) => x === true);
|
|
79
|
-
if (isInvalid) {
|
|
80
|
-
return i18n.global.t("messages.file_weight", { size });
|
|
81
|
-
} else {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
defineRule("fileWeight", fileWeight);
|
|
87
|
-
|
|
88
|
-
const compare = (
|
|
89
|
-
value: string | Date,
|
|
90
|
-
[target]: string[] | Date[],
|
|
91
|
-
comparer: (first: number, second: number) => boolean,
|
|
92
|
-
errorMessage: string,
|
|
93
|
-
): boolean | string => {
|
|
94
|
-
// The field is empty so it should pass
|
|
95
|
-
if (!value || (typeof value == "string" && !value.length)) {
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
let first_date;
|
|
100
|
-
let second_date;
|
|
101
|
-
if (value instanceof Date) {
|
|
102
|
-
first_date = value;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (target instanceof Date) {
|
|
106
|
-
second_date = target;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (typeof value === "string") {
|
|
110
|
-
first_date = new Date(value);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (typeof target === "string") {
|
|
114
|
-
second_date = new Date(target);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (first_date?.getTime && first_date?.getTime() > 0 && second_date?.getTime && second_date?.getTime() > 0) {
|
|
118
|
-
if (comparer(second_date.getTime(), first_date.getTime())) {
|
|
119
|
-
return errorMessage;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return true;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
// before
|
|
127
|
-
export const before = (value: string, [target]: string[]) =>
|
|
128
|
-
compare(value, [target], (first, second) => first < second, i18n.global.t("messages.before"));
|
|
129
|
-
defineRule("before", before);
|
|
130
|
-
|
|
131
|
-
// after
|
|
132
|
-
export const after = (value: string, [target]: string[]) =>
|
|
133
|
-
compare(value, [target], (first, second) => first > second, i18n.global.t("messages.after"));
|
|
134
|
-
|
|
135
|
-
defineRule("after", after);
|
|
136
|
-
|
|
137
|
-
export const bigInt = (value: string) => {
|
|
138
|
-
if (Number.isSafeInteger(parseInt(value))) {
|
|
139
|
-
return true;
|
|
140
|
-
} else {
|
|
141
|
-
return i18n.global.t("messages.bigint");
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
defineRule("bigint", bigInt);
|
|
1
|
+
import { i18n } from "..";
|
|
2
|
+
import { defineRule } from "vee-validate";
|
|
3
|
+
import { all } from "@vee-validate/rules";
|
|
4
|
+
|
|
5
|
+
Object.keys(all).forEach((rule: string) => {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
defineRule(rule, (all as Record<string, any>)[rule]);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Check if an image dimension larger than a given size.
|
|
12
|
+
*/
|
|
13
|
+
export const mindimensions = (images: HTMLInputElement, [width, height]: [string | number, string | number]) => {
|
|
14
|
+
// The field is empty so it should pass
|
|
15
|
+
if (!images?.files || !images.files?.length) {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const validateImage = (file: File, width: string | number, height: string | number) => {
|
|
20
|
+
const URL = window.URL || window.webkitURL;
|
|
21
|
+
return new Promise((resolve) => {
|
|
22
|
+
const image = new Image();
|
|
23
|
+
image.onerror = () => resolve(false);
|
|
24
|
+
image.onload = () => {
|
|
25
|
+
const isValid = image.width >= Number(width) && image.height >= Number(height);
|
|
26
|
+
if (isValid) {
|
|
27
|
+
resolve(true);
|
|
28
|
+
} else {
|
|
29
|
+
resolve(i18n.global.t("messages.min_dimensions.error", { width, height }));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
image.src = URL.createObjectURL(file);
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const list = [];
|
|
37
|
+
const fileList = images.files;
|
|
38
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
39
|
+
if (!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(fileList[i].name)) {
|
|
40
|
+
return Promise.resolve(i18n.global.t("messages.min_dimensions.not_image_error"));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
list.push(fileList[i]);
|
|
44
|
+
}
|
|
45
|
+
return Promise.all(list.map((file) => validateImage(file, width, height))).then((res) => {
|
|
46
|
+
const isInvalid = res.find((x) => x !== true);
|
|
47
|
+
if (isInvalid === false || typeof isInvalid === "string") {
|
|
48
|
+
return isInvalid;
|
|
49
|
+
} else {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
defineRule("mindimensions", mindimensions);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if image not exceeding a given size in kilobytes
|
|
59
|
+
*/
|
|
60
|
+
export const fileWeight = (file: HTMLInputElement, [size]: [number]) => {
|
|
61
|
+
if (!file?.files || !file.files?.length) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const maxSize = size * 1000;
|
|
66
|
+
|
|
67
|
+
const fileSizeChecker = (file: File) => {
|
|
68
|
+
return file.size > maxSize;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const list = [];
|
|
72
|
+
for (let i = 0; i < file.files.length; i++) {
|
|
73
|
+
list.push(file.files[i]);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const checker = list.map((x) => fileSizeChecker(x));
|
|
77
|
+
|
|
78
|
+
const isInvalid = checker.find((x) => x === true);
|
|
79
|
+
if (isInvalid) {
|
|
80
|
+
return i18n.global.t("messages.file_weight", { size });
|
|
81
|
+
} else {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
defineRule("fileWeight", fileWeight);
|
|
87
|
+
|
|
88
|
+
const compare = (
|
|
89
|
+
value: string | Date,
|
|
90
|
+
[target]: string[] | Date[],
|
|
91
|
+
comparer: (first: number, second: number) => boolean,
|
|
92
|
+
errorMessage: string,
|
|
93
|
+
): boolean | string => {
|
|
94
|
+
// The field is empty so it should pass
|
|
95
|
+
if (!value || (typeof value == "string" && !value.length)) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let first_date;
|
|
100
|
+
let second_date;
|
|
101
|
+
if (value instanceof Date) {
|
|
102
|
+
first_date = value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (target instanceof Date) {
|
|
106
|
+
second_date = target;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (typeof value === "string") {
|
|
110
|
+
first_date = new Date(value);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (typeof target === "string") {
|
|
114
|
+
second_date = new Date(target);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (first_date?.getTime && first_date?.getTime() > 0 && second_date?.getTime && second_date?.getTime() > 0) {
|
|
118
|
+
if (comparer(second_date.getTime(), first_date.getTime())) {
|
|
119
|
+
return errorMessage;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return true;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// before
|
|
127
|
+
export const before = (value: string, [target]: string[]) =>
|
|
128
|
+
compare(value, [target], (first, second) => first < second, i18n.global.t("messages.before"));
|
|
129
|
+
defineRule("before", before);
|
|
130
|
+
|
|
131
|
+
// after
|
|
132
|
+
export const after = (value: string, [target]: string[]) =>
|
|
133
|
+
compare(value, [target], (first, second) => first > second, i18n.global.t("messages.after"));
|
|
134
|
+
|
|
135
|
+
defineRule("after", after);
|
|
136
|
+
|
|
137
|
+
export const bigInt = (value: string) => {
|
|
138
|
+
if (Number.isSafeInteger(parseInt(value))) {
|
|
139
|
+
return true;
|
|
140
|
+
} else {
|
|
141
|
+
return i18n.global.t("messages.bigint");
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
defineRule("bigint", bigInt);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { shallowRef, Component, ref, markRaw, ShallowRef, Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
export interface ToolbarBus {
|
|
4
|
+
content: ShallowRef<Component | null>;
|
|
5
|
+
metadata: Ref<Record<string, unknown>>;
|
|
6
|
+
setContent: (content: Component | null, meta?: Record<string, unknown>) => void;
|
|
7
|
+
clearContent: () => void;
|
|
8
|
+
hasContent: () => boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function createToolbarBus(): ToolbarBus {
|
|
12
|
+
const content = shallowRef<Component | null>(null);
|
|
13
|
+
const metadata = ref<Record<string, unknown>>({});
|
|
14
|
+
|
|
15
|
+
const setContent = (newContent: Component | null, meta: Record<string, unknown> = {}) => {
|
|
16
|
+
content.value = newContent ? markRaw(newContent) : null;
|
|
17
|
+
metadata.value = meta;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const clearContent = () => {
|
|
21
|
+
content.value = null;
|
|
22
|
+
metadata.value = {};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const hasContent = () => content.value !== null;
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
content,
|
|
29
|
+
metadata,
|
|
30
|
+
setContent,
|
|
31
|
+
clearContent,
|
|
32
|
+
hasContent,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ConcreteComponent, reactive, ref, ComponentInternalInstance, watch } from "vue";
|
|
2
|
+
|
|
3
|
+
export type WidgetEventHandler = (...args: unknown[]) => void;
|
|
4
|
+
|
|
5
|
+
export interface IWidgetEvents {
|
|
6
|
+
[key: string]: Set<WidgetEventHandler>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IWidget {
|
|
10
|
+
id: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
component: ConcreteComponent;
|
|
13
|
+
props?: Record<string, unknown>;
|
|
14
|
+
events?: Record<string, unknown>;
|
|
15
|
+
onOpen?: (blade: { id: string }) => void;
|
|
16
|
+
onClose?: (blade: { id: string }) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IWidgetRegistration {
|
|
20
|
+
bladeId: string;
|
|
21
|
+
widget: IWidget;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IWidgetService {
|
|
25
|
+
registerWidget: (widget: IWidget, bladeId: string) => void;
|
|
26
|
+
unregisterWidget: (widgetId: string, bladeId: string) => void;
|
|
27
|
+
getWidgets: (bladeId: string) => IWidget[];
|
|
28
|
+
clearBladeWidgets: (bladeId: string) => void;
|
|
29
|
+
registeredWidgets: IWidgetRegistration[];
|
|
30
|
+
isActiveWidget: (id: string) => boolean;
|
|
31
|
+
setActiveWidget: (ref: ComponentInternalInstance["exposed"]) => void;
|
|
32
|
+
updateActiveWidget: () => void;
|
|
33
|
+
isWidgetRegistered: (id: string) => boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function createWidgetService(): IWidgetService {
|
|
37
|
+
const widgetRegistry = reactive<Record<string, IWidget[]>>({});
|
|
38
|
+
const registeredWidgets = reactive<IWidgetRegistration[]>([]);
|
|
39
|
+
const activeWidgetRef = ref();
|
|
40
|
+
const registeredIds = reactive(new Set<string>());
|
|
41
|
+
|
|
42
|
+
const registerWidget = (widget: IWidget, bladeId: string): void => {
|
|
43
|
+
if (!widgetRegistry[bladeId]) {
|
|
44
|
+
widgetRegistry[bladeId] = [];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const existingIndex = widgetRegistry[bladeId].findIndex((w) => w.id === widget.id);
|
|
48
|
+
if (existingIndex === -1) {
|
|
49
|
+
widgetRegistry[bladeId].push(widget);
|
|
50
|
+
registeredWidgets.push({ bladeId, widget });
|
|
51
|
+
registeredIds.add(widget.id);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const unregisterWidget = (widgetId: string, bladeId: string): void => {
|
|
56
|
+
if (widgetRegistry[bladeId]) {
|
|
57
|
+
const index = widgetRegistry[bladeId].findIndex((w) => w.id === widgetId);
|
|
58
|
+
if (index !== -1) {
|
|
59
|
+
widgetRegistry[bladeId].splice(index, 1);
|
|
60
|
+
registeredIds.delete(widgetId);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const regIndex = registeredWidgets.findIndex((w) => w.bladeId === bladeId && w.widget.id === widgetId);
|
|
65
|
+
if (regIndex !== -1) {
|
|
66
|
+
registeredWidgets.splice(regIndex, 1);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const getWidgets = (bladeId: string): IWidget[] => {
|
|
71
|
+
return widgetRegistry[bladeId] || [];
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const clearBladeWidgets = (bladeId: string): void => {
|
|
75
|
+
if (widgetRegistry[bladeId]) {
|
|
76
|
+
widgetRegistry[bladeId].forEach((widget) => {
|
|
77
|
+
registeredIds.delete(widget.id);
|
|
78
|
+
});
|
|
79
|
+
delete widgetRegistry[bladeId];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const indices = registeredWidgets
|
|
83
|
+
.map((w, i) => (w.bladeId === bladeId ? i : -1))
|
|
84
|
+
.filter((i) => i !== -1)
|
|
85
|
+
.reverse();
|
|
86
|
+
|
|
87
|
+
indices.forEach((index) => {
|
|
88
|
+
registeredWidgets.splice(index, 1);
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const setActiveWidget = (ref: ComponentInternalInstance["exposed"]): void => {
|
|
93
|
+
activeWidgetRef.value = undefined;
|
|
94
|
+
|
|
95
|
+
activeWidgetRef.value = ref;
|
|
96
|
+
|
|
97
|
+
console.log("setActiveWidget", activeWidgetRef.value);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const updateActiveWidget = (): void => {
|
|
101
|
+
console.log("updateActiveWidget", activeWidgetRef.value);
|
|
102
|
+
if (!activeWidgetRef.value) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (activeWidgetRef.value?.updateActiveWidgetCount) {
|
|
107
|
+
activeWidgetRef.value.updateActiveWidgetCount();
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const isWidgetRegistered = (id: string): boolean => {
|
|
112
|
+
return registeredIds.has(id);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const isActiveWidget = (id: string): boolean => {
|
|
116
|
+
return activeWidgetRef.value?.id === id;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
registerWidget,
|
|
121
|
+
unregisterWidget,
|
|
122
|
+
getWidgets,
|
|
123
|
+
clearBladeWidgets,
|
|
124
|
+
registeredWidgets,
|
|
125
|
+
isActiveWidget,
|
|
126
|
+
setActiveWidget,
|
|
127
|
+
updateActiveWidget,
|
|
128
|
+
isWidgetRegistered,
|
|
129
|
+
};
|
|
130
|
+
}
|