@vc-shell/framework 1.0.178 → 1.0.180
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 +18 -0
- package/dist/framework.js +22113 -37461
- package/dist/index.css +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SelectField.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/types/index.d.ts +5 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/index.d.ts +4 -2
- package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +10 -2
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-card/vc-card.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/index.d.ts +0 -1
- package/dist/ui/components/molecules/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-file-upload/index.d.ts +20 -20
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +2 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +19 -9
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +18 -18
- package/dist/ui/components/molecules/vc-slider/index.d.ts +12 -12
- 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/vc-gallery.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +18 -18
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -6
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +4 -3
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +27 -15
- package/shared/modules/dynamic/components/fields/SelectField.ts +1 -0
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +8 -7
- package/shared/modules/dynamic/types/index.ts +5 -0
- package/ui/components/atoms/vc-badge/vc-badge.vue +7 -0
- package/ui/components/atoms/vc-button/vc-button.vue +5 -1
- package/ui/components/atoms/vc-card/vc-card.vue +3 -0
- package/ui/components/atoms/vc-image/vc-image.vue +1 -1
- package/ui/components/molecules/index.ts +0 -1
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +2 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +3 -1
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +43 -9
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +2 -2
- package/ui/components/organisms/vc-popup/vc-popup.vue +1 -1
- package/dist/ui/components/molecules/vc-code-editor/index.d.ts +0 -123
- package/dist/ui/components/molecules/vc-code-editor/index.d.ts.map +0 -1
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.stories.d.ts +0 -7
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.stories.d.ts.map +0 -1
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts +0 -38
- package/dist/ui/components/molecules/vc-code-editor/vc-code-editor.vue.d.ts.map +0 -1
- package/ui/components/molecules/vc-code-editor/index.ts +0 -10
- package/ui/components/molecules/vc-code-editor/vc-code-editor.stories.ts +0 -23
- package/ui/components/molecules/vc-code-editor/vc-code-editor.vue +0 -96
|
@@ -17,13 +17,10 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
17
17
|
onHeaderClick?: ((item: ITableColumns) => any) | undefined;
|
|
18
18
|
"onScroll:ptr"?: (() => any) | undefined;
|
|
19
19
|
items: T[];
|
|
20
|
-
loading?: MaybeRef<boolean> | undefined;
|
|
21
|
-
totalCount?: number | undefined;
|
|
22
20
|
expanded?: boolean | undefined;
|
|
23
|
-
|
|
24
|
-
currentPage?: number | undefined;
|
|
25
|
-
onItemClick?: ((item: T) => any) | undefined;
|
|
21
|
+
loading?: MaybeRef<boolean> | undefined;
|
|
26
22
|
columns: ITableColumns[];
|
|
23
|
+
onItemClick?: ((item: T) => any) | undefined;
|
|
27
24
|
onSelectionChanged?: ((values: T[]) => any) | undefined;
|
|
28
25
|
onPaginationClick?: ((page: number) => any) | undefined;
|
|
29
26
|
"onSearch:change"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
@@ -36,6 +33,9 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
36
33
|
itemActionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
|
|
37
34
|
multiselect?: boolean | undefined;
|
|
38
35
|
totalLabel?: string | undefined;
|
|
36
|
+
totalCount?: number | undefined;
|
|
37
|
+
pages?: number | undefined;
|
|
38
|
+
currentPage?: number | undefined;
|
|
39
39
|
searchPlaceholder?: string | undefined;
|
|
40
40
|
searchValue?: string | undefined;
|
|
41
41
|
empty?: StatusImage | undefined;
|
|
@@ -84,7 +84,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
84
84
|
empty: (props: any) => any;
|
|
85
85
|
footer: (props: any) => any;
|
|
86
86
|
};
|
|
87
|
-
emit: ((evt: "scroll:ptr") => void) & ((evt: "
|
|
87
|
+
emit: ((evt: "scroll:ptr") => void) & ((evt: "paginationClick", page: number) => void) & ((evt: "selectionChanged", values: T[]) => void) & ((evt: "search:change", value: string | number | Date | null | undefined) => void) & ((evt: "headerClick", item: ITableColumns) => void) & ((evt: "itemClick", item: T) => void) & ((evt: "row:reorder", args: {
|
|
88
88
|
dragIndex: number;
|
|
89
89
|
dropIndex: number;
|
|
90
90
|
value: T[];
|
|
@@ -97,13 +97,10 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
97
97
|
onHeaderClick?: ((item: ITableColumns) => any) | undefined;
|
|
98
98
|
"onScroll:ptr"?: (() => any) | undefined;
|
|
99
99
|
items: T[];
|
|
100
|
-
loading?: MaybeRef<boolean> | undefined;
|
|
101
|
-
totalCount?: number | undefined;
|
|
102
100
|
expanded?: boolean | undefined;
|
|
103
|
-
|
|
104
|
-
currentPage?: number | undefined;
|
|
105
|
-
onItemClick?: ((item: T) => any) | undefined;
|
|
101
|
+
loading?: MaybeRef<boolean> | undefined;
|
|
106
102
|
columns: ITableColumns[];
|
|
103
|
+
onItemClick?: ((item: T) => any) | undefined;
|
|
107
104
|
onSelectionChanged?: ((values: T[]) => any) | undefined;
|
|
108
105
|
onPaginationClick?: ((page: number) => any) | undefined;
|
|
109
106
|
"onSearch:change"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
@@ -116,6 +113,9 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
116
113
|
itemActionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
|
|
117
114
|
multiselect?: boolean | undefined;
|
|
118
115
|
totalLabel?: string | undefined;
|
|
116
|
+
totalCount?: number | undefined;
|
|
117
|
+
pages?: number | undefined;
|
|
118
|
+
currentPage?: number | undefined;
|
|
119
119
|
searchPlaceholder?: string | undefined;
|
|
120
120
|
searchValue?: string | undefined;
|
|
121
121
|
empty?: StatusImage | undefined;
|
|
@@ -165,7 +165,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
165
165
|
empty: (props: any) => any;
|
|
166
166
|
footer: (props: any) => any;
|
|
167
167
|
};
|
|
168
|
-
emit: ((evt: "scroll:ptr") => void) & ((evt: "
|
|
168
|
+
emit: ((evt: "scroll:ptr") => void) & ((evt: "paginationClick", page: number) => void) & ((evt: "selectionChanged", values: T[]) => void) & ((evt: "search:change", value: string | number | Date | null | undefined) => void) & ((evt: "headerClick", item: ITableColumns) => void) & ((evt: "itemClick", item: T) => void) & ((evt: "row:reorder", args: {
|
|
169
169
|
dragIndex: number;
|
|
170
170
|
dropIndex: number;
|
|
171
171
|
value: T[];
|
|
@@ -181,13 +181,10 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
181
181
|
onHeaderClick?: ((item: ITableColumns) => any) | undefined;
|
|
182
182
|
"onScroll:ptr"?: (() => any) | undefined;
|
|
183
183
|
items: T[];
|
|
184
|
-
loading?: MaybeRef<boolean> | undefined;
|
|
185
|
-
totalCount?: number | undefined;
|
|
186
184
|
expanded?: boolean | undefined;
|
|
187
|
-
|
|
188
|
-
currentPage?: number | undefined;
|
|
189
|
-
onItemClick?: ((item: T) => any) | undefined;
|
|
185
|
+
loading?: MaybeRef<boolean> | undefined;
|
|
190
186
|
columns: ITableColumns[];
|
|
187
|
+
onItemClick?: ((item: T) => any) | undefined;
|
|
191
188
|
onSelectionChanged?: ((values: T[]) => any) | undefined;
|
|
192
189
|
onPaginationClick?: ((page: number) => any) | undefined;
|
|
193
190
|
"onSearch:change"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
@@ -200,6 +197,9 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
200
197
|
itemActionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
|
|
201
198
|
multiselect?: boolean | undefined;
|
|
202
199
|
totalLabel?: string | undefined;
|
|
200
|
+
totalCount?: number | undefined;
|
|
201
|
+
pages?: number | undefined;
|
|
202
|
+
currentPage?: number | undefined;
|
|
203
203
|
searchPlaceholder?: string | undefined;
|
|
204
204
|
searchValue?: string | undefined;
|
|
205
205
|
empty?: StatusImage | undefined;
|
|
@@ -249,7 +249,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
249
249
|
empty: (props: any) => any;
|
|
250
250
|
footer: (props: any) => any;
|
|
251
251
|
};
|
|
252
|
-
emit: ((evt: "scroll:ptr") => void) & ((evt: "
|
|
252
|
+
emit: ((evt: "scroll:ptr") => void) & ((evt: "paginationClick", page: number) => void) & ((evt: "selectionChanged", values: T[]) => void) & ((evt: "search:change", value: string | number | Date | null | undefined) => void) & ((evt: "headerClick", item: ITableColumns) => void) & ((evt: "itemClick", item: T) => void) & ((evt: "row:reorder", args: {
|
|
253
253
|
dragIndex: number;
|
|
254
254
|
dropIndex: number;
|
|
255
255
|
value: T[];
|
|
@@ -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,EAOL,GAAG,EAIH,QAAQ,EAET,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,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,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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AE,UAAU,EAAE,MAAM,IAAI,CAAA;aAAE,KAAK,GAAG;;;kBACZ,GAAG;8BAGvB,GAAG,KAAK,GAAG;2BACd,GAAG,KAAK,GAAG;4BACV,GAAG,KAAK,GAAG;;;uBA0DQ,MAAM;uBAAa,MAAM;;;;;AAxE9D,wBA2+D2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,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.180",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"@vueuse/components": "^10.7.1",
|
|
40
40
|
"@vueuse/core": "^10.7.1",
|
|
41
41
|
"@vueuse/integrations": "^10.7.1",
|
|
42
|
-
"ace-builds": "^1.32.2",
|
|
43
42
|
"core-js": "^3.35.0",
|
|
44
43
|
"iso-639-1": "^3.1.0",
|
|
45
44
|
"moment": "^2.30.1",
|
|
@@ -52,14 +51,13 @@
|
|
|
52
51
|
"vue-currency-input": "^3.0.5",
|
|
53
52
|
"vue-i18n": "^9.8.0",
|
|
54
53
|
"vue-router": "^4.2.5",
|
|
55
|
-
"vue3-ace-editor": "^2.2.4",
|
|
56
54
|
"vue3-touch-events": "^4.1.8",
|
|
57
55
|
"whatwg-fetch": "^3.6.19"
|
|
58
56
|
},
|
|
59
57
|
"devDependencies": {
|
|
60
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
61
|
-
"@vc-shell/config-generator": "^1.0.
|
|
62
|
-
"@vc-shell/ts-config": "^1.0.
|
|
58
|
+
"@vc-shell/api-client-generator": "^1.0.180",
|
|
59
|
+
"@vc-shell/config-generator": "^1.0.180",
|
|
60
|
+
"@vc-shell/ts-config": "^1.0.180",
|
|
63
61
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
64
62
|
"sass": "^1.69.6",
|
|
65
63
|
"tsx": "^4.7.1",
|
|
@@ -12,12 +12,12 @@ export const VcBladeView = defineComponent({
|
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
setup(props, { attrs, slots }) {
|
|
15
|
-
provide(navigationViewLocation, props.blade!);
|
|
16
|
-
|
|
17
15
|
const viewRef = ref<CoreBladeExposed>();
|
|
18
16
|
|
|
17
|
+
const bl = toRef(props.blade);
|
|
18
|
+
|
|
19
19
|
watch(
|
|
20
|
-
() => [viewRef.value,
|
|
20
|
+
() => [viewRef.value, bl.value] as const,
|
|
21
21
|
([instance, blade]) => {
|
|
22
22
|
if (blade && blade.props?.navigation) {
|
|
23
23
|
blade.props.navigation.instance = toRef(instance);
|
|
@@ -26,6 +26,7 @@ export const VcBladeView = defineComponent({
|
|
|
26
26
|
{ flush: "post" },
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
+
provide(navigationViewLocation, bl.value!);
|
|
29
30
|
return () => {
|
|
30
31
|
/**
|
|
31
32
|
* Callback function onClose, which is passed while opening blade, called when a BladeVNode is unmounted.
|
|
@@ -167,30 +167,36 @@ const useBladeNavigationSingleton = createSharedComposable(() => {
|
|
|
167
167
|
async function closeBlade(index: number) {
|
|
168
168
|
console.debug(`[@vc-shell/framework#useBladeNavigation] - closeBlade called.`);
|
|
169
169
|
|
|
170
|
-
if (navigationInstance.blades.value.length ===
|
|
170
|
+
if (navigationInstance.blades.value.length === 0) {
|
|
171
171
|
return false;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
try {
|
|
175
|
+
const children = navigationInstance.blades.value.slice(index).reverse();
|
|
176
|
+
let isPrevented = false;
|
|
177
|
+
for (let index = 0; index < children.length; index++) {
|
|
178
|
+
const element = children[index];
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
if (element.props?.navigation?.onBeforeClose) {
|
|
181
|
+
const result = await element.props.navigation.onBeforeClose();
|
|
181
182
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
if (result === false) {
|
|
184
|
+
isPrevented = true;
|
|
185
|
+
console.debug(`[@vc-shell/framework#useBladeNavigation] - Navigation is prevented`);
|
|
186
|
+
}
|
|
187
|
+
// we use break here to prevent running onBeforeClose for all children, cause it can be prevented by first child
|
|
188
|
+
break;
|
|
185
189
|
}
|
|
186
190
|
}
|
|
187
|
-
}
|
|
188
191
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
if (!isPrevented) {
|
|
193
|
+
navigationInstance.blades.value.splice(index);
|
|
194
|
+
}
|
|
192
195
|
|
|
193
|
-
|
|
196
|
+
return isPrevented;
|
|
197
|
+
} finally {
|
|
198
|
+
console.debug(`[@vc-shell/framework#useBladeNavigation] - closeBlade finished.`);
|
|
199
|
+
}
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
return {
|
|
@@ -228,6 +234,12 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
228
234
|
if (hasAccess(blade.permissions)) {
|
|
229
235
|
navigationInstance.blades.value = [createdComponent];
|
|
230
236
|
|
|
237
|
+
// Find the route with the matching URL and update the components.default property with the new component
|
|
238
|
+
const route = router.getRoutes().find((r) => r.path === createdComponent.type?.url);
|
|
239
|
+
if (route && route.components) {
|
|
240
|
+
route.components.default = createdComponent;
|
|
241
|
+
}
|
|
242
|
+
|
|
231
243
|
return await router.replace({ path: createdComponent.type?.url as string });
|
|
232
244
|
} else
|
|
233
245
|
notification.error(i18n.global.t("PERMISSION_MESSAGES.ACCESS_RESTRICTED"), {
|
|
@@ -130,8 +130,6 @@ const { t } = useI18n({ useScope: "global" });
|
|
|
130
130
|
|
|
131
131
|
const { showConfirmation } = usePopup();
|
|
132
132
|
|
|
133
|
-
const { onBeforeClose } = useBladeNavigation();
|
|
134
|
-
|
|
135
133
|
const widgetsRefs = useTemplateRefsList<{ el: HTMLDivElement; component: ConcreteComponent }>();
|
|
136
134
|
|
|
137
135
|
const { loading, item, validationState, scope, load, remove, saveChanges, bladeTitle } = props.composables
|
|
@@ -149,7 +147,7 @@ const { loading, item, validationState, scope, load, remove, saveChanges, bladeT
|
|
|
149
147
|
saveChanges: undefined,
|
|
150
148
|
bladeTitle: undefined,
|
|
151
149
|
} as unknown as UseDetails<Record<string, any>, DetailsBaseBladeScope>);
|
|
152
|
-
|
|
150
|
+
const { onBeforeClose } = useBladeNavigation();
|
|
153
151
|
const title = ref();
|
|
154
152
|
const isReady = ref(false);
|
|
155
153
|
const activeWidgetExposed = ref<CoreBladeExposed>();
|
|
@@ -186,13 +184,16 @@ watch(
|
|
|
186
184
|
/**
|
|
187
185
|
* Validated state. Uses 'disabled' property from toolbarOverrides.saveChanges OR validationState.modified
|
|
188
186
|
*/
|
|
189
|
-
const
|
|
187
|
+
const isFormModified = computed(() => {
|
|
190
188
|
const toolbarSave = _.get(toValue(scope)?.toolbarOverrides, "saveChanges") as unknown as IBladeToolbar;
|
|
191
189
|
|
|
192
|
-
|
|
190
|
+
if (toolbarSave && "disabled" in toolbarSave && toolbarSave.disabled !== undefined) {
|
|
191
|
+
return !unref(toolbarSave.disabled) || validationState.value.modified;
|
|
192
|
+
}
|
|
193
|
+
return validationState.value.modified;
|
|
193
194
|
});
|
|
194
195
|
|
|
195
|
-
useBeforeUnload(
|
|
196
|
+
useBeforeUnload(isFormModified);
|
|
196
197
|
|
|
197
198
|
const form = computed(
|
|
198
199
|
(): FormContentSchema => props.model?.content.find((x) => x?.component === "vc-form") as FormContentSchema,
|
|
@@ -348,7 +349,7 @@ onBeforeMount(async () => {
|
|
|
348
349
|
});
|
|
349
350
|
|
|
350
351
|
onBeforeClose(async () => {
|
|
351
|
-
if (unref(
|
|
352
|
+
if (unref(isFormModified)) {
|
|
352
353
|
return await showConfirmation(
|
|
353
354
|
unref(
|
|
354
355
|
computed(() => t(`${settings.value?.localizationPrefix.trim().toUpperCase()}.PAGES.ALERTS.CLOSE_CONFIRMATION`)),
|
|
@@ -314,6 +314,11 @@ export interface SelectSchema extends SchemaBase {
|
|
|
314
314
|
* @type {boolean}
|
|
315
315
|
*/
|
|
316
316
|
searchable?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Select multiple values.
|
|
319
|
+
* @type {boolean}
|
|
320
|
+
*/
|
|
321
|
+
multiple?: boolean;
|
|
317
322
|
}
|
|
318
323
|
|
|
319
324
|
export interface MultivalueSchema extends SchemaBase {
|
|
@@ -30,6 +30,13 @@ const props = defineProps<Props>();
|
|
|
30
30
|
|
|
31
31
|
const emit = defineEmits<Emits>();
|
|
32
32
|
|
|
33
|
+
defineSlots<{
|
|
34
|
+
/**
|
|
35
|
+
* Slot for component content
|
|
36
|
+
* */
|
|
37
|
+
default: void;
|
|
38
|
+
}>();
|
|
39
|
+
|
|
33
40
|
function onClick(): void {
|
|
34
41
|
if (props.clickable && !props.disabled) {
|
|
35
42
|
emit("click");
|
|
@@ -170,7 +170,11 @@ $variants: primary, warning, danger;
|
|
|
170
170
|
@apply tw-bg-[color:rgb(var(--button-#{$variant}-background-color-hover))];
|
|
171
171
|
|
|
172
172
|
&.vc-button_text {
|
|
173
|
-
@apply tw-bg-[color:rgba(var(--button-#{$variant}-background-color-hover),0.07)];
|
|
173
|
+
@apply tw-bg-[color:rgba(var(--button-#{$variant}-background-color-hover),0.07)] tw-p-1;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.vc-button_outline {
|
|
177
|
+
@apply tw-border-[color:rgb(var(--button-#{$variant}-background-color-hover))] tw-bg-transparent #{!important};
|
|
174
178
|
}
|
|
175
179
|
}
|
|
176
180
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:class="[
|
|
8
8
|
`vc-image_${aspect}`,
|
|
9
9
|
{
|
|
10
|
-
'tw-rounded-full
|
|
10
|
+
'tw-rounded-full': rounded,
|
|
11
11
|
'tw-rounded-[3px] tw-border tw-border-solid tw-border-[color:#efefef]': bordered,
|
|
12
12
|
'tw-cursor-pointer': clickable,
|
|
13
13
|
},
|
|
@@ -56,13 +56,14 @@ import { getCurrentInstance, ref, unref } from "vue";
|
|
|
56
56
|
import { useField } from "vee-validate";
|
|
57
57
|
import { VcIcon, VcLink, VcHint } from "./../../";
|
|
58
58
|
import { useI18n } from "vue-i18n";
|
|
59
|
+
import { IValidationRules } from "./../../../../core/types";
|
|
59
60
|
|
|
60
61
|
export interface Props {
|
|
61
62
|
variant?: "gallery" | "file-upload";
|
|
62
63
|
loading?: boolean;
|
|
63
64
|
accept?: string;
|
|
64
65
|
multiple?: boolean;
|
|
65
|
-
rules?:
|
|
66
|
+
rules?: keyof IValidationRules | IValidationRules;
|
|
66
67
|
name?: string;
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
:option-value="optionValue"
|
|
6
6
|
:searchable="true"
|
|
7
7
|
:debounce="debounce"
|
|
8
|
+
:disabled="disabled"
|
|
8
9
|
:label="label"
|
|
9
10
|
:required="required"
|
|
10
11
|
:model-value="option"
|
|
12
|
+
:tooltip="tooltip"
|
|
11
13
|
@update:model-value="$emit('update:option', $event)"
|
|
12
14
|
>
|
|
13
15
|
<template #control="{ toggleHandler }">
|
|
@@ -24,7 +26,6 @@
|
|
|
24
26
|
:error="error"
|
|
25
27
|
:error-message="errorMessage"
|
|
26
28
|
:maxlength="maxlength"
|
|
27
|
-
:tooltip="tooltip"
|
|
28
29
|
class="tw-w-full"
|
|
29
30
|
type="number"
|
|
30
31
|
>
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
<input
|
|
46
47
|
ref="inputRef"
|
|
47
48
|
type="text"
|
|
49
|
+
:disabled="disabled"
|
|
48
50
|
:placeholder="holder"
|
|
49
51
|
/>
|
|
50
52
|
</template>
|
|
@@ -110,14 +110,31 @@
|
|
|
110
110
|
</template>
|
|
111
111
|
</div>
|
|
112
112
|
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
<Transition
|
|
114
|
+
name="slide-up"
|
|
115
|
+
mode="out-in"
|
|
116
116
|
>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
<div v-if="error">
|
|
118
|
+
<slot name="error">
|
|
119
|
+
<VcHint
|
|
120
|
+
v-if="errorMessage"
|
|
121
|
+
class="vc-multivalue__error"
|
|
122
|
+
>
|
|
123
|
+
{{ errorMessage }}
|
|
124
|
+
</VcHint>
|
|
125
|
+
</slot>
|
|
126
|
+
</div>
|
|
127
|
+
<div v-else>
|
|
128
|
+
<slot name="hint">
|
|
129
|
+
<VcHint
|
|
130
|
+
v-if="hint"
|
|
131
|
+
class="tw-text-[color:var(--multivalue-placeholder-color)] tw-mt-1 tw-break-words tw-p-0"
|
|
132
|
+
>
|
|
133
|
+
{{ hint }}
|
|
134
|
+
</VcHint>
|
|
135
|
+
</slot>
|
|
136
|
+
</div>
|
|
137
|
+
</Transition>
|
|
121
138
|
</div>
|
|
122
139
|
</template>
|
|
123
140
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
@@ -136,6 +153,7 @@ export interface Props<T> {
|
|
|
136
153
|
label?: string;
|
|
137
154
|
tooltip?: string;
|
|
138
155
|
name?: string;
|
|
156
|
+
hint?: string;
|
|
139
157
|
options?: T[];
|
|
140
158
|
optionValue?: string;
|
|
141
159
|
optionLabel?: string;
|
|
@@ -175,7 +193,8 @@ const props = withDefaults(defineProps<Props<T>>(), {
|
|
|
175
193
|
const emit = defineEmits<Emits<T>>();
|
|
176
194
|
defineSlots<{
|
|
177
195
|
item: (args: { item: T }) => any;
|
|
178
|
-
|
|
196
|
+
hint: void;
|
|
197
|
+
error: void;
|
|
179
198
|
}>();
|
|
180
199
|
|
|
181
200
|
const dropdownToggleRef = ref();
|
|
@@ -358,7 +377,7 @@ function onSearch(event: Event) {
|
|
|
358
377
|
}
|
|
359
378
|
|
|
360
379
|
&__error {
|
|
361
|
-
@apply tw-
|
|
380
|
+
@apply tw-mt-1 [--hint-color:var(--multivalue-border-color-error)];
|
|
362
381
|
}
|
|
363
382
|
|
|
364
383
|
&__field {
|
|
@@ -400,4 +419,19 @@ function onSearch(event: Event) {
|
|
|
400
419
|
@apply tw-bg-[#fafafa] tw-text-[#424242];
|
|
401
420
|
}
|
|
402
421
|
}
|
|
422
|
+
|
|
423
|
+
.slide-up-enter-active,
|
|
424
|
+
.slide-up-leave-active {
|
|
425
|
+
transition: all 0.25s ease-out;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.slide-up-enter-from {
|
|
429
|
+
opacity: 0;
|
|
430
|
+
transform: translateY(5px);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.slide-up-leave-to {
|
|
434
|
+
opacity: 0;
|
|
435
|
+
transform: translateY(-5px);
|
|
436
|
+
}
|
|
403
437
|
</style>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
|
|
62
62
|
<script lang="ts" setup>
|
|
63
63
|
import { MaybeRef, computed, ref, unref, watch } from "vue";
|
|
64
|
-
import { ICommonAsset } from "../../../../core/types";
|
|
64
|
+
import { ICommonAsset, IValidationRules } from "../../../../core/types";
|
|
65
65
|
import { VcLabel, VcFileUpload, VcHint } from "./../../";
|
|
66
66
|
import VcGalleryItem from "./_internal/vc-gallery-item/vc-gallery-item.vue";
|
|
67
67
|
import VcGalleryPreview from "./_internal/vc-gallery-preview/vc-gallery-preview.vue";
|
|
@@ -84,7 +84,7 @@ export interface Props {
|
|
|
84
84
|
remove: boolean;
|
|
85
85
|
};
|
|
86
86
|
hideAfterUpload?: boolean;
|
|
87
|
-
rules?:
|
|
87
|
+
rules?: keyof IValidationRules | IValidationRules;
|
|
88
88
|
name?: string;
|
|
89
89
|
loading?: boolean;
|
|
90
90
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<slot name="header">{{ title }}</slot>
|
|
57
57
|
|
|
58
58
|
<button
|
|
59
|
-
class="tw-h-[26px] tw-w-[26px] tw-bg-[var(--close-btn-bg)] tw-rounded-[4px] tw-inline-flex tw-items-center tw-justify-center tw-ml-auto hover:tw-bg-[var(--close-btn-bg-hover)]"
|
|
59
|
+
class="tw-h-[26px] tw-w-[26px] tw-bg-[var(--close-btn-bg)] tw-rounded-[4px] tw-inline-flex tw-items-center tw-justify-center tw-ml-auto hover:tw-bg-[var(--close-btn-bg-hover)] tw-outline-none"
|
|
60
60
|
@click="closeModal"
|
|
61
61
|
>
|
|
62
62
|
<svg
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { VNode } from "vue";
|
|
2
|
-
export declare const VcCodeEditor: {
|
|
3
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
-
placeholder: {
|
|
5
|
-
type: import("vue").PropType<string>;
|
|
6
|
-
};
|
|
7
|
-
modelValue: {
|
|
8
|
-
type: import("vue").PropType<string | number | Date>;
|
|
9
|
-
};
|
|
10
|
-
required: {
|
|
11
|
-
type: import("vue").PropType<boolean>;
|
|
12
|
-
};
|
|
13
|
-
disabled: {
|
|
14
|
-
type: import("vue").PropType<boolean>;
|
|
15
|
-
};
|
|
16
|
-
label: {
|
|
17
|
-
type: import("vue").PropType<string>;
|
|
18
|
-
};
|
|
19
|
-
tooltip: {
|
|
20
|
-
type: import("vue").PropType<string>;
|
|
21
|
-
};
|
|
22
|
-
errorMessage: {
|
|
23
|
-
type: import("vue").PropType<string>;
|
|
24
|
-
};
|
|
25
|
-
}>> & {
|
|
26
|
-
"onUpdate:modelValue"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
27
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
-
"update:modelValue": (value: string | number | Date | null | undefined) => void;
|
|
29
|
-
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
-
placeholder: {
|
|
31
|
-
type: import("vue").PropType<string>;
|
|
32
|
-
};
|
|
33
|
-
modelValue: {
|
|
34
|
-
type: import("vue").PropType<string | number | Date>;
|
|
35
|
-
};
|
|
36
|
-
required: {
|
|
37
|
-
type: import("vue").PropType<boolean>;
|
|
38
|
-
};
|
|
39
|
-
disabled: {
|
|
40
|
-
type: import("vue").PropType<boolean>;
|
|
41
|
-
};
|
|
42
|
-
label: {
|
|
43
|
-
type: import("vue").PropType<string>;
|
|
44
|
-
};
|
|
45
|
-
tooltip: {
|
|
46
|
-
type: import("vue").PropType<string>;
|
|
47
|
-
};
|
|
48
|
-
errorMessage: {
|
|
49
|
-
type: import("vue").PropType<string>;
|
|
50
|
-
};
|
|
51
|
-
}>> & {
|
|
52
|
-
"onUpdate:modelValue"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
53
|
-
}, {}, true, {}, {}, {
|
|
54
|
-
P: {};
|
|
55
|
-
B: {};
|
|
56
|
-
D: {};
|
|
57
|
-
C: {};
|
|
58
|
-
M: {};
|
|
59
|
-
Defaults: {};
|
|
60
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
-
placeholder: {
|
|
62
|
-
type: import("vue").PropType<string>;
|
|
63
|
-
};
|
|
64
|
-
modelValue: {
|
|
65
|
-
type: import("vue").PropType<string | number | Date>;
|
|
66
|
-
};
|
|
67
|
-
required: {
|
|
68
|
-
type: import("vue").PropType<boolean>;
|
|
69
|
-
};
|
|
70
|
-
disabled: {
|
|
71
|
-
type: import("vue").PropType<boolean>;
|
|
72
|
-
};
|
|
73
|
-
label: {
|
|
74
|
-
type: import("vue").PropType<string>;
|
|
75
|
-
};
|
|
76
|
-
tooltip: {
|
|
77
|
-
type: import("vue").PropType<string>;
|
|
78
|
-
};
|
|
79
|
-
errorMessage: {
|
|
80
|
-
type: import("vue").PropType<string>;
|
|
81
|
-
};
|
|
82
|
-
}>> & {
|
|
83
|
-
"onUpdate:modelValue"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
84
|
-
}, {}, {}, {}, {}, {}>;
|
|
85
|
-
__isFragment?: undefined;
|
|
86
|
-
__isTeleport?: undefined;
|
|
87
|
-
__isSuspense?: undefined;
|
|
88
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
-
placeholder: {
|
|
90
|
-
type: import("vue").PropType<string>;
|
|
91
|
-
};
|
|
92
|
-
modelValue: {
|
|
93
|
-
type: import("vue").PropType<string | number | Date>;
|
|
94
|
-
};
|
|
95
|
-
required: {
|
|
96
|
-
type: import("vue").PropType<boolean>;
|
|
97
|
-
};
|
|
98
|
-
disabled: {
|
|
99
|
-
type: import("vue").PropType<boolean>;
|
|
100
|
-
};
|
|
101
|
-
label: {
|
|
102
|
-
type: import("vue").PropType<string>;
|
|
103
|
-
};
|
|
104
|
-
tooltip: {
|
|
105
|
-
type: import("vue").PropType<string>;
|
|
106
|
-
};
|
|
107
|
-
errorMessage: {
|
|
108
|
-
type: import("vue").PropType<string>;
|
|
109
|
-
};
|
|
110
|
-
}>> & {
|
|
111
|
-
"onUpdate:modelValue"?: ((value: string | number | Date | null | undefined) => any) | undefined;
|
|
112
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
113
|
-
"update:modelValue": (value: string | number | Date | null | undefined) => void;
|
|
114
|
-
}, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
115
|
-
$slots: {
|
|
116
|
-
error?(_: {}): any;
|
|
117
|
-
};
|
|
118
|
-
}) & (new () => {
|
|
119
|
-
$slots: {
|
|
120
|
-
error: () => VNode[];
|
|
121
|
-
};
|
|
122
|
-
});
|
|
123
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-code-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAG5B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBACf;IACN,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,KAAK,EAAE,CAAC;KACtB,CAAC;CACH,CACF,CAAC"}
|