File tree Expand file tree Collapse file tree 2 files changed +0
-53
lines changed
block/block/property-value-resolver
core/property/property-value-resolver Expand file tree Collapse file tree 2 files changed +0
-53
lines changed Original file line number Diff line number Diff line change @@ -46,45 +46,5 @@ export abstract class UmbBlockValueResolver<ValueType>
46
46
return a . contentKey === b . contentKey && a . culture === b . culture && a . segment === b . segment ;
47
47
}
48
48
49
- /*
50
- async ensureVariants(
51
- property: UmbContentValueModel<UmbBlockValueType>,
52
- args: UmbPropertyValueResolverEnsureVariantArgs,
53
- ) {
54
- if (property.value && args.selectedVariants) {
55
- const currentExposes = property.value.expose ?? [];
56
- const contentKeys = property.value.contentData.map((x) => x.key);
57
-
58
- const newExposes = contentKeys.flatMap((contentKey) =>
59
- args.selectedVariants.map((v) => ({
60
- contentKey: contentKey,
61
- culture: v.culture,
62
- segment: v.segment,
63
- })),
64
- ) as Array<UmbBlockExposeModel>;
65
-
66
- // make exposes unique:
67
- const expose = [
68
- ...currentExposes,
69
- ...newExposes.filter(
70
- (n) =>
71
- !currentExposes.some(
72
- (p) => p.contentKey === n.contentKey && p.culture === n.culture && p.segment === n.segment,
73
- ),
74
- ),
75
- ];
76
-
77
- return {
78
- ...property,
79
- value: {
80
- ...property.value,
81
- expose,
82
- },
83
- };
84
- }
85
- return property;
86
- }
87
- */
88
-
89
49
destroy ( ) : void { }
90
50
}
Original file line number Diff line number Diff line change @@ -30,16 +30,3 @@ export type UmbPropertyValueResolverVariantsProcessor<
30
30
value : PropertyValueType ,
31
31
variantsProcessor : ( values : Array < InnerVariantType > ) => Promise < Array < InnerVariantType > | undefined > ,
32
32
) => PromiseLike < PropertyValueType | undefined > ;
33
-
34
- /*
35
- export type UmbPropertyValueResolverEnsureVariants<
36
- PropertyValueType extends UmbPropertyValueData = UmbPropertyValueData,
37
- > = (
38
- value: PropertyValueType,
39
- args: UmbPropertyValueResolverEnsureVariantArgs,
40
- ) => PromiseLike<PropertyValueType | undefined>;
41
-
42
- export type UmbPropertyValueResolverEnsureVariantArgs = {
43
- selectedVariants: Array<UmbVariantId>;
44
- };
45
- */
You can’t perform that action at this time.
0 commit comments