@ui5/webcomponents-base 2.23.0-rc.2 → 2.24.0-rc.0
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.
- package/CHANGELOG.md +19 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/Boot.js +1 -0
- package/dist/Boot.js.map +1 -1
- package/dist/UI5Element.js +11 -3
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.js +1 -1
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/features/patchPopup.js +1 -0
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/VersionInfo.js +4 -4
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +2 -2
- package/dist/prod/UI5ElementMetadata.js +1 -1
- package/dist/prod/UI5ElementMetadata.js.map +3 -3
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AASjD,MAAM,gBAAgB,GAAG,iBAAiB,CAA2B,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAE7F,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAAE;IAC9C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;Q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AAC,CAAC,CAAC,0BAA0B;IAC9C,kBAAkB,EAAE,CAAC,CAAC,6FAA6F;IACnH,eAAe,CAAC,KAAK,CAAC,CAAC,CAAA,+BAA+B;IACtD,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,+BAA+B;AACrD,CAAC,CAAC;AAEF,OAAO,EACN,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,GACf,CAAC","sourcesContent":["// OpenUI5's Control.js subset\nimport getSharedResource from \"../getSharedResource.js\";\nimport insertOpenUI5PopupStyles from \"./insertOpenUI5PopupStyles.js\";\nimport VersionInfo from \"../generated/VersionInfo.js\";\nimport { compareVersions } from \"../Runtimes.js\";\n\ntype PatchedFunctionRecord = {\n\tversion: VersionInfo | undefined;\n\toriginalFn: (...args: any[]) => any;\n};\n\ntype PatchedFunctionsRegistry = Record<string, PatchedFunctionRecord>;\n\nconst PatchedFunctions = getSharedResource<PatchedFunctionsRegistry>(\"PatchedFunctions\", {});\n\nconst shouldRepatch = (key: string): boolean => {\n\tconst existing = PatchedFunctions[key];\n\tif (!existing) {\n\t\treturn true;\n\t}\n\n\tif (!existing.version) {\n\t\treturn true;\n\t}\n\treturn compareVersions(VersionInfo, existing.version) > 0;\n};\n\ntype Control = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\topen: (...args: any[]) => void,\n\t_closed: (...args: any[]) => void,\n\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\tgetContent: () => Control | HTMLElement | null, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\tonFocusEvent: (...args: any[]) => void,\n\tgetModal: () => boolean\n};\n\ntype OpenUI5PopupClass = {\n\tprototype: OpenUI5Popup\n};\n\ntype OpenUI5DialogClass = {\n\tprototype: {\n\t\tonsapescape: (...args: any[]) => void,\n\t\toPopup: OpenUI5Popup,\n\t}\n};\n\ntype PopupInfo = {\n\ttype: \"WebComponent\";\n\tinstance: object;\n} | {\n\ttype: \"OpenUI5\";\n\tinstance: OpenUI5Popup;\n};\n\n// contains all OpenUI5 and Web Component popups that are currently opened\nconst AllOpenedPopupsRegistry = getSharedResource<{ openedRegistry: Array<PopupInfo> }>(\"AllOpenedPopupsRegistry\", { openedRegistry: [] });\n\nconst addOpenedPopup = (popupInfo: PopupInfo) => {\n\tAllOpenedPopupsRegistry.openedRegistry.push(popupInfo);\n};\n\nconst removeOpenedPopup = (popup: object) => {\n\tconst index = AllOpenedPopupsRegistry.openedRegistry.findIndex(el => el.instance === popup);\n\n\tif (index === AllOpenedPopupsRegistry.openedRegistry.length - 1) {\n\t\tfixTopmostOpenUI5Popup();\n\t}\n\n\tif (index > -1) {\n\t\tAllOpenedPopupsRegistry.openedRegistry.splice(index, 1);\n\t}\n};\n\nconst getTopmostPopup = () => {\n\tif (AllOpenedPopupsRegistry.openedRegistry.length === 0) {\n\t\treturn null;\n\t}\n\treturn AllOpenedPopupsRegistry.openedRegistry[AllOpenedPopupsRegistry.openedRegistry.length - 1].instance;\n};\n\n/**\n * Determines whether there is a Web Component popup opened above (a specified popup).\n *\n * @param {object} popup The popup instance to check against.\n * @returns {boolean} `true` if a Web Component popup is opened above (the given popup instance); otherwise `false`.\n */\nconst hasWebComponentPopupAbove = (popup: object) => {\n\tfor (let i = AllOpenedPopupsRegistry.openedRegistry.length - 1; i >= 0; i--) {\n\t\tconst popupInfo = AllOpenedPopupsRegistry.openedRegistry[i];\n\t\tif (popupInfo.type === \"WebComponent\") {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (popupInfo.instance === popup) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst getPopupContentElement = (popup: OpenUI5Popup): HTMLElement | null => {\n\tconst content = popup.getContent();\n\treturn content instanceof HTMLElement ? content : content?.getDomRef() || null;\n};\n\nconst openNativePopoverForOpenUI5 = (popup: OpenUI5Popup) => {\n\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(popup.getOpenState());\n\tif (!openingInitiated || !isNativePopoverOpen()) {\n\t\treturn;\n\t}\n\n\tconst domRef = getPopupContentElement(popup);\n\n\tif (!domRef) {\n\t\treturn;\n\t}\n\n\tconst openUI5BlockLayer = document.getElementById(\"sap-ui-blocklayer-popup\");\n\n\tif (popup.getModal() && openUI5BlockLayer) {\n\t\topenUI5BlockLayer.setAttribute(\"popover\", \"manual\");\n\t\topenUI5BlockLayer.hidePopover();\n\t\topenUI5BlockLayer.showPopover();\n\t}\n\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.showPopover();\n};\n\nconst closeNativePopoverForOpenUI5 = (popup: OpenUI5Popup) => {\n\tconst domRef = getPopupContentElement(popup);\n\n\tif (!domRef) {\n\t\treturn;\n\t}\n\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n\n\tif (getTopmostPopup() !== popup) {\n\t\treturn;\n\t}\n\n\t// The OpenUI5 block layer is only one for all modal OpenUI5 popups,\n\t// and it is displayed above all opened pupups - OpenUI5 and Web Components,\n\t// as a result, we need to hide this block layer.\n\t// If the underlying popup is a Web Component - it is displayed like a native popover, and we don't need to do anything\n\t// If the underlying popup is an OpenUI5 popup, it will be fixed in fixTopmostOpenUI5Popup method.\n\tif (popup.getModal()) {\n\t\tconst openUI5BlockLayer = document.getElementById(\"sap-ui-blocklayer-popup\");\n\t\tif (openUI5BlockLayer && openUI5BlockLayer.hasAttribute(\"popover\")) {\n\t\t\topenUI5BlockLayer.hidePopover();\n\t\t}\n\t}\n};\n\nconst fixTopmostOpenUI5Popup = () => {\n\tif (!isNativePopoverOpen()) {\n\t\treturn;\n\t}\n\n\tconst prevPopup = AllOpenedPopupsRegistry.openedRegistry[AllOpenedPopupsRegistry.openedRegistry.length - 2];\n\tif (!prevPopup\n\t\t|| prevPopup.type !== \"OpenUI5\"\n\t\t|| !prevPopup.instance.getModal()) {\n\t\treturn;\n\t}\n\n\tconst content = getPopupContentElement(prevPopup.instance);\n\tconst openUI5BlockLayer = document.getElementById(\"sap-ui-blocklayer-popup\");\n\n\tcontent?.hidePopover();\n\topenUI5BlockLayer?.showPopover();\n\n\tcontent?.showPopover();\n};\n\nconst isNativePopoverOpen = (root: Document | ShadowRoot = document): boolean => {\n\tif (root.querySelector(\":popover-open\")) {\n\t\treturn true;\n\t}\n\n\treturn Array.from(root.querySelectorAll(\"*\")).some(element => {\n\t\tconst shadowRoot = element.shadowRoot;\n\t\treturn shadowRoot && isNativePopoverOpen(shadowRoot);\n\t});\n};\n\nconst patchDialog = (Dialog: OpenUI5DialogClass) => {\n\tconst key = \"Dialog.prototype.onsapescape\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Dialog.prototype.onsapescape };\n\t}\n\tconst origOnsapescape = PatchedFunctions[key].originalFn;\n\tDialog.prototype.onsapescape = function onsapescape(...args: any[]) {\n\t\tif (hasWebComponentPopupAbove(this.oPopup)) {\n\t\t\treturn;\n\t\t}\n\n\t\torigOnsapescape.apply(this, args);\n\t};\n};\n\nconst patchOpen = (Popup: OpenUI5PopupClass) => {\n\tconst key = \"Popup.prototype.open\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Popup.prototype.open };\n\t}\n\tconst origOpen = PatchedFunctions[key].originalFn;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\topenNativePopoverForOpenUI5(this);\n\n\t\taddOpenedPopup({\n\t\t\ttype: \"OpenUI5\",\n\t\t\tinstance: this,\n\t\t});\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5PopupClass) => {\n\tconst key = \"Popup.prototype._closed\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Popup.prototype._closed };\n\t}\n\tconst _origClosed = PatchedFunctions[key].originalFn;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tcloseNativePopoverForOpenUI5(this);\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tremoveOpenedPopup(this);\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5PopupClass) => {\n\tconst key = \"Popup.prototype.onFocusEvent\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Popup.prototype.onFocusEvent };\n\t}\n\tconst origFocusEvent = PatchedFunctions[key].originalFn;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(...args: any[]) {\n\t\tif (!hasWebComponentPopupAbove(this)) {\n\t\t\torigFocusEvent.apply(this, args);\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5PopupClass, Dialog: OpenUI5DialogClass) => {\n\tinsertOpenUI5PopupStyles();\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n\tpatchFocusEvent(Popup);// Popup.prototype.onFocusEvent\n\tpatchDialog(Dialog); // Dialog.prototype.onsapescape\n};\n\nexport {\n\tpatchPopup,\n\taddOpenedPopup,\n\tremoveOpenedPopup,\n\tgetTopmostPopup,\n};\n\nexport type { OpenUI5PopupClass, OpenUI5DialogClass, PopupInfo };\n"]}
|
|
1
|
+
{"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"m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E,CAAC;YACtC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAClC,CAAC;IACF,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,UAAU,CAAC,WAAW,CAAC,+CAA+C,CAAC,CAAC;IACxE,QAAQ,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,MAA0B,EAAE,EAAE;IAC3E,wBAAwB,EAAE,CAAC;IAC3B,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB;IACzC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,0BAA0B;IAC9C,kBAAkB,EAAE,CAAC,CAAC,6FAA6F;IACnH,eAAe,CAAC,KAAK,CAAC,CAAC,CAAA,+BAA+B;IACtD,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,+BAA+B;AACrD,CAAC,CAAC;AAEF,OAAO,EACN,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,GACf,CAAC","sourcesContent":["// OpenUI5's Control.js subset\nimport getSharedResource from \"../getSharedResource.js\";\nimport insertOpenUI5PopupStyles from \"./insertOpenUI5PopupStyles.js\";\nimport VersionInfo from \"../generated/VersionInfo.js\";\nimport { compareVersions } from \"../Runtimes.js\";\n\ntype PatchedFunctionRecord = {\n\tversion: VersionInfo | undefined;\n\toriginalFn: (...args: any[]) => any;\n};\n\ntype PatchedFunctionsRegistry = Record<string, PatchedFunctionRecord>;\n\nconst PatchedFunctions = getSharedResource<PatchedFunctionsRegistry>(\"PatchedFunctions\", {});\n\nconst shouldRepatch = (key: string): boolean => {\n\tconst existing = PatchedFunctions[key];\n\tif (!existing) {\n\t\treturn true;\n\t}\n\n\tif (!existing.version) {\n\t\treturn true;\n\t}\n\treturn compareVersions(VersionInfo, existing.version) > 0;\n};\n\ntype Control = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\topen: (...args: any[]) => void,\n\t_closed: (...args: any[]) => void,\n\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\tgetContent: () => Control | HTMLElement | null, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\tonFocusEvent: (...args: any[]) => void,\n\tgetModal: () => boolean\n};\n\ntype OpenUI5PopupClass = {\n\tprototype: OpenUI5Popup\n};\n\ntype OpenUI5DialogClass = {\n\tprototype: {\n\t\tonsapescape: (...args: any[]) => void,\n\t\toPopup: OpenUI5Popup,\n\t}\n};\n\ntype PopupInfo = {\n\ttype: \"WebComponent\";\n\tinstance: object;\n} | {\n\ttype: \"OpenUI5\";\n\tinstance: OpenUI5Popup;\n};\n\n// contains all OpenUI5 and Web Component popups that are currently opened\nconst AllOpenedPopupsRegistry = getSharedResource<{ openedRegistry: Array<PopupInfo> }>(\"AllOpenedPopupsRegistry\", { openedRegistry: [] });\n\nconst addOpenedPopup = (popupInfo: PopupInfo) => {\n\tAllOpenedPopupsRegistry.openedRegistry.push(popupInfo);\n};\n\nconst removeOpenedPopup = (popup: object) => {\n\tconst index = AllOpenedPopupsRegistry.openedRegistry.findIndex(el => el.instance === popup);\n\n\tif (index === AllOpenedPopupsRegistry.openedRegistry.length - 1) {\n\t\tfixTopmostOpenUI5Popup();\n\t}\n\n\tif (index > -1) {\n\t\tAllOpenedPopupsRegistry.openedRegistry.splice(index, 1);\n\t}\n};\n\nconst getTopmostPopup = () => {\n\tif (AllOpenedPopupsRegistry.openedRegistry.length === 0) {\n\t\treturn null;\n\t}\n\treturn AllOpenedPopupsRegistry.openedRegistry[AllOpenedPopupsRegistry.openedRegistry.length - 1].instance;\n};\n\n/**\n * Determines whether there is a Web Component popup opened above (a specified popup).\n *\n * @param {object} popup The popup instance to check against.\n * @returns {boolean} `true` if a Web Component popup is opened above (the given popup instance); otherwise `false`.\n */\nconst hasWebComponentPopupAbove = (popup: object) => {\n\tfor (let i = AllOpenedPopupsRegistry.openedRegistry.length - 1; i >= 0; i--) {\n\t\tconst popupInfo = AllOpenedPopupsRegistry.openedRegistry[i];\n\t\tif (popupInfo.type === \"WebComponent\") {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (popupInfo.instance === popup) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst getPopupContentElement = (popup: OpenUI5Popup): HTMLElement | null => {\n\tconst content = popup.getContent();\n\treturn content instanceof HTMLElement ? content : content?.getDomRef() || null;\n};\n\nconst openNativePopoverForOpenUI5 = (popup: OpenUI5Popup) => {\n\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(popup.getOpenState());\n\tif (!openingInitiated || !isNativePopoverOpen()) {\n\t\treturn;\n\t}\n\n\tconst domRef = getPopupContentElement(popup);\n\n\tif (!domRef) {\n\t\treturn;\n\t}\n\n\tconst openUI5BlockLayer = document.getElementById(\"sap-ui-blocklayer-popup\");\n\n\tif (popup.getModal() && openUI5BlockLayer) {\n\t\topenUI5BlockLayer.setAttribute(\"popover\", \"manual\");\n\t\topenUI5BlockLayer.hidePopover();\n\t\topenUI5BlockLayer.showPopover();\n\t}\n\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.hidePopover();\n\tdomRef.showPopover();\n};\n\nconst closeNativePopoverForOpenUI5 = (popup: OpenUI5Popup) => {\n\tconst domRef = getPopupContentElement(popup);\n\n\tif (!domRef) {\n\t\treturn;\n\t}\n\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n\n\tif (getTopmostPopup() !== popup) {\n\t\treturn;\n\t}\n\n\t// The OpenUI5 block layer is only one for all modal OpenUI5 popups,\n\t// and it is displayed above all opened pupups - OpenUI5 and Web Components,\n\t// as a result, we need to hide this block layer.\n\t// If the underlying popup is a Web Component - it is displayed like a native popover, and we don't need to do anything\n\t// If the underlying popup is an OpenUI5 popup, it will be fixed in fixTopmostOpenUI5Popup method.\n\tif (popup.getModal()) {\n\t\tconst openUI5BlockLayer = document.getElementById(\"sap-ui-blocklayer-popup\");\n\t\tif (openUI5BlockLayer && openUI5BlockLayer.hasAttribute(\"popover\")) {\n\t\t\topenUI5BlockLayer.hidePopover();\n\t\t}\n\t}\n};\n\nconst fixTopmostOpenUI5Popup = () => {\n\tif (!isNativePopoverOpen()) {\n\t\treturn;\n\t}\n\n\tconst prevPopup = AllOpenedPopupsRegistry.openedRegistry[AllOpenedPopupsRegistry.openedRegistry.length - 2];\n\tif (!prevPopup\n\t\t|| prevPopup.type !== \"OpenUI5\"\n\t\t|| !prevPopup.instance.getModal()) {\n\t\treturn;\n\t}\n\n\tconst content = getPopupContentElement(prevPopup.instance);\n\tconst openUI5BlockLayer = document.getElementById(\"sap-ui-blocklayer-popup\");\n\n\tcontent?.hidePopover();\n\topenUI5BlockLayer?.showPopover();\n\n\tcontent?.showPopover();\n};\n\nconst isNativePopoverOpen = (root: Document | ShadowRoot = document): boolean => {\n\tif (root.querySelector(\":popover-open\")) {\n\t\treturn true;\n\t}\n\n\treturn Array.from(root.querySelectorAll(\"*\")).some(element => {\n\t\tconst shadowRoot = element.shadowRoot;\n\t\treturn shadowRoot && isNativePopoverOpen(shadowRoot);\n\t});\n};\n\nconst patchDialog = (Dialog: OpenUI5DialogClass) => {\n\tconst key = \"Dialog.prototype.onsapescape\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Dialog.prototype.onsapescape };\n\t}\n\tconst origOnsapescape = PatchedFunctions[key].originalFn;\n\tDialog.prototype.onsapescape = function onsapescape(...args: any[]) {\n\t\tif (hasWebComponentPopupAbove(this.oPopup)) {\n\t\t\treturn;\n\t\t}\n\n\t\torigOnsapescape.apply(this, args);\n\t};\n};\n\nconst patchOpen = (Popup: OpenUI5PopupClass) => {\n\tconst key = \"Popup.prototype.open\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Popup.prototype.open };\n\t}\n\tconst origOpen = PatchedFunctions[key].originalFn;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\topenNativePopoverForOpenUI5(this);\n\n\t\taddOpenedPopup({\n\t\t\ttype: \"OpenUI5\",\n\t\t\tinstance: this,\n\t\t});\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5PopupClass) => {\n\tconst key = \"Popup.prototype._closed\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Popup.prototype._closed };\n\t}\n\tconst _origClosed = PatchedFunctions[key].originalFn;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tcloseNativePopoverForOpenUI5(this);\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tremoveOpenedPopup(this);\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5PopupClass) => {\n\tconst key = \"Popup.prototype.onFocusEvent\";\n\tif (shouldRepatch(key)) {\n\t\tPatchedFunctions[key] = { version: VersionInfo, originalFn: PatchedFunctions[key]?.originalFn ?? Popup.prototype.onFocusEvent };\n\t}\n\tconst origFocusEvent = PatchedFunctions[key].originalFn;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(...args: any[]) {\n\t\tif (!hasWebComponentPopupAbove(this)) {\n\t\t\torigFocusEvent.apply(this, args);\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5PopupClass, Dialog: OpenUI5DialogClass) => {\n\tinsertOpenUI5PopupStyles();\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n\tpatchFocusEvent(Popup);// Popup.prototype.onFocusEvent\n\tpatchDialog(Dialog); // Dialog.prototype.onsapescape\n};\n\nexport {\n\tpatchPopup,\n\taddOpenedPopup,\n\tremoveOpenedPopup,\n\tgetTopmostPopup,\n};\n\nexport type { OpenUI5PopupClass, OpenUI5DialogClass, PopupInfo };\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.
|
|
2
|
+
version: "2.24.0-rc.0",
|
|
3
3
|
major: 2,
|
|
4
|
-
minor:
|
|
4
|
+
minor: 24,
|
|
5
5
|
patch: 0,
|
|
6
|
-
suffix: "-rc.
|
|
6
|
+
suffix: "-rc.0",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1781190542,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.24.0-rc.0\",\n\tmajor: 2,\n\tminor: 24,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1781190542,\n};\nexport default VersionInfo;"]}
|
package/dist/prod/UI5Element.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import N from"./thirdparty/merge.js";import{boot as x}from"./Boot.js";import V from"./UI5ElementMetadata.js";import b from"./EventProvider.js";import j from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as H}from"./IgnoreCustomElements.js";import{renderDeferred as $,renderImmediately as z,cancelRender as B,unregisterElement as q,registerElement as K}from"./Render.js";import{registerTag as W,isTagRegistered as J,recordTagRegistrationFailure as X}from"./CustomElementsRegistry.js";import{observeDOMNode as Y,unobserveDOMNode as G}from"./DOMObserver.js";import{skipOriginalEvent as Q}from"./config/NoConflict.js";import Z from"./locale/getEffectiveDir.js";import{kebabToCamelCase as m,camelToKebabCase as tt,kebabToPascalCase as P}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as T,getSlottedNodesList as D}from"./util/SlotsHelper.js";import et from"./util/arraysAreEqual.js";import{markAsRtlAware as nt}from"./locale/RTLAwareRegistry.js";import st from"./renderer/executeTemplate.js";import{shouldScopeCustomElement as A}from"./CustomElementsScopeUtils.js";import{updateFormValue as ot,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getI18nBundle as at}from"./i18nBundle.js";import{fetchCldr as it}from"./asset-registries/LocaleData.js";import C from"./locale/getLocale.js";import{getLanguageChangePending as O}from"./config/Language.js";import rt from"./util/createInstanceChecker.js";let lt=0;const L=new Map,M=new Map,U={fromAttribute(c,f){if(f===Boolean)return c!==null;if(f===Number)return c===null?void 0:parseFloat(c);if(f===Object||f===Array)try{return JSON.parse(c)}catch{return c}return c},toAttribute(c,f){return f===Boolean?c?"":null:f===Object||f===Array?JSON.stringify(c):c==null?null:String(c)}};function g(c){this._suppressInvalidation||this.constructor.getMetadata().isLanguageAware()&&O()||(this.onInvalidation(c),this._changedState.push(c),$(this),this._invalidationEventProvider.fireEvent("invalidate",{...c,target:this}))}function dt(c,f){do{const t=Object.getOwnPropertyDescriptor(c,f);if(t)return t;c=Object.getPrototypeOf(c)}while(c&&c!==HTMLElement.prototype)}class S extends HTMLElement{constructor(){super();this.__shouldHydrate=!1;this._rendered=!1;const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new b,this._componentStateFinalizedEventProvider=new b;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o)}}),this._internals=this.attachInternals(),this._initShadowRoot()}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.shadowRoot?this.__shouldHydrate=!0:this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this))}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren()}get _id(){return this.__id||(this.__id=`ui5wc_${++lt}`),this.__id}render(){const t=this.constructor.template;return st(t,this)}async connectedCallback(){const t=this.constructor;K(this),this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&!this.hasAttribute("data-sap-ui-fastnavgroup")&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),t.asyncFinished||await t._definePromise,!(t.getMetadata().isLanguageAware()&&O())&&this._inDOM&&(z(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>{this.focus()}))}get definePromise(){const t=this.constructor;return!t.asyncFinished&&t._definePromise?t._definePromise:Promise.resolve()}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),B(this),q(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:!0,subtree:n,characterData:n};Y(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){G(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,i=new Map;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;i.set(d,l),o.set(d,[...this._state[d]]),this._clearSlot(l,h)}const r=new Map,a=new Map;n.forEach((l,h)=>{const d=T(l),p=e[d];if(p===void 0){if(d!=="default"){const I=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${d}, ignoring`,l,`Valid values are: ${I}`)}return}const _=p.propertyName||d;a.has(_)?a.get(_).push({child:l,idx:h}):a.set(_,[{child:l,idx:h}])}),a.forEach((l,h)=>{this._state[h]=l.sort((d,p)=>d.idx-p.idx).map(d=>d.child),this._state[m(h)]=this._state[h]});const u=n.map(async l=>{const h=T(l),d=e[h];if(d!==void 0){if(d.individualSlots){const p=(r.get(h)||0)+1;r.set(h,p),l._individualSlot=`${h}-${p}`}if(l instanceof HTMLElement){const p=l.localName;if(p.includes("-")&&!H(p)){if(!customElements.get(p)){const k=customElements.whenDefined(p);let E=L.get(p);E||(E=new Promise(F=>setTimeout(F,1e3)),L.set(p,E)),await Promise.race([k,E])}customElements.upgrade(l)}}if(l=t.getMetadata().constructor.validateSlotValue(l,d),y(l)&&d.invalidateOnChildChange){const p=this._getChildChangeListener(h);l.attachInvalidate.call(l,p)}l instanceof HTMLSlotElement&&this._attachSlotChange(l,h,!!d.invalidateOnChildChange)}});await Promise.all(u);let v=!1;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;et(o.get(d),this._state[d])||(g.call(this,{type:"slot",name:i.get(d),reason:"children"}),v=!0,t.getMetadata().isFormAssociated()&&R(this))}v||g.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(y(o)){const i=this._getChildChangeListener(t);o.detachInvalidate.call(o,i)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[m(s)]=this._state[s]}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&g.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),i=t.replace(/^ui5-/,""),r=m(i);if(o.hasOwnProperty(r)){const a=o[r];n=(a.converter??U).fromAttribute(s,a.type),this[r]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&ot(this)}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t],i=tt(t),a=(o.converter||U).toAttribute(e,o.type);this._doNotSyncAttributes.add(i),a==null?this.removeAttribute(i):this.setAttribute(i,a),this._doNotSyncAttributes.delete(i)}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const i=this._slotsAssignedNodes.get(t);i&&i.forEach(a=>{if(y(a)){const u=this._getChildChangeListener(e);a.detachInvalidate.call(a,u)}});const r=D([t]);this._slotsAssignedNodes.set(t,r),r.forEach(a=>{if(y(a)){const u=this._getChildChangeListener(e);a.attachInvalidate.call(a,u)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){g.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s])}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n}),this.initializedProperties.clear()),this._suppressInvalidation=!0;try{this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized")}finally{this._suppressInvalidation=!1}this._changedState=[],t._needsShadowDOM()&&j(this),this._rendered=!0,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this||!this.isConnected?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,s=!1,n=!0){const o=this._fireEvent(t,e,s,n),i=P(t);return i!==t?o&&this._fireEvent(i,e,s,n):o}fireDecoratorEvent(t,e){const s=this.getEventData(t),n=s?s.cancelable:!1,o=s?s.bubbles:!1,i=this._fireEvent(t,e,n,o),r=P(t);return r!==t?i&&this._fireEvent(r,e,n,o):i}_fireEvent(t,e,s=!1,n=!0){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:n,cancelable:s}),i=this.dispatchEvent(o);if(Q(t))return i;const r=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&i}getEventData(t){return this.constructor.getMetadata().getEvents()[t]}getSlottedNodes(t){return D(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return nt(this.constructor),Z(this)}get isUI5Element(){return!0}get isUI5AbstractElement(){return!this.constructor._needsShadowDOM()}get classes(){return{}}get accessibilityInfo(){}static get observedAttributes(){return this.getMetadata().getAttributesList()}static get tagsToScope(){const t=this.getMetadata().getPureTag(),e=this.getUniqueDependencies().map(s=>s.getMetadata().getPureTag()).filter(A);return A(t)&&e.push(t),e}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){w(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const i=dt(t,n);let r;i?.set&&(r=i.set);let a;i?.get&&(a=i.get),Object.defineProperty(t,n,{get(){return a?a.call(this):this._state[n]},set(u){const v=this.constructor,l=a?a.call(this):this._state[n];if(l!==u){if(r?r.call(this,u):this._state[n]=u,g.call(this,{type:"property",name:n,newValue:u,oldValue:l}),this._rendered){const d=a?a.call(this):this._state[n];this._updateAttribute(n,d)}v.getMetadata().isFormAssociated()&&R(this)}}})}if(e){const n=this.getMetadata().getSlots();for(const[o,i]of Object.entries(n)){w(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const r=i.propertyName||o,a={get(){return this._state[r]!==void 0?this._state[r]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,r,a),r!==m(r)&&Object.defineProperty(t,m(r),a)}}}static{this.metadata={}}static{this.styles=""}static get dependencies(){return[]}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);M.set(this,t)}static getUniqueDependencies(){return M.has(this)||this.cacheUniqueDependencies(),M.get(this)||[]}static async onDefine(){return Promise.resolve()}static fetchI18nBundles(){return Promise.all(Object.entries(this.getMetadata().getI18n()).map(t=>{const{bundleName:e}=t[1];return at(e)}))}static fetchCLDR(){return this.getMetadata().needsCLDR()?it(C().getLanguage(),C().getRegion(),C().getScript()):Promise.resolve()}static{this.i18nBundleStorage={}}static get i18nBundles(){return this.i18nBundleStorage}static define(){const t=async()=>{await x();const o=await Promise.all([this.fetchI18nBundles(),this.fetchCLDR(),this.onDefine()]),[i]=o;Object.entries(this.getMetadata().getI18n()).forEach((r,a)=>{const u=r[1].bundleName;this.i18nBundleStorage[u]=i[a]}),this.asyncFinished=!0};this._definePromise=t();const e=this.getMetadata().getTag(),s=J(e),n=customElements.get(e);return n&&!s?X(e):n||(this._generateAccessors(),W(e),customElements.define(e,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==S;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=N({},...t);return this._metadata=new V(s),this._metadata}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}}const y=rt("isUI5Element");export default S;export{y as instanceOfUI5Element};
|
|
1
|
+
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import N from"./thirdparty/merge.js";import{boot as x}from"./Boot.js";import V from"./UI5ElementMetadata.js";import b from"./EventProvider.js";import j from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as H}from"./IgnoreCustomElements.js";import{renderDeferred as $,renderImmediately as z,cancelRender as B,unregisterElement as q,registerElement as K}from"./Render.js";import{registerTag as W,isTagRegistered as X,recordTagRegistrationFailure as J}from"./CustomElementsRegistry.js";import{observeDOMNode as Y,unobserveDOMNode as G}from"./DOMObserver.js";import{skipOriginalEvent as Q}from"./config/NoConflict.js";import Z from"./locale/getEffectiveDir.js";import{kebabToCamelCase as m,camelToKebabCase as tt,kebabToPascalCase as P}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as T,getSlottedNodesList as D}from"./util/SlotsHelper.js";import et from"./util/arraysAreEqual.js";import{markAsRtlAware as nt}from"./locale/RTLAwareRegistry.js";import st from"./renderer/executeTemplate.js";import{shouldScopeCustomElement as A}from"./CustomElementsScopeUtils.js";import{updateFormValue as ot,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getI18nBundle as at}from"./i18nBundle.js";import{fetchCldr as it}from"./asset-registries/LocaleData.js";import C from"./locale/getLocale.js";import{getLanguageChangePending as O}from"./config/Language.js";import rt from"./util/createInstanceChecker.js";let lt=0;const L=new Map,M=new Map,U={fromAttribute(c,f){if(f===Boolean)return c!==null;if(f===Number)return c===null?void 0:parseFloat(c);if(f===Object||f===Array)try{return JSON.parse(c)}catch{return c}return c},toAttribute(c,f){return f===Boolean?c?"":null:f===Object||f===Array||c==null?null:String(c)}};function g(c){this._suppressInvalidation||this.constructor.getMetadata().isLanguageAware()&&O()||(this.onInvalidation(c),this._changedState.push(c),$(this),this._invalidationEventProvider.fireEvent("invalidate",{...c,target:this}))}function dt(c,f){do{const t=Object.getOwnPropertyDescriptor(c,f);if(t)return t;c=Object.getPrototypeOf(c)}while(c&&c!==HTMLElement.prototype)}class S extends HTMLElement{constructor(){super();this.__shouldHydrate=!1;this._rendered=!1;const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new b,this._componentStateFinalizedEventProvider=new b;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o)}}),this._internals=this.attachInternals(),this._initShadowRoot()}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.shadowRoot?this.__shouldHydrate=!0:this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this))}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren()}get _id(){return this.__id||(this.__id=`ui5wc_${++lt}`),this.__id}render(){const t=this.constructor.template;return st(t,this)}async connectedCallback(){const t=this.constructor;K(this),this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&!this.hasAttribute("data-sap-ui-fastnavgroup")&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),t.asyncFinished||await t._definePromise,!(t.getMetadata().isLanguageAware()&&O())&&this._inDOM&&(z(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>{this.focus()}))}get definePromise(){const t=this.constructor;return!t.asyncFinished&&t._definePromise?t._definePromise:Promise.resolve()}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),B(this),q(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:!0,subtree:n,characterData:n};Y(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){G(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,i=new Map;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;i.set(d,l),o.set(d,[...this._state[d]]),this._clearSlot(l,h)}const r=new Map,a=new Map;n.forEach((l,h)=>{const d=T(l),p=e[d];if(p===void 0){if(d!=="default"){const I=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${d}, ignoring`,l,`Valid values are: ${I}`)}return}const _=p.propertyName||d;a.has(_)?a.get(_).push({child:l,idx:h}):a.set(_,[{child:l,idx:h}])}),a.forEach((l,h)=>{this._state[h]=l.sort((d,p)=>d.idx-p.idx).map(d=>d.child),this._state[m(h)]=this._state[h]});const u=n.map(async l=>{const h=T(l),d=e[h];if(d!==void 0){if(d.individualSlots){const p=(r.get(h)||0)+1;r.set(h,p),l._individualSlot=`${h}-${p}`}if(l instanceof HTMLElement){const p=l.localName;if(p.includes("-")&&!H(p)){if(!customElements.get(p)){const k=customElements.whenDefined(p);let E=L.get(p);E||(E=new Promise(F=>setTimeout(F,1e3)),L.set(p,E)),await Promise.race([k,E])}customElements.upgrade(l)}}if(l=t.getMetadata().constructor.validateSlotValue(l,d),y(l)&&d.invalidateOnChildChange){const p=this._getChildChangeListener(h);l.attachInvalidate.call(l,p)}l instanceof HTMLSlotElement&&this._attachSlotChange(l,h,!!d.invalidateOnChildChange)}});await Promise.all(u);let v=!1;for(const[l,h]of Object.entries(e)){const d=h.propertyName||l;et(o.get(d),this._state[d])||(g.call(this,{type:"slot",name:i.get(d),reason:"children"}),v=!0,t.getMetadata().isFormAssociated()&&R(this))}v||g.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(y(o)){const i=this._getChildChangeListener(t);o.detachInvalidate.call(o,i)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[m(s)]=this._state[s]}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&g.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),i=t.replace(/^ui5-/,""),r=m(i);if(o.hasOwnProperty(r)){const a=o[r];n=(a.converter??U).fromAttribute(s,a.type),this[r]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&ot(this)}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t];if(o.type===Object||o.type===Array)return;const i=tt(t),a=(o.converter||U).toAttribute(e,o.type);this._doNotSyncAttributes.add(i),a==null?this.removeAttribute(i):this.setAttribute(i,a),this._doNotSyncAttributes.delete(i)}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const i=this._slotsAssignedNodes.get(t);i&&i.forEach(a=>{if(y(a)){const u=this._getChildChangeListener(e);a.detachInvalidate.call(a,u)}});const r=D([t]);this._slotsAssignedNodes.set(t,r),r.forEach(a=>{if(y(a)){const u=this._getChildChangeListener(e);a.attachInvalidate.call(a,u)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){g.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s])}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n}),this.initializedProperties.clear()),this._suppressInvalidation=!0;try{this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized")}finally{this._suppressInvalidation=!1}this._changedState=[],t._needsShadowDOM()&&j(this),this._rendered=!0,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this||!this.isConnected?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,s=!1,n=!0){const o=this._fireEvent(t,e,s,n),i=P(t);return i!==t?o&&this._fireEvent(i,e,s,n):o}fireDecoratorEvent(t,e){const s=this.getEventData(t),n=s?s.cancelable:!1,o=s?s.bubbles:!1,i=this._fireEvent(t,e,n,o),r=P(t);return r!==t?i&&this._fireEvent(r,e,n,o):i}_fireEvent(t,e,s=!1,n=!0){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:n,cancelable:s}),i=this.dispatchEvent(o);if(Q(t))return i;const r=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&i}getEventData(t){return this.constructor.getMetadata().getEvents()[t]}getSlottedNodes(t){return D(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return nt(this.constructor),Z(this)}get isUI5Element(){return!0}get isUI5AbstractElement(){return!this.constructor._needsShadowDOM()}get classes(){return{}}get accessibilityInfo(){}static get observedAttributes(){return this.getMetadata().getAttributesList()}static get tagsToScope(){const t=this.getMetadata().getPureTag(),e=this.getUniqueDependencies().map(s=>s.getMetadata().getPureTag()).filter(A);return A(t)&&e.push(t),e}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){w(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const i=dt(t,n);let r;i?.set&&(r=i.set);let a;i?.get&&(a=i.get),Object.defineProperty(t,n,{get(){return a?a.call(this):this._state[n]},set(u){const v=this.constructor,l=a?a.call(this):this._state[n];if(l!==u){if(r?r.call(this,u):this._state[n]=u,g.call(this,{type:"property",name:n,newValue:u,oldValue:l}),this._rendered){const d=a?a.call(this):this._state[n];this._updateAttribute(n,d)}v.getMetadata().isFormAssociated()&&R(this)}}})}if(e){const n=this.getMetadata().getSlots();for(const[o,i]of Object.entries(n)){w(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const r=i.propertyName||o,a={get(){return this._state[r]!==void 0?this._state[r]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,r,a),r!==m(r)&&Object.defineProperty(t,m(r),a)}}}static{this.metadata={}}static{this.styles=""}static get dependencies(){return[]}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);M.set(this,t)}static getUniqueDependencies(){return M.has(this)||this.cacheUniqueDependencies(),M.get(this)||[]}static async onDefine(){return Promise.resolve()}static fetchI18nBundles(){return Promise.all(Object.entries(this.getMetadata().getI18n()).map(t=>{const{bundleName:e}=t[1];return at(e)}))}static fetchCLDR(){return this.getMetadata().needsCLDR()?it(C().getLanguage(),C().getRegion(),C().getScript()):Promise.resolve()}static{this.i18nBundleStorage={}}static get i18nBundles(){return this.i18nBundleStorage}static define(){const t=async()=>{await x();const o=await Promise.all([this.fetchI18nBundles(),this.fetchCLDR(),this.onDefine()]),[i]=o;Object.entries(this.getMetadata().getI18n()).forEach((r,a)=>{const u=r[1].bundleName;this.i18nBundleStorage[u]=i[a]}),this.asyncFinished=!0};this._definePromise=t();const e=this.getMetadata().getTag(),s=X(e),n=customElements.get(e);return n&&!s?J(e):n||(this._generateAccessors(),W(e),customElements.define(e,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==S;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=N({},...t);return this._metadata=new V(s),this._metadata}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}}const y=rt("isUI5Element");export default S;export{y as instanceOfUI5Element};
|
|
2
2
|
//# sourceMappingURL=UI5Element.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/UI5Element.ts"],
|
|
4
|
-
"sourcesContent": ["// eslint-disable-next-line import/no-extraneous-dependencies\nimport \"@ui5/webcomponents-base/dist/ssr-dom.js\";\nimport type { JSX } from \"./jsx-runtime.js\";\nimport merge from \"./thirdparty/merge.js\";\nimport { boot } from \"./Boot.js\";\nimport UI5ElementMetadata from \"./UI5ElementMetadata.js\";\nimport type {\n\tSlot as SlotMetadata,\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\tunregisterElement,\n\tregisterElement,\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 { kebabToCamelCase, camelToKebabCase, kebabToPascalCase } 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 { shouldScopeCustomElement } from \"./CustomElementsScopeUtils.js\";\nimport type { TemplateFunction } from \"./renderer/executeTemplate.js\";\nimport type {\n\tAccessibilityInfo,\n\tPromiseResolve,\n\tComponentStylesData,\n\tClassMap,\n} from \"./types.js\";\nimport { updateFormValue, setFormValue } from \"./features/InputElementsFormSupport.js\";\nimport type { IFormInputElement } from \"./features/InputElementsFormSupport.js\";\nimport { getI18nBundle } from \"./i18nBundle.js\";\nimport type I18nBundle from \"./i18nBundle.js\";\nimport { fetchCldr } from \"./asset-registries/LocaleData.js\";\nimport getLocale from \"./locale/getLocale.js\";\nimport { getLanguageChangePending } from \"./config/Language.js\";\nimport createInstanceChecker from \"./util/createInstanceChecker.js\";\n\n;\nlet autoId = 0;\n\nconst elementTimeouts = new Map<string, Promise<void>>();\nconst uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();\n\ntype Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => void;\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\ntype SlottedChild = Record<string, any>;\n\nconst defaultConverter = {\n\tfromAttribute(value: string | null, type: unknown) {\n\t\tif (type === Boolean) {\n\t\t\treturn value !== null;\n\t\t}\n\t\tif (type === Number) {\n\t\t\treturn value === null ? undefined : parseFloat(value);\n\t\t}\n\n\t\tif (type === Object || type === Array) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(value as string) as object | Array<unknown>;\n\t\t\t} catch {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\ttoAttribute(value: unknown, type: unknown) {\n\t\tif (type === Boolean) {\n\t\t\treturn value as boolean ? \"\" : null;\n\t\t}\n\n\t\t// don't set attributes for arrays and objects\n\t\tif (type === Object || type === Array) {\n\t\t\treturn JSON.stringify(value);\n\t\t}\n\n\t\t// object, array, other\n\t\tif (value === null || value === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn String(value);\n\t},\n};\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\tconst ctor = this.constructor as typeof UI5Element;\n\n\t// Skip re-rendering of language-aware components while language-specific data (e.g., CLDR, language bundles) is still loading.\n\t// Once all necessary language data has been loaded, the language change\n\t// will trigger a re-render of all language-aware components.\n\tif (ctor.getMetadata().isLanguageAware() && getLanguageChangePending()) {\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\ntype NotEqual<X, Y> = true extends Equal<X, Y> ? false : true\ntype Equal<X, Y> =\n\t(<T>() => T extends X ? 1 : 2) extends\n\t(<T>() => T extends Y ? 1 : 2) ? true : false\n\n// JSX support\ntype IsAny<T, Y, N> = 0 extends (1 & T) ? Y : N\n// type Convert<T> = { [Property in keyof T as `on${KebabToPascal<string & Property>}` ]: T[Property] extends IsAny<T> ? any : (e: CustomEvent<T[Property]>) => void }\ntype KebabToCamel<T extends string> = T extends `${infer H}-${infer J}${infer K}`\n\t? `${Uncapitalize<H>}${Capitalize<J>}${KebabToCamel<K>}`\n\t: T;\ntype KebabToPascal<T extends string> = Capitalize<KebabToCamel<T>>;\n\ntype GlobalHTMLAttributeNames = \"accesskey\" | \"autocapitalize\" | \"autofocus\" | \"autocomplete\" | \"contenteditable\" | \"contextmenu\" | \"class\" | \"dir\" | \"draggable\" | \"enterkeyhint\" | \"hidden\" | \"id\" | \"inputmode\" | \"lang\" | \"nonce\" | \"part\" | \"exportparts\" | \"pattern\" | \"slot\" | \"spellcheck\" | \"style\" | \"tabIndex\" | \"tabindex\" | \"title\" | \"translate\" | \"ref\" | \"inert\" | \"role\";\ntype ElementProps<I> = Partial<Omit<I, keyof HTMLElement>>;\ntype TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, \"currentTarget\"> & { currentTarget: T };\n// define as method and extract the function signature from the method to make it bivariant so that inheritance of event handlers is not checked via strictFunctionTypes\n// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#strict-function-types\ntype TargetedEventHandler<D, T> = {\n\tasMethod(e: TargetedCustomEvent<D, T>): void\n}[\"asMethod\"];\ntype Convert<T, K extends UI5Element> = { [Property in keyof T as `on${KebabToPascal<string & Property>}`]: IsAny<T[Property], any, TargetedEventHandler<T[Property], K>> }\n\n// Create a unique symbol as a marker\ndeclare const SlotMarker: unique symbol;\ndeclare const DefaultSlotMarker: unique symbol;\n\nexport type Slot<T> = T[] & { [SlotMarker]: true };\nexport type DefaultSlot<T> = T[] & { [DefaultSlotMarker]: true };\n\nexport type IsSlot<T> = T extends { [SlotMarker]: true } ? true : T extends { [DefaultSlotMarker]: true } ? true : false;\nexport type IsDefaultSlot<T> = T extends { [DefaultSlotMarker]: true } ? true : false;\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\teventDetails!: NotEqual<this, UI5Element> extends true ? object : {\n\t\t[k: string]: any\n\t};\n\t_jsxEvents!: Omit<JSX.DOMAttributes<this>, keyof Convert<this[\"eventDetails\"], this> | \"onClose\" | \"onToggle\" | \"onChange\" | \"onSelect\" | \"onInput\"> & Convert<this[\"eventDetails\"], this>;\n\t_jsxProps!: Pick<JSX.AllHTMLAttributes<HTMLElement>, GlobalHTMLAttributeNames> & ElementProps<this> & Partial<this[\"_jsxEvents\"]> & { key?: any };\n\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_slotsAssignedNodes: WeakMap<HTMLSlotElement, Array<SlotValue>>;\n\t_slotChangeListeners: Map<string, SlotChangeListener>;\n\t_domRefReadyPromise: Promise<void> & { _deferredResolve?: PromiseResolve };\n\t_doNotSyncAttributes: Set<string>;\n\t__shouldHydrate = false;\n\t_state: State;\n\t_internals: ElementInternals;\n\t_individualSlot?: string;\n\t_getRealDomRef?: () => HTMLElement;\n\n\tstatic template?: TemplateFunction;\n\tstatic _metadata: UI5ElementMetadata;\n\n\tstatic renderer: Renderer;\n\tinitializedProperties: Map<string, unknown>;\n\n\t// used to differentiate whether a setter is called from the constructor (from an initializer) or later\n\t// setters from the constructor should not set attributes, this is delegated after the first rendering but is async\n\t// setters after the constructor can set attributes synchronously for more convinient development\n\t_rendered = false;\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\t\tthis._slotsAssignedNodes = new WeakMap(); // map of all nodes, slotted (directly or transitively) per component slot\n\n\t\tthis._state = { ...ctor.getMetadata().getInitialState() };\n\n\t\t// save properties set before element is upgraded, as they will be overriden by the field initializers in the constructor\n\t\tthis.initializedProperties = new Map();\n\t\tconst allProps = (this.constructor as typeof UI5Element).getMetadata().getPropertiesList();\n\t\tallProps.forEach(propertyName => {\n\t\t\tif (this.hasOwnProperty(propertyName)) { // eslint-disable-line\n\t\t\t\tconst value = (this as Record<string, unknown>)[propertyName];\n\t\t\t\tthis.initializedProperties.set(propertyName, value);\n\t\t\t}\n\t\t});\n\t\tthis._internals = this.attachInternals();\n\n\t\tthis._initShadowRoot();\n\t}\n\n\t_initShadowRoot() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tconst defaultOptions = { mode: \"open\" } as ShadowRootInit;\n\t\t\tif (!this.shadowRoot) {\n\t\t\t\tthis.attachShadow({ ...defaultOptions, ...ctor.getMetadata().getShadowRootOptions() });\n\t\t\t} else {\n\t\t\t\t// The shadow root is initially rendered. This applies to case where the component's template\n\t\t\t\t// is inserted into the DOM declaratively using a <template> tag.\n\t\t\t\tthis.__shouldHydrate = true;\n\t\t\t}\n\n\t\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\t\t\tif (slotsAreManaged) {\n\t\t\t\tthis.shadowRoot!.addEventListener(\"slotchange\", this._onShadowRootSlotChange.bind(this));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Note: this \"slotchange\" listener is for slots, rendered in the component's shadow root\n\t */\n\t_onShadowRootSlotChange(e: Event) {\n\t\tconst targetShadowRoot = (e.target as Node)?.getRootNode(); // the \"slotchange\" event target is always a slot element\n\t\tif (targetShadowRoot === this.shadowRoot) { // only for slotchange events that originate from slots, belonging to the component's shadow root\n\t\t\tthis._processChildren();\n\t\t}\n\t}\n\n\t/**\n\t * Returns a unique ID for this UI5 Element.\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\tif (false) {\n\t\t\tconst props = (this.constructor as typeof UI5Element).getMetadata().getProperties();\n\t\t\tfor (const [prop, propData] of Object.entries(props)) { // eslint-disable-line\n\t\t\t\tif (Object.hasOwn(this, prop) && !this.initializedProperties.has(prop)) {\n\t\t\t\t\t// initialized properties should not trigger this error as they will be reassigned, only property initializers will trigger this in case unsupported TS mode\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.error(`[UI5-FWK] ${(this.constructor as typeof UI5Element).getMetadata().getTag()} has a property [${prop}] that is shadowed by the instance. Updates to this property will not invalidate the component. Possible reason is TS target ES2022 or TS useDefineForClassFields`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tregisterElement(this);\n\n\t\tthis.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n\t\tif (ctor.getMetadata().supportsF6FastNavigation() && !this.hasAttribute(\"data-sap-ui-fastnavgroup\")) {\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 (!ctor.asyncFinished) {\n\t\t\tawait ctor._definePromise;\n\t\t}\n\n\t\t// Skip rendering while a language change is in progress to avoid rendering with not fully loaded locale data.\n\t\t// Once the locale data is loaded, the language-aware component will be re-rendered.\n\t\tif (ctor.getMetadata().isLanguageAware() && getLanguageChangePending()) {\n\t\t\treturn;\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\n\t\tif (this.hasAttribute(\"autofocus\")) {\n\t\t\t// Honor the global `autofocus` HTML attribute. Done manually because\n\t\t\t// Firefox/Safari close the autofocus window at end-of-parse, before\n\t\t\t// async UI5 components have rendered their shadow DOM. Per HTML spec,\n\t\t\t// only the first element with `autofocus` in document order wins.\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tthis.focus();\n\t\t\t});\n\t\t}\n\t}\n\n\tget definePromise(): Promise<void> {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tif (!ctor.asyncFinished && ctor._definePromise) {\n\t\t\treturn ctor._definePromise;\n\t\t}\n\t\treturn Promise.resolve();\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\tthis._domRefReadyPromise._deferredResolve!();\n\n\t\tcancelRender(this);\n\t\tunregisterElement(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 mutationObserverOptions = {\n\t\t\tchildList: true,\n\t\t\tsubtree: canSlotText,\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\tdomChildren.forEach((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\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\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\tthis._state[kebabToCamelCase(propertyName)] = this._state[propertyName];\n\t\t});\n\n\t\tconst allChildrenUpgraded = domChildren.map(async child => {\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\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 SlottedChild)._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\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\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, !!slotData.invalidateOnChildChange);\n\t\t\t}\n\t\t});\n\n\t\tawait Promise.all(allChildrenUpgraded);\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\n\t\t\t\tinvalidated = true;\n\n\t\t\t\tif (ctor.getMetadata().isFormAssociated()) {\n\t\t\t\t\tsetFormValue(this as unknown as IFormInputElement);\n\t\t\t\t}\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: SlotMetadata) {\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\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\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\tthis._state[kebabToCamelCase(propertyName)] = this._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\n\t\t\tconst converter = propData.converter ?? defaultConverter;\n\t\t\tnewPropertyValue = converter.fromAttribute(newValue, propData.type);\n\n\t\t\t(this as Record<string, any>)[nameInCamelCase] = newPropertyValue;\n\t\t}\n\t}\n\n\tformAssociatedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tif (!ctor.getMetadata().isFormAssociated()) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdateFormValue(this);\n\t}\n\n\tstatic get formAssociated() {\n\t\treturn this.getMetadata().isFormAssociated();\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\n\t\tconst properties = ctor.getMetadata().getProperties();\n\t\tconst propData = properties[name];\n\t\tconst attrName = camelToKebabCase(name);\n\t\tconst converter = propData.converter || defaultConverter;\n\n\t\tif (false) {\n\t\t\tconst tag = (this.constructor as typeof UI5Element).getMetadata().getTag();\n\t\t\tif (typeof newValue === \"boolean\" && propData.type !== Boolean) {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.error(`[UI5-FWK] boolean value for property [${name}] of component [${tag}] is missing \"{ type: Boolean }\" in its property decorator. Attribute conversion will treat it as a string. If this is intended, pass the value converted to string, otherwise add the type to the property decorator`);\n\t\t\t}\n\t\t\tif (typeof newValue === \"number\" && propData.type !== Number) {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.error(`[UI5-FWK] numeric value for property [${name}] of component [${tag}] is missing \"{ type: Number }\" in its property decorator. Attribute conversion will treat it as a string. If this is intended, pass the value converted to string, otherwise add the type to the property decorator`);\n\t\t\t}\n\t\t\tif (typeof newValue === \"string\" && propData.type && propData.type !== String) {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.error(`[UI5-FWK] string value for property [${name}] of component [${tag}] which has a non-string type [${propData.type}] in its property decorator. Attribute conversion will stop and keep the string value in the property.`);\n\t\t\t}\n\t\t}\n\n\t\tconst newAttrValue = converter.toAttribute(newValue, propData.type);\n\t\tthis._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute\n\t\tif (newAttrValue === null || newAttrValue === undefined) { // null means there must be no attribute for the current value of the property\n\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} else {\n\t\t\tthis.setAttribute(attrName, newAttrValue); // setting attributes from properties should not trigger the property setter again\n\t\t}\n\t\tthis._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute\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(slot: HTMLSlotElement, slotName: string, invalidateOnChildChange: boolean) {\n\t\tconst slotChangeListener = this._getSlotChangeListener(slotName);\n\t\tslot.addEventListener(\"slotchange\", (e: Event) => {\n\t\t\tslotChangeListener.call(slot, e);\n\n\t\t\tif (invalidateOnChildChange) {\n\t\t\t\t// Detach listeners for UI5 Elements that used to be in this slot\n\t\t\t\tconst previousChildren = this._slotsAssignedNodes.get(slot);\n\t\t\t\tif (previousChildren) {\n\t\t\t\t\tpreviousChildren.forEach(child => {\n\t\t\t\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\t\t\t\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Attach listeners for UI5 Elements that are now in this slot\n\t\t\t\tconst newChildren = getSlottedNodesList([slot]);\n\t\t\t\tthis._slotsAssignedNodes.set(slot, newChildren);\n\t\t\t\tnewChildren.forEach(child => {\n\t\t\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\t\t\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\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 * @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 * Note: this \"slotchange\" listener is for slots that are children of the component (in the light dom, as opposed to slots rendered by the component in the shadow root)\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\tupdateAttributes() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst props = ctor.getMetadata().getProperties();\n\t\tfor (const [prop, propData] of Object.entries(props)) { // eslint-disable-line\n\t\t\tthis._updateAttribute(prop, (this as unknown as Record<string, PropertyValue>)[prop]);\n\t\t}\n\t}\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// restore properties that were initialized before `define` by calling the setter\n\t\tif (this.initializedProperties.size > 0) {\n\t\t\tArray.from(this.initializedProperties.entries()).forEach(([prop, value]) => {\n\t\t\t\tdelete (this as Record<string, unknown>)[prop];\n\t\t\t\t(this as Record<string, unknown>)[prop] = value;\n\t\t\t});\n\t\t\tthis.initializedProperties.clear();\n\t\t}\n\t\t// suppress invalidation to prevent state changes scheduling another rendering\n\t\tthis._suppressInvalidation = true;\n\n\t\ttry {\n\t\t\tthis.onBeforeRendering();\n\n\t\t\tif (!this._rendered) {\n\t\t\t\t// first time rendering, previous setters might have been initializers from the constructor - update attributes here\n\t\t\t\tthis.updateAttributes();\n\t\t\t}\n\n\t\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\t\tthis._componentStateFinalizedEventProvider.fireEvent(\"componentStateFinalized\");\n\t\t} finally {\n\t\t\t// always resume normal invalidation handling\n\t\t\tthis._suppressInvalidation = false;\n\t\t}\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\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tupdateShadowRoot(this);\n\t\t}\n\t\tthis._rendered = true;\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\t\tif (focusDomRef === this || !this.isConnected) {\n\t\t\tHTMLElement.prototype.focus.call(this, focusOptions);\n\t\t} else if (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 * @deprecated use fireDecoratorEvent instead\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 pascalCaseEventName = kebabToPascalCase(name);\n\n\t\t// pascal events are more convinient for native react usage\n\t\t// live-change:\n\t\t//\t Before: onlive-change\n\t\t//\t After: onLiveChange\n\t\tif (pascalCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(pascalCaseEventName, data, cancelable, bubbles);\n\t\t}\n\n\t\treturn eventResult;\n\t}\n\n\t/**\n\t * Fires a custom event, configured via the \"event\" decorator.\n\t * @public\n\t * @param name - name of the event\n\t * @param data - additional data for the event\n\t * @returns false, if the event was cancelled (preventDefault called), true otherwise\n\t */\n\tfireDecoratorEvent<N extends keyof this[\"eventDetails\"]>(name: N, data?: this[\"eventDetails\"][N] | undefined): boolean {\n\t\tconst eventData = this.getEventData(name as string);\n\t\tconst cancellable = eventData ? eventData.cancelable : false;\n\t\tconst bubbles = eventData ? eventData.bubbles : false;\n\n\t\tconst eventResult = this._fireEvent(name as string, data, cancellable, bubbles);\n\t\tconst pascalCaseEventName = kebabToPascalCase(name as string);\n\n\t\t// pascal events are more convinient for native react usage\n\t\t// live-change:\n\t\t//\t Before: onlive-change\n\t\t//\t After: onLiveChange\n\t\tif (pascalCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(pascalCaseEventName, data, cancellable, 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\tgetEventData(name: string) {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst eventMap = ctor.getMetadata().getEvents();\n\t\treturn eventMap[name];\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 isUI5AbstractElement(): boolean {\n\t\treturn !(this.constructor as typeof UI5Element)._needsShadowDOM();\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Provides the accessibility information for the component.\n\t *\n\t * **Note:** The default implementation returns `undefined`, indicating that\n\t * the component does not provide any accessibility metadata by default. In such cases,\n\t * consumers of this API may apply their own fallback if needed.\n\t *\n\t * Subclasses overriding this getter must return an object of type `AccessibilityInfo`\n\t * describing the component's accessible name, role, description, and other relevant properties.\n\t *\n\t * If the component is intentionally decorative and should be ignored by assistive\n\t * technologies, return an empty object `{}`.\n\t *\n\t * @private\n\t */\n\tget accessibilityInfo(): AccessibilityInfo | undefined {\n\t\treturn undefined;\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 * Returns all tags, used inside component's template subject to scoping.\n\t * returns {Array[]} // TODO add @\n\t * @private\n\t */\n\tstatic get tagsToScope(): Array<string> {\n\t\tconst componentTag = this.getMetadata().getPureTag();\n\t\tconst tagsToScope = this.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\t\tif (shouldScopeCustomElement(componentTag)) {\n\t\t\ttagsToScope.push(componentTag);\n\t\t}\n\n\t\treturn tagsToScope;\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\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\treturn this._state[prop];\n\t\t\t\t},\n\n\t\t\t\tset(this: UI5Element, value: PropertyValue) {\n\t\t\t\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\t\t\t\tconst oldState = origGet ? origGet.call(this) : this._state[prop];\n\n\t\t\t\t\tconst isDifferent = oldState !== value;\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\n\t\t\t\t\t\tif (this._rendered) {\n\t\t\t\t\t\t\t// the component is already rendered, indicating it is not the constructor -\n\t\t\t\t\t\t\t// therefore the attribute can be set synchronously.\n\n\t\t\t\t\t\t\t// get the effective value of the property,\n\t\t\t\t\t\t\t// as it might differ from the provided value\n\t\t\t\t\t\t\tconst newValue = origGet ? origGet.call(this) : this._state[prop];\n\n\t\t\t\t\t\t\tthis._updateAttribute(prop, newValue);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (ctor.getMetadata().isFormAssociated()) {\n\t\t\t\t\t\t\tsetFormValue(this as unknown as IFormInputElement);\n\t\t\t\t\t\t}\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\tconst propertyDescriptor: PropertyDescriptor = {\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\tObject.defineProperty(proto, propertyName, propertyDescriptor);\n\t\t\t\tif (propertyName !== kebabToCamelCase(propertyName)) {\n\t\t\t\t\tObject.defineProperty(proto, kebabToCamelCase(propertyName), propertyDescriptor);\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)\n\t * - slotted components that the component may need to communicate with\n\t *\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t * @protected\n\t */\n\tstatic get dependencies(): Array<typeof UI5Element> {\n\t\treturn [];\n\t}\n\n\tstatic cacheUniqueDependencies(this: typeof UI5Element): void {\n\t\tconst filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);\n\t\tuniqueDependenciesCache.set(this, filtered);\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\tthis.cacheUniqueDependencies();\n\t\t}\n\n\t\treturn uniqueDependenciesCache.get(this) || [];\n\t}\n\n\t/**\n\t * Hook that will be called upon custom element definition\n\t *\n\t * @protected\n\t * @deprecated use the \"i18n\" decorator for fetching message bundles and the \"cldr\" option in the \"customElements\" decorator for fetching CLDR\n\t */\n\tstatic async onDefine(): Promise<void> {\n\t\treturn Promise.resolve();\n\t}\n\n\tstatic fetchI18nBundles() {\n\t\treturn Promise.all(Object.entries(this.getMetadata().getI18n()).map(pair => {\n\t\t\tconst { bundleName } = pair[1];\n\t\t\treturn getI18nBundle(bundleName);\n\t\t}));\n\t}\n\n\tstatic fetchCLDR() {\n\t\tif (this.getMetadata().needsCLDR()) {\n\t\t\treturn fetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript());\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\n\tstatic asyncFinished: boolean;\n\tstatic _definePromise: Promise<void> | undefined;\n\tstatic i18nBundleStorage: Record<string, I18nBundle> = {};\n\n\tstatic get i18nBundles(): Record<string, I18nBundle> {\n\t\treturn this.i18nBundleStorage;\n\t}\n\n\t/**\n\t * Registers a UI5 Web Component in the browser window object\n\t * @public\n\t */\n\tstatic define(): typeof UI5Element {\n\t\tconst defineSequence = async () => {\n\t\t\tawait boot(); // boot must finish first, because it initializes configuration\n\t\t\tconst result = await Promise.all([\n\t\t\t\tthis.fetchI18nBundles(), // uses configuration\n\t\t\t\tthis.fetchCLDR(),\n\t\t\t\tthis.onDefine(),\n\t\t\t]);\n\t\t\tconst [i18nBundles] = result;\n\t\t\tObject.entries(this.getMetadata().getI18n()).forEach((pair, index) => {\n\t\t\t\tconst bundleName = pair[1].bundleName;\n\t\t\t\tthis.i18nBundleStorage[bundleName] = i18nBundles[index];\n\t\t\t});\n\t\t\tthis.asyncFinished = true;\n\t\t};\n\t\tthis._definePromise = defineSequence();\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\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\tget validity() { return this._internals.validity; }\n\tget validationMessage() { return this._internals.validationMessage; }\n\tcheckValidity() { return this._internals.checkValidity(); }\n\treportValidity() { return this._internals.reportValidity(); }\n}\n\n/**\n * Always use duck-typing to cover all runtimes on the page.\n */\nconst instanceOfUI5Element = createInstanceChecker<UI5Element>(\"isUI5Element\");\n\nexport default UI5Element;\nexport {\n\tinstanceOfUI5Element,\n};\nexport type {\n\tChangeInfo,\n\tInvalidationInfo,\n\tRenderer,\n\tSlottedChild,\n};\n"],
|
|
5
|
-
"mappings": "aACA,MAAO,0CAEP,OAAOA,MAAW,wBAClB,OAAS,QAAAC,MAAY,YACrB,OAAOC,MAAwB,0BAQ/B,OAAOC,MAAmB,qBAC1B,OAAOC,MAAsB,wBA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QAAQ,EAEvC,MAAMC,EAAiBvI,EAAM,CAAC,EAAG,GAAGqI,CAAe,EAEnD,YAAK,UAAY,IAAInI,EAAmBqI,CAAc,EAC/C,KAAK,SACb,CAEA,IAAI,UAAW,CAAE,OAAO,KAAK,WAAW,QAAU,CAClD,IAAI,mBAAoB,CAAE,OAAO,KAAK,WAAW,iBAAmB,CACpE,eAAgB,CAAE,OAAO,KAAK,WAAW,cAAc,CAAG,CAC1D,gBAAiB,CAAE,OAAO,KAAK,WAAW,eAAe,CAAG,CAC7D,CAKA,MAAMxD,EAAuB7C,GAAkC,cAAc,EAE7E,eAAea,EACf,OACCgC,KAAA",
|
|
4
|
+
"sourcesContent": ["// eslint-disable-next-line import/no-extraneous-dependencies\nimport \"@ui5/webcomponents-base/dist/ssr-dom.js\";\nimport type { JSX } from \"./jsx-runtime.js\";\nimport merge from \"./thirdparty/merge.js\";\nimport { boot } from \"./Boot.js\";\nimport UI5ElementMetadata from \"./UI5ElementMetadata.js\";\nimport type {\n\tSlot as SlotMetadata,\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\tunregisterElement,\n\tregisterElement,\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 { kebabToCamelCase, camelToKebabCase, kebabToPascalCase } 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 { shouldScopeCustomElement } from \"./CustomElementsScopeUtils.js\";\nimport type { TemplateFunction } from \"./renderer/executeTemplate.js\";\nimport type {\n\tAccessibilityInfo,\n\tPromiseResolve,\n\tComponentStylesData,\n\tClassMap,\n} from \"./types.js\";\nimport { updateFormValue, setFormValue } from \"./features/InputElementsFormSupport.js\";\nimport type { IFormInputElement } from \"./features/InputElementsFormSupport.js\";\nimport { getI18nBundle } from \"./i18nBundle.js\";\nimport type I18nBundle from \"./i18nBundle.js\";\nimport { fetchCldr } from \"./asset-registries/LocaleData.js\";\nimport getLocale from \"./locale/getLocale.js\";\nimport { getLanguageChangePending } from \"./config/Language.js\";\nimport createInstanceChecker from \"./util/createInstanceChecker.js\";\n\n;\nlet autoId = 0;\n\nconst elementTimeouts = new Map<string, Promise<void>>();\nconst uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();\n\ntype Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => void;\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\ntype SlottedChild = Record<string, any>;\n\nconst defaultConverter = {\n\tfromAttribute(value: string | null, type: unknown) {\n\t\tif (type === Boolean) {\n\t\t\treturn value !== null;\n\t\t}\n\t\tif (type === Number) {\n\t\t\treturn value === null ? undefined : parseFloat(value);\n\t\t}\n\n\t\tif (type === Object || type === Array) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(value as string) as object | Array<unknown>;\n\t\t\t} catch {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\ttoAttribute(value: unknown, type: unknown) {\n\t\tif (type === Boolean) {\n\t\t\treturn value as boolean ? \"\" : null;\n\t\t}\n\n\t\t// Don't reflect arrays and objects to the DOM. Attributes exist for CSS selectors\n\t\t// (which don't apply to objects/arrays) and for debugging via the Elements panel\n\t\t// (devs will use the console with property access for these). Declarative\n\t\t// attribute -> property is still supported via fromAttribute (JSON.parse).\n\t\tif (type === Object || type === Array) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (value === null || value === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn String(value);\n\t},\n};\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\tconst ctor = this.constructor as typeof UI5Element;\n\n\t// Skip re-rendering of language-aware components while language-specific data (e.g., CLDR, language bundles) is still loading.\n\t// Once all necessary language data has been loaded, the language change\n\t// will trigger a re-render of all language-aware components.\n\tif (ctor.getMetadata().isLanguageAware() && getLanguageChangePending()) {\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\ntype NotEqual<X, Y> = true extends Equal<X, Y> ? false : true\ntype Equal<X, Y> =\n\t(<T>() => T extends X ? 1 : 2) extends\n\t(<T>() => T extends Y ? 1 : 2) ? true : false\n\n// JSX support\ntype IsAny<T, Y, N> = 0 extends (1 & T) ? Y : N\n// type Convert<T> = { [Property in keyof T as `on${KebabToPascal<string & Property>}` ]: T[Property] extends IsAny<T> ? any : (e: CustomEvent<T[Property]>) => void }\ntype KebabToCamel<T extends string> = T extends `${infer H}-${infer J}${infer K}`\n\t? `${Uncapitalize<H>}${Capitalize<J>}${KebabToCamel<K>}`\n\t: T;\ntype KebabToPascal<T extends string> = Capitalize<KebabToCamel<T>>;\n\ntype GlobalHTMLAttributeNames = \"accesskey\" | \"autocapitalize\" | \"autofocus\" | \"autocomplete\" | \"contenteditable\" | \"contextmenu\" | \"class\" | \"dir\" | \"draggable\" | \"enterkeyhint\" | \"hidden\" | \"id\" | \"inputmode\" | \"lang\" | \"nonce\" | \"part\" | \"exportparts\" | \"pattern\" | \"slot\" | \"spellcheck\" | \"style\" | \"tabIndex\" | \"tabindex\" | \"title\" | \"translate\" | \"ref\" | \"inert\" | \"role\";\ntype ElementProps<I> = Partial<Omit<I, keyof HTMLElement>>;\ntype TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, \"currentTarget\"> & { currentTarget: T };\n// define as method and extract the function signature from the method to make it bivariant so that inheritance of event handlers is not checked via strictFunctionTypes\n// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#strict-function-types\ntype TargetedEventHandler<D, T> = {\n\tasMethod(e: TargetedCustomEvent<D, T>): void\n}[\"asMethod\"];\ntype Convert<T, K extends UI5Element> = { [Property in keyof T as `on${KebabToPascal<string & Property>}`]: IsAny<T[Property], any, TargetedEventHandler<T[Property], K>> }\n\n// Create a unique symbol as a marker\ndeclare const SlotMarker: unique symbol;\ndeclare const DefaultSlotMarker: unique symbol;\n\nexport type Slot<T> = T[] & { [SlotMarker]: true };\nexport type DefaultSlot<T> = T[] & { [DefaultSlotMarker]: true };\n\nexport type IsSlot<T> = T extends { [SlotMarker]: true } ? true : T extends { [DefaultSlotMarker]: true } ? true : false;\nexport type IsDefaultSlot<T> = T extends { [DefaultSlotMarker]: true } ? true : false;\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\teventDetails!: NotEqual<this, UI5Element> extends true ? object : {\n\t\t[k: string]: any\n\t};\n\t_jsxEvents!: Omit<JSX.DOMAttributes<this>, keyof Convert<this[\"eventDetails\"], this> | \"onClose\" | \"onToggle\" | \"onChange\" | \"onSelect\" | \"onInput\"> & Convert<this[\"eventDetails\"], this>;\n\t_jsxProps!: Pick<JSX.AllHTMLAttributes<HTMLElement>, GlobalHTMLAttributeNames> & ElementProps<this> & Partial<this[\"_jsxEvents\"]> & { key?: any };\n\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_slotsAssignedNodes: WeakMap<HTMLSlotElement, Array<SlotValue>>;\n\t_slotChangeListeners: Map<string, SlotChangeListener>;\n\t_domRefReadyPromise: Promise<void> & { _deferredResolve?: PromiseResolve };\n\t_doNotSyncAttributes: Set<string>;\n\t__shouldHydrate = false;\n\t_state: State;\n\t_internals: ElementInternals;\n\t_individualSlot?: string;\n\t_getRealDomRef?: () => HTMLElement;\n\n\tstatic template?: TemplateFunction;\n\tstatic _metadata: UI5ElementMetadata;\n\n\tstatic renderer: Renderer;\n\tinitializedProperties: Map<string, unknown>;\n\n\t// used to differentiate whether a setter is called from the constructor (from an initializer) or later\n\t// setters from the constructor should not set attributes, this is delegated after the first rendering but is async\n\t// setters after the constructor can set attributes synchronously for more convinient development\n\t_rendered = false;\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\t\tthis._slotsAssignedNodes = new WeakMap(); // map of all nodes, slotted (directly or transitively) per component slot\n\n\t\tthis._state = { ...ctor.getMetadata().getInitialState() };\n\n\t\t// save properties set before element is upgraded, as they will be overriden by the field initializers in the constructor\n\t\tthis.initializedProperties = new Map();\n\t\tconst allProps = (this.constructor as typeof UI5Element).getMetadata().getPropertiesList();\n\t\tallProps.forEach(propertyName => {\n\t\t\tif (this.hasOwnProperty(propertyName)) { // eslint-disable-line\n\t\t\t\tconst value = (this as Record<string, unknown>)[propertyName];\n\t\t\t\tthis.initializedProperties.set(propertyName, value);\n\t\t\t}\n\t\t});\n\t\tthis._internals = this.attachInternals();\n\n\t\tthis._initShadowRoot();\n\t}\n\n\t_initShadowRoot() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tconst defaultOptions = { mode: \"open\" } as ShadowRootInit;\n\t\t\tif (!this.shadowRoot) {\n\t\t\t\tthis.attachShadow({ ...defaultOptions, ...ctor.getMetadata().getShadowRootOptions() });\n\t\t\t} else {\n\t\t\t\t// The shadow root is initially rendered. This applies to case where the component's template\n\t\t\t\t// is inserted into the DOM declaratively using a <template> tag.\n\t\t\t\tthis.__shouldHydrate = true;\n\t\t\t}\n\n\t\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\t\t\tif (slotsAreManaged) {\n\t\t\t\tthis.shadowRoot!.addEventListener(\"slotchange\", this._onShadowRootSlotChange.bind(this));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Note: this \"slotchange\" listener is for slots, rendered in the component's shadow root\n\t */\n\t_onShadowRootSlotChange(e: Event) {\n\t\tconst targetShadowRoot = (e.target as Node)?.getRootNode(); // the \"slotchange\" event target is always a slot element\n\t\tif (targetShadowRoot === this.shadowRoot) { // only for slotchange events that originate from slots, belonging to the component's shadow root\n\t\t\tthis._processChildren();\n\t\t}\n\t}\n\n\t/**\n\t * Returns a unique ID for this UI5 Element.\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\tif (false) {\n\t\t\tconst props = (this.constructor as typeof UI5Element).getMetadata().getProperties();\n\t\t\tfor (const [prop, propData] of Object.entries(props)) { // eslint-disable-line\n\t\t\t\tif (Object.hasOwn(this, prop) && !this.initializedProperties.has(prop)) {\n\t\t\t\t\t// initialized properties should not trigger this error as they will be reassigned, only property initializers will trigger this in case unsupported TS mode\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.error(`[UI5-FWK] ${(this.constructor as typeof UI5Element).getMetadata().getTag()} has a property [${prop}] that is shadowed by the instance. Updates to this property will not invalidate the component. Possible reason is TS target ES2022 or TS useDefineForClassFields`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tregisterElement(this);\n\n\t\tthis.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n\t\tif (ctor.getMetadata().supportsF6FastNavigation() && !this.hasAttribute(\"data-sap-ui-fastnavgroup\")) {\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 (!ctor.asyncFinished) {\n\t\t\tawait ctor._definePromise;\n\t\t}\n\n\t\t// Skip rendering while a language change is in progress to avoid rendering with not fully loaded locale data.\n\t\t// Once the locale data is loaded, the language-aware component will be re-rendered.\n\t\tif (ctor.getMetadata().isLanguageAware() && getLanguageChangePending()) {\n\t\t\treturn;\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\n\t\tif (this.hasAttribute(\"autofocus\")) {\n\t\t\t// Honor the global `autofocus` HTML attribute. Done manually because\n\t\t\t// Firefox/Safari close the autofocus window at end-of-parse, before\n\t\t\t// async UI5 components have rendered their shadow DOM. Per HTML spec,\n\t\t\t// only the first element with `autofocus` in document order wins.\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tthis.focus();\n\t\t\t});\n\t\t}\n\t}\n\n\tget definePromise(): Promise<void> {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tif (!ctor.asyncFinished && ctor._definePromise) {\n\t\t\treturn ctor._definePromise;\n\t\t}\n\t\treturn Promise.resolve();\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\tthis._domRefReadyPromise._deferredResolve!();\n\n\t\tcancelRender(this);\n\t\tunregisterElement(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 mutationObserverOptions = {\n\t\t\tchildList: true,\n\t\t\tsubtree: canSlotText,\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\tdomChildren.forEach((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\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\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\tthis._state[kebabToCamelCase(propertyName)] = this._state[propertyName];\n\t\t});\n\n\t\tconst allChildrenUpgraded = domChildren.map(async child => {\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\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 SlottedChild)._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\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\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, !!slotData.invalidateOnChildChange);\n\t\t\t}\n\t\t});\n\n\t\tawait Promise.all(allChildrenUpgraded);\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\n\t\t\t\tinvalidated = true;\n\n\t\t\t\tif (ctor.getMetadata().isFormAssociated()) {\n\t\t\t\t\tsetFormValue(this as unknown as IFormInputElement);\n\t\t\t\t}\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: SlotMetadata) {\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\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\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\tthis._state[kebabToCamelCase(propertyName)] = this._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\n\t\t\tconst converter = propData.converter ?? defaultConverter;\n\t\t\tnewPropertyValue = converter.fromAttribute(newValue, propData.type);\n\n\t\t\t(this as Record<string, any>)[nameInCamelCase] = newPropertyValue;\n\t\t}\n\t}\n\n\tformAssociatedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tif (!ctor.getMetadata().isFormAssociated()) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdateFormValue(this);\n\t}\n\n\tstatic get formAssociated() {\n\t\treturn this.getMetadata().isFormAssociated();\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\n\t\tconst properties = ctor.getMetadata().getProperties();\n\t\tconst propData = properties[name];\n\n\t\t// Object and Array properties are not reflected to attributes. The attribute is only\n\t\t// consumed as a declarative input (parsed via fromAttribute on attributeChangedCallback),\n\t\t// so the framework must neither write nor remove it - leave any author-set attribute alone.\n\t\tif (propData.type === Object || propData.type === Array) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst attrName = camelToKebabCase(name);\n\t\tconst converter = propData.converter || defaultConverter;\n\n\t\tif (false) {\n\t\t\tconst tag = (this.constructor as typeof UI5Element).getMetadata().getTag();\n\t\t\tif (typeof newValue === \"boolean\" && propData.type !== Boolean) {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.error(`[UI5-FWK] boolean value for property [${name}] of component [${tag}] is missing \"{ type: Boolean }\" in its property decorator. Attribute conversion will treat it as a string. If this is intended, pass the value converted to string, otherwise add the type to the property decorator`);\n\t\t\t}\n\t\t\tif (typeof newValue === \"number\" && propData.type !== Number) {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.error(`[UI5-FWK] numeric value for property [${name}] of component [${tag}] is missing \"{ type: Number }\" in its property decorator. Attribute conversion will treat it as a string. If this is intended, pass the value converted to string, otherwise add the type to the property decorator`);\n\t\t\t}\n\t\t\tif (typeof newValue === \"string\" && propData.type && propData.type !== String) {\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tconsole.error(`[UI5-FWK] string value for property [${name}] of component [${tag}] which has a non-string type [${propData.type}] in its property decorator. Attribute conversion will stop and keep the string value in the property.`);\n\t\t\t}\n\t\t}\n\n\t\tconst newAttrValue = converter.toAttribute(newValue, propData.type);\n\t\tthis._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute\n\t\tif (newAttrValue === null || newAttrValue === undefined) { // null means there must be no attribute for the current value of the property\n\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} else {\n\t\t\tthis.setAttribute(attrName, newAttrValue); // setting attributes from properties should not trigger the property setter again\n\t\t}\n\t\tthis._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute\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(slot: HTMLSlotElement, slotName: string, invalidateOnChildChange: boolean) {\n\t\tconst slotChangeListener = this._getSlotChangeListener(slotName);\n\t\tslot.addEventListener(\"slotchange\", (e: Event) => {\n\t\t\tslotChangeListener.call(slot, e);\n\n\t\t\tif (invalidateOnChildChange) {\n\t\t\t\t// Detach listeners for UI5 Elements that used to be in this slot\n\t\t\t\tconst previousChildren = this._slotsAssignedNodes.get(slot);\n\t\t\t\tif (previousChildren) {\n\t\t\t\t\tpreviousChildren.forEach(child => {\n\t\t\t\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\t\t\t\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Attach listeners for UI5 Elements that are now in this slot\n\t\t\t\tconst newChildren = getSlottedNodesList([slot]);\n\t\t\t\tthis._slotsAssignedNodes.set(slot, newChildren);\n\t\t\t\tnewChildren.forEach(child => {\n\t\t\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\t\t\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\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 * @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 * Note: this \"slotchange\" listener is for slots that are children of the component (in the light dom, as opposed to slots rendered by the component in the shadow root)\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\tupdateAttributes() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst props = ctor.getMetadata().getProperties();\n\t\tfor (const [prop, propData] of Object.entries(props)) { // eslint-disable-line\n\t\t\tthis._updateAttribute(prop, (this as unknown as Record<string, PropertyValue>)[prop]);\n\t\t}\n\t}\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// restore properties that were initialized before `define` by calling the setter\n\t\tif (this.initializedProperties.size > 0) {\n\t\t\tArray.from(this.initializedProperties.entries()).forEach(([prop, value]) => {\n\t\t\t\tdelete (this as Record<string, unknown>)[prop];\n\t\t\t\t(this as Record<string, unknown>)[prop] = value;\n\t\t\t});\n\t\t\tthis.initializedProperties.clear();\n\t\t}\n\t\t// suppress invalidation to prevent state changes scheduling another rendering\n\t\tthis._suppressInvalidation = true;\n\n\t\ttry {\n\t\t\tthis.onBeforeRendering();\n\n\t\t\tif (!this._rendered) {\n\t\t\t\t// first time rendering, previous setters might have been initializers from the constructor - update attributes here\n\t\t\t\tthis.updateAttributes();\n\t\t\t}\n\n\t\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\t\tthis._componentStateFinalizedEventProvider.fireEvent(\"componentStateFinalized\");\n\t\t} finally {\n\t\t\t// always resume normal invalidation handling\n\t\t\tthis._suppressInvalidation = false;\n\t\t}\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\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tupdateShadowRoot(this);\n\t\t}\n\t\tthis._rendered = true;\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\t\tif (focusDomRef === this || !this.isConnected) {\n\t\t\tHTMLElement.prototype.focus.call(this, focusOptions);\n\t\t} else if (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 * @deprecated use fireDecoratorEvent instead\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 pascalCaseEventName = kebabToPascalCase(name);\n\n\t\t// pascal events are more convinient for native react usage\n\t\t// live-change:\n\t\t//\t Before: onlive-change\n\t\t//\t After: onLiveChange\n\t\tif (pascalCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(pascalCaseEventName, data, cancelable, bubbles);\n\t\t}\n\n\t\treturn eventResult;\n\t}\n\n\t/**\n\t * Fires a custom event, configured via the \"event\" decorator.\n\t * @public\n\t * @param name - name of the event\n\t * @param data - additional data for the event\n\t * @returns false, if the event was cancelled (preventDefault called), true otherwise\n\t */\n\tfireDecoratorEvent<N extends keyof this[\"eventDetails\"]>(name: N, data?: this[\"eventDetails\"][N] | undefined): boolean {\n\t\tconst eventData = this.getEventData(name as string);\n\t\tconst cancellable = eventData ? eventData.cancelable : false;\n\t\tconst bubbles = eventData ? eventData.bubbles : false;\n\n\t\tconst eventResult = this._fireEvent(name as string, data, cancellable, bubbles);\n\t\tconst pascalCaseEventName = kebabToPascalCase(name as string);\n\n\t\t// pascal events are more convinient for native react usage\n\t\t// live-change:\n\t\t//\t Before: onlive-change\n\t\t//\t After: onLiveChange\n\t\tif (pascalCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(pascalCaseEventName, data, cancellable, 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\tgetEventData(name: string) {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst eventMap = ctor.getMetadata().getEvents();\n\t\treturn eventMap[name];\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 isUI5AbstractElement(): boolean {\n\t\treturn !(this.constructor as typeof UI5Element)._needsShadowDOM();\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Provides the accessibility information for the component.\n\t *\n\t * **Note:** The default implementation returns `undefined`, indicating that\n\t * the component does not provide any accessibility metadata by default. In such cases,\n\t * consumers of this API may apply their own fallback if needed.\n\t *\n\t * Subclasses overriding this getter must return an object of type `AccessibilityInfo`\n\t * describing the component's accessible name, role, description, and other relevant properties.\n\t *\n\t * If the component is intentionally decorative and should be ignored by assistive\n\t * technologies, return an empty object `{}`.\n\t *\n\t * @private\n\t */\n\tget accessibilityInfo(): AccessibilityInfo | undefined {\n\t\treturn undefined;\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 * Returns all tags, used inside component's template subject to scoping.\n\t * returns {Array[]} // TODO add @\n\t * @private\n\t */\n\tstatic get tagsToScope(): Array<string> {\n\t\tconst componentTag = this.getMetadata().getPureTag();\n\t\tconst tagsToScope = this.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\t\tif (shouldScopeCustomElement(componentTag)) {\n\t\t\ttagsToScope.push(componentTag);\n\t\t}\n\n\t\treturn tagsToScope;\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\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\treturn this._state[prop];\n\t\t\t\t},\n\n\t\t\t\tset(this: UI5Element, value: PropertyValue) {\n\t\t\t\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\t\t\t\tconst oldState = origGet ? origGet.call(this) : this._state[prop];\n\n\t\t\t\t\tconst isDifferent = oldState !== value;\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\n\t\t\t\t\t\tif (this._rendered) {\n\t\t\t\t\t\t\t// the component is already rendered, indicating it is not the constructor -\n\t\t\t\t\t\t\t// therefore the attribute can be set synchronously.\n\n\t\t\t\t\t\t\t// get the effective value of the property,\n\t\t\t\t\t\t\t// as it might differ from the provided value\n\t\t\t\t\t\t\tconst newValue = origGet ? origGet.call(this) : this._state[prop];\n\n\t\t\t\t\t\t\tthis._updateAttribute(prop, newValue);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (ctor.getMetadata().isFormAssociated()) {\n\t\t\t\t\t\t\tsetFormValue(this as unknown as IFormInputElement);\n\t\t\t\t\t\t}\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\tconst propertyDescriptor: PropertyDescriptor = {\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\tObject.defineProperty(proto, propertyName, propertyDescriptor);\n\t\t\t\tif (propertyName !== kebabToCamelCase(propertyName)) {\n\t\t\t\t\tObject.defineProperty(proto, kebabToCamelCase(propertyName), propertyDescriptor);\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)\n\t * - slotted components that the component may need to communicate with\n\t *\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t * @protected\n\t */\n\tstatic get dependencies(): Array<typeof UI5Element> {\n\t\treturn [];\n\t}\n\n\tstatic cacheUniqueDependencies(this: typeof UI5Element): void {\n\t\tconst filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);\n\t\tuniqueDependenciesCache.set(this, filtered);\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\tthis.cacheUniqueDependencies();\n\t\t}\n\n\t\treturn uniqueDependenciesCache.get(this) || [];\n\t}\n\n\t/**\n\t * Hook that will be called upon custom element definition\n\t *\n\t * @protected\n\t * @deprecated use the \"i18n\" decorator for fetching message bundles and the \"cldr\" option in the \"customElements\" decorator for fetching CLDR\n\t */\n\tstatic async onDefine(): Promise<void> {\n\t\treturn Promise.resolve();\n\t}\n\n\tstatic fetchI18nBundles() {\n\t\treturn Promise.all(Object.entries(this.getMetadata().getI18n()).map(pair => {\n\t\t\tconst { bundleName } = pair[1];\n\t\t\treturn getI18nBundle(bundleName);\n\t\t}));\n\t}\n\n\tstatic fetchCLDR() {\n\t\tif (this.getMetadata().needsCLDR()) {\n\t\t\treturn fetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript());\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\n\tstatic asyncFinished: boolean;\n\tstatic _definePromise: Promise<void> | undefined;\n\tstatic i18nBundleStorage: Record<string, I18nBundle> = {};\n\n\tstatic get i18nBundles(): Record<string, I18nBundle> {\n\t\treturn this.i18nBundleStorage;\n\t}\n\n\t/**\n\t * Registers a UI5 Web Component in the browser window object\n\t * @public\n\t */\n\tstatic define(): typeof UI5Element {\n\t\tconst defineSequence = async () => {\n\t\t\tawait boot(); // boot must finish first, because it initializes configuration\n\t\t\tconst result = await Promise.all([\n\t\t\t\tthis.fetchI18nBundles(), // uses configuration\n\t\t\t\tthis.fetchCLDR(),\n\t\t\t\tthis.onDefine(),\n\t\t\t]);\n\t\t\tconst [i18nBundles] = result;\n\t\t\tObject.entries(this.getMetadata().getI18n()).forEach((pair, index) => {\n\t\t\t\tconst bundleName = pair[1].bundleName;\n\t\t\t\tthis.i18nBundleStorage[bundleName] = i18nBundles[index];\n\t\t\t});\n\t\t\tthis.asyncFinished = true;\n\t\t};\n\t\tthis._definePromise = defineSequence();\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\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\tget validity() { return this._internals.validity; }\n\tget validationMessage() { return this._internals.validationMessage; }\n\tcheckValidity() { return this._internals.checkValidity(); }\n\treportValidity() { return this._internals.reportValidity(); }\n}\n\n/**\n * Always use duck-typing to cover all runtimes on the page.\n */\nconst instanceOfUI5Element = createInstanceChecker<UI5Element>(\"isUI5Element\");\n\nexport default UI5Element;\nexport {\n\tinstanceOfUI5Element,\n};\nexport type {\n\tChangeInfo,\n\tInvalidationInfo,\n\tRenderer,\n\tSlottedChild,\n};\n"],
|
|
5
|
+
"mappings": "aACA,MAAO,0CAEP,OAAOA,MAAW,wBAClB,OAAS,QAAAC,MAAY,YACrB,OAAOC,MAAwB,0BAQ/B,OAAOC,MAAmB,qBAC1B,OAAOC,MAAsB,wBAC7B,OAAS,6BAAAC,MAAiC,4BAC1C,OACC,kBAAAC,EACA,qBAAAC,EACA,gBAAAC,EACA,qBAAAC,EACA,mBAAAC,MACM,cACP,OAAS,eAAAC,EAAa,mBAAAC,EAAiB,gCAAAC,MAAoC,8BAC3E,OAAS,kBAAAC,EAAgB,oBAAAC,MAAwB,mBACjD,OAAS,qBAAAC,MAAyB,yBAClC,OAAOC,MAAqB,8BAC5B,OAAS,oBAAAC,EAAkB,oBAAAC,GAAkB,qBAAAC,MAAyB,yBACtE,OAAOC,MAAyB,gCAChC,OAAS,eAAAC,EAAa,uBAAAC,MAA2B,wBACjD,OAAOC,OAAoB,2BAC3B,OAAS,kBAAAC,OAAsB,+BAC/B,OAAOC,OAAqB,gCAC5B,OAAS,4BAAAC,MAAgC,gCAQzC,OAAS,mBAAAC,GAAiB,gBAAAC,MAAoB,yCAE9C,OAAS,iBAAAC,OAAqB,kBAE9B,OAAS,aAAAC,OAAiB,mCAC1B,OAAOC,MAAe,wBACtB,OAAS,4BAAAC,MAAgC,uBACzC,OAAOC,OAA2B,kCAGlC,IAAIC,GAAS,EAEb,MAAMC,EAAkB,IAAI,IACtBC,EAA0B,IAAI,IAsB9BC,EAAmB,CACxB,cAAcC,EAAsBC,EAAe,CAClD,GAAIA,IAAS,QACZ,OAAOD,IAAU,KAElB,GAAIC,IAAS,OACZ,OAAOD,IAAU,KAAO,OAAY,WAAWA,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EACpCE,EAAkB,eAAe,IAAIF,CAAG,EAE9C,OAAIE,GAAmB,CAACD,EACvBtH,EAA6BqH,CAAG,EACrBE,IACX,KAAK,mBAAmB,EACxBzH,EAAYuH,CAAG,EACf,eAAe,OAAOA,EAAK,IAA2C,GAGhE,IACR,CAOA,OAAO,aAAkC,CACxC,GAAI,KAAK,eAAe,WAAW,EAClC,OAAO,KAAK,UAGb,MAAMG,EAAkB,CAAC,KAAK,QAAQ,EACtC,IAAIC,EAAQ,KACZ,KAAOA,IAAUvF,GAChBuF,EAAQ,OAAO,eAAeA,CAAK,EACnCD,EAAgB,QAAQC,EAAM,QAAQ,EAEvC,MAAMC,EAAiBvI,EAAM,CAAC,EAAG,GAAGqI,CAAe,EAEnD,YAAK,UAAY,IAAInI,EAAmBqI,CAAc,EAC/C,KAAK,SACb,CAEA,IAAI,UAAW,CAAE,OAAO,KAAK,WAAW,QAAU,CAClD,IAAI,mBAAoB,CAAE,OAAO,KAAK,WAAW,iBAAmB,CACpE,eAAgB,CAAE,OAAO,KAAK,WAAW,cAAc,CAAG,CAC1D,gBAAiB,CAAE,OAAO,KAAK,WAAW,eAAe,CAAG,CAC7D,CAKA,MAAMxD,EAAuB7C,GAAkC,cAAc,EAE7E,eAAea,EACf,OACCgC,KAAA",
|
|
6
6
|
"names": ["merge", "boot", "UI5ElementMetadata", "EventProvider", "updateShadowRoot", "shouldIgnoreCustomElement", "renderDeferred", "renderImmediately", "cancelRender", "unregisterElement", "registerElement", "registerTag", "isTagRegistered", "recordTagRegistrationFailure", "observeDOMNode", "unobserveDOMNode", "skipOriginalEvent", "getEffectiveDir", "kebabToCamelCase", "camelToKebabCase", "kebabToPascalCase", "isValidPropertyName", "getSlotName", "getSlottedNodesList", "arraysAreEqual", "markAsRtlAware", "executeTemplate", "shouldScopeCustomElement", "updateFormValue", "setFormValue", "getI18nBundle", "fetchCldr", "getLocale", "getLanguageChangePending", "createInstanceChecker", "autoId", "elementTimeouts", "uniqueDependenciesCache", "defaultConverter", "value", "type", "_invalidate", "changeInfo", "getPropertyDescriptor", "proto", "name", "descriptor", "UI5Element", "ctor", "deferredResolve", "resolve", "propertyName", "defaultOptions", "e", "template", "slotsAreManaged", "metadata", "canSlotText", "mutationObserverOptions", "slotsMap", "domChildren", "slotsCachedContentMap", "propertyNameToSlotMap", "slotName", "slotData", "autoIncrementMap", "slottedChildrenMap", "child", "idx", "validValues", "children", "a", "b", "_", "allChildrenUpgraded", "nextIndex", "localName", "whenDefinedPromise", "timeoutPromise", "instanceOfUI5Element", "childChangeListener", "invalidated", "callback", "childChangeInfo", "oldValue", "newValue", "newPropertyValue", "properties", "realName", "nameInCamelCase", "propData", "attrName", "newAttrValue", "slot", "invalidateOnChildChange", "slotChangeListener", "previousChildren", "newChildren", "props", "prop", "hasIndividualSlots", "domRef", "focusOptions", "focusDomRef", "data", "cancelable", "bubbles", "eventResult", "pascalCaseEventName", "eventData", "cancellable", "noConflictEvent", "noConflictEventResult", "normalEvent", "componentTag", "tagsToScope", "dep", "origSet", "origGet", "oldState", "slots", "propertyDescriptor", "filtered", "index", "deps", "pair", "bundleName", "defineSequence", "result", "i18nBundles", "tag", "definedLocally", "definedGlobally", "metadataObjects", "klass", "mergedMetadata"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{camelToKebabCase as i,kebabToCamelCase as l}from"./util/StringHelper.js";import{getSlottedNodes as d}from"./util/SlotsHelper.js";import{getEffectiveScopingSuffixForTag as
|
|
1
|
+
"use strict";import{camelToKebabCase as i,kebabToCamelCase as l}from"./util/StringHelper.js";import{getSlottedNodes as d}from"./util/SlotsHelper.js";import{getEffectiveScopingSuffixForTag as p}from"./CustomElementsScopeUtils.js";class u{constructor(t){this.metadata=t}getInitialState(){if(Object.prototype.hasOwnProperty.call(this,"_initialState"))return this._initialState;const t={};if(this.slotsAreManaged()){const o=this.getSlots();for(const[e,s]of Object.entries(o)){const n=s.propertyName||e;t[n]=[],t[l(n)]=t[n]}}return this._initialState=t,t}static validateSlotValue(t,a){return g(t,a)}getPureTag(){return this.metadata.tag||""}getTag(){const t=this.metadata.tag;if(!t)return"";const a=p(t);return a?`${t}-${a}`:t}hasAttribute(t){return!this.getProperties()[t].noAttribute}getPropertiesList(){return Object.keys(this.getProperties())}getAttributesList(){return this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(i)}canSlotText(){return this.getSlots().default?.type===Node}hasSlots(){return!!Object.entries(this.getSlots()).length}hasIndividualSlots(){return this.slotsAreManaged()&&Object.values(this.getSlots()).some(t=>t.individualSlots)}slotsAreManaged(){return!!this.metadata.managedSlots}supportsF6FastNavigation(){return!!this.metadata.fastNavigation}getProperties(){return this.metadata.properties||(this.metadata.properties={}),this.metadata.properties}getEvents(){return this.metadata.events||(this.metadata.events={}),this.metadata.events}getSlots(){return this.metadata.slots||(this.metadata.slots={}),this.metadata.slots}isLanguageAware(){return!!this.metadata.languageAware}isThemeAware(){return!!this.metadata.themeAware}needsCLDR(){return!!this.metadata.cldr}getShadowRootOptions(){return this.metadata.shadowRootOptions||{}}isFormAssociated(){return!!this.metadata.formAssociated}shouldInvalidateOnChildChange(t,a,o){const e=this.getSlots()[t].invalidateOnChildChange;if(e===void 0)return!1;if(typeof e=="boolean")return e;if(typeof e=="object"){if(a==="property"){if(e.properties===void 0)return!1;if(typeof e.properties=="boolean")return e.properties;if(Array.isArray(e.properties))return e.properties.includes(o);throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected")}if(a==="slot"){if(e.slots===void 0)return!1;if(typeof e.slots=="boolean")return e.slots;if(Array.isArray(e.slots))return e.slots.includes(o);throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected")}}throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected")}getI18n(){return this.metadata.i18n||(this.metadata.i18n={}),this.metadata.i18n}}const g=(r,t)=>(r&&d(r).forEach(a=>{if(!(a instanceof t.type))throw new Error(`The element is not of type ${t.type.toString()}`)}),r);export default u;
|
|
2
2
|
//# sourceMappingURL=UI5ElementMetadata.js.map
|