@vc-shell/framework 1.0.320 → 1.0.322
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/api/platform.ts +694 -471
- package/core/composables/useNotifications/index.ts +61 -3
- package/core/plugins/modularity/index.ts +23 -4
- package/core/plugins/signalR/index.ts +42 -10
- package/dist/{azuread-DkJALKeY.js → azuread-BhAhqR2s.js} +2 -2
- package/dist/core/api/platform.d.ts +186 -162
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts +1 -0
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +3 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts +2 -1
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/{external-provider-BfhXfWct.js → external-provider-CKRKv1EO.js} +1 -1
- package/dist/{external-provider.vue_vue_type_script_setup_true_lang-DnfCYH2u.js → external-provider.vue_vue_type_script_setup_true_lang-pVwhlqSS.js} +1 -1
- package/dist/external-providers-BuwRmZS6.js +4 -0
- package/dist/framework.js +221 -222
- package/dist/{index-C1ubuqpz.js → index-1iQcKZcz.js} +1 -1
- package/dist/{index-tIxFQ1Ps.js → index-2VvztI5V.js} +1 -1
- package/dist/{index-Rnb_pp-E.js → index-BpeR8MpE.js} +1 -1
- package/dist/{index-p2XOxNI9.js → index-BqFdtq0j.js} +1 -1
- package/dist/{index-a7HiHYrT.js → index-BscDURbV.js} +1 -1
- package/dist/{index-Dkh5IMF7.js → index-C280JcJo.js} +1 -1
- package/dist/{index-B93I3Agz.js → index-CWRP_8OR.js} +1 -1
- package/dist/{index-DY4Xi8u8.js → index-CbVaCsap.js} +1 -1
- package/dist/{index-BFdnt4xk.js → index-CecSOxnk.js} +1 -1
- package/dist/{index-DMRj0aJ8.js → index-CkzHOg6W.js} +1 -1
- package/dist/{index-Bf_KENtH.js → index-D6rLpqm5.js} +1 -1
- package/dist/{index-CuqIbypI.js → index-DfABrHB_.js} +40320 -34452
- package/dist/{index-B1dqCnPS.js → index-bZ0IrgAu.js} +1 -1
- package/dist/{index-kvc5Uc7s.js → index-fuILXn_w.js} +1 -1
- package/dist/{index-BXSEbnel.js → index-h2e4Cdwh.js} +1 -1
- package/dist/{index-Cp7h8UBT.js → index-jSMgkZQV.js} +1 -1
- package/dist/{index-Byl_hvr6.js → index-osebbY9y.js} +8 -8
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/error-interceptor/index.d.ts +1 -9
- package/dist/shared/components/error-interceptor/index.d.ts.map +1 -1
- package/dist/shared/components/notification-template/index.d.ts +1 -18
- package/dist/shared/components/notification-template/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/index.d.ts.map +1 -1
- 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 +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts +5 -100
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts +13 -468
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/index.d.ts +1 -24
- package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts +12 -223
- package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.stories.d.ts +1 -6
- package/dist/ui/components/atoms/vc-col/vc-col.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/index.d.ts +6 -13
- package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-hint/index.d.ts +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts +1 -1
- package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts +1 -15
- package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/index.d.ts +1 -13
- package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts +1 -13
- package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/index.d.ts +1 -10
- package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts +1 -10
- package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-row/vc-row.stories.d.ts +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts +1 -13
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/index.d.ts +1 -42
- package/dist/ui/components/molecules/vc-checkbox/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.stories.d.ts +10 -420
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts +1 -41
- package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts +1 -35
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/index.d.ts +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts +6 -79
- package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +3 -0
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts +1 -80
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.stories.d.ts +4 -136
- package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts +4 -92
- package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/index.d.ts +1 -20
- package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts +1 -20
- package/dist/ui/components/molecules/vc-slider/vc-slider.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts +70 -294
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +3 -1
- package/dist/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +1 -27
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts +1 -38
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +13 -12
- package/shared/modules/dynamic/helpers/override.ts +8 -1
- package/shared/modules/dynamic/index.ts +22 -11
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +9 -11
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +0 -17
- package/ui/components/atoms/vc-button/vc-button.vue +2 -2
- package/ui/components/atoms/vc-container/vc-container.vue +6 -0
- package/ui/components/molecules/vc-input/vc-input.vue +6 -0
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +8 -0
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +2 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +5 -5
- package/dist/external-providers-Dd3QYSAe.js +0 -4
|
@@ -44,44 +44,7 @@ declare const _default: {
|
|
|
44
44
|
close: () => void;
|
|
45
45
|
expand: () => void;
|
|
46
46
|
collapse: () => void;
|
|
47
|
-
}, import("vue").
|
|
48
|
-
title: {
|
|
49
|
-
type: import("vue").PropType<string>;
|
|
50
|
-
};
|
|
51
|
-
icon: {
|
|
52
|
-
type: import("vue").PropType<string>;
|
|
53
|
-
};
|
|
54
|
-
width: {
|
|
55
|
-
type: import("vue").PropType<string | number>;
|
|
56
|
-
default: string;
|
|
57
|
-
};
|
|
58
|
-
expanded: {
|
|
59
|
-
type: import("vue").PropType<boolean>;
|
|
60
|
-
};
|
|
61
|
-
closable: {
|
|
62
|
-
type: import("vue").PropType<boolean>;
|
|
63
|
-
default: boolean;
|
|
64
|
-
};
|
|
65
|
-
subtitle: {
|
|
66
|
-
type: import("vue").PropType<string>;
|
|
67
|
-
};
|
|
68
|
-
expandable: {
|
|
69
|
-
type: import("vue").PropType<boolean>;
|
|
70
|
-
default: boolean;
|
|
71
|
-
};
|
|
72
|
-
toolbarItems: {
|
|
73
|
-
type: import("vue").PropType<import("../../../..").IBladeToolbar[]>;
|
|
74
|
-
default: () => never[];
|
|
75
|
-
};
|
|
76
|
-
modified: {
|
|
77
|
-
type: import("vue").PropType<boolean>;
|
|
78
|
-
default: undefined;
|
|
79
|
-
};
|
|
80
|
-
}>> & Readonly<{
|
|
81
|
-
onClose?: (() => any) | undefined;
|
|
82
|
-
onExpand?: (() => any) | undefined;
|
|
83
|
-
onCollapse?: (() => any) | undefined;
|
|
84
|
-
}>, {
|
|
47
|
+
}, import("vue").PublicProps, {
|
|
85
48
|
width: string | number;
|
|
86
49
|
closable: boolean;
|
|
87
50
|
expandable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-blade.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"vc-blade.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.stories.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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.322",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/dompurify": "^3.0.5",
|
|
62
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
63
|
-
"@vc-shell/config-generator": "^1.0.
|
|
64
|
-
"@vc-shell/ts-config": "^1.0.
|
|
62
|
+
"@vc-shell/api-client-generator": "^1.0.322",
|
|
63
|
+
"@vc-shell/config-generator": "^1.0.322",
|
|
64
|
+
"@vc-shell/ts-config": "^1.0.322",
|
|
65
65
|
"@vitejs/plugin-vue": "5.0.3",
|
|
66
66
|
"cypress-signalr-mock": "^1.5.0",
|
|
67
67
|
"sass": "^1.69.6",
|
|
@@ -244,12 +244,6 @@ const useBladeNavigationSingleton = createSharedComposable(() => {
|
|
|
244
244
|
for (let i = 0; i < children.length; i++) {
|
|
245
245
|
const element = children[i];
|
|
246
246
|
|
|
247
|
-
const position = navigationInstance.blades.value.findIndex((x) => x.type.name === element.type.name);
|
|
248
|
-
|
|
249
|
-
if (navigationInstance.blades.value[position - 1]) {
|
|
250
|
-
navigationInstance.blades.value[position - 1].props.param = undefined;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
247
|
if (element.props?.navigation?.onBeforeClose) {
|
|
254
248
|
const result = await element.props.navigation.onBeforeClose();
|
|
255
249
|
|
|
@@ -263,9 +257,19 @@ const useBladeNavigationSingleton = createSharedComposable(() => {
|
|
|
263
257
|
}
|
|
264
258
|
|
|
265
259
|
if (!isPrevented) {
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
const prevBlade = navigationInstance.blades.value[index - 1];
|
|
261
|
+
|
|
262
|
+
if (index > 0 && prevBlade?.props?.navigation?.isVisible === false) {
|
|
263
|
+
prevBlade.props.navigation.isVisible = true;
|
|
268
264
|
}
|
|
265
|
+
|
|
266
|
+
if (
|
|
267
|
+
prevBlade &&
|
|
268
|
+
toValue(prevBlade.props?.param) === toValue(navigationInstance.blades.value[index]?.props?.param)
|
|
269
|
+
) {
|
|
270
|
+
prevBlade.props.param = undefined;
|
|
271
|
+
}
|
|
272
|
+
|
|
269
273
|
navigationInstance.blades.value.splice(index);
|
|
270
274
|
}
|
|
271
275
|
|
|
@@ -547,10 +551,7 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
547
551
|
reactifyObject({
|
|
548
552
|
blade: registeredWorkspaceComponent as unknown as BladeInstanceConstructor,
|
|
549
553
|
param: computed(() => {
|
|
550
|
-
if (
|
|
551
|
-
navigationInstance.blades.value.length > 1 &&
|
|
552
|
-
registeredRouteComponent?.type.moduleUid === registeredWorkspaceComponent.type.moduleUid
|
|
553
|
-
) {
|
|
554
|
+
if (registeredRouteComponent?.type.moduleUid === registeredWorkspaceComponent.type.moduleUid) {
|
|
554
555
|
return param;
|
|
555
556
|
}
|
|
556
557
|
return undefined;
|
|
@@ -56,12 +56,19 @@ const upsertHelper = (overrides: OverridesSchema, schemaCopy: { [key: string]: D
|
|
|
56
56
|
valueByPath = current;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
if (
|
|
59
|
+
if (
|
|
60
|
+
Array.isArray(valueByPath) &&
|
|
61
|
+
valueByPath.length &&
|
|
62
|
+
typeof args.value === "object" &&
|
|
63
|
+
!Array.isArray(args.value)
|
|
64
|
+
) {
|
|
60
65
|
const findIndex = _.findIndex(valueByPath, { id: args.value.id });
|
|
61
66
|
|
|
62
67
|
const spliced = valueByPath /* @ts-expect-error - toSpliced is not parsed correctly by ts */
|
|
63
68
|
.toSpliced(findIndex >= 0 ? findIndex : (args.index ?? 0), findIndex >= 0 ? 1 : 0, args.value);
|
|
64
69
|
_.set(clonedSchema, currentPath, spliced);
|
|
70
|
+
} else if (Array.isArray(valueByPath) && valueByPath.length) {
|
|
71
|
+
_.set(clonedSchema, currentPath, [...valueByPath, args.value]);
|
|
65
72
|
} else {
|
|
66
73
|
_.set(clonedSchema, currentPath, args.value);
|
|
67
74
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import * as pages from "./pages";
|
|
3
|
-
import { App, Component, SetupContext, defineComponent } from "vue";
|
|
3
|
+
import { App, Component, SetupContext, defineComponent, watch } from "vue";
|
|
4
4
|
import { DynamicSchema, OverridesSchema } from "./types";
|
|
5
5
|
import * as _ from "lodash-es";
|
|
6
6
|
import { handleOverrides } from "./helpers/override";
|
|
7
7
|
import { reactiveComputed } from "@vueuse/core";
|
|
8
8
|
import { kebabToPascal } from "../../../core/utilities";
|
|
9
|
-
import { BladeInstanceConstructor } from "../../index";
|
|
9
|
+
import { BladeInstanceConstructor, notification } from "../../index";
|
|
10
10
|
import { createAppModule } from "../../../core/plugins";
|
|
11
11
|
import { ComponentProps } from "./../../utilities/vueUtils";
|
|
12
12
|
import { Router } from "vue-router";
|
|
@@ -38,7 +38,7 @@ const createAppModuleWrapper = (args: {
|
|
|
38
38
|
return createAppModule(
|
|
39
39
|
{ [bladeName]: bladeComponent },
|
|
40
40
|
appModuleContent?.locales,
|
|
41
|
-
appModuleContent?.notificationTemplates,
|
|
41
|
+
appModuleContent?.notificationTemplates as { [key: string]: Component & { notifyType: string } },
|
|
42
42
|
appModuleContent?.moduleComponents,
|
|
43
43
|
);
|
|
44
44
|
};
|
|
@@ -71,6 +71,7 @@ const createBladeInstanceConstructor = (
|
|
|
71
71
|
menuItem: ("menuItem" in json.settings && json.settings.menuItem) ?? undefined,
|
|
72
72
|
moduleUid: args.moduleUid,
|
|
73
73
|
routable: json.settings.routable ?? true,
|
|
74
|
+
notifyType: json.settings.pushNotificationType,
|
|
74
75
|
composables: existingComposables ? { ...existingComposables, ...args.composables } : args.composables,
|
|
75
76
|
setup: (props: ComponentProps<typeof bladeComponent>, ctx: SetupContext) =>
|
|
76
77
|
(bladeComponent?.setup &&
|
|
@@ -222,24 +223,36 @@ export function createDynamicAppModule(args: {
|
|
|
222
223
|
| undefined,
|
|
223
224
|
): void;
|
|
224
225
|
} {
|
|
225
|
-
let schemaCopy: { [key: string]: DynamicSchema } = {};
|
|
226
|
+
let schemaCopy: { [key: string]: DynamicSchema & { moduleUid: string } } = {};
|
|
226
227
|
|
|
227
228
|
if (args.schema && Object.keys(args.schema).length > 0) {
|
|
229
|
+
const moduleUid = _.uniqueId("module_");
|
|
228
230
|
Object.entries(args.schema).forEach(([, schema]) => {
|
|
229
231
|
if (schema.settings && schema.settings.id) {
|
|
230
|
-
schemaCopy[schema.settings.id] = _.cloneDeep(schema);
|
|
232
|
+
schemaCopy[schema.settings.id] = { ..._.cloneDeep(schema), moduleUid };
|
|
231
233
|
registeredSchemas[schema.settings.id] = schemaCopy[schema.settings.id];
|
|
232
234
|
}
|
|
233
235
|
});
|
|
234
236
|
} else {
|
|
235
237
|
// Use registered schemas if new ones are not provided
|
|
236
|
-
schemaCopy = _.cloneDeep({ ...registeredSchemas });
|
|
238
|
+
schemaCopy = _.cloneDeep({ ...registeredSchemas }) as { [key: string]: DynamicSchema & { moduleUid: string } };
|
|
237
239
|
}
|
|
238
240
|
|
|
239
241
|
if (args.overrides) {
|
|
240
|
-
schemaCopy = handleOverrides(args.overrides, schemaCopy)
|
|
242
|
+
schemaCopy = handleOverrides(args.overrides, schemaCopy) as {
|
|
243
|
+
[key: string]: DynamicSchema & { moduleUid: string };
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
const newUid = _.uniqueId("module_");
|
|
247
|
+
const newSchemas = Object.entries(schemaCopy).reduce(
|
|
248
|
+
(acc, [key, schema]) => {
|
|
249
|
+
acc[key] = { ...schema, moduleUid: newUid };
|
|
250
|
+
return acc;
|
|
251
|
+
},
|
|
252
|
+
{} as { [key: string]: DynamicSchema & { moduleUid: string } },
|
|
253
|
+
);
|
|
241
254
|
|
|
242
|
-
Object.assign(registeredSchemas,
|
|
255
|
+
Object.assign(registeredSchemas, newSchemas);
|
|
243
256
|
}
|
|
244
257
|
|
|
245
258
|
// Validation
|
|
@@ -259,8 +272,6 @@ export function createDynamicAppModule(args: {
|
|
|
259
272
|
moduleComponents: args?.moduleComponents,
|
|
260
273
|
};
|
|
261
274
|
|
|
262
|
-
const moduleUid = _.uniqueId("module_");
|
|
263
|
-
|
|
264
275
|
const getComposables = (bladeId: string) => {
|
|
265
276
|
const composable = schemaCopy[bladeId]?.settings.composable;
|
|
266
277
|
|
|
@@ -286,7 +297,7 @@ export function createDynamicAppModule(args: {
|
|
|
286
297
|
mixin,
|
|
287
298
|
json: JsonSchema,
|
|
288
299
|
options,
|
|
289
|
-
moduleUid,
|
|
300
|
+
moduleUid: JsonSchema.moduleUid,
|
|
290
301
|
};
|
|
291
302
|
|
|
292
303
|
if (installedBladeIds.has(bladeId)) {
|
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
v-if="bladeOptions"
|
|
17
17
|
#actions
|
|
18
18
|
>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</template>
|
|
26
|
-
</div>
|
|
19
|
+
<template
|
|
20
|
+
v-for="(value, key, index) in bladeOptions"
|
|
21
|
+
:key="`blade-actions-slot-${key}-${index}`"
|
|
22
|
+
>
|
|
23
|
+
<component :is="value" />
|
|
24
|
+
</template>
|
|
27
25
|
</template>
|
|
28
26
|
|
|
29
27
|
<div class="blade-content-wrapper">
|
|
@@ -313,7 +311,7 @@ const bladeMultilanguage = reactiveComputed(() => {
|
|
|
313
311
|
outline: false,
|
|
314
312
|
offset: {
|
|
315
313
|
mainAxis: -2,
|
|
316
|
-
crossAxis: -
|
|
314
|
+
crossAxis: -15,
|
|
317
315
|
},
|
|
318
316
|
placement: "bottom-end",
|
|
319
317
|
"onUpdate:modelValue": (e: string) => {
|
|
@@ -332,7 +330,7 @@ const bladeMultilanguage = reactiveComputed(() => {
|
|
|
332
330
|
"div",
|
|
333
331
|
{
|
|
334
332
|
class:
|
|
335
|
-
"tw-flex tw-items-center tw-justify-center tw-bg-[--primary-100] tw-w-8 tw-h-8 tw-rounded-
|
|
333
|
+
"tw-flex tw-items-center tw-justify-center tw-bg-[--primary-100] tw-w-8 tw-h-8 tw-rounded-full tw-mr-1 hover:tw-bg-[--primary-200]",
|
|
336
334
|
},
|
|
337
335
|
[h(VcImage, { src: scope.opt.flag, class: "tw-w-6 tw-h-6", emptyIcon: "" })],
|
|
338
336
|
);
|
|
@@ -527,7 +525,7 @@ defineExpose({
|
|
|
527
525
|
.language-selector-container {
|
|
528
526
|
position: absolute;
|
|
529
527
|
top: 0;
|
|
530
|
-
right:
|
|
528
|
+
right: 0;
|
|
531
529
|
z-index: 10;
|
|
532
530
|
}
|
|
533
531
|
|
|
@@ -225,25 +225,8 @@ const selectedIds = shallowRef<string[]>([]);
|
|
|
225
225
|
const itemsProxy = ref<Record<string, any>[]>();
|
|
226
226
|
const isMixinReady = ref(false);
|
|
227
227
|
|
|
228
|
-
const { moduleNotifications, markAsRead } = useNotifications(settings.value?.pushNotificationType);
|
|
229
228
|
const { setNavigationQuery, getNavigationQuery } = useBladeNavigation();
|
|
230
229
|
|
|
231
|
-
watch(
|
|
232
|
-
moduleNotifications,
|
|
233
|
-
(newVal) => {
|
|
234
|
-
newVal.forEach((message) => {
|
|
235
|
-
if (message.title && props.composables) {
|
|
236
|
-
notification.success(message.title, {
|
|
237
|
-
onClose() {
|
|
238
|
-
markAsRead(message);
|
|
239
|
-
},
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
},
|
|
244
|
-
{ deep: true },
|
|
245
|
-
);
|
|
246
|
-
|
|
247
230
|
const tableData =
|
|
248
231
|
props.composables &&
|
|
249
232
|
computed(() => props.model?.content.find((type: ListContentSchema) => type.component === "vc-table"));
|
|
@@ -102,7 +102,7 @@ function onClick(e: Event): void {
|
|
|
102
102
|
--button-padding-hor: 14px;
|
|
103
103
|
--button-padding-hor-small: 14px;
|
|
104
104
|
--button-padding-vert: 10px;
|
|
105
|
-
--button-padding-vert-small:
|
|
105
|
+
--button-padding-vert-small: 7px;
|
|
106
106
|
|
|
107
107
|
--button-height: 36px;
|
|
108
108
|
--button-height-small: 28px;
|
|
@@ -135,7 +135,7 @@ $variants: primary, warning, danger;
|
|
|
135
135
|
@apply tw-py-[var(--button-padding-vert-small)] tw-min-h-[var(--button-height-small)] tw-px-[var(--button-padding-hor-small)] tw-font-normal tw-text-xs;
|
|
136
136
|
|
|
137
137
|
.vc-button__icon + .vc-button__title {
|
|
138
|
-
@apply tw-ml-
|
|
138
|
+
@apply tw-ml-2;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
'vc-container__inner_touching': touching,
|
|
35
35
|
}"
|
|
36
36
|
:style="{ top: topOffset + 'px' }"
|
|
37
|
+
@scroll="onScroll"
|
|
37
38
|
>
|
|
38
39
|
<slot></slot>
|
|
39
40
|
</div>
|
|
@@ -52,6 +53,7 @@ export interface Props {
|
|
|
52
53
|
|
|
53
54
|
export interface Emits {
|
|
54
55
|
(event: "scroll:ptr"): void;
|
|
56
|
+
(event: "scroll", e: Event): void;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
const props = defineProps<Props>();
|
|
@@ -109,6 +111,10 @@ function onTouchend() {
|
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
function onScroll(e: Event) {
|
|
115
|
+
emit("scroll", e);
|
|
116
|
+
}
|
|
117
|
+
|
|
112
118
|
onMounted(() => {
|
|
113
119
|
const observer = new ResizeObserver(() => {
|
|
114
120
|
scroll.value = (component.value && component.value.clientHeight < component.value.scrollHeight) as boolean;
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
class="vc-input__input"
|
|
117
117
|
@keydown="onKeyDown"
|
|
118
118
|
@blur="handleBlur"
|
|
119
|
+
@focus="handleFocus"
|
|
119
120
|
/>
|
|
120
121
|
</template>
|
|
121
122
|
</slot>
|
|
@@ -332,6 +333,7 @@ export interface Emits {
|
|
|
332
333
|
*/
|
|
333
334
|
(event: "update:modelValue", value: string | number | Date | null | undefined): void;
|
|
334
335
|
(event: "blur", value: Event): void;
|
|
336
|
+
(event: "focus"): void;
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -545,6 +547,10 @@ function handleBlur(e: Event) {
|
|
|
545
547
|
function focus() {
|
|
546
548
|
inputRef.value?.focus();
|
|
547
549
|
}
|
|
550
|
+
|
|
551
|
+
function handleFocus() {
|
|
552
|
+
emit("focus");
|
|
553
|
+
}
|
|
548
554
|
</script>
|
|
549
555
|
|
|
550
556
|
<style lang="scss">
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<!-- Textarea field -->
|
|
27
27
|
<div class="vc-textarea__field-wrapper">
|
|
28
28
|
<textarea
|
|
29
|
+
ref="textareaRef"
|
|
29
30
|
class="vc-textarea__field"
|
|
30
31
|
:placeholder="placeholder"
|
|
31
32
|
:value="modelValue"
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
</template>
|
|
48
49
|
|
|
49
50
|
<script lang="ts" setup>
|
|
51
|
+
import { ref } from "vue";
|
|
50
52
|
import { VcHint, VcLabel } from "./../../";
|
|
51
53
|
|
|
52
54
|
export interface Props {
|
|
@@ -78,10 +80,16 @@ withDefaults(defineProps<Props>(), {
|
|
|
78
80
|
|
|
79
81
|
const emit = defineEmits<Emits>();
|
|
80
82
|
|
|
83
|
+
const textareaRef = ref<HTMLTextAreaElement>();
|
|
84
|
+
|
|
81
85
|
function onInput(e: Event) {
|
|
82
86
|
const newValue = (e.target as HTMLInputElement).value;
|
|
83
87
|
emit("update:modelValue", newValue);
|
|
84
88
|
}
|
|
89
|
+
|
|
90
|
+
defineExpose({
|
|
91
|
+
focus: () => textareaRef.value?.focus(),
|
|
92
|
+
});
|
|
85
93
|
</script>
|
|
86
94
|
|
|
87
95
|
<style lang="scss">
|
|
@@ -169,7 +169,7 @@ function onClose(): void {
|
|
|
169
169
|
@apply tw-shrink-0 tw-h-[var(--blade-header-height)] tw-bg-[color:var(--blade-header-background-color)] tw-flex tw-items-center tw-py-0 tw-px-4 tw-border-solid tw-border-b tw-border-b-[color:var(--blade-header-border-color)];
|
|
170
170
|
|
|
171
171
|
&__actions {
|
|
172
|
-
@apply tw-
|
|
172
|
+
@apply tw-grow tw-basis-0 tw-overflow-hidden tw-flex tw-justify-end;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
&__status {
|
|
@@ -193,7 +193,7 @@ function onClose(): void {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
&__content {
|
|
196
|
-
@apply tw-overflow-hidden tw-grow tw-basis-0;
|
|
196
|
+
@apply tw-overflow-hidden tw-grow tw-basis-0 tw-shrink-0;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
&__title {
|
|
@@ -348,23 +348,23 @@ const { open } = usePopup({
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
&__widget-toggle {
|
|
351
|
-
@apply tw-flex
|
|
351
|
+
@apply tw-flex;
|
|
352
352
|
|
|
353
353
|
&--desktop {
|
|
354
|
-
@apply tw-flex-col tw-justify-end;
|
|
354
|
+
@apply tw-flex-col tw-justify-end tw-max-h-14 tw-h-full tw-mt-auto;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
&--mobile {
|
|
358
|
-
@apply tw-w-12 tw-max-w-12 tw-bg-[color:var(--blade-background-color)] tw-items-center tw-justify-center tw-px-4 tw-ml-auto;
|
|
358
|
+
@apply tw-w-12 tw-max-w-12 tw-bg-[color:var(--blade-background-color)] tw-items-center tw-justify-center tw-px-4 tw-ml-auto tw-mt-0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
&__toggle-icon {
|
|
363
|
-
@apply tw-self-center tw-justify-self-center tw-text-[color:var(--blade-icon-color)] tw-cursor-pointer hover:tw-text-[color:var(--blade-icon-hover-color)];
|
|
363
|
+
@apply tw-flex-auto tw-items-center tw-self-center tw-justify-self-center tw-text-[color:var(--blade-icon-color)] tw-cursor-pointer hover:tw-text-[color:var(--blade-icon-hover-color)];
|
|
364
|
+
@apply tw-flex #{!important};
|
|
364
365
|
}
|
|
365
366
|
|
|
366
367
|
&__toggle-icon--desktop {
|
|
367
|
-
@apply tw-mb-4;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
|