@vc-shell/framework 1.0.132 → 1.0.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/core/composables/useMenuService/index.ts +9 -10
- package/core/composables/useUser/index.ts +2 -2
- package/core/interceptors/index.ts +13 -9
- package/core/plugins/modularity/index.ts +2 -6
- package/core/types/index.ts +29 -6
- package/dist/core/composables/useMenuService/index.d.ts +2 -7
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +27 -6
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +8093 -8251
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +1 -21
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/change-password/change-password.vue.d.ts +1 -1
- package/dist/shared/components/change-password/index.d.ts +1 -1
- package/dist/shared/components/error-interceptor/interceptor.d.ts +1 -1
- package/dist/shared/components/language-selector/index.d.ts +1 -1
- package/dist/shared/components/language-selector/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/language-selector.vue.d.ts +1 -1
- package/dist/shared/components/notification-dropdown/_internal/notification/notification.vue.d.ts +1 -1
- package/dist/shared/components/notification-dropdown/index.d.ts +1 -1
- package/dist/shared/components/notification-dropdown/index.d.ts.map +1 -1
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts +1 -1
- package/dist/shared/components/notification-template/notification-template.vue.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/index.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts +1 -1
- package/dist/shared/components/user-dropdown-button/index.d.ts +8 -8
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +1 -1
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/ValidationField.d.ts +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +1 -2
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +1 -1
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts +1 -1
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +1 -1
- package/dist/shared/pages/LoginPage/components/login/index.d.ts +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-image/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-info-row/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-loading/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-row/vc-row.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-status-icon/vc-status-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-switch/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-switch/vc-switch.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-video/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-widget/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts +1 -1
- 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.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts +1 -1
- 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.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-notification/vc-notification.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.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 +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/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +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.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +17 -17
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts +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 +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/index.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-error/vc-popup-error.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +1 -1
- package/package.json +19 -20
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +3 -0
- package/shared/components/blade-navigation/types/index.ts +1 -22
- package/shared/modules/dynamic/types/index.ts +1 -2
- package/ui/components/molecules/vc-notification/vc-notification.vue +34 -8
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +3 -2
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +2 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +1 -1
- package/ui/components/organisms/vc-app/vc-app.vue +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [1.0.134](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.133...v1.0.134) (2023-12-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **shell:** intercept seller load error ([9f94420](https://github.com/VirtoCommerce/vc-shell/commit/9f94420aad2aaac02ca4efc56c5e22c885662c93))
|
|
7
|
+
* **shell:** refactor vc-notification component styling to support scrolling ([93345c5](https://github.com/VirtoCommerce/vc-shell/commit/93345c59d415d27dee20e3abc6642b3f2ea07da1))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [1.0.133](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.132...v1.0.133) (2023-12-28)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **shell:** useMenuService permissions ([73ca465](https://github.com/VirtoCommerce/vc-shell/commit/73ca4650e2b4458e47b78c2a99e50003ce02c6bd))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
1
20
|
## [1.0.132](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.131...v1.0.132) (2023-12-28)
|
|
2
21
|
|
|
3
22
|
|
|
@@ -2,28 +2,27 @@ import { createSharedComposable, createUnrefFn, useArrayFind } from "@vueuse/cor
|
|
|
2
2
|
import { Ref, ref, computed } from "vue";
|
|
3
3
|
import * as _ from "lodash-es";
|
|
4
4
|
import { i18n } from "./../../plugins/i18n";
|
|
5
|
-
import { MenuItemConfig } from "../../../shared/components/blade-navigation/types";
|
|
6
5
|
import { MenuItem } from "../../types";
|
|
7
6
|
|
|
8
7
|
export interface IUseMenuService {
|
|
9
|
-
addMenuItem:
|
|
8
|
+
addMenuItem: (item: MenuItem) => void;
|
|
10
9
|
menuItems: Ref<MenuItem[]>;
|
|
11
10
|
removeMenuItem: (item: MenuItem) => void;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
const menuItems: Ref<MenuItem[]> = ref([]);
|
|
15
|
-
const rawMenu: Ref<
|
|
14
|
+
const rawMenu: Ref<MenuItem[]> = ref([]);
|
|
16
15
|
|
|
17
|
-
function useMenuServiceFn() {
|
|
16
|
+
function useMenuServiceFn(): IUseMenuService {
|
|
18
17
|
const { t } = i18n.global;
|
|
19
18
|
|
|
20
|
-
function addMenuItem(item:
|
|
19
|
+
function addMenuItem(item: MenuItem) {
|
|
21
20
|
rawMenu.value.push(item);
|
|
22
21
|
|
|
23
22
|
constructMenu();
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
const upsert = createUnrefFn((array:
|
|
25
|
+
const upsert = createUnrefFn((array: MenuItem[], element: MenuItem) => {
|
|
27
26
|
const i = array.findIndex((_element) => _.isEqual(_element, element));
|
|
28
27
|
if (i > -1) array[i] = { ...element };
|
|
29
28
|
else array.push({ ...element });
|
|
@@ -37,10 +36,10 @@ function useMenuServiceFn() {
|
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
function constructMenu() {
|
|
40
|
-
const constructedMenu = ref<MenuItem[]
|
|
39
|
+
const constructedMenu = ref([]) as Ref<MenuItem[]>;
|
|
41
40
|
|
|
42
41
|
rawMenu.value.forEach((item) => {
|
|
43
|
-
let group;
|
|
42
|
+
let group: MenuItem;
|
|
44
43
|
if (item.group) {
|
|
45
44
|
const isGroupExist = useArrayFind(constructedMenu, (m) => m.groupId === "group_" + item.group);
|
|
46
45
|
|
|
@@ -52,7 +51,7 @@ function useMenuServiceFn() {
|
|
|
52
51
|
"group",
|
|
53
52
|
);
|
|
54
53
|
|
|
55
|
-
if (isGroupExist.value) {
|
|
54
|
+
if (isGroupExist.value && isGroupExist.value.children) {
|
|
56
55
|
upsert(isGroupExist.value.children, groupItem);
|
|
57
56
|
} else {
|
|
58
57
|
group = {
|
|
@@ -75,7 +74,7 @@ function useMenuServiceFn() {
|
|
|
75
74
|
});
|
|
76
75
|
|
|
77
76
|
menuItems.value = constructedMenu.value
|
|
78
|
-
.map((x, index) => ({ ...x, title: computed(() => t(x.title as string)), id: index }))
|
|
77
|
+
.map((x, index): MenuItem => ({ ...x, title: computed(() => t(x.title as string)), id: index }))
|
|
79
78
|
.sort(sortByPriority);
|
|
80
79
|
}
|
|
81
80
|
|
|
@@ -84,7 +84,7 @@ function useUserFn(): IUseUser {
|
|
|
84
84
|
async function signIn(
|
|
85
85
|
username: string,
|
|
86
86
|
password: string,
|
|
87
|
-
): Promise<SignInResult | { succeeded: boolean; error?: any }> {
|
|
87
|
+
): Promise<SignInResult | { succeeded: boolean; error?: any; status?: number }> {
|
|
88
88
|
console.debug(`[@vc-shell/framework#useUser:signIn] - Entry point`);
|
|
89
89
|
try {
|
|
90
90
|
loading.value = true;
|
|
@@ -104,7 +104,7 @@ function useUserFn(): IUseUser {
|
|
|
104
104
|
} catch (e: any) {
|
|
105
105
|
//TODO: log error
|
|
106
106
|
console.log(e);
|
|
107
|
-
return { succeeded: false, error: e.message };
|
|
107
|
+
return { succeeded: false, error: e.message, status: e.status };
|
|
108
108
|
} finally {
|
|
109
109
|
loading.value = false;
|
|
110
110
|
}
|
|
@@ -51,18 +51,11 @@ export function registerInterceptors(router: Router) {
|
|
|
51
51
|
/**
|
|
52
52
|
* If the response is unauthorized, logout the user
|
|
53
53
|
*/
|
|
54
|
-
if (response.status === 401) {
|
|
54
|
+
if (response.status === 401 || (response.status === 500 && args[0] === "/api/vcmp/security/seller")) {
|
|
55
55
|
//logout user
|
|
56
56
|
if (isAuthenticated.value) {
|
|
57
57
|
signOut().then(() => {
|
|
58
|
-
|
|
59
|
-
if (router && router.getRoutes().some((route) => route.path === "/login" || route.name === "Login")) {
|
|
60
|
-
router.currentRoute.value.path !== "/login" && router.push("/login");
|
|
61
|
-
} else {
|
|
62
|
-
// Use the origin to redirect to the root of the application if no login page exists.
|
|
63
|
-
// Usually this is the case when the application is used as a module.
|
|
64
|
-
window.location.href = window.location.origin + "/";
|
|
65
|
-
}
|
|
58
|
+
redirect(router);
|
|
66
59
|
});
|
|
67
60
|
}
|
|
68
61
|
}
|
|
@@ -73,3 +66,14 @@ export function registerInterceptors(router: Router) {
|
|
|
73
66
|
|
|
74
67
|
return window.fetch;
|
|
75
68
|
}
|
|
69
|
+
|
|
70
|
+
function redirect(router: Router) {
|
|
71
|
+
// redirect to login page if it exists
|
|
72
|
+
if (router && router.getRoutes().some((route) => route.path === "/login" || route.name === "Login")) {
|
|
73
|
+
router.currentRoute.value.path !== "/login" && router.push("/login");
|
|
74
|
+
} else {
|
|
75
|
+
// Use the origin to redirect to the root of the application if no login page exists.
|
|
76
|
+
// Usually this is the case when the application is used as a module.
|
|
77
|
+
window.location.href = window.location.origin + "/";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -37,7 +37,7 @@ export const createAppModule = (
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// Register pages
|
|
40
|
-
Object.
|
|
40
|
+
Object.values(pages).forEach((page) => {
|
|
41
41
|
if (!page.url) {
|
|
42
42
|
app.config.globalProperties.pages?.push(page);
|
|
43
43
|
|
|
@@ -47,11 +47,6 @@ export const createAppModule = (
|
|
|
47
47
|
isWorkspace: page.isWorkspace || false,
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
// Add to menu
|
|
51
|
-
if (page.menuItem) {
|
|
52
|
-
app.config.globalProperties.menuItems?.push({ ...page.menuItem, url: page.url, routeId: key });
|
|
53
|
-
}
|
|
54
|
-
|
|
55
50
|
app.component(page.name, page);
|
|
56
51
|
}
|
|
57
52
|
|
|
@@ -98,6 +93,7 @@ export const createAppModule = (
|
|
|
98
93
|
...page.menuItem,
|
|
99
94
|
url: page.url,
|
|
100
95
|
routeId: routeName,
|
|
96
|
+
permissions: page.permissions,
|
|
101
97
|
});
|
|
102
98
|
}
|
|
103
99
|
}
|
package/core/types/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { permissions } from "./../plugins/permissions/index";
|
|
1
2
|
import { Component, ComponentPublicInstance, ComputedRef, Ref } from "vue";
|
|
2
3
|
import { BladeInstanceConstructor, CoreBladeExposed, ExtractedBladeOptions } from "./../../shared";
|
|
3
4
|
import { ComponentPublicInstanceConstructor } from "../../shared/utilities/vueUtils";
|
|
@@ -142,13 +143,35 @@ export type ITableColumns = {
|
|
|
142
143
|
visible?: boolean;
|
|
143
144
|
};
|
|
144
145
|
|
|
145
|
-
export interface MenuItem {
|
|
146
|
-
icon: string;
|
|
147
|
-
id: number;
|
|
146
|
+
export interface MenuItem extends Omit<MenuItemConfig, "title" | "id"> {
|
|
148
147
|
priority: number;
|
|
149
|
-
routeId
|
|
148
|
+
routeId?: string;
|
|
150
149
|
title: ComputedRef<string> | string;
|
|
151
|
-
url
|
|
150
|
+
url?: string;
|
|
152
151
|
groupId?: string;
|
|
153
|
-
children
|
|
152
|
+
children?: MenuItem[];
|
|
153
|
+
permissions?: string | string[];
|
|
154
|
+
id?: number | string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface MenuItemConfig {
|
|
158
|
+
id?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Menu item title.
|
|
161
|
+
*/
|
|
162
|
+
title: string;
|
|
163
|
+
/**
|
|
164
|
+
* Menu item icon.
|
|
165
|
+
*/
|
|
166
|
+
icon: string;
|
|
167
|
+
/**
|
|
168
|
+
* Menu item group. Is used to group menu items with it's provided name.
|
|
169
|
+
*
|
|
170
|
+
* If the path is not specified, the menu item is added to the root of the menu.
|
|
171
|
+
*/
|
|
172
|
+
group?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Position priority.
|
|
175
|
+
*/
|
|
176
|
+
priority: number;
|
|
154
177
|
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { Ref } from "vue";
|
|
2
|
-
import { MenuItemConfig } from "../../../shared/components/blade-navigation/types";
|
|
3
2
|
import { MenuItem } from "../../types";
|
|
4
3
|
export interface IUseMenuService {
|
|
5
|
-
addMenuItem:
|
|
4
|
+
addMenuItem: (item: MenuItem) => void;
|
|
6
5
|
menuItems: Ref<MenuItem[]>;
|
|
7
6
|
removeMenuItem: (item: MenuItem) => void;
|
|
8
7
|
}
|
|
9
|
-
declare function useMenuServiceFn():
|
|
10
|
-
addMenuItem: (item: Record<string, unknown>) => void;
|
|
11
|
-
menuItems: Ref<MenuItem[]>;
|
|
12
|
-
removeMenuItem: (item: MenuItem) => void;
|
|
13
|
-
};
|
|
8
|
+
declare function useMenuServiceFn(): IUseMenuService;
|
|
14
9
|
declare const useMenuService: typeof useMenuServiceFn;
|
|
15
10
|
export { useMenuService };
|
|
16
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useMenuService/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAGzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useMenuService/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAGzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC1C;AAKD,iBAAS,gBAAgB,IAAI,eAAe,CA2E3C;AAED,QAAA,MAAM,cAAc,yBAA2C,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/interceptors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/interceptors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,oGA8DlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAK,MAAM,KAAK,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAI/F,eAAO,MAAM,YAAY;;aAAuE,OAAO;iBACxF,GAAG,GAAG,IAAI;CAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;iBAOX,GAAG,YAAY;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/modularity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAK,MAAM,KAAK,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAI/F,eAAO,MAAM,YAAY;;aAAuE,OAAO;iBACxF,GAAG,GAAG,IAAI;CAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;iBAOX,GAAG,YAAY;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CA4FxD,CAAC"}
|
|
@@ -130,14 +130,35 @@ export type ITableColumns = {
|
|
|
130
130
|
align?: "start" | "end" | "center" | "between" | "around" | "evenly";
|
|
131
131
|
visible?: boolean;
|
|
132
132
|
};
|
|
133
|
-
export interface MenuItem {
|
|
134
|
-
icon: string;
|
|
135
|
-
id: number;
|
|
133
|
+
export interface MenuItem extends Omit<MenuItemConfig, "title" | "id"> {
|
|
136
134
|
priority: number;
|
|
137
|
-
routeId
|
|
135
|
+
routeId?: string;
|
|
138
136
|
title: ComputedRef<string> | string;
|
|
139
|
-
url
|
|
137
|
+
url?: string;
|
|
140
138
|
groupId?: string;
|
|
141
|
-
children
|
|
139
|
+
children?: MenuItem[];
|
|
140
|
+
permissions?: string | string[];
|
|
141
|
+
id?: number | string;
|
|
142
|
+
}
|
|
143
|
+
export interface MenuItemConfig {
|
|
144
|
+
id?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Menu item title.
|
|
147
|
+
*/
|
|
148
|
+
title: string;
|
|
149
|
+
/**
|
|
150
|
+
* Menu item icon.
|
|
151
|
+
*/
|
|
152
|
+
icon: string;
|
|
153
|
+
/**
|
|
154
|
+
* Menu item group. Is used to group menu items with it's provided name.
|
|
155
|
+
*
|
|
156
|
+
* If the path is not specified, the menu item is added to the root of the menu.
|
|
157
|
+
*/
|
|
158
|
+
group?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Position priority.
|
|
161
|
+
*/
|
|
162
|
+
priority: number;
|
|
142
163
|
}
|
|
143
164
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/types/index.ts"],"names":[],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