@ui5/webcomponents-base 1.24.0 → 2.0.0-rc.1

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.
Files changed (62) hide show
  1. package/.eslintignore +0 -1
  2. package/CHANGELOG.md +279 -0
  3. package/README.md +0 -8
  4. package/bundle.esm.js +0 -1
  5. package/config/wdio.conf.cjs +0 -8
  6. package/dist/.tsbuildinfo +1 -1
  7. package/dist/Device.d.ts +1 -2
  8. package/dist/Device.js +5 -12
  9. package/dist/Device.js.map +1 -1
  10. package/dist/ManagedStyles.js +21 -99
  11. package/dist/ManagedStyles.js.map +1 -1
  12. package/dist/UI5Element.d.ts +5 -26
  13. package/dist/UI5Element.js +24 -54
  14. package/dist/UI5Element.js.map +1 -1
  15. package/dist/UI5ElementMetadata.d.ts +2 -0
  16. package/dist/UI5ElementMetadata.js +3 -0
  17. package/dist/UI5ElementMetadata.js.map +1 -1
  18. package/dist/custom-elements-internal.json +0 -76
  19. package/dist/custom-elements.json +0 -76
  20. package/dist/decorators/customElement.d.ts +1 -2
  21. package/dist/decorators/customElement.js +6 -4
  22. package/dist/decorators/customElement.js.map +1 -1
  23. package/dist/features/OpenUI5Support.d.ts +0 -2
  24. package/dist/features/OpenUI5Support.js +2 -23
  25. package/dist/features/OpenUI5Support.js.map +1 -1
  26. package/dist/generated/VersionInfo.js +5 -5
  27. package/dist/generated/VersionInfo.js.map +1 -1
  28. package/dist/renderer/LitRenderer.js +2 -8
  29. package/dist/renderer/LitRenderer.js.map +1 -1
  30. package/dist/theming/getConstructableStyle.d.ts +1 -1
  31. package/dist/theming/getConstructableStyle.js +3 -3
  32. package/dist/theming/getConstructableStyle.js.map +1 -1
  33. package/dist/theming/getEffectiveStyle.d.ts +1 -1
  34. package/dist/theming/getEffectiveStyle.js +5 -12
  35. package/dist/theming/getEffectiveStyle.js.map +1 -1
  36. package/dist/updateShadowRoot.d.ts +1 -2
  37. package/dist/updateShadowRoot.js +5 -29
  38. package/dist/updateShadowRoot.js.map +1 -1
  39. package/dist/util/PopupUtils.d.ts +1 -3
  40. package/dist/util/PopupUtils.js +1 -15
  41. package/dist/util/PopupUtils.js.map +1 -1
  42. package/dist/util/dragAndDrop/DragRegistry.d.ts +1 -1
  43. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
  44. package/dist/util/getClassCopy.d.ts +1 -8
  45. package/index.js +0 -14
  46. package/package-scripts.cjs +1 -1
  47. package/package.json +3 -3
  48. package/dist/CSP.d.ts +0 -33
  49. package/dist/CSP.js +0 -54
  50. package/dist/CSP.js.map +0 -1
  51. package/dist/StaticAreaItem.d.ts +0 -35
  52. package/dist/StaticAreaItem.js +0 -100
  53. package/dist/StaticAreaItem.js.map +0 -1
  54. package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
  55. package/dist/theming/getEffectiveLinksHrefs.js +0 -17
  56. package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
  57. package/dist/theming/preloadLinks.d.ts +0 -3
  58. package/dist/theming/preloadLinks.js +0 -19
  59. package/dist/theming/preloadLinks.js.map +0 -1
  60. package/dist/util/createStyleInHead.d.ts +0 -8
  61. package/dist/util/createStyleInHead.js +0 -18
  62. package/dist/util/createStyleInHead.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"UI5Element.js","sourceRoot":"","sources":["../src/UI5Element.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,yCAAyC,CAAC;AACjD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,kBAMN,MAAM,yBAAyB,CAAC;AACjC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,2BAA2B,MAAM,uCAAuC,CAAC;AAChF,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2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ACjC,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport \"@ui5/webcomponents-base/dist/ssr-dom.js\";\nimport merge from \"./thirdparty/merge.js\";\nimport { boot } from \"./Boot.js\";\nimport UI5ElementMetadata, {\n\tSlot,\n\tSlotValue,\n\tState,\n\tPropertyValue,\n\tMetadata,\n} from \"./UI5ElementMetadata.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport getSingletonElementInstance from \"./util/getSingletonElementInstance.js\";\nimport StaticAreaItem from \"./StaticAreaItem.js\";\nimport updateShadowRoot from \"./updateShadowRoot.js\";\nimport { shouldIgnoreCustomElement } from \"./IgnoreCustomElements.js\";\nimport { renderDeferred, renderImmediately, cancelRender } from \"./Render.js\";\nimport { registerTag, isTagRegistered, recordTagRegistrationFailure } from \"./CustomElementsRegistry.js\";\nimport { observeDOMNode, unobserveDOMNode } from \"./DOMObserver.js\";\nimport { skipOriginalEvent } from \"./config/NoConflict.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport DataType from \"./types/DataType.js\";\nimport { kebabToCamelCase, camelToKebabCase } from \"./util/StringHelper.js\";\nimport isValidPropertyName from \"./util/isValidPropertyName.js\";\nimport { getSlotName, getSlottedNodesList } from \"./util/SlotsHelper.js\";\nimport arraysAreEqual from \"./util/arraysAreEqual.js\";\nimport { markAsRtlAware } from \"./locale/RTLAwareRegistry.js\";\nimport preloadLinks from \"./theming/preloadLinks.js\";\nimport executeTemplate from \"./renderer/executeTemplate.js\";\nimport type { TemplateFunction, TemplateFunctionResult } from \"./renderer/executeTemplate.js\";\nimport type {\n\tAccessibilityInfo,\n\tPromiseResolve,\n\tComponentStylesData,\n\tClassMap,\n} from \"./types.js\";\n\nlet autoId = 0;\n\nconst elementTimeouts = new Map<string, Promise<void>>();\nconst uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();\n\ntype Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, styleStrOrHrefsArr: string | Array<string> | undefined, forStaticArea: boolean, options: RendererOptions) => void;\n\ntype RendererOptions = {\n\t/**\n\t * An object to use as the `this` value for event listeners. It's often\n\t * useful to set this to the host component rendering a template.\n\t */\n\thost?: object,\n}\n\ntype ChangeInfo = {\n\ttype: \"property\" | \"slot\",\n\tname: string,\n\treason?: string,\n\tchild?: SlotValue,\n\ttarget?: UI5Element,\n\tnewValue?: PropertyValue,\n\toldValue?: PropertyValue,\n}\n\ntype InvalidationInfo = ChangeInfo & { target: UI5Element };\n\ntype ChildChangeListener = (param: InvalidationInfo) => void;\n\ntype SlotChangeListener = (this: HTMLSlotElement, ev: Event) => void;\n\n/**\n * Triggers re-rendering of a UI5Element instance due to state change.\n * @param {ChangeInfo} changeInfo An object with information about the change that caused invalidation.\n * @private\n */\nfunction _invalidate(this: UI5Element, changeInfo: ChangeInfo) {\n\t// Invalidation should be suppressed: 1) before the component is rendered for the first time 2) and during the execution of onBeforeRendering\n\t// This is necessary not only as an optimization, but also to avoid infinite loops on invalidation between children and parents (when invalidateOnChildChange is used)\n\tif (this._suppressInvalidation) {\n\t\treturn;\n\t}\n\n\t// Call the onInvalidation hook\n\tthis.onInvalidation(changeInfo);\n\n\tthis._changedState.push(changeInfo);\n\trenderDeferred(this);\n\tthis._invalidationEventProvider.fireEvent(\"invalidate\", { ...changeInfo, target: this });\n}\n\n/**\n * @class\n * Base class for all UI5 Web Components\n *\n * @extends HTMLElement\n * @public\n */\nabstract class UI5Element extends HTMLElement {\n\t__id?: string;\n\t_suppressInvalidation: boolean;\n\t_changedState: Array<ChangeInfo>;\n\t_invalidationEventProvider: EventProvider<InvalidationInfo, void>;\n\t_componentStateFinalizedEventProvider: EventProvider<void, void>;\n\t_inDOM: boolean;\n\t_fullyConnected: boolean;\n\t_childChangeListeners: Map<string, ChildChangeListener>;\n\t_slotChangeListeners: Map<string, SlotChangeListener>;\n\t_domRefReadyPromise: Promise<void> & { _deferredResolve?: PromiseResolve };\n\t_doNotSyncAttributes: Set<string>;\n\t_state: State;\n\t_getRealDomRef?: () => HTMLElement;\n\n\tstaticAreaItem?: StaticAreaItem;\n\n\tstatic template?: TemplateFunction;\n\tstatic staticAreaTemplate?: TemplateFunction;\n\tstatic _metadata: UI5ElementMetadata;\n\n\t/**\n\t * @deprecated\n\t */\n\tstatic render: Renderer;\n\tstatic renderer?: Renderer;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tthis._changedState = []; // Filled on each invalidation, cleared on re-render (used for debugging)\n\t\tthis._suppressInvalidation = true; // A flag telling whether all invalidations should be ignored. Initialized with \"true\" because a UI5Element can not be invalidated until it is rendered for the first time\n\t\tthis._inDOM = false; // A flag telling whether the UI5Element is currently in the DOM tree of the document or not\n\t\tthis._fullyConnected = false; // A flag telling whether the UI5Element's onEnterDOM hook was called (since it's possible to have the element removed from DOM before that)\n\t\tthis._childChangeListeners = new Map(); // used to store lazy listeners per slot for the child change event of every child inside that slot\n\t\tthis._slotChangeListeners = new Map(); // used to store lazy listeners per slot for the slotchange event of all slot children inside that slot\n\t\tthis._invalidationEventProvider = new EventProvider(); // used by parent components for listening to changes to child components\n\t\tthis._componentStateFinalizedEventProvider = new EventProvider(); // used by friend classes for synchronization\n\t\tlet deferredResolve;\n\t\tthis._domRefReadyPromise = new Promise(resolve => {\n\t\t\tdeferredResolve = resolve;\n\t\t});\n\t\tthis._domRefReadyPromise._deferredResolve = deferredResolve;\n\t\tthis._doNotSyncAttributes = new Set(); // attributes that are excluded from attributeChangedCallback synchronization\n\n\t\tthis._state = { ...ctor.getMetadata().getInitialState() };\n\n\t\tthis._upgradeAllProperties();\n\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tthis.attachShadow({ mode: \"open\" });\n\t\t}\n\t}\n\n\t/**\n\t * Returns a unique ID for this UI5 Element\n\t *\n\t * @deprecated - This property is not guaranteed in future releases\n\t * @protected\n\t */\n\tget _id() {\n\t\tif (!this.__id) {\n\t\t\tthis.__id = `ui5wc_${++autoId}`;\n\t\t}\n\n\t\treturn this.__id;\n\t}\n\n\trender() {\n\t\tconst template = (this.constructor as typeof UI5Element).template;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\trenderStatic() {\n\t\tconst template = (this.constructor as typeof UI5Element).staticAreaTemplate;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onEnterDOM\" only\n\t * @private\n\t */\n\tasync connectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tthis.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n\t\tif (ctor.getMetadata().supportsF6FastNavigation()) {\n\t\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t}\n\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = true;\n\n\t\tif (slotsAreManaged) {\n\t\t\t// always register the observer before yielding control to the main thread (await)\n\t\t\tthis._startObservingDOMChildren();\n\t\t\tawait this._processChildren();\n\t\t}\n\n\t\tif (!this._inDOM) { // Component removed from DOM while _processChildren was running\n\t\t\treturn;\n\t\t}\n\n\t\trenderImmediately(this);\n\t\tthis._domRefReadyPromise._deferredResolve!();\n\t\tthis._fullyConnected = true;\n\t\tthis.onEnterDOM();\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onExitDOM\" only\n\t * @private\n\t */\n\tdisconnectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = false;\n\n\t\tif (slotsAreManaged) {\n\t\t\tthis._stopObservingDOMChildren();\n\t\t}\n\n\t\tif (this._fullyConnected) {\n\t\t\tthis.onExitDOM();\n\t\t\tthis._fullyConnected = false;\n\t\t}\n\n\t\tif (this.staticAreaItem && this.staticAreaItem.parentElement) {\n\t\t\tthis.staticAreaItem.parentElement.removeChild(this.staticAreaItem);\n\t\t}\n\n\t\tcancelRender(this);\n\t}\n\n\t/**\n\t * Called every time before the component renders.\n\t * @public\n\t */\n\tonBeforeRendering(): void {}\n\n\t/**\n\t * Called every time after the component renders.\n\t * @public\n\t */\n\tonAfterRendering(): void {}\n\n\t/**\n\t * Called on connectedCallback - added to the DOM.\n\t * @public\n\t */\n\tonEnterDOM(): void {}\n\n\t/**\n\t * Called on disconnectedCallback - removed from the DOM.\n\t * @public\n\t */\n\tonExitDOM(): void {}\n\n\t/**\n\t * @private\n\t */\n\t_startObservingDOMChildren() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst metadata = ctor.getMetadata();\n\t\tconst shouldObserveChildren = metadata.hasSlots();\n\n\t\tif (!shouldObserveChildren) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canSlotText = metadata.canSlotText();\n\t\tconst hasClonedSlot = Object.keys(metadata.getSlots()).some(slotName => metadata.getSlots()[slotName].cloned);\n\t\tconst mutationObserverOptions = {\n\t\t\tchildList: true,\n\t\t\tsubtree: canSlotText || hasClonedSlot,\n\t\t\tcharacterData: canSlotText,\n\t\t};\n\t\tobserveDOMNode(this, this._processChildren.bind(this) as MutationCallback, mutationObserverOptions);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_stopObservingDOMChildren() {\n\t\tunobserveDOMNode(this);\n\t}\n\n\t/**\n\t * Note: this method is also manually called by \"compatibility/patchNodeValue.js\"\n\t * @private\n\t */\n\tasync _processChildren() {\n\t\tconst hasSlots = (this.constructor as typeof UI5Element).getMetadata().hasSlots();\n\t\tif (hasSlots) {\n\t\t\tawait this._updateSlots();\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tasync _updateSlots() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsMap = ctor.getMetadata().getSlots();\n\t\tconst canSlotText = ctor.getMetadata().canSlotText();\n\t\tconst domChildren = Array.from(canSlotText ? this.childNodes : this.children) as Array<Node>;\n\n\t\tconst slotsCachedContentMap = new Map<string, Array<SlotValue>>(); // Store here the content of each slot before the mutation occurred\n\t\tconst propertyNameToSlotMap = new Map<string, string>(); // Used for reverse lookup to determine to which slot the property name corresponds\n\n\t\t// Init the _state object based on the supported slots and store the previous values\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tpropertyNameToSlotMap.set(propertyName, slotName);\n\t\t\tslotsCachedContentMap.set(propertyName, [...(this._state[propertyName] as Array<SlotValue>)]);\n\t\t\tthis._clearSlot(slotName, slotData);\n\t\t}\n\n\t\tconst autoIncrementMap = new Map<string, number>();\n\t\tconst slottedChildrenMap = new Map<string, Array<{child: Node, idx: number }>>();\n\n\t\tconst allChildrenUpgraded = domChildren.map(async (child, idx) => {\n\t\t\t// Determine the type of the child (mainly by the slot attribute)\n\t\t\tconst slotName = getSlotName(child);\n\t\t\tconst slotData = slotsMap[slotName];\n\n\t\t\t// Check if the slotName is supported\n\t\t\tif (slotData === undefined) {\n\t\t\t\tif (slotName !== \"default\") {\n\t\t\t\t\tconst validValues = Object.keys(slotsMap).join(\", \");\n\t\t\t\t\tconsole.warn(`Unknown slotName: ${slotName}, ignoring`, child, `Valid values are: ${validValues}`); // eslint-disable-line\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For children that need individual slots, calculate them\n\t\t\tif (slotData.individualSlots) {\n\t\t\t\tconst nextIndex = (autoIncrementMap.get(slotName) || 0) + 1;\n\t\t\t\tautoIncrementMap.set(slotName, nextIndex);\n\t\t\t\t(child as Record<string, any>)._individualSlot = `${slotName}-${nextIndex}`;\n\t\t\t}\n\n\t\t\t// Await for not-yet-defined custom elements\n\t\t\tif (child instanceof HTMLElement) {\n\t\t\t\tconst localName = child.localName;\n\t\t\t\tconst shouldWaitForCustomElement = localName.includes(\"-\") && !shouldIgnoreCustomElement(localName);\n\n\t\t\t\tif (shouldWaitForCustomElement) {\n\t\t\t\t\tconst isDefined = customElements.get(localName);\n\t\t\t\t\tif (!isDefined) {\n\t\t\t\t\t\tconst whenDefinedPromise = customElements.whenDefined(localName); // Class registered, but instances not upgraded yet\n\t\t\t\t\t\tlet timeoutPromise = elementTimeouts.get(localName);\n\t\t\t\t\t\tif (!timeoutPromise) {\n\t\t\t\t\t\t\ttimeoutPromise = new Promise(resolve => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\telementTimeouts.set(localName, timeoutPromise);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait Promise.race([whenDefinedPromise, timeoutPromise]);\n\t\t\t\t\t}\n\t\t\t\t\tcustomElements.upgrade(child);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchild = (ctor.getMetadata().constructor as typeof UI5ElementMetadata).validateSlotValue(child, slotData);\n\n\t\t\t// Listen for any invalidation on the child if invalidateOnChildChange is true or an object (ignore when false or not set)\n\t\t\tif (instanceOfUI5Element(child) && slotData.invalidateOnChildChange) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Listen for the slotchange event if the child is a slot itself\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._attachSlotChange(child, slotName);\n\t\t\t}\n\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\n\t\t\tif (slottedChildrenMap.has(propertyName)) {\n\t\t\t\tslottedChildrenMap.get(propertyName)!.push({ child, idx });\n\t\t\t} else {\n\t\t\t\tslottedChildrenMap.set(propertyName, [{ child, idx }]);\n\t\t\t}\n\t\t});\n\n\t\tawait Promise.all(allChildrenUpgraded);\n\n\t\t// Distribute the child in the _state object, keeping the Light DOM order,\n\t\t// not the order elements are defined.\n\t\tslottedChildrenMap.forEach((children, propertyName) => {\n\t\t\tthis._state[propertyName] = children.sort((a, b) => a.idx - b.idx).map(_ => _.child);\n\t\t});\n\n\t\t// Compare the content of each slot with the cached values and invalidate for the ones that changed\n\t\tlet invalidated = false;\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tif (!arraysAreEqual(slotsCachedContentMap.get(propertyName)!, this._state[propertyName] as Array<SlotValue>)) {\n\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\ttype: \"slot\",\n\t\t\t\t\tname: propertyNameToSlotMap.get(propertyName)!,\n\t\t\t\t\treason: \"children\",\n\t\t\t\t});\n\t\t\t\tinvalidated = true;\n\t\t\t}\n\t\t}\n\n\t\t// If none of the slots had an invalidation due to changes to immediate children,\n\t\t// the change is considered to be text content of the default slot\n\t\tif (!invalidated) {\n\t\t\t_invalidate.call(this, {\n\t\t\t\ttype: \"slot\",\n\t\t\t\tname: \"default\",\n\t\t\t\treason: \"textcontent\",\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Removes all children from the slot and detaches listeners, if any\n\t * @private\n\t */\n\t_clearSlot(slotName: string, slotData: Slot) {\n\t\tconst propertyName = slotData.propertyName || slotName;\n\t\tconst children = this._state[propertyName] as Array<SlotValue>;\n\n\t\tchildren.forEach(child => {\n\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._detachSlotChange(child, slotName);\n\t\t\t}\n\t\t});\n\n\t\tthis._state[propertyName] = [];\n\t}\n\n\t/**\n\t * Attach a callback that will be executed whenever the component is invalidated\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tattachInvalidate(callback: (param: InvalidationInfo) => void): void {\n\t\tthis._invalidationEventProvider.attachEvent(\"invalidate\", callback);\n\t}\n\n\t/**\n\t * Detach the callback that is executed whenever the component is invalidated\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tdetachInvalidate(callback: (param: InvalidationInfo) => void): void {\n\t\tthis._invalidationEventProvider.detachEvent(\"invalidate\", callback);\n\t}\n\n\t/**\n\t * Callback that is executed whenever a monitored child changes its state\n\t *\n\t * @param slotName the slot in which a child was invalidated\n\t * @param childChangeInfo the changeInfo object for the child in the given slot\n\t * @private\n\t */\n\t_onChildChange(slotName: string, childChangeInfo: ChangeInfo) {\n\t\tif (!(this.constructor as typeof UI5Element).getMetadata().shouldInvalidateOnChildChange(slotName, childChangeInfo.type, childChangeInfo.name)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The component should be invalidated as this type of change on the child is listened for\n\t\t// However, no matter what changed on the child (property/slot), the invalidation is registered as \"type=slot\" for the component itself\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"childchange\",\n\t\t\tchild: childChangeInfo.target,\n\t\t});\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element\n\t * @private\n\t */\n\tattributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n\t\tlet newPropertyValue: PropertyValue;\n\t\tif (this._doNotSyncAttributes.has(name)) { // This attribute is mutated internally, not by the user\n\t\t\treturn;\n\t\t}\n\n\t\tconst properties = (this.constructor as typeof UI5Element).getMetadata().getProperties();\n\t\tconst realName = name.replace(/^ui5-/, \"\");\n\t\tconst nameInCamelCase = kebabToCamelCase(realName);\n\t\tif (properties.hasOwnProperty(nameInCamelCase)) { // eslint-disable-line\n\t\t\tconst propData = properties[nameInCamelCase];\n\t\t\tconst propertyType = propData.type;\n\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\n\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t}\n\n\t\t\tif (propertyValidator) {\n\t\t\t\tnewPropertyValue = propertyValidator.attributeToProperty(newValue);\n\t\t\t} else if (propertyType === Boolean) {\n\t\t\t\tnewPropertyValue = newValue !== null;\n\t\t\t} else {\n\t\t\t\tnewPropertyValue = newValue as string;\n\t\t\t}\n\n\t\t\t(this as Record<string, any>)[nameInCamelCase] = newPropertyValue;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_updateAttribute(name: string, newValue: PropertyValue) {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tif (!ctor.getMetadata().hasAttribute(name)) {\n\t\t\treturn;\n\t\t}\n\t\tconst properties = ctor.getMetadata().getProperties();\n\t\tconst propData = properties[name];\n\t\tconst propertyType = propData.type;\n\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\tconst attrName = camelToKebabCase(name);\n\t\tconst attrValue = this.getAttribute(attrName);\n\n\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t}\n\n\t\tif (propertyValidator) {\n\t\t\tconst newAttrValue = propertyValidator.propertyToAttribute(newValue);\n\t\t\tif (newAttrValue === null) { // null means there must be no attribute for the current value of the property\n\t\t\t\tthis._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute\n\t\t\t\tthis.removeAttribute(attrName); // remove the attribute safely (will not trigger synchronization to the property value due to the above line)\n\t\t\t\tthis._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute\n\t\t\t} else {\n\t\t\t\tthis.setAttribute(attrName, newAttrValue);\n\t\t\t}\n\t\t} else if (propertyType === Boolean) {\n\t\t\tif (newValue === true && attrValue === null) {\n\t\t\t\tthis.setAttribute(attrName, \"\");\n\t\t\t} else if (newValue === false && attrValue !== null) {\n\t\t\t\tthis.removeAttribute(attrName);\n\t\t\t}\n\t\t} else if (typeof newValue !== \"object\") {\n\t\t\tif (attrValue !== newValue) {\n\t\t\t\tthis.setAttribute(attrName, newValue as string);\n\t\t\t}\n\t\t} // else { return; } // old object handling\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeProperty(this: Record<string, any>, propertyName: string) {\n\t\tif (this.hasOwnProperty(propertyName)) { // eslint-disable-line\n\t\t\tconst value = this[propertyName];\n\t\t\tdelete this[propertyName];\n\t\t\tthis[propertyName] = value;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeAllProperties() {\n\t\tconst allProps = (this.constructor as typeof UI5Element).getMetadata().getPropertiesList();\n\t\tallProps.forEach(this._upgradeProperty.bind(this));\n\t}\n\n\t/**\n\t * Returns a singleton event listener for the \"change\" event of a child in a given slot\n\t *\n\t * @param slotName the name of the slot, where the child is\n\t * @private\n\t */\n\t_getChildChangeListener(slotName: string): ChildChangeListener {\n\t\tif (!this._childChangeListeners.has(slotName)) {\n\t\t\tthis._childChangeListeners.set(slotName, this._onChildChange.bind(this, slotName));\n\t\t}\n\t\treturn this._childChangeListeners.get(slotName)!;\n\t}\n\n\t/**\n\t * Returns a singleton slotchange event listener that invalidates the component due to changes in the given slot\n\t *\n\t * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is\n\t * @private\n\t */\n\t_getSlotChangeListener(slotName: string): SlotChangeListener {\n\t\tif (!this._slotChangeListeners.has(slotName)) {\n\t\t\tthis._slotChangeListeners.set(slotName, this._onSlotChange.bind(this, slotName));\n\t\t}\n\t\treturn this._slotChangeListeners.get(slotName)!;\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_attachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tconst slotChangeListener = this._getSlotChangeListener(slotName);\n\t\tif (slotChangeListener) {\n\t\t\tchild.addEventListener(\"slotchange\", slotChangeListener);\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_detachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tchild.removeEventListener(\"slotchange\", this._getSlotChangeListener(slotName));\n\t}\n\n\t/**\n\t * Whenever a slot element is slotted inside a UI5 Web Component, its slotchange event invalidates the component\n\t *\n\t * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is\n\t * @private\n\t */\n\t_onSlotChange(slotName: string) {\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"slotchange\",\n\t\t});\n\t}\n\n\t/**\n\t * A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)\n\t *\n\t * @param changeInfo An object with information about the change that caused invalidation.\n\t * The object can have the following properties:\n\t * - type: (property|slot) tells what caused the invalidation\n\t * 1) property: a property value was changed either directly or as a result of changing the corresponding attribute\n\t * 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\t *\n\t * - name: the name of the property or slot that caused the invalidation\n\t *\n\t * - reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot\n\t * 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot\n\t * 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\"\n\t * 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed.\n\t * Can only trigger if the child of a slot is a slot element itself.\n\t * 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component.\n\t * Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\t *\n\t * - newValue: the new value of the property (for type=\"property\" only)\n\t *\n\t * - oldValue: the old value of the property (for type=\"property\" only)\n\t *\n\t * - child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)\n\t *\n\t * @public\n\t */\n\tonInvalidation(changeInfo: ChangeInfo): void {} // eslint-disable-line\n\n\t/**\n\t * Do not call this method directly, only intended to be called by js\n\t * @protected\n\t */\n\t_render() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst hasIndividualSlots = ctor.getMetadata().hasIndividualSlots();\n\n\t\t// suppress invalidation to prevent state changes scheduling another rendering\n\t\tthis._suppressInvalidation = true;\n\n\t\tthis.onBeforeRendering();\n\n\t\t// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered\n\t\tthis._componentStateFinalizedEventProvider.fireEvent(\"componentStateFinalized\");\n\n\t\t// resume normal invalidation handling\n\t\tthis._suppressInvalidation = false;\n\n\t\t// Update the shadow root with the render result\n\t\t/*\n\t\tif (this._changedState.length) {\n\t\t\tlet element = this.localName;\n\t\t\tif (this.id) {\n\t\t\t\telement = `${element}#${this.id}`;\n\t\t\t}\n\t\t\tconsole.log(\"Re-rendering:\", element, this._changedState.map(x => { // eslint-disable-line\n\t\t\t\tlet res = `${x.type}`;\n\t\t\t\tif (x.reason) {\n\t\t\t\t\tres = `${res}(${x.reason})`;\n\t\t\t\t}\n\t\t\t\tres = `${res}: ${x.name}`;\n\t\t\t\tif (x.type === \"property\") {\n\t\t\t\t\tres = `${res} ${JSON.stringify(x.oldValue)} => ${JSON.stringify(x.newValue)}`;\n\t\t\t\t}\n\n\t\t\t\treturn res;\n\t\t\t}));\n\t\t}\n\t\t*/\n\t\tthis._changedState = [];\n\n\t\t// Update shadow root and static area item\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tupdateShadowRoot(this);\n\t\t}\n\t\tif (this.staticAreaItem) {\n\t\t\tthis.staticAreaItem.update();\n\t\t}\n\n\t\t// Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM\n\t\tif (hasIndividualSlots) {\n\t\t\tthis._assignIndividualSlotsToChildren();\n\t\t}\n\n\t\t// Call the onAfterRendering hook\n\t\tthis.onAfterRendering();\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_assignIndividualSlotsToChildren() {\n\t\tconst domChildren = Array.from(this.children);\n\n\t\tdomChildren.forEach((child: Record<string, any>) => {\n\t\t\tif (child._individualSlot) {\n\t\t\t\tchild.setAttribute(\"slot\", child._individualSlot);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_waitForDomRef() {\n\t\treturn this._domRefReadyPromise;\n\t}\n\n\t/**\n\t * Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n\t * *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\n\t * Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n\t *\n\t * @public\n\t */\n\tgetDomRef(): HTMLElement | undefined {\n\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\treturn this._getRealDomRef();\n\t\t}\n\n\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst children = [...this.shadowRoot.children].filter(child => ![\"link\", \"style\"].includes(child.localName));\n\t\tif (children.length !== 1) {\n\t\t\tconsole.warn(`The shadow DOM for ${(this.constructor as typeof UI5Element).getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line\n\t\t}\n\n\t\treturn children[0] as HTMLElement;\n\t}\n\n\t/**\n\t * Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\n\t * This is the element that will receive the focus by default.\n\t * @public\n\t */\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\tconst domRef = this.getDomRef();\n\t\tif (domRef) {\n\t\t\tconst focusRef = domRef.querySelector(\"[data-sap-focus-ref]\") as HTMLElement;\n\t\t\treturn focusRef || domRef;\n\t\t}\n\t}\n\n\t/**\n\t * Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\n\t * This is the element that will receive the focus by default.\n\t * @public\n\t */\n\tasync getFocusDomRefAsync(): Promise<HTMLElement | undefined> {\n\t\tawait this._waitForDomRef();\n\t\treturn this.getFocusDomRef();\n\t}\n\n\t/**\n\t * Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")\n\t * @param focusOptions additional options for the focus\n\t * @public\n\t */\n\tasync focus(focusOptions?: FocusOptions): Promise<void> {\n\t\tawait this._waitForDomRef();\n\n\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\tif (focusDomRef && typeof focusDomRef.focus === \"function\") {\n\t\t\tfocusDomRef.focus(focusOptions);\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @public\n\t * @param name - name of the event\n\t * @param data - additional data for the event\n\t * @param cancelable - true, if the user can call preventDefault on the event object\n\t * @param bubbles - true, if the event bubbles\n\t * @returns false, if the event was cancelled (preventDefault called), true otherwise\n\t */\n\tfireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true): boolean {\n\t\tconst eventResult = this._fireEvent(name, data, cancelable, bubbles);\n\t\tconst camelCaseEventName = kebabToCamelCase(name);\n\n\t\tif (camelCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(camelCaseEventName, data, cancelable, bubbles);\n\t\t}\n\n\t\treturn eventResult;\n\t}\n\n\t_fireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true) {\n\t\tconst noConflictEvent = new CustomEvent<T>(`ui5-${name}`, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the no-conflict event is prevented\n\t\tconst noConflictEventResult = this.dispatchEvent(noConflictEvent);\n\n\t\tif (skipOriginalEvent(name)) {\n\t\t\treturn noConflictEventResult;\n\t\t}\n\n\t\tconst normalEvent = new CustomEvent<T>(name, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the normal event is prevented\n\t\tconst normalEventResult = this.dispatchEvent(normalEvent);\n\n\t\t// Return false if any of the two events was prevented (its result was false).\n\t\treturn normalEventResult && noConflictEventResult;\n\t}\n\n\t/**\n\t * Returns the actual children, associated with a slot.\n\t * Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n\t * @public\n\t */\n\tgetSlottedNodes<T = Node>(slotName: string): Array<T> {\n\t\treturn getSlottedNodesList((this as unknown as Record<string, Array<SlotValue>>)[slotName]) as Array<T>;\n\t}\n\n\t/**\n\t * Attach a callback that will be executed whenever the component's state is finalized\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tattachComponentStateFinalized(callback: () => void): void {\n\t\tthis._componentStateFinalizedEventProvider.attachEvent(\"componentStateFinalized\", callback);\n\t}\n\n\t/**\n\t * Detach the callback that is executed whenever the component's state is finalized\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tdetachComponentStateFinalized(callback: () => void): void {\n\t\tthis._componentStateFinalizedEventProvider.detachEvent(\"componentStateFinalized\", callback);\n\t}\n\n\t/**\n\t * Determines whether the component should be rendered in RTL mode or not.\n\t * Returns: \"rtl\", \"ltr\" or undefined\n\t *\n\t * @public\n\t * @default undefined\n\t */\n\tget effectiveDir(): string | undefined {\n\t\tmarkAsRtlAware(this.constructor as typeof UI5Element); // if a UI5 Element calls this method, it's considered to be rtl-aware\n\t\treturn getEffectiveDir(this);\n\t}\n\n\t/**\n\t * Used to duck-type UI5 elements without using instanceof\n\t * @public\n\t * @default true\n\t */\n\tget isUI5Element(): boolean {\n\t\treturn true;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Returns the component accessibility info.\n\t * @private\n\t */\n\tget accessibilityInfo(): AccessibilityInfo {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element, use metadata properties instead\n\t * @private\n\t */\n\tstatic get observedAttributes() {\n\t\treturn this.getMetadata().getAttributesList();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsShadowDOM() {\n\t\treturn !!this.template || Object.prototype.hasOwnProperty.call(this.prototype, \"render\");\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsStaticArea() {\n\t\treturn !!this.staticAreaTemplate || Object.prototype.hasOwnProperty.call(this.prototype, \"renderStatic\");\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetStaticAreaItemDomRef(): Promise<ShadowRoot | null> {\n\t\tif (!(this.constructor as typeof UI5Element)._needsStaticArea()) {\n\t\t\tthrow new Error(\"This component does not use the static area\");\n\t\t}\n\n\t\tif (!this.staticAreaItem) {\n\t\t\tthis.staticAreaItem = StaticAreaItem.createInstance();\n\t\t\tthis.staticAreaItem.setOwnerElement(this);\n\t\t}\n\t\tif (!this.staticAreaItem.parentElement) {\n\t\t\tgetSingletonElementInstance(\"ui5-static-area\").appendChild(this.staticAreaItem);\n\t\t}\n\n\t\treturn this.staticAreaItem.getDomRef();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _generateAccessors() {\n\t\tconst proto = this.prototype;\n\t\tconst slotsAreManaged = this.getMetadata().slotsAreManaged();\n\n\t\t// Properties\n\t\tconst properties = this.getMetadata().getProperties();\n\t\tfor (const [prop, propData] of Object.entries(properties)) { // eslint-disable-line\n\t\t\tif (!isValidPropertyName(prop)) {\n\t\t\t\tconsole.warn(`\"${prop}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t}\n\n\t\t\tif (propData.type === Boolean && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All booleans are false by default.`);\n\t\t\t}\n\n\t\t\tif (propData.type === Array) {\n\t\t\t\tthrow new Error(`Wrong type for property \"${prop}\". Properties cannot be of type Array - use \"multiple: true\" and set \"type\" to the single value type, such as \"String\", \"Object\", etc...`);\n\t\t\t}\n\n\t\t\tif (propData.type === Object && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All properties of type \"Object\" are empty objects by default.`);\n\t\t\t}\n\n\t\t\tif (propData.multiple && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All multiple properties are empty arrays by default.`);\n\t\t\t}\n\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(proto, prop);\n\t\t\t// if the decorator is on a setter, proxy the new setter to it\n\t\t\tlet origSet: (v: any) => void;\n\t\t\tif (descriptor?.set) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\torigSet = descriptor.set;\n\t\t\t}\n\t\t\t// if the decorator is on a setter, there will be a corresponding getter - proxy the new getter to it\n\t\t\tlet origGet: () => PropertyValue;\n\t\t\tif (descriptor?.get) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\torigGet = descriptor.get;\n\t\t\t}\n\n\t\t\tObject.defineProperty(proto, prop, {\n\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\t// proxy the getter to the original accessor if there was one\n\t\t\t\t\tif (origGet) {\n\t\t\t\t\t\treturn origGet.call(this);\n\t\t\t\t\t}\n\t\t\t\t\tif (this._state[prop] !== undefined) {\n\t\t\t\t\t\treturn this._state[prop];\n\t\t\t\t\t}\n\n\t\t\t\t\tconst propDefaultValue = propData.defaultValue;\n\n\t\t\t\t\tif (propData.type === Boolean) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (propData.type === String) { // eslint-disable-line\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t} else if (propData.multiple) { // eslint-disable-line\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tset(this: UI5Element, value: PropertyValue) {\n\t\t\t\t\tlet isDifferent;\n\t\t\t\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\t\t\t\tconst metadataCtor = ctor.getMetadata().constructor as typeof UI5ElementMetadata;\n\n\t\t\t\t\tvalue = metadataCtor.validatePropertyValue(value, propData);\n\t\t\t\t\tconst propertyType = propData.type;\n\t\t\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\t\t\t\tconst oldState = origGet ? origGet.call(this) : this._state[prop];\n\n\t\t\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (propertyValidator) {\n\t\t\t\t\t\tisDifferent = !propertyValidator.valuesAreEqual(oldState, value);\n\t\t\t\t\t} else if (Array.isArray(oldState) && Array.isArray(value) && propData.multiple && propData.compareValues) { // compareValues is added for IE, test if needed now\n\t\t\t\t\t\tisDifferent = !arraysAreEqual(oldState, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisDifferent = oldState !== value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDifferent) {\n\t\t\t\t\t\t// if the decorator is on a setter, use it for storage\n\t\t\t\t\t\tif (origSet) {\n\t\t\t\t\t\t\torigSet.call(this, value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._state[prop] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\t\t\ttype: \"property\",\n\t\t\t\t\t\t\tname: prop,\n\t\t\t\t\t\t\tnewValue: value,\n\t\t\t\t\t\t\toldValue: oldState,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis._updateAttribute(prop, value);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\t// Slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getMetadata().getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries(slots)) { // eslint-disable-line\n\t\t\t\tif (!isValidPropertyName(slotName)) {\n\t\t\t\t\tconsole.warn(`\"${slotName}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t\t}\n\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tObject.defineProperty(proto, propertyName, {\n\t\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\t\tif (this._state[propertyName] !== undefined) {\n\t\t\t\t\t\t\treturn this._state[propertyName];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t},\n\t\t\t\t\tset() {\n\t\t\t\t\t\tthrow new Error(\"Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)\");\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the metadata object for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic metadata: Metadata = {};\n\n\t/**\n\t * Returns the CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic styles: ComponentStylesData = \"\";\n\n\t/**\n\t * Returns the Static Area CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic get staticAreaStyles(): ComponentStylesData {\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Returns an array with the dependencies for this UI5 Web Component, which could be:\n\t * - composed components (used in its shadow root or static area item)\n\t * - slotted components that the component may need to communicate with\n\t *\n\t * @protected\n\t */\n\tstatic get dependencies(): Array<typeof UI5Element> {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns a list of the unique dependencies for this UI5 Web Component\n\t *\n\t * @public\n\t */\n\tstatic getUniqueDependencies(this: typeof UI5Element): Array<typeof UI5Element> {\n\t\tif (!uniqueDependenciesCache.has(this)) {\n\t\t\tconst filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);\n\t\t\tuniqueDependenciesCache.set(this, filtered);\n\t\t}\n\n\t\treturn uniqueDependenciesCache.get(this) || [];\n\t}\n\n\t/**\n\t * Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved\n\t */\n\tstatic whenDependenciesDefined(): Promise<Array<typeof UI5Element>> {\n\t\treturn Promise.all(this.getUniqueDependencies().map(dep => dep.define()));\n\t}\n\n\t/**\n\t * Hook that will be called upon custom element definition\n\t *\n\t * @protected\n\t */\n\tstatic async onDefine(): Promise<void> {\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Registers a UI5 Web Component in the browser window object\n\t * @public\n\t */\n\tstatic async define(): Promise<typeof UI5Element> {\n\t\tawait boot();\n\n\t\tawait Promise.all([\n\t\t\tthis.whenDependenciesDefined(),\n\t\t\tthis.onDefine(),\n\t\t]);\n\n\t\tconst tag = this.getMetadata().getTag();\n\n\t\tconst definedLocally = isTagRegistered(tag);\n\t\tconst definedGlobally = customElements.get(tag);\n\n\t\tif (definedGlobally && !definedLocally) {\n\t\t\trecordTagRegistrationFailure(tag);\n\t\t} else if (!definedGlobally) {\n\t\t\tthis._generateAccessors();\n\t\t\tregisterTag(tag);\n\t\t\tcustomElements.define(tag, this as unknown as CustomElementConstructor);\n\t\t\tpreloadLinks(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\n\t * Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only\n\t * @public\n\t */\n\tstatic getMetadata(): UI5ElementMetadata {\n\t\tif (this.hasOwnProperty(\"_metadata\")) { // eslint-disable-line\n\t\t\treturn this._metadata;\n\t\t}\n\n\t\tconst metadataObjects = [this.metadata];\n\t\tlet klass = this; // eslint-disable-line\n\t\twhile (klass !== UI5Element) {\n\t\t\tklass = Object.getPrototypeOf(klass);\n\t\t\tmetadataObjects.unshift(klass.metadata);\n\t\t}\n\t\tconst mergedMetadata = merge({}, ...metadataObjects) as Metadata;\n\n\t\tthis._metadata = new UI5ElementMetadata(mergedMetadata);\n\t\treturn this._metadata;\n\t}\n}\n\n/**\n * Always use duck-typing to cover all runtimes on the page.\n */\nconst instanceOfUI5Element = (object: any): object is UI5Element => {\n\treturn \"isUI5Element\" in object;\n};\n\nexport default UI5Element;\nexport { instanceOfUI5Element };\nexport type {\n\tChangeInfo,\n\tRenderer,\n\tRendererOptions,\n};\n"]}
