@ui5/webcomponents-base 0.0.0-82b703434 → 0.0.0-8393c7cdd

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 (349) hide show
  1. package/.eslintignore +3 -0
  2. package/CHANGELOG.md +297 -0
  3. package/README.md +53 -7
  4. package/bundle.esm.js +20 -20
  5. package/dist/AssetRegistry.js +8 -9
  6. package/dist/Boot.js +59 -0
  7. package/dist/CSP.js +59 -0
  8. package/dist/CustomElementsRegistry.js +60 -4
  9. package/dist/CustomElementsScope.js +20 -98
  10. package/dist/CustomElementsScopeUtils.js +108 -0
  11. package/dist/DOMObserver.js +65 -0
  12. package/dist/Device.js +71 -773
  13. package/dist/EventProvider.js +30 -26
  14. package/dist/FeaturesRegistry.js +4 -1
  15. package/dist/FontFace.js +7 -95
  16. package/dist/InitialConfiguration.js +37 -21
  17. package/dist/Keys.js +98 -0
  18. package/dist/ManagedStyles.js +83 -0
  19. package/dist/MediaRange.js +109 -0
  20. package/dist/{util/parseProperties.js → PropertiesFileFormat.js} +6 -0
  21. package/dist/Render.js +175 -0
  22. package/dist/RenderScheduler.js +16 -141
  23. package/dist/Runtimes.js +107 -0
  24. package/dist/StaticArea.js +1 -29
  25. package/dist/StaticAreaItem.js +58 -65
  26. package/dist/SystemCSSVars.js +4 -25
  27. package/dist/UI5Element.js +127 -251
  28. package/dist/UI5ElementMetadata.js +64 -17
  29. package/dist/asset-registries/Icons.js +118 -15
  30. package/dist/asset-registries/Illustrations.js +30 -0
  31. package/dist/asset-registries/LocaleData.js +97 -68
  32. package/dist/asset-registries/Themes.js +29 -35
  33. package/dist/asset-registries/i18n.js +62 -49
  34. package/dist/assets/bundle.esm.742a0a2e.js +43 -0
  35. package/dist/assets-meta/IconCollectionsAlias.js +18 -0
  36. package/dist/config/Icons.js +52 -0
  37. package/dist/config/Language.js +18 -20
  38. package/dist/config/Theme.js +25 -0
  39. package/dist/css/BusyIndicator.css +80 -0
  40. package/dist/css/FontFace.css +66 -0
  41. package/dist/css/OverrideFontFace.css +32 -0
  42. package/dist/css/SystemCSSVars.css +17 -0
  43. package/dist/delegate/ItemNavigation.js +189 -226
  44. package/dist/delegate/ResizeHandler.js +78 -37
  45. package/dist/delegate/ScrollEnablement.js +49 -20
  46. package/dist/features/F6Navigation.js +110 -0
  47. package/dist/features/OpenUI5Enablement.js +119 -0
  48. package/dist/features/OpenUI5Support.js +41 -6
  49. package/dist/generated/AssetParameters.js +1 -1
  50. package/dist/generated/VersionInfo.js +10 -0
  51. package/dist/generated/css/BusyIndicator.css.js +5 -0
  52. package/dist/generated/css/FontFace.css.js +5 -0
  53. package/dist/generated/css/OverrideFontFace.css.js +5 -0
  54. package/dist/generated/css/SystemCSSVars.css.js +5 -0
  55. package/dist/i18nBundle.js +39 -5
  56. package/dist/locale/applyDirection.js +6 -4
  57. package/dist/locale/directionChange.js +32 -0
  58. package/dist/locale/getEffectiveDir.js +28 -0
  59. package/dist/locale/languageChange.js +1 -1
  60. package/dist/renderer/LitRenderer.js +39 -18
  61. package/dist/renderer/directives/style-map.js +72 -0
  62. package/dist/renderer/executeTemplate.js +19 -2
  63. package/dist/sap/base/Log.js +241 -0
  64. package/dist/sap/base/assert.js +8 -0
  65. package/dist/sap/base/security/URLListValidator.js +148 -0
  66. package/dist/sap/base/security/encodeCSS.js +14 -0
  67. package/dist/sap/base/security/encodeXML.js +23 -0
  68. package/dist/sap/base/security/sanitizeHTML.js +16 -0
  69. package/dist/sap/base/strings/toHex.js +8 -0
  70. package/dist/sap/base/util/now.js +7 -0
  71. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +3585 -0
  72. package/dist/theming/CustomStyle.js +25 -5
  73. package/dist/theming/applyTheme.js +11 -16
  74. package/dist/theming/getConstructableStyle.js +7 -6
  75. package/dist/theming/getEffectiveLinksHrefs.js +27 -0
  76. package/dist/theming/getEffectiveStyle.js +24 -8
  77. package/dist/theming/getStylesString.js +4 -2
  78. package/dist/theming/getThemeDesignerTheme.js +25 -5
  79. package/dist/theming/preloadLinks.js +23 -0
  80. package/dist/types/CSSColor.js +9 -0
  81. package/dist/types/DOMReference.js +24 -0
  82. package/dist/types/DataType.js +12 -0
  83. package/dist/types/Float.js +4 -0
  84. package/dist/types/Integer.js +4 -0
  85. package/dist/types/InvisibleMessageMode.js +30 -0
  86. package/dist/types/ItemNavigationBehavior.js +2 -7
  87. package/dist/updateShadowRoot.js +29 -0
  88. package/dist/util/AriaLabelHelper.js +6 -8
  89. package/dist/util/Caret.js +32 -0
  90. package/dist/util/ColorConversion.js +398 -0
  91. package/dist/util/FocusableElements.js +13 -7
  92. package/dist/util/HTMLSanitizer.js +7 -0
  93. package/dist/util/InvisibleMessage.js +69 -0
  94. package/dist/util/PopupUtils.js +93 -0
  95. package/dist/util/SlotsHelper.js +43 -0
  96. package/dist/util/TabbableElements.js +5 -1
  97. package/dist/util/clamp.js +12 -0
  98. package/dist/util/createLinkInHead.js +19 -0
  99. package/dist/util/debounce.js +17 -0
  100. package/dist/util/escapeRegex.js +10 -0
  101. package/dist/util/generateHighlightedMarkup.js +42 -0
  102. package/dist/util/getClassCopy.js +10 -0
  103. package/dist/util/getEffectiveContentDensity.js +5 -0
  104. package/dist/util/getEffectiveScrollbarStyle.js +5 -0
  105. package/dist/util/getNormalizedTarget.js +16 -0
  106. package/dist/util/isDefaultSlotProvided.js +11 -0
  107. package/dist/util/isElementInView.js +15 -0
  108. package/dist/util/isNodeHidden.js +1 -1
  109. package/dist/util/isNodeTabbable.js +4 -4
  110. package/hash.txt +1 -0
  111. package/index.js +1 -1
  112. package/lib/generate-asset-parameters/index.js +8 -5
  113. package/lib/generate-styles/index.js +26 -0
  114. package/lib/generate-version-info/index.js +32 -0
  115. package/package-scripts.js +37 -28
  116. package/package.json +20 -13
  117. package/src/AssetRegistry.js +8 -9
  118. package/src/Boot.js +59 -0
  119. package/src/CSP.js +59 -0
  120. package/src/CustomElementsRegistry.js +60 -4
  121. package/src/CustomElementsScope.js +20 -98
  122. package/src/CustomElementsScopeUtils.js +108 -0
  123. package/src/DOMObserver.js +65 -0
  124. package/src/Device.js +71 -773
  125. package/src/EventProvider.js +30 -26
  126. package/src/FeaturesRegistry.js +4 -1
  127. package/src/FontFace.js +7 -95
  128. package/src/InitialConfiguration.js +37 -21
  129. package/src/Keys.js +98 -0
  130. package/src/ManagedStyles.js +83 -0
  131. package/src/MediaRange.js +109 -0
  132. package/src/{util/parseProperties.js → PropertiesFileFormat.js} +6 -0
  133. package/src/Render.js +175 -0
  134. package/src/RenderScheduler.js +16 -141
  135. package/src/Runtimes.js +107 -0
  136. package/src/StaticArea.js +1 -29
  137. package/src/StaticAreaItem.js +58 -65
  138. package/src/SystemCSSVars.js +4 -25
  139. package/src/UI5Element.js +127 -251
  140. package/src/UI5ElementMetadata.js +64 -17
  141. package/src/asset-registries/Icons.js +118 -15
  142. package/src/asset-registries/Illustrations.js +30 -0
  143. package/src/asset-registries/LocaleData.js +97 -68
  144. package/src/asset-registries/Themes.js +29 -35
  145. package/src/asset-registries/i18n.js +62 -49
  146. package/src/assets-meta/IconCollectionsAlias.js +18 -0
  147. package/src/config/Icons.js +52 -0
  148. package/src/config/Language.js +18 -20
  149. package/src/config/Theme.js +25 -0
  150. package/src/css/BusyIndicator.css +80 -0
  151. package/src/css/FontFace.css +66 -0
  152. package/src/css/OverrideFontFace.css +32 -0
  153. package/src/css/SystemCSSVars.css +17 -0
  154. package/src/delegate/ItemNavigation.js +189 -226
  155. package/src/delegate/ResizeHandler.js +78 -37
  156. package/src/delegate/ScrollEnablement.js +49 -20
  157. package/src/features/F6Navigation.js +110 -0
  158. package/src/features/OpenUI5Enablement.js +119 -0
  159. package/src/features/OpenUI5Support.js +41 -6
  160. package/src/i18nBundle.js +39 -5
  161. package/src/locale/applyDirection.js +6 -4
  162. package/src/locale/directionChange.js +32 -0
  163. package/src/locale/getEffectiveDir.js +28 -0
  164. package/src/locale/languageChange.js +1 -1
  165. package/src/renderer/LitRenderer.js +39 -18
  166. package/src/renderer/directives/style-map.js +72 -0
  167. package/src/renderer/executeTemplate.js +19 -2
  168. package/src/theming/CustomStyle.js +25 -5
  169. package/src/theming/applyTheme.js +11 -16
  170. package/src/theming/getConstructableStyle.js +7 -6
  171. package/src/theming/getEffectiveLinksHrefs.js +27 -0
  172. package/src/theming/getEffectiveStyle.js +24 -8
  173. package/src/theming/getStylesString.js +4 -2
  174. package/src/theming/getThemeDesignerTheme.js +25 -5
  175. package/src/theming/preloadLinks.js +23 -0
  176. package/src/types/CSSColor.js +9 -0
  177. package/src/types/DOMReference.js +24 -0
  178. package/src/types/DataType.js +12 -0
  179. package/src/types/Float.js +4 -0
  180. package/src/types/Integer.js +4 -0
  181. package/src/types/InvisibleMessageMode.js +30 -0
  182. package/src/types/ItemNavigationBehavior.js +2 -7
  183. package/src/updateShadowRoot.js +29 -0
  184. package/src/util/AriaLabelHelper.js +6 -8
  185. package/src/util/Caret.js +32 -0
  186. package/src/util/ColorConversion.js +398 -0
  187. package/src/util/FocusableElements.js +13 -7
  188. package/src/util/HTMLSanitizer.js +7 -0
  189. package/src/util/InvisibleMessage.js +69 -0
  190. package/src/util/PopupUtils.js +93 -0
  191. package/src/util/SlotsHelper.js +43 -0
  192. package/src/util/TabbableElements.js +5 -1
  193. package/src/util/clamp.js +12 -0
  194. package/src/util/createLinkInHead.js +19 -0
  195. package/src/util/debounce.js +17 -0
  196. package/src/util/escapeRegex.js +10 -0
  197. package/src/util/generateHighlightedMarkup.js +42 -0
  198. package/src/util/getClassCopy.js +10 -0
  199. package/src/util/getEffectiveContentDensity.js +5 -0
  200. package/src/util/getEffectiveScrollbarStyle.js +5 -0
  201. package/src/util/getNormalizedTarget.js +16 -0
  202. package/src/util/isDefaultSlotProvided.js +11 -0
  203. package/src/util/isElementInView.js +15 -0
  204. package/src/util/isNodeHidden.js +1 -1
  205. package/src/util/isNodeTabbable.js +4 -4
  206. package/used-modules.txt +10 -0
  207. package/bundle.es5.js +0 -28
  208. package/config/.eslintrc.js +0 -3
  209. package/config/rollup.config.js +0 -1
  210. package/dist/SVGIconRegistry.js +0 -73
  211. package/dist/boot.js +0 -34
  212. package/dist/compatibility/DOMObserver.js +0 -62
  213. package/dist/compatibility/patchNodeValue.js +0 -24
  214. package/dist/compatibility/whenPolyfillLoaded.js +0 -26
  215. package/dist/config/AssetsPath.js +0 -17
  216. package/dist/delegate/CustomResize.js +0 -78
  217. package/dist/delegate/NativeResize.js +0 -45
  218. package/dist/features/PropertiesFormatSupport.js +0 -8
  219. package/dist/features/browsersupport/Edge.js +0 -6
  220. package/dist/features/browsersupport/IE11.js +0 -42
  221. package/dist/features/browsersupport/IE11WithWebComponentsPolyfill.js +0 -5
  222. package/dist/renderer/ifDefined.js +0 -21
  223. package/dist/renderer/scopeHTML.js +0 -32
  224. package/dist/resources/bundle.es5.js +0 -225
  225. package/dist/resources/bundle.es5.js.map +0 -1
  226. package/dist/resources/bundle.esm.js +0 -129
  227. package/dist/resources/bundle.esm.js.map +0 -1
  228. package/dist/test-resources/assets/Themes.js +0 -17
  229. package/dist/test-resources/elements/Child.js +0 -35
  230. package/dist/test-resources/elements/Generic.js +0 -84
  231. package/dist/test-resources/elements/GenericExt.js +0 -26
  232. package/dist/test-resources/elements/NoShadowDOM.js +0 -13
  233. package/dist/test-resources/elements/Parent.js +0 -41
  234. package/dist/test-resources/elements/WithStaticArea.js +0 -76
  235. package/dist/test-resources/pages/AllTestElements.html +0 -42
  236. package/dist/test-resources/pages/Configuration.html +0 -20
  237. package/dist/test-resources/pages/ConfigurationScript.html +0 -36
  238. package/dist/test-resources/pages/assets/messagebundle_de.properties +0 -1
  239. package/dist/test-resources/pages/assets/messagebundle_en.properties +0 -1
  240. package/dist/test-resources/pages/assets/messagebundle_es.properties +0 -1
  241. package/dist/test-resources/pages/assets/messagebundle_fr.properties +0 -1
  242. package/dist/test-resources/pages/i18n.html +0 -40
  243. package/dist/test-resources/specs/ConfigurationChange.spec.js +0 -25
  244. package/dist/test-resources/specs/ConfigurationScript.spec.js +0 -61
  245. package/dist/test-resources/specs/ConfigurationURL.spec.js +0 -45
  246. package/dist/test-resources/specs/CustomTheme.spec.js +0 -25
  247. package/dist/test-resources/specs/StaticArea.spec.js +0 -34
  248. package/dist/test-resources/specs/Theming.spec.js +0 -31
  249. package/dist/test-resources/specs/UI5ElementInvalidation.js +0 -240
  250. package/dist/test-resources/specs/UI5ElementLifecycle.js +0 -96
  251. package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +0 -73
  252. package/dist/test-resources/specs/UI5ElementMetadataExt.js +0 -40
  253. package/dist/test-resources/specs/UI5ElementPropertyValidation.js +0 -12
  254. package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +0 -65
  255. package/dist/test-resources/specs/UI5ElementShadowDOM.js +0 -22
  256. package/dist/test-resources/specs/UI5ElementSlots.js +0 -34
  257. package/dist/theming/CSSVarsPonyfill.js +0 -68
  258. package/dist/theming/adaptCSSForIE.js +0 -95
  259. package/dist/theming/createComponentStyleTag.js +0 -54
  260. package/dist/theming/createThemePropertiesStyleTag.js +0 -20
  261. package/dist/thirdparty/Array.from.js +0 -16
  262. package/dist/thirdparty/Array.prototype.fill.js +0 -44
  263. package/dist/thirdparty/Array.prototype.find.js +0 -46
  264. package/dist/thirdparty/Array.prototype.includes.js +0 -51
  265. package/dist/thirdparty/Element.prototype.closest.js +0 -11
  266. package/dist/thirdparty/Element.prototype.matches.js +0 -6
  267. package/dist/thirdparty/Map.prototype.keys.js +0 -9
  268. package/dist/thirdparty/Number.isInteger.js +0 -5
  269. package/dist/thirdparty/Number.isNaN.js +0 -1
  270. package/dist/thirdparty/Number.parseFloat.js +0 -1
  271. package/dist/thirdparty/Number.parseInt.js +0 -1
  272. package/dist/thirdparty/Object.assign.js +0 -31
  273. package/dist/thirdparty/Object.entries.js +0 -11
  274. package/dist/thirdparty/Symbol.js +0 -2
  275. package/dist/thirdparty/WeakSet.js +0 -27
  276. package/dist/thirdparty/es6-string-methods.js +0 -182
  277. package/dist/thirdparty/events-polyfills.js +0 -89
  278. package/dist/thirdparty/fetch.js +0 -1
  279. package/dist/thirdparty/template.js +0 -600
  280. package/dist/thirdparty/webcomponents-sd-ce-pf.js +0 -318
  281. package/dist/types/CalendarSelection.js +0 -17
  282. package/dist/util/EffectiveAssetPath.js +0 -27
  283. package/dist/util/encodeCSS.js +0 -24
  284. package/dist/util/findNodeOwner.js +0 -35
  285. package/dist/util/isSlot.js +0 -3
  286. package/dist/webcomponentsjs/LICENSE.md +0 -19
  287. package/dist/webcomponentsjs/README.md +0 -229
  288. package/dist/webcomponentsjs/bundles/webcomponents-ce.js +0 -63
  289. package/dist/webcomponentsjs/bundles/webcomponents-ce.js.map +0 -1
  290. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +0 -297
  291. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +0 -1
  292. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js +0 -208
  293. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +0 -1
  294. package/dist/webcomponentsjs/bundles/webcomponents-sd.js +0 -166
  295. package/dist/webcomponentsjs/bundles/webcomponents-sd.js.map +0 -1
  296. package/dist/webcomponentsjs/custom-elements-es5-adapter.js +0 -15
  297. package/dist/webcomponentsjs/package.json +0 -46
  298. package/dist/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +0 -16
  299. package/dist/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +0 -53
  300. package/dist/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +0 -17
  301. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +0 -19
  302. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +0 -28
  303. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +0 -18
  304. package/dist/webcomponentsjs/webcomponents-bundle.js +0 -298
  305. package/dist/webcomponentsjs/webcomponents-bundle.js.map +0 -1
  306. package/dist/webcomponentsjs/webcomponents-loader.js +0 -185
  307. package/src/SVGIconRegistry.js +0 -73
  308. package/src/boot.js +0 -34
  309. package/src/compatibility/DOMObserver.js +0 -62
  310. package/src/compatibility/patchNodeValue.js +0 -24
  311. package/src/compatibility/whenPolyfillLoaded.js +0 -26
  312. package/src/config/AssetsPath.js +0 -17
  313. package/src/delegate/CustomResize.js +0 -78
  314. package/src/delegate/NativeResize.js +0 -45
  315. package/src/features/PropertiesFormatSupport.js +0 -8
  316. package/src/features/browsersupport/Edge.js +0 -6
  317. package/src/features/browsersupport/IE11.js +0 -42
  318. package/src/features/browsersupport/IE11WithWebComponentsPolyfill.js +0 -5
  319. package/src/renderer/ifDefined.js +0 -21
  320. package/src/renderer/scopeHTML.js +0 -32
  321. package/src/theming/CSSVarsPonyfill.js +0 -68
  322. package/src/theming/adaptCSSForIE.js +0 -95
  323. package/src/theming/createComponentStyleTag.js +0 -54
  324. package/src/theming/createThemePropertiesStyleTag.js +0 -20
  325. package/src/thirdparty/Array.from.js +0 -16
  326. package/src/thirdparty/Array.prototype.fill.js +0 -44
  327. package/src/thirdparty/Array.prototype.find.js +0 -46
  328. package/src/thirdparty/Array.prototype.includes.js +0 -51
  329. package/src/thirdparty/Element.prototype.closest.js +0 -11
  330. package/src/thirdparty/Element.prototype.matches.js +0 -6
  331. package/src/thirdparty/Map.prototype.keys.js +0 -9
  332. package/src/thirdparty/Number.isInteger.js +0 -5
  333. package/src/thirdparty/Number.isNaN.js +0 -1
  334. package/src/thirdparty/Number.parseFloat.js +0 -1
  335. package/src/thirdparty/Number.parseInt.js +0 -1
  336. package/src/thirdparty/Object.assign.js +0 -31
  337. package/src/thirdparty/Object.entries.js +0 -11
  338. package/src/thirdparty/Symbol.js +0 -2
  339. package/src/thirdparty/WeakSet.js +0 -27
  340. package/src/thirdparty/es6-string-methods.js +0 -182
  341. package/src/thirdparty/events-polyfills.js +0 -89
  342. package/src/thirdparty/fetch.js +0 -1
  343. package/src/thirdparty/template.js +0 -600
  344. package/src/thirdparty/webcomponents-sd-ce-pf.js +0 -318
  345. package/src/types/CalendarSelection.js +0 -17
  346. package/src/util/EffectiveAssetPath.js +0 -27
  347. package/src/util/encodeCSS.js +0 -24
  348. package/src/util/findNodeOwner.js +0 -35
  349. package/src/util/isSlot.js +0 -3
