Skip to content

Commit

Permalink
chore: cleanup outdated code for patching enums. enums are now correc…
Browse files Browse the repository at this point in the history
…tly parsed from base package
  • Loading branch information
Thodd committed Aug 19, 2024
1 parent 31ad3a2 commit c84398f
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions packages/ui5-tooling-modules/lib/utils/WebComponentRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ class RegistryEntry {
this.enums = {};
this.interfaces = new Set();

// TODO: Should not be needed later!
this.#patchMissingEnums();

this.#processMetadata();
}

Expand Down Expand Up @@ -108,20 +105,6 @@ class RegistryEntry {
return `${this.namespace}.${str}`;
}

/**
* TODO: We patch some enums as a workaround so that the wrapper controls behave correctly.
* We need to find out why some enums are not contained in the custom elements manifest.
*/
#patchMissingEnums() {
if (this.namespace === "@ui5/webcomponents") {
this.enums["ValueState"] = {
kind: "enum",
name: "ValueState",
members: [{ name: "None" }, { name: "Positive" }, { name: "Critical" }, { name: "Negative" }, { name: "Information" }],
};
}
}

// --- UI5 Metadata transformer below ---

#normalizeType(type) {
Expand Down Expand Up @@ -170,8 +153,9 @@ class RegistryEntry {
const interfaceOrClassType = this.#checkForInterfaceOrClassType(parsedType);

if (interfaceOrClassType) {
// TODO: How should this be wired in the wrapper?
// Is this a calculated property...?
// TODO: How should this be wired for properties?
// Aggregations can have an interface/class type, but properties do not.
// A property of this typing could be considered a calculated field...?
return {
isInterfaceOrClassType: true,
origType: parsedType,
Expand Down

0 comments on commit c84398f

Please sign in to comment.