1
+ {"version":3,"file":"UI5Element.js","sourceRoot":"","sources":["../src/UI5Element.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,yCAAyC,CAAC;AACjD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,kBAMN,MAAM,yBAAyB,CAAC;A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I,mBAAQ,GAAa,EAAE,CAAC;AAE/B;;;GAGG;AACI,iBAAM,GAAwB,EAAE,CAAC;AA6FzC;;GAEG;AACH,MAAM,oBAAoB,GAAG,CAAC,MAAW,EAAwB,EAAE;IAClE,OAAO,cAAc,IAAI,MAAM,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EACN,oBAAoB,GACpB,CAAC","sourcesContent":["// eslint-disable-next-line import/no-extraneous-dependencies\nimport \"@ui5/webcomponents-base/dist/ssr-dom.js\";\nimport merge from \"./thirdparty/merge.js\";\nimport { boot } from \"./Boot.js\";\nimport UI5ElementMetadata, {\n\tSlot,\n\tSlotValue,\n\tState,\n\tPropertyValue,\n\tMetadata,\n} from \"./UI5ElementMetadata.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport updateShadowRoot from \"./updateShadowRoot.js\";\nimport { shouldIgnoreCustomElement } from \"./IgnoreCustomElements.js\";\nimport {\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n} from \"./Render.js\";\nimport { registerTag, isTagRegistered, recordTagRegistrationFailure } from \"./CustomElementsRegistry.js\";\nimport { observeDOMNode, unobserveDOMNode } from \"./DOMObserver.js\";\nimport { skipOriginalEvent } from \"./config/NoConflict.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport DataType from \"./types/DataType.js\";\nimport { kebabToCamelCase, camelToKebabCase } from \"./util/StringHelper.js\";\nimport isValidPropertyName from \"./util/isValidPropertyName.js\";\nimport { getSlotName, getSlottedNodesList } from \"./util/SlotsHelper.js\";\nimport arraysAreEqual from \"./util/arraysAreEqual.js\";\nimport { markAsRtlAware } from \"./locale/RTLAwareRegistry.js\";\nimport executeTemplate from \"./renderer/executeTemplate.js\";\nimport type { TemplateFunction, TemplateFunctionResult } from \"./renderer/executeTemplate.js\";\nimport type {\n\tAccessibilityInfo,\n\tPromiseResolve,\n\tComponentStylesData,\n\tClassMap,\n} from \"./types.js\";\n\nlet autoId = 0;\n\nconst elementTimeouts = new Map<string, Promise<void>>();\nconst uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();\n\ntype Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, options: RendererOptions) => void;\n\ntype RendererOptions = {\n\t/**\n\t * An object to use as the `this` value for event listeners. It's often\n\t * useful to set this to the host component rendering a template.\n\t */\n\thost?: object,\n}\n\ntype ChangeInfo = {\n\ttype: \"property\" | \"slot\",\n\tname: string,\n\treason?: string,\n\tchild?: SlotValue,\n\ttarget?: UI5Element,\n\tnewValue?: PropertyValue,\n\toldValue?: PropertyValue,\n}\n\ntype InvalidationInfo = ChangeInfo & { target: UI5Element };\n\ntype ChildChangeListener = (param: InvalidationInfo) => void;\n\ntype SlotChangeListener = (this: HTMLSlotElement, ev: Event) => void;\n\n/**\n * Triggers re-rendering of a UI5Element instance due to state change.\n * @param {ChangeInfo} changeInfo An object with information about the change that caused invalidation.\n * @private\n */\nfunction _invalidate(this: UI5Element, changeInfo: ChangeInfo) {\n\t// Invalidation should be suppressed: 1) before the component is rendered for the first time 2) and during the execution of onBeforeRendering\n\t// This is necessary not only as an optimization, but also to avoid infinite loops on invalidation between children and parents (when invalidateOnChildChange is used)\n\tif (this._suppressInvalidation) {\n\t\treturn;\n\t}\n\n\t// Call the onInvalidation hook\n\tthis.onInvalidation(changeInfo);\n\n\tthis._changedState.push(changeInfo);\n\trenderDeferred(this);\n\tthis._invalidationEventProvider.fireEvent(\"invalidate\", { ...changeInfo, target: this });\n}\n\n/**\n * looks up a property descsriptor including in the prototype chain\n * @param proto the starting prototype\n * @param name the property to look for\n * @returns the property descriptor if found directly or in the prototype chaing, undefined if not found\n */\nfunction getPropertyDescriptor(proto: any, name: PropertyKey): PropertyDescriptor | undefined {\n\tdo {\n\t\tconst descriptor = Object.getOwnPropertyDescriptor(proto, name);\n\t\tif (descriptor) {\n\t\t\treturn descriptor;\n\t\t}\n\t\t// go up the prototype chain\n\t\tproto = Object.getPrototypeOf(proto);\n\t} while (proto && proto !== HTMLElement.prototype);\n}\n\n/**\n * @class\n * Base class for all UI5 Web Components\n *\n * @extends HTMLElement\n * @public\n */\nabstract class UI5Element extends HTMLElement {\n\t__id?: string;\n\t_suppressInvalidation: boolean;\n\t_changedState: Array<ChangeInfo>;\n\t_invalidationEventProvider: EventProvider<InvalidationInfo, void>;\n\t_componentStateFinalizedEventProvider: EventProvider<void, void>;\n\t_inDOM: boolean;\n\t_fullyConnected: boolean;\n\t_childChangeListeners: Map<string, ChildChangeListener>;\n\t_slotChangeListeners: Map<string, SlotChangeListener>;\n\t_domRefReadyPromise: Promise<void> & { _deferredResolve?: PromiseResolve };\n\t_doNotSyncAttributes: Set<string>;\n\t_state: State;\n\t_getRealDomRef?: () => HTMLElement;\n\n\tstatic template?: TemplateFunction;\n\tstatic _metadata: UI5ElementMetadata;\n\n\tstatic renderer: Renderer;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tthis._changedState = []; // Filled on each invalidation, cleared on re-render (used for debugging)\n\t\tthis._suppressInvalidation = true; // A flag telling whether all invalidations should be ignored. Initialized with \"true\" because a UI5Element can not be invalidated until it is rendered for the first time\n\t\tthis._inDOM = false; // A flag telling whether the UI5Element is currently in the DOM tree of the document or not\n\t\tthis._fullyConnected = false; // A flag telling whether the UI5Element's onEnterDOM hook was called (since it's possible to have the element removed from DOM before that)\n\t\tthis._childChangeListeners = new Map(); // used to store lazy listeners per slot for the child change event of every child inside that slot\n\t\tthis._slotChangeListeners = new Map(); // used to store lazy listeners per slot for the slotchange event of all slot children inside that slot\n\t\tthis._invalidationEventProvider = new EventProvider(); // used by parent components for listening to changes to child components\n\t\tthis._componentStateFinalizedEventProvider = new EventProvider(); // used by friend classes for synchronization\n\t\tlet deferredResolve;\n\t\tthis._domRefReadyPromise = new Promise(resolve => {\n\t\t\tdeferredResolve = resolve;\n\t\t});\n\t\tthis._domRefReadyPromise._deferredResolve = deferredResolve;\n\t\tthis._doNotSyncAttributes = new Set(); // attributes that are excluded from attributeChangedCallback synchronization\n\n\t\tthis._state = { ...ctor.getMetadata().getInitialState() };\n\n\t\tthis._upgradeAllProperties();\n\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tconst defaultOptions = { mode: \"open\" } as ShadowRootInit;\n\t\t\tthis.attachShadow({ ...defaultOptions, ...ctor.getMetadata().getShadowRootOptions() });\n\t\t}\n\t}\n\n\t/**\n\t * Returns a unique ID for this UI5 Element\n\t *\n\t * @deprecated - This property is not guaranteed in future releases\n\t * @protected\n\t */\n\tget _id() {\n\t\tif (!this.__id) {\n\t\t\tthis.__id = `ui5wc_${++autoId}`;\n\t\t}\n\n\t\treturn this.__id;\n\t}\n\n\trender() {\n\t\tconst template = (this.constructor as typeof UI5Element).template;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onEnterDOM\" only\n\t * @private\n\t */\n\tasync connectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tthis.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n\t\tif (ctor.getMetadata().supportsF6FastNavigation()) {\n\t\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t}\n\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = true;\n\n\t\tif (slotsAreManaged) {\n\t\t\t// always register the observer before yielding control to the main thread (await)\n\t\t\tthis._startObservingDOMChildren();\n\t\t\tawait this._processChildren();\n\t\t}\n\n\t\tif (!this._inDOM) { // Component removed from DOM while _processChildren was running\n\t\t\treturn;\n\t\t}\n\n\t\trenderImmediately(this);\n\t\tthis._domRefReadyPromise._deferredResolve!();\n\t\tthis._fullyConnected = true;\n\t\tthis.onEnterDOM();\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onExitDOM\" only\n\t * @private\n\t */\n\tdisconnectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = false;\n\n\t\tif (slotsAreManaged) {\n\t\t\tthis._stopObservingDOMChildren();\n\t\t}\n\n\t\tif (this._fullyConnected) {\n\t\t\tthis.onExitDOM();\n\t\t\tthis._fullyConnected = false;\n\t\t}\n\n\t\tcancelRender(this);\n\t}\n\n\t/**\n\t * Called every time before the component renders.\n\t * @public\n\t */\n\tonBeforeRendering(): void {}\n\n\t/**\n\t * Called every time after the component renders.\n\t * @public\n\t */\n\tonAfterRendering(): void {}\n\n\t/**\n\t * Called on connectedCallback - added to the DOM.\n\t * @public\n\t */\n\tonEnterDOM(): void {}\n\n\t/**\n\t * Called on disconnectedCallback - removed from the DOM.\n\t * @public\n\t */\n\tonExitDOM(): void {}\n\n\t/**\n\t * @private\n\t */\n\t_startObservingDOMChildren() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst metadata = ctor.getMetadata();\n\t\tconst shouldObserveChildren = metadata.hasSlots();\n\n\t\tif (!shouldObserveChildren) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canSlotText = metadata.canSlotText();\n\t\tconst hasClonedSlot = Object.keys(metadata.getSlots()).some(slotName => metadata.getSlots()[slotName].cloned);\n\t\tconst mutationObserverOptions = {\n\t\t\tchildList: true,\n\t\t\tsubtree: canSlotText || hasClonedSlot,\n\t\t\tcharacterData: canSlotText,\n\t\t};\n\t\tobserveDOMNode(this, this._processChildren.bind(this) as MutationCallback, mutationObserverOptions);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_stopObservingDOMChildren() {\n\t\tunobserveDOMNode(this);\n\t}\n\n\t/**\n\t * Note: this method is also manually called by \"compatibility/patchNodeValue.js\"\n\t * @private\n\t */\n\tasync _processChildren() {\n\t\tconst hasSlots = (this.constructor as typeof UI5Element).getMetadata().hasSlots();\n\t\tif (hasSlots) {\n\t\t\tawait this._updateSlots();\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tasync _updateSlots() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsMap = ctor.getMetadata().getSlots();\n\t\tconst canSlotText = ctor.getMetadata().canSlotText();\n\t\tconst domChildren = Array.from(canSlotText ? this.childNodes : this.children) as Array<Node>;\n\n\t\tconst slotsCachedContentMap = new Map<string, Array<SlotValue>>(); // Store here the content of each slot before the mutation occurred\n\t\tconst propertyNameToSlotMap = new Map<string, string>(); // Used for reverse lookup to determine to which slot the property name corresponds\n\n\t\t// Init the _state object based on the supported slots and store the previous values\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tpropertyNameToSlotMap.set(propertyName, slotName);\n\t\t\tslotsCachedContentMap.set(propertyName, [...(this._state[propertyName] as Array<SlotValue>)]);\n\t\t\tthis._clearSlot(slotName, slotData);\n\t\t}\n\n\t\tconst autoIncrementMap = new Map<string, number>();\n\t\tconst slottedChildrenMap = new Map<string, Array<{child: Node, idx: number }>>();\n\n\t\tconst allChildrenUpgraded = domChildren.map(async (child, idx) => {\n\t\t\t// Determine the type of the child (mainly by the slot attribute)\n\t\t\tconst slotName = getSlotName(child);\n\t\t\tconst slotData = slotsMap[slotName];\n\n\t\t\t// Check if the slotName is supported\n\t\t\tif (slotData === undefined) {\n\t\t\t\tif (slotName !== \"default\") {\n\t\t\t\t\tconst validValues = Object.keys(slotsMap).join(\", \");\n\t\t\t\t\tconsole.warn(`Unknown slotName: ${slotName}, ignoring`, child, `Valid values are: ${validValues}`); // eslint-disable-line\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For children that need individual slots, calculate them\n\t\t\tif (slotData.individualSlots) {\n\t\t\t\tconst nextIndex = (autoIncrementMap.get(slotName) || 0) + 1;\n\t\t\t\tautoIncrementMap.set(slotName, nextIndex);\n\t\t\t\t(child as Record<string, any>)._individualSlot = `${slotName}-${nextIndex}`;\n\t\t\t}\n\n\t\t\t// Await for not-yet-defined custom elements\n\t\t\tif (child instanceof HTMLElement) {\n\t\t\t\tconst localName = child.localName;\n\t\t\t\tconst shouldWaitForCustomElement = localName.includes(\"-\") && !shouldIgnoreCustomElement(localName);\n\n\t\t\t\tif (shouldWaitForCustomElement) {\n\t\t\t\t\tconst isDefined = customElements.get(localName);\n\t\t\t\t\tif (!isDefined) {\n\t\t\t\t\t\tconst whenDefinedPromise = customElements.whenDefined(localName); // Class registered, but instances not upgraded yet\n\t\t\t\t\t\tlet timeoutPromise = elementTimeouts.get(localName);\n\t\t\t\t\t\tif (!timeoutPromise) {\n\t\t\t\t\t\t\ttimeoutPromise = new Promise(resolve => setTimeout(resolve, 1000));\n\t\t\t\t\t\t\telementTimeouts.set(localName, timeoutPromise);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait Promise.race([whenDefinedPromise, timeoutPromise]);\n\t\t\t\t\t}\n\t\t\t\t\tcustomElements.upgrade(child);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchild = (ctor.getMetadata().constructor as typeof UI5ElementMetadata).validateSlotValue(child, slotData);\n\n\t\t\t// Listen for any invalidation on the child if invalidateOnChildChange is true or an object (ignore when false or not set)\n\t\t\tif (instanceOfUI5Element(child) && slotData.invalidateOnChildChange) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Listen for the slotchange event if the child is a slot itself\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._attachSlotChange(child, slotName);\n\t\t\t}\n\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\n\t\t\tif (slottedChildrenMap.has(propertyName)) {\n\t\t\t\tslottedChildrenMap.get(propertyName)!.push({ child, idx });\n\t\t\t} else {\n\t\t\t\tslottedChildrenMap.set(propertyName, [{ child, idx }]);\n\t\t\t}\n\t\t});\n\n\t\tawait Promise.all(allChildrenUpgraded);\n\n\t\t// Distribute the child in the _state object, keeping the Light DOM order,\n\t\t// not the order elements are defined.\n\t\tslottedChildrenMap.forEach((children, propertyName) => {\n\t\t\tthis._state[propertyName] = children.sort((a, b) => a.idx - b.idx).map(_ => _.child);\n\t\t});\n\n\t\t// Compare the content of each slot with the cached values and invalidate for the ones that changed\n\t\tlet invalidated = false;\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tif (!arraysAreEqual(slotsCachedContentMap.get(propertyName)!, this._state[propertyName] as Array<SlotValue>)) {\n\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\ttype: \"slot\",\n\t\t\t\t\tname: propertyNameToSlotMap.get(propertyName)!,\n\t\t\t\t\treason: \"children\",\n\t\t\t\t});\n\t\t\t\tinvalidated = true;\n\t\t\t}\n\t\t}\n\n\t\t// If none of the slots had an invalidation due to changes to immediate children,\n\t\t// the change is considered to be text content of the default slot\n\t\tif (!invalidated) {\n\t\t\t_invalidate.call(this, {\n\t\t\t\ttype: \"slot\",\n\t\t\t\tname: \"default\",\n\t\t\t\treason: \"textcontent\",\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Removes all children from the slot and detaches listeners, if any\n\t * @private\n\t */\n\t_clearSlot(slotName: string, slotData: Slot) {\n\t\tconst propertyName = slotData.propertyName || slotName;\n\t\tconst children = this._state[propertyName] as Array<SlotValue>;\n\n\t\tchildren.forEach(child => {\n\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._detachSlotChange(child, slotName);\n\t\t\t}\n\t\t});\n\n\t\tthis._state[propertyName] = [];\n\t}\n\n\t/**\n\t * Attach a callback that will be executed whenever the component is invalidated\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tattachInvalidate(callback: (param: InvalidationInfo) => void): void {\n\t\tthis._invalidationEventProvider.attachEvent(\"invalidate\", callback);\n\t}\n\n\t/**\n\t * Detach the callback that is executed whenever the component is invalidated\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tdetachInvalidate(callback: (param: InvalidationInfo) => void): void {\n\t\tthis._invalidationEventProvider.detachEvent(\"invalidate\", callback);\n\t}\n\n\t/**\n\t * Callback that is executed whenever a monitored child changes its state\n\t *\n\t * @param slotName the slot in which a child was invalidated\n\t * @param childChangeInfo the changeInfo object for the child in the given slot\n\t * @private\n\t */\n\t_onChildChange(slotName: string, childChangeInfo: ChangeInfo) {\n\t\tif (!(this.constructor as typeof UI5Element).getMetadata().shouldInvalidateOnChildChange(slotName, childChangeInfo.type, childChangeInfo.name)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The component should be invalidated as this type of change on the child is listened for\n\t\t// However, no matter what changed on the child (property/slot), the invalidation is registered as \"type=slot\" for the component itself\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"childchange\",\n\t\t\tchild: childChangeInfo.target,\n\t\t});\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element\n\t * @private\n\t */\n\tattributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n\t\tlet newPropertyValue: PropertyValue;\n\t\tif (this._doNotSyncAttributes.has(name)) { // This attribute is mutated internally, not by the user\n\t\t\treturn;\n\t\t}\n\n\t\tconst properties = (this.constructor as typeof UI5Element).getMetadata().getProperties();\n\t\tconst realName = name.replace(/^ui5-/, \"\");\n\t\tconst nameInCamelCase = kebabToCamelCase(realName);\n\t\tif (properties.hasOwnProperty(nameInCamelCase)) { // eslint-disable-line\n\t\t\tconst propData = properties[nameInCamelCase];\n\t\t\tconst propertyType = propData.type;\n\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\n\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t}\n\n\t\t\tif (propertyValidator) {\n\t\t\t\tnewPropertyValue = propertyValidator.attributeToProperty(newValue);\n\t\t\t} else if (propertyType === Boolean) {\n\t\t\t\tnewPropertyValue = newValue !== null;\n\t\t\t} else {\n\t\t\t\tnewPropertyValue = newValue as string;\n\t\t\t}\n\n\t\t\t(this as Record<string, any>)[nameInCamelCase] = newPropertyValue;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_updateAttribute(name: string, newValue: PropertyValue) {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tif (!ctor.getMetadata().hasAttribute(name)) {\n\t\t\treturn;\n\t\t}\n\t\tconst properties = ctor.getMetadata().getProperties();\n\t\tconst propData = properties[name];\n\t\tconst propertyType = propData.type;\n\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\tconst attrName = camelToKebabCase(name);\n\t\tconst attrValue = this.getAttribute(attrName);\n\n\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t}\n\n\t\tif (propertyValidator) {\n\t\t\tconst newAttrValue = propertyValidator.propertyToAttribute(newValue);\n\t\t\tif (newAttrValue === null) { // null means there must be no attribute for the current value of the property\n\t\t\t\tthis._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute\n\t\t\t\tthis.removeAttribute(attrName); // remove the attribute safely (will not trigger synchronization to the property value due to the above line)\n\t\t\t\tthis._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute\n\t\t\t} else {\n\t\t\t\tthis.setAttribute(attrName, newAttrValue);\n\t\t\t}\n\t\t} else if (propertyType === Boolean) {\n\t\t\tif (newValue === true && attrValue === null) {\n\t\t\t\tthis.setAttribute(attrName, \"\");\n\t\t\t} else if (newValue === false && attrValue !== null) {\n\t\t\t\tthis.removeAttribute(attrName);\n\t\t\t}\n\t\t} else if (typeof newValue !== \"object\") {\n\t\t\tif (attrValue !== newValue) {\n\t\t\t\tthis.setAttribute(attrName, newValue as string);\n\t\t\t}\n\t\t} // else { return; } // old object handling\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeProperty(this: Record<string, any>, propertyName: string) {\n\t\tif (this.hasOwnProperty(propertyName)) { // eslint-disable-line\n\t\t\tconst value = this[propertyName];\n\t\t\tdelete this[propertyName];\n\t\t\tthis[propertyName] = value;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeAllProperties() {\n\t\tconst allProps = (this.constructor as typeof UI5Element).getMetadata().getPropertiesList();\n\t\tallProps.forEach(this._upgradeProperty.bind(this));\n\t}\n\n\t/**\n\t * Returns a singleton event listener for the \"change\" event of a child in a given slot\n\t *\n\t * @param slotName the name of the slot, where the child is\n\t * @private\n\t */\n\t_getChildChangeListener(slotName: string): ChildChangeListener {\n\t\tif (!this._childChangeListeners.has(slotName)) {\n\t\t\tthis._childChangeListeners.set(slotName, this._onChildChange.bind(this, slotName));\n\t\t}\n\t\treturn this._childChangeListeners.get(slotName)!;\n\t}\n\n\t/**\n\t * Returns a singleton slotchange event listener that invalidates the component due to changes in the given slot\n\t *\n\t * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is\n\t * @private\n\t */\n\t_getSlotChangeListener(slotName: string): SlotChangeListener {\n\t\tif (!this._slotChangeListeners.has(slotName)) {\n\t\t\tthis._slotChangeListeners.set(slotName, this._onSlotChange.bind(this, slotName));\n\t\t}\n\t\treturn this._slotChangeListeners.get(slotName)!;\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_attachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tconst slotChangeListener = this._getSlotChangeListener(slotName);\n\t\tif (slotChangeListener) {\n\t\t\tchild.addEventListener(\"slotchange\", slotChangeListener);\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_detachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tchild.removeEventListener(\"slotchange\", this._getSlotChangeListener(slotName));\n\t}\n\n\t/**\n\t * Whenever a slot element is slotted inside a UI5 Web Component, its slotchange event invalidates the component\n\t *\n\t * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is\n\t * @private\n\t */\n\t_onSlotChange(slotName: string) {\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"slotchange\",\n\t\t});\n\t}\n\n\t/**\n\t * A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)\n\t *\n\t * @param changeInfo An object with information about the change that caused invalidation.\n\t * The object can have the following properties:\n\t * - type: (property|slot) tells what caused the invalidation\n\t * 1) property: a property value was changed either directly or as a result of changing the corresponding attribute\n\t * 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\t *\n\t * - name: the name of the property or slot that caused the invalidation\n\t *\n\t * - reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot\n\t * 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot\n\t * 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\"\n\t * 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed.\n\t *\t Can only trigger if the child of a slot is a slot element itself.\n\t * 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component.\n\t *\t Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\t *\n\t * - newValue: the new value of the property (for type=\"property\" only)\n\t *\n\t * - oldValue: the old value of the property (for type=\"property\" only)\n\t *\n\t * - child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)\n\t *\n\t * @public\n\t */\n\tonInvalidation(changeInfo: ChangeInfo): void {} // eslint-disable-line\n\n\t/**\n\t * Do not call this method directly, only intended to be called by js\n\t * @protected\n\t */\n\t_render() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst hasIndividualSlots = ctor.getMetadata().hasIndividualSlots();\n\n\t\t// suppress invalidation to prevent state changes scheduling another rendering\n\t\tthis._suppressInvalidation = true;\n\n\t\tthis.onBeforeRendering();\n\n\t\t// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered\n\t\tthis._componentStateFinalizedEventProvider.fireEvent(\"componentStateFinalized\");\n\n\t\t// resume normal invalidation handling\n\t\tthis._suppressInvalidation = false;\n\n\t\t// Update the shadow root with the render result\n\t\t/*\n\t\tif (this._changedState.length) {\n\t\t\tlet element = this.localName;\n\t\t\tif (this.id) {\n\t\t\t\telement = `${element}#${this.id}`;\n\t\t\t}\n\t\t\tconsole.log(\"Re-rendering:\", element, this._changedState.map(x => { // eslint-disable-line\n\t\t\t\tlet res = `${x.type}`;\n\t\t\t\tif (x.reason) {\n\t\t\t\t\tres = `${res}(${x.reason})`;\n\t\t\t\t}\n\t\t\t\tres = `${res}: ${x.name}`;\n\t\t\t\tif (x.type === \"property\") {\n\t\t\t\t\tres = `${res} ${JSON.stringify(x.oldValue)} => ${JSON.stringify(x.newValue)}`;\n\t\t\t\t}\n\n\t\t\t\treturn res;\n\t\t\t}));\n\t\t}\n\t\t*/\n\t\tthis._changedState = [];\n\n\t\t// Update shadow root and static area item\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tupdateShadowRoot(this);\n\t\t}\n\n\t\t// Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM\n\t\tif (hasIndividualSlots) {\n\t\t\tthis._assignIndividualSlotsToChildren();\n\t\t}\n\n\t\t// Call the onAfterRendering hook\n\t\tthis.onAfterRendering();\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_assignIndividualSlotsToChildren() {\n\t\tconst domChildren = Array.from(this.children);\n\n\t\tdomChildren.forEach((child: Record<string, any>) => {\n\t\t\tif (child._individualSlot) {\n\t\t\t\tchild.setAttribute(\"slot\", child._individualSlot);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_waitForDomRef() {\n\t\treturn this._domRefReadyPromise;\n\t}\n\n\t/**\n\t * Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n\t * *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\n\t * Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n\t *\n\t * @public\n\t */\n\tgetDomRef(): HTMLElement | undefined {\n\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\treturn this._getRealDomRef();\n\t\t}\n\n\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.shadowRoot.children[0] as HTMLElement;\n\t}\n\n\t/**\n\t * Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\n\t * This is the element that will receive the focus by default.\n\t * @public\n\t */\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\tconst domRef = this.getDomRef();\n\t\tif (domRef) {\n\t\t\tconst focusRef = domRef.querySelector(\"[data-sap-focus-ref]\") as HTMLElement;\n\t\t\treturn focusRef || domRef;\n\t\t}\n\t}\n\n\t/**\n\t * Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\n\t * This is the element that will receive the focus by default.\n\t * @public\n\t */\n\tasync getFocusDomRefAsync(): Promise<HTMLElement | undefined> {\n\t\tawait this._waitForDomRef();\n\t\treturn this.getFocusDomRef();\n\t}\n\n\t/**\n\t * Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")\n\t * @param focusOptions additional options for the focus\n\t * @public\n\t */\n\tasync focus(focusOptions?: FocusOptions): Promise<void> {\n\t\tawait this._waitForDomRef();\n\n\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\tif (focusDomRef && typeof focusDomRef.focus === \"function\") {\n\t\t\tfocusDomRef.focus(focusOptions);\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @public\n\t * @param name - name of the event\n\t * @param data - additional data for the event\n\t * @param cancelable - true, if the user can call preventDefault on the event object\n\t * @param bubbles - true, if the event bubbles\n\t * @returns false, if the event was cancelled (preventDefault called), true otherwise\n\t */\n\tfireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true): boolean {\n\t\tconst eventResult = this._fireEvent(name, data, cancelable, bubbles);\n\t\tconst camelCaseEventName = kebabToCamelCase(name);\n\n\t\tif (camelCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(camelCaseEventName, data, cancelable, bubbles);\n\t\t}\n\n\t\treturn eventResult;\n\t}\n\n\t_fireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true) {\n\t\tconst noConflictEvent = new CustomEvent<T>(`ui5-${name}`, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the no-conflict event is prevented\n\t\tconst noConflictEventResult = this.dispatchEvent(noConflictEvent);\n\n\t\tif (skipOriginalEvent(name)) {\n\t\t\treturn noConflictEventResult;\n\t\t}\n\n\t\tconst normalEvent = new CustomEvent<T>(name, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the normal event is prevented\n\t\tconst normalEventResult = this.dispatchEvent(normalEvent);\n\n\t\t// Return false if any of the two events was prevented (its result was false).\n\t\treturn normalEventResult && noConflictEventResult;\n\t}\n\n\t/**\n\t * Returns the actual children, associated with a slot.\n\t * Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n\t * @public\n\t */\n\tgetSlottedNodes<T = Node>(slotName: string): Array<T> {\n\t\treturn getSlottedNodesList((this as unknown as Record<string, Array<SlotValue>>)[slotName]) as Array<T>;\n\t}\n\n\t/**\n\t * Attach a callback that will be executed whenever the component's state is finalized\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tattachComponentStateFinalized(callback: () => void): void {\n\t\tthis._componentStateFinalizedEventProvider.attachEvent(\"componentStateFinalized\", callback);\n\t}\n\n\t/**\n\t * Detach the callback that is executed whenever the component's state is finalized\n\t *\n\t * @param callback\n\t * @public\n\t */\n\tdetachComponentStateFinalized(callback: () => void): void {\n\t\tthis._componentStateFinalizedEventProvider.detachEvent(\"componentStateFinalized\", callback);\n\t}\n\n\t/**\n\t * Determines whether the component should be rendered in RTL mode or not.\n\t * Returns: \"rtl\", \"ltr\" or undefined\n\t *\n\t * @public\n\t * @default undefined\n\t */\n\tget effectiveDir(): string | undefined {\n\t\tmarkAsRtlAware(this.constructor as typeof UI5Element); // if a UI5 Element calls this method, it's considered to be rtl-aware\n\t\treturn getEffectiveDir(this);\n\t}\n\n\t/**\n\t * Used to duck-type UI5 elements without using instanceof\n\t * @public\n\t * @default true\n\t */\n\tget isUI5Element(): boolean {\n\t\treturn true;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Returns the component accessibility info.\n\t * @private\n\t */\n\tget accessibilityInfo(): AccessibilityInfo {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element, use metadata properties instead\n\t * @private\n\t */\n\tstatic get observedAttributes() {\n\t\treturn this.getMetadata().getAttributesList();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsShadowDOM() {\n\t\treturn !!this.template || Object.prototype.hasOwnProperty.call(this.prototype, \"render\");\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _generateAccessors() {\n\t\tconst proto = this.prototype;\n\t\tconst slotsAreManaged = this.getMetadata().slotsAreManaged();\n\n\t\t// Properties\n\t\tconst properties = this.getMetadata().getProperties();\n\t\tfor (const [prop, propData] of Object.entries(properties)) { // eslint-disable-line\n\t\t\tif (!isValidPropertyName(prop)) {\n\t\t\t\tconsole.warn(`\"${prop}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t}\n\n\t\t\tif (propData.type === Boolean && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All booleans are false by default.`);\n\t\t\t}\n\n\t\t\tif (propData.type === Array) {\n\t\t\t\tthrow new Error(`Wrong type for property \"${prop}\". Properties cannot be of type Array - use \"multiple: true\" and set \"type\" to the single value type, such as \"String\", \"Object\", etc...`);\n\t\t\t}\n\n\t\t\tif (propData.type === Object && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All properties of type \"Object\" are empty objects by default.`);\n\t\t\t}\n\n\t\t\tif (propData.multiple && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All multiple properties are empty arrays by default.`);\n\t\t\t}\n\n\t\t\tconst descriptor = getPropertyDescriptor(proto, prop);\n\t\t\t// if the decorator is on a setter, proxy the new setter to it\n\t\t\tlet origSet: (v: any) => void;\n\t\t\tif (descriptor?.set) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\torigSet = descriptor.set;\n\t\t\t}\n\t\t\t// if the decorator is on a setter, there will be a corresponding getter - proxy the new getter to it\n\t\t\tlet origGet: () => PropertyValue;\n\t\t\tif (descriptor?.get) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/unbound-method\n\t\t\t\torigGet = descriptor.get;\n\t\t\t}\n\n\t\t\tObject.defineProperty(proto, prop, {\n\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\t// proxy the getter to the original accessor if there was one\n\t\t\t\t\tif (origGet) {\n\t\t\t\t\t\treturn origGet.call(this);\n\t\t\t\t\t}\n\t\t\t\t\tif (this._state[prop] !== undefined) {\n\t\t\t\t\t\treturn this._state[prop];\n\t\t\t\t\t}\n\n\t\t\t\t\tconst propDefaultValue = propData.defaultValue;\n\n\t\t\t\t\tif (propData.type === Boolean) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (propData.type === String) { // eslint-disable-line\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t} else if (propData.multiple) { // eslint-disable-line\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tset(this: UI5Element, value: PropertyValue) {\n\t\t\t\t\tlet isDifferent;\n\t\t\t\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\t\t\t\tconst metadataCtor = ctor.getMetadata().constructor as typeof UI5ElementMetadata;\n\n\t\t\t\t\tvalue = metadataCtor.validatePropertyValue(value, propData);\n\t\t\t\t\tconst propertyType = propData.type;\n\t\t\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\t\t\t\tconst oldState = origGet ? origGet.call(this) : this._state[prop];\n\n\t\t\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (propertyValidator) {\n\t\t\t\t\t\tisDifferent = !propertyValidator.valuesAreEqual(oldState, value);\n\t\t\t\t\t} else if (Array.isArray(oldState) && Array.isArray(value) && propData.multiple && propData.compareValues) { // compareValues is added for IE, test if needed now\n\t\t\t\t\t\tisDifferent = !arraysAreEqual(oldState, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisDifferent = oldState !== value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDifferent) {\n\t\t\t\t\t\t// if the decorator is on a setter, use it for storage\n\t\t\t\t\t\tif (origSet) {\n\t\t\t\t\t\t\torigSet.call(this, value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._state[prop] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\t\t\ttype: \"property\",\n\t\t\t\t\t\t\tname: prop,\n\t\t\t\t\t\t\tnewValue: value,\n\t\t\t\t\t\t\toldValue: oldState,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis._updateAttribute(prop, value);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\t// Slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getMetadata().getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries(slots)) { // eslint-disable-line\n\t\t\t\tif (!isValidPropertyName(slotName)) {\n\t\t\t\t\tconsole.warn(`\"${slotName}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t\t}\n\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tObject.defineProperty(proto, propertyName, {\n\t\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\t\tif (this._state[propertyName] !== undefined) {\n\t\t\t\t\t\t\treturn this._state[propertyName];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t},\n\t\t\t\t\tset() {\n\t\t\t\t\t\tthrow new Error(\"Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)\");\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the metadata object for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic metadata: Metadata = {};\n\n\t/**\n\t * Returns the CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic styles: ComponentStylesData = \"\";\n\n\t/**\n\t * Returns an array with the dependencies for this UI5 Web Component, which could be:\n\t * - composed components (used in its shadow root or static area item)\n\t * - slotted components that the component may need to communicate with\n\t *\n\t * @protected\n\t */\n\tstatic get dependencies(): Array<typeof UI5Element> {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns a list of the unique dependencies for this UI5 Web Component\n\t *\n\t * @public\n\t */\n\tstatic getUniqueDependencies(this: typeof UI5Element): Array<typeof UI5Element> {\n\t\tif (!uniqueDependenciesCache.has(this)) {\n\t\t\tconst filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);\n\t\t\tuniqueDependenciesCache.set(this, filtered);\n\t\t}\n\n\t\treturn uniqueDependenciesCache.get(this) || [];\n\t}\n\n\t/**\n\t * Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved\n\t */\n\tstatic whenDependenciesDefined(): Promise<Array<typeof UI5Element>> {\n\t\treturn Promise.all(this.getUniqueDependencies().map(dep => dep.define()));\n\t}\n\n\t/**\n\t * Hook that will be called upon custom element definition\n\t *\n\t * @protected\n\t */\n\tstatic async onDefine(): Promise<void> {\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Registers a UI5 Web Component in the browser window object\n\t * @public\n\t */\n\tstatic async define(): Promise<typeof UI5Element> {\n\t\tawait boot();\n\n\t\tawait Promise.all([\n\t\t\tthis.whenDependenciesDefined(),\n\t\t\tthis.onDefine(),\n\t\t]);\n\n\t\tconst tag = this.getMetadata().getTag();\n\n\t\tconst definedLocally = isTagRegistered(tag);\n\t\tconst definedGlobally = customElements.get(tag);\n\n\t\tif (definedGlobally && !definedLocally) {\n\t\t\trecordTagRegistrationFailure(tag);\n\t\t} else if (!definedGlobally) {\n\t\t\tthis._generateAccessors();\n\t\t\tregisterTag(tag);\n\t\t\tcustomElements.define(tag, this as unknown as CustomElementConstructor);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\n\t * Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only\n\t * @public\n\t */\n\tstatic getMetadata(): UI5ElementMetadata {\n\t\tif (this.hasOwnProperty(\"_metadata\")) { // eslint-disable-line\n\t\t\treturn this._metadata;\n\t\t}\n\n\t\tconst metadataObjects = [this.metadata];\n\t\tlet klass = this; // eslint-disable-line\n\t\twhile (klass !== UI5Element) {\n\t\t\tklass = Object.getPrototypeOf(klass);\n\t\t\tmetadataObjects.unshift(klass.metadata);\n\t\t}\n\t\tconst mergedMetadata = merge({}, ...metadataObjects) as Metadata;\n\n\t\tthis._metadata = new UI5ElementMetadata(mergedMetadata);\n\t\treturn this._metadata;\n\t}\n}\n\n/**\n * Always use duck-typing to cover all runtimes on the page.\n */\nconst instanceOfUI5Element = (object: any): object is UI5Element => {\n\treturn \"isUI5Element\" in object;\n};\n\nexport default UI5Element;\nexport {\n\tinstanceOfUI5Element,\n};\nexport type {\n\tChangeInfo,\n\tRenderer,\n\tRendererOptions,\n};\n"]}
@@ -31,6 +31,7 @@ type Metadata = {
31
31
  fastNavigation?: boolean;
32
32
  themeAware?: boolean;
33
33
  languageAware?: boolean;
34
+ shadowRootOptions?: Partial<ShadowRootInit>;
34
35
  };
35
36
  type State = Record<string, PropertyValue | Array<SlotValue>>;
36
37
  /**
@@ -129,6 +130,7 @@ declare class UI5ElementMetadata {
129
130
  * Determines whether this UI5 Element has any theme dependant carachteristics.
130
131
  */
131
132
  isThemeAware(): boolean;
133
+ getShadowRootOptions(): Partial<ShadowRootInit>;
132
134
  /**
133
135
  * Matches a changed entity (property/slot) with the given name against the "invalidateOnChildChange" configuration
134
136
  * and determines whether this should cause and invalidation
@@ -203,6 +203,9 @@ class UI5ElementMetadata {
203
203
  isThemeAware() {
204
204
  return !!this.metadata.themeAware;
205
205
  }
206
+ getShadowRootOptions() {
207
+ return this.metadata.shadowRootOptions || {};
208
+ }
206
209
  /**
207
210
  * Matches a changed entity (property/slot) with the given name against the "invalidateOnChildChange" configuration
208
211
  * and determines whether this should cause and invalidation
@@ -1 +1 @@
1
- {"version":3,"file":"UI5ElementMetadata.js","sourceRoot":"","sources":["../src/UI5ElementMetadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AA4ChF;;;GAGG;AACH,MAAM,kBAAkB;IAIvB,YAAY,QAAkB;QAC7B,IAAI,CAAC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AE,EAAE;IAC1D,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QAC5C,IAAI,CAAC,CAAC,EAAE,YAAY,QAAQ,CAAC,IAAI,CAAC,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SAC1E;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import DataType from \"./types/DataType.js\";\nimport { camelToKebabCase } from \"./util/StringHelper.js\";\nimport { getSlottedNodes } from \"./util/SlotsHelper.js\";\nimport { getEffectiveScopingSuffixForTag } from \"./CustomElementsScopeUtils.js\";\n\ntype SlotInvalidation = {\n\tproperties: boolean | Array<string>,\n\tslots: boolean | Array<string>,\n}\n\ntype Slot = {\n\ttype: typeof Node | typeof HTMLElement,\n\tdefault?: boolean,\n\tpropertyName?: string,\n\tindividualSlots?: boolean,\n\tinvalidateOnChildChange?: boolean | SlotInvalidation,\n\tcloned?: boolean,\n};\n\ntype SlotValue = Node;\n\ntype Property = {\n\ttype?: BooleanConstructor | StringConstructor | ObjectConstructor | DataType\n\tvalidator?: DataType,\n\tdefaultValue?: PropertyValue,\n\tnoAttribute?: boolean,\n\tmultiple?: boolean,\n\tcompareValues?: boolean,\n}\n\ntype PropertyValue = boolean | number | string | object | undefined | null | DataType;\n\ntype EventData = Record<string, object>;\n\ntype Metadata = {\n\ttag?: string,\n\tmanagedSlots?: boolean,\n\tproperties?: Record<string, Property>,\n\tslots?: Record<string, Slot>,\n\tevents?: EventData,\n\tfastNavigation?: boolean,\n\tthemeAware?: boolean,\n\tlanguageAware?: boolean,\n};\n\ntype State = Record<string, PropertyValue | Array<SlotValue>>;\n\n/**\n * @class\n * @public\n */\nclass UI5ElementMetadata {\n\tmetadata: Metadata;\n\t_initialState: State | undefined;\n\n\tconstructor(metadata: Metadata) {\n\t\tthis.metadata = metadata;\n\t}\n\n\tgetInitialState() {\n\t\tif (Object.prototype.hasOwnProperty.call(this, \"_initialState\")) {\n\t\t\treturn this._initialState!;\n\t\t}\n\t\tconst initialState: State = {};\n\t\tconst slotsAreManaged = this.slotsAreManaged();\n\n\t\t// Initialize properties\n\t\tconst props = this.getProperties();\n\t\tfor (const propName in props) { // eslint-disable-line\n\t\t\tconst propType = props[propName].type;\n\t\t\tconst propDefaultValue = props[propName].defaultValue;\n\n\t\t\tif (propType === Boolean) {\n\t\t\t\tinitialState[propName] = false;\n\n\t\t\t\tif (propDefaultValue !== undefined) {\n\t\t\t\t\tconsole.warn(\"The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default\"); // eslint-disable-line\n\t\t\t\t}\n\t\t\t} else if (props[propName].multiple) {\n\t\t\t\tObject.defineProperty(initialState, propName, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget() {\n\t\t\t\t\t return [];\n\t\t\t\t\t},\n\t\t\t\t });\n\t\t\t} else if (propType === Object) {\n\t\t\t\tObject.defineProperty(initialState, propName, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget() {\n\t\t\t\t\t return \"defaultValue\" in props[propName] ? props[propName].defaultValue : {};\n\t\t\t\t\t},\n\t\t\t\t });\n\t\t\t} else if (propType === String) {\n\t\t\t\tinitialState[propName] = \"defaultValue\" in props[propName] ? props[propName].defaultValue : \"\";\n\t\t\t} else {\n\t\t\t\tinitialState[propName] = propDefaultValue;\n\t\t\t}\n\t\t}\n\n\t\t// Initialize slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries<Slot>(slots)) { // eslint-disable-line\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tinitialState[propertyName] = [];\n\t\t\t}\n\t\t}\n\n\t\tthis._initialState = initialState;\n\t\treturn initialState;\n\t}\n\n\t/**\n\t * Validates the property's value and returns it if correct\n\t * or returns the default value if not.\n\t * **Note:** Only intended for use by UI5Element.js\n\t * @public\n\t */\n\tstatic validatePropertyValue(value: PropertyValue, propData: Property): PropertyValue {\n\t\tconst isMultiple = propData.multiple;\n\t\tif (isMultiple && value) {\n\t\t\treturn (value as Array<PropertyValue>).map((propValue: PropertyValue) => validateSingleProperty(propValue, propData));\n\t\t}\n\t\treturn validateSingleProperty(value, propData);\n\t}\n\n\t/**\n\t * Validates the slot's value and returns it if correct\n\t * or throws an exception if not.\n\t * **Note:** Only intended for use by UI5Element.js\n\t * @public\n\t */\n\tstatic validateSlotValue(value: Node, slotData: Slot): Node {\n\t\treturn validateSingleSlot(value, slotData);\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element without the scope\n\t * @public\n\t */\n\tgetPureTag(): string {\n\t\treturn this.metadata.tag || \"\";\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element\n\t * @public\n\t */\n\tgetTag(): string {\n\t\tconst pureTag = this.metadata.tag;\n\n\t\tif (!pureTag) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst suffix = getEffectiveScopingSuffixForTag(pureTag);\n\t\tif (!suffix) {\n\t\t\treturn pureTag;\n\t\t}\n\n\t\treturn `${pureTag}-${suffix}`;\n\t}\n\n\t/**\n\t * Determines whether a property should have an attribute counterpart\n\t * @public\n\t * @param propName\n\t */\n\thasAttribute(propName: string): boolean {\n\t\tconst propData = this.getProperties()[propName];\n\t\treturn propData.type !== Object && !propData.noAttribute && !propData.multiple;\n\t}\n\n\t/**\n\t * Returns an array with the properties of the UI5 Element (in camelCase)\n\t * @public\n\t */\n\tgetPropertiesList(): Array<string> {\n\t\treturn Object.keys(this.getProperties());\n\t}\n\n\t/**\n\t * Returns an array with the attributes of the UI5 Element (in kebab-case)\n\t * @public\n\t */\n\tgetAttributesList(): Array<string> {\n\t\treturn this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(camelToKebabCase);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has a default slot of type Node, therefore can slot text\n\t */\n\tcanSlotText() {\n\t\treturn (this.getSlots().default)?.type === Node;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots\n\t * @public\n\t */\n\thasSlots(): boolean {\n\t\treturn !!Object.entries(this.getSlots()).length;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots with \"individualSlots: true\"\n\t * @public\n\t */\n\thasIndividualSlots(): boolean {\n\t\treturn this.slotsAreManaged() && Object.values(this.getSlots()).some(slotData => slotData.individualSlots);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element needs to invalidate if children are added/removed/changed\n\t * @public\n\t */\n\tslotsAreManaged(): boolean {\n\t\treturn !!this.metadata.managedSlots;\n\t}\n\n\t/**\n\t * Determines whether this control supports F6 fast navigation\n\t * @public\n\t */\n\tsupportsF6FastNavigation(): boolean {\n\t\treturn !!this.metadata.fastNavigation;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of properties and their metadata definitions\n\t * @public\n\t */\n\tgetProperties(): Record<string, Property> {\n\t\tif (!this.metadata.properties) {\n\t\t\tthis.metadata.properties = {};\n\t\t}\n\t\treturn this.metadata.properties;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of events and their metadata definitions\n\t * @public\n\t */\n\tgetEvents(): EventData {\n\t\tif (!this.metadata.events) {\n\t\t\tthis.metadata.events = {};\n\t\t}\n\t\treturn this.metadata.events;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of slots and their metadata definitions\n\t * @public\n\t */\n\t getSlots(): Record<string, Slot> {\n\t\tif (!this.metadata.slots) {\n\t\t\tthis.metadata.slots = {};\n\t\t}\n\t\treturn this.metadata.slots;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any translatable texts (needs to be invalidated upon language change)\n\t */\n\tisLanguageAware(): boolean {\n\t\treturn !!this.metadata.languageAware;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any theme dependant carachteristics.\n\t */\n\t isThemeAware(): boolean {\n\t\treturn !!this.metadata.themeAware;\n\t}\n\n\t/**\n\t * Matches a changed entity (property/slot) with the given name against the \"invalidateOnChildChange\" configuration\n\t * and determines whether this should cause and invalidation\n\t *\n\t * @param slotName the name of the slot in which a child was changed\n\t * @param type the type of change in the child: \"property\" or \"slot\"\n\t * @param name the name of the property/slot that changed\n\t */\n\tshouldInvalidateOnChildChange(slotName: string, type: \"property\" | \"slot\", name: string): boolean {\n\t\tconst config = this.getSlots()[slotName].invalidateOnChildChange;\n\n\t\t// invalidateOnChildChange was not set in the slot metadata - by default child changes do not affect the component\n\t\tif (config === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// The simple format was used: invalidateOnChildChange: true/false;\n\t\tif (typeof config === \"boolean\") {\n\t\t\treturn config;\n\t\t}\n\n\t\t// The complex format was used: invalidateOnChildChange: { properties, slots }\n\t\tif (typeof config === \"object\") {\n\t\t\t// A property was changed\n\t\t\tif (type === \"property\") {\n\t\t\t\t// The config object does not have a properties field\n\t\t\t\tif (config.properties === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: properties: true/false\n\t\t\t\tif (typeof config.properties === \"boolean\") {\n\t\t\t\t\treturn config.properties;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: properties: [...]\n\t\t\t\tif (Array.isArray(config.properties)) {\n\t\t\t\t\treturn config.properties.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.properties: boolean or array is expected\");\n\t\t\t}\n\n\t\t\t// A slot was changed\n\t\t\tif (type === \"slot\") {\n\t\t\t\t// The config object does not have a slots field\n\t\t\t\tif (config.slots === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: slots: true/false\n\t\t\t\tif (typeof config.slots === \"boolean\") {\n\t\t\t\t\treturn config.slots;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: slots: [...]\n\t\t\t\tif (Array.isArray(config.slots)) {\n\t\t\t\t\treturn config.slots.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.slots: boolean or array is expected\");\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error(\"Wrong format for invalidateOnChildChange: boolean or object is expected\");\n\t}\n}\n\nconst validateSingleProperty = (value: PropertyValue, propData: Property) => {\n\tconst propertyType = propData.type;\n\tlet propertyValidator = propData.validator;\n\n\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\tpropertyValidator = propertyType as typeof DataType;\n\t}\n\n\tif (propertyValidator) {\n\t\treturn (propertyValidator as typeof DataType).isValid(value) ? value : propData.defaultValue;\n\t}\n\n\tif (!propertyType || propertyType === String) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string -- if an object is passed as a value to a string property, this was an error so displaying [object Object] will indicate the issue to the developer\n\t\treturn (typeof value === \"string\" || typeof value === \"undefined\" || value === null) ? value : value.toString();\n\t}\n\n\tif (propertyType === Boolean) {\n\t\treturn typeof value === \"boolean\" ? value : false;\n\t}\n\n\tif (propertyType === Object) {\n\t\treturn typeof value === \"object\" ? value : propData.defaultValue;\n\t}\n\n\t// Check if \"value\" is part of the enum (propertyType) values and return the defaultValue if not found.\n\treturn value as string in propertyType ? value : propData.defaultValue;\n};\n\nconst validateSingleSlot = (value: Node, slotData: Slot) => {\n\tvalue && getSlottedNodes(value).forEach(el => {\n\t\tif (!(el instanceof slotData.type)) {\n\t\t\tthrow new Error(`The element is not of type ${slotData.type.toString()}`);\n\t\t}\n\t});\n\n\treturn value;\n};\n\nexport default UI5ElementMetadata;\nexport type {\n\tProperty,\n\tPropertyValue,\n\tSlot,\n\tSlotValue,\n\tEventData,\n\tState,\n\tMetadata,\n};\n"]}
1
+ {"version":3,"file":"UI5ElementMetadata.js","sourceRoot":"","sources":["../src/UI5ElementMetadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,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AO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;KACjE;IAED,uGAAuG;IACvG,OAAO,KAAe,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,KAAW,EAAE,QAAc,EAAE,EAAE;IAC1D,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QAC5C,IAAI,CAAC,CAAC,EAAE,YAAY,QAAQ,CAAC,IAAI,CAAC,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SAC1E;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import DataType from \"./types/DataType.js\";\nimport { camelToKebabCase } from \"./util/StringHelper.js\";\nimport { getSlottedNodes } from \"./util/SlotsHelper.js\";\nimport { getEffectiveScopingSuffixForTag } from \"./CustomElementsScopeUtils.js\";\n\ntype SlotInvalidation = {\n\tproperties: boolean | Array<string>,\n\tslots: boolean | Array<string>,\n}\n\ntype Slot = {\n\ttype: typeof Node | typeof HTMLElement,\n\tdefault?: boolean,\n\tpropertyName?: string,\n\tindividualSlots?: boolean,\n\tinvalidateOnChildChange?: boolean | SlotInvalidation,\n\tcloned?: boolean,\n};\n\ntype SlotValue = Node;\n\ntype Property = {\n\ttype?: BooleanConstructor | StringConstructor | ObjectConstructor | DataType\n\tvalidator?: DataType,\n\tdefaultValue?: PropertyValue,\n\tnoAttribute?: boolean,\n\tmultiple?: boolean,\n\tcompareValues?: boolean,\n}\n\ntype PropertyValue = boolean | number | string | object | undefined | null | DataType;\n\ntype EventData = Record<string, object>;\n\ntype Metadata = {\n\ttag?: string,\n\tmanagedSlots?: boolean,\n\tproperties?: Record<string, Property>,\n\tslots?: Record<string, Slot>,\n\tevents?: EventData,\n\tfastNavigation?: boolean,\n\tthemeAware?: boolean,\n\tlanguageAware?: boolean,\n\tshadowRootOptions?: Partial<ShadowRootInit>\n};\n\ntype State = Record<string, PropertyValue | Array<SlotValue>>;\n\n/**\n * @class\n * @public\n */\nclass UI5ElementMetadata {\n\tmetadata: Metadata;\n\t_initialState: State | undefined;\n\n\tconstructor(metadata: Metadata) {\n\t\tthis.metadata = metadata;\n\t}\n\n\tgetInitialState() {\n\t\tif (Object.prototype.hasOwnProperty.call(this, \"_initialState\")) {\n\t\t\treturn this._initialState!;\n\t\t}\n\t\tconst initialState: State = {};\n\t\tconst slotsAreManaged = this.slotsAreManaged();\n\n\t\t// Initialize properties\n\t\tconst props = this.getProperties();\n\t\tfor (const propName in props) { // eslint-disable-line\n\t\t\tconst propType = props[propName].type;\n\t\t\tconst propDefaultValue = props[propName].defaultValue;\n\n\t\t\tif (propType === Boolean) {\n\t\t\t\tinitialState[propName] = false;\n\n\t\t\t\tif (propDefaultValue !== undefined) {\n\t\t\t\t\tconsole.warn(\"The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default\"); // eslint-disable-line\n\t\t\t\t}\n\t\t\t} else if (props[propName].multiple) {\n\t\t\t\tObject.defineProperty(initialState, propName, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget() {\n\t\t\t\t\t return [];\n\t\t\t\t\t},\n\t\t\t\t });\n\t\t\t} else if (propType === Object) {\n\t\t\t\tObject.defineProperty(initialState, propName, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tget() {\n\t\t\t\t\t return \"defaultValue\" in props[propName] ? props[propName].defaultValue : {};\n\t\t\t\t\t},\n\t\t\t\t });\n\t\t\t} else if (propType === String) {\n\t\t\t\tinitialState[propName] = \"defaultValue\" in props[propName] ? props[propName].defaultValue : \"\";\n\t\t\t} else {\n\t\t\t\tinitialState[propName] = propDefaultValue;\n\t\t\t}\n\t\t}\n\n\t\t// Initialize slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries<Slot>(slots)) { // eslint-disable-line\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tinitialState[propertyName] = [];\n\t\t\t}\n\t\t}\n\n\t\tthis._initialState = initialState;\n\t\treturn initialState;\n\t}\n\n\t/**\n\t * Validates the property's value and returns it if correct\n\t * or returns the default value if not.\n\t * **Note:** Only intended for use by UI5Element.js\n\t * @public\n\t */\n\tstatic validatePropertyValue(value: PropertyValue, propData: Property): PropertyValue {\n\t\tconst isMultiple = propData.multiple;\n\t\tif (isMultiple && value) {\n\t\t\treturn (value as Array<PropertyValue>).map((propValue: PropertyValue) => validateSingleProperty(propValue, propData));\n\t\t}\n\t\treturn validateSingleProperty(value, propData);\n\t}\n\n\t/**\n\t * Validates the slot's value and returns it if correct\n\t * or throws an exception if not.\n\t * **Note:** Only intended for use by UI5Element.js\n\t * @public\n\t */\n\tstatic validateSlotValue(value: Node, slotData: Slot): Node {\n\t\treturn validateSingleSlot(value, slotData);\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element without the scope\n\t * @public\n\t */\n\tgetPureTag(): string {\n\t\treturn this.metadata.tag || \"\";\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element\n\t * @public\n\t */\n\tgetTag(): string {\n\t\tconst pureTag = this.metadata.tag;\n\n\t\tif (!pureTag) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst suffix = getEffectiveScopingSuffixForTag(pureTag);\n\t\tif (!suffix) {\n\t\t\treturn pureTag;\n\t\t}\n\n\t\treturn `${pureTag}-${suffix}`;\n\t}\n\n\t/**\n\t * Determines whether a property should have an attribute counterpart\n\t * @public\n\t * @param propName\n\t */\n\thasAttribute(propName: string): boolean {\n\t\tconst propData = this.getProperties()[propName];\n\t\treturn propData.type !== Object && !propData.noAttribute && !propData.multiple;\n\t}\n\n\t/**\n\t * Returns an array with the properties of the UI5 Element (in camelCase)\n\t * @public\n\t */\n\tgetPropertiesList(): Array<string> {\n\t\treturn Object.keys(this.getProperties());\n\t}\n\n\t/**\n\t * Returns an array with the attributes of the UI5 Element (in kebab-case)\n\t * @public\n\t */\n\tgetAttributesList(): Array<string> {\n\t\treturn this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(camelToKebabCase);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has a default slot of type Node, therefore can slot text\n\t */\n\tcanSlotText() {\n\t\treturn (this.getSlots().default)?.type === Node;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots\n\t * @public\n\t */\n\thasSlots(): boolean {\n\t\treturn !!Object.entries(this.getSlots()).length;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots with \"individualSlots: true\"\n\t * @public\n\t */\n\thasIndividualSlots(): boolean {\n\t\treturn this.slotsAreManaged() && Object.values(this.getSlots()).some(slotData => slotData.individualSlots);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element needs to invalidate if children are added/removed/changed\n\t * @public\n\t */\n\tslotsAreManaged(): boolean {\n\t\treturn !!this.metadata.managedSlots;\n\t}\n\n\t/**\n\t * Determines whether this control supports F6 fast navigation\n\t * @public\n\t */\n\tsupportsF6FastNavigation(): boolean {\n\t\treturn !!this.metadata.fastNavigation;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of properties and their metadata definitions\n\t * @public\n\t */\n\tgetProperties(): Record<string, Property> {\n\t\tif (!this.metadata.properties) {\n\t\t\tthis.metadata.properties = {};\n\t\t}\n\t\treturn this.metadata.properties;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of events and their metadata definitions\n\t * @public\n\t */\n\tgetEvents(): EventData {\n\t\tif (!this.metadata.events) {\n\t\t\tthis.metadata.events = {};\n\t\t}\n\t\treturn this.metadata.events;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of slots and their metadata definitions\n\t * @public\n\t */\n\t getSlots(): Record<string, Slot> {\n\t\tif (!this.metadata.slots) {\n\t\t\tthis.metadata.slots = {};\n\t\t}\n\t\treturn this.metadata.slots;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any translatable texts (needs to be invalidated upon language change)\n\t */\n\tisLanguageAware(): boolean {\n\t\treturn !!this.metadata.languageAware;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any theme dependant carachteristics.\n\t */\n\t isThemeAware(): boolean {\n\t\treturn !!this.metadata.themeAware;\n\t}\n\n\tgetShadowRootOptions(): Partial<ShadowRootInit> {\n\t\treturn this.metadata.shadowRootOptions || {};\n\t}\n\n\t/**\n\t * Matches a changed entity (property/slot) with the given name against the \"invalidateOnChildChange\" configuration\n\t * and determines whether this should cause and invalidation\n\t *\n\t * @param slotName the name of the slot in which a child was changed\n\t * @param type the type of change in the child: \"property\" or \"slot\"\n\t * @param name the name of the property/slot that changed\n\t */\n\tshouldInvalidateOnChildChange(slotName: string, type: \"property\" | \"slot\", name: string): boolean {\n\t\tconst config = this.getSlots()[slotName].invalidateOnChildChange;\n\n\t\t// invalidateOnChildChange was not set in the slot metadata - by default child changes do not affect the component\n\t\tif (config === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// The simple format was used: invalidateOnChildChange: true/false;\n\t\tif (typeof config === \"boolean\") {\n\t\t\treturn config;\n\t\t}\n\n\t\t// The complex format was used: invalidateOnChildChange: { properties, slots }\n\t\tif (typeof config === \"object\") {\n\t\t\t// A property was changed\n\t\t\tif (type === \"property\") {\n\t\t\t\t// The config object does not have a properties field\n\t\t\t\tif (config.properties === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: properties: true/false\n\t\t\t\tif (typeof config.properties === \"boolean\") {\n\t\t\t\t\treturn config.properties;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: properties: [...]\n\t\t\t\tif (Array.isArray(config.properties)) {\n\t\t\t\t\treturn config.properties.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.properties: boolean or array is expected\");\n\t\t\t}\n\n\t\t\t// A slot was changed\n\t\t\tif (type === \"slot\") {\n\t\t\t\t// The config object does not have a slots field\n\t\t\t\tif (config.slots === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: slots: true/false\n\t\t\t\tif (typeof config.slots === \"boolean\") {\n\t\t\t\t\treturn config.slots;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: slots: [...]\n\t\t\t\tif (Array.isArray(config.slots)) {\n\t\t\t\t\treturn config.slots.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.slots: boolean or array is expected\");\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error(\"Wrong format for invalidateOnChildChange: boolean or object is expected\");\n\t}\n}\n\nconst validateSingleProperty = (value: PropertyValue, propData: Property) => {\n\tconst propertyType = propData.type;\n\tlet propertyValidator = propData.validator;\n\n\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\tpropertyValidator = propertyType as typeof DataType;\n\t}\n\n\tif (propertyValidator) {\n\t\treturn (propertyValidator as typeof DataType).isValid(value) ? value : propData.defaultValue;\n\t}\n\n\tif (!propertyType || propertyType === String) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string -- if an object is passed as a value to a string property, this was an error so displaying [object Object] will indicate the issue to the developer\n\t\treturn (typeof value === \"string\" || typeof value === \"undefined\" || value === null) ? value : value.toString();\n\t}\n\n\tif (propertyType === Boolean) {\n\t\treturn typeof value === \"boolean\" ? value : false;\n\t}\n\n\tif (propertyType === Object) {\n\t\treturn typeof value === \"object\" ? value : propData.defaultValue;\n\t}\n\n\t// Check if \"value\" is part of the enum (propertyType) values and return the defaultValue if not found.\n\treturn value as string in propertyType ? value : propData.defaultValue;\n};\n\nconst validateSingleSlot = (value: Node, slotData: Slot) => {\n\tvalue && getSlottedNodes(value).forEach(el => {\n\t\tif (!(el instanceof slotData.type)) {\n\t\t\tthrow new Error(`The element is not of type ${slotData.type.toString()}`);\n\t\t}\n\t});\n\n\treturn value;\n};\n\nexport default UI5ElementMetadata;\nexport type {\n\tProperty,\n\tPropertyValue,\n\tSlot,\n\tSlotValue,\n\tEventData,\n\tState,\n\tMetadata,\n};\n"]}
@@ -665,21 +665,6 @@
665
665
  }
666
666
  ]
667
667
  },
668
- {
669
- "kind": "javascript-module",
670
- "path": "dist/theming/getEffectiveLinksHrefs.js",
671
- "declarations": [],
672
- "exports": [
673
- {
674
- "kind": "js",
675
- "name": "default",
676
- "declaration": {
677
- "name": "getEffectiveLinksHrefs",
678
- "module": "dist/theming/getEffectiveLinksHrefs.js"
679
- }
680
- }
681
- ]
682
- },
683
668
  {
684
669
  "kind": "javascript-module",
685
670
  "path": "dist/theming/getEffectiveStyle.js",
@@ -725,21 +710,6 @@
725
710
  }
726
711
  ]
