@ui5/webcomponents-base 0.0.0-7d5f73b20 → 0.0.0-7d8c57f70

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 (533) hide show
  1. package/.eslintignore +6 -4
  2. package/.eslintrc.cjs +3 -0
  3. package/.npsrc.json +3 -0
  4. package/CHANGELOG.md +895 -0
  5. package/README.md +6 -1
  6. package/bundle.esm.js +9 -3
  7. package/config/wdio.conf.cjs +400 -0
  8. package/dist/.tsbuildinfo +1 -0
  9. package/dist/AssetRegistry.d.ts +2 -2
  10. package/dist/AssetRegistry.js +2 -2
  11. package/dist/AssetRegistry.js.map +1 -1
  12. package/dist/Boot.d.ts +6 -4
  13. package/dist/Boot.js +36 -6
  14. package/dist/Boot.js.map +1 -1
  15. package/dist/CSP.d.ts +9 -6
  16. package/dist/CSP.js +9 -6
  17. package/dist/CSP.js.map +1 -1
  18. package/dist/CustomElementsRegistry.js.map +1 -1
  19. package/dist/CustomElementsScope.d.ts +4 -4
  20. package/dist/CustomElementsScope.js +2 -2
  21. package/dist/CustomElementsScope.js.map +1 -1
  22. package/dist/CustomElementsScopeUtils.d.ts +8 -1
  23. package/dist/CustomElementsScopeUtils.js +13 -1
  24. package/dist/CustomElementsScopeUtils.js.map +1 -1
  25. package/dist/DOMObserver.js.map +1 -1
  26. package/dist/Device.d.ts +2 -1
  27. package/dist/Device.js +119 -35
  28. package/dist/Device.js.map +1 -1
  29. package/dist/EventProvider.js +1 -1
  30. package/dist/EventProvider.js.map +1 -1
  31. package/dist/FeaturesRegistry.d.ts +10 -1
  32. package/dist/FeaturesRegistry.js +37 -1
  33. package/dist/FeaturesRegistry.js.map +1 -1
  34. package/dist/FontFace.js +1 -1
  35. package/dist/FontFace.js.map +1 -1
  36. package/dist/IgnoreCustomElements.d.ts +25 -0
  37. package/dist/IgnoreCustomElements.js +37 -0
  38. package/dist/IgnoreCustomElements.js.map +1 -0
  39. package/dist/InitialConfiguration.d.ts +7 -2
  40. package/dist/InitialConfiguration.js +17 -7
  41. package/dist/InitialConfiguration.js.map +1 -1
  42. package/dist/Keys.d.ts +5 -1
  43. package/dist/Keys.js +109 -106
  44. package/dist/Keys.js.map +1 -1
  45. package/dist/ManagedStyles.d.ts +5 -4
  46. package/dist/ManagedStyles.js +95 -15
  47. package/dist/ManagedStyles.js.map +1 -1
  48. package/dist/MarkedEvents.js.map +1 -1
  49. package/dist/MediaRange.d.ts +6 -12
  50. package/dist/MediaRange.js +21 -31
  51. package/dist/MediaRange.js.map +1 -1
  52. package/dist/PropertiesFileFormat.js.map +1 -1
  53. package/dist/Render.js.map +1 -1
  54. package/dist/RenderQueue.js.map +1 -1
  55. package/dist/Runtimes.js.map +1 -1
  56. package/dist/StaticArea.d.ts +3 -0
  57. package/dist/StaticArea.js +4 -3
  58. package/dist/StaticArea.js.map +1 -1
  59. package/dist/StaticAreaItem.d.ts +3 -4
  60. package/dist/StaticAreaItem.js +10 -9
  61. package/dist/StaticAreaItem.js.map +1 -1
  62. package/dist/SystemCSSVars.js.map +1 -1
  63. package/dist/Theming.js.map +1 -1
  64. package/dist/UI5Element.d.ts +55 -39
  65. package/dist/UI5Element.js +129 -70
  66. package/dist/UI5Element.js.map +1 -1
  67. package/dist/UI5ElementMetadata.d.ts +12 -13
  68. package/dist/UI5ElementMetadata.js +24 -15
  69. package/dist/UI5ElementMetadata.js.map +1 -1
  70. package/dist/animations/AnimationQueue.js.map +1 -1
  71. package/dist/animations/animate.js.map +1 -1
  72. package/dist/animations/scroll.js.map +1 -1
  73. package/dist/animations/slideDown.js.map +1 -1
  74. package/dist/animations/slideUp.js.map +1 -1
  75. package/dist/asset-registries/Icons.d.ts +22 -13
  76. package/dist/asset-registries/Icons.js +63 -31
  77. package/dist/asset-registries/Icons.js.map +1 -1
  78. package/dist/asset-registries/Illustrations.d.ts +3 -1
  79. package/dist/asset-registries/Illustrations.js +51 -20
  80. package/dist/asset-registries/Illustrations.js.map +1 -1
  81. package/dist/asset-registries/LocaleData.js +1 -1
  82. package/dist/asset-registries/LocaleData.js.map +1 -1
  83. package/dist/asset-registries/Themes.d.ts +5 -3
  84. package/dist/asset-registries/Themes.js +28 -10
  85. package/dist/asset-registries/Themes.js.map +1 -1
  86. package/dist/asset-registries/i18n.d.ts +2 -2
  87. package/dist/asset-registries/i18n.js +12 -5
  88. package/dist/asset-registries/i18n.js.map +1 -1
  89. package/dist/asset-registries/util/IconCollectionsAlias.d.ts +30 -0
  90. package/dist/asset-registries/util/IconCollectionsAlias.js +37 -0
  91. package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -0
  92. package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +20 -0
  93. package/dist/asset-registries/util/IconCollectionsByTheme.js +42 -0
  94. package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -0
  95. package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +13 -0
  96. package/dist/asset-registries/util/getIconCollectionByTheme.js +29 -0
  97. package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -0
  98. package/dist/config/AnimationMode.d.ts +2 -2
  99. package/dist/config/AnimationMode.js +1 -1
  100. package/dist/config/AnimationMode.js.map +1 -1
  101. package/dist/config/CalendarType.d.ts +8 -1
  102. package/dist/config/CalendarType.js +18 -2
  103. package/dist/config/CalendarType.js.map +1 -1
  104. package/dist/config/FormatSettings.d.ts +5 -1
  105. package/dist/config/FormatSettings.js +5 -1
  106. package/dist/config/FormatSettings.js.map +1 -1
  107. package/dist/config/Icons.d.ts +31 -21
  108. package/dist/config/Icons.js +28 -32
  109. package/dist/config/Icons.js.map +1 -1
  110. package/dist/config/Language.d.ts +11 -2
  111. package/dist/config/Language.js +19 -4
  112. package/dist/config/Language.js.map +1 -1
  113. package/dist/config/NoConflict.js +1 -0
  114. package/dist/config/NoConflict.js.map +1 -1
  115. package/dist/config/Theme.d.ts +15 -5
  116. package/dist/config/Theme.js +31 -9
  117. package/dist/config/Theme.js.map +1 -1
  118. package/dist/config/ThemeRoot.d.ts +27 -0
  119. package/dist/config/ThemeRoot.js +57 -0
  120. package/dist/config/ThemeRoot.js.map +1 -0
  121. package/dist/config/Timezone.d.ts +17 -0
  122. package/dist/config/Timezone.js +30 -0
  123. package/dist/config/Timezone.js.map +1 -0
  124. package/dist/connectToComponent.d.ts +9 -0
  125. package/dist/connectToComponent.js +59 -0
  126. package/dist/connectToComponent.js.map +1 -0
  127. package/dist/css/FontFace.css +47 -17
  128. package/dist/css/SystemCSSVars.css +0 -8
  129. package/dist/custom-elements-internal.json +2863 -0
  130. package/dist/custom-elements.json +2593 -0
  131. package/dist/decorators/customElement.d.ts +18 -2
  132. package/dist/decorators/customElement.js +28 -5
  133. package/dist/decorators/customElement.js.map +1 -1
  134. package/dist/decorators/event.d.ts +5 -2
  135. package/dist/decorators/event.js +6 -6
  136. package/dist/decorators/event.js.map +1 -1
  137. package/dist/decorators/property.js +6 -6
  138. package/dist/decorators/property.js.map +1 -1
  139. package/dist/decorators/slot.js +9 -9
  140. package/dist/decorators/slot.js.map +1 -1
  141. package/dist/decorators.d.ts +5 -0
  142. package/dist/decorators.js +6 -0
  143. package/dist/decorators.js.map +1 -0
  144. package/dist/delegate/ItemNavigation.d.ts +9 -8
  145. package/dist/delegate/ItemNavigation.js +13 -14
  146. package/dist/delegate/ItemNavigation.js.map +1 -1
  147. package/dist/delegate/ResizeHandler.d.ts +6 -7
  148. package/dist/delegate/ResizeHandler.js +11 -9
  149. package/dist/delegate/ResizeHandler.js.map +1 -1
  150. package/dist/delegate/ScrollEnablement.js +2 -2
  151. package/dist/delegate/ScrollEnablement.js.map +1 -1
  152. package/dist/features/F6Navigation.d.ts +3 -0
  153. package/dist/features/F6Navigation.js +77 -38
  154. package/dist/features/F6Navigation.js.map +1 -1
  155. package/dist/features/LegacyDateFormats.d.ts +18 -0
  156. package/dist/features/LegacyDateFormats.js +20 -0
  157. package/dist/features/LegacyDateFormats.js.map +1 -0
  158. package/dist/features/OpenUI5Element.js.map +1 -1
  159. package/dist/features/OpenUI5Enablement.d.ts +1 -1
  160. package/dist/features/OpenUI5Enablement.js.map +1 -1
  161. package/dist/features/OpenUI5Support.d.ts +16 -3
  162. package/dist/features/OpenUI5Support.js +96 -33
  163. package/dist/features/OpenUI5Support.js.map +1 -1
  164. package/dist/features/patchPopup.d.ts +10 -0
  165. package/dist/features/patchPopup.js +15 -0
  166. package/dist/features/patchPopup.js.map +1 -0
  167. package/dist/generated/AssetParameters.d.ts +6 -0
  168. package/dist/generated/AssetParameters.js +4 -9
  169. package/dist/generated/AssetParameters.js.map +1 -0
  170. package/dist/generated/VersionInfo.d.ts +10 -0
  171. package/dist/generated/VersionInfo.js +9 -8
  172. package/dist/generated/VersionInfo.js.map +1 -0
  173. package/dist/generated/css/BusyIndicator.css.js.map +1 -1
  174. package/dist/generated/css/FontFace.css.js +1 -1
  175. package/dist/generated/css/FontFace.css.js.map +1 -1
  176. package/dist/generated/css/OverrideFontFace.css.js.map +1 -1
  177. package/dist/generated/css/SystemCSSVars.css.js +1 -1
  178. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  179. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +4 -0
  180. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +8 -10
  181. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +1 -0
  182. package/dist/getSharedResource.d.ts +1 -1
  183. package/dist/getSharedResource.js +16 -2
  184. package/dist/getSharedResource.js.map +1 -1
  185. package/dist/global.d.ts +2 -0
  186. package/dist/i18nBundle.d.ts +2 -4
  187. package/dist/i18nBundle.js +3 -5
  188. package/dist/i18nBundle.js.map +1 -1
  189. package/dist/locale/Locale.js.map +1 -1
  190. package/dist/locale/RTLAwareRegistry.d.ts +1 -1
  191. package/dist/locale/RTLAwareRegistry.js.map +1 -1
  192. package/dist/locale/applyDirection.d.ts +3 -2
  193. package/dist/locale/applyDirection.js +3 -2
  194. package/dist/locale/applyDirection.js.map +1 -1
  195. package/dist/locale/directionChange.js.map +1 -1
  196. package/dist/locale/getEffectiveDir.d.ts +1 -1
  197. package/dist/locale/getEffectiveDir.js +3 -19
  198. package/dist/locale/getEffectiveDir.js.map +1 -1
  199. package/dist/locale/getLocale.js.map +1 -1
  200. package/dist/locale/languageChange.js.map +1 -1
  201. package/dist/locale/nextFallbackLocale.js.map +1 -1
  202. package/dist/locale/normalizeLocale.js.map +1 -1
  203. package/dist/renderer/LitRenderer.d.ts +5 -5
  204. package/dist/renderer/LitRenderer.js.map +1 -1
  205. package/dist/renderer/directives/style-map.d.ts +13 -0
  206. package/dist/renderer/directives/style-map.js +59 -59
  207. package/dist/renderer/directives/style-map.js.map +1 -0
  208. package/dist/renderer/executeTemplate.js +1 -1
  209. package/dist/renderer/executeTemplate.js.map +1 -1
  210. package/dist/sap/base/Log.js +698 -188
  211. package/dist/sap/base/assert.js +28 -1
  212. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  213. package/dist/sap/base/security/URLListValidator.js +253 -6
  214. package/dist/sap/base/security/encodeCSS.js +34 -8
  215. package/dist/sap/base/security/encodeXML.js +47 -17
  216. package/dist/sap/base/security/sanitizeHTML.js +35 -13
  217. package/dist/sap/base/strings/toHex.js +27 -2
  218. package/dist/sap/base/util/now.js +24 -3
  219. package/dist/sap/base/util/uid.js +27 -0
  220. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +113 -98
  221. package/dist/ssr-dom-shim.d.ts +1 -0
  222. package/dist/ssr-dom-shim.js +12 -0
  223. package/dist/ssr-dom-shim.js.map +1 -0
  224. package/dist/ssr-dom.d.ts +0 -0
  225. package/dist/ssr-dom.js +3 -0
  226. package/dist/ssr-dom.js.map +1 -0
  227. package/dist/theming/CustomStyle.js +7 -5
  228. package/dist/theming/CustomStyle.js.map +1 -1
  229. package/dist/theming/ThemeLoaded.js.map +1 -1
  230. package/dist/theming/ThemeRegistered.d.ts +4 -0
  231. package/dist/theming/ThemeRegistered.js +11 -0
  232. package/dist/theming/ThemeRegistered.js.map +1 -0
  233. package/dist/theming/applyTheme.js +8 -7
  234. package/dist/theming/applyTheme.js.map +1 -1
  235. package/dist/theming/getConstructableStyle.js.map +1 -1
  236. package/dist/theming/getEffectiveLinksHrefs.js.map +1 -1
  237. package/dist/theming/getEffectiveStyle.js.map +1 -1
  238. package/dist/theming/getStylesString.d.ts +1 -1
  239. package/dist/theming/getStylesString.js.map +1 -1
  240. package/dist/theming/getThemeDesignerTheme.js.map +1 -1
  241. package/dist/theming/preloadLinks.js.map +1 -1
  242. package/dist/thirdparty/_merge.js.map +1 -1
  243. package/dist/thirdparty/isPlainObject.js.map +1 -1
  244. package/dist/thirdparty/merge.js.map +1 -1
  245. package/dist/types/AnimationMode.d.ts +0 -8
  246. package/dist/types/AnimationMode.js +0 -8
  247. package/dist/types/AnimationMode.js.map +1 -1
  248. package/dist/types/CSSColor.d.ts +0 -5
  249. package/dist/types/CSSColor.js +0 -5
  250. package/dist/types/CSSColor.js.map +1 -1
  251. package/dist/types/CSSSize.d.ts +11 -0
  252. package/dist/types/CSSSize.js +14 -0
  253. package/dist/types/CSSSize.js.map +1 -0
  254. package/dist/types/CalendarType.d.ts +0 -9
  255. package/dist/types/CalendarType.js +0 -9
  256. package/dist/types/CalendarType.js.map +1 -1
  257. package/dist/types/DOMReference.d.ts +1 -5
  258. package/dist/types/DOMReference.js +1 -5
  259. package/dist/types/DOMReference.js.map +1 -1
  260. package/dist/types/DataType.d.ts +1 -6
  261. package/dist/types/DataType.js +1 -6
  262. package/dist/types/DataType.js.map +1 -1
  263. package/dist/types/Float.d.ts +0 -4
  264. package/dist/types/Float.js +0 -4
  265. package/dist/types/Float.js.map +1 -1
  266. package/dist/types/Integer.d.ts +0 -4
  267. package/dist/types/Integer.js +0 -4
  268. package/dist/types/Integer.js.map +1 -1
  269. package/dist/types/InvisibleMessageMode.d.ts +5 -10
  270. package/dist/types/InvisibleMessageMode.js +4 -11
  271. package/dist/types/InvisibleMessageMode.js.map +1 -1
  272. package/dist/types/ItemNavigationBehavior.d.ts +0 -6
  273. package/dist/types/ItemNavigationBehavior.js +0 -6
  274. package/dist/types/ItemNavigationBehavior.js.map +1 -1
  275. package/dist/types/MovePlacement.d.ts +20 -0
  276. package/dist/types/MovePlacement.js +22 -0
  277. package/dist/types/MovePlacement.js.map +1 -0
  278. package/dist/types/NavigationMode.d.ts +0 -8
  279. package/dist/types/NavigationMode.js +0 -8
  280. package/dist/types/NavigationMode.js.map +1 -1
  281. package/dist/types/Orientation.d.ts +16 -0
  282. package/dist/types/Orientation.js +18 -0
  283. package/dist/types/Orientation.js.map +1 -0
  284. package/dist/types/ValueState.d.ts +0 -14
  285. package/dist/types/ValueState.js +0 -14
  286. package/dist/types/ValueState.js.map +1 -1
  287. package/dist/types.d.ts +11 -1
  288. package/dist/types.js.map +1 -1
  289. package/dist/updateShadowRoot.js +13 -5
  290. package/dist/updateShadowRoot.js.map +1 -1
  291. package/dist/util/AriaLabelHelper.d.ts +10 -1
  292. package/dist/util/AriaLabelHelper.js +135 -8
  293. package/dist/util/AriaLabelHelper.js.map +1 -1
  294. package/dist/util/Caret.js.map +1 -1
  295. package/dist/util/ColorConversion.js +200 -195
  296. package/dist/util/ColorConversion.js.map +1 -1
  297. package/dist/util/FetchHelper.js.map +1 -1
  298. package/dist/util/FocusableElements.js +4 -3
  299. package/dist/util/FocusableElements.js.map +1 -1
  300. package/dist/util/HTMLSanitizer.js.map +1 -1
  301. package/dist/util/InvisibleMessage.js.map +1 -1
  302. package/dist/util/PopupUtils.js +1 -1
  303. package/dist/util/PopupUtils.js.map +1 -1
  304. package/dist/util/SlotsHelper.js.map +1 -1
  305. package/dist/util/StringHelper.js.map +1 -1
  306. package/dist/util/TabbableElements.js.map +1 -1
  307. package/dist/util/arraysAreEqual.js.map +1 -1
  308. package/dist/util/clamp.js +2 -1
  309. package/dist/util/clamp.js.map +1 -1
  310. package/dist/util/createLinkInHead.d.ts +1 -1
  311. package/dist/util/createLinkInHead.js +1 -1
  312. package/dist/util/createLinkInHead.js.map +1 -1
  313. package/dist/util/createStyleInHead.d.ts +1 -1
  314. package/dist/util/createStyleInHead.js +1 -1
  315. package/dist/util/createStyleInHead.js.map +1 -1
  316. package/dist/util/debounce.js.map +1 -1
  317. package/dist/util/detectNavigatorLanguage.d.ts +2 -2
  318. package/dist/util/detectNavigatorLanguage.js +6 -1
  319. package/dist/util/detectNavigatorLanguage.js.map +1 -1
  320. package/dist/util/dragAndDrop/DragRegistry.d.ts +12 -0
  321. package/dist/util/dragAndDrop/DragRegistry.js +66 -0
  322. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
  323. package/dist/util/dragAndDrop/findClosestPosition.d.ts +7 -0
  324. package/dist/util/dragAndDrop/findClosestPosition.js +59 -0
  325. package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
  326. package/dist/util/dragAndDrop/longDragOverHandler.d.ts +2 -0
  327. package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
  328. package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
  329. package/dist/util/escapeRegex.js.map +1 -1
  330. package/dist/util/formatMessage.js.map +1 -1
  331. package/dist/util/generateHighlightedMarkup.js.map +1 -1
  332. package/dist/util/getActiveElement.js.map +1 -1
  333. package/dist/util/getClassCopy.d.ts +64 -43
  334. package/dist/util/getClassCopy.js.map +1 -1
  335. package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
  336. package/dist/util/getDesigntimePropertyAsArray.js +2 -1
  337. package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
  338. package/dist/util/getEffectiveContentDensity.js.map +1 -1
  339. package/dist/util/getEffectiveScrollbarStyle.js.map +1 -1
  340. package/dist/util/getFastNavigationGroups.js.map +1 -1
  341. package/dist/util/getFileExtension.js.map +1 -1
  342. package/dist/util/getNormalizedTarget.js.map +1 -1
  343. package/dist/util/getParentElement.d.ts +2 -0
  344. package/dist/util/getParentElement.js +5 -0
  345. package/dist/util/getParentElement.js.map +1 -0
  346. package/dist/util/getSingletonElementInstance.d.ts +10 -1
  347. package/dist/util/getSingletonElementInstance.js +11 -2
  348. package/dist/util/getSingletonElementInstance.js.map +1 -1
  349. package/dist/util/isElementClickable.js.map +1 -1
  350. package/dist/util/isElementContainingBlock.d.ts +2 -0
  351. package/dist/util/isElementContainingBlock.js +11 -0
  352. package/dist/util/isElementContainingBlock.js.map +1 -0
  353. package/dist/util/isElementHidden.js.map +1 -1
  354. package/dist/util/isElementInView.js.map +1 -1
  355. package/dist/util/isElementTabbable.js.map +1 -1
  356. package/dist/util/isValidPropertyName.js.map +1 -1
  357. package/dist/util/whenDOMReady.js.map +1 -1
  358. package/dist/util/willShowContent.js.map +1 -1
  359. package/dist/validateThemeRoot.js +14 -13
  360. package/dist/validateThemeRoot.js.map +1 -1
  361. package/dist/vscode.html-custom-data.json +22 -0
  362. package/index.js +225 -1
  363. package/lib/generate-asset-parameters/index.js +6 -4
  364. package/lib/generate-styles/index.js +3 -3
  365. package/lib/generate-version-info/index.js +3 -3
  366. package/{package-scripts.js → package-scripts.cjs} +22 -22
  367. package/package.json +15 -6
  368. package/src/css/FontFace.css +47 -17
  369. package/src/css/SystemCSSVars.css +0 -8
  370. package/tsconfig.json +7 -0
  371. package/used-modules.txt +4 -0
  372. package/config/wdio.conf.js +0 -1
  373. package/dist/api.json +0 -1
  374. package/dist/assets/bundle.esm.5c683084.js +0 -56
  375. package/dist/assets-meta/IconCollectionsAlias.d.ts +0 -17
  376. package/dist/assets-meta/IconCollectionsAlias.js +0 -18
  377. package/dist/assets-meta/IconCollectionsAlias.js.map +0 -1
  378. package/dist/config/RTL.d.ts +0 -7
  379. package/dist/config/RTL.js +0 -34
  380. package/dist/config/RTL.js.map +0 -1
  381. package/dist/config/ThemeRoots.d.ts +0 -4
  382. package/dist/config/ThemeRoots.js +0 -28
  383. package/dist/config/ThemeRoots.js.map +0 -1
  384. package/dist/decorators/fastNavigation.d.ts +0 -7
  385. package/dist/decorators/fastNavigation.js +0 -13
  386. package/dist/decorators/fastNavigation.js.map +0 -1
  387. package/dist/decorators/languageAware.d.ts +0 -7
  388. package/dist/decorators/languageAware.js +0 -13
  389. package/dist/decorators/languageAware.js.map +0 -1
  390. package/dist/decorators/themeAware.d.ts +0 -7
  391. package/dist/decorators/themeAware.js +0 -13
  392. package/dist/decorators/themeAware.js.map +0 -1
  393. package/src/AssetRegistry.ts +0 -11
  394. package/src/Boot.ts +0 -61
  395. package/src/CSP.ts +0 -66
  396. package/src/CustomElementsRegistry.ts +0 -98
  397. package/src/CustomElementsScope.ts +0 -33
  398. package/src/CustomElementsScopeUtils.ts +0 -115
  399. package/src/DOMObserver.ts +0 -28
  400. package/src/Device.ts +0 -124
  401. package/src/EventProvider.ts +0 -87
  402. package/src/FeaturesRegistry.ts +0 -14
  403. package/src/FontFace.ts +0 -31
  404. package/src/InitialConfiguration.ts +0 -207
  405. package/src/Keys.ts +0 -295
  406. package/src/ManagedStyles.ts +0 -92
  407. package/src/MarkedEvents.ts +0 -20
  408. package/src/MediaRange.ts +0 -110
  409. package/src/PropertiesFileFormat.ts +0 -95
  410. package/src/Render.ts +0 -180
  411. package/src/RenderQueue.ts +0 -71
  412. package/src/Runtimes.ts +0 -114
  413. package/src/StaticArea.ts +0 -3
  414. package/src/StaticAreaItem.ts +0 -113
  415. package/src/SystemCSSVars.ts +0 -10
  416. package/src/Theming.ts +0 -4
  417. package/src/UI5Element.ts +0 -1156
  418. package/src/UI5ElementMetadata.ts +0 -389
  419. package/src/animations/AnimationQueue.ts +0 -43
  420. package/src/animations/animate.ts +0 -64
  421. package/src/animations/scroll.ts +0 -21
  422. package/src/animations/slideDown.ts +0 -72
  423. package/src/animations/slideUp.ts +0 -67
  424. package/src/asset-registries/Icons.ts +0 -162
  425. package/src/asset-registries/Illustrations.ts +0 -75
  426. package/src/asset-registries/LocaleData.ts +0 -172
  427. package/src/asset-registries/Themes.ts +0 -67
  428. package/src/asset-registries/i18n.ts +0 -118
  429. package/src/assets-meta/IconCollectionsAlias.ts +0 -18
  430. package/src/config/AnimationMode.ts +0 -33
  431. package/src/config/CalendarType.ts +0 -23
  432. package/src/config/FormatSettings.ts +0 -21
  433. package/src/config/Icons.ts +0 -59
  434. package/src/config/Language.ts +0 -72
  435. package/src/config/NoConflict.ts +0 -67
  436. package/src/config/RTL.ts +0 -41
  437. package/src/config/Theme.ts +0 -64
  438. package/src/config/ThemeRoots.ts +0 -41
  439. package/src/decorators/customElement.ts +0 -17
  440. package/src/decorators/event.ts +0 -28
  441. package/src/decorators/fastNavigation.ts +0 -14
  442. package/src/decorators/languageAware.ts +0 -14
  443. package/src/decorators/property.ts +0 -30
  444. package/src/decorators/slot.ts +0 -49
  445. package/src/decorators/themeAware.ts +0 -14
  446. package/src/delegate/ItemNavigation.ts +0 -393
  447. package/src/delegate/ResizeHandler.ts +0 -95
  448. package/src/delegate/ScrollEnablement.ts +0 -224
  449. package/src/features/F6Navigation.ts +0 -141
  450. package/src/features/OpenUI5Element.ts +0 -11
  451. package/src/features/OpenUI5Enablement.ts +0 -117
  452. package/src/features/OpenUI5Support.ts +0 -148
  453. package/src/generated/css/BusyIndicator.css.ts +0 -9
  454. package/src/generated/css/FontFace.css.ts +0 -9
  455. package/src/generated/css/OverrideFontFace.css.ts +0 -9
  456. package/src/generated/css/SystemCSSVars.css.ts +0 -9
  457. package/src/getSharedResource.ts +0 -30
  458. package/src/global.d.ts +0 -38
  459. package/src/i18nBundle.ts +0 -108
  460. package/src/locale/Locale.ts +0 -101
  461. package/src/locale/RTLAwareRegistry.ts +0 -16
  462. package/src/locale/applyDirection.ts +0 -18
  463. package/src/locale/directionChange.ts +0 -34
  464. package/src/locale/getEffectiveDir.ts +0 -28
  465. package/src/locale/getLocale.ts +0 -46
  466. package/src/locale/languageChange.ts +0 -24
  467. package/src/locale/nextFallbackLocale.ts +0 -28
  468. package/src/locale/normalizeLocale.ts +0 -56
  469. package/src/renderer/LitRenderer.ts +0 -60
  470. package/src/renderer/directives/style-map.js +0 -72
  471. package/src/renderer/executeTemplate.ts +0 -40
  472. package/src/theming/CustomStyle.ts +0 -62
  473. package/src/theming/ThemeLoaded.ts +0 -24
  474. package/src/theming/applyTheme.ts +0 -90
  475. package/src/theming/getConstructableStyle.ts +0 -31
  476. package/src/theming/getEffectiveLinksHrefs.ts +0 -26
  477. package/src/theming/getEffectiveStyle.ts +0 -41
  478. package/src/theming/getStylesString.ts +0 -15
  479. package/src/theming/getThemeDesignerTheme.ts +0 -101
  480. package/src/theming/preloadLinks.ts +0 -24
  481. package/src/thirdparty/_merge.ts +0 -32
  482. package/src/thirdparty/isPlainObject.ts +0 -18
  483. package/src/thirdparty/merge.ts +0 -5
  484. package/src/types/AnimationMode.ts +0 -33
  485. package/src/types/CSSColor.ts +0 -20
  486. package/src/types/CalendarType.ts +0 -38
  487. package/src/types/DOMReference.ts +0 -28
  488. package/src/types/DataType.ts +0 -51
  489. package/src/types/Float.ts +0 -25
  490. package/src/types/Integer.ts +0 -25
  491. package/src/types/InvisibleMessageMode.ts +0 -27
  492. package/src/types/ItemNavigationBehavior.ts +0 -26
  493. package/src/types/NavigationMode.ts +0 -33
  494. package/src/types/ValueState.ts +0 -47
  495. package/src/types.ts +0 -30
  496. package/src/updateShadowRoot.ts +0 -37
  497. package/src/util/AriaLabelHelper.ts +0 -63
  498. package/src/util/Caret.ts +0 -28
  499. package/src/util/ColorConversion.ts +0 -399
  500. package/src/util/FetchHelper.ts +0 -31
  501. package/src/util/FocusableElements.ts +0 -92
  502. package/src/util/HTMLSanitizer.ts +0 -9
  503. package/src/util/InvisibleMessage.ts +0 -69
  504. package/src/util/PopupUtils.ts +0 -112
  505. package/src/util/SlotsHelper.ts +0 -39
  506. package/src/util/StringHelper.ts +0 -26
  507. package/src/util/TabbableElements.ts +0 -70
  508. package/src/util/arraysAreEqual.ts +0 -15
  509. package/src/util/clamp.ts +0 -12
  510. package/src/util/createLinkInHead.ts +0 -25
  511. package/src/util/createStyleInHead.ts +0 -20
  512. package/src/util/debounce.ts +0 -18
  513. package/src/util/detectNavigatorLanguage.ts +0 -13
  514. package/src/util/escapeRegex.ts +0 -11
  515. package/src/util/formatMessage.ts +0 -24
  516. package/src/util/generateHighlightedMarkup.ts +0 -43
  517. package/src/util/getActiveElement.ts +0 -11
  518. package/src/util/getClassCopy.ts +0 -12
  519. package/src/util/getDesigntimePropertyAsArray.ts +0 -4
  520. package/src/util/getEffectiveContentDensity.ts +0 -5
  521. package/src/util/getEffectiveScrollbarStyle.ts +0 -5
  522. package/src/util/getFastNavigationGroups.ts +0 -63
  523. package/src/util/getFileExtension.ts +0 -21
  524. package/src/util/getNormalizedTarget.ts +0 -16
  525. package/src/util/getSingletonElementInstance.ts +0 -13
  526. package/src/util/isElementClickable.ts +0 -19
  527. package/src/util/isElementHidden.ts +0 -9
  528. package/src/util/isElementInView.ts +0 -15
  529. package/src/util/isElementTabbable.ts +0 -37
  530. package/src/util/isValidPropertyName.ts +0 -29
  531. package/src/util/whenDOMReady.ts +0 -13
  532. package/src/util/willShowContent.ts +0 -7
  533. package/src/validateThemeRoot.ts +0 -58
@@ -1,3 +1,5 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
2
+ import "@ui5/webcomponents-base/dist/ssr-dom.js";
1
3
  import merge from "./thirdparty/merge.js";
2
4
  import { boot } from "./Boot.js";
3
5
  import UI5ElementMetadata from "./UI5ElementMetadata.js";
@@ -5,6 +7,7 @@ import EventProvider from "./EventProvider.js";
5
7
  import getSingletonElementInstance from "./util/getSingletonElementInstance.js";
6
8
  import StaticAreaItem from "./StaticAreaItem.js";
7
9
  import updateShadowRoot from "./updateShadowRoot.js";
10
+ import { shouldIgnoreCustomElement } from "./IgnoreCustomElements.js";
8
11
  import { renderDeferred, renderImmediately, cancelRender } from "./Render.js";
9
12
  import { registerTag, isTagRegistered, recordTagRegistrationFailure } from "./CustomElementsRegistry.js";
10
13
  import { observeDOMNode, unobserveDOMNode } from "./DOMObserver.js";
@@ -16,6 +19,8 @@ import { getSlotName, getSlottedNodesList } from "./util/SlotsHelper.js";
16
19
  import arraysAreEqual from "./util/arraysAreEqual.js";
17
20
  import { markAsRtlAware } from "./locale/RTLAwareRegistry.js";
18
21
  import preloadLinks from "./theming/preloadLinks.js";
22
+ import executeTemplate from "./renderer/executeTemplate.js";
23
+ import { subscribeForFeatureLoad } from "./FeaturesRegistry.js";
19
24
  let autoId = 0;
20
25
  const elementTimeouts = new Map();
21
26
  const uniqueDependenciesCache = new Map();
@@ -34,16 +39,28 @@ function _invalidate(changeInfo) {
34
39
  this.onInvalidation(changeInfo);
35
40
  this._changedState.push(changeInfo);
36
41
  renderDeferred(this);
37
- this._eventProvider.fireEvent("invalidate", { ...changeInfo, target: this });
42
+ this._invalidationEventProvider.fireEvent("invalidate", { ...changeInfo, target: this });
38
43
  }
39
- let metadata = {};
40
44
  /**
45
+ * looks up a property descsriptor including in the prototype chain
46
+ * @param proto the starting prototype
47
+ * @param name the property to look for
48
+ * @returns the property descriptor if found directly or in the prototype chaing, undefined if not found
49
+ */
50
+ function getPropertyDescriptor(proto, name) {
51
+ do {
52
+ const descriptor = Object.getOwnPropertyDescriptor(proto, name);
53
+ if (descriptor) {
54
+ return descriptor;
55
+ }
56
+ // go up the prototype chain
57
+ proto = Object.getPrototypeOf(proto);
58
+ } while (proto && proto !== HTMLElement.prototype);
59
+ }
60
+ /**
61
+ * @class
41
62
  * Base class for all UI5 Web Components
42
63
  *
43
- * @class
44
- * @constructor
45
- * @author SAP SE
46
- * @alias sap.ui.webc.base.UI5Element
47
64
  * @extends HTMLElement
48
65
  * @public
49
66
  */
@@ -57,7 +74,8 @@ class UI5Element extends HTMLElement {
57
74
  this._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)
58
75
  this._childChangeListeners = new Map(); // used to store lazy listeners per slot for the child change event of every child inside that slot
59
76
  this._slotChangeListeners = new Map(); // used to store lazy listeners per slot for the slotchange event of all slot children inside that slot
60
- this._eventProvider = new EventProvider(); // used by parent components for listening to changes to child components
77
+ this._invalidationEventProvider = new EventProvider(); // used by parent components for listening to changes to child components
78
+ this._componentStateFinalizedEventProvider = new EventProvider(); // used by friend classes for synchronization
61
79
  let deferredResolve;
62
80
  this._domRefReadyPromise = new Promise(resolve => {
63
81
  deferredResolve = resolve;
@@ -82,6 +100,14 @@ class UI5Element extends HTMLElement {
82
100
  }
83
101
  return this.__id;
84
102
  }
103
+ render() {
104
+ const template = this.constructor.template;
105
+ return executeTemplate(template, this);
106
+ }
107
+ renderStatic() {
108
+ const template = this.constructor.staticAreaTemplate;
109
+ return executeTemplate(template, this);
110
+ }
85
111
  /**
86
112
  * Do not call this method from derivatives of UI5Element, use "onEnterDOM" only
87
113
  * @private
@@ -152,14 +178,16 @@ class UI5Element extends HTMLElement {
152
178
  */
153
179
  _startObservingDOMChildren() {
154
180
  const ctor = this.constructor;
155
- const shouldObserveChildren = ctor.getMetadata().hasSlots();
181
+ const metadata = ctor.getMetadata();
182
+ const shouldObserveChildren = metadata.hasSlots();
156
183
  if (!shouldObserveChildren) {
157
184
  return;
158
185
  }
159
- const canSlotText = ctor.getMetadata().canSlotText();
186
+ const canSlotText = metadata.canSlotText();
187
+ const hasClonedSlot = Object.keys(metadata.getSlots()).some(slotName => metadata.getSlots()[slotName].cloned);
160
188
  const mutationObserverOptions = {
161
189
  childList: true,
162
- subtree: canSlotText,
190
+ subtree: canSlotText || hasClonedSlot,
163
191
  characterData: canSlotText,
164
192
  };
165
193
  observeDOMNode(this, this._processChildren.bind(this), mutationObserverOptions);
@@ -220,11 +248,11 @@ class UI5Element extends HTMLElement {
220
248
  // Await for not-yet-defined custom elements
221
249
  if (child instanceof HTMLElement) {
222
250
  const localName = child.localName;
223
- const isCustomElement = localName.includes("-");
224
- if (isCustomElement) {
225
- const isDefined = window.customElements.get(localName);
251
+ const shouldWaitForCustomElement = localName.includes("-") && !shouldIgnoreCustomElement(localName);
252
+ if (shouldWaitForCustomElement) {
253
+ const isDefined = customElements.get(localName);
226
254
  if (!isDefined) {
227
- const whenDefinedPromise = window.customElements.whenDefined(localName); // Class registered, but instances not upgraded yet
255
+ const whenDefinedPromise = customElements.whenDefined(localName); // Class registered, but instances not upgraded yet
228
256
  let timeoutPromise = elementTimeouts.get(localName);
229
257
  if (!timeoutPromise) {
230
258
  timeoutPromise = new Promise(resolve => setTimeout(resolve, 1000));
@@ -232,7 +260,7 @@ class UI5Element extends HTMLElement {
232
260
  }
233
261
  await Promise.race([whenDefinedPromise, timeoutPromise]);
234
262
  }
235
- window.customElements.upgrade(child);
263
+ customElements.upgrade(child);
236
264
  }
237
265
  }
238
266
  child = ctor.getMetadata().constructor.validateSlotValue(child, slotData);
@@ -307,26 +335,26 @@ class UI5Element extends HTMLElement {
307
335
  /**
308
336
  * Attach a callback that will be executed whenever the component is invalidated
309
337
  *
310
- * @param {InvalidationInfo} callback
338
+ * @param callback
311
339
  * @public
312
340
  */
313
341
  attachInvalidate(callback) {
314
- this._eventProvider.attachEvent("invalidate", callback);
342
+ this._invalidationEventProvider.attachEvent("invalidate", callback);
315
343
  }
316
344
  /**
317
345
  * Detach the callback that is executed whenever the component is invalidated
318
346
  *
319
- * @param {InvalidationInfo} callback
347
+ * @param callback
320
348
  * @public
321
349
  */
322
350
  detachInvalidate(callback) {
323
- this._eventProvider.detachEvent("invalidate", callback);
351
+ this._invalidationEventProvider.detachEvent("invalidate", callback);
324
352
  }
325
353
  /**
326
354
  * Callback that is executed whenever a monitored child changes its state
327
355
  *
328
- * @param {sting} slotName the slot in which a child was invalidated
329
- * @param { ChangeInfo } childChangeInfo the changeInfo object for the child in the given slot
356
+ * @param slotName the slot in which a child was invalidated
357
+ * @param childChangeInfo the changeInfo object for the child in the given slot
330
358
  * @private
331
359
  */
332
360
  _onChildChange(slotName, childChangeInfo) {
@@ -436,7 +464,6 @@ class UI5Element extends HTMLElement {
436
464
  * Returns a singleton event listener for the "change" event of a child in a given slot
437
465
  *
438
466
  * @param slotName the name of the slot, where the child is
439
- * @returns {ChildChangeListener}
440
467
  * @private
441
468
  */
442
469
  _getChildChangeListener(slotName) {
@@ -449,7 +476,6 @@ class UI5Element extends HTMLElement {
449
476
  * Returns a singleton slotchange event listener that invalidates the component due to changes in the given slot
450
477
  *
451
478
  * @param slotName the name of the slot, where the slot element (whose slotchange event we're listening to) is
452
- * @returns {SlotChangeListener}
453
479
  * @private
454
480
  */
455
481
  _getSlotChangeListener(slotName) {
@@ -525,9 +551,7 @@ class UI5Element extends HTMLElement {
525
551
  this._suppressInvalidation = true;
526
552
  this.onBeforeRendering();
527
553
  // Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered
528
- if (this._onComponentStateFinalized) {
529
- this._onComponentStateFinalized();
530
- }
554
+ this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized");
531
555
  // resume normal invalidation handling
532
556
  this._suppressInvalidation = false;
533
557
  // Update the shadow root with the render result
@@ -627,7 +651,7 @@ class UI5Element extends HTMLElement {
627
651
  }
628
652
  /**
629
653
  * Set the focus to the element, returned by "getFocusDomRef()" (marked by "data-sap-focus-ref")
630
- * @param {FocusOptions} focusOptions additional options for the focus
654
+ * @param focusOptions additional options for the focus
631
655
  * @public
632
656
  */
633
657
  async focus(focusOptions) {
@@ -644,13 +668,13 @@ class UI5Element extends HTMLElement {
644
668
  * @param data - additional data for the event
645
669
  * @param cancelable - true, if the user can call preventDefault on the event object
646
670
  * @param bubbles - true, if the event bubbles
647
- * @returns {boolean} false, if the event was cancelled (preventDefault called), true otherwise
671
+ * @returns false, if the event was cancelled (preventDefault called), true otherwise
648
672
  */
649
673
  fireEvent(name, data, cancelable = false, bubbles = true) {
650
674
  const eventResult = this._fireEvent(name, data, cancelable, bubbles);
651
675
  const camelCaseEventName = kebabToCamelCase(name);
652
676
  if (camelCaseEventName !== name) {
653
- return eventResult && this._fireEvent(camelCaseEventName, data, cancelable);
677
+ return eventResult && this._fireEvent(camelCaseEventName, data, cancelable, bubbles);
654
678
  }
655
679
  return eventResult;
656
680
  }
@@ -685,12 +709,30 @@ class UI5Element extends HTMLElement {
685
709
  getSlottedNodes(slotName) {
686
710
  return getSlottedNodesList(this[slotName]);
687
711
  }
712
+ /**
713
+ * Attach a callback that will be executed whenever the component's state is finalized
714
+ *
715
+ * @param callback
716
+ * @public
717
+ */
718
+ attachComponentStateFinalized(callback) {
719
+ this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized", callback);
720
+ }
721
+ /**
722
+ * Detach the callback that is executed whenever the component's state is finalized
723
+ *
724
+ * @param callback
725
+ * @public
726
+ */
727
+ detachComponentStateFinalized(callback) {
728
+ this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized", callback);
729
+ }
688
730
  /**
689
731
  * Determines whether the component should be rendered in RTL mode or not.
690
732
  * Returns: "rtl", "ltr" or undefined
691
733
  *
692
734
  * @public
693
- * @returns {String|undefined}
735
+ * @default undefined
694
736
  */
695
737
  get effectiveDir() {
696
738
  markAsRtlAware(this.constructor); // if a UI5 Element calls this method, it's considered to be rtl-aware
@@ -698,8 +740,8 @@ class UI5Element extends HTMLElement {
698
740
  }
699
741
  /**
700
742
  * Used to duck-type UI5 elements without using instanceof
701
- * @returns {boolean}
702
743
  * @public
744
+ * @default true
703
745
  */
704
746
  get isUI5Element() {
705
747
  return true;
@@ -707,6 +749,13 @@ class UI5Element extends HTMLElement {
707
749
  get classes() {
708
750
  return {};
709
751
  }
752
+ /**
753
+ * Returns the component accessibility info.
754
+ * @private
755
+ */
756
+ get accessibilityInfo() {
757
+ return {};
758
+ }
710
759
  /**
711
760
  * Do not override this method in derivatives of UI5Element, use metadata properties instead
712
761
  * @private
@@ -718,13 +767,13 @@ class UI5Element extends HTMLElement {
718
767
  * @private
719
768
  */
720
769
  static _needsShadowDOM() {
721
- return !!this.template;
770
+ return !!this.template || Object.prototype.hasOwnProperty.call(this.prototype, "render");
722
771
  }
723
772
  /**
724
773
  * @private
725
774
  */
726
775
  static _needsStaticArea() {
727
- return !!this.staticAreaTemplate;
776
+ return !!this.staticAreaTemplate || Object.prototype.hasOwnProperty.call(this.prototype, "renderStatic");
728
777
  }
729
778
  /**
730
779
  * @public
@@ -766,8 +815,25 @@ class UI5Element extends HTMLElement {
766
815
  if (propData.multiple && propData.defaultValue) {
767
816
  throw new Error(`Cannot set a default value for property "${prop}". All multiple properties are empty arrays by default.`);
768
817
  }
818
+ const descriptor = getPropertyDescriptor(proto, prop);
819
+ // if the decorator is on a setter, proxy the new setter to it
820
+ let origSet;
821
+ if (descriptor?.set) {
822
+ // eslint-disable-next-line @typescript-eslint/unbound-method
823
+ origSet = descriptor.set;
824
+ }
825
+ // if the decorator is on a setter, there will be a corresponding getter - proxy the new getter to it
826
+ let origGet;
827
+ if (descriptor?.get) {
828
+ // eslint-disable-next-line @typescript-eslint/unbound-method
829
+ origGet = descriptor.get;
830
+ }
769
831
  Object.defineProperty(proto, prop, {
770
832
  get() {
833
+ // proxy the getter to the original accessor if there was one
834
+ if (origGet) {
835
+ return origGet.call(this);
836
+ }
771
837
  if (this._state[prop] !== undefined) {
772
838
  return this._state[prop];
773
839
  }
@@ -792,7 +858,7 @@ class UI5Element extends HTMLElement {
792
858
  value = metadataCtor.validatePropertyValue(value, propData);
793
859
  const propertyType = propData.type;
794
860
  let propertyValidator = propData.validator;
795
- const oldState = this._state[prop];
861
+ const oldState = origGet ? origGet.call(this) : this._state[prop];
796
862
  if (propertyType && propertyType.isDataTypeClass) {
797
863
  propertyValidator = propertyType;
798
864
  }
@@ -806,7 +872,13 @@ class UI5Element extends HTMLElement {
806
872
  isDifferent = oldState !== value;
807
873
  }
808
874
  if (isDifferent) {
809
- this._state[prop] = value;
875
+ // if the decorator is on a setter, use it for storage
876
+ if (origSet) {
877
+ origSet.call(this, value);
878
+ }
879
+ else {
880
+ this._state[prop] = value;
881
+ }
810
882
  _invalidate.call(this, {
811
883
  type: "property",
812
884
  name: prop,
@@ -840,27 +912,6 @@ class UI5Element extends HTMLElement {
840
912
  }
841
913
  }
842
914
  }
843
- /**
844
- * Returns the metadata object for this UI5 Web Component Class
845
- * @protected
846
- */
847
- static get metadata() {
848
- return metadata;
849
- }
850
- /**
851
- * Sets a new metadata object for this UI5 Web Component Class
852
- * @protected
853
- */
854
- static set metadata(newMetadata) {
855
- metadata = newMetadata;
856
- }
857
- /**
858
- * Returns the CSS for this UI5 Web Component Class
859
- * @protected
860
- */
861
- static get styles() {
862
- return "";
863
- }
864
915
  /**
865
916
  * Returns the Static Area CSS for this UI5 Web Component Class
866
917
  * @protected
@@ -878,6 +929,10 @@ class UI5Element extends HTMLElement {
878
929
  static get dependencies() {
879
930
  return [];
880
931
  }
932
+ static cacheUniqueDependencies() {
933
+ const filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);
934
+ uniqueDependenciesCache.set(this, filtered);
935
+ }
881
936
  /**
882
937
  * Returns a list of the unique dependencies for this UI5 Web Component
883
938
  *
@@ -885,15 +940,12 @@ class UI5Element extends HTMLElement {
885
940
  */
886
941
  static getUniqueDependencies() {
887
942
  if (!uniqueDependenciesCache.has(this)) {
888
- const filtered = this.dependencies.filter((dep, index, deps) => deps.indexOf(dep) === index);
889
- uniqueDependenciesCache.set(this, filtered);
943
+ this.cacheUniqueDependencies();
890
944
  }
891
945
  return uniqueDependenciesCache.get(this) || [];
892
946
  }
893
947
  /**
894
948
  * Returns a promise that resolves whenever all dependencies for this UI5 Web Component have resolved
895
- *
896
- * @returns {Promise}
897
949
  */
898
950
  static whenDependenciesDefined() {
899
951
  return Promise.all(this.getUniqueDependencies().map(dep => dep.define()));
@@ -902,7 +954,6 @@ class UI5Element extends HTMLElement {
902
954
  * Hook that will be called upon custom element definition
903
955
  *
904
956
  * @protected
905
- * @returns {Promise<void>}
906
957
  */
907
958
  static async onDefine() {
908
959
  return Promise.resolve();
@@ -910,7 +961,6 @@ class UI5Element extends HTMLElement {
910
961
  /**
911
962
  * Registers a UI5 Web Component in the browser window object
912
963
  * @public
913
- * @returns {Promise<UI5Element>}
914
964
  */
915
965
  static async define() {
916
966
  await boot();
@@ -919,6 +969,10 @@ class UI5Element extends HTMLElement {
919
969
  this.onDefine(),
920
970
  ]);
921
971
  const tag = this.getMetadata().getTag();
972
+ const features = this.getMetadata().getFeatures();
973
+ features.forEach(feature => {
974
+ subscribeForFeatureLoad(feature, this, this.cacheUniqueDependencies.bind(this));
975
+ });
922
976
  const definedLocally = isTagRegistered(tag);
923
977
  const definedGlobally = customElements.get(tag);
924
978
  if (definedGlobally && !definedLocally) {
@@ -927,7 +981,7 @@ class UI5Element extends HTMLElement {
927
981
  else if (!definedGlobally) {
928
982
  this._generateAccessors();
929
983
  registerTag(tag);
930
- window.customElements.define(tag, this);
984
+ customElements.define(tag, this);
931
985
  preloadLinks(this);
932
986
  }
933
987
  return this;
@@ -936,29 +990,34 @@ class UI5Element extends HTMLElement {
936
990
  * Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')
937
991
  * Note: not to be confused with the "get metadata()" method, which returns an object for this class's metadata only
938
992
  * @public
939
- * @returns {UI5ElementMetadata}
940
993
  */
941
994
  static getMetadata() {
942
995
  if (this.hasOwnProperty("_metadata")) { // eslint-disable-line
943
996
  return this._metadata;
944
997
  }
945
- const effectiveMetadata = Object.keys(this.metadata).length ? this.metadata : this.decoratorMetadata;
946
- const metadataObjects = [effectiveMetadata];
998
+ const metadataObjects = [this.metadata];
947
999
  let klass = this; // eslint-disable-line
948
1000
  while (klass !== UI5Element) {
949
1001
  klass = Object.getPrototypeOf(klass);
950
- const effectiveKlassMetadata = Object.keys(klass.metadata).length ? klass.metadata : klass.decoratorMetadata;
951
- metadataObjects.unshift(effectiveKlassMetadata);
1002
+ metadataObjects.unshift(klass.metadata);
952
1003
  }
953
1004
  const mergedMetadata = merge({}, ...metadataObjects);
954
1005
  this._metadata = new UI5ElementMetadata(mergedMetadata);
955
1006
  return this._metadata;
956
1007
  }
957
1008
  }
958
- UI5Element.decoratorMetadata = {};
1009
+ /**
1010
+ * Returns the metadata object for this UI5 Web Component Class
1011
+ * @protected
1012
+ */
1013
+ UI5Element.metadata = {};
1014
+ /**
1015
+ * Returns the CSS for this UI5 Web Component Class
1016
+ * @protected
1017
+ */
1018
+ UI5Element.styles = "";
959
1019
  /**
960
1020
  * Always use duck-typing to cover all runtimes on the page.
961
- * @returns {boolean}
962
1021
  */
963
1022
  const instanceOfUI5Element = (object) => {
964
1023
  return "isUI5Element" in object;