@ui5/webcomponents-base 1.20.0-rc.2 → 1.20.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/AssetRegistry.d.ts +2 -2
  3. package/dist/AssetRegistry.js +2 -2
  4. package/dist/AssetRegistry.js.map +1 -1
  5. package/dist/ManagedStyles.d.ts +2 -1
  6. package/dist/ManagedStyles.js +18 -1
  7. package/dist/ManagedStyles.js.map +1 -1
  8. package/dist/UI5Element.js +5 -3
  9. package/dist/UI5Element.js.map +1 -1
  10. package/dist/UI5ElementMetadata.d.ts +1 -0
  11. package/dist/UI5ElementMetadata.js +1 -2
  12. package/dist/UI5ElementMetadata.js.map +1 -1
  13. package/dist/asset-registries/Themes.d.ts +4 -3
  14. package/dist/asset-registries/Themes.js +26 -10
  15. package/dist/asset-registries/Themes.js.map +1 -1
  16. package/dist/assets/Boot-45945c31.js +9 -0
  17. package/dist/assets/bundle.esm-56f2cc97.js +50 -0
  18. package/dist/assets/test/pages/{Boot.html-7bc3d21a.js → Boot.html-b412e561.js} +1 -1
  19. package/dist/assets/test/pages/{i18n.html-dfb6b3d5.js → i18n.html-6d41a141.js} +1 -1
  20. package/dist/assets/test/pages/{i18n_texts.html-a4abee47.js → i18n_texts.html-3fee32b8.js} +1 -1
  21. package/dist/css/FontFace.css +13 -1
  22. package/dist/generated/AssetParameters.js +1 -1
  23. package/dist/generated/VersionInfo.js +3 -3
  24. package/dist/generated/css/FontFace.css.js +1 -1
  25. package/dist/generated/css/FontFace.css.js.map +1 -1
  26. package/dist/test/pages/AllTestElements.html +2 -2
  27. package/dist/test/pages/Boot.html +2 -2
  28. package/dist/test/pages/Configuration.html +2 -2
  29. package/dist/test/pages/ConfigurationScript.html +2 -2
  30. package/dist/test/pages/WithComplexTemplate.html +2 -2
  31. package/dist/test/pages/i18n.html +3 -3
  32. package/dist/test/pages/i18n_texts.html +3 -3
  33. package/dist/theming/applyTheme.js +3 -3
  34. package/dist/theming/applyTheme.js.map +1 -1
  35. package/dist/util/getParentElement.d.ts +2 -0
  36. package/dist/util/getParentElement.js +5 -0
  37. package/dist/util/getParentElement.js.map +1 -0
  38. package/dist/util/isElementContainingBlock.d.ts +2 -0
  39. package/dist/util/isElementContainingBlock.js +11 -0
  40. package/dist/util/isElementContainingBlock.js.map +1 -0
  41. package/package.json +3 -3
  42. package/src/css/FontFace.css +13 -1
  43. package/dist/assets/Boot-b8816fd3.js +0 -9
  44. package/dist/assets/bundle.esm-c76a117d.js +0 -50