727
712
  },
728
- {
729
- "kind": "javascript-module",
730
- "path": "dist/theming/preloadLinks.js",
731
- "declarations": [],
732
- "exports": [
733
- {
734
- "kind": "js",
735
- "name": "default",
736
- "declaration": {
737
- "name": "preloadLinks",
738
- "module": "dist/theming/preloadLinks.js"
739
- }
740
- }
741
- ]
742
- },
743
713
  {
744
714
  "kind": "javascript-module",
745
715
  "path": "dist/thirdparty/_merge.js",
@@ -1521,21 +1491,6 @@
1521
1491
  }
1522
1492
  ]
1523
1493
  },
1524
- {
1525
- "kind": "javascript-module",
1526
- "path": "dist/util/createStyleInHead.js",
1527
- "declarations": [],
1528
- "exports": [
1529
- {
1530
- "kind": "js",
1531
- "name": "default",
1532
- "declaration": {
1533
- "name": "createStyleInHead",
1534
- "module": "dist/util/createStyleInHead.js"
1535
- }
1536
- }
1537
- ]
1538
- },
1539
1494
  {
1540
1495
  "kind": "javascript-module",
1541
1496
  "path": "dist/util/debounce.js",
@@ -1893,12 +1848,6 @@
1893
1848
  "declarations": [],
1894
1849
  "exports": []
1895
1850
  },
