Skip to content

Commit

Permalink
expose uniques and aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe committed May 15, 2024
1 parent 65330e6 commit 509df23
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export class UmbContentTypeStructureManager<
private readonly _contentTypeContainers = this.#contentTypes.asObservablePart((x) =>
x.flatMap((x) => x.containers ?? []),
);
readonly contentTypeUniques = this.#contentTypes.asObservablePart((x) => x.map((y) => y.unique));
readonly contentTypeAliases = this.#contentTypes.asObservablePart((x) => x.map((y) => y.alias));

#containers: UmbArrayState<UmbPropertyTypeContainerModel> = new UmbArrayState<UmbPropertyTypeContainerModel>(
[],
Expand Down Expand Up @@ -205,6 +207,12 @@ export class UmbContentTypeStructureManager<
getContentTypes() {
return this.#contentTypes.getValue();
}
getContentTypeUniques() {
return this.#contentTypes.getValue().map((x) => x.unique);
}
getContentTypeAliases() {
return this.#contentTypes.getValue().map((x) => x.alias);
}

// TODO: We could move the actions to another class?

Expand Down

0 comments on commit 509df23

Please sign in to comment.