@@ -1,33 +1,30 @@
1
1
  import merge from "./thirdparty/merge.js";
2
- import boot from "./boot.js";
2
+ import { boot } from "./Boot.js";
3
3
  import UI5ElementMetadata from "./UI5ElementMetadata.js";
4
4
  import EventProvider from "./EventProvider.js";
5
- import executeTemplate from "./renderer/executeTemplate.js";
5
+ import getSingletonElementInstance from "./util/getSingletonElementInstance.js";
6
6
  import StaticAreaItem from "./StaticAreaItem.js";
7
- import RenderScheduler from "./RenderScheduler.js";
7
+ import updateShadowRoot from "./updateShadowRoot.js";
8
+ import { renderDeferred, renderImmediately, cancelRender } from "./Render.js";
8
9
  import { registerTag, isTagRegistered, recordTagRegistrationFailure } from "./CustomElementsRegistry.js";
9
- import DOMObserver from "./compatibility/DOMObserver.js";
10
+ import { observeDOMNode, unobserveDOMNode } from "./DOMObserver.js";
10
11
  import { skipOriginalEvent } from "./config/NoConflict.js";
11
- import { getRTL } from "./config/RTL.js";
12
- import getConstructableStyle from "./theming/getConstructableStyle.js";
13
- import createComponentStyleTag from "./theming/createComponentStyleTag.js";
14
- import getEffectiveStyle from "./theming/getEffectiveStyle.js";
15
- import Integer from "./types/Integer.js";
16
- import Float from "./types/Float.js";
12
+ import getEffectiveDir from "./locale/getEffectiveDir.js";
13
+ import DataType from "./types/DataType.js";
17
14
  import { kebabToCamelCase, camelToKebabCase } from "./util/StringHelper.js";