1896
- {
1897
- "kind": "javascript-module",
1898
- "path": "dist/CSP.js",
1899
- "declarations": [],
1900
- "exports": []
1901
- },
1902
1851
  {
1903
1852
  "kind": "javascript-module",
1904
1853
  "path": "dist/CustomElementsRegistry.js",
@@ -2067,21 +2016,6 @@
2067
2016
  }
2068
2017
  ]
2069
2018
  },
2070
- {
2071
- "kind": "javascript-module",
2072
- "path": "dist/StaticAreaItem.js",
2073
- "declarations": [],
2074
- "exports": [
2075
- {
2076
- "kind": "js",
2077
- "name": "default",
2078
- "declaration": {
2079
- "name": "StaticAreaItem",
2080
- "module": "dist/StaticAreaItem.js"
2081
- }
2082
- }
2083
- ]
2084
- },
2085
2019
  {
2086
2020
  "kind": "javascript-module",
2087
2021
  "path": "dist/SystemCSSVars.js",
@@ -2394,16 +2328,6 @@
2394
2328
  "default": "true",
2395
2329
  "readonly": true
2396
2330
  },
2397
- {
2398
- "kind": "method",
2399
- "name": "getStaticAreaItemDomRef",
2400
- "return": {
2401
- "type": {
2402
- "text": "Promise<ShadowRoot | null>"
2403
- }
2404
- },
2405
- "privacy": "public"
2406
- },
2407
2331
  {
2408
2332
  "kind": "method",
2409
2333
  "name": "getUniqueDependencies",