Skip to content

Commit 237b4f6

Browse files
committed
clean up
1 parent 0158bf8 commit 237b4f6

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

src/packages/block/block/property-value-resolver/block-value-resolver.api.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,5 @@ export abstract class UmbBlockValueResolver<ValueType>
4646
return a.contentKey === b.contentKey && a.culture === b.culture && a.segment === b.segment;
4747
}
4848

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-
8949
destroy(): void {}
9050
}

src/packages/core/property/property-value-resolver/types.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,3 @@ export type UmbPropertyValueResolverVariantsProcessor<
3030
value: PropertyValueType,
3131
variantsProcessor: (values: Array<InnerVariantType>) => Promise<Array<InnerVariantType> | undefined>,
3232
) => 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-
*/

0 commit comments

Comments
 (0)