18
15
  import isValidPropertyName from "./util/isValidPropertyName.js";
19
- import isSlot from "./util/isSlot.js";
16
+ import isDescendantOf from "./util/isDescendantOf.js";
17
+ import { isSlot, getSlotName, getSlottedElementsList } from "./util/SlotsHelper.js";
20
18
  import arraysAreEqual from "./util/arraysAreEqual.js";
19
+ import getClassCopy from "./util/getClassCopy.js";
21
20
  import { markAsRtlAware } from "./locale/RTLAwareRegistry.js";
21
+ import preloadLinks from "./theming/preloadLinks.js";
22
22
 
23
23
  let autoId = 0;
24
24
 
25
25
  const elementTimeouts = new Map();
26
26
  const uniqueDependenciesCache = new Map();
27
27
 
28
- const GLOBAL_CONTENT_DENSITY_CSS_VAR = "--_ui5_content_density";
29
- const GLOBAL_DIR_CSS_VAR = "--_ui5_dir";
30
-
31
28
  /**
32
29
  * Triggers re-rendering of a UI5Element instance due to state change.
33
30
  *
@@ -45,10 +42,12 @@ function _invalidate(changeInfo) {
45
42
  this.onInvalidation(changeInfo);
46
43
 
47
44
  this._changedState.push(changeInfo);
48
- RenderScheduler.renderDeferred(this);
49
- this._eventProvider.fireEvent("change", { ...changeInfo, target: this });
45
+ renderDeferred(this);
46
+ this._eventProvider.fireEvent("invalidate", { ...changeInfo, target: this });
50
47
  }
51
48
 
49
+ let metadata = {};
50
+
52
51
  /**
53
52
  * Base class for all UI5 Web Components
54
53
  *
@@ -75,10 +74,14 @@ class UI5Element extends HTMLElement {
75
74
  deferredResolve = resolve;
76
75
  });
77
76
  this._domRefReadyPromise._deferredResolve = deferredResolve;
77
+ this._doNotSyncAttributes = new Set(); // attributes that are excluded from attributeChangedCallback synchronization
78
78
 
79
79
  this._initializeState();
80
80
  this._upgradeAllProperties();
81
- this._initializeContainers();
81
+
82
+ if (this.constructor._needsShadowDOM()) {
83
+ this.attachShadow({ mode: "open" });
84
+ }
82
85
  }
83
86
 
84
87
  /**
@@ -95,32 +98,16 @@ class UI5Element extends HTMLElement {
95
98
  return this.__id;
96
99
  }
97
100
 
98
- /**
99
- * @private
100
- */
101
- _initializeContainers() {
102
- const needsShadowDOM = this.constructor._needsShadowDOM();
103
- const needsStaticArea = this.constructor._needsStaticArea();
104
-
105
- // Init Shadow Root
106
- if (needsShadowDOM) {
107
- this.attachShadow({ mode: "open" });
108
- }
109
-
110
- // Init StaticAreaItem only if needed
111
- if (needsStaticArea) {
112
- this.staticAreaItem = new StaticAreaItem(this);
113
- }
114
- }
115
-
116
101
  /**
117
102
  * Do not call this method from derivatives of UI5Element, use "onEnterDOM" only
118
103
  * @private
119
104
  */
