@vc-shell/framework 1.1.7 → 1.1.8
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 +9 -0
- package/core/services/widget-service.ts +2 -1
- package/core/types/index.ts +6 -1
- package/dist/core/services/widget-service.d.ts +2 -1
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +2 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +1 -1
- package/dist/{index-L61Jab0v.js → index-83AS8awQ.js} +1616 -1611
- package/dist/{index-B-mWhdLd.js → index-BRzLUR4F.js} +1 -1
- package/dist/{index-CupHW_BC.js → index-BSMDwAsD.js} +1 -1
- package/dist/{index-CiGiEqGG.js → index-BcE8cPQ1.js} +1 -1
- package/dist/{index-CDBWP4up.js → index-BdXB4Rc2.js} +1 -1
- package/dist/{index-DqYA_pFb.js → index-BeE65IDG.js} +1 -1
- package/dist/{index-C5CvjxDz.js → index-BjulAuhE.js} +1 -1
- package/dist/{index-EX-KKv5q.js → index-C1julODM.js} +1 -1
- package/dist/{index-CyoDOgBt.js → index-CCh6DcPw.js} +1 -1
- package/dist/{index-hQL5vI4T.js → index-CM-cQwyJ.js} +1 -1
- package/dist/{index-BkhpB2QG.js → index-CcUXsEpB.js} +1 -1
- package/dist/{index-Dfqkcdc_.js → index-D77dHT9M.js} +1 -1
- package/dist/{index-B8b4HKad.js → index-DjGE0Oe5.js} +1 -1
- package/dist/{index-C1SZpIDW.js → index-DkbufypA.js} +1 -1
- package/dist/{index-BgxGeHeF.js → index-VBkCq_SK.js} +1 -1
- package/dist/{index-F1Iiqswe.js → index-cAxs8v2c.js} +1 -1
- package/dist/{index-C70yQsjv.js → index-nY-vksAs.js} +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +15 -37
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +3 -0
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +0 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- 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 +2 -2
- package/dist/shared/modules/dynamic/types/index.d.ts +6 -1
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.backupsb.d.ts +50 -0
- package/dist/ui/components/organisms/vc-app/vc-app.backupsb.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.backupsb.d.ts +89 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.backupsb.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/package.json +5 -5
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +119 -56
- package/shared/components/blade-navigation/types/index.ts +3 -0
- package/shared/modules/dynamic/factories/types/index.ts +228 -229
- package/shared/modules/dynamic/types/index.ts +4 -1
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +2 -2
- package/ui/components/atoms/vc-badge/vc-badge.vue +1 -1
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +3 -1
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +15 -2
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue +5 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +5 -1
- /package/ui/components/organisms/vc-app/{vc-app.stories.ts → vc-app.backupsb.ts} +0 -0
- /package/ui/components/organisms/vc-blade/{vc-blade.stories.ts → vc-blade.backupsb.ts} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { StoryFn } from "@storybook/vue3";
|
|
2
|
+
import { VcApp } from "./";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./vc-app.vue").Props> & Readonly<{
|
|
7
|
+
"onLogo-click"?: ((goToRoot: () => void) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
"logo-click": (goToRoot: () => void) => any;
|
|
10
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
11
|
+
P: {};
|
|
12
|
+
B: {};
|
|
13
|
+
D: {};
|
|
14
|
+
C: {};
|
|
15
|
+
M: {};
|
|
16
|
+
Defaults: {};
|
|
17
|
+
}, Readonly<import("./vc-app.vue").Props> & Readonly<{
|
|
18
|
+
"onLogo-click"?: ((goToRoot: () => void) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, {}>;
|
|
20
|
+
__isFragment?: never;
|
|
21
|
+
__isTeleport?: never;
|
|
22
|
+
__isSuspense?: never;
|
|
23
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./vc-app.vue").Props> & Readonly<{
|
|
24
|
+
"onLogo-click"?: ((goToRoot: () => void) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
26
|
+
"logo-click": (goToRoot: () => void) => any;
|
|
27
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
28
|
+
$slots: {
|
|
29
|
+
"app-switcher": (props: any) => any;
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
args: {
|
|
33
|
+
isReady: true;
|
|
34
|
+
version: string;
|
|
35
|
+
title: string;
|
|
36
|
+
logo: string;
|
|
37
|
+
};
|
|
38
|
+
decorators: (() => {
|
|
39
|
+
template: string;
|
|
40
|
+
})[];
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
43
|
+
export declare const Primary: StoryFn<typeof VcApp>;
|
|
44
|
+
export declare const CustomAppSwitcherSlot: StoryFn<typeof VcApp>;
|
|
45
|
+
export declare const CustomToolbarSlot: StoryFn<typeof VcApp>;
|
|
46
|
+
export declare const CustomToolbarPrependSlot: StoryFn<typeof VcApp>;
|
|
47
|
+
export declare const CustomToolbarLanguageSelectorSlot: StoryFn<typeof VcApp>;
|
|
48
|
+
export declare const CustomNotificationsDropdownSlot: StoryFn<typeof VcApp>;
|
|
49
|
+
export declare const CustomUserDropdownButtonSlot: StoryFn<typeof VcApp>;
|
|
50
|
+
//# sourceMappingURL=vc-app.backupsb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vc-app.backupsb.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.backupsb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK3B,wBAmB+B;AAE/B,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,CAgBxC,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,OAAO,KAAK,CAYtD,CAAC;AAUH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,OAAO,KAAK,CAsBlD,CAAC;AAUH,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAAC,OAAO,KAAK,CAYzD,CAAC;AAUH,eAAO,MAAM,iCAAiC,EAAE,OAAO,CAAC,OAAO,KAAK,CAqBlE,CAAC;AAUH,eAAO,MAAM,+BAA+B,EAAE,OAAO,CAAC,OAAO,KAAK,CAqBhE,CAAC;AAWH,eAAO,MAAM,4BAA4B,EAAE,OAAO,CAAC,OAAO,KAAK,CAqB7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-blade-toolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-blade-toolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue"],"names":[],"mappings":"AA0LA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAO7D,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAqKD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB3D,QAAA,MAAM,eAAe;WAhMZ,aAAa,EAAE;6EAuMtB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IWidget } from "../../../../../../../core/services";
|
|
2
2
|
interface Props {
|
|
3
3
|
widgets: IWidget[];
|
|
4
|
+
bladeId: string;
|
|
4
5
|
}
|
|
5
6
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
7
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-widget-container-mobile.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-widget-container-mobile.vue.d.ts","sourceRoot":"","sources":["../../../../../../../../ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue"],"names":[],"mappings":"AAqJA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAI7D,UAAU,KAAK;IACb,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;;AA0KD,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-widget-container.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-widget-container.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/vc-widget-container.vue"],"names":[],"mappings":"AAuIA,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;;AAoFD,wBAMG"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { StoryFn } from "@storybook/vue3";
|
|
2
|
+
import { VcBlade } from "./";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./vc-blade.vue").Props> & Readonly<{
|
|
7
|
+
onClose?: (() => any) | undefined;
|
|
8
|
+
onExpand?: (() => any) | undefined;
|
|
9
|
+
onCollapse?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
close: () => any;
|
|
12
|
+
expand: () => any;
|
|
13
|
+
collapse: () => any;
|
|
14
|
+
}, import("vue").PublicProps, {
|
|
15
|
+
width: number | string;
|
|
16
|
+
closable: boolean;
|
|
17
|
+
toolbarItems: import("../../../..").IBladeToolbar[];
|
|
18
|
+
modified: boolean;
|
|
19
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
20
|
+
P: {};
|
|
21
|
+
B: {};
|
|
22
|
+
D: {};
|
|
23
|
+
C: {};
|
|
24
|
+
M: {};
|
|
25
|
+
Defaults: {};
|
|
26
|
+
}, Readonly<import("./vc-blade.vue").Props> & Readonly<{
|
|
27
|
+
onClose?: (() => any) | undefined;
|
|
28
|
+
onExpand?: (() => any) | undefined;
|
|
29
|
+
onCollapse?: (() => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, {
|
|
31
|
+
width: number | string;
|
|
32
|
+
closable: boolean;
|
|
33
|
+
toolbarItems: import("../../../..").IBladeToolbar[];
|
|
34
|
+
modified: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
__isFragment?: never;
|
|
37
|
+
__isTeleport?: never;
|
|
38
|
+
__isSuspense?: never;
|
|
39
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./vc-blade.vue").Props> & Readonly<{
|
|
40
|
+
onClose?: (() => any) | undefined;
|
|
41
|
+
onExpand?: (() => any) | undefined;
|
|
42
|
+
onCollapse?: (() => any) | undefined;
|
|
43
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
44
|
+
close: () => any;
|
|
45
|
+
expand: () => any;
|
|
46
|
+
collapse: () => any;
|
|
47
|
+
}, string, {
|
|
48
|
+
width: number | string;
|
|
49
|
+
closable: boolean;
|
|
50
|
+
toolbarItems: import("../../../..").IBladeToolbar[];
|
|
51
|
+
modified: boolean;
|
|
52
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
53
|
+
$slots: {
|
|
54
|
+
actions: (props: any) => any;
|
|
55
|
+
default: (props: any) => any;
|
|
56
|
+
widgets: (props: any) => any;
|
|
57
|
+
backButton: (props: any) => any;
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
args: {
|
|
61
|
+
icon: string;
|
|
62
|
+
title: string;
|
|
63
|
+
subtitle: string;
|
|
64
|
+
width: number;
|
|
65
|
+
closable: false;
|
|
66
|
+
toolbarItems: ({
|
|
67
|
+
id: string;
|
|
68
|
+
icon: string;
|
|
69
|
+
title: string;
|
|
70
|
+
disabled?: undefined;
|
|
71
|
+
} | {
|
|
72
|
+
id: string;
|
|
73
|
+
icon: string;
|
|
74
|
+
title: string;
|
|
75
|
+
disabled: true;
|
|
76
|
+
})[];
|
|
77
|
+
};
|
|
78
|
+
decorators: (() => {
|
|
79
|
+
template: string;
|
|
80
|
+
})[];
|
|
81
|
+
};
|
|
82
|
+
export default _default;
|
|
83
|
+
export declare const Primary: StoryFn<typeof VcBlade>;
|
|
84
|
+
export declare const BladeWithError: StoryFn<typeof VcBlade>;
|
|
85
|
+
export declare const BladeWithLoading: StoryFn<typeof VcBlade>;
|
|
86
|
+
export declare const ClosableBlade: StoryFn<typeof VcBlade>;
|
|
87
|
+
export declare const ExpandableBlade: StoryFn<typeof VcBlade>;
|
|
88
|
+
export declare const BladeWithoutToolbar: StoryFn<typeof VcBlade>;
|
|
89
|
+
//# sourceMappingURL=vc-blade.backupsb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vc-blade.backupsb.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.backupsb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG7B,wBAuBiC;AAEjC,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,OAAO,OAAO,CAM1C,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,OAAO,OAAO,CAOjD,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,OAAO,OAAO,CAMnD,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,OAAO,OAAO,CAShD,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,OAAO,OAAO,CASlD,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,OAAO,OAAO,CAMtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-blade.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-blade.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.vue"],"names":[],"mappings":"AAscA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAYvD,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC3B;AAeD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC7B,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CACjC,CAAC;AAuWF,QAAA,MAAM,eAAe;;;;;;;;;WAjaX,MAAM,GAAG,MAAM;cAEZ,OAAO;kBACH,aAAa,EAAE;cACnB,OAAO;6EAqalB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
|
72
72
|
"@types/dompurify": "^3.0.5",
|
|
73
|
-
"@vc-shell/api-client-generator": "^1.1.
|
|
74
|
-
"@vc-shell/config-generator": "^1.1.
|
|
75
|
-
"@vc-shell/ts-config": "^1.1.
|
|
73
|
+
"@vc-shell/api-client-generator": "^1.1.8",
|
|
74
|
+
"@vc-shell/config-generator": "^1.1.8",
|
|
75
|
+
"@vc-shell/ts-config": "^1.1.8",
|
|
76
76
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
77
77
|
"@vue/test-utils": "^2.4.5",
|
|
78
78
|
"cypress-signalr-mock": "^1.5.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"typescript": "^5.8.3",
|
|
85
85
|
"vite": "^6.3.3",
|
|
86
86
|
"vitest": "^1.3.1",
|
|
87
|
-
"vue-component-type-helpers": "^
|
|
87
|
+
"vue-component-type-helpers": "^2.2.10",
|
|
88
88
|
"vue-tsc": "^2.2.10"
|
|
89
89
|
},
|
|
90
90
|
"publishConfig": {
|
|
@@ -1,9 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
h,
|
|
3
|
+
provide,
|
|
4
|
+
ref,
|
|
5
|
+
VNode,
|
|
6
|
+
PropType,
|
|
7
|
+
Component,
|
|
8
|
+
reactive,
|
|
9
|
+
computed,
|
|
10
|
+
toRefs,
|
|
11
|
+
Slot,
|
|
12
|
+
defineComponent,
|
|
13
|
+
SetupContext,
|
|
14
|
+
} from "vue";
|
|
2
15
|
import { BladeInstance, navigationViewLocation, BLADE_BACK_BUTTON } from "./../../../../../injection-keys";
|
|
3
|
-
import { BladeVNode, CoreBladeExposed } from "../../types";
|
|
16
|
+
import { BladeVNode, CoreBladeExposed, IBladeInstance } from "../../types";
|
|
4
17
|
import { toRef, watchTriggerable } from "@vueuse/core";
|
|
5
18
|
import { Breadcrumbs, FALLBACK_BLADE_ID } from "../../../../..";
|
|
6
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Normalizes slot content
|
|
22
|
+
* @param slot The slot to normalize
|
|
23
|
+
* @param data The data to pass to the slot
|
|
24
|
+
* @returns Normalized slot content or null
|
|
25
|
+
*/
|
|
26
|
+
function normalizeSlot(slot: Slot | undefined, data: { Component: VNode }): VNode | VNode[] | null {
|
|
27
|
+
if (!slot) return null;
|
|
28
|
+
const slotContent = slot(data);
|
|
29
|
+
return slotContent.length === 1 ? slotContent[0] : slotContent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Define the props type for type safety
|
|
33
|
+
interface BladeViewProps {
|
|
34
|
+
blade?: BladeVNode;
|
|
35
|
+
expandable?: boolean;
|
|
36
|
+
error?: string;
|
|
37
|
+
breadcrumbs?: Breadcrumbs[];
|
|
38
|
+
backButton?: Component;
|
|
39
|
+
}
|
|
40
|
+
|
|
7
41
|
export const VcBladeView = defineComponent({
|
|
8
42
|
name: "BladeView",
|
|
9
43
|
inheritAttrs: false,
|
|
@@ -25,76 +59,111 @@ export const VcBladeView = defineComponent({
|
|
|
25
59
|
default: undefined,
|
|
26
60
|
},
|
|
27
61
|
},
|
|
28
|
-
setup(props, { attrs, slots }) {
|
|
29
|
-
const maximized = ref(false);
|
|
30
|
-
const viewRef = ref<CoreBladeExposed>();
|
|
62
|
+
setup(props: BladeViewProps, { attrs, slots }: SetupContext) {
|
|
63
|
+
const maximized = ref<boolean>(false);
|
|
64
|
+
const viewRef = ref<CoreBladeExposed | undefined>();
|
|
31
65
|
|
|
32
66
|
const bl = toRef(props.blade);
|
|
33
67
|
const { backButton } = toRefs(props);
|
|
34
68
|
|
|
35
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Links the blade instance to its navigation object.
|
|
71
|
+
*
|
|
72
|
+
* This is a crucial part of the blade navigation system:
|
|
73
|
+
* 1. When a blade is mounted, we need to associate its instance with the navigation props
|
|
74
|
+
* 2. This creates a two-way reference where the blade knows about its navigation context
|
|
75
|
+
* 3. The navigation instance property is implemented as a getter to ensure it always returns
|
|
76
|
+
* the current value of viewRef
|
|
77
|
+
*
|
|
78
|
+
* The flush:sync option ensures this happens immediately in the same tick to prevent
|
|
79
|
+
* timing issues where the instance might not be available when needed.
|
|
80
|
+
*/
|
|
81
|
+
const linkBladeInstanceToNavigation = (): void => {
|
|
82
|
+
const instance = viewRef.value;
|
|
83
|
+
const blade = bl.value;
|
|
84
|
+
|
|
85
|
+
if (!instance || !blade || !blade.props?.navigation) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Create a reactive getter for the instance property
|
|
90
|
+
// This ensures that navigation.instance always returns the current viewRef value
|
|
91
|
+
Object.defineProperty(blade.props.navigation, "instance", {
|
|
92
|
+
get: () => instance,
|
|
93
|
+
configurable: true,
|
|
94
|
+
enumerable: true,
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// Use watchTriggerable to manually invoke the linking process when needed
|
|
99
|
+
const { trigger: syncNavigationWithInstance } = watchTriggerable(
|
|
36
100
|
() => [viewRef.value, bl.value] as const,
|
|
37
|
-
(
|
|
38
|
-
if (instance && blade && blade.props?.navigation) {
|
|
39
|
-
Object.assign(
|
|
40
|
-
blade.props.navigation,
|
|
41
|
-
reactive({
|
|
42
|
-
get instance() {
|
|
43
|
-
return instance;
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
101
|
+
() => linkBladeInstanceToNavigation(),
|
|
49
102
|
{ flush: "sync" },
|
|
50
103
|
);
|
|
51
|
-
|
|
104
|
+
|
|
105
|
+
// Provide the navigation view location without using non-null assertion
|
|
106
|
+
if (bl.value) {
|
|
107
|
+
provide(navigationViewLocation, bl.value);
|
|
108
|
+
}
|
|
109
|
+
|
|
52
110
|
provide(BLADE_BACK_BUTTON, backButton);
|
|
111
|
+
|
|
53
112
|
provide(
|
|
54
113
|
BladeInstance,
|
|
55
|
-
computed(() => ({
|
|
114
|
+
computed<IBladeInstance>(() => ({
|
|
56
115
|
id: bl.value?.type.name ?? FALLBACK_BLADE_ID,
|
|
57
|
-
|
|
116
|
+
param: bl.value?.props?.param,
|
|
117
|
+
options: bl.value?.props?.options,
|
|
118
|
+
expandable: props.expandable ?? false,
|
|
58
119
|
maximized: maximized.value,
|
|
59
120
|
error: props.error,
|
|
60
121
|
navigation: bl.value?.props?.navigation,
|
|
61
122
|
breadcrumbs: props.breadcrumbs,
|
|
123
|
+
title: bl.value?.props?.navigation?.instance?.title,
|
|
62
124
|
})),
|
|
63
125
|
);
|
|
64
|
-
return () => {
|
|
65
|
-
/**
|
|
66
|
-
* Callback function onClose, which is passed while opening blade, called when a BladeVNode is unmounted.
|
|
67
|
-
* @param vnode The unmounted VNode.
|
|
68
|
-
*/
|
|
69
|
-
const onVnodeUnmounted: BladeVNode["props"]["onVnodeUnmounted"] = (vnode) => {
|
|
70
|
-
if (vnode.component?.isUnmounted) {
|
|
71
|
-
if (typeof vnode.props?.navigation?.onClose === "function") {
|
|
72
|
-
vnode.props?.navigation.onClose();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Callback function onOpen, which is passed while opening blade, called when a BladeVNode is mounted.
|
|
79
|
-
* @param vnode The mounted VNode.
|
|
80
|
-
*/
|
|
81
|
-
const onVnodeMounted: BladeVNode["props"]["onVnodeMounted"] = (vnode) => {
|
|
82
|
-
if (vnode.component?.isMounted) {
|
|
83
|
-
trigger();
|
|
84
|
-
if (typeof vnode.props?.navigation?.onOpen === "function") {
|
|
85
|
-
vnode.props?.navigation.onOpen();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
126
|
|
|
90
|
-
|
|
91
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Handler for expanding the blade
|
|
129
|
+
*/
|
|
130
|
+
const onExpand = (): void => {
|
|
131
|
+
maximized.value = true;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Handler for collapsing the blade
|
|
136
|
+
*/
|
|
137
|
+
const onCollapse = (): void => {
|
|
138
|
+
maximized.value = false;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Callback function onClose, which is passed while opening blade, called when a BladeVNode is unmounted.
|
|
143
|
+
* @param vnode The unmounted VNode.
|
|
144
|
+
*/
|
|
145
|
+
const onVnodeUnmounted: BladeVNode["props"]["onVnodeUnmounted"] = (vnode): void => {
|
|
146
|
+
if (vnode.component?.isUnmounted && typeof vnode.props?.navigation?.onClose === "function") {
|
|
147
|
+
vnode.props.navigation.onClose();
|
|
92
148
|
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Callback function onOpen, which is passed while opening blade, called when a BladeVNode is mounted.
|
|
153
|
+
* @param vnode The mounted VNode.
|
|
154
|
+
*/
|
|
155
|
+
const onVnodeMounted: BladeVNode["props"]["onVnodeMounted"] = (vnode): void => {
|
|
156
|
+
if (vnode.component?.isMounted) {
|
|
157
|
+
// Synchronize the blade instance with navigation when the component is mounted
|
|
158
|
+
syncNavigationWithInstance();
|
|
93
159
|
|
|
94
|
-
|
|
95
|
-
|
|
160
|
+
if (typeof vnode.props?.navigation?.onOpen === "function") {
|
|
161
|
+
vnode.props.navigation.onOpen();
|
|
162
|
+
}
|
|
96
163
|
}
|
|
164
|
+
};
|
|
97
165
|
|
|
166
|
+
return () => {
|
|
98
167
|
if (props.blade) {
|
|
99
168
|
const component = h(
|
|
100
169
|
props.blade as Component,
|
|
@@ -113,9 +182,3 @@ export const VcBladeView = defineComponent({
|
|
|
113
182
|
};
|
|
114
183
|
},
|
|
115
184
|
});
|
|
116
|
-
|
|
117
|
-
function normalizeSlot(slot: Slot | undefined, data: { Component: VNode }) {
|
|
118
|
-
if (!slot) return null;
|
|
119
|
-
const slotContent = slot(data);
|
|
120
|
-
return slotContent.length === 1 ? slotContent[0] : slotContent;
|
|
121
|
-
}
|
|
@@ -49,6 +49,9 @@ export interface IBladeInstance {
|
|
|
49
49
|
error: string | undefined;
|
|
50
50
|
navigation: BladeVNode["props"]["navigation"] | undefined;
|
|
51
51
|
breadcrumbs: Breadcrumbs[] | undefined;
|
|
52
|
+
title?: string;
|
|
53
|
+
param?: string;
|
|
54
|
+
options?: Record<string, any>;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
export interface IParentCallArgs {
|