@vc-shell/framework 1.1.86 → 1.1.88
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/core/composables/useDynamicProperties/index.ts +31 -3
- package/dist/core/composables/useDynamicProperties/index.d.ts +3 -1
- package/dist/core/composables/useDynamicProperties/index.d.ts.map +1 -1
- package/dist/framework.js +5952 -5796
- package/dist/index.css +1 -1
- package/dist/locales/de.json +9 -0
- package/dist/locales/en.json +9 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts +2 -3
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +1 -2
- 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 +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/ui/components/atoms/vc-tooltip/vc-tooltip.vue +1 -1
- package/ui/components/molecules/vc-input/vc-input.vue +35 -2
- package/ui/components/molecules/vc-select/vc-select.vue +21 -4
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +134 -6
- package/core/api/virtocommerce.platform.ts +0 -10457
- package/dist/core/api/virtocommerce.platform.d.ts +0 -2442
- package/dist/core/api/virtocommerce.platform.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.1.88](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.87...v1.1.88) (2025-10-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **vc-dynamic-property:** add color type dictionary select ([4a21112](https://github.com/VirtoCommerce/vc-shell/commit/4a211124acd4b66d0f4b9f37fc4cb33c70b69a5d))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.1.87](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.86...v1.1.87) (2025-10-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **vc-dynamic-property, input:** color type in dynamic propery and input VM-1645 ([1ff529e](https://github.com/VirtoCommerce/vc-shell/commit/1ff529eab6e560a21cb64a5de6a28f11c80b4b30))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [1.1.86](https://github.com/VirtoCommerce/vc-shell/compare/v1.1.85...v1.1.86) (2025-10-06)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -12,7 +12,6 @@ export interface IBaseProperty<TPropertyValue> {
|
|
|
12
12
|
multivalue?: boolean | null;
|
|
13
13
|
dictionary?: boolean | null;
|
|
14
14
|
valueType?: string | null;
|
|
15
|
-
unitOfMeasureId?: string | null;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface IBasePropertyValue {
|
|
@@ -25,6 +24,7 @@ export interface IBasePropertyValue {
|
|
|
25
24
|
valueId?: string | null;
|
|
26
25
|
isInherited?: boolean;
|
|
27
26
|
unitOfMeasureId?: string | null;
|
|
27
|
+
colorCode?: string | null;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface IBasePropertyDictionaryItem {
|
|
@@ -33,6 +33,7 @@ export interface IBasePropertyDictionaryItem {
|
|
|
33
33
|
alias?: string | null;
|
|
34
34
|
localizedValues?: { languageCode?: string | null; value?: string | null }[] | null;
|
|
35
35
|
value?: string;
|
|
36
|
+
colorCode?: string | null;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export interface IBasePropertyDictionaryItemSearchCriteria {
|
|
@@ -79,6 +80,7 @@ export interface SetPropertyValueParams<TProperty, TPropertyValue, TPropertyDict
|
|
|
79
80
|
locale?: string;
|
|
80
81
|
initialProp?: TProperty;
|
|
81
82
|
unitOfMeasureId?: string;
|
|
83
|
+
colorCode?: string;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
// === UTILITY FUNCTIONS ===
|
|
@@ -107,6 +109,10 @@ function isMeasureProperty<T extends IBaseProperty<unknown>>(property: T): boole
|
|
|
107
109
|
return property.valueType === "Measure";
|
|
108
110
|
}
|
|
109
111
|
|
|
112
|
+
function isColorProperty<T extends IBaseProperty<unknown>>(property: T): boolean {
|
|
113
|
+
return property.valueType === "Color";
|
|
114
|
+
}
|
|
115
|
+
|
|
110
116
|
// === MAIN COMPOSABLE ===
|
|
111
117
|
|
|
112
118
|
export const useDynamicProperties = <
|
|
@@ -231,6 +237,15 @@ export const useDynamicProperties = <
|
|
|
231
237
|
];
|
|
232
238
|
}
|
|
233
239
|
|
|
240
|
+
function setColorPropertyValue(property: TProperty, value: unknown, colorCode?: string): void {
|
|
241
|
+
property.values = [
|
|
242
|
+
createPropertyValue({
|
|
243
|
+
value,
|
|
244
|
+
colorCode,
|
|
245
|
+
} as Partial<TPropertyValue>),
|
|
246
|
+
];
|
|
247
|
+
}
|
|
248
|
+
|
|
234
249
|
function setDictionaryPropertyValue(
|
|
235
250
|
property: TProperty,
|
|
236
251
|
value: string | TPropertyValue[] | (TPropertyDictionaryItem & { value: string })[],
|
|
@@ -251,7 +266,11 @@ export const useDynamicProperties = <
|
|
|
251
266
|
dict: TPropertyDictionaryItem[],
|
|
252
267
|
): void {
|
|
253
268
|
if (Array.isArray(value)) {
|
|
254
|
-
handleMultilanguageMultivalueDictionary(
|
|
269
|
+
handleMultilanguageMultivalueDictionary(
|
|
270
|
+
property,
|
|
271
|
+
value as (TPropertyDictionaryItem & { value: string })[],
|
|
272
|
+
dict,
|
|
273
|
+
);
|
|
255
274
|
} else {
|
|
256
275
|
handleMultilanguageSingleValueDictionary(property, value as string, dict);
|
|
257
276
|
}
|
|
@@ -273,6 +292,7 @@ export const useDynamicProperties = <
|
|
|
273
292
|
languageCode: locValue.languageCode,
|
|
274
293
|
value: locValue.value ?? dictItem.alias,
|
|
275
294
|
valueId: dictItem.id,
|
|
295
|
+
colorCode: dictItem.colorCode,
|
|
276
296
|
} as Partial<TPropertyValue>),
|
|
277
297
|
);
|
|
278
298
|
}
|
|
@@ -296,6 +316,7 @@ export const useDynamicProperties = <
|
|
|
296
316
|
languageCode: locValue.languageCode,
|
|
297
317
|
value: locValue.value ?? dictionaryItem.alias,
|
|
298
318
|
valueId: dictionaryItem.id,
|
|
319
|
+
colorCode: dictionaryItem.colorCode,
|
|
299
320
|
} as Partial<TPropertyValue>),
|
|
300
321
|
);
|
|
301
322
|
} else {
|
|
@@ -333,6 +354,7 @@ export const useDynamicProperties = <
|
|
|
333
354
|
alias: dictItem.alias,
|
|
334
355
|
value: item.value ?? dictItem.alias,
|
|
335
356
|
valueId: dictItem.id,
|
|
357
|
+
colorCode: dictItem.colorCode,
|
|
336
358
|
} as Partial<TPropertyValue>);
|
|
337
359
|
}
|
|
338
360
|
|
|
@@ -357,6 +379,7 @@ export const useDynamicProperties = <
|
|
|
357
379
|
alias: dictionaryItem?.alias,
|
|
358
380
|
value: (dictionaryItem as TPropertyDictionaryItem & { value: string })?.value ?? dictionaryItem?.alias,
|
|
359
381
|
valueId: value,
|
|
382
|
+
colorCode: dictionaryItem?.colorCode,
|
|
360
383
|
} as Partial<TPropertyValue>),
|
|
361
384
|
];
|
|
362
385
|
}
|
|
@@ -478,13 +501,18 @@ export const useDynamicProperties = <
|
|
|
478
501
|
// === MAIN SET PROPERTY VALUE FUNCTION ===
|
|
479
502
|
|
|
480
503
|
function setPropertyValue(params: SetPropertyValueParams<TProperty, TPropertyValue, TPropertyDictionaryItem>): void {
|
|
481
|
-
const { property, value, dictionary, locale, initialProp, unitOfMeasureId } = params;
|
|
504
|
+
const { property, value, dictionary, locale, initialProp, unitOfMeasureId, colorCode } = params;
|
|
482
505
|
|
|
483
506
|
if (isMeasureProperty(property)) {
|
|
484
507
|
setMeasurePropertyValue(property, value, unitOfMeasureId);
|
|
485
508
|
return;
|
|
486
509
|
}
|
|
487
510
|
|
|
511
|
+
if (isColorProperty(property) && !dictionary?.length) {
|
|
512
|
+
setColorPropertyValue(property, value, colorCode);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
|
|
488
516
|
if (dictionary?.length) {
|
|
489
517
|
setDictionaryPropertyValue(property, value, dictionary);
|
|
490
518
|
return;
|
|
@@ -7,7 +7,6 @@ export interface IBaseProperty<TPropertyValue> {
|
|
|
7
7
|
multivalue?: boolean | null;
|
|
8
8
|
dictionary?: boolean | null;
|
|
9
9
|
valueType?: string | null;
|
|
10
|
-
unitOfMeasureId?: string | null;
|
|
11
10
|
}
|
|
12
11
|
export interface IBasePropertyValue {
|
|
13
12
|
propertyName?: string | null;
|
|
@@ -19,6 +18,7 @@ export interface IBasePropertyValue {
|
|
|
19
18
|
valueId?: string | null;
|
|
20
19
|
isInherited?: boolean;
|
|
21
20
|
unitOfMeasureId?: string | null;
|
|
21
|
+
colorCode?: string | null;
|
|
22
22
|
}
|
|
23
23
|
export interface IBasePropertyDictionaryItem {
|
|
24
24
|
id?: string | null;
|
|
@@ -29,6 +29,7 @@ export interface IBasePropertyDictionaryItem {
|
|
|
29
29
|
value?: string | null;
|
|
30
30
|
}[] | null;
|
|
31
31
|
value?: string;
|
|
32
|
+
colorCode?: string | null;
|
|
32
33
|
}
|
|
33
34
|
export interface IBasePropertyDictionaryItemSearchCriteria {
|
|
34
35
|
propertyIds?: string[] | null;
|
|
@@ -61,6 +62,7 @@ export interface SetPropertyValueParams<TProperty, TPropertyValue, TPropertyDict
|
|
|
61
62
|
locale?: string;
|
|
62
63
|
initialProp?: TProperty;
|
|
63
64
|
unitOfMeasureId?: string;
|
|
65
|
+
colorCode?: string;
|
|
64
66
|
}
|
|
65
67
|
export declare const useDynamicProperties: <TProperty extends IBaseProperty<TPropertyValue>, TPropertyValue extends IBasePropertyValue, TPropertyDictionaryItem extends IBasePropertyDictionaryItem, TPropertyDictionaryItemSearchCriteria extends IBasePropertyDictionaryItemSearchCriteria, TMeasurement extends IBaseMeasurementDictionaryItem>(searchDictionaryItemsFunction: (criteria: TPropertyDictionaryItemSearchCriteria) => Promise<TPropertyDictionaryItem[] | undefined>, PropertyValueConstructor: new (data?: Partial<TPropertyValue>) => TPropertyValue, PropertyDictionaryItemConstructor: new (data?: Partial<TPropertyDictionaryItem>) => TPropertyDictionaryItem, searchMeasurementFunction?: (measureId: string, locale?: string) => Promise<TMeasurement[] | undefined>) => IUseDynamicProperties<TProperty, TPropertyValue, TPropertyDictionaryItem, TPropertyDictionaryItemSearchCriteria>;
|
|
66
68
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useDynamicProperties/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAIlC,MAAM,WAAW,aAAa,CAAC,cAAc;IAC3C,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useDynamicProperties/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAIlC,MAAM,WAAW,aAAa,CAAC,cAA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