@vc-shell/framework 1.1.16 → 1.1.18
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 +8 -0
- package/core/composables/useDynamicProperties/index.ts +19 -0
- package/dist/core/composables/useDynamicProperties/index.d.ts +2 -0
- package/dist/core/composables/useDynamicProperties/index.d.ts.map +1 -1
- package/dist/framework.js +1 -1
- package/dist/{index-C4hgh3UO.js → index--i2CrsJJ.js} +1 -1
- package/dist/{index-IcBXwZve.js → index-B-_pypoR.js} +1 -1
- package/dist/{index-BcycCrhu.js → index-B4Q9DkTB.js} +1 -1
- package/dist/{index-DUFYvPbO.js → index-BWvofd8L.js} +1 -1
- package/dist/{index-DcBib1nM.js → index-BX4mc81I.js} +1 -1
- package/dist/{index-bDzs_LWh.js → index-C8U4bk1-.js} +1 -1
- package/dist/{index-Bu2q0_3Y.js → index-C8jsLNj0.js} +1 -1
- package/dist/{index-DaUvPRtj.js → index-CP3k1nfq.js} +1 -1
- package/dist/{index-BsgNPf1t.js → index-CyGdldvT.js} +1 -1
- package/dist/{index-DMnyda0K.js → index-DC8hKkuO.js} +1 -1
- package/dist/{index-DLq0u-Q_.js → index-DTFCTb6P.js} +1 -1
- package/dist/{index-CZUA_odG.js → index-DdjamMzX.js} +4184 -4134
- package/dist/{index-C29QNU9R.js → index-cZv5B-OC.js} +1 -1
- package/dist/{index-DCpm6RA0.js → index-sdqR8ULO.js} +1 -1
- package/dist/{index-BM57ACvV.js → index-wl6u-5rt.js} +1 -1
- package/dist/{index-BX16sgSt.js → index-wsEOQiHr.js} +1 -1
- package/dist/{index-BNnWb4d2.js → index-x3QIr8mC.js} +1 -1
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts +6 -0
- package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +2 -0
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +11 -4
- package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue +13 -0
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +43 -6
|
@@ -145,6 +145,12 @@ type __VLS_Slots = {
|
|
|
145
145
|
modelValue: string | number | Date | null | undefined;
|
|
146
146
|
emitValue: (value: string | number | Date | null) => void;
|
|
147
147
|
}) => unknown;
|
|
148
|
+
option: (scope: {
|
|
149
|
+
index: number;
|
|
150
|
+
opt: unknown;
|
|
151
|
+
selected: boolean;
|
|
152
|
+
toggleOption: (opt: any) => void;
|
|
153
|
+
}) => unknown;
|
|
148
154
|
};
|
|
149
155
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
150
156
|
blur: (value: Event) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-input-dropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-input-dropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue"],"names":[],"mappings":"AA6RA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;I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AAC;KAClC,KAAK,OAAO,CAAC;CACf,CAAC;AA2MF,QAAA,MAAM,eAAe;;;;;;;;;;;cAnUR,MAAM,GAAG,MAAM;gBAwDb,OAAO;eAKR,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB;6EA8QrH,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -7,6 +7,7 @@ declare const _default: <T extends {
|
|
|
7
7
|
readonly value: any;
|
|
8
8
|
readonly dictionary?: any[];
|
|
9
9
|
readonly locale?: string;
|
|
10
|
+
readonly unitOfMeasureId?: string;
|
|
10
11
|
}) => any) | undefined;
|
|
11
12
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:model-value"> & {
|
|
12
13
|
property: T;
|
|
@@ -41,6 +42,7 @@ declare const _default: <T extends {
|
|
|
41
42
|
readonly value: any;
|
|
42
43
|
readonly dictionary?: any[];
|
|
43
44
|
readonly locale?: string;
|
|
45
|
+
readonly unitOfMeasureId?: string;
|
|
44
46
|
}) => void;
|
|
45
47
|
}>) => import("vue").VNode & {
|
|
46
48
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-dynamic-property.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-dynamic-property.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue"],"names":[],"mappings":"yBA+bi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AgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;wBA3oBW,GAAG;8BACG,GAAG,EAAE;0BACT,MAAM;mCACG,MAAM;;EA4oBnC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAtsBzE,wBAssB4E;AAC5E,KAAK,mBAAmB,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.1.
|
|
3
|
+
"version": "1.1.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
|
72
72
|
"@types/dompurify": "^3.0.5",
|
|
73
|
-
"@vc-shell/api-client-generator": "^1.1.
|
|
74
|
-
"@vc-shell/config-generator": "^1.1.
|
|
75
|
-
"@vc-shell/ts-config": "^1.1.
|
|
73
|
+
"@vc-shell/api-client-generator": "^1.1.18",
|
|
74
|
+
"@vc-shell/config-generator": "^1.1.18",
|
|
75
|
+
"@vc-shell/ts-config": "^1.1.18",
|
|
76
76
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
77
77
|
"@vue/test-utils": "^2.4.5",
|
|
78
78
|
"cypress-signalr-mock": "^1.5.0",
|
|
@@ -74,8 +74,6 @@ export default {
|
|
|
74
74
|
const initialProps = _.cloneDeep(dynamicProps.value);
|
|
75
75
|
|
|
76
76
|
const properties: UnwrapNestedRefs<IDynamicProperties[]> = reactiveComputed(() => {
|
|
77
|
-
console.log("props.bladeContext.scope?.dynamicProperties: ", props.bladeContext.scope?.dynamicProperties);
|
|
78
|
-
console.log("dynamicProps.value: ", dynamicProps.value);
|
|
79
77
|
return (dynamicProps.value || [])?.map((prop) =>
|
|
80
78
|
DynamicProperties({
|
|
81
79
|
props: {
|
|
@@ -98,17 +96,26 @@ export default {
|
|
|
98
96
|
locale?: string | undefined,
|
|
99
97
|
) => Promise<Record<string, any>[]>,
|
|
100
98
|
"onUpdate:model-value": (args: {
|
|
101
|
-
value:
|
|
99
|
+
value: any;
|
|
100
|
+
unitOfMeasureId?: string;
|
|
102
101
|
dictionary?: Record<string, any>[];
|
|
103
102
|
locale?: string;
|
|
104
103
|
}) => {
|
|
104
|
+
let finalValue = args.value;
|
|
105
|
+
if (prop.valueType === "Measure") {
|
|
106
|
+
finalValue = {
|
|
107
|
+
value: args.value,
|
|
108
|
+
unitOfMeasureId: args.unitOfMeasureId,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
105
111
|
props.bladeContext.scope?.dynamicProperties?.setPropertyValue({
|
|
106
112
|
property: prop,
|
|
107
|
-
value:
|
|
113
|
+
value: finalValue,
|
|
108
114
|
dictionary: args.dictionary,
|
|
109
115
|
locale: args.locale,
|
|
110
116
|
initialProp: _.cloneDeep(initialProps?.find((x) => x.id === prop.id)),
|
|
111
117
|
});
|
|
118
|
+
|
|
112
119
|
if (props.fieldContext) {
|
|
113
120
|
setModel({ context: props.fieldContext, property: props.element.property, value: internalModel.value });
|
|
114
121
|
}
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
:tooltip="tooltip"
|
|
14
14
|
@update:model-value="$emit('update:option', $event)"
|
|
15
15
|
>
|
|
16
|
+
<template #option="scope">
|
|
17
|
+
<slot
|
|
18
|
+
name="option"
|
|
19
|
+
v-bind="scope"
|
|
20
|
+
></slot>
|
|
21
|
+
</template>
|
|
16
22
|
<template #control="{ toggleHandler }">
|
|
17
23
|
<VcInput
|
|
18
24
|
:placeholder="placeholder"
|
|
@@ -246,6 +252,13 @@ defineSlots<{
|
|
|
246
252
|
modelValue: string | number | Date | null | undefined;
|
|
247
253
|
emitValue: (value: string | number | Date | null) => void;
|
|
248
254
|
}) => unknown;
|
|
255
|
+
option: (scope: {
|
|
256
|
+
index: number;
|
|
257
|
+
//todo: Create generic component
|
|
258
|
+
opt: unknown;
|
|
259
|
+
selected: boolean;
|
|
260
|
+
toggleOption: (opt: any) => void;
|
|
261
|
+
}) => unknown;
|
|
249
262
|
}>();
|
|
250
263
|
|
|
251
264
|
defineEmits<Emits>();
|
|
@@ -193,17 +193,30 @@
|
|
|
193
193
|
<VcInputDropdown
|
|
194
194
|
v-bind="$attrs"
|
|
195
195
|
v-model="value"
|
|
196
|
-
v-model:option="
|
|
196
|
+
v-model:option="measureUnit"
|
|
197
197
|
:options="measurementOptions"
|
|
198
198
|
:loading="measurementLoading"
|
|
199
199
|
option-label="displayName"
|
|
200
|
-
option-value="
|
|
200
|
+
option-value="id"
|
|
201
201
|
input-type="number"
|
|
202
202
|
:label="computedProperty.displayName"
|
|
203
203
|
:placeholder="computedProperty.placeholder"
|
|
204
204
|
:required="computedProperty.required"
|
|
205
205
|
:disabled="disabled"
|
|
206
|
-
|
|
206
|
+
@update:option="onUpdateUnit"
|
|
207
|
+
>
|
|
208
|
+
<template #button="scope">
|
|
209
|
+
<button
|
|
210
|
+
class="vc-input-dropdown__toggle-button"
|
|
211
|
+
tabindex="0"
|
|
212
|
+
@click.stop.prevent="scope.toggleHandler"
|
|
213
|
+
@keydown.enter.stop.prevent="scope.toggleHandler"
|
|
214
|
+
@keydown.space.stop.prevent="scope.toggleHandler"
|
|
215
|
+
>
|
|
216
|
+
{{ measurementOptions?.find((e) => e.id === measureUnit)?.displaySymbol }}
|
|
217
|
+
</button>
|
|
218
|
+
</template>
|
|
219
|
+
</VcInputDropdown>
|
|
207
220
|
</template>
|
|
208
221
|
</Field>
|
|
209
222
|
</template>
|
|
@@ -262,7 +275,14 @@ const props = withDefaults(
|
|
|
262
275
|
);
|
|
263
276
|
|
|
264
277
|
const emit = defineEmits<{
|
|
265
|
-
"update:model-value": [
|
|
278
|
+
"update:model-value": [
|
|
279
|
+
data: {
|
|
280
|
+
readonly value: any;
|
|
281
|
+
readonly dictionary?: any[];
|
|
282
|
+
readonly locale?: string;
|
|
283
|
+
readonly unitOfMeasureId?: string;
|
|
284
|
+
},
|
|
285
|
+
];
|
|
266
286
|
}>();
|
|
267
287
|
|
|
268
288
|
const { te, t } = useI18n({ useScope: "global" });
|
|
@@ -274,7 +294,7 @@ const internalProperty = ref(props.property) as Ref<typeof props.property>;
|
|
|
274
294
|
const internalModel = ref(props.modelValue) as Ref<typeof props.modelValue>;
|
|
275
295
|
const measurementOptions = ref<any[]>([]);
|
|
276
296
|
const measurementLoading = ref(false);
|
|
277
|
-
const
|
|
297
|
+
const measureUnit = ref<Record<string, any>>();
|
|
278
298
|
|
|
279
299
|
watch(
|
|
280
300
|
() => props.property,
|
|
@@ -357,6 +377,16 @@ onMounted(async () => {
|
|
|
357
377
|
initialOptions.value = items.value;
|
|
358
378
|
});
|
|
359
379
|
|
|
380
|
+
function onUpdateUnit(newUnitOfMeasureId: any) {
|
|
381
|
+
measureUnit.value = newUnitOfMeasureId;
|
|
382
|
+
emit("update:model-value", {
|
|
383
|
+
value: value.value,
|
|
384
|
+
unitOfMeasureId: newUnitOfMeasureId,
|
|
385
|
+
dictionary: items.value,
|
|
386
|
+
locale: props.currentLanguage,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
|
|
360
390
|
async function getOptions(keyword: string | undefined = undefined) {
|
|
361
391
|
if (props.optionsGetter && internalProperty.value.dictionary && internalProperty.value.id) {
|
|
362
392
|
try {
|
|
@@ -382,7 +412,14 @@ async function getMeasurements() {
|
|
|
382
412
|
);
|
|
383
413
|
if (measurements) {
|
|
384
414
|
measurementOptions.value = measurements;
|
|
385
|
-
|
|
415
|
+
|
|
416
|
+
const firstVal = internalProperty.value.values?.[0];
|
|
417
|
+
if (firstVal?.unitOfMeasureId) {
|
|
418
|
+
measureUnit.value = firstVal.unitOfMeasureId;
|
|
419
|
+
} else {
|
|
420
|
+
const defaultValue = measurementOptions.value.find((x) => x.isDefault)?.id ?? measurementOptions.value[0]?.id;
|
|
421
|
+
measureUnit.value = defaultValue;
|
|
422
|
+
}
|
|
386
423
|
}
|
|
387
424
|
} finally {
|
|
388
425
|
measurementLoading.value = false;
|