@vc-shell/framework 1.0.119 → 1.0.120
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 +6 -5771
- package/dist/framework.mjs +7140 -7116
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts +1 -1
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +115 -19
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts +13 -0
- package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts +1 -0
- package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/index.d.ts +3 -3
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/index.d.ts +13 -13
- 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/index.d.ts +6 -6
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.d.ts +3 -14
- package/dist/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.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-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +64 -27
- package/shared/modules/dynamic/types/index.ts +115 -19
- package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +6 -0
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +1 -1
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +24 -20
- package/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue +2 -4
- package/ui/components/organisms/vc-notification-dropdown/vc-notification-dropdown.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +7 -5
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +11 -16
- package/ui/components/organisms/vc-table/vc-table.vue +33 -31
|
@@ -16,12 +16,12 @@ export declare const VcGallery: import("vue").DefineComponent<{
|
|
|
16
16
|
required: {
|
|
17
17
|
type: import("vue").PropType<boolean>;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
tooltip: {
|
|
20
20
|
type: import("vue").PropType<string>;
|
|
21
|
-
default: string;
|
|
22
21
|
};
|
|
23
|
-
|
|
22
|
+
tooltipIcon: {
|
|
24
23
|
type: import("vue").PropType<string>;
|
|
24
|
+
default: string;
|
|
25
25
|
};
|
|
26
26
|
multiple: {
|
|
27
27
|
type: import("vue").PropType<boolean>;
|
|
@@ -82,12 +82,12 @@ export declare const VcGallery: import("vue").DefineComponent<{
|
|
|
82
82
|
required: {
|
|
83
83
|
type: import("vue").PropType<boolean>;
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
tooltip: {
|
|
86
86
|
type: import("vue").PropType<string>;
|
|
87
|
-
default: string;
|
|
88
87
|
};
|
|
89
|
-
|
|
88
|
+
tooltipIcon: {
|
|
90
89
|
type: import("vue").PropType<string>;
|
|
90
|
+
default: string;
|
|
91
91
|
};
|
|
92
92
|
multiple: {
|
|
93
93
|
type: import("vue").PropType<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-gallery.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-gallery/vc-gallery.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOhD,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACpC,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,CAAC,KAAK,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EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiaD,wBAOG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC"}
|
|
@@ -7,17 +7,11 @@ export interface Props {
|
|
|
7
7
|
export interface Emits {
|
|
8
8
|
(event: "onClick"): void;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: import("vue").DefineComponent<
|
|
11
|
-
notification: any;
|
|
12
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
11
|
onClick: () => void;
|
|
14
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<
|
|
15
|
-
notification: any;
|
|
16
|
-
}>>> & {
|
|
12
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
|
|
17
13
|
onOnClick?: () => any;
|
|
18
|
-
}, {
|
|
19
|
-
notification: PushNotification;
|
|
20
|
-
}, {}>;
|
|
14
|
+
}, {}, {}>;
|
|
21
15
|
export default _default;
|
|
22
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
17
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -28,9 +22,4 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
28
22
|
required: true;
|
|
29
23
|
};
|
|
30
24
|
};
|
|
31
|
-
type __VLS_WithDefaults<P, D> = {
|
|
32
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
33
|
-
default: D[K];
|
|
34
|
-
}> : P[K];
|
|
35
|
-
};
|
|
36
25
|
//# sourceMappingURL=notification.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,+BAA+B,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CAC1B
|
|
1
|
+
{"version":3,"file":"notification.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,+BAA+B,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CAC1B;;;;;;AAyKD,wBAOG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-table-filter.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"vc-table-filter.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAiDD,iBAAS,UAAU,SAElB;;;;;;;;;;;;;;;;;;AAmMD,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-table-mobile-item.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGtE,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB;AACD,MAAM,WAAW,SAAS;IAExB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;;;
|
|
1
|
+
{"version":3,"file":"vc-table-mobile-item.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGtE,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB;AACD,MAAM,WAAW,SAAS;IAExB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;;;iCA0gB8B,oBAAoB,EAAE;;kBACrC,MAAM;;;yBA7BQ,GAAG;;WAqC1B,GAAG;;4BADM,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;;qCAR1B,oBAAoB,EAAE;;sBACrC,MAAM;;oBAON,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBArCoB,GAAG;;;;;;;;;;yCA4BF,oBAAoB,EAAE;;0BACrC,MAAM;;wBAON,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;6BArCoB,GAAG;;;;;AA3ejC,wBAqhB2E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAWL,QAAQ,EACT,MAAM,KAAK,CAAC;AAOb,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK/E,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;
|
|
1
|
+
{"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAWL,QAAQ,EACT,MAAM,KAAK,CAAC;AAOb,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK/E,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B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
|
|
4
4
|
"main": "./dist/framework.mjs",
|
|
5
5
|
"module": "./dist/framework.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"whatwg-fetch": "^3.6.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
60
|
-
"@vc-shell/config-generator": "^1.0.
|
|
61
|
-
"@vc-shell/ts-config": "^1.0.
|
|
59
|
+
"@vc-shell/api-client-generator": "^1.0.120",
|
|
60
|
+
"@vc-shell/config-generator": "^1.0.120",
|
|
61
|
+
"@vc-shell/ts-config": "^1.0.120",
|
|
62
62
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
63
63
|
"sass": "^1.62.1",
|
|
64
64
|
"typescript": "^5.2.2",
|
|
@@ -19,11 +19,25 @@ function disabledHandler(
|
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
type AllKeys<T> = T extends unknown ? keyof T : never;
|
|
23
|
+
type FilterByKnownKey<T, K extends PropertyKey> = T extends unknown ? (K extends keyof T ? T : never) : never;
|
|
24
|
+
|
|
25
|
+
function safeIn<K extends AllKeys<T>, T extends object>(key: K, obj: T): obj is FilterByKnownKey<T, K> {
|
|
26
|
+
return key in obj ?? undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
function nodeBuilder<
|
|
23
30
|
Context extends Record<string, unknown>,
|
|
24
31
|
BContext extends UnwrapNestedRefs<DetailsBladeContext>,
|
|
25
32
|
FormData
|
|
26
|
-
>(
|
|
33
|
+
>({
|
|
34
|
+
controlSchema,
|
|
35
|
+
parentId,
|
|
36
|
+
internalContext,
|
|
37
|
+
bladeContext,
|
|
38
|
+
currentLocale,
|
|
39
|
+
formData,
|
|
40
|
+
}: {
|
|
27
41
|
controlSchema: ControlSchema;
|
|
28
42
|
parentId: string | number;
|
|
29
43
|
internalContext: MaybeRef<Context>;
|
|
@@ -31,37 +45,57 @@ function nodeBuilder<
|
|
|
31
45
|
currentLocale: MaybeRef<string>;
|
|
32
46
|
formData: FormData;
|
|
33
47
|
}): VNode | false {
|
|
34
|
-
const { controlSchema, parentId, internalContext, bladeContext, currentLocale, formData } = args;
|
|
35
48
|
if (!controlSchema) return false;
|
|
36
49
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
const name = controlSchema.id;
|
|
51
|
+
const rules = (safeIn("rules", controlSchema) && controlSchema.rules) || undefined;
|
|
52
|
+
const placeholder = (safeIn("placeholder", controlSchema) && controlSchema.placeholder) || undefined;
|
|
53
|
+
const required = safeIn("rules", controlSchema) && controlSchema.rules?.required;
|
|
54
|
+
const modelValue =
|
|
55
|
+
(safeIn("property", controlSchema) && getModel(controlSchema.property, toValue(internalContext))) || undefined;
|
|
56
|
+
const tooltip = (safeIn("tooltip", controlSchema) && controlSchema.tooltip) || undefined;
|
|
57
|
+
const multilanguage = safeIn("multilanguage", controlSchema) && controlSchema.multilanguage;
|
|
58
|
+
|
|
59
|
+
const label = safeIn("label", controlSchema)
|
|
60
|
+
? unref(unwrapInterpolation(controlSchema.label, toValue(internalContext)))
|
|
61
|
+
: undefined;
|
|
62
|
+
|
|
63
|
+
const disabled =
|
|
64
|
+
(safeIn("disabled", bladeContext.scope) && bladeContext.scope.disabled) ||
|
|
65
|
+
disabledHandler("disabled" in controlSchema && controlSchema.disabled, bladeContext);
|
|
66
|
+
|
|
67
|
+
const onUpdateModelValue = (e: unknown) => {
|
|
68
|
+
if (safeIn("property", controlSchema)) {
|
|
49
69
|
setModel({ property: controlSchema.property, value: e, context: toValue(internalContext) });
|
|
50
70
|
|
|
51
71
|
if (_.has(controlSchema, "update.method")) {
|
|
52
|
-
controlSchema.update.method
|
|
53
|
-
typeof bladeContext.scope[
|
|
54
|
-
|
|
55
|
-
|
|
72
|
+
const updateMethod = safeIn("update", controlSchema) && controlSchema.update.method;
|
|
73
|
+
if (safeIn(updateMethod, bladeContext.scope) && typeof bladeContext.scope[updateMethod] === "function") {
|
|
74
|
+
bladeContext.scope[updateMethod](e, controlSchema.property, toValue(internalContext));
|
|
75
|
+
}
|
|
56
76
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const baseProps: IControlBaseProps = reactive({
|
|
81
|
+
key: `${parentId}`,
|
|
82
|
+
label,
|
|
83
|
+
disabled,
|
|
84
|
+
name,
|
|
85
|
+
rules,
|
|
86
|
+
placeholder,
|
|
87
|
+
required,
|
|
88
|
+
modelValue,
|
|
89
|
+
"onUpdate:modelValue": onUpdateModelValue,
|
|
90
|
+
tooltip,
|
|
91
|
+
multilanguage,
|
|
60
92
|
});
|
|
61
93
|
|
|
62
|
-
const baseOptions = reactive
|
|
94
|
+
const baseOptions: IControlBaseOptions = reactive({
|
|
63
95
|
visibility: computed(() =>
|
|
64
|
-
|
|
96
|
+
safeIn("visibility", controlSchema) && controlSchema.visibility?.method
|
|
97
|
+
? bladeContext.scope[controlSchema.visibility?.method]
|
|
98
|
+
: true
|
|
65
99
|
),
|
|
66
100
|
});
|
|
67
101
|
|
|
@@ -69,16 +103,18 @@ function nodeBuilder<
|
|
|
69
103
|
|
|
70
104
|
const fieldsHandler = computed(() => {
|
|
71
105
|
if (!("fields" in controlSchema)) return null;
|
|
72
|
-
|
|
106
|
+
|
|
107
|
+
const fieldsModel = safeIn("property", controlSchema) && getModel(controlSchema.property, toValue(internalContext));
|
|
73
108
|
|
|
74
109
|
const model = toValue(fieldsModel);
|
|
110
|
+
|
|
75
111
|
if (model && Array.isArray(model)) {
|
|
76
|
-
return model.map((
|
|
112
|
+
return model.map((modelItem: { [x: string]: unknown; id: string }) =>
|
|
77
113
|
controlSchema.fields.map((fieldItem) =>
|
|
78
114
|
nodeBuilder({
|
|
79
115
|
controlSchema: fieldItem,
|
|
80
|
-
parentId: `fieldset-${fieldItem.id}-${
|
|
81
|
-
internalContext:
|
|
116
|
+
parentId: `fieldset-${fieldItem.id}-${modelItem.id}`,
|
|
117
|
+
internalContext: modelItem,
|
|
82
118
|
bladeContext,
|
|
83
119
|
currentLocale,
|
|
84
120
|
formData,
|
|
@@ -86,6 +122,7 @@ function nodeBuilder<
|
|
|
86
122
|
)
|
|
87
123
|
);
|
|
88
124
|
}
|
|
125
|
+
|
|
89
126
|
return [
|
|
90
127
|
controlSchema.fields.map((field) =>
|
|
91
128
|
nodeBuilder({
|
|
@@ -7,6 +7,8 @@ export type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
|
7
7
|
export type Composable<T> = T[keyof T];
|
|
8
8
|
|
|
9
9
|
export type DynamicSchema = DynamicGridSchema | DynamicDetailsSchema;
|
|
10
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
11
|
+
type RequiredBy<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
10
12
|
|
|
11
13
|
export interface DynamicGridSchema {
|
|
12
14
|
/**
|
|
@@ -82,7 +84,8 @@ export interface SettingsBase {
|
|
|
82
84
|
pushNotificationType?: string | string[];
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
export interface ListContentSchema
|
|
87
|
+
export interface ListContentSchema {
|
|
88
|
+
id: string;
|
|
86
89
|
component: "vc-table";
|
|
87
90
|
filter?: FilterSchema;
|
|
88
91
|
multiselect?: boolean;
|
|
@@ -107,7 +110,8 @@ export interface ListContentSchema extends SchemaBase {
|
|
|
107
110
|
};
|
|
108
111
|
}
|
|
109
112
|
|
|
110
|
-
export interface FormContentSchema
|
|
113
|
+
export interface FormContentSchema {
|
|
114
|
+
id: string;
|
|
111
115
|
component: "vc-form";
|
|
112
116
|
children: ControlSchema[];
|
|
113
117
|
}
|
|
@@ -116,19 +120,58 @@ export interface GridTemplateOverride {
|
|
|
116
120
|
component?: string;
|
|
117
121
|
}
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Base component schema interface.
|
|
125
|
+
*/
|
|
122
126
|
export interface SchemaBase {
|
|
127
|
+
/** Unique identifier for component.
|
|
128
|
+
* @type {string}
|
|
129
|
+
*/
|
|
123
130
|
id: string;
|
|
131
|
+
/** Control label.
|
|
132
|
+
* @type {string}
|
|
133
|
+
*/
|
|
124
134
|
label?: string;
|
|
125
|
-
|
|
135
|
+
/** Property name to populate the component with data.
|
|
136
|
+
* @type {string}
|
|
137
|
+
*/
|
|
138
|
+
property: string;
|
|
139
|
+
/** Vee-validate and custom validation rules for the schema.
|
|
140
|
+
*
|
|
141
|
+
* Available rules - {@link IValidationRules}
|
|
142
|
+
* @type {IValidationRules}
|
|
143
|
+
*/
|
|
126
144
|
rules?: IValidationRules;
|
|
145
|
+
/** Placeholder text for component.
|
|
146
|
+
* @type {string}
|
|
147
|
+
*/
|
|
127
148
|
placeholder?: string;
|
|
149
|
+
/** Disabled state for component.
|
|
150
|
+
* @description Method should be defined in the blade `scope`.
|
|
151
|
+
* Method should return boolean value.
|
|
152
|
+
* @type {{ method: string }}
|
|
153
|
+
*/
|
|
128
154
|
disabled?: { method: string };
|
|
155
|
+
/** Tooltip text for component.
|
|
156
|
+
* @type {string}
|
|
157
|
+
*/
|
|
129
158
|
tooltip?: string;
|
|
130
|
-
|
|
159
|
+
/** Visibility options for component.
|
|
160
|
+
* @description Method should be defined in the blade `scope`.
|
|
161
|
+
* Method should return boolean value.
|
|
162
|
+
* @type {{ method: string }}
|
|
163
|
+
*/
|
|
164
|
+
visibility?: {
|
|
165
|
+
method: string;
|
|
166
|
+
};
|
|
167
|
+
/** Flag to indicate if the component supports multilanguage.
|
|
168
|
+
* @type {boolean}
|
|
169
|
+
*/
|
|
131
170
|
multilanguage?: boolean;
|
|
171
|
+
/** Additional method that is called when the modelValue of the component changes
|
|
172
|
+
* @description Method should be defined in the blade `scope`.
|
|
173
|
+
* @type {{ method: string }}
|
|
174
|
+
*/
|
|
132
175
|
update?: { method: string };
|
|
133
176
|
}
|
|
134
177
|
|
|
@@ -155,7 +198,8 @@ export interface InputSchema extends SchemaBase {
|
|
|
155
198
|
prependInner?: ControlSchema;
|
|
156
199
|
}
|
|
157
200
|
|
|
158
|
-
export interface VideoSchema
|
|
201
|
+
export interface VideoSchema
|
|
202
|
+
extends Pick<SchemaBase, "id" | "property" | "label" | "visibility" | "tooltip" | "update"> {
|
|
159
203
|
component: "vc-video";
|
|
160
204
|
size?: ComponentProps<typeof VcVideo>["size"];
|
|
161
205
|
rounded?: boolean;
|
|
@@ -163,13 +207,13 @@ export interface VideoSchema extends SchemaBase {
|
|
|
163
207
|
clickable?: boolean;
|
|
164
208
|
}
|
|
165
209
|
|
|
166
|
-
export interface FieldSchema extends SchemaBase {
|
|
210
|
+
export interface FieldSchema extends Pick<SchemaBase, "id" | "property" | "label" | "visibility" | "tooltip"> {
|
|
167
211
|
component: "vc-field";
|
|
168
212
|
variant?: ComponentProps<typeof VcField>["type"];
|
|
169
213
|
copyable?: boolean;
|
|
170
214
|
}
|
|
171
215
|
|
|
172
|
-
export interface ImageSchema extends SchemaBase {
|
|
216
|
+
export interface ImageSchema extends Pick<SchemaBase, "id" | "property" | "visibility" | "update"> {
|
|
173
217
|
component: "vc-image";
|
|
174
218
|
aspect?: ComponentProps<typeof VcImage>["aspect"];
|
|
175
219
|
size?: ComponentProps<typeof VcImage>["size"];
|
|
@@ -179,7 +223,7 @@ export interface ImageSchema extends SchemaBase {
|
|
|
179
223
|
clickable?: boolean;
|
|
180
224
|
}
|
|
181
225
|
|
|
182
|
-
export interface StatusSchema extends SchemaBase {
|
|
226
|
+
export interface StatusSchema extends Pick<SchemaBase, "id" | "visibility"> {
|
|
183
227
|
component: "vc-status";
|
|
184
228
|
outline?: boolean;
|
|
185
229
|
extend?: boolean;
|
|
@@ -193,7 +237,7 @@ export interface StatusSchema extends SchemaBase {
|
|
|
193
237
|
};
|
|
194
238
|
}
|
|
195
239
|
|
|
196
|
-
export interface InputCurrencySchema extends SchemaBase {
|
|
240
|
+
export interface InputCurrencySchema extends Omit<SchemaBase, "multilanguage"> {
|
|
197
241
|
component: "vc-input-currency";
|
|
198
242
|
optionProperty: string;
|
|
199
243
|
optionValue?: string;
|
|
@@ -205,37 +249,57 @@ export interface EditorSchema extends SchemaBase {
|
|
|
205
249
|
component: "vc-editor";
|
|
206
250
|
}
|
|
207
251
|
|
|
208
|
-
export interface DynamicPropertiesSchema extends SchemaBase {
|
|
252
|
+
export interface DynamicPropertiesSchema extends Omit<SchemaBase, "rules" | "placeholder"> {
|
|
209
253
|
component: "vc-dynamic-properties";
|
|
210
254
|
exclude?: string[];
|
|
211
255
|
include?: string[];
|
|
212
256
|
}
|
|
213
257
|
|
|
214
|
-
export interface GallerySchema extends SchemaBase {
|
|
258
|
+
export interface GallerySchema extends Omit<SchemaBase, "placeholder" | "multilanguage"> {
|
|
215
259
|
component: "vc-gallery";
|
|
216
260
|
uploadFolder: string;
|
|
217
261
|
}
|
|
218
262
|
|
|
219
|
-
|
|
263
|
+
/**
|
|
264
|
+
* Interface for a card schema.
|
|
265
|
+
* @interface
|
|
266
|
+
*/
|
|
267
|
+
export interface CardSchema extends RequiredBy<Pick<SchemaBase, "id" | "label" | "visibility">, "label"> {
|
|
268
|
+
/**
|
|
269
|
+
* Component type for the card.
|
|
270
|
+
* @type {"vc-card"}
|
|
271
|
+
*/
|
|
220
272
|
component: "vc-card";
|
|
273
|
+
/**
|
|
274
|
+
* Array of control schemas for the fields in the card.
|
|
275
|
+
* @type {ControlSchema[]}
|
|
276
|
+
*/
|
|
221
277
|
fields: ControlSchema[];
|
|
278
|
+
/**
|
|
279
|
+
* Button schema for the action button in the card, along with the action method to use.
|
|
280
|
+
* @type {ButtonSchema & { method: string }}
|
|
281
|
+
*/
|
|
222
282
|
action?: ButtonSchema & { method: string };
|
|
283
|
+
/**
|
|
284
|
+
* Whether the card is collapsible or not.
|
|
285
|
+
* @type {boolean}
|
|
286
|
+
*/
|
|
223
287
|
collapsible?: boolean;
|
|
224
288
|
}
|
|
225
289
|
|
|
226
|
-
export interface WidgetsSchema extends SchemaBase {
|
|
290
|
+
export interface WidgetsSchema extends Pick<SchemaBase, "id"> {
|
|
227
291
|
component: "vc-widgets";
|
|
228
292
|
children: string[];
|
|
229
293
|
}
|
|
230
294
|
|
|
231
|
-
export interface CheckboxSchema extends SchemaBase {
|
|
295
|
+
export interface CheckboxSchema extends Omit<SchemaBase, "multilanguage"> {
|
|
232
296
|
component: "vc-checkbox";
|
|
233
297
|
content: string;
|
|
234
298
|
trueValue?: boolean;
|
|
235
299
|
falseValue?: boolean;
|
|
236
300
|
}
|
|
237
301
|
|
|
238
|
-
export interface FieldsetSchema extends SchemaBase {
|
|
302
|
+
export interface FieldsetSchema extends PartialBy<Pick<SchemaBase, "id" | "property" | "visibility">, "property"> {
|
|
239
303
|
component: "vc-fieldset";
|
|
240
304
|
columns?: number;
|
|
241
305
|
aspectRatio?: number[];
|
|
@@ -245,13 +309,45 @@ export interface FieldsetSchema extends SchemaBase {
|
|
|
245
309
|
};
|
|
246
310
|
}
|
|
247
311
|
|
|
248
|
-
|
|
312
|
+
/**
|
|
313
|
+
* Button schema interface.
|
|
314
|
+
*/
|
|
315
|
+
export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visibility"> {
|
|
316
|
+
/**
|
|
317
|
+
* Component type.
|
|
318
|
+
* @type {"vc-button"}
|
|
319
|
+
*/
|
|
249
320
|
component: "vc-button";
|
|
321
|
+
/**
|
|
322
|
+
* Button inner text.
|
|
323
|
+
* @type {string}
|
|
324
|
+
*/
|
|
250
325
|
content: string;
|
|
326
|
+
/**
|
|
327
|
+
* Small sized button.
|
|
328
|
+
* @type {boolean}
|
|
329
|
+
*/
|
|
251
330
|
small?: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Button icon.
|
|
333
|
+
* @type {string}
|
|
334
|
+
*/
|
|
252
335
|
icon?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Size of the button icon.
|
|
338
|
+
* @type {ComponentProps<typeof VcIcon>["size"]}
|
|
339
|
+
*/
|
|
253
340
|
iconSize?: ComponentProps<typeof VcIcon>["size"];
|
|
341
|
+
/**
|
|
342
|
+
* Button as text without overlay.
|
|
343
|
+
* @type {boolean}
|
|
344
|
+
*/
|
|
254
345
|
text?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Method to be called when the button is clicked.
|
|
348
|
+
* @description Method should be defined in the blade `scope`.
|
|
349
|
+
* @type {string}
|
|
350
|
+
*/
|
|
255
351
|
method?: string;
|
|
256
352
|
}
|
|
257
353
|
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
:required="required"
|
|
11
11
|
>
|
|
12
12
|
<span>{{ label }}</span>
|
|
13
|
+
<template
|
|
14
|
+
v-if="tooltip"
|
|
15
|
+
#tooltip
|
|
16
|
+
>{{ tooltip }}</template
|
|
17
|
+
>
|
|
13
18
|
</VcLabel>
|
|
14
19
|
<label class="vc-checkbox__label">
|
|
15
20
|
<input
|
|
@@ -57,6 +62,7 @@ export interface Props {
|
|
|
57
62
|
trueValue?: boolean;
|
|
58
63
|
falseValue?: boolean;
|
|
59
64
|
label?: string;
|
|
65
|
+
tooltip?: string;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
export interface Emits {
|
package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<template #title>
|
|
8
8
|
<div>
|
|
9
9
|
<span>{{ currentImage.name }} (</span>
|
|
10
|
-
<VcLink @click="copyLink(currentImage.url)">{{
|
|
10
|
+
<VcLink @click="copyLink(currentImage.url ?? '')">{{
|
|
11
11
|
t("COMPONENTS.ORGANISMS.VC_GALLERY.INTERNAL.VC_GALLERY_PREVIEW.COPY_IMAGE_LINK")
|
|
12
12
|
}}</VcLink>
|
|
13
13
|
<span>)</span>
|
|
@@ -175,7 +175,7 @@ function onItemDragStart(event: DragEvent, item: IImage) {
|
|
|
175
175
|
if (!props.disableDrag && !props.disabled) {
|
|
176
176
|
draggedItem.value = item;
|
|
177
177
|
draggedElement.value = event.target as HTMLElement;
|
|
178
|
-
event.dataTransfer
|
|
178
|
+
event.dataTransfer?.setData("text", "gallery_reorder");
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -185,33 +185,35 @@ function onItemDragOver(event: DragEvent) {
|
|
|
185
185
|
if (!props.disableDrag && !props.disabled && draggedItem.value && dropItem) {
|
|
186
186
|
event.preventDefault();
|
|
187
187
|
|
|
188
|
-
const containerOffset = galleryRef.value
|
|
188
|
+
const containerOffset = galleryRef.value?.getBoundingClientRect();
|
|
189
189
|
const dropItemOffset = dropItem.getBoundingClientRect();
|
|
190
190
|
|
|
191
|
-
if (draggedElement.value !== dropItem) {
|
|
191
|
+
if (draggedElement.value !== dropItem && containerOffset) {
|
|
192
192
|
const elementStyle = getComputedStyle(dropItem);
|
|
193
193
|
const dropItemOffsetWidth = dropItem.offsetWidth + parseFloat(elementStyle.marginLeft);
|
|
194
194
|
const targetLeft = dropItemOffset.left - containerOffset.left;
|
|
195
195
|
const columnCenter = dropItemOffset.left + dropItemOffsetWidth / 2;
|
|
196
196
|
|
|
197
|
-
reorderGalleryRef.value
|
|
198
|
-
|
|
197
|
+
if (reorderGalleryRef.value) {
|
|
198
|
+
reorderGalleryRef.value.style.top = dropItemOffset.top - containerOffset.top + "px";
|
|
199
|
+
reorderGalleryRef.value.style.height = dropItem.offsetHeight + "px";
|
|
199
200
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
201
|
+
if (event.pageX > columnCenter) {
|
|
202
|
+
reorderGalleryRef.value.style.left = targetLeft + dropItemOffsetWidth + "px";
|
|
203
|
+
dropPosition.value = 1;
|
|
204
|
+
} else {
|
|
205
|
+
reorderGalleryRef.value.style.left = targetLeft - parseFloat(elementStyle.marginLeft) + "px";
|
|
206
|
+
dropPosition.value = -1;
|
|
207
|
+
}
|
|
207
208
|
|
|
208
|
-
|
|
209
|
+
reorderGalleryRef.value.style.display = "block";
|
|
210
|
+
}
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
function onItemDragLeave(event: DragEvent) {
|
|
214
|
-
if (!props.disableDrag && !props.disabled && draggedItem.value) {
|
|
216
|
+
if (!props.disableDrag && !props.disabled && draggedItem.value && reorderGalleryRef.value) {
|
|
215
217
|
event.preventDefault();
|
|
216
218
|
|
|
217
219
|
reorderGalleryRef.value.style.display = "none";
|
|
@@ -241,10 +243,12 @@ function onItemDrop(event: DragEvent, item: IImage) {
|
|
|
241
243
|
updateOrder();
|
|
242
244
|
}
|
|
243
245
|
|
|
244
|
-
reorderGalleryRef.value.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
if (reorderGalleryRef.value && draggedElement.value) {
|
|
247
|
+
reorderGalleryRef.value.style.display = "none";
|
|
248
|
+
draggedElement.value.draggable = false;
|
|
249
|
+
draggedItem.value = undefined;
|
|
250
|
+
dropPosition.value = undefined;
|
|
251
|
+
}
|
|
248
252
|
}
|
|
249
253
|
}
|
|
250
254
|
|
|
@@ -265,8 +269,8 @@ function findParentElement(element: HTMLElement) {
|
|
|
265
269
|
} else {
|
|
266
270
|
let parent = element.parentElement;
|
|
267
271
|
|
|
268
|
-
while (!parent.classList.contains("vc-gallery__item")) {
|
|
269
|
-
parent = parent
|
|
272
|
+
while (!(parent && parent.classList.contains("vc-gallery__item"))) {
|
|
273
|
+
parent = parent?.parentElement || null;
|
|
270
274
|
if (!parent) break;
|
|
271
275
|
}
|
|
272
276
|
return parent;
|
package/ui/components/organisms/vc-notification-dropdown/_internal/notification/notification.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<template v-else>
|
|
8
8
|
<VcNotificationTemplate
|
|
9
9
|
:color="notificationStyle.color"
|
|
10
|
-
:title="notification.title"
|
|
10
|
+
:title="notification.title ?? ''"
|
|
11
11
|
:icon="notificationStyle.icon"
|
|
12
12
|
>
|
|
13
13
|
<VcHint
|
|
@@ -42,9 +42,7 @@ export interface Emits {
|
|
|
42
42
|
(event: "onClick"): void;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const props =
|
|
46
|
-
notification: undefined,
|
|
47
|
-
});
|
|
45
|
+
const props = defineProps<Props>();
|
|
48
46
|
|
|
49
47
|
const emit = defineEmits<Emits>();
|
|
50
48
|
|