120
105
  async connectedCallback() {
121
106
  this.setAttribute(this.constructor.getMetadata().getPureTag(), "");
107
+ if (this.constructor.getMetadata().supportsF6FastNavigation()) {
108
+ this.setAttribute("data-sap-ui-fastnavgroup", "true");
109
+ }
122
110
 
123
- const needsShadowDOM = this.constructor._needsShadowDOM();
124
111
  const slotsAreManaged = this.constructor.getMetadata().slotsAreManaged();
125
112
 
126
113
  this._inDOM = true;
@@ -131,16 +118,11 @@ class UI5Element extends HTMLElement {
131
118
  await this._processChildren();
132
119
  }
133
120
 
134
- if (needsShadowDOM && !this.shadowRoot) { // Workaround for Firefox74 bug
135
- await Promise.resolve();
136
- }
137
-
138
121
  if (!this._inDOM) { // Component removed from DOM while _processChildren was running
139
122
  return;
140
123
  }
141
124
 
142
- RenderScheduler.register(this);
143
- RenderScheduler.renderImmediately(this);
125
+ renderImmediately(this);
144
126
  this._domRefReadyPromise._deferredResolve();
145
127
  this._fullyConnected = true;
146
128
  if (typeof this.onEnterDOM === "function") {
@@ -153,8 +135,6 @@ class UI5Element extends HTMLElement {
153
135
  * @private
154
136
  */
155
137
  disconnectedCallback() {
156
- const needsShadowDOM = this.constructor._needsShadowDOM();
157
- const needsStaticArea = this.constructor._needsStaticArea();
158
138
  const slotsAreManaged = this.constructor.getMetadata().slotsAreManaged();
159
139
 
160
140
  this._inDOM = false;
@@ -163,21 +143,18 @@ class UI5Element extends HTMLElement {
163
143
  this._stopObservingDOMChildren();
164
144
  }
165
145
 
166
- if (needsShadowDOM) {
167
- RenderScheduler.deregister(this);
168
- if (this._fullyConnected) {
169
- if (typeof this.onExitDOM === "function") {
170
- this.onExitDOM();
171
- }
172
- this._fullyConnected = false;
146
+ if (this._fullyConnected) {
147
+ if (typeof this.onExitDOM === "function") {
148
+ this.onExitDOM();
173
149
  }
150
+ this._fullyConnected = false;
174
151
  }
175
152
 
176
- if (needsStaticArea) {
177
- this.staticAreaItem._removeFragmentFromStaticArea();
153
+ if (this.staticAreaItem && this.staticAreaItem.parentElement) {
154
+ this.staticAreaItem.parentElement.removeChild(this.staticAreaItem);
178
155
  }
179
156
 
180
- RenderScheduler.cancelRender(this);
157
+ cancelRender(this);
181
158
  }
182
159
 
183
160
  /**
@@ -195,14 +172,14 @@ class UI5Element extends HTMLElement {
195
172
  subtree: canSlotText,
196
173
  characterData: canSlotText,
197
174
  };
198
- DOMObserver.observeDOMNode(this, this._processChildren.bind(this), mutationObserverOptions);
175
+ observeDOMNode(this, this._processChildren.bind(this), mutationObserverOptions);
199
176
  }
200
177
 
201
178
  /**
202
179
  * @private
203
180
  */
204
181
  _stopObservingDOMChildren() {
205
- DOMObserver.unobserveDOMNode(this);
182
+ unobserveDOMNode(this);
206
183
  }
207
184
 
208
185
  /**
@@ -240,7 +217,7 @@ class UI5Element extends HTMLElement {
240
217
 
241
218
  const allChildrenUpgraded = domChildren.map(async (child, idx) => {
242
219
  // Determine the type of the child (mainly by the slot attribute)
243
- const slotName = this.constructor._getSlotName(child);
220
+ const slotName = getSlotName(child);
244
221
  const slotData = slotsMap[slotName];
245
222
 
246
223
  // Check if the slotName is supported
@@ -280,7 +257,8 @@ class UI5Element extends HTMLElement {
280
257
 
281
258
  // Listen for any invalidation on the child if invalidateOnChildChange is true or an object (ignore when false or not set)
282
259
  if (child.isUI5Element && slotData.invalidateOnChildChange) {
283
- child._attachChange(this._getChildChangeListener(slotName));
260
+ const method = (child.attachInvalidate || child._attachChange).bind(child);
261
+ method(this._getChildChangeListener(slotName));
284
262
  }
285
263
 
286
264
  // Listen for the slotchange event if the child is a slot itself
@@ -340,7 +318,8 @@ class UI5Element extends HTMLElement {
340
318
 
341
319
  children.forEach(child => {
342
320
  if (child && child.isUI5Element) {
343
- child._detachChange(this._getChildChangeListener(slotName));
321
+ const method = (child.detachInvalidate || child._detachChange).bind(child);
322
+ method(this._getChildChangeListener(slotName));
344
323
  }
345
324
 
346
325
  if (isSlot(child)) {
@@ -355,20 +334,20 @@ class UI5Element extends HTMLElement {
355
334
  * Attach a callback that will be executed whenever the component is invalidated
356
335
  *
357
336
  * @param callback
358
- * @protected
337
+ * @public
359
338
  */
360
- _attachChange(callback) {
361
- this._eventProvider.attachEvent("change", callback);
339
+ attachInvalidate(callback) {
340
+ this._eventProvider.attachEvent("invalidate", callback);
362
341
  }
363
342
 
364
343
  /**
365
344
  * Detach the callback that is executed whenever the component is invalidated
366
345
  *
367
346
  * @param callback
368
- * @protected
347
+ * @public
369
348
  */
370
- _detachChange(callback) {
371
- this._eventProvider.detachEvent("change", callback);
349
+ detachInvalidate(callback) {
350
+ this._eventProvider.detachEvent("invalidate", callback);
372
351
  }
373
352
 
374
353
  /**
@@ -398,6 +377,10 @@ class UI5Element extends HTMLElement {
398
377
  * @private
399
378
  */
400
379
  attributeChangedCallback(name, oldValue, newValue) {
380
+ if (this._doNotSyncAttributes.has(name)) { // This attribute is mutated internally, not by the user
381
+ return;
382
+ }
383
+
401
384
  const properties = this.constructor.getMetadata().getProperties();
402
385
  const realName = name.replace(/^ui5-/, "");
403
386
  const nameInCamelCase = kebabToCamelCase(realName);
@@ -405,12 +388,8 @@ class UI5Element extends HTMLElement {
405
388
  const propertyTypeClass = properties[nameInCamelCase].type;
406
389
  if (propertyTypeClass === Boolean) {
407
390
  newValue = newValue !== null;
408
- }
409
- if (propertyTypeClass === Integer) {
410
- newValue = parseInt(newValue);
411
- }
412
- if (propertyTypeClass === Float) {
413
- newValue = parseFloat(newValue);
391
+ } else if (isDescendantOf(propertyTypeClass, DataType)) {
392
+ newValue = propertyTypeClass.attributeToProperty(newValue);
414
393
  }
415
394
  this[nameInCamelCase] = newValue;
416
395
  }
@@ -423,22 +402,31 @@ class UI5Element extends HTMLElement {
423
402
  if (!this.constructor.getMetadata().hasAttribute(name)) {
424
403
  return;
425
404
  }
426
-
427
- if (typeof newValue === "object") {
428
- return;
429
- }
430
-
405
+ const properties = this.constructor.getMetadata().getProperties();
406
+ const propertyTypeClass = properties[name].type;
431
407
  const attrName = camelToKebabCase(name);
432
408
  const attrValue = this.getAttribute(attrName);
433
- if (typeof newValue === "boolean") {
409
+
410
+ if (propertyTypeClass === Boolean) {
434
411
  if (newValue === true && attrValue === null) {
435
412
  this.setAttribute(attrName, "");
436
413
  } else if (newValue === false && attrValue !== null) {
437
414
  this.removeAttribute(attrName);
438
415
  }
439
- } else if (attrValue !== newValue) {
440
- this.setAttribute(attrName, newValue);
441
- }
416
+ } else if (isDescendantOf(propertyTypeClass, DataType)) {
417
+ const newAttrValue = propertyTypeClass.propertyToAttribute(newValue);
418
+ if (newAttrValue === null) { // null means there must be no attribute for the current value of the property
419
+ this._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute
420
+ this.removeAttribute(attrName); // remove the attribute safely (will not trigger synchronization to the property value due to the above line)
421
+ this._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute
422
+ } else {
423
+ this.setAttribute(attrName, newAttrValue);
424
+ }
425
+ } else if (typeof newValue !== "object") {
426
+ if (attrValue !== newValue) {
427
+ this.setAttribute(attrName, newValue);
428
+ }
429
+ } // else { return; } // old object handling
442
430
  }
443
431
 
444
432
  /**
@@ -464,8 +452,7 @@ class UI5Element extends HTMLElement {
464
452
  * @private
465
453
  */
466
454
  _initializeState() {
467
- const defaultState = this.constructor._getDefaultState();
468
- this._state = Object.assign({}, defaultState);
455
+ this._state = { ...this.constructor.getMetadata().getInitialState() };
469
456
  }
470
457
 
471
458
  /**
@@ -554,7 +541,7 @@ class UI5Element extends HTMLElement {
554
541
  onInvalidation(changeInfo) {}
555
542
 
556
543
  /**
557
- * Do not call this method directly, only intended to be called by RenderScheduler.js
544
+ * Do not call this method directly, only intended to be called by js
558
545
  * @protected
559
546
  */
560
547
  _render() {
@@ -599,10 +586,11 @@ class UI5Element extends HTMLElement {
599
586
  this._changedState = [];
600
587
 
601
588
  // Update shadow root and static area item
602
- this._updateShadowRoot();
603
- if (this._shouldUpdateFragment()) {
604
- this.staticAreaItem._updateFragment(this);
605
- this.staticAreaItemDomRef = this.staticAreaItem.staticAreaItemDomRef.shadowRoot;
589
+ if (this.constructor._needsShadowDOM()) {
590
+ updateShadowRoot(this);
591
+ }
592
+ if (this.staticAreaItem) {
593
+ this.staticAreaItem.update();
606
594
  }
607
595
 
608
596
  // Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM
@@ -616,35 +604,6 @@ class UI5Element extends HTMLElement {
616
604
  }
617
605
  }
618
606
 
619
- /**
620
- * @private
621
- */
622
- _updateShadowRoot() {
623
- if (!this.constructor._needsShadowDOM()) {
624
- return;
625
- }
626
-
627
- let styleToPrepend;
628
- const renderResult = executeTemplate(this.constructor.template, this);
629
-
630
- // IE11, Edge
631
- if (window.ShadyDOM) {
632
- createComponentStyleTag(this.constructor);
633
- }
634
-
635
- // Chrome
636
- if (document.adoptedStyleSheets) {
637
- this.shadowRoot.adoptedStyleSheets = getConstructableStyle(this.constructor);
638
- }
639
-
640
- // FF, Safari
641
- if (!document.adoptedStyleSheets && !window.ShadyDOM) {
642
- styleToPrepend = getEffectiveStyle(this.constructor);
643
- }
644
-
645
- this.constructor.render(renderResult, this.shadowRoot, styleToPrepend, { eventContext: this });
646
- }
647
-
648
607
  /**
649
608
  * @private
650
609
  */
@@ -667,16 +626,27 @@ class UI5Element extends HTMLElement {
667
626
 
668
627
  /**
669
628
  * Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template
629
+ * *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option
670
630
  * Use this method instead of "this.shadowRoot" to read the Shadow DOM, if ever necessary
631
+ *
671
632
  * @public
672
633
  */
673
634
  getDomRef() {
635
+ // If a component set _getRealDomRef to its children, use the return value of this function
636
+ if (typeof this._getRealDomRef === "function") {
637
+ return this._getRealDomRef();
638
+ }
639
+
674
640
  if (!this.shadowRoot || this.shadowRoot.children.length === 0) {
675
641
  return;
676
642
  }
677
643
 
678
- return this.shadowRoot.children.length === 1
679
- ? this.shadowRoot.children[0] : this.shadowRoot.children[1];
644
+ const children = [...this.shadowRoot.children].filter(child => !["link", "style"].includes(child.localName));
645
+ if (children.length !== 1) {
646
+ console.warn(`The shadow DOM for ${this.constructor.getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line
647
+ }
648
+
649
+ return children[0];
680
650
  }
681
651
 
682
652
  /**
@@ -702,19 +672,6 @@ class UI5Element extends HTMLElement {
702
672
  return this.getFocusDomRef();
703
673
  }
704
674
 
705
- /**
706
- * Use this method in order to get a reference to an element in the shadow root of the web component or the static area item of the component
707
- * @public
708
- * @method
709
- * @param {String} refName Defines the name of the stable DOM ref
710
- */
711
- getStableDomRef(refName) {
712
- const staticAreaResult = this.staticAreaItemDomRef && this.staticAreaItemDomRef.querySelector(`[data-ui5-stable=${refName}]`);
713
-
714
- return staticAreaResult
715
- || this.getDomRef().querySelector(`[data-ui5-stable=${refName}]`);
716
- }
717
-
718
675
  /**
719
676
  * Set the focus to the element, returned by "getFocusDomRef()" (marked by "data-sap-focus-ref")
720
677
  * @public
@@ -750,8 +707,6 @@ class UI5Element extends HTMLElement {
750
707
  }
751
708
 
752
709
  _fireEvent(name, data, cancelable = false, bubbles = true) {
753
- let compatEventResult = true; // Initialized to true, because if the event is not fired at all, it should be considered "not-prevented"
754
-
755
710
  const noConflictEvent = new CustomEvent(`ui5-${name}`, {
756
711
  detail: data,
757
712
  composed: false,
@@ -759,14 +714,14 @@ class UI5Element extends HTMLElement {
759
714
  cancelable,
760
715
  });
761
716
 
762
- // This will be false if the compat event is prevented
763
- compatEventResult = this.dispatchEvent(noConflictEvent);
717
+ // This will be false if the no-conflict event is prevented
718
+ const noConflictEventResult = this.dispatchEvent(noConflictEvent);
764
719
 
765
720
  if (skipOriginalEvent(name)) {
766
- return compatEventResult;
721
+ return noConflictEventResult;
767
722
  }
768
723
 
769
- const customEvent = new CustomEvent(name, {
724
+ const normalEvent = new CustomEvent(name, {
770
725
  detail: data,
771
726
  composed: false,
772
727
  bubbles,
@@ -774,10 +729,10 @@ class UI5Element extends HTMLElement {
774
729
  });
775
730
 
776
731
  // This will be false if the normal event is prevented
777
- const normalEventResult = this.dispatchEvent(customEvent);
732
+ const normalEventResult = this.dispatchEvent(normalEvent);
778
733
 
779
734
  // Return false if any of the two events was prevented (its result was false).
780
- return normalEventResult && compatEventResult;
735
+ return normalEventResult && noConflictEventResult;
781
736
  }
782
737
 
783
738
  /**
@@ -786,18 +741,7 @@ class UI5Element extends HTMLElement {
786
741
  * @public
787
742
  */
788
743
  getSlottedNodes(slotName) {
789
- const reducer = (acc, curr) => {
790
- if (!isSlot(curr)) {
791
- return acc.concat([curr]);
792
- }
793
- return acc.concat(curr.assignedNodes({ flatten: true }).filter(item => item instanceof HTMLElement));
794
- };
795
-
796
- return this[slotName].reduce(reducer, []);
797
- }
798
-
799
- get isCompact() {
800
- return getComputedStyle(this).getPropertyValue(GLOBAL_CONTENT_DENSITY_CSS_VAR) === "compact";
744
+ return getSlottedElementsList(this[slotName]);
801
745
  }
802
746
 
803
747
  /**
@@ -809,33 +753,7 @@ class UI5Element extends HTMLElement {
809
753
  */
810
754
  get effectiveDir() {
811
755
  markAsRtlAware(this.constructor); // if a UI5 Element calls this method, it's considered to be rtl-aware
812
-
813
- const doc = window.document;
814
- const dirValues = ["ltr", "rtl"]; // exclude "auto" and "" from all calculations
815
- const locallyAppliedDir = getComputedStyle(this).getPropertyValue(GLOBAL_DIR_CSS_VAR);
816
-
817
- // In that order, inspect the CSS Var (for modern browsers), the element itself, html and body (for IE fallback)
818
- if (dirValues.includes(locallyAppliedDir)) {
819
- return locallyAppliedDir;
820
- }
821
- if (dirValues.includes(this.dir)) {
822
- return this.dir;
823
- }
824
- if (dirValues.includes(doc.documentElement.dir)) {
825
- return doc.documentElement.dir;
826
- }
827
- if (dirValues.includes(doc.body.dir)) {
828
- return doc.body.dir;
829
- }
830
-
831
- // Finally, check the configuration for explicitly set RTL or language-implied RTL
832
- return getRTL() ? "rtl" : undefined;
833
- }
834
-
835
- updateStaticAreaItemContentDensity() {
836
- if (this.staticAreaItem) {
837
- this.staticAreaItem._updateContentDensity(this.isCompact);
838
- }
756
+ return getEffectiveDir(this);
839
757
  }
840
758
 
841
759
  /**
@@ -855,26 +773,6 @@ class UI5Element extends HTMLElement {
855
773
  return this.getMetadata().getAttributesList();
856
774
  }
857
775
 
858
- /**
859
- * @private
860
- */
861
- static _getSlotName(child) {
862
- // Text nodes can only go to the default slot
863
- if (!(child instanceof HTMLElement)) {
864
- return "default";
865
- }
866
-
867
- // Discover the slot based on the real slot name (f.e. footer => footer, or content-32 => content)
868
- const slot = child.getAttribute("slot");
869
- if (slot) {
870
- const match = slot.match(/^(.+?)-\d+$/);
871
- return match ? match[1] : slot;
872
- }
873
-
874
- // Use default slot as a fallback
875
- return "default";
876
- }
877
-
878
776
  /**
879
777
  * @private
880
778
  */
@@ -882,70 +780,30 @@ class UI5Element extends HTMLElement {
882
780
  return !!this.template;
883
781
  }
884
782
 
885
- _shouldUpdateFragment() {
886
- return this.constructor._needsStaticArea() && this.staticAreaItem.isRendered();
887
- }
888
-
889
783
  /**
890
784
  * @private
891
785
  */
892
786
  static _needsStaticArea() {
893
- return typeof this.staticAreaTemplate === "function";
787
+ return !!this.staticAreaTemplate;
894
788
  }
895
789
 
896
790
  /**
897
791
  * @public
898
792
  */
899
793
  getStaticAreaItemDomRef() {
900
- return this.staticAreaItem.getDomRef();
901
- }
902
-
903
- /**
904
- * @private
905
- */
906
- static _getDefaultState() {
907
- if (Object.prototype.hasOwnProperty.call(this, "_defaultState")) {
908
- return this._defaultState;
794
+ if (!this.constructor._needsStaticArea()) {
795
+ throw new Error("This component does not use the static area");
909
796
  }
910
797
 
911
- const MetadataClass = this.getMetadata();
912
- const defaultState = {};
913
- const slotsAreManaged = MetadataClass.slotsAreManaged();
914
-
915
- // Initialize properties
916
- const props = MetadataClass.getProperties();
917
- for (const propName in props) { // eslint-disable-line
918
- const propType = props[propName].type;
919
- const propDefaultValue = props[propName].defaultValue;
920
-
921
- if (propType === Boolean) {
922
- defaultState[propName] = false;
923
-
924
- if (propDefaultValue !== undefined) {
925
- console.warn("The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default"); // eslint-disable-line
926
- }
927
- } else if (props[propName].multiple) {
928
- defaultState[propName] = [];
929
- } else if (propType === Object) {
930
- defaultState[propName] = "defaultValue" in props[propName] ? props[propName].defaultValue : {};
931
- } else if (propType === String) {
932
- defaultState[propName] = "defaultValue" in props[propName] ? props[propName].defaultValue : "";
933
- } else {
934
- defaultState[propName] = propDefaultValue;
935
- }
798
+ if (!this.staticAreaItem) {
799
+ this.staticAreaItem = StaticAreaItem.createInstance();
800
+ this.staticAreaItem.setOwnerElement(this);
936
801
  }
937
-
938
- // Initialize slots
939
- if (slotsAreManaged) {
940
- const slots = MetadataClass.getSlots();
941
- for (const [slotName, slotData] of Object.entries(slots)) { // eslint-disable-line
942
- const propertyName = slotData.propertyName || slotName;
943
- defaultState[propertyName] = [];
944
- }
802
+ if (!this.staticAreaItem.parentElement) {
803
+ getSingletonElementInstance("ui5-static-area").appendChild(this.staticAreaItem);
945
804
  }
946
805
 
947
- this._defaultState = defaultState;
948
- return defaultState;
806
+ return this.staticAreaItem.getDomRef();
949
807
  }
950
808
 
951
809
  /**
@@ -997,11 +855,19 @@ class UI5Element extends HTMLElement {
997
855
  }
998
856
  },
999
857
  set(value) {
858
+ let isDifferent;
1000
859
  value = this.constructor.getMetadata().constructor.validatePropertyValue(value, propData);
1001
860
 
1002
861
  const oldState = this._state[prop];
862
+ if (propData.multiple && propData.compareValues) {
863
+ isDifferent = !arraysAreEqual(oldState, value);
864
+ } else if (isDescendantOf(propData.type, DataType)) {
865
+ isDifferent = !propData.type.valuesAreEqual(oldState, value);
866
+ } else {
867
+ isDifferent = oldState !== value;
868
+ }
1003
869
 
1004
- if (oldState !== value) {
870
+ if (isDifferent) {
1005
871
  this._state[prop] = value;
1006
872
  _invalidate.call(this, {
1007
873
  type: "property",
@@ -1044,7 +910,15 @@ class UI5Element extends HTMLElement {
1044
910
  * @protected
1045
911
  */
1046
912
  static get metadata() {
1047
- return {};
913
+ return metadata;
914
+ }
915
+
916
+ /**
917
+ * Sets a new metadata object for this UI5 Web Component Class
918
+ * @protected
919
+ */
920
+ static set metadata(newMetadata) {
921
+ metadata = newMetadata;
1048
922
  }
1049
923
 
1050
924
  /**
@@ -1132,11 +1006,13 @@ class UI5Element extends HTMLElement {
1132
1006
  this._generateAccessors();
1133
1007
  registerTag(tag);
1134
1008
  window.customElements.define(tag, this);
1009
+ preloadLinks(this);
1135
1010
 
1136
1011
  if (altTag && !customElements.get(altTag)) {
1137
- class oldClassName extends this {}
1138
1012
  registerTag(altTag);
1139
- window.customElements.define(altTag, oldClassName);
1013
+ window.customElements.define(altTag, getClassCopy(this, () => {
1014
+ console.log(`The ${altTag} tag is deprecated and will be removed in the next release, please use ${tag} instead.`); // eslint-disable-line
1015
+ }));
1140
1016
  }
1141
1017
  }
1142
1018
  return this;