package/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.20.0](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.3...v1.20.0) (2023-12-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **framework:** fix font72 for special characters ([#7949](https://github.com/SAP/ui5-webcomponents/issues/7949)) ([55665b0](https://github.com/SAP/ui5-webcomponents/commit/55665b0ac02cd9060de1368fb427bb338338c5aa)), closes [#7948](https://github.com/SAP/ui5-webcomponents/issues/7948)
12
+
13
+
14
+
15
+
16
+
17
+ # [1.20.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.2...v1.20.0-rc.3) (2023-11-30)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **framework:** enable `72Blackfull` font-family ([#7918](https://github.com/SAP/ui5-webcomponents/issues/7918)) ([214780f](https://github.com/SAP/ui5-webcomponents/commit/214780ffde6c99a395472e5714370788668ed71e)), closes [#7800](https://github.com/SAP/ui5-webcomponents/issues/7800)
23
+
24
+
25
+ ### Features
26
+
27
+ * cloned property to the slot decorator ([#7882](https://github.com/SAP/ui5-webcomponents/issues/7882)) ([2f3742b](https://github.com/SAP/ui5-webcomponents/commit/2f3742bae6a73796ccb0f59b48d35d0f794fba63)), closes [#7681](https://github.com/SAP/ui5-webcomponents/issues/7681)
28
+ * register custom theme properties ([#7750](https://github.com/SAP/ui5-webcomponents/issues/7750)) ([c6c04c6](https://github.com/SAP/ui5-webcomponents/commit/c6c04c609d82a7442bdf79ef5bba46a406859a27))
29
+
30
+
31
+
32
+
33
+
6
34
  # [1.20.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.20.0-rc.1...v1.20.0-rc.2) (2023-11-23)
7
35
 
8
36
 
@@ -1,5 +1,5 @@
1
1
  import { registerI18nLoader } from "./asset-registries/i18n.js";
2
2
  import { registerLocaleDataLoader } from "./asset-registries/LocaleData.js";
3
- import { registerThemePropertiesLoader } from "./asset-registries/Themes.js";
3
+ import { registerThemePropertiesLoader, registerCustomThemePropertiesLoader } from "./asset-registries/Themes.js";
4
4
  import { registerIconLoader } from "./asset-registries/Icons.js";
5
- export { registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerIconLoader, };
5
+ export { registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerCustomThemePropertiesLoader, registerIconLoader, };
@@ -1,6 +1,6 @@
1
1
  import { registerI18nLoader } from "./asset-registries/i18n.js";
2
2
  import { registerLocaleDataLoader } from "./asset-registries/LocaleData.js";
3
- import { registerThemePropertiesLoader } from "./asset-registries/Themes.js";
3
+ import { registerThemePropertiesLoader, registerCustomThemePropertiesLoader } from "./asset-registries/Themes.js";
4
4
  import { registerIconLoader } from "./asset-registries/Icons.js";
5
- export { registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerIconLoader, };
5
+ export { registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerCustomThemePropertiesLoader, registerIconLoader, };
6
6
  //# sourceMappingURL=AssetRegistry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetRegistry.js","sourceRoot":"","sources":["../src/AssetRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EACN,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,kBAAkB,GAClB,CAAC","sourcesContent":["import { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\nexport {\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterIconLoader,\n};\n"]}
1
+ {"version":3,"file":"AssetRegistry.js","sourceRoot":"","sources":["../src/AssetRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,mCAAmC,EAAE,MAAM,8BAA8B,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EACN,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,mCAAmC,EACnC,kBAAkB,GAClB,CAAC","sourcesContent":["import { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader, registerCustomThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\nexport {\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterCustomThemePropertiesLoader,\n\tregisterIconLoader,\n};\n"]}
@@ -4,5 +4,6 @@ declare const updateStyle: (data: StyleData, name: string, value?: string, theme
4
4
  declare const hasStyle: (name: string, value?: string) => boolean;
5
5
  declare const removeStyle: (name: string, value?: string) => void;
6
6
  declare const createOrUpdateStyle: (data: StyleData, name: string, value?: string, theme?: string) => void;
7
- export { createStyle, hasStyle, updateStyle, removeStyle, createOrUpdateStyle, };
7
+ declare const mergeStyles: (style1?: StyleData, style2?: StyleData) => StyleData | undefined;
8
+ export { createStyle, hasStyle, updateStyle, removeStyle, createOrUpdateStyle, mergeStyles, };
8
9
  export type { StyleData, StyleDataCSP, };
@@ -132,5 +132,22 @@ const createOrUpdateStyle = (data, name, value = "", theme) => {
132
132
  createStyle(data, name, value, theme);
133
133
  }
134
134
  };
135
- export { createStyle, hasStyle, updateStyle, removeStyle, createOrUpdateStyle, };
135
+ const mergeStyles = (style1, style2) => {
136
+ if (style1 === undefined) {
137
+ return style2;
138
+ }
139
+ if (style2 === undefined) {
140
+ return style1;
141
+ }
142
+ const style2Content = typeof style2 === "string" ? style2 : style2.content;
143
+ if (typeof style1 === "string") {
144
+ return `${style1} ${style2Content}`;
145
+ }
146
+ return {
147
+ content: `${style1.content} ${style2Content}`,
148
+ packageName: style1.packageName,
149
+ fileName: style1.fileName,
150
+ };
151
+ };
152
+ export { createStyle, hasStyle, updateStyle, removeStyle, createOrUpdateStyle, mergeStyles, };
136
153
  //# sourceMappingURL=ManagedStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ManagedStyles.js","sourceRoot":"","sources":["../src/ManagedStyles.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,6BAA6B,CAAC;AAC5D,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAExE,MAAM,UAAU,GAAG,CA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AAc,EAAE,EAAE;QACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;QAC5E,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;KACrD;SAAM,IAAI,QAAQ,CAAC,kBAAkB,IAAI,CAAC,QAAQ,EAAE,EAAE;QACtD,QAAQ,CAAC,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAE,EAA0B,CAAC,WAAW,KAAK,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;KAC5I;SAAM;QACN,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;QAChF,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;KACvD;AACF,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,IAAe,EAAE,IAAY,EAAE,KAAK,GAAG,EAAE,EAAE,KAAc,EAAE,EAAE;IACzF,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;QAC1B,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;KACtC;SAAM;QACN,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;KACtC;AACF,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,QAAQ,EACR,WAAW,EACX,WAAW,EACX,mBAAmB,GACnB,CAAC","sourcesContent":["import createStyleInHead from \"./util/createStyleInHead.js\";\nimport createLinkInHead from \"./util/createLinkInHead.js\";\nimport { shouldUseLinks, getUrl } from \"./CSP.js\";\nimport { StyleData, StyleDataCSP } from \"./types.js\";\nimport { isSafari } from \"./Device.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"./Runtimes.js\";\n\nconst getStyleId = (name: string, value: string) => {\n\treturn value ? `${name}|${value}` : name;\n};\n\nconst shouldUpdate = (runtimeIndex: string | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nconst createStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tif (shouldUseLinks()) {\n\t\tconst attributes = {} as Record<string, any>;\n\t\tattributes[name] = value;\n\t\tif (theme) {\n\t\t\tattributes[\"data-ui5-runtime-index\"] = currentRuntimeIndex;\n\t\t\tattributes[\"data-ui5-theme\"] = theme;\n\t\t}\n\t\tconst href = getUrl((data as StyleDataCSP).packageName, (data as StyleDataCSP).fileName);\n\t\tcreateLinkInHead(href, attributes);\n\t} else if (document.adoptedStyleSheets && !isSafari()) {\n\t\tconst stylesheet = new CSSStyleSheet();\n\t\tstylesheet.replaceSync(content);\n\t\t(stylesheet as Record<string, any>)._ui5StyleId = getStyleId(name, value); // set an id so that we can find the style later\n\t\tif (theme) {\n\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = currentRuntimeIndex;\n\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t}\n\t\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n\t} else {\n\t\tconst attributes = {} as Record<string, any>;\n\t\tattributes[name] = value;\n\t\tif (theme) {\n\t\t\tattributes[\"data-ui5-runtime-index\"] = currentRuntimeIndex;\n\t\t\tattributes[\"data-ui5-theme\"] = theme;\n\t\t}\n\t\tcreateStyleInHead(content, attributes);\n\t}\n};\n\nconst updateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tif (shouldUseLinks()) {\n\t\tconst link = document.querySelector(`head>link[${name}=\"${value}\"]`) as HTMLLinkElement;\n\t\tconst href = getUrl((data as StyleDataCSP).packageName, (data as StyleDataCSP).fileName);\n\n\t\tif (!theme) {\n\t\t\tlink.href = href;\n\t\t} else {\n\t\t\tconst linkRuntimeIndex = link.getAttribute(\"data-ui5-runtime-index\") || undefined;\n\t\t\tconst linkTheme = link.getAttribute(\"data-ui5-theme\");\n\t\t\tif (linkTheme !== theme || shouldUpdate(linkRuntimeIndex)) {\n\t\t\t\tlink.href = href;\n\t\t\t\tlink.setAttribute(\"data-ui5-runtime-index\", String(currentRuntimeIndex));\n\t\t\t\tlink.setAttribute(\"data-ui5-theme\", theme);\n\t\t\t}\n\t\t}\n\t} else if (document.adoptedStyleSheets && !isSafari()) {\n\t\tconst stylesheet = document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\t\tif (!stylesheet) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!theme) {\n\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t} else {\n\t\t\tconst stylesheetRuntimeIndex: string | undefined = (stylesheet as Record<string, any>)._ui5RuntimeIndex;\n\t\t\tconst stylesheetTheme: string | undefined = (stylesheet as Record<string, any>)._ui5Theme;\n\t\t\tif (stylesheetTheme !== theme || shouldUpdate(stylesheetRuntimeIndex)) {\n\t\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = String(currentRuntimeIndex);\n\t\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst style = document.querySelector(`head>style[${name}=\"${value}\"]`);\n\t\tif (!style) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!theme) {\n\t\t\tstyle.textContent = content || \"\";\n\t\t} else {\n\t\t\tconst styleRuntimeIndex = style.getAttribute(\"data-ui5-runtime-index\") || undefined;\n\t\t\tconst styleTheme = style.getAttribute(\"data-ui5-theme\");\n\t\t\tif (styleTheme !== theme || shouldUpdate(styleRuntimeIndex)) {\n\t\t\t\tstyle.textContent = content || \"\";\n\t\t\t\tstyle.setAttribute(\"data-ui5-runtime-index\", String(currentRuntimeIndex));\n\t\t\t\tstyle.setAttribute(\"data-ui5-theme\", theme);\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst hasStyle = (name: string, value = \"\"): boolean => {\n\tif (shouldUseLinks()) {\n\t\treturn !!document.querySelector(`head>link[${name}=\"${value}\"]`);\n\t}\n\n\tconst styleElement = document.querySelector(`head>style[${name}=\"${value}\"]`);\n\n\tif (document.adoptedStyleSheets && !isSafari()) {\n\t\treturn !!styleElement || !!document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\t}\n\n\treturn !!styleElement;\n};\n\nconst removeStyle = (name: string, value = \"\") => {\n\tif (shouldUseLinks()) {\n\t\tconst linkElement = document.querySelector(`head>link[${name}=\"${value}\"]`);\n\t\tlinkElement?.parentElement?.removeChild(linkElement);\n\t} else if (document.adoptedStyleSheets && !isSafari()) {\n\t\tdocument.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => (sh as Record<string, any>)._ui5StyleId !== getStyleId(name, value));\n\t} else {\n\t\tconst styleElement = document.querySelector(`head > style[${name}=\"${value}\"]`);\n\t\tstyleElement?.parentElement?.removeChild(styleElement);\n\t}\n};\n\nconst createOrUpdateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tif (hasStyle(name, value)) {\n\t\tupdateStyle(data, name, value, theme);\n\t} else {\n\t\tcreateStyle(data, name, value, theme);\n\t}\n};\n\nexport {\n\tcreateStyle,\n\thasStyle,\n\tupdateStyle,\n\tremoveStyle,\n\tcreateOrUpdateStyle,\n};\n\nexport type {\n\tStyleData,\n\tStyleDataCSP,\n};\n"]}
1
+ {"version":3,"file":"ManagedStyles.js","sourceRoot":"","sources":["../src/ManagedStyles.ts"],"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F,MAAM,WAAW,GAAG,CAAC,MAAkB,EAAE,MAAkB,EAAE,EAAE;IAC9D,IAAI,MAAM,KAAK,SAAS,EAAE;QACzB,OAAO,MAAM,CAAC;KACd;IACD,IAAI,MAAM,KAAK,SAAS,EAAE;QACzB,OAAO,MAAM,CAAC;KACd;IACD,MAAM,aAAa,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IAC3E,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC/B,OAAO,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;KACpC;IACD,OAAO;QACN,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,aAAa,EAAE;QAC7C,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;KACzB,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,QAAQ,EACR,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,WAAW,GACX,CAAC","sourcesContent":["import createStyleInHead from \"./util/createStyleInHead.js\";\nimport createLinkInHead from \"./util/createLinkInHead.js\";\nimport { shouldUseLinks, getUrl } from \"./CSP.js\";\nimport { StyleData, StyleDataCSP } from \"./types.js\";\nimport { isSafari } from \"./Device.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"./Runtimes.js\";\n\nconst getStyleId = (name: string, value: string) => {\n\treturn value ? `${name}|${value}` : name;\n};\n\nconst shouldUpdate = (runtimeIndex: string | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nconst createStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tif (shouldUseLinks()) {\n\t\tconst attributes = {} as Record<string, any>;\n\t\tattributes[name] = value;\n\t\tif (theme) {\n\t\t\tattributes[\"data-ui5-runtime-index\"] = currentRuntimeIndex;\n\t\t\tattributes[\"data-ui5-theme\"] = theme;\n\t\t}\n\t\tconst href = getUrl((data as StyleDataCSP).packageName, (data as StyleDataCSP).fileName);\n\t\tcreateLinkInHead(href, attributes);\n\t} else if (document.adoptedStyleSheets && !isSafari()) {\n\t\tconst stylesheet = new CSSStyleSheet();\n\t\tstylesheet.replaceSync(content);\n\t\t(stylesheet as Record<string, any>)._ui5StyleId = getStyleId(name, value); // set an id so that we can find the style later\n\t\tif (theme) {\n\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = currentRuntimeIndex;\n\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t}\n\t\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n\t} else {\n\t\tconst attributes = {} as Record<string, any>;\n\t\tattributes[name] = value;\n\t\tif (theme) {\n\t\t\tattributes[\"data-ui5-runtime-index\"] = currentRuntimeIndex;\n\t\t\tattributes[\"data-ui5-theme\"] = theme;\n\t\t}\n\t\tcreateStyleInHead(content, attributes);\n\t}\n};\n\nconst updateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tif (shouldUseLinks()) {\n\t\tconst link = document.querySelector(`head>link[${name}=\"${value}\"]`) as HTMLLinkElement;\n\t\tconst href = getUrl((data as StyleDataCSP).packageName, (data as StyleDataCSP).fileName);\n\n\t\tif (!theme) {\n\t\t\tlink.href = href;\n\t\t} else {\n\t\t\tconst linkRuntimeIndex = link.getAttribute(\"data-ui5-runtime-index\") || undefined;\n\t\t\tconst linkTheme = link.getAttribute(\"data-ui5-theme\");\n\t\t\tif (linkTheme !== theme || shouldUpdate(linkRuntimeIndex)) {\n\t\t\t\tlink.href = href;\n\t\t\t\tlink.setAttribute(\"data-ui5-runtime-index\", String(currentRuntimeIndex));\n\t\t\t\tlink.setAttribute(\"data-ui5-theme\", theme);\n\t\t\t}\n\t\t}\n\t} else if (document.adoptedStyleSheets && !isSafari()) {\n\t\tconst stylesheet = document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\t\tif (!stylesheet) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!theme) {\n\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t} else {\n\t\t\tconst stylesheetRuntimeIndex: string | undefined = (stylesheet as Record<string, any>)._ui5RuntimeIndex;\n\t\t\tconst stylesheetTheme: string | undefined = (stylesheet as Record<string, any>)._ui5Theme;\n\t\t\tif (stylesheetTheme !== theme || shouldUpdate(stylesheetRuntimeIndex)) {\n\t\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = String(currentRuntimeIndex);\n\t\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconst style = document.querySelector(`head>style[${name}=\"${value}\"]`);\n\t\tif (!style) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!theme) {\n\t\t\tstyle.textContent = content || \"\";\n\t\t} else {\n\t\t\tconst styleRuntimeIndex = style.getAttribute(\"data-ui5-runtime-index\") || undefined;\n\t\t\tconst styleTheme = style.getAttribute(\"data-ui5-theme\");\n\t\t\tif (styleTheme !== theme || shouldUpdate(styleRuntimeIndex)) {\n\t\t\t\tstyle.textContent = content || \"\";\n\t\t\t\tstyle.setAttribute(\"data-ui5-runtime-index\", String(currentRuntimeIndex));\n\t\t\t\tstyle.setAttribute(\"data-ui5-theme\", theme);\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst hasStyle = (name: string, value = \"\"): boolean => {\n\tif (shouldUseLinks()) {\n\t\treturn !!document.querySelector(`head>link[${name}=\"${value}\"]`);\n\t}\n\n\tconst styleElement = document.querySelector(`head>style[${name}=\"${value}\"]`);\n\n\tif (document.adoptedStyleSheets && !isSafari()) {\n\t\treturn !!styleElement || !!document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\t}\n\n\treturn !!styleElement;\n};\n\nconst removeStyle = (name: string, value = \"\") => {\n\tif (shouldUseLinks()) {\n\t\tconst linkElement = document.querySelector(`head>link[${name}=\"${value}\"]`);\n\t\tlinkElement?.parentElement?.removeChild(linkElement);\n\t} else if (document.adoptedStyleSheets && !isSafari()) {\n\t\tdocument.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => (sh as Record<string, any>)._ui5StyleId !== getStyleId(name, value));\n\t} else {\n\t\tconst styleElement = document.querySelector(`head > style[${name}=\"${value}\"]`);\n\t\tstyleElement?.parentElement?.removeChild(styleElement);\n\t}\n};\n\nconst createOrUpdateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tif (hasStyle(name, value)) {\n\t\tupdateStyle(data, name, value, theme);\n\t} else {\n\t\tcreateStyle(data, name, value, theme);\n\t}\n};\n\nconst mergeStyles = (style1?: StyleData, style2?: StyleData) => {\n\tif (style1 === undefined) {\n\t\treturn style2;\n\t}\n\tif (style2 === undefined) {\n\t\treturn style1;\n\t}\n\tconst style2Content = typeof style2 === \"string\" ? style2 : style2.content;\n\tif (typeof style1 === \"string\") {\n\t\treturn `${style1} ${style2Content}`;\n\t}\n\treturn {\n\t\tcontent: `${style1.content} ${style2Content}`,\n\t\tpackageName: style1.packageName,\n\t\tfileName: style1.fileName,\n\t};\n};\n\nexport {\n\tcreateStyle,\n\thasStyle,\n\tupdateStyle,\n\tremoveStyle,\n\tcreateOrUpdateStyle,\n\tmergeStyles,\n};\n\nexport type {\n\tStyleData,\n\tStyleDataCSP,\n};\n"]}
@@ -162,14 +162,16 @@ class UI5Element extends HTMLElement {
162
162
  */
163
163
  _startObservingDOMChildren() {
164
164
  const ctor = this.constructor;
165
- const shouldObserveChildren = ctor.getMetadata().hasSlots();
165
+ const metadata = ctor.getMetadata();
166
+ const shouldObserveChildren = metadata.hasSlots();
166
167
  if (!shouldObserveChildren) {
167
168
  return;
168
169
  }
169
- const canSlotText = ctor.getMetadata().canSlotText();
170
+ const canSlotText = metadata.canSlotText();
171
+ const hasClonedSlot = Object.keys(metadata.getSlots()).some(slotName => metadata.getSlots()[slotName].cloned);
170
172
  const mutationObserverOptions = {
171
173
  childList: true,
172
- subtree: canSlotText,
174
+ subtree: canSlotText || hasClonedSlot,
173
175
  characterData: canSlotText,
174
176
  };
175
177
  observeDOMNode(this, this._processChildren.bind(this), mutationObserverOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"UI5Element.js","sourceRoot":"","sources":["../src/UI5Element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,kBAMN,MAAM,yBAAyB,CAAC;AACjC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,2BAA2B,MAAM,uCAAuC,CAAC;AAChF,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,mB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AC1B,OAAO,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import merge from \"./thirdparty/merge.js\";\nimport { boot } from \"./Boot.js\";\nimport UI5ElementMetadata, {\n\tSlot,\n\tSlotValue,\n\tState,\n\tPropertyValue,\n\tMetadata,\n} from \"./UI5ElementMetadata.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport getSingletonElementInstance from \"./util/getSingletonElementInstance.js\";\nimport StaticAreaItem from \"./StaticAreaItem.js\";\nimport updateShadowRoot from \"./updateShadowRoot.js\";\nimport { shouldIgnoreCustomElement } from \"./IgnoreCustomElements.js\";\nimport { renderDeferred, renderImmediately, cancelRender } from \"./Render.js\";\nimport { registerTag, isTagRegistered, recordTagRegistrationFailure } from \"./CustomElementsRegistry.js\";\nimport { observeDOMNode, unobserveDOMNode } from \"./DOMObserver.js\";\nimport { skipOriginalEvent } from \"./config/NoConflict.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport DataType from \"./types/DataType.js\";\nimport { kebabToCamelCase, camelToKebabCase } from \"./util/StringHelper.js\";\nimport isValidPropertyName from \"./util/isValidPropertyName.js\";\nimport { getSlotName, getSlottedNodesList } from \"./util/SlotsHelper.js\";\nimport arraysAreEqual from \"./util/arraysAreEqual.js\";\nimport { markAsRtlAware } from \"./locale/RTLAwareRegistry.js\";\nimport preloadLinks from \"./theming/preloadLinks.js\";\nimport executeTemplate from \"./renderer/executeTemplate.js\";\nimport type { TemplateFunction, TemplateFunctionResult } from \"./renderer/executeTemplate.js\";\nimport type { PromiseResolve, ComponentStylesData, ClassMap } from \"./types.js\";\n\nlet autoId = 0;\n\nconst elementTimeouts = new Map<string, Promise<void>>();\nconst uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();\n\ntype Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, styleStrOrHrefsArr: string | Array<string> | undefined, forStaticArea: boolean, options: RendererOptions) => void;\n\ntype RendererOptions = {\n\t/**\n\t * An object to use as the `this` value for event listeners. It's often\n\t * useful to set this to the host component rendering a template.\n\t */\n\thost?: object,\n}\n\ntype ChangeInfo = {\n\ttype: \"property\" | \"slot\",\n\tname: string,\n\treason?: string,\n\tchild?: SlotValue,\n\ttarget?: UI5Element,\n\tnewValue?: PropertyValue,\n\toldValue?: PropertyValue,\n}\n\ntype InvalidationInfo = ChangeInfo & { target: UI5Element };\n\ntype ChildChangeListener = (param: InvalidationInfo) => void;\n\ntype SlotChangeListener = (this: HTMLSlotElement, ev: Event) => void;\n\n/**\n * Triggers re-rendering of a UI5Element instance due to state change.\n * @param {ChangeInfo} changeInfo An object with information about the change that caused invalidation.\n * @private\n */\nfunction _invalidate(this: UI5Element, changeInfo: ChangeInfo) {\n\t// Invalidation should be suppressed: 1) before the component is rendered for the first time 2) and during the execution of onBeforeRendering\n\t// This is necessary not only as an optimization, but also to avoid infinite loops on invalidation between children and parents (when invalidateOnChildChange is used)\n\tif (this._suppressInvalidation) {\n\t\treturn;\n\t}\n\n\t// Call the onInvalidation hook\n\tthis.onInvalidation(changeInfo);\n\n\tthis._changedState.push(changeInfo);\n\trenderDeferred(this);\n\tthis._invalidationEventProvider.fireEvent(\"invalidate\", { ...changeInfo, target: this });\n}\n\n/**\n * Base class for all UI5 Web Components\n *\n * @class\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.base.UI5Element\n * @extends HTMLElement\n * @public\n */\nabstract class UI5Element extends HTMLElement {\n\t__id?: string;\n\t_suppressInvalidation: boolean;\n\t_changedState: Array<ChangeInfo>;\n\t_invalidationEventProvider: EventProvider<InvalidationInfo, void>;\n\t_componentStateFinalizedEventProvider: EventProvider<void, void>;\n\t_inDOM: boolean;\n\t_fullyConnected: boolean;\n\t_childChangeListeners: Map<string, ChildChangeListener>;\n\t_slotChangeListeners: Map<string, SlotChangeListener>;\n\t_domRefReadyPromise: Promise<void> & { _deferredResolve?: PromiseResolve };\n\t_doNotSyncAttributes: Set<string>;\n\t_state: State;\n\t_getRealDomRef?: () => HTMLElement;\n\n\tstaticAreaItem?: StaticAreaItem;\n\n\tstatic template?: TemplateFunction;\n\tstatic staticAreaTemplate?: TemplateFunction;\n\tstatic _metadata: UI5ElementMetadata;\n\n\t/**\n\t * @deprecated\n\t */\n\tstatic render: Renderer;\n\tstatic renderer?: Renderer;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tthis._changedState = []; // Filled on each invalidation, cleared on re-render (used for debugging)\n\t\tthis._suppressInvalidation = true; // A flag telling whether all invalidations should be ignored. Initialized with \"true\" because a UI5Element can not be invalidated until it is rendered for the first time\n\t\tthis._inDOM = false; // A flag telling whether the UI5Element is currently in the DOM tree of the document or not\n\t\tthis._fullyConnected = false; // A flag telling whether the UI5Element's onEnterDOM hook was called (since it's possible to have the element removed from DOM before that)\n\t\tthis._childChangeListeners = new Map(); // used to store lazy listeners per slot for the child change event of every child inside that slot\n\t\tthis._slotChangeListeners = new Map(); // used to store lazy listeners per slot for the slotchange event of all slot children inside that slot\n\t\tthis._invalidationEventProvider = new EventProvider(); // used by parent components for listening to changes to child components\n\t\tthis._componentStateFinalizedEventProvider = new EventProvider(); // used by friend classes for synchronization\n\t\tlet deferredResolve;\n\t\tthis._domRefReadyPromise = new Promise(resolve => {\n\t\t\tdeferredResolve = resolve;\n\t\t});\n\t\tthis._domRefReadyPromise._deferredResolve = deferredResolve;\n\t\tthis._doNotSyncAttributes = new Set(); // attributes that are excluded from attributeChangedCallback synchronization\n\n\t\tthis._state = { ...ctor.getMetadata().getInitialState() };\n\n\t\tthis._upgradeAllProperties();\n\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tthis.attachShadow({ mode: \"open\" });\n\t\t}\n\t}\n\n\t/**\n\t * Returns a unique ID for this UI5 Element\n\t *\n\t * @deprecated - This property is not guaranteed in future releases\n\t * @protected\n\t */\n\tget _id() {\n\t\tif (!this.__id) {\n\t\t\tthis.__id = `ui5wc_${++autoId}`;\n\t\t}\n\n\t\treturn this.__id;\n\t}\n\n\trender() {\n\t\tconst template = (this.constructor as typeof UI5Element).template;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\trenderStatic() {\n\t\tconst template = (this.constructor as typeof UI5Element).staticAreaTemplate;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onEnterDOM\" only\n\t * @private\n\t */\n\tasync connectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tthis.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n\t\tif (ctor.getMetadata().supportsF6FastNavigation()) {\n\t\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t}\n\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = true;\n\n\t\tif (slotsAreManaged) {\n\t\t\t// always register the observer before yielding control to the main thread (await)\n\t\t\tthis._startObservingDOMChildren();\n\t\t\tawait this._processChildren();\n\t\t}\n\n\t\tif (!this._inDOM) { // Component removed from DOM while _processChildren was running\n\t\t\treturn;\n\t\t}\n\n\t\trenderImmediately(this);\n\t\tthis._domRefReadyPromise._deferredResolve!();\n\t\tthis._fullyConnected = true;\n\t\tthis.onEnterDOM();\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onExitDOM\" only\n\t * @private\n\t */\n\tdisconnectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = false;\n\n\t\tif (slotsAreManaged) {\n\t\t\tthis._stopObservingDOMChildren();\n\t\t}\n\n\t\tif (this._fullyConnected) {\n\t\t\tthis.onExitDOM();\n\t\t\tthis._fullyConnected = false;\n\t\t}\n\n\t\tif (this.staticAreaItem && this.staticAreaItem.parentElement) {\n\t\t\tthis.staticAreaItem.parentElement.removeChild(this.staticAreaItem);\n\t\t}\n\n\t\tcancelRender(this);\n\t}\n\n\t/**\n\t * Called every time before the component renders.\n\t * @public\n\t */\n\tonBeforeRendering() {}\n\n\t/**\n\t * Called every time after the component renders.\n\t * @public\n\t */\n\tonAfterRendering() {}\n\n\t/**\n\t * Called on connectedCallback - added to the DOM.\n\t * @public\n\t */\n\tonEnterDOM() {}\n\n\t/**\n\t * Called on disconnectedCallback - removed from the DOM.\n\t * @public\n\t */\n\tonExitDOM() {}\n\n\t/**\n\t * @private\n\t */\n\t_startObservingDOMChildren() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst shouldObserveChildren = ctor.getMetadata().hasSlots();\n\t\tif (!shouldObserveChildren) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canSlotText = ctor.getMetadata().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\tconst allChildrenUpgraded = domChildren.map(async (child, idx) => {\n\t\t\t// Determine the type of the child (mainly by the slot attribute)\n\t\t\tconst slotName = getSlotName(child);\n\t\t\tconst slotData = slotsMap[slotName];\n\n\t\t\t// Check if the slotName is supported\n\t\t\tif (slotData === undefined) {\n\t\t\t\tif (slotName !== \"default\") {\n\t\t\t\t\tconst validValues = Object.keys(slotsMap).join(\", \");\n\t\t\t\t\tconsole.warn(`Unknown slotName: ${slotName}, ignoring`, child, `Valid values are: ${validValues}`); // eslint-disable-line\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For children that need individual slots, calculate them\n\t\t\tif (slotData.individualSlots) {\n\t\t\t\tconst nextIndex = (autoIncrementMap.get(slotName) || 0) + 1;\n\t\t\t\tautoIncrementMap.set(slotName, nextIndex);\n\t\t\t\t(child as Record<string, any>)._individualSlot = `${slotName}-${nextIndex}`;\n\t\t\t}\n\n\t\t\t// Await for not-yet-defined custom elements\n\t\t\tif (child instanceof HTMLElement) {\n\t\t\t\tconst localName = child.localName;\n\t\t\t\tconst shouldWaitForCustomElement = localName.includes(\"-\") && !shouldIgnoreCustomElement(localName);\n\n\t\t\t\tif (shouldWaitForCustomElement) {\n\t\t\t\t\tconst isDefined = window.customElements.get(localName);\n\t\t\t\t\tif (!isDefined) {\n\t\t\t\t\t\tconst whenDefinedPromise = window.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\twindow.customElements.upgrade(child);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchild = (ctor.getMetadata().constructor as typeof UI5ElementMetadata).validateSlotValue(child, slotData);\n\n\t\t\t// Listen for any invalidation on the child if invalidateOnChildChange is true or an object (ignore when false or not set)\n\t\t\tif (instanceOfUI5Element(child) && slotData.invalidateOnChildChange) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Listen for the slotchange event if the child is a slot itself\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._attachSlotChange(child, slotName);\n\t\t\t}\n\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\n\t\t\tif (slottedChildrenMap.has(propertyName)) {\n\t\t\t\tslottedChildrenMap.get(propertyName)!.push({ child, idx });\n\t\t\t} else {\n\t\t\t\tslottedChildrenMap.set(propertyName, [{ child, idx }]);\n\t\t\t}\n\t\t});\n\n\t\tawait Promise.all(allChildrenUpgraded);\n\n\t\t// Distribute the child in the _state object, keeping the Light DOM order,\n\t\t// not the order elements are defined.\n\t\tslottedChildrenMap.forEach((children, propertyName) => {\n\t\t\tthis._state[propertyName] = children.sort((a, b) => a.idx - b.idx).map(_ => _.child);\n\t\t});\n\n\t\t// Compare the content of each slot with the cached values and invalidate for the ones that changed\n\t\tlet invalidated = false;\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tif (!arraysAreEqual(slotsCachedContentMap.get(propertyName)!, this._state[propertyName] as Array<SlotValue>)) {\n\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\ttype: \"slot\",\n\t\t\t\t\tname: propertyNameToSlotMap.get(propertyName)!,\n\t\t\t\t\treason: \"children\",\n\t\t\t\t});\n\t\t\t\tinvalidated = true;\n\t\t\t}\n\t\t}\n\n\t\t// If none of the slots had an invalidation due to changes to immediate children,\n\t\t// the change is considered to be text content of the default slot\n\t\tif (!invalidated) {\n\t\t\t_invalidate.call(this, {\n\t\t\t\ttype: \"slot\",\n\t\t\t\tname: \"default\",\n\t\t\t\treason: \"textcontent\",\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Removes all children from the slot and detaches listeners, if any\n\t * @private\n\t */\n\t_clearSlot(slotName: string, slotData: Slot) {\n\t\tconst propertyName = slotData.propertyName || slotName;\n\t\tconst children = this._state[propertyName] as Array<SlotValue>;\n\n\t\tchildren.forEach(child => {\n\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._detachSlotChange(child, slotName);\n\t\t\t}\n\t\t});\n\n\t\tthis._state[propertyName] = [];\n\t}\n\n\t/**\n\t * Attach a callback that will be executed whenever the component is invalidated\n\t *\n\t * @param {InvalidationInfo} callback\n\t * @public\n\t */\n\tattachInvalidate(callback: (param: InvalidationInfo) => 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 {InvalidationInfo} callback\n\t * @public\n\t */\n\tdetachInvalidate(callback: (param: InvalidationInfo) => 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 {sting} slotName the slot in which a child was invalidated\n\t * @param { ChangeInfo } childChangeInfo the changeInfo object for the child in the given slot\n\t * @private\n\t */\n\t_onChildChange(slotName: string, childChangeInfo: ChangeInfo) {\n\t\tif (!(this.constructor as typeof UI5Element).getMetadata().shouldInvalidateOnChildChange(slotName, childChangeInfo.type, childChangeInfo.name)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The component should be invalidated as this type of change on the child is listened for\n\t\t// However, no matter what changed on the child (property/slot), the invalidation is registered as \"type=slot\" for the component itself\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"childchange\",\n\t\t\tchild: childChangeInfo.target,\n\t\t});\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element\n\t * @private\n\t */\n\tattributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n\t\tlet newPropertyValue: PropertyValue;\n\t\tif (this._doNotSyncAttributes.has(name)) { // This attribute is mutated internally, not by the user\n\t\t\treturn;\n\t\t}\n\n\t\tconst properties = (this.constructor as typeof UI5Element).getMetadata().getProperties();\n\t\tconst realName = name.replace(/^ui5-/, \"\");\n\t\tconst nameInCamelCase = kebabToCamelCase(realName);\n\t\tif (properties.hasOwnProperty(nameInCamelCase)) { // eslint-disable-line\n\t\t\tconst propData = properties[nameInCamelCase];\n\t\t\tconst propertyType = propData.type;\n\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\n\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t}\n\n\t\t\tif (propertyValidator) {\n\t\t\t\tnewPropertyValue = propertyValidator.attributeToProperty(newValue);\n\t\t\t} else if (propertyType === Boolean) {\n\t\t\t\tnewPropertyValue = newValue !== null;\n\t\t\t} else {\n\t\t\t\tnewPropertyValue = newValue as string;\n\t\t\t}\n\n\t\t\t(this as Record<string, any>)[nameInCamelCase] = newPropertyValue;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_updateAttribute(name: string, newValue: PropertyValue) {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tif (!ctor.getMetadata().hasAttribute(name)) {\n\t\t\treturn;\n\t\t}\n\t\tconst properties = ctor.getMetadata().getProperties();\n\t\tconst propData = properties[name];\n\t\tconst propertyType = propData.type;\n\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\tconst attrName = camelToKebabCase(name);\n\t\tconst attrValue = this.getAttribute(attrName);\n\n\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t}\n\n\t\tif (propertyValidator) {\n\t\t\tconst newAttrValue = propertyValidator.propertyToAttribute(newValue);\n\t\t\tif (newAttrValue === null) { // null means there must be no attribute for the current value of the property\n\t\t\t\tthis._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute\n\t\t\t\tthis.removeAttribute(attrName); // remove the attribute safely (will not trigger synchronization to the property value due to the above line)\n\t\t\t\tthis._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute\n\t\t\t} else {\n\t\t\t\tthis.setAttribute(attrName, newAttrValue);\n\t\t\t}\n\t\t} else if (propertyType === Boolean) {\n\t\t\tif (newValue === true && attrValue === null) {\n\t\t\t\tthis.setAttribute(attrName, \"\");\n\t\t\t} else if (newValue === false && attrValue !== null) {\n\t\t\t\tthis.removeAttribute(attrName);\n\t\t\t}\n\t\t} else if (typeof newValue !== \"object\") {\n\t\t\tif (attrValue !== newValue) {\n\t\t\t\tthis.setAttribute(attrName, newValue as string);\n\t\t\t}\n\t\t} // else { return; } // old object handling\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeProperty(this: Record<string, any>, propertyName: string) {\n\t\tif (this.hasOwnProperty(propertyName)) { // eslint-disable-line\n\t\t\tconst value = this[propertyName];\n\t\t\tdelete this[propertyName];\n\t\t\tthis[propertyName] = value;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeAllProperties() {\n\t\tconst allProps = (this.constructor as typeof UI5Element).getMetadata().getPropertiesList();\n\t\tallProps.forEach(this._upgradeProperty.bind(this));\n\t}\n\n\t/**\n\t * Returns a singleton event listener for the \"change\" event of a child in a given slot\n\t *\n\t * @param slotName the name of the slot, where the child is\n\t * @returns {ChildChangeListener}\n\t * @private\n\t */\n\t_getChildChangeListener(slotName: string) {\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 * @returns {SlotChangeListener}\n\t * @private\n\t */\n\t_getSlotChangeListener(slotName: string) {\n\t\tif (!this._slotChangeListeners.has(slotName)) {\n\t\t\tthis._slotChangeListeners.set(slotName, this._onSlotChange.bind(this, slotName));\n\t\t}\n\t\treturn this._slotChangeListeners.get(slotName)!;\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_attachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tconst slotChangeListener = this._getSlotChangeListener(slotName);\n\t\tif (slotChangeListener) {\n\t\t\tchild.addEventListener(\"slotchange\", slotChangeListener);\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_detachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tchild.removeEventListener(\"slotchange\", this._getSlotChangeListener(slotName));\n\t}\n\n\t/**\n\t * Whenever a slot element is slotted inside a UI5 Web Component, its slotchange event invalidates the component\n\t *\n\t * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is\n\t * @private\n\t */\n\t_onSlotChange(slotName: string) {\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"slotchange\",\n\t\t});\n\t}\n\n\t/**\n\t * A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)\n\t *\n\t * @param changeInfo An object with information about the change that caused invalidation.\n\t * The object can have the following properties:\n\t * - type: (property|slot) tells what caused the invalidation\n\t * 1) property: a property value was changed either directly or as a result of changing the corresponding attribute\n\t * 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\t *\n\t * - name: the name of the property or slot that caused the invalidation\n\t *\n\t * - reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot\n\t * 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot\n\t * 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\"\n\t * 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed.\n\t * Can only trigger if the child of a slot is a slot element itself.\n\t * 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component.\n\t * Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\t *\n\t * - newValue: the new value of the property (for type=\"property\" only)\n\t *\n\t * - oldValue: the old value of the property (for type=\"property\" only)\n\t *\n\t * - child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)\n\t *\n\t * @public\n\t */\n\tonInvalidation(changeInfo: ChangeInfo) {} // eslint-disable-line\n\n\t/**\n\t * Do not call this method directly, only intended to be called by js\n\t * @protected\n\t */\n\t_render() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst hasIndividualSlots = ctor.getMetadata().hasIndividualSlots();\n\n\t\t// suppress invalidation to prevent state changes scheduling another rendering\n\t\tthis._suppressInvalidation = true;\n\n\t\tthis.onBeforeRendering();\n\n\t\t// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered\n\t\tthis._componentStateFinalizedEventProvider.fireEvent(\"componentStateFinalized\");\n\n\t\t// resume normal invalidation handling\n\t\tthis._suppressInvalidation = false;\n\n\t\t// Update the shadow root with the render result\n\t\t/*\n\t\tif (this._changedState.length) {\n\t\t\tlet element = this.localName;\n\t\t\tif (this.id) {\n\t\t\t\telement = `${element}#${this.id}`;\n\t\t\t}\n\t\t\tconsole.log(\"Re-rendering:\", element, this._changedState.map(x => { // eslint-disable-line\n\t\t\t\tlet res = `${x.type}`;\n\t\t\t\tif (x.reason) {\n\t\t\t\t\tres = `${res}(${x.reason})`;\n\t\t\t\t}\n\t\t\t\tres = `${res}: ${x.name}`;\n\t\t\t\tif (x.type === \"property\") {\n\t\t\t\t\tres = `${res} ${JSON.stringify(x.oldValue)} => ${JSON.stringify(x.newValue)}`;\n\t\t\t\t}\n\n\t\t\t\treturn res;\n\t\t\t}));\n\t\t}\n\t\t*/\n\t\tthis._changedState = [];\n\n\t\t// Update shadow root and static area item\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tupdateShadowRoot(this);\n\t\t}\n\t\tif (this.staticAreaItem) {\n\t\t\tthis.staticAreaItem.update();\n\t\t}\n\n\t\t// Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM\n\t\tif (hasIndividualSlots) {\n\t\t\tthis._assignIndividualSlotsToChildren();\n\t\t}\n\n\t\t// Call the onAfterRendering hook\n\t\tthis.onAfterRendering();\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_assignIndividualSlotsToChildren() {\n\t\tconst domChildren = Array.from(this.children);\n\n\t\tdomChildren.forEach((child: Record<string, any>) => {\n\t\t\tif (child._individualSlot) {\n\t\t\t\tchild.setAttribute(\"slot\", child._individualSlot);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_waitForDomRef() {\n\t\treturn this._domRefReadyPromise;\n\t}\n\n\t/**\n\t * Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n\t * *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\n\t * Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n\t *\n\t * @public\n\t */\n\tgetDomRef() {\n\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\treturn this._getRealDomRef();\n\t\t}\n\n\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst children = [...this.shadowRoot.children].filter(child => ![\"link\", \"style\"].includes(child.localName));\n\t\tif (children.length !== 1) {\n\t\t\tconsole.warn(`The shadow DOM for ${(this.constructor as typeof UI5Element).getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line\n\t\t}\n\n\t\treturn children[0] as HTMLElement;\n\t}\n\n\t/**\n\t * Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\n\t * This is the element that will receive the focus by default.\n\t * @public\n\t */\n\tgetFocusDomRef() {\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() {\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} focusOptions additional options for the focus\n\t * @public\n\t */\n\tasync focus(focusOptions?: FocusOptions) {\n\t\tawait this._waitForDomRef();\n\n\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\tif (focusDomRef && typeof focusDomRef.focus === \"function\") {\n\t\t\tfocusDomRef.focus(focusOptions);\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @public\n\t * @param name - name of the event\n\t * @param data - additional data for the event\n\t * @param cancelable - true, if the user can call preventDefault on the event object\n\t * @param bubbles - true, if the event bubbles\n\t * @returns {boolean} false, if the event was cancelled (preventDefault called), true otherwise\n\t */\n\tfireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true) {\n\t\tconst eventResult = this._fireEvent(name, data, cancelable, bubbles);\n\t\tconst camelCaseEventName = kebabToCamelCase(name);\n\n\t\tif (camelCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(camelCaseEventName, data, cancelable, bubbles);\n\t\t}\n\n\t\treturn eventResult;\n\t}\n\n\t_fireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true) {\n\t\tconst noConflictEvent = new CustomEvent<T>(`ui5-${name}`, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the no-conflict event is prevented\n\t\tconst noConflictEventResult = this.dispatchEvent(noConflictEvent);\n\n\t\tif (skipOriginalEvent(name)) {\n\t\t\treturn noConflictEventResult;\n\t\t}\n\n\t\tconst normalEvent = new CustomEvent<T>(name, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the normal event is prevented\n\t\tconst normalEventResult = this.dispatchEvent(normalEvent);\n\n\t\t// Return false if any of the two events was prevented (its result was false).\n\t\treturn normalEventResult && noConflictEventResult;\n\t}\n\n\t/**\n\t * Returns the actual children, associated with a slot.\n\t * Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n\t * @public\n\t */\n\tgetSlottedNodes<T = Node>(slotName: string) {\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) {\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) {\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 * @returns {String|undefined}\n\t */\n\tget effectiveDir() {\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 * @returns {boolean}\n\t * @public\n\t */\n\tget isUI5Element() {\n\t\treturn true;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element, use metadata properties instead\n\t * @private\n\t */\n\tstatic get observedAttributes() {\n\t\treturn this.getMetadata().getAttributesList();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsShadowDOM() {\n\t\treturn !!this.template || Object.prototype.hasOwnProperty.call(this.prototype, \"render\");\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsStaticArea() {\n\t\treturn !!this.staticAreaTemplate || Object.prototype.hasOwnProperty.call(this.prototype, \"renderStatic\");\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetStaticAreaItemDomRef() {\n\t\tif (!(this.constructor as typeof UI5Element)._needsStaticArea()) {\n\t\t\tthrow new Error(\"This component does not use the static area\");\n\t\t}\n\n\t\tif (!this.staticAreaItem) {\n\t\t\tthis.staticAreaItem = StaticAreaItem.createInstance();\n\t\t\tthis.staticAreaItem.setOwnerElement(this);\n\t\t}\n\t\tif (!this.staticAreaItem.parentElement) {\n\t\t\tgetSingletonElementInstance(\"ui5-static-area\").appendChild(this.staticAreaItem);\n\t\t}\n\n\t\treturn this.staticAreaItem.getDomRef();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _generateAccessors() {\n\t\tconst proto = this.prototype;\n\t\tconst slotsAreManaged = this.getMetadata().slotsAreManaged();\n\n\t\t// Properties\n\t\tconst properties = this.getMetadata().getProperties();\n\t\tfor (const [prop, propData] of Object.entries(properties)) { // eslint-disable-line\n\t\t\tif (!isValidPropertyName(prop)) {\n\t\t\t\tconsole.warn(`\"${prop}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t}\n\n\t\t\tif (propData.type === Boolean && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All booleans are false by default.`);\n\t\t\t}\n\n\t\t\tif (propData.type === Array) {\n\t\t\t\tthrow new Error(`Wrong type for property \"${prop}\". Properties cannot be of type Array - use \"multiple: true\" and set \"type\" to the single value type, such as \"String\", \"Object\", etc...`);\n\t\t\t}\n\n\t\t\tif (propData.type === Object && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All properties of type \"Object\" are empty objects by default.`);\n\t\t\t}\n\n\t\t\tif (propData.multiple && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All multiple properties are empty arrays by default.`);\n\t\t\t}\n\n\t\t\tObject.defineProperty(proto, prop, {\n\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\tif (this._state[prop] !== undefined) {\n\t\t\t\t\t\treturn this._state[prop];\n\t\t\t\t\t}\n\n\t\t\t\t\tconst propDefaultValue = propData.defaultValue;\n\n\t\t\t\t\tif (propData.type === Boolean) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (propData.type === String) { // eslint-disable-line\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t} else if (propData.multiple) { // eslint-disable-line\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tset(this: UI5Element, value: PropertyValue) {\n\t\t\t\t\tlet isDifferent;\n\t\t\t\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\t\t\t\tconst metadataCtor = ctor.getMetadata().constructor as typeof UI5ElementMetadata;\n\n\t\t\t\t\tvalue = metadataCtor.validatePropertyValue(value, propData);\n\t\t\t\t\tconst propertyType = propData.type;\n\t\t\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\t\t\t\tconst oldState = this._state[prop];\n\n\t\t\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (propertyValidator) {\n\t\t\t\t\t\tisDifferent = !propertyValidator.valuesAreEqual(oldState, value);\n\t\t\t\t\t} else if (Array.isArray(oldState) && Array.isArray(value) && propData.multiple && propData.compareValues) { // compareValues is added for IE, test if needed now\n\t\t\t\t\t\tisDifferent = !arraysAreEqual(oldState, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisDifferent = oldState !== value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDifferent) {\n\t\t\t\t\t\tthis._state[prop] = value;\n\t\t\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\t\t\ttype: \"property\",\n\t\t\t\t\t\t\tname: prop,\n\t\t\t\t\t\t\tnewValue: value,\n\t\t\t\t\t\t\toldValue: oldState,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis._updateAttribute(prop, value);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\t// Slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getMetadata().getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries(slots)) { // eslint-disable-line\n\t\t\t\tif (!isValidPropertyName(slotName)) {\n\t\t\t\t\tconsole.warn(`\"${slotName}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t\t}\n\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tObject.defineProperty(proto, propertyName, {\n\t\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\t\tif (this._state[propertyName] !== undefined) {\n\t\t\t\t\t\t\treturn this._state[propertyName];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t},\n\t\t\t\t\tset() {\n\t\t\t\t\t\tthrow new Error(\"Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)\");\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the metadata object for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic metadata: Metadata = {};\n\n\t/**\n\t * Returns the CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic get styles(): ComponentStylesData {\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Returns the Static Area CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic get staticAreaStyles(): ComponentStylesData {\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Returns an array with the dependencies for this UI5 Web Component, which could be:\n\t * - composed components (used in its shadow root or static area item)\n\t * - slotted components that the component may need to communicate with\n\t *\n\t * @protected\n\t */\n\tstatic get dependencies(): Array<typeof UI5Element> {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns a list of the unique dependencies for this UI5 Web Component\n\t *\n\t * @public\n\t */\n\tstatic getUniqueDependencies(this: typeof UI5Element) {\n\t\tif (!uniqueDependenciesCache.has(this)) {\n\t\t\tconst filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);\n\t\t\tuniqueDependenciesCache.set(this, filtered);\n\t\t}\n\n\t\treturn uniqueDependenciesCache.get(this) || [];\n\t}\n\n\t/**\n\t * Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved\n\t *\n\t * @returns {Promise}\n\t */\n\tstatic whenDependenciesDefined(): Promise<Array<typeof UI5Element>> {\n\t\treturn Promise.all(this.getUniqueDependencies().map(dep => dep.define()));\n\t}\n\n\t/**\n\t * Hook that will be called upon custom element definition\n\t *\n\t * @protected\n\t * @returns {Promise<void>}\n\t */\n\tstatic async onDefine() {\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Registers a UI5 Web Component in the browser window object\n\t * @public\n\t * @returns {Promise<UI5Element>}\n\t */\n\tstatic async define() {\n\t\tawait boot();\n\n\t\tawait Promise.all([\n\t\t\tthis.whenDependenciesDefined(),\n\t\t\tthis.onDefine(),\n\t\t]);\n\n\t\tconst tag = this.getMetadata().getTag();\n\n\t\tconst definedLocally = isTagRegistered(tag);\n\t\tconst definedGlobally = window.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\twindow.customElements.define(tag, this as unknown as CustomElementConstructor);\n\t\t\tpreloadLinks(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\n\t * Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only\n\t * @public\n\t * @returns {UI5ElementMetadata}\n\t */\n\tstatic getMetadata() {\n\t\tif (this.hasOwnProperty(\"_metadata\")) { // eslint-disable-line\n\t\t\treturn this._metadata;\n\t\t}\n\n\t\tconst metadataObjects = [this.metadata];\n\t\tlet klass = this; // eslint-disable-line\n\t\twhile (klass !== UI5Element) {\n\t\t\tklass = Object.getPrototypeOf(klass);\n\t\t\tmetadataObjects.unshift(klass.metadata);\n\t\t}\n\t\tconst mergedMetadata = merge({}, ...metadataObjects) as Metadata;\n\n\t\tthis._metadata = new UI5ElementMetadata(mergedMetadata);\n\t\treturn this._metadata;\n\t}\n}\n\n/**\n * Always use duck-typing to cover all runtimes on the page.\n * @returns {boolean}\n */\nconst instanceOfUI5Element = (object: any): object is UI5Element => {\n\treturn \"isUI5Element\" in object;\n};\n\nexport default UI5Element;\nexport { instanceOfUI5Element };\nexport type {\n\tChangeInfo,\n\tRenderer,\n\tRendererOptions,\n};\n"]}
1
+ {"version":3,"file":"UI5Element.js","sourceRoot":"","sources":["../src/UI5Element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,kBAMN,MAAM,yBAAyB,CAAC;AACjC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,2BAA2B,MAAM,uCAAuC,CAAC;AAChF,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,mBAAmB,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAI5D,IAAI,MAAM,GAAG,CAAC,CAAC;AA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";\nimport { boot } from \"./Boot.js\";\nimport UI5ElementMetadata, {\n\tSlot,\n\tSlotValue,\n\tState,\n\tPropertyValue,\n\tMetadata,\n} from \"./UI5ElementMetadata.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport getSingletonElementInstance from \"./util/getSingletonElementInstance.js\";\nimport StaticAreaItem from \"./StaticAreaItem.js\";\nimport updateShadowRoot from \"./updateShadowRoot.js\";\nimport { shouldIgnoreCustomElement } from \"./IgnoreCustomElements.js\";\nimport { renderDeferred, renderImmediately, cancelRender } from \"./Render.js\";\nimport { registerTag, isTagRegistered, recordTagRegistrationFailure } from \"./CustomElementsRegistry.js\";\nimport { observeDOMNode, unobserveDOMNode } from \"./DOMObserver.js\";\nimport { skipOriginalEvent } from \"./config/NoConflict.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport DataType from \"./types/DataType.js\";\nimport { kebabToCamelCase, camelToKebabCase } from \"./util/StringHelper.js\";\nimport isValidPropertyName from \"./util/isValidPropertyName.js\";\nimport { getSlotName, getSlottedNodesList } from \"./util/SlotsHelper.js\";\nimport arraysAreEqual from \"./util/arraysAreEqual.js\";\nimport { markAsRtlAware } from \"./locale/RTLAwareRegistry.js\";\nimport preloadLinks from \"./theming/preloadLinks.js\";\nimport executeTemplate from \"./renderer/executeTemplate.js\";\nimport type { TemplateFunction, TemplateFunctionResult } from \"./renderer/executeTemplate.js\";\nimport type { PromiseResolve, ComponentStylesData, ClassMap } from \"./types.js\";\n\nlet autoId = 0;\n\nconst elementTimeouts = new Map<string, Promise<void>>();\nconst uniqueDependenciesCache = new Map<typeof UI5Element, Array<typeof UI5Element>>();\n\ntype Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, styleStrOrHrefsArr: string | Array<string> | undefined, forStaticArea: boolean, options: RendererOptions) => void;\n\ntype RendererOptions = {\n\t/**\n\t * An object to use as the `this` value for event listeners. It's often\n\t * useful to set this to the host component rendering a template.\n\t */\n\thost?: object,\n}\n\ntype ChangeInfo = {\n\ttype: \"property\" | \"slot\",\n\tname: string,\n\treason?: string,\n\tchild?: SlotValue,\n\ttarget?: UI5Element,\n\tnewValue?: PropertyValue,\n\toldValue?: PropertyValue,\n}\n\ntype InvalidationInfo = ChangeInfo & { target: UI5Element };\n\ntype ChildChangeListener = (param: InvalidationInfo) => void;\n\ntype SlotChangeListener = (this: HTMLSlotElement, ev: Event) => void;\n\n/**\n * Triggers re-rendering of a UI5Element instance due to state change.\n * @param {ChangeInfo} changeInfo An object with information about the change that caused invalidation.\n * @private\n */\nfunction _invalidate(this: UI5Element, changeInfo: ChangeInfo) {\n\t// Invalidation should be suppressed: 1) before the component is rendered for the first time 2) and during the execution of onBeforeRendering\n\t// This is necessary not only as an optimization, but also to avoid infinite loops on invalidation between children and parents (when invalidateOnChildChange is used)\n\tif (this._suppressInvalidation) {\n\t\treturn;\n\t}\n\n\t// Call the onInvalidation hook\n\tthis.onInvalidation(changeInfo);\n\n\tthis._changedState.push(changeInfo);\n\trenderDeferred(this);\n\tthis._invalidationEventProvider.fireEvent(\"invalidate\", { ...changeInfo, target: this });\n}\n\n/**\n * Base class for all UI5 Web Components\n *\n * @class\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.base.UI5Element\n * @extends HTMLElement\n * @public\n */\nabstract class UI5Element extends HTMLElement {\n\t__id?: string;\n\t_suppressInvalidation: boolean;\n\t_changedState: Array<ChangeInfo>;\n\t_invalidationEventProvider: EventProvider<InvalidationInfo, void>;\n\t_componentStateFinalizedEventProvider: EventProvider<void, void>;\n\t_inDOM: boolean;\n\t_fullyConnected: boolean;\n\t_childChangeListeners: Map<string, ChildChangeListener>;\n\t_slotChangeListeners: Map<string, SlotChangeListener>;\n\t_domRefReadyPromise: Promise<void> & { _deferredResolve?: PromiseResolve };\n\t_doNotSyncAttributes: Set<string>;\n\t_state: State;\n\t_getRealDomRef?: () => HTMLElement;\n\n\tstaticAreaItem?: StaticAreaItem;\n\n\tstatic template?: TemplateFunction;\n\tstatic staticAreaTemplate?: TemplateFunction;\n\tstatic _metadata: UI5ElementMetadata;\n\n\t/**\n\t * @deprecated\n\t */\n\tstatic render: Renderer;\n\tstatic renderer?: Renderer;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tthis._changedState = []; // Filled on each invalidation, cleared on re-render (used for debugging)\n\t\tthis._suppressInvalidation = true; // A flag telling whether all invalidations should be ignored. Initialized with \"true\" because a UI5Element can not be invalidated until it is rendered for the first time\n\t\tthis._inDOM = false; // A flag telling whether the UI5Element is currently in the DOM tree of the document or not\n\t\tthis._fullyConnected = false; // A flag telling whether the UI5Element's onEnterDOM hook was called (since it's possible to have the element removed from DOM before that)\n\t\tthis._childChangeListeners = new Map(); // used to store lazy listeners per slot for the child change event of every child inside that slot\n\t\tthis._slotChangeListeners = new Map(); // used to store lazy listeners per slot for the slotchange event of all slot children inside that slot\n\t\tthis._invalidationEventProvider = new EventProvider(); // used by parent components for listening to changes to child components\n\t\tthis._componentStateFinalizedEventProvider = new EventProvider(); // used by friend classes for synchronization\n\t\tlet deferredResolve;\n\t\tthis._domRefReadyPromise = new Promise(resolve => {\n\t\t\tdeferredResolve = resolve;\n\t\t});\n\t\tthis._domRefReadyPromise._deferredResolve = deferredResolve;\n\t\tthis._doNotSyncAttributes = new Set(); // attributes that are excluded from attributeChangedCallback synchronization\n\n\t\tthis._state = { ...ctor.getMetadata().getInitialState() };\n\n\t\tthis._upgradeAllProperties();\n\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tthis.attachShadow({ mode: \"open\" });\n\t\t}\n\t}\n\n\t/**\n\t * Returns a unique ID for this UI5 Element\n\t *\n\t * @deprecated - This property is not guaranteed in future releases\n\t * @protected\n\t */\n\tget _id() {\n\t\tif (!this.__id) {\n\t\t\tthis.__id = `ui5wc_${++autoId}`;\n\t\t}\n\n\t\treturn this.__id;\n\t}\n\n\trender() {\n\t\tconst template = (this.constructor as typeof UI5Element).template;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\trenderStatic() {\n\t\tconst template = (this.constructor as typeof UI5Element).staticAreaTemplate;\n\t\treturn executeTemplate(template!, this);\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onEnterDOM\" only\n\t * @private\n\t */\n\tasync connectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tthis.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n\t\tif (ctor.getMetadata().supportsF6FastNavigation()) {\n\t\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t}\n\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = true;\n\n\t\tif (slotsAreManaged) {\n\t\t\t// always register the observer before yielding control to the main thread (await)\n\t\t\tthis._startObservingDOMChildren();\n\t\t\tawait this._processChildren();\n\t\t}\n\n\t\tif (!this._inDOM) { // Component removed from DOM while _processChildren was running\n\t\t\treturn;\n\t\t}\n\n\t\trenderImmediately(this);\n\t\tthis._domRefReadyPromise._deferredResolve!();\n\t\tthis._fullyConnected = true;\n\t\tthis.onEnterDOM();\n\t}\n\n\t/**\n\t * Do not call this method from derivatives of UI5Element, use \"onExitDOM\" only\n\t * @private\n\t */\n\tdisconnectedCallback() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n\n\t\tthis._inDOM = false;\n\n\t\tif (slotsAreManaged) {\n\t\t\tthis._stopObservingDOMChildren();\n\t\t}\n\n\t\tif (this._fullyConnected) {\n\t\t\tthis.onExitDOM();\n\t\t\tthis._fullyConnected = false;\n\t\t}\n\n\t\tif (this.staticAreaItem && this.staticAreaItem.parentElement) {\n\t\t\tthis.staticAreaItem.parentElement.removeChild(this.staticAreaItem);\n\t\t}\n\n\t\tcancelRender(this);\n\t}\n\n\t/**\n\t * Called every time before the component renders.\n\t * @public\n\t */\n\tonBeforeRendering() {}\n\n\t/**\n\t * Called every time after the component renders.\n\t * @public\n\t */\n\tonAfterRendering() {}\n\n\t/**\n\t * Called on connectedCallback - added to the DOM.\n\t * @public\n\t */\n\tonEnterDOM() {}\n\n\t/**\n\t * Called on disconnectedCallback - removed from the DOM.\n\t * @public\n\t */\n\tonExitDOM() {}\n\n\t/**\n\t * @private\n\t */\n\t_startObservingDOMChildren() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst metadata = ctor.getMetadata();\n\t\tconst shouldObserveChildren = metadata.hasSlots();\n\n\t\tif (!shouldObserveChildren) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canSlotText = metadata.canSlotText();\n\t\tconst hasClonedSlot = Object.keys(metadata.getSlots()).some(slotName => metadata.getSlots()[slotName].cloned);\n\t\tconst mutationObserverOptions = {\n\t\t\tchildList: true,\n\t\t\tsubtree: canSlotText || hasClonedSlot,\n\t\t\tcharacterData: canSlotText,\n\t\t};\n\t\tobserveDOMNode(this, this._processChildren.bind(this) as MutationCallback, mutationObserverOptions);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_stopObservingDOMChildren() {\n\t\tunobserveDOMNode(this);\n\t}\n\n\t/**\n\t * Note: this method is also manually called by \"compatibility/patchNodeValue.js\"\n\t * @private\n\t */\n\tasync _processChildren() {\n\t\tconst hasSlots = (this.constructor as typeof UI5Element).getMetadata().hasSlots();\n\t\tif (hasSlots) {\n\t\t\tawait this._updateSlots();\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\tasync _updateSlots() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst slotsMap = ctor.getMetadata().getSlots();\n\t\tconst canSlotText = ctor.getMetadata().canSlotText();\n\t\tconst domChildren = Array.from(canSlotText ? this.childNodes : this.children) as Array<Node>;\n\n\t\tconst slotsCachedContentMap = new Map<string, Array<SlotValue>>(); // Store here the content of each slot before the mutation occurred\n\t\tconst propertyNameToSlotMap = new Map<string, string>(); // Used for reverse lookup to determine to which slot the property name corresponds\n\n\t\t// Init the _state object based on the supported slots and store the previous values\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tpropertyNameToSlotMap.set(propertyName, slotName);\n\t\t\tslotsCachedContentMap.set(propertyName, [...(this._state[propertyName] as Array<SlotValue>)]);\n\t\t\tthis._clearSlot(slotName, slotData);\n\t\t}\n\n\t\tconst autoIncrementMap = new Map<string, number>();\n\t\tconst slottedChildrenMap = new Map<string, Array<{child: Node, idx: number }>>();\n\n\t\tconst allChildrenUpgraded = domChildren.map(async (child, idx) => {\n\t\t\t// Determine the type of the child (mainly by the slot attribute)\n\t\t\tconst slotName = getSlotName(child);\n\t\t\tconst slotData = slotsMap[slotName];\n\n\t\t\t// Check if the slotName is supported\n\t\t\tif (slotData === undefined) {\n\t\t\t\tif (slotName !== \"default\") {\n\t\t\t\t\tconst validValues = Object.keys(slotsMap).join(\", \");\n\t\t\t\t\tconsole.warn(`Unknown slotName: ${slotName}, ignoring`, child, `Valid values are: ${validValues}`); // eslint-disable-line\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For children that need individual slots, calculate them\n\t\t\tif (slotData.individualSlots) {\n\t\t\t\tconst nextIndex = (autoIncrementMap.get(slotName) || 0) + 1;\n\t\t\t\tautoIncrementMap.set(slotName, nextIndex);\n\t\t\t\t(child as Record<string, any>)._individualSlot = `${slotName}-${nextIndex}`;\n\t\t\t}\n\n\t\t\t// Await for not-yet-defined custom elements\n\t\t\tif (child instanceof HTMLElement) {\n\t\t\t\tconst localName = child.localName;\n\t\t\t\tconst shouldWaitForCustomElement = localName.includes(\"-\") && !shouldIgnoreCustomElement(localName);\n\n\t\t\t\tif (shouldWaitForCustomElement) {\n\t\t\t\t\tconst isDefined = window.customElements.get(localName);\n\t\t\t\t\tif (!isDefined) {\n\t\t\t\t\t\tconst whenDefinedPromise = window.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\twindow.customElements.upgrade(child);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tchild = (ctor.getMetadata().constructor as typeof UI5ElementMetadata).validateSlotValue(child, slotData);\n\n\t\t\t// Listen for any invalidation on the child if invalidateOnChildChange is true or an object (ignore when false or not set)\n\t\t\tif (instanceOfUI5Element(child) && slotData.invalidateOnChildChange) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.attachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Listen for the slotchange event if the child is a slot itself\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._attachSlotChange(child, slotName);\n\t\t\t}\n\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\n\t\t\tif (slottedChildrenMap.has(propertyName)) {\n\t\t\t\tslottedChildrenMap.get(propertyName)!.push({ child, idx });\n\t\t\t} else {\n\t\t\t\tslottedChildrenMap.set(propertyName, [{ child, idx }]);\n\t\t\t}\n\t\t});\n\n\t\tawait Promise.all(allChildrenUpgraded);\n\n\t\t// Distribute the child in the _state object, keeping the Light DOM order,\n\t\t// not the order elements are defined.\n\t\tslottedChildrenMap.forEach((children, propertyName) => {\n\t\t\tthis._state[propertyName] = children.sort((a, b) => a.idx - b.idx).map(_ => _.child);\n\t\t});\n\n\t\t// Compare the content of each slot with the cached values and invalidate for the ones that changed\n\t\tlet invalidated = false;\n\t\tfor (const [slotName, slotData] of Object.entries(slotsMap)) { // eslint-disable-line\n\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\tif (!arraysAreEqual(slotsCachedContentMap.get(propertyName)!, this._state[propertyName] as Array<SlotValue>)) {\n\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\ttype: \"slot\",\n\t\t\t\t\tname: propertyNameToSlotMap.get(propertyName)!,\n\t\t\t\t\treason: \"children\",\n\t\t\t\t});\n\t\t\t\tinvalidated = true;\n\t\t\t}\n\t\t}\n\n\t\t// If none of the slots had an invalidation due to changes to immediate children,\n\t\t// the change is considered to be text content of the default slot\n\t\tif (!invalidated) {\n\t\t\t_invalidate.call(this, {\n\t\t\t\ttype: \"slot\",\n\t\t\t\tname: \"default\",\n\t\t\t\treason: \"textcontent\",\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Removes all children from the slot and detaches listeners, if any\n\t * @private\n\t */\n\t_clearSlot(slotName: string, slotData: Slot) {\n\t\tconst propertyName = slotData.propertyName || slotName;\n\t\tconst children = this._state[propertyName] as Array<SlotValue>;\n\n\t\tchildren.forEach(child => {\n\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\tconst childChangeListener = this._getChildChangeListener(slotName);\n\n\t\t\t\tif (childChangeListener) {\n\t\t\t\t\tchild.detachInvalidate.call(child, childChangeListener);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (child instanceof HTMLSlotElement) {\n\t\t\t\tthis._detachSlotChange(child, slotName);\n\t\t\t}\n\t\t});\n\n\t\tthis._state[propertyName] = [];\n\t}\n\n\t/**\n\t * Attach a callback that will be executed whenever the component is invalidated\n\t *\n\t * @param {InvalidationInfo} callback\n\t * @public\n\t */\n\tattachInvalidate(callback: (param: InvalidationInfo) => 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 {InvalidationInfo} callback\n\t * @public\n\t */\n\tdetachInvalidate(callback: (param: InvalidationInfo) => 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 {sting} slotName the slot in which a child was invalidated\n\t * @param { ChangeInfo } childChangeInfo the changeInfo object for the child in the given slot\n\t * @private\n\t */\n\t_onChildChange(slotName: string, childChangeInfo: ChangeInfo) {\n\t\tif (!(this.constructor as typeof UI5Element).getMetadata().shouldInvalidateOnChildChange(slotName, childChangeInfo.type, childChangeInfo.name)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The component should be invalidated as this type of change on the child is listened for\n\t\t// However, no matter what changed on the child (property/slot), the invalidation is registered as \"type=slot\" for the component itself\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"childchange\",\n\t\t\tchild: childChangeInfo.target,\n\t\t});\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element\n\t * @private\n\t */\n\tattributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n\t\tlet newPropertyValue: PropertyValue;\n\t\tif (this._doNotSyncAttributes.has(name)) { // This attribute is mutated internally, not by the user\n\t\t\treturn;\n\t\t}\n\n\t\tconst properties = (this.constructor as typeof UI5Element).getMetadata().getProperties();\n\t\tconst realName = name.replace(/^ui5-/, \"\");\n\t\tconst nameInCamelCase = kebabToCamelCase(realName);\n\t\tif (properties.hasOwnProperty(nameInCamelCase)) { // eslint-disable-line\n\t\t\tconst propData = properties[nameInCamelCase];\n\t\t\tconst propertyType = propData.type;\n\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\n\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t}\n\n\t\t\tif (propertyValidator) {\n\t\t\t\tnewPropertyValue = propertyValidator.attributeToProperty(newValue);\n\t\t\t} else if (propertyType === Boolean) {\n\t\t\t\tnewPropertyValue = newValue !== null;\n\t\t\t} else {\n\t\t\t\tnewPropertyValue = newValue as string;\n\t\t\t}\n\n\t\t\t(this as Record<string, any>)[nameInCamelCase] = newPropertyValue;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_updateAttribute(name: string, newValue: PropertyValue) {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\n\t\tif (!ctor.getMetadata().hasAttribute(name)) {\n\t\t\treturn;\n\t\t}\n\t\tconst properties = ctor.getMetadata().getProperties();\n\t\tconst propData = properties[name];\n\t\tconst propertyType = propData.type;\n\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\tconst attrName = camelToKebabCase(name);\n\t\tconst attrValue = this.getAttribute(attrName);\n\n\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t}\n\n\t\tif (propertyValidator) {\n\t\t\tconst newAttrValue = propertyValidator.propertyToAttribute(newValue);\n\t\t\tif (newAttrValue === null) { // null means there must be no attribute for the current value of the property\n\t\t\t\tthis._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute\n\t\t\t\tthis.removeAttribute(attrName); // remove the attribute safely (will not trigger synchronization to the property value due to the above line)\n\t\t\t\tthis._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute\n\t\t\t} else {\n\t\t\t\tthis.setAttribute(attrName, newAttrValue);\n\t\t\t}\n\t\t} else if (propertyType === Boolean) {\n\t\t\tif (newValue === true && attrValue === null) {\n\t\t\t\tthis.setAttribute(attrName, \"\");\n\t\t\t} else if (newValue === false && attrValue !== null) {\n\t\t\t\tthis.removeAttribute(attrName);\n\t\t\t}\n\t\t} else if (typeof newValue !== \"object\") {\n\t\t\tif (attrValue !== newValue) {\n\t\t\t\tthis.setAttribute(attrName, newValue as string);\n\t\t\t}\n\t\t} // else { return; } // old object handling\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeProperty(this: Record<string, any>, propertyName: string) {\n\t\tif (this.hasOwnProperty(propertyName)) { // eslint-disable-line\n\t\t\tconst value = this[propertyName];\n\t\t\tdelete this[propertyName];\n\t\t\tthis[propertyName] = value;\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_upgradeAllProperties() {\n\t\tconst allProps = (this.constructor as typeof UI5Element).getMetadata().getPropertiesList();\n\t\tallProps.forEach(this._upgradeProperty.bind(this));\n\t}\n\n\t/**\n\t * Returns a singleton event listener for the \"change\" event of a child in a given slot\n\t *\n\t * @param slotName the name of the slot, where the child is\n\t * @returns {ChildChangeListener}\n\t * @private\n\t */\n\t_getChildChangeListener(slotName: string) {\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 * @returns {SlotChangeListener}\n\t * @private\n\t */\n\t_getSlotChangeListener(slotName: string) {\n\t\tif (!this._slotChangeListeners.has(slotName)) {\n\t\t\tthis._slotChangeListeners.set(slotName, this._onSlotChange.bind(this, slotName));\n\t\t}\n\t\treturn this._slotChangeListeners.get(slotName)!;\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_attachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tconst slotChangeListener = this._getSlotChangeListener(slotName);\n\t\tif (slotChangeListener) {\n\t\t\tchild.addEventListener(\"slotchange\", slotChangeListener);\n\t\t}\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_detachSlotChange(child: HTMLSlotElement, slotName: string) {\n\t\tchild.removeEventListener(\"slotchange\", this._getSlotChangeListener(slotName));\n\t}\n\n\t/**\n\t * Whenever a slot element is slotted inside a UI5 Web Component, its slotchange event invalidates the component\n\t *\n\t * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is\n\t * @private\n\t */\n\t_onSlotChange(slotName: string) {\n\t\t_invalidate.call(this, {\n\t\t\ttype: \"slot\",\n\t\t\tname: slotName,\n\t\t\treason: \"slotchange\",\n\t\t});\n\t}\n\n\t/**\n\t * A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)\n\t *\n\t * @param changeInfo An object with information about the change that caused invalidation.\n\t * The object can have the following properties:\n\t * - type: (property|slot) tells what caused the invalidation\n\t * 1) property: a property value was changed either directly or as a result of changing the corresponding attribute\n\t * 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\t *\n\t * - name: the name of the property or slot that caused the invalidation\n\t *\n\t * - reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot\n\t * 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot\n\t * 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\"\n\t * 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed.\n\t * Can only trigger if the child of a slot is a slot element itself.\n\t * 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component.\n\t * Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\t *\n\t * - newValue: the new value of the property (for type=\"property\" only)\n\t *\n\t * - oldValue: the old value of the property (for type=\"property\" only)\n\t *\n\t * - child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)\n\t *\n\t * @public\n\t */\n\tonInvalidation(changeInfo: ChangeInfo) {} // eslint-disable-line\n\n\t/**\n\t * Do not call this method directly, only intended to be called by js\n\t * @protected\n\t */\n\t_render() {\n\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\tconst hasIndividualSlots = ctor.getMetadata().hasIndividualSlots();\n\n\t\t// suppress invalidation to prevent state changes scheduling another rendering\n\t\tthis._suppressInvalidation = true;\n\n\t\tthis.onBeforeRendering();\n\n\t\t// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered\n\t\tthis._componentStateFinalizedEventProvider.fireEvent(\"componentStateFinalized\");\n\n\t\t// resume normal invalidation handling\n\t\tthis._suppressInvalidation = false;\n\n\t\t// Update the shadow root with the render result\n\t\t/*\n\t\tif (this._changedState.length) {\n\t\t\tlet element = this.localName;\n\t\t\tif (this.id) {\n\t\t\t\telement = `${element}#${this.id}`;\n\t\t\t}\n\t\t\tconsole.log(\"Re-rendering:\", element, this._changedState.map(x => { // eslint-disable-line\n\t\t\t\tlet res = `${x.type}`;\n\t\t\t\tif (x.reason) {\n\t\t\t\t\tres = `${res}(${x.reason})`;\n\t\t\t\t}\n\t\t\t\tres = `${res}: ${x.name}`;\n\t\t\t\tif (x.type === \"property\") {\n\t\t\t\t\tres = `${res} ${JSON.stringify(x.oldValue)} => ${JSON.stringify(x.newValue)}`;\n\t\t\t\t}\n\n\t\t\t\treturn res;\n\t\t\t}));\n\t\t}\n\t\t*/\n\t\tthis._changedState = [];\n\n\t\t// Update shadow root and static area item\n\t\tif (ctor._needsShadowDOM()) {\n\t\t\tupdateShadowRoot(this);\n\t\t}\n\t\tif (this.staticAreaItem) {\n\t\t\tthis.staticAreaItem.update();\n\t\t}\n\n\t\t// Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM\n\t\tif (hasIndividualSlots) {\n\t\t\tthis._assignIndividualSlotsToChildren();\n\t\t}\n\n\t\t// Call the onAfterRendering hook\n\t\tthis.onAfterRendering();\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_assignIndividualSlotsToChildren() {\n\t\tconst domChildren = Array.from(this.children);\n\n\t\tdomChildren.forEach((child: Record<string, any>) => {\n\t\t\tif (child._individualSlot) {\n\t\t\t\tchild.setAttribute(\"slot\", child._individualSlot);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_waitForDomRef() {\n\t\treturn this._domRefReadyPromise;\n\t}\n\n\t/**\n\t * Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n\t * *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\n\t * Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n\t *\n\t * @public\n\t */\n\tgetDomRef() {\n\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\treturn this._getRealDomRef();\n\t\t}\n\n\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst children = [...this.shadowRoot.children].filter(child => ![\"link\", \"style\"].includes(child.localName));\n\t\tif (children.length !== 1) {\n\t\t\tconsole.warn(`The shadow DOM for ${(this.constructor as typeof UI5Element).getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line\n\t\t}\n\n\t\treturn children[0] as HTMLElement;\n\t}\n\n\t/**\n\t * Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\n\t * This is the element that will receive the focus by default.\n\t * @public\n\t */\n\tgetFocusDomRef() {\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() {\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} focusOptions additional options for the focus\n\t * @public\n\t */\n\tasync focus(focusOptions?: FocusOptions) {\n\t\tawait this._waitForDomRef();\n\n\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\tif (focusDomRef && typeof focusDomRef.focus === \"function\") {\n\t\t\tfocusDomRef.focus(focusOptions);\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @public\n\t * @param name - name of the event\n\t * @param data - additional data for the event\n\t * @param cancelable - true, if the user can call preventDefault on the event object\n\t * @param bubbles - true, if the event bubbles\n\t * @returns {boolean} false, if the event was cancelled (preventDefault called), true otherwise\n\t */\n\tfireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true) {\n\t\tconst eventResult = this._fireEvent(name, data, cancelable, bubbles);\n\t\tconst camelCaseEventName = kebabToCamelCase(name);\n\n\t\tif (camelCaseEventName !== name) {\n\t\t\treturn eventResult && this._fireEvent(camelCaseEventName, data, cancelable, bubbles);\n\t\t}\n\n\t\treturn eventResult;\n\t}\n\n\t_fireEvent<T>(name: string, data?: T, cancelable = false, bubbles = true) {\n\t\tconst noConflictEvent = new CustomEvent<T>(`ui5-${name}`, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the no-conflict event is prevented\n\t\tconst noConflictEventResult = this.dispatchEvent(noConflictEvent);\n\n\t\tif (skipOriginalEvent(name)) {\n\t\t\treturn noConflictEventResult;\n\t\t}\n\n\t\tconst normalEvent = new CustomEvent<T>(name, {\n\t\t\tdetail: data,\n\t\t\tcomposed: false,\n\t\t\tbubbles,\n\t\t\tcancelable,\n\t\t});\n\n\t\t// This will be false if the normal event is prevented\n\t\tconst normalEventResult = this.dispatchEvent(normalEvent);\n\n\t\t// Return false if any of the two events was prevented (its result was false).\n\t\treturn normalEventResult && noConflictEventResult;\n\t}\n\n\t/**\n\t * Returns the actual children, associated with a slot.\n\t * Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n\t * @public\n\t */\n\tgetSlottedNodes<T = Node>(slotName: string) {\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) {\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) {\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 * @returns {String|undefined}\n\t */\n\tget effectiveDir() {\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 * @returns {boolean}\n\t * @public\n\t */\n\tget isUI5Element() {\n\t\treturn true;\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Do not override this method in derivatives of UI5Element, use metadata properties instead\n\t * @private\n\t */\n\tstatic get observedAttributes() {\n\t\treturn this.getMetadata().getAttributesList();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsShadowDOM() {\n\t\treturn !!this.template || Object.prototype.hasOwnProperty.call(this.prototype, \"render\");\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _needsStaticArea() {\n\t\treturn !!this.staticAreaTemplate || Object.prototype.hasOwnProperty.call(this.prototype, \"renderStatic\");\n\t}\n\n\t/**\n\t * @public\n\t */\n\tgetStaticAreaItemDomRef() {\n\t\tif (!(this.constructor as typeof UI5Element)._needsStaticArea()) {\n\t\t\tthrow new Error(\"This component does not use the static area\");\n\t\t}\n\n\t\tif (!this.staticAreaItem) {\n\t\t\tthis.staticAreaItem = StaticAreaItem.createInstance();\n\t\t\tthis.staticAreaItem.setOwnerElement(this);\n\t\t}\n\t\tif (!this.staticAreaItem.parentElement) {\n\t\t\tgetSingletonElementInstance(\"ui5-static-area\").appendChild(this.staticAreaItem);\n\t\t}\n\n\t\treturn this.staticAreaItem.getDomRef();\n\t}\n\n\t/**\n\t * @private\n\t */\n\tstatic _generateAccessors() {\n\t\tconst proto = this.prototype;\n\t\tconst slotsAreManaged = this.getMetadata().slotsAreManaged();\n\n\t\t// Properties\n\t\tconst properties = this.getMetadata().getProperties();\n\t\tfor (const [prop, propData] of Object.entries(properties)) { // eslint-disable-line\n\t\t\tif (!isValidPropertyName(prop)) {\n\t\t\t\tconsole.warn(`\"${prop}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t}\n\n\t\t\tif (propData.type === Boolean && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All booleans are false by default.`);\n\t\t\t}\n\n\t\t\tif (propData.type === Array) {\n\t\t\t\tthrow new Error(`Wrong type for property \"${prop}\". Properties cannot be of type Array - use \"multiple: true\" and set \"type\" to the single value type, such as \"String\", \"Object\", etc...`);\n\t\t\t}\n\n\t\t\tif (propData.type === Object && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All properties of type \"Object\" are empty objects by default.`);\n\t\t\t}\n\n\t\t\tif (propData.multiple && propData.defaultValue) {\n\t\t\t\tthrow new Error(`Cannot set a default value for property \"${prop}\". All multiple properties are empty arrays by default.`);\n\t\t\t}\n\n\t\t\tObject.defineProperty(proto, prop, {\n\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\tif (this._state[prop] !== undefined) {\n\t\t\t\t\t\treturn this._state[prop];\n\t\t\t\t\t}\n\n\t\t\t\t\tconst propDefaultValue = propData.defaultValue;\n\n\t\t\t\t\tif (propData.type === Boolean) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (propData.type === String) { // eslint-disable-line\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t} else if (propData.multiple) { // eslint-disable-line\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn propDefaultValue;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tset(this: UI5Element, value: PropertyValue) {\n\t\t\t\t\tlet isDifferent;\n\t\t\t\t\tconst ctor = this.constructor as typeof UI5Element;\n\t\t\t\t\tconst metadataCtor = ctor.getMetadata().constructor as typeof UI5ElementMetadata;\n\n\t\t\t\t\tvalue = metadataCtor.validatePropertyValue(value, propData);\n\t\t\t\t\tconst propertyType = propData.type;\n\t\t\t\t\tlet propertyValidator = propData.validator as typeof DataType;\n\t\t\t\t\tconst oldState = this._state[prop];\n\n\t\t\t\t\tif (propertyType && (propertyType as typeof DataType).isDataTypeClass) {\n\t\t\t\t\t\tpropertyValidator = propertyType as typeof DataType;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (propertyValidator) {\n\t\t\t\t\t\tisDifferent = !propertyValidator.valuesAreEqual(oldState, value);\n\t\t\t\t\t} else if (Array.isArray(oldState) && Array.isArray(value) && propData.multiple && propData.compareValues) { // compareValues is added for IE, test if needed now\n\t\t\t\t\t\tisDifferent = !arraysAreEqual(oldState, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisDifferent = oldState !== value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDifferent) {\n\t\t\t\t\t\tthis._state[prop] = value;\n\t\t\t\t\t\t_invalidate.call(this, {\n\t\t\t\t\t\t\ttype: \"property\",\n\t\t\t\t\t\t\tname: prop,\n\t\t\t\t\t\t\tnewValue: value,\n\t\t\t\t\t\t\toldValue: oldState,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis._updateAttribute(prop, value);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\t// Slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getMetadata().getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries(slots)) { // eslint-disable-line\n\t\t\t\tif (!isValidPropertyName(slotName)) {\n\t\t\t\t\tconsole.warn(`\"${slotName}\" is not a valid property name. Use a name that does not collide with DOM APIs`); /* eslint-disable-line */\n\t\t\t\t}\n\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tObject.defineProperty(proto, propertyName, {\n\t\t\t\t\tget(this: UI5Element) {\n\t\t\t\t\t\tif (this._state[propertyName] !== undefined) {\n\t\t\t\t\t\t\treturn this._state[propertyName];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t},\n\t\t\t\t\tset() {\n\t\t\t\t\t\tthrow new Error(\"Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)\");\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the metadata object for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic metadata: Metadata = {};\n\n\t/**\n\t * Returns the CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic get styles(): ComponentStylesData {\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Returns the Static Area CSS for this UI5 Web Component Class\n\t * @protected\n\t */\n\tstatic get staticAreaStyles(): ComponentStylesData {\n\t\treturn \"\";\n\t}\n\n\t/**\n\t * Returns an array with the dependencies for this UI5 Web Component, which could be:\n\t * - composed components (used in its shadow root or static area item)\n\t * - slotted components that the component may need to communicate with\n\t *\n\t * @protected\n\t */\n\tstatic get dependencies(): Array<typeof UI5Element> {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns a list of the unique dependencies for this UI5 Web Component\n\t *\n\t * @public\n\t */\n\tstatic getUniqueDependencies(this: typeof UI5Element) {\n\t\tif (!uniqueDependenciesCache.has(this)) {\n\t\t\tconst filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);\n\t\t\tuniqueDependenciesCache.set(this, filtered);\n\t\t}\n\n\t\treturn uniqueDependenciesCache.get(this) || [];\n\t}\n\n\t/**\n\t * Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved\n\t *\n\t * @returns {Promise}\n\t */\n\tstatic whenDependenciesDefined(): Promise<Array<typeof UI5Element>> {\n\t\treturn Promise.all(this.getUniqueDependencies().map(dep => dep.define()));\n\t}\n\n\t/**\n\t * Hook that will be called upon custom element definition\n\t *\n\t * @protected\n\t * @returns {Promise<void>}\n\t */\n\tstatic async onDefine() {\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Registers a UI5 Web Component in the browser window object\n\t * @public\n\t * @returns {Promise<UI5Element>}\n\t */\n\tstatic async define() {\n\t\tawait boot();\n\n\t\tawait Promise.all([\n\t\t\tthis.whenDependenciesDefined(),\n\t\t\tthis.onDefine(),\n\t\t]);\n\n\t\tconst tag = this.getMetadata().getTag();\n\n\t\tconst definedLocally = isTagRegistered(tag);\n\t\tconst definedGlobally = window.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\twindow.customElements.define(tag, this as unknown as CustomElementConstructor);\n\t\t\tpreloadLinks(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\n\t * Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only\n\t * @public\n\t * @returns {UI5ElementMetadata}\n\t */\n\tstatic getMetadata() {\n\t\tif (this.hasOwnProperty(\"_metadata\")) { // eslint-disable-line\n\t\t\treturn this._metadata;\n\t\t}\n\n\t\tconst metadataObjects = [this.metadata];\n\t\tlet klass = this; // eslint-disable-line\n\t\twhile (klass !== UI5Element) {\n\t\t\tklass = Object.getPrototypeOf(klass);\n\t\t\tmetadataObjects.unshift(klass.metadata);\n\t\t}\n\t\tconst mergedMetadata = merge({}, ...metadataObjects) as Metadata;\n\n\t\tthis._metadata = new UI5ElementMetadata(mergedMetadata);\n\t\treturn this._metadata;\n\t}\n}\n\n/**\n * Always use duck-typing to cover all runtimes on the page.\n * @returns {boolean}\n */\nconst instanceOfUI5Element = (object: any): object is UI5Element => {\n\treturn \"isUI5Element\" in object;\n};\n\nexport default UI5Element;\nexport { instanceOfUI5Element };\nexport type {\n\tChangeInfo,\n\tRenderer,\n\tRendererOptions,\n};\n"]}
@@ -9,6 +9,7 @@ type Slot = {
9
9
  propertyName?: string;
10
10
  individualSlots?: boolean;
11
11
  invalidateOnChildChange?: boolean | SlotInvalidation;
12
+ cloned?: boolean;
12
13
  };
13
14
  type SlotValue = Node;
14
15
  type Property = {
@@ -126,8 +126,7 @@ class UI5ElementMetadata {
126
126
  * @returns {boolean}
127
127
  */
128
128
  canSlotText() {
129
- const defaultSlot = this.getSlots().default;
130
- return defaultSlot && defaultSlot.type === Node;
129
+ return (this.getSlots().default)?.type === Node;
131
130
  }
132
131
  /**
133
132
  * Determines whether this UI5 Element supports any slots