@vc-shell/framework 1.0.116 → 1.0.118
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 +28 -0
- package/core/composables/useApiClient/index.ts +2 -2
- package/core/plugins/modularity/index.ts +1 -0
- package/core/plugins/signalR/index.ts +13 -8
- package/core/plugins/validation/rules.ts +3 -3
- package/core/types/index.ts +1 -1
- package/dist/core/composables/useApiClient/index.d.ts +2 -2
- package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.mjs +12698 -12500
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts +1 -0
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts +1 -0
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +3 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useContainer/index.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts +2 -2
- package/dist/shared/components/popup-handler/composables/usePopup/index.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/plugin.d.ts +2 -1
- package/dist/shared/components/popup-handler/plugin.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/types/index.d.ts +11 -10
- package/dist/shared/components/popup-handler/types/index.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts +5 -2202
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +4 -4
- package/dist/shared/modules/dynamic/components/factories.d.ts +4 -1
- package/dist/shared/modules/dynamic/components/factories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +4 -2
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +2 -2
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +3 -3
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +131 -0
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +1 -1
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts +3 -3
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/override.d.ts +2 -2
- package/dist/shared/modules/dynamic/helpers/override.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/toolbarReducer.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/unrefNested.d.ts +1 -1
- package/dist/shared/modules/dynamic/helpers/unrefNested.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 +8 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +24 -2
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/models.d.ts +19 -5
- package/dist/shared/modules/dynamic/types/models.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +4 -3
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/index.d.ts +1 -0
- package/dist/ui/components/molecules/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts +33 -0
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-field/index.d.ts +2 -0
- package/dist/ui/components/molecules/vc-field/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +45 -0
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/index.d.ts +1 -177
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +9 -6
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +9 -9
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +40 -46
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +6 -6
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/dist/ui/types/index.d.ts +1 -0
- package/dist/ui/types/index.d.ts.map +1 -1
- package/package.json +7 -6
- package/shared/components/blade-navigation/types/index.ts +3 -1
- package/shared/components/notifications/composables/useContainer/index.ts +4 -2
- package/shared/components/popup-handler/composables/usePopup/index.ts +36 -18
- package/shared/components/popup-handler/plugin.ts +3 -3
- package/shared/components/popup-handler/types/index.ts +17 -8
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +7 -6
- package/shared/modules/dynamic/components/FIELD_MAP.ts +13 -1
- package/shared/modules/dynamic/components/SchemaRender.ts +6 -6
- package/shared/modules/dynamic/components/factories.ts +34 -1
- package/shared/modules/dynamic/components/fields/Card.ts +2 -2
- package/shared/modules/dynamic/components/fields/ContentField.ts +25 -0
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +31 -11
- package/shared/modules/dynamic/components/fields/GalleryField.ts +1 -1
- package/shared/modules/dynamic/components/fields/ImageField.ts +30 -0
- package/shared/modules/dynamic/components/fields/SelectField.ts +9 -3
- package/shared/modules/dynamic/components/fields/ValidationField.ts +3 -3
- package/shared/modules/dynamic/components/fields/VideoField.ts +28 -0
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +21 -15
- package/shared/modules/dynamic/factories/types/index.ts +1 -1
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +12 -11
- package/shared/modules/dynamic/helpers/override.ts +4 -4
- package/shared/modules/dynamic/helpers/setters.ts +1 -1
- package/shared/modules/dynamic/helpers/toolbarReducer.ts +3 -1
- package/shared/modules/dynamic/helpers/unrefNested.ts +2 -2
- package/shared/modules/dynamic/index.ts +2 -1
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +4 -1
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +51 -9
- package/shared/modules/dynamic/types/index.ts +30 -2
- package/shared/modules/dynamic/types/models.ts +25 -4
- package/shared/pages/LoginPage/components/login/Login.vue +4 -2
- package/ui/components/molecules/index.ts +1 -0
- package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +66 -0
- package/ui/components/molecules/vc-field/index.ts +1 -0
- package/ui/components/molecules/vc-field/vc-field.vue +67 -0
- package/ui/components/molecules/vc-input/vc-input.vue +1 -1
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +8 -8
- package/ui/components/molecules/vc-select/index.ts +1 -3
- package/ui/components/molecules/vc-select/vc-select.vue +17 -14
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +4 -4
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +4 -3
- package/ui/components/organisms/vc-popup/vc-popup.vue +23 -25
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +4 -2
- package/ui/components/organisms/vc-table/vc-table.vue +49 -31
- package/ui/types/index.ts +1 -0
|
@@ -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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sBAIJ,SAAS,OAAO,CAAC;;;;;;;2BA93DM,MAAM;2BAAa,MAAM;;;;6CAo3DzB,oBAAoB,EAAE;0BAEzC,OAAO;yBAER,MAAM;0BAGL,MAAM;gCACA,MAAM;0BACZ,MAAM;oBAEZ,WAAW;uBACR,WAAW;gCAGF,MAAM;6BACT,MAAM;wBACX,OAAO;+BACA,OAAO;iCACL,OAAO;8BACV,OAAO;sBACf,MAAM;wBACJ,OAAO;;wBAOP,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;+CAz9D2B,GAAG,KAAK,GAAG;;;sBACG,aAAa;kBAAO,GAAG;4BAJxD,GAAG,KAAK,GAAG;4BACX;gBAAE,UAAU,EAAE,MAAM,IAAI,CAAA;aAAE,KAAK,GAAG;;;kBACZ,GAAG;8BAGvB,GAAG,KAAK,GAAG;2BACd,GAAG,KAAK,GAAG;4BACV,GAAG,KAAK,GAAG;;;uBAmEQ,MAAM;uBAAa,MAAM;;;;;AAjF9D,wBAw+D2E"}
|
package/dist/ui/types/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare module "vue" {
|
|
|
34
34
|
VcSlider: (typeof VcShellComponents)["VcSlider"];
|
|
35
35
|
VcTextarea: (typeof VcShellComponents)["VcTextarea"];
|
|
36
36
|
VcMultivalue: (typeof VcShellComponents)["VcMultivalue"];
|
|
37
|
+
VcField: (typeof VcShellComponents)["VcField"];
|
|
37
38
|
VcApp: (typeof VcShellComponents)["VcApp"];
|
|
38
39
|
VcBlade: (typeof VcShellComponents)["VcBlade"];
|
|
39
40
|
VcDynamicProperty: (typeof VcShellComponents)["VcDynamicProperty"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ui/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,iBAAiB,CAAC;AAGrD,OAAO,QAAQ,KAAK,CAAC;IACnB,UAAiB,gB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C;QAC3C,OAAO,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/C,iBAAiB,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,mBAAmB,CAAC,CAAC;QACnE,SAAS,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,WAAW,CAAC,CAAC;QACnD,WAAW,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC;QACvD,OAAO,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/C,sBAAsB,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,wBAAwB,CAAC,CAAC;QAC7E,sBAAsB,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,wBAAwB,CAAC,CAAC;KAC9E;CACF;AAED,OAAO,EAAE,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.118",
|
|
4
4
|
"main": "./dist/framework.mjs",
|
|
5
5
|
"module": "./dist/framework.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@floating-ui/vue": "^1.0.0",
|
|
32
32
|
"@microsoft/signalr": "^7.0.5",
|
|
33
33
|
"@vee-validate/i18n": "^4.9.4",
|
|
34
|
-
"@vee-validate/rules": "^4.
|
|
34
|
+
"@vee-validate/rules": "^4.11.8",
|
|
35
35
|
"@vueup/vue-quill": "^1.2.0",
|
|
36
36
|
"@vueuse/components": "^10.1.2",
|
|
37
37
|
"@vueuse/core": "^10.1.2",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"quill-image-uploader": "^1.3.0",
|
|
47
47
|
"swiper": "^6.8.4",
|
|
48
48
|
"url-pattern": "^1.0.3",
|
|
49
|
-
"vee-validate": "^4.
|
|
49
|
+
"vee-validate": "^4.11.8",
|
|
50
50
|
"vue": "^3.3.7",
|
|
51
51
|
"vue-currency-input": "^3.0.5",
|
|
52
52
|
"vue-i18n": "^9.2.2",
|
|
@@ -56,13 +56,14 @@
|
|
|
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.118",
|
|
60
|
+
"@vc-shell/config-generator": "^1.0.118",
|
|
61
|
+
"@vc-shell/ts-config": "^1.0.118",
|
|
62
62
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
63
63
|
"sass": "^1.62.1",
|
|
64
64
|
"typescript": "^5.2.2",
|
|
65
65
|
"vite": "^4.3.9",
|
|
66
|
+
"vue-component-type-helpers": "^1.8.22",
|
|
66
67
|
"vue-tsc": "^1.8.20"
|
|
67
68
|
},
|
|
68
69
|
"publishConfig": {
|
|
@@ -24,6 +24,7 @@ export type BladePageComponent = BladeConstructor;
|
|
|
24
24
|
|
|
25
25
|
export type CoreComponentData = {
|
|
26
26
|
isBladeComponent?: boolean;
|
|
27
|
+
isWorkspace?: boolean;
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
export type CoreBladeAdditionalSettings = {
|
|
@@ -36,6 +37,7 @@ export type CoreBladeNavigationData = {
|
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export interface CoreBladeExposed {
|
|
40
|
+
[x: string]: any;
|
|
39
41
|
title?: string;
|
|
40
42
|
onBeforeClose?: () => Promise<boolean>;
|
|
41
43
|
reloadParent?: () => void;
|
|
@@ -43,7 +45,7 @@ export interface CoreBladeExposed {
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
export interface IParentCallArgs {
|
|
46
|
-
method:
|
|
48
|
+
method: keyof CoreBladeExposed;
|
|
47
49
|
args?: unknown;
|
|
48
50
|
callback?: (args: unknown) => void;
|
|
49
51
|
}
|
|
@@ -165,8 +165,10 @@ export function useContainer(): IUseContainer {
|
|
|
165
165
|
if (item) {
|
|
166
166
|
for (const name in option) {
|
|
167
167
|
if (name in option) {
|
|
168
|
-
const
|
|
169
|
-
|
|
168
|
+
const newKey = name as keyof NotificationOptions;
|
|
169
|
+
const value = option[newKey];
|
|
170
|
+
|
|
171
|
+
(item as Record<typeof newKey, unknown>)[newKey] = value;
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { VcPopup } from "./../../../../../ui/components";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
markRaw,
|
|
4
|
+
getCurrentInstance,
|
|
5
|
+
inject,
|
|
6
|
+
reactive,
|
|
7
|
+
shallowRef,
|
|
8
|
+
nextTick,
|
|
9
|
+
Ref,
|
|
10
|
+
watch,
|
|
11
|
+
MaybeRef,
|
|
12
|
+
unref,
|
|
13
|
+
DefineComponent,
|
|
14
|
+
} from "vue";
|
|
15
|
+
import { ComponentPublicInstanceConstructor, PopupPlugin, UsePopupInternal, UsePopupProps } from "./../../types";
|
|
4
16
|
import { popupPluginInstance } from "./../../plugin";
|
|
5
17
|
import { useI18n } from "vue-i18n";
|
|
6
18
|
|
|
@@ -11,21 +23,23 @@ interface IUsePopup {
|
|
|
11
23
|
showError(message: string | Ref<string>): void;
|
|
12
24
|
}
|
|
13
25
|
|
|
14
|
-
export function usePopup<T =
|
|
26
|
+
export function usePopup<T extends ComponentPublicInstanceConstructor<any> = typeof VcPopup>(
|
|
27
|
+
options?: MaybeRef<UsePopupProps<T>>
|
|
28
|
+
): IUsePopup {
|
|
15
29
|
const { t } = useI18n({ useScope: "global" });
|
|
16
30
|
const instance = getCurrentInstance();
|
|
17
|
-
const popupInstance = (instance && inject("popupPlugin")) || popupPluginInstance;
|
|
18
|
-
let rawPopup = createInstance(unref(
|
|
31
|
+
const popupInstance: PopupPlugin = (instance && inject("popupPlugin")) || popupPluginInstance;
|
|
32
|
+
let rawPopup = createInstance(unref(options));
|
|
19
33
|
|
|
20
34
|
watch(
|
|
21
|
-
() =>
|
|
35
|
+
() => options,
|
|
22
36
|
(newVal) => {
|
|
23
37
|
rawPopup = createInstance(unref(newVal));
|
|
24
38
|
},
|
|
25
39
|
{ deep: true }
|
|
26
40
|
);
|
|
27
41
|
|
|
28
|
-
async function open(customInstance?: UsePopupProps<
|
|
42
|
+
async function open(customInstance?: UsePopupProps<DefineComponent>) {
|
|
29
43
|
let activeInstance;
|
|
30
44
|
await nextTick();
|
|
31
45
|
if (popupInstance) {
|
|
@@ -35,7 +49,7 @@ export function usePopup<T = InstanceType<typeof VcPopup>["$props"]>(props?: May
|
|
|
35
49
|
activeInstance.popups.push(rawPopup || customInstance);
|
|
36
50
|
}
|
|
37
51
|
|
|
38
|
-
function close(customInstance?: UsePopupProps<
|
|
52
|
+
function close(customInstance?: UsePopupProps<DefineComponent>) {
|
|
39
53
|
let activeInstance;
|
|
40
54
|
if (popupInstance) {
|
|
41
55
|
activeInstance = popupInstance;
|
|
@@ -45,7 +59,7 @@ export function usePopup<T = InstanceType<typeof VcPopup>["$props"]>(props?: May
|
|
|
45
59
|
}
|
|
46
60
|
|
|
47
61
|
async function showConfirmation(message: string | Ref<string>): Promise<boolean> {
|
|
48
|
-
let resolvePromise;
|
|
62
|
+
let resolvePromise: (value: boolean | PromiseLike<boolean>) => void;
|
|
49
63
|
const confirmation = createInstance({
|
|
50
64
|
component: VcPopup,
|
|
51
65
|
props: {
|
|
@@ -96,15 +110,17 @@ export function usePopup<T = InstanceType<typeof VcPopup>["$props"]>(props?: May
|
|
|
96
110
|
popupInstance.popups.push(confirmation);
|
|
97
111
|
}
|
|
98
112
|
|
|
99
|
-
function createInstance<T
|
|
113
|
+
function createInstance<T extends ComponentPublicInstanceConstructor<any> = typeof VcPopup>(
|
|
114
|
+
options: UsePopupProps<T>
|
|
115
|
+
) {
|
|
100
116
|
return (
|
|
101
|
-
|
|
117
|
+
options &&
|
|
102
118
|
(reactive({
|
|
103
119
|
id: Symbol("usePopup"),
|
|
104
|
-
...createComponent(
|
|
120
|
+
...createComponent(options),
|
|
105
121
|
close: close,
|
|
106
122
|
open: open,
|
|
107
|
-
}) as UsePopupProps<
|
|
123
|
+
}) as UsePopupProps<DefineComponent> & UsePopupInternal)
|
|
108
124
|
);
|
|
109
125
|
}
|
|
110
126
|
|
|
@@ -116,12 +132,14 @@ export function usePopup<T = InstanceType<typeof VcPopup>["$props"]>(props?: May
|
|
|
116
132
|
};
|
|
117
133
|
}
|
|
118
134
|
|
|
119
|
-
function createComponent<T
|
|
135
|
+
function createComponent<T extends ComponentPublicInstanceConstructor<any> = typeof VcPopup>(
|
|
136
|
+
options: UsePopupProps<T>
|
|
137
|
+
) {
|
|
120
138
|
const slots =
|
|
121
|
-
typeof
|
|
139
|
+
typeof options.slots === "undefined"
|
|
122
140
|
? {}
|
|
123
141
|
: Object.fromEntries(
|
|
124
|
-
Object.entries(
|
|
142
|
+
Object.entries(options.slots).map(([slotName, slotContent]) => {
|
|
125
143
|
if (typeof slotContent === "string") {
|
|
126
144
|
return [slotName, slotContent];
|
|
127
145
|
}
|
|
@@ -130,8 +148,8 @@ function createComponent<T>(props: UsePopupProps<T>) {
|
|
|
130
148
|
);
|
|
131
149
|
|
|
132
150
|
return {
|
|
133
|
-
...
|
|
151
|
+
...options,
|
|
134
152
|
slots,
|
|
135
|
-
component: markRaw(shallowRef(
|
|
153
|
+
component: markRaw(shallowRef(options.component)),
|
|
136
154
|
};
|
|
137
155
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { App, shallowReactive } from "vue";
|
|
1
|
+
import { App, shallowReactive, DefineComponent } from "vue";
|
|
2
2
|
import * as components from "./components";
|
|
3
3
|
import { PopupPlugin, UsePopupProps, UsePopupInternal } from "./types";
|
|
4
4
|
import { createModule } from "./../../../core/plugins";
|
|
5
5
|
|
|
6
|
-
export let popupPluginInstance;
|
|
6
|
+
export let popupPluginInstance: PopupPlugin;
|
|
7
7
|
|
|
8
8
|
export const VcPopupHandler = {
|
|
9
9
|
install(app: App) {
|
|
@@ -11,7 +11,7 @@ export const VcPopupHandler = {
|
|
|
11
11
|
createModule(components).install(app);
|
|
12
12
|
|
|
13
13
|
// Plugin
|
|
14
|
-
const popups = shallowReactive<(UsePopupProps<
|
|
14
|
+
const popups = shallowReactive<(UsePopupProps<DefineComponent> & UsePopupInternal)[]>([]);
|
|
15
15
|
|
|
16
16
|
const popupPlugin: PopupPlugin = {
|
|
17
17
|
popups,
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { Component, Slot as VueSlot } from "vue";
|
|
1
|
+
import { Component, ComponentPublicInstance, DefineComponent, Slot as VueSlot } from "vue";
|
|
2
2
|
|
|
3
|
-
export type RawProps<T
|
|
4
|
-
|
|
3
|
+
export type RawProps<T extends ComponentPublicInstanceConstructor<any>> = Omit<
|
|
4
|
+
InstanceType<T>["$props"],
|
|
5
|
+
`on${string}`
|
|
6
|
+
>;
|
|
7
|
+
export type RawEmits<T extends ComponentPublicInstanceConstructor<any>> = Pick<
|
|
8
|
+
InstanceType<T>["$props"],
|
|
9
|
+
Extract<keyof InstanceType<T>["$props"], `on${string}`>
|
|
10
|
+
>;
|
|
5
11
|
export type Slot = string | Component | VueSlot;
|
|
6
12
|
|
|
7
13
|
export interface UsePopupInternal {
|
|
@@ -11,15 +17,18 @@ export interface UsePopupInternal {
|
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
export interface PopupPlugin {
|
|
14
|
-
popups:
|
|
20
|
+
popups: Partial<UsePopupProps<DefineComponent> & UsePopupInternal>[];
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
export interface ComponentPublicInstanceConstructor<T
|
|
18
|
-
|
|
23
|
+
export interface ComponentPublicInstanceConstructor<T extends ComponentPublicInstance> {
|
|
24
|
+
__isFragment?: never;
|
|
25
|
+
__isTeleport?: never;
|
|
26
|
+
__isSuspense?: never;
|
|
27
|
+
new (...args: unknown[]): T;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
|
-
export interface UsePopupProps<T
|
|
22
|
-
component:
|
|
30
|
+
export interface UsePopupProps<T extends ComponentPublicInstanceConstructor<any>> {
|
|
31
|
+
component: T;
|
|
23
32
|
emits?: RawEmits<T>;
|
|
24
33
|
props?: RawProps<T>;
|
|
25
34
|
slots?: {
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
|
|
144
144
|
<script setup lang="ts">
|
|
145
145
|
import { Asset, IActionBuilderResult, IBladeToolbar, ITableColumns } from "../../../../../core/types";
|
|
146
|
-
import { ref, computed, onMounted, unref, watch, markRaw } from "vue";
|
|
146
|
+
import { ref, computed, onMounted, unref, watch, markRaw, UnwrapNestedRefs } from "vue";
|
|
147
147
|
import { useI18n } from "vue-i18n";
|
|
148
148
|
import moment from "moment";
|
|
149
149
|
import Assets from "./../../../assets/components/assets-details/assets-details.vue";
|
|
@@ -187,7 +187,7 @@ const uploader = ref();
|
|
|
187
187
|
const loading = ref(false);
|
|
188
188
|
const selectedItems = ref([]);
|
|
189
189
|
const readonly = computed(() => props.options.disabled);
|
|
190
|
-
let assetsCopy;
|
|
190
|
+
let assetsCopy: Asset[];
|
|
191
191
|
const modified = ref(false);
|
|
192
192
|
|
|
193
193
|
const { openBlade } = useBladeNavigation();
|
|
@@ -271,7 +271,7 @@ onMounted(() => {
|
|
|
271
271
|
assetsCopy = _.cloneDeep(props.options?.assets);
|
|
272
272
|
});
|
|
273
273
|
|
|
274
|
-
function sortAssets(event: { dragIndex: number; dropIndex: number; value: Asset[] }) {
|
|
274
|
+
async function sortAssets(event: { dragIndex: number; dropIndex: number; value: Asset[] }) {
|
|
275
275
|
if (
|
|
276
276
|
props.options.assetsEditHandler &&
|
|
277
277
|
typeof props.options.assetsEditHandler === "function" &&
|
|
@@ -282,7 +282,7 @@ function sortAssets(event: { dragIndex: number; dropIndex: number; value: Asset[
|
|
|
282
282
|
return item;
|
|
283
283
|
});
|
|
284
284
|
|
|
285
|
-
defaultAssets.value = props.options.assetsEditHandler(sorted);
|
|
285
|
+
defaultAssets.value = await props.options.assetsEditHandler(sorted);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -363,12 +363,13 @@ const onSelectionChanged = (items: Asset[]) => {
|
|
|
363
363
|
selectedItems.value = items;
|
|
364
364
|
};
|
|
365
365
|
|
|
366
|
-
const actionBuilder = (): IActionBuilderResult[] => {
|
|
367
|
-
const result = [];
|
|
366
|
+
const actionBuilder = (): IActionBuilderResult<Asset>[] => {
|
|
367
|
+
const result: IActionBuilderResult<Asset>[] = [];
|
|
368
368
|
|
|
369
369
|
result.push({
|
|
370
370
|
icon: "fas fa-edit",
|
|
371
371
|
title: computed(() => t("ASSETS_MANAGER.TABLE.ACTIONS.EDIT")),
|
|
372
|
+
variant: "success",
|
|
372
373
|
clickHandler(item: Asset) {
|
|
373
374
|
onItemClick(item);
|
|
374
375
|
},
|
|
@@ -9,8 +9,17 @@ import EditorField from "./fields/EditorField";
|
|
|
9
9
|
import GalleryField from "./fields/GalleryField";
|
|
10
10
|
import Button from "./fields/Button";
|
|
11
11
|
import StatusField from "./fields/StatusField";
|
|
12
|
+
import ContentField from "./fields/ContentField";
|
|
13
|
+
import VideoField from "./fields/VideoField";
|
|
14
|
+
import ImageField from "./fields/ImageField";
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
import { ControlSchema } from "../types";
|
|
17
|
+
import { ConcreteComponent } from "vue";
|
|
18
|
+
|
|
19
|
+
type AvailableComponents = Exclude<ControlSchema["component"], "vc-widgets">;
|
|
20
|
+
type TFieldMap = Record<AvailableComponents, ConcreteComponent>;
|
|
21
|
+
|
|
22
|
+
const FIELD_MAP: TFieldMap = {
|
|
14
23
|
"vc-select": SelectField,
|
|
15
24
|
"vc-card": Card,
|
|
16
25
|
"vc-input": InputField,
|
|
@@ -22,6 +31,9 @@ const FIELD_MAP = {
|
|
|
22
31
|
"vc-gallery": GalleryField,
|
|
23
32
|
"vc-button": Button,
|
|
24
33
|
"vc-status": StatusField,
|
|
34
|
+
"vc-field": ContentField,
|
|
35
|
+
"vc-video": VideoField,
|
|
36
|
+
"vc-image": ImageField,
|
|
25
37
|
};
|
|
26
38
|
|
|
27
39
|
export default FIELD_MAP;
|
|
@@ -18,11 +18,11 @@ const schemeRenderProps = {
|
|
|
18
18
|
uiSchema: {
|
|
19
19
|
type: Array as PropType<ControlSchema[]>,
|
|
20
20
|
required: true,
|
|
21
|
-
default: () => [],
|
|
21
|
+
default: (): ControlSchema[] => [],
|
|
22
22
|
},
|
|
23
23
|
currentLocale: {
|
|
24
24
|
type: String,
|
|
25
|
-
default:
|
|
25
|
+
default: "",
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -54,7 +54,7 @@ export default defineComponent({
|
|
|
54
54
|
{ deep: true }
|
|
55
55
|
);
|
|
56
56
|
|
|
57
|
-
function emitChange(newVal) {
|
|
57
|
+
function emitChange(newVal: unknown) {
|
|
58
58
|
ctx.emit("update:modelValue", newVal);
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -68,10 +68,10 @@ export default defineComponent({
|
|
|
68
68
|
nodeBuilder({
|
|
69
69
|
controlSchema: field,
|
|
70
70
|
parentId: field.id,
|
|
71
|
-
internalContext: internalFormData
|
|
71
|
+
internalContext: internalFormData,
|
|
72
72
|
bladeContext: props.context,
|
|
73
|
-
currentLocale: currentLocale
|
|
74
|
-
formData: internalFormData
|
|
73
|
+
currentLocale: currentLocale,
|
|
74
|
+
formData: internalFormData,
|
|
75
75
|
}),
|
|
76
76
|
],
|
|
77
77
|
[]
|
|
@@ -6,11 +6,14 @@ import {
|
|
|
6
6
|
VcCheckbox,
|
|
7
7
|
VcDynamicProperty,
|
|
8
8
|
VcEditor,
|
|
9
|
+
VcField,
|
|
9
10
|
VcGallery,
|
|
11
|
+
VcImage,
|
|
10
12
|
VcInput,
|
|
11
13
|
VcInputCurrency,
|
|
12
14
|
VcSelect,
|
|
13
15
|
VcStatus,
|
|
16
|
+
VcVideo,
|
|
14
17
|
} from "../../../../ui/components";
|
|
15
18
|
import {
|
|
16
19
|
IControlBaseProps,
|
|
@@ -26,6 +29,9 @@ import {
|
|
|
26
29
|
IFieldset,
|
|
27
30
|
IControlBaseOptions,
|
|
28
31
|
IStatusField,
|
|
32
|
+
IContentField,
|
|
33
|
+
IVideoField,
|
|
34
|
+
IImageField,
|
|
29
35
|
} from "../types/models";
|
|
30
36
|
|
|
31
37
|
export const ControlBase = ({ visibility = undefined }: IControlBaseOptions): IControlBaseOptions => ({
|
|
@@ -85,6 +91,33 @@ export const InputField = ({ props, options }: Partial<IInputField>): IInputFiel
|
|
|
85
91
|
options: ControlBase(options),
|
|
86
92
|
});
|
|
87
93
|
|
|
94
|
+
export const ContentField = ({ props, options }: Partial<IContentField>): IContentField => ({
|
|
95
|
+
component: markRaw(VcField),
|
|
96
|
+
props: {
|
|
97
|
+
...ControlBaseProps(props),
|
|
98
|
+
...props,
|
|
99
|
+
},
|
|
100
|
+
options: ControlBase(options),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const ImageField = ({ props, options }: Partial<IImageField>): IImageField => ({
|
|
104
|
+
component: markRaw(VcImage),
|
|
105
|
+
props: {
|
|
106
|
+
...ControlBaseProps(props),
|
|
107
|
+
...props,
|
|
108
|
+
},
|
|
109
|
+
options: ControlBase(options),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export const VideoField = ({ props, options }: Partial<IInputField>): IVideoField => ({
|
|
113
|
+
component: markRaw(VcVideo),
|
|
114
|
+
props: {
|
|
115
|
+
...ControlBaseProps(props),
|
|
116
|
+
...props,
|
|
117
|
+
},
|
|
118
|
+
options: ControlBase(options),
|
|
119
|
+
});
|
|
120
|
+
|
|
88
121
|
export const InputCurrency = ({ props, options }: Partial<IInputCurrency>): IInputCurrency => ({
|
|
89
122
|
component: markRaw(VcInputCurrency),
|
|
90
123
|
props: {
|
|
@@ -105,7 +138,7 @@ export const CardCollection = ({ props, options, slots }: Partial<ICardCollectio
|
|
|
105
138
|
});
|
|
106
139
|
|
|
107
140
|
export const DynamicProperties = ({ props, options }: Partial<IDynamicProperties>): IDynamicProperties => ({
|
|
108
|
-
component: markRaw(VcDynamicProperty)
|
|
141
|
+
component: markRaw(VcDynamicProperty),
|
|
109
142
|
props: {
|
|
110
143
|
...props,
|
|
111
144
|
...ControlBaseProps(props),
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
setup(props: ExtractPropTypes<typeof componentProps> & { element: CardSchema }) {
|
|
13
13
|
const isMounted = useMounted();
|
|
14
14
|
|
|
15
|
-
const commentRecursiveNodeCheck = (node: VNodeChild | VNodeNormalizedChildren) => {
|
|
15
|
+
const commentRecursiveNodeCheck = (node: VNodeChild | VNodeNormalizedChildren): boolean => {
|
|
16
16
|
return _.every(Array.isArray(node) ? node : [node], (nodeItem) => {
|
|
17
17
|
if (typeof nodeItem === "object") {
|
|
18
18
|
if (
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
header: props.element.label,
|
|
53
53
|
isCollapsable: props.element.collapsible,
|
|
54
54
|
isCollapsed: restoreCollapsed(props.element.id),
|
|
55
|
-
"onState:collapsed": (e) => handleCollapsed(props.element.id, e),
|
|
55
|
+
"onState:collapsed": (e: boolean) => handleCollapsed(props.element.id, e),
|
|
56
56
|
},
|
|
57
57
|
options: props.baseOptions,
|
|
58
58
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ExtractPropTypes, h } from "vue";
|
|
2
|
+
import { ContentField } from "../factories";
|
|
3
|
+
import componentProps from "./props";
|
|
4
|
+
import { FieldSchema } from "../../types";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
name: "ContentField",
|
|
8
|
+
props: componentProps,
|
|
9
|
+
setup(props: ExtractPropTypes<typeof componentProps> & { element: FieldSchema }) {
|
|
10
|
+
return () => {
|
|
11
|
+
const field = ContentField({
|
|
12
|
+
props: {
|
|
13
|
+
...props.baseProps,
|
|
14
|
+
type: props.element.variant,
|
|
15
|
+
copyable: props.element.copyable || false,
|
|
16
|
+
},
|
|
17
|
+
options: props.baseOptions,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const render = h(field.component, field.props);
|
|
21
|
+
|
|
22
|
+
return props.baseOptions.visibility ? render : null;
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { ExtractPropTypes, computed, h,
|
|
2
|
+
import { ExtractPropTypes, computed, h, ref, toValue, watch, UnwrapNestedRefs } from "vue";
|
|
3
3
|
import { DynamicProperties } from "../factories";
|
|
4
4
|
import componentProps from "./props";
|
|
5
5
|
import { unrefNested } from "../../helpers/unrefNested";
|
|
@@ -7,6 +7,24 @@ import { reactify, reactiveComputed } from "@vueuse/core";
|
|
|
7
7
|
import * as _ from "lodash-es";
|
|
8
8
|
import { DynamicPropertiesSchema } from "../../types";
|
|
9
9
|
import { setModel } from "../../helpers/setters";
|
|
10
|
+
import { IDynamicProperties } from "../../types/models";
|
|
11
|
+
|
|
12
|
+
interface IProperty {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
multivalue?: boolean;
|
|
17
|
+
multilanguage?: boolean;
|
|
18
|
+
valueType: string;
|
|
19
|
+
dictionary?: boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
displayNames: { name?: string; languageCode?: string }[];
|
|
22
|
+
validationRule?: {
|
|
23
|
+
charCountMin: number;
|
|
24
|
+
charCountMax: number;
|
|
25
|
+
regExp: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
10
28
|
|
|
11
29
|
export default {
|
|
12
30
|
name: "DynamicProperty",
|
|
@@ -35,23 +53,25 @@ export default {
|
|
|
35
53
|
{ deep: true, immediate: true }
|
|
36
54
|
);
|
|
37
55
|
|
|
38
|
-
const filteredProps = reactify(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
const filteredProps = reactify(
|
|
57
|
+
(prop: IProperty[], { include, exclude }: { include: string[]; exclude: string[] }) => {
|
|
58
|
+
if (prop) {
|
|
59
|
+
return prop.filter((x) => {
|
|
60
|
+
if (include) return include?.includes(x.type);
|
|
61
|
+
if (exclude) return !exclude?.includes(x.type);
|
|
62
|
+
else return true;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
45
66
|
}
|
|
46
|
-
|
|
47
|
-
});
|
|
67
|
+
);
|
|
48
68
|
|
|
49
69
|
const dynamicProps = filteredProps(internalModel, {
|
|
50
70
|
include: props.element?.include,
|
|
51
71
|
exclude: props.element?.exclude,
|
|
52
72
|
});
|
|
53
73
|
|
|
54
|
-
const properties = reactiveComputed(() => {
|
|
74
|
+
const properties: UnwrapNestedRefs<IDynamicProperties[]> = reactiveComputed(() => {
|
|
55
75
|
return (dynamicProps.value || [])?.map((prop) =>
|
|
56
76
|
DynamicProperties({
|
|
57
77
|
props: {
|
|
@@ -13,7 +13,7 @@ import { setModel } from "../../helpers/setters";
|
|
|
13
13
|
export default {
|
|
14
14
|
name: "GalleryField",
|
|
15
15
|
props: componentProps,
|
|
16
|
-
setup(props: ExtractPropTypes<typeof componentProps> & { element: GallerySchema }
|
|
16
|
+
setup(props: ExtractPropTypes<typeof componentProps> & { element: GallerySchema }) {
|
|
17
17
|
if (!_.has(props.bladeContext.scope, "assetsHandler.images")) {
|
|
18
18
|
throw new Error(
|
|
19
19
|
`There is no assetsHandler.images config provided in blade scope: ${JSON.stringify(
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ExtractPropTypes, h } from "vue";
|
|
2
|
+
import { ImageField } from "../factories";
|
|
3
|
+
import componentProps from "./props";
|
|
4
|
+
import { ImageSchema } from "../../types";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
name: "ImageField",
|
|
8
|
+
props: componentProps,
|
|
9
|
+
setup(props: ExtractPropTypes<typeof componentProps> & { element: ImageSchema }) {
|
|
10
|
+
return () => {
|
|
11
|
+
const field = ImageField({
|
|
12
|
+
props: {
|
|
13
|
+
...props.baseProps,
|
|
14
|
+
src: props.baseProps.modelValue,
|
|
15
|
+
aspect: props.element.aspect,
|
|
16
|
+
rounded: props.element.rounded,
|
|
17
|
+
bordered: props.element.bordered,
|
|
18
|
+
clickable: props.element.clickable,
|
|
19
|
+
size: props.element.size,
|
|
20
|
+
background: props.element.background,
|
|
21
|
+
},
|
|
22
|
+
options: props.baseOptions,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const render = h(field.component, field.props);
|
|
26
|
+
|
|
27
|
+
return props.baseOptions.visibility ? render : null;
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
};
|