@ui5/webcomponents-base 0.0.0-f42e7c18c → 0.0.0-f6676abdd

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 (454) hide show
  1. package/CHANGELOG.md +159 -0
  2. package/cypress/specs/{Accessor.cy.ts → Accessor.cy.tsx} +4 -4
  3. package/cypress/specs/{Boot.cy.ts → Boot.cy.tsx} +1 -5
  4. package/cypress/specs/{ConfigurationScript.cy.ts → ConfigurationScript.cy.tsx} +2 -1
  5. package/cypress/specs/{ConfigurationURL.cy.ts → ConfigurationURL.cy.tsx} +7 -7
  6. package/cypress/specs/{CustomMount.cy.ts → CustomMount.cy.tsx} +2 -2
  7. package/cypress/specs/{CustomTheme.cy.ts → CustomTheme.cy.tsx} +2 -2
  8. package/cypress/specs/{UI5ElementInvalidation.cy.ts → UI5ElementInvalidation.cy.tsx} +55 -10
  9. package/cypress/specs/{UI5ElementLifecycle.cy.ts → UI5ElementLifecycle.cy.tsx} +4 -4
  10. package/cypress/specs/{UI5ElementListenForChildPropChanges.cy.ts → UI5ElementListenForChildPropChanges.cy.tsx} +32 -11
  11. package/cypress/specs/{UI5ElementMetadataExt.cy.ts → UI5ElementMetadataExt.cy.tsx} +3 -3
  12. package/cypress/specs/{UI5ElementPropertyValidation.cy.ts → UI5ElementPropertyValidation.cy.tsx} +2 -2
  13. package/cypress/specs/{UI5ElementPropsAndAttrs.cy.ts → UI5ElementPropsAndAttrs.cy.tsx} +8 -8
  14. package/cypress/specs/{UI5ElementShadowDOM.cy.ts → UI5ElementShadowDOM.cy.tsx} +4 -4
  15. package/cypress/specs/{UI5ElementSlots.cy.ts → UI5ElementSlots.cy.tsx} +47 -27
  16. package/cypress/specs/{WithComplexTemplate.cy.ts → WithComplexTemplate.cy.tsx} +2 -2
  17. package/cypress/tsconfig.json +2 -0
  18. package/dist/.tsbuildinfobuild +1 -1
  19. package/dist/CustomElementsRegistry.d.ts +2 -1
  20. package/dist/CustomElementsRegistry.js +5 -2
  21. package/dist/CustomElementsRegistry.js.map +1 -1
  22. package/dist/CustomElementsScopeUtils.d.ts +3 -1
  23. package/dist/CustomElementsScopeUtils.js +8 -1
  24. package/dist/CustomElementsScopeUtils.js.map +1 -1
  25. package/dist/FeaturesRegistry.d.ts +1 -13
  26. package/dist/FeaturesRegistry.js +1 -37
  27. package/dist/FeaturesRegistry.js.map +1 -1
  28. package/dist/ManagedStyles.d.ts +4 -6
  29. package/dist/ManagedStyles.js +6 -16
  30. package/dist/ManagedStyles.js.map +1 -1
  31. package/dist/UI5Element.d.ts +8 -3
  32. package/dist/UI5Element.js +11 -24
  33. package/dist/UI5Element.js.map +1 -1
  34. package/dist/UI5ElementMetadata.d.ts +0 -5
  35. package/dist/UI5ElementMetadata.js +0 -7
  36. package/dist/UI5ElementMetadata.js.map +1 -1
  37. package/dist/asset-registries/Themes.d.ts +3 -6
  38. package/dist/asset-registries/Themes.js +1 -2
  39. package/dist/asset-registries/Themes.js.map +1 -1
  40. package/dist/config/Theme.js +1 -2
  41. package/dist/config/Theme.js.map +1 -1
  42. package/dist/decorators/customElement.d.ts +38 -0
  43. package/dist/decorators/customElement.js +1 -4
  44. package/dist/decorators/customElement.js.map +1 -1
  45. package/dist/decorators/i18n.js +6 -0
  46. package/dist/decorators/i18n.js.map +1 -1
  47. package/dist/features/F6Navigation.d.ts +1 -0
  48. package/dist/features/F6Navigation.js +14 -1
  49. package/dist/features/F6Navigation.js.map +1 -1
  50. package/dist/features/OpenUI5Enablement.d.ts +1 -1
  51. package/dist/features/patchPopup.js +10 -1
  52. package/dist/features/patchPopup.js.map +1 -1
  53. package/dist/generated/AssetParameters.js +1 -1
  54. package/dist/generated/AssetParameters.js.map +1 -1
  55. package/dist/generated/VersionInfo.js +4 -4
  56. package/dist/generated/VersionInfo.js.map +1 -1
  57. package/dist/generated/css/BusyIndicator.css.d.ts +2 -3
  58. package/dist/generated/css/BusyIndicator.css.js +1 -6
  59. package/dist/generated/css/BusyIndicator.css.js.map +1 -1
  60. package/dist/generated/css/FontFace.css.d.ts +2 -3
  61. package/dist/generated/css/FontFace.css.js +1 -6
  62. package/dist/generated/css/FontFace.css.js.map +1 -1
  63. package/dist/generated/css/OverrideFontFace.css.d.ts +2 -3
  64. package/dist/generated/css/OverrideFontFace.css.js +1 -6
  65. package/dist/generated/css/OverrideFontFace.css.js.map +1 -1
  66. package/dist/generated/css/SystemCSSVars.css.d.ts +2 -3
  67. package/dist/generated/css/SystemCSSVars.css.js +1 -6
  68. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  69. package/dist/jsx-utils.js +0 -1
  70. package/dist/jsx-utils.js.map +1 -1
  71. package/dist/ssr-dom-shim.js +51 -1
  72. package/dist/ssr-dom-shim.js.map +1 -1
  73. package/dist/theming/getStylesString.js +2 -4
  74. package/dist/theming/getStylesString.js.map +1 -1
  75. package/dist/theming/getThemeDesignerTheme.js +2 -1
  76. package/dist/theming/getThemeDesignerTheme.js.map +1 -1
  77. package/dist/thirdparty/preact/jsxRuntime.module.js +0 -1
  78. package/dist/thirdparty/preact/preact.module.js +0 -1
  79. package/dist/types/SortOrder.d.ts +24 -0
  80. package/dist/types/SortOrder.js +26 -0
  81. package/dist/types/SortOrder.js.map +1 -0
  82. package/dist/types.d.ts +2 -7
  83. package/dist/types.js.map +1 -1
  84. package/dist/util/ColorConversion.d.ts +2 -1
  85. package/dist/util/ColorConversion.js +35 -23
  86. package/dist/util/ColorConversion.js.map +1 -1
  87. package/dist/util/FocusableElements.js +14 -12
  88. package/dist/util/FocusableElements.js.map +1 -1
  89. package/dist/util/getClassCopy.d.ts +5 -2
  90. package/dist/util/getFastNavigationGroups.js +6 -1
  91. package/dist/util/getFastNavigationGroups.js.map +1 -1
  92. package/dist/util/throttle.d.ts +2 -0
  93. package/dist/util/throttle.js +20 -0
  94. package/dist/util/throttle.js.map +1 -0
  95. package/package-scripts.cjs +1 -1
  96. package/package.json +3 -3
  97. package/src/thirdparty/preact/jsxRuntime.module.js +0 -1
  98. package/src/thirdparty/preact/preact.module.js +0 -1
  99. package/dist/custom-elements-internal.json +0 -2721
  100. package/dist/custom-elements.json +0 -2455
  101. package/dist/prod/AssetRegistry.js +0 -2
  102. package/dist/prod/AssetRegistry.js.map +0 -7
  103. package/dist/prod/Boot.js +0 -2
  104. package/dist/prod/Boot.js.map +0 -7
  105. package/dist/prod/CustomElementsRegistry.js +0 -10
  106. package/dist/prod/CustomElementsRegistry.js.map +0 -7
  107. package/dist/prod/CustomElementsScope.js +0 -2
  108. package/dist/prod/CustomElementsScope.js.map +0 -7
  109. package/dist/prod/CustomElementsScopeUtils.js +0 -2
  110. package/dist/prod/CustomElementsScopeUtils.js.map +0 -7
  111. package/dist/prod/DOMObserver.js +0 -2
  112. package/dist/prod/DOMObserver.js.map +0 -7
  113. package/dist/prod/Device.js +0 -2
  114. package/dist/prod/Device.js.map +0 -7
  115. package/dist/prod/EventProvider.js +0 -2
  116. package/dist/prod/EventProvider.js.map +0 -7
  117. package/dist/prod/FeaturesRegistry.js +0 -2
  118. package/dist/prod/FeaturesRegistry.js.map +0 -7
  119. package/dist/prod/FontFace.js +0 -2
  120. package/dist/prod/FontFace.js.map +0 -7
  121. package/dist/prod/IgnoreCustomElements.js +0 -2
  122. package/dist/prod/IgnoreCustomElements.js.map +0 -7
  123. package/dist/prod/InitialConfiguration.js +0 -2
  124. package/dist/prod/InitialConfiguration.js.map +0 -7
  125. package/dist/prod/Keys.js +0 -2
  126. package/dist/prod/Keys.js.map +0 -7
  127. package/dist/prod/Location.js +0 -2
  128. package/dist/prod/Location.js.map +0 -7
  129. package/dist/prod/ManagedStyles.js +0 -2
  130. package/dist/prod/ManagedStyles.js.map +0 -7
  131. package/dist/prod/MediaRange.js +0 -2
  132. package/dist/prod/MediaRange.js.map +0 -7
  133. package/dist/prod/PropertiesFileFormat.js +0 -3
  134. package/dist/prod/PropertiesFileFormat.js.map +0 -7
  135. package/dist/prod/Render.js +0 -2
  136. package/dist/prod/Render.js.map +0 -7
  137. package/dist/prod/RenderQueue.js +0 -2
  138. package/dist/prod/RenderQueue.js.map +0 -7
  139. package/dist/prod/Runtimes.js +0 -2
  140. package/dist/prod/Runtimes.js.map +0 -7
  141. package/dist/prod/SystemCSSVars.js +0 -2
  142. package/dist/prod/SystemCSSVars.js.map +0 -7
  143. package/dist/prod/Theming.js +0 -2
  144. package/dist/prod/Theming.js.map +0 -7
  145. package/dist/prod/UI5Element.js +0 -2
  146. package/dist/prod/UI5Element.js.map +0 -7
  147. package/dist/prod/UI5ElementMetadata.js +0 -2
  148. package/dist/prod/UI5ElementMetadata.js.map +0 -7
  149. package/dist/prod/animations/AnimationQueue.js +0 -2
  150. package/dist/prod/animations/AnimationQueue.js.map +0 -7
  151. package/dist/prod/animations/animate.js +0 -2
  152. package/dist/prod/animations/animate.js.map +0 -7
  153. package/dist/prod/animations/scroll.js +0 -2
  154. package/dist/prod/animations/scroll.js.map +0 -7
  155. package/dist/prod/animations/slideDown.js +0 -2
  156. package/dist/prod/animations/slideDown.js.map +0 -7
  157. package/dist/prod/animations/slideUp.js +0 -2
  158. package/dist/prod/animations/slideUp.js.map +0 -7
  159. package/dist/prod/asset-registries/Icons.js +0 -2
  160. package/dist/prod/asset-registries/Icons.js.map +0 -7
  161. package/dist/prod/asset-registries/Illustrations.js +0 -2
  162. package/dist/prod/asset-registries/Illustrations.js.map +0 -7
  163. package/dist/prod/asset-registries/LocaleData.js +0 -2
  164. package/dist/prod/asset-registries/LocaleData.js.map +0 -7
  165. package/dist/prod/asset-registries/Themes.js +0 -2
  166. package/dist/prod/asset-registries/Themes.js.map +0 -7
  167. package/dist/prod/asset-registries/i18n.js +0 -2
  168. package/dist/prod/asset-registries/i18n.js.map +0 -7
  169. package/dist/prod/asset-registries/util/IconCollectionsAlias.js +0 -2
  170. package/dist/prod/asset-registries/util/IconCollectionsAlias.js.map +0 -7
  171. package/dist/prod/asset-registries/util/IconCollectionsByTheme.js +0 -2
  172. package/dist/prod/asset-registries/util/IconCollectionsByTheme.js.map +0 -7
  173. package/dist/prod/asset-registries/util/getIconCollectionByTheme.js +0 -2
  174. package/dist/prod/asset-registries/util/getIconCollectionByTheme.js.map +0 -7
  175. package/dist/prod/config/AnimationMode.js +0 -2
  176. package/dist/prod/config/AnimationMode.js.map +0 -7
  177. package/dist/prod/config/CalendarType.js +0 -2
  178. package/dist/prod/config/CalendarType.js.map +0 -7
  179. package/dist/prod/config/ConfigurationReset.js +0 -2
  180. package/dist/prod/config/ConfigurationReset.js.map +0 -7
  181. package/dist/prod/config/Fonts.js +0 -2
  182. package/dist/prod/config/Fonts.js.map +0 -7
  183. package/dist/prod/config/FormatSettings.js +0 -2
  184. package/dist/prod/config/FormatSettings.js.map +0 -7
  185. package/dist/prod/config/Icons.js +0 -2
  186. package/dist/prod/config/Icons.js.map +0 -7
  187. package/dist/prod/config/Language.js +0 -2
  188. package/dist/prod/config/Language.js.map +0 -7
  189. package/dist/prod/config/NoConflict.js +0 -2
  190. package/dist/prod/config/NoConflict.js.map +0 -7
  191. package/dist/prod/config/Theme.js +0 -2
  192. package/dist/prod/config/Theme.js.map +0 -7
  193. package/dist/prod/config/ThemeRoot.js +0 -2
  194. package/dist/prod/config/ThemeRoot.js.map +0 -7
  195. package/dist/prod/config/Timezone.js +0 -2
  196. package/dist/prod/config/Timezone.js.map +0 -7
  197. package/dist/prod/config/Tooltips.js +0 -2
  198. package/dist/prod/config/Tooltips.js.map +0 -7
  199. package/dist/prod/connectToComponent.js +0 -2
  200. package/dist/prod/connectToComponent.js.map +0 -7
  201. package/dist/prod/converters/DOMReference.js +0 -2
  202. package/dist/prod/converters/DOMReference.js.map +0 -7
  203. package/dist/prod/decorators/bound.js +0 -2
  204. package/dist/prod/decorators/bound.js.map +0 -7
  205. package/dist/prod/decorators/customElement.js +0 -2
  206. package/dist/prod/decorators/customElement.js.map +0 -7
  207. package/dist/prod/decorators/event-strict.js +0 -2
  208. package/dist/prod/decorators/event-strict.js.map +0 -7
  209. package/dist/prod/decorators/event.js +0 -2
  210. package/dist/prod/decorators/event.js.map +0 -7
  211. package/dist/prod/decorators/i18n.js +0 -2
  212. package/dist/prod/decorators/i18n.js.map +0 -7
  213. package/dist/prod/decorators/property.js +0 -2
  214. package/dist/prod/decorators/property.js.map +0 -7
  215. package/dist/prod/decorators/query.js +0 -2
  216. package/dist/prod/decorators/query.js.map +0 -7
  217. package/dist/prod/decorators/queryAll.js +0 -2
  218. package/dist/prod/decorators/queryAll.js.map +0 -7
  219. package/dist/prod/decorators/slot.js +0 -2
  220. package/dist/prod/decorators/slot.js.map +0 -7
  221. package/dist/prod/decorators.js +0 -2
  222. package/dist/prod/decorators.js.map +0 -7
  223. package/dist/prod/delegate/ItemNavigation.js +0 -2
  224. package/dist/prod/delegate/ItemNavigation.js.map +0 -7
  225. package/dist/prod/delegate/ResizeHandler.js +0 -2
  226. package/dist/prod/delegate/ResizeHandler.js.map +0 -7
  227. package/dist/prod/delegate/ScrollEnablement.js +0 -2
  228. package/dist/prod/delegate/ScrollEnablement.js.map +0 -7
  229. package/dist/prod/features/F6Navigation.js +0 -2
  230. package/dist/prod/features/F6Navigation.js.map +0 -7
  231. package/dist/prod/features/InputElementsFormSupport.js +0 -2
  232. package/dist/prod/features/InputElementsFormSupport.js.map +0 -7
  233. package/dist/prod/features/LegacyDateFormats.js +0 -2
  234. package/dist/prod/features/LegacyDateFormats.js.map +0 -7
  235. package/dist/prod/features/OpenUI5Element.js +0 -2
  236. package/dist/prod/features/OpenUI5Element.js.map +0 -7
  237. package/dist/prod/features/OpenUI5Enablement.js +0 -21
  238. package/dist/prod/features/OpenUI5Enablement.js.map +0 -7
  239. package/dist/prod/features/OpenUI5Support.js +0 -2
  240. package/dist/prod/features/OpenUI5Support.js.map +0 -7
  241. package/dist/prod/features/patchPatcher.js +0 -2
  242. package/dist/prod/features/patchPatcher.js.map +0 -7
  243. package/dist/prod/features/patchPopup.js +0 -2
  244. package/dist/prod/features/patchPopup.js.map +0 -7
  245. package/dist/prod/generated/AssetParameters.js +0 -2
  246. package/dist/prod/generated/AssetParameters.js.map +0 -7
  247. package/dist/prod/generated/VersionInfo.js +0 -2
  248. package/dist/prod/generated/VersionInfo.js.map +0 -7
  249. package/dist/prod/generated/css/BusyIndicator.css.js +0 -2
  250. package/dist/prod/generated/css/BusyIndicator.css.js.map +0 -7
  251. package/dist/prod/generated/css/FontFace.css.js +0 -2
  252. package/dist/prod/generated/css/FontFace.css.js.map +0 -7
  253. package/dist/prod/generated/css/OverrideFontFace.css.js +0 -2
  254. package/dist/prod/generated/css/OverrideFontFace.css.js.map +0 -7
  255. package/dist/prod/generated/css/SystemCSSVars.css.js +0 -2
  256. package/dist/prod/generated/css/SystemCSSVars.css.js.map +0 -7
  257. package/dist/prod/getSharedResource.js +0 -2
  258. package/dist/prod/getSharedResource.js.map +0 -7
  259. package/dist/prod/global.d.js +0 -2
  260. package/dist/prod/global.d.js.map +0 -7
  261. package/dist/prod/i18nBundle.js +0 -2
  262. package/dist/prod/i18nBundle.js.map +0 -7
  263. package/dist/prod/index.d.js +0 -2
  264. package/dist/prod/index.d.js.map +0 -7
  265. package/dist/prod/jsx-dev-runtime.js +0 -2
  266. package/dist/prod/jsx-dev-runtime.js.map +0 -7
  267. package/dist/prod/jsx-runtime.js +0 -2
  268. package/dist/prod/jsx-runtime.js.map +0 -7
  269. package/dist/prod/jsx-utils.js +0 -2
  270. package/dist/prod/jsx-utils.js.map +0 -7
  271. package/dist/prod/locale/Locale.js +0 -2
  272. package/dist/prod/locale/Locale.js.map +0 -7
  273. package/dist/prod/locale/RTLAwareRegistry.js +0 -2
  274. package/dist/prod/locale/RTLAwareRegistry.js.map +0 -7
  275. package/dist/prod/locale/applyDirection.js +0 -2
  276. package/dist/prod/locale/applyDirection.js.map +0 -7
  277. package/dist/prod/locale/directionChange.js +0 -2
  278. package/dist/prod/locale/directionChange.js.map +0 -7
  279. package/dist/prod/locale/getEffectiveDir.js +0 -2
  280. package/dist/prod/locale/getEffectiveDir.js.map +0 -7
  281. package/dist/prod/locale/getLocale.js +0 -2
  282. package/dist/prod/locale/getLocale.js.map +0 -7
  283. package/dist/prod/locale/languageChange.js +0 -2
  284. package/dist/prod/locale/languageChange.js.map +0 -7
  285. package/dist/prod/locale/nextFallbackLocale.js +0 -2
  286. package/dist/prod/locale/nextFallbackLocale.js.map +0 -7
  287. package/dist/prod/locale/normalizeLocale.js +0 -2
  288. package/dist/prod/locale/normalizeLocale.js.map +0 -7
  289. package/dist/prod/renderer/JsxRenderer.js +0 -2
  290. package/dist/prod/renderer/JsxRenderer.js.map +0 -7
  291. package/dist/prod/renderer/LitRenderer.js +0 -2
  292. package/dist/prod/renderer/LitRenderer.js.map +0 -7
  293. package/dist/prod/renderer/directives/style-map.js +0 -6
  294. package/dist/prod/renderer/directives/style-map.js.map +0 -7
  295. package/dist/prod/renderer/executeTemplate.js +0 -2
  296. package/dist/prod/renderer/executeTemplate.js.map +0 -7
  297. package/dist/prod/sap/base/Log.js +0 -750
  298. package/dist/prod/sap/base/assert.js +0 -34
  299. package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +0 -20
  300. package/dist/prod/sap/base/security/URLListValidator.js +0 -406
  301. package/dist/prod/sap/base/security/encodeCSS.js +0 -40
  302. package/dist/prod/sap/base/security/encodeXML.js +0 -53
  303. package/dist/prod/sap/base/security/sanitizeHTML.js +0 -38
  304. package/dist/prod/sap/base/strings/toHex.js +0 -33
  305. package/dist/prod/sap/base/util/now.js +0 -28
  306. package/dist/prod/sap/base/util/uid.js +0 -27
  307. package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +0 -3600
  308. package/dist/prod/ssr-dom-shim.js +0 -2
  309. package/dist/prod/ssr-dom-shim.js.map +0 -7
  310. package/dist/prod/ssr-dom.js +0 -2
  311. package/dist/prod/ssr-dom.js.map +0 -7
  312. package/dist/prod/theming/CustomStyle.js +0 -2
  313. package/dist/prod/theming/CustomStyle.js.map +0 -7
  314. package/dist/prod/theming/ThemeLoaded.js +0 -2
  315. package/dist/prod/theming/ThemeLoaded.js.map +0 -7
  316. package/dist/prod/theming/ThemeRegistered.js +0 -2
  317. package/dist/prod/theming/ThemeRegistered.js.map +0 -7
  318. package/dist/prod/theming/applyTheme.js +0 -2
  319. package/dist/prod/theming/applyTheme.js.map +0 -7
  320. package/dist/prod/theming/getConstructableStyle.js +0 -2
  321. package/dist/prod/theming/getConstructableStyle.js.map +0 -7
  322. package/dist/prod/theming/getEffectiveStyle.js +0 -2
  323. package/dist/prod/theming/getEffectiveStyle.js.map +0 -7
  324. package/dist/prod/theming/getStylesString.js +0 -2
  325. package/dist/prod/theming/getStylesString.js.map +0 -7
  326. package/dist/prod/theming/getThemeDesignerTheme.js +0 -2
  327. package/dist/prod/theming/getThemeDesignerTheme.js.map +0 -7
  328. package/dist/prod/thirdparty/_merge.js +0 -2
  329. package/dist/prod/thirdparty/_merge.js.map +0 -7
  330. package/dist/prod/thirdparty/isPlainObject.js +0 -2
  331. package/dist/prod/thirdparty/isPlainObject.js.map +0 -7
  332. package/dist/prod/thirdparty/merge.js +0 -2
  333. package/dist/prod/thirdparty/merge.js.map +0 -7
  334. package/dist/prod/thirdparty/preact/jsx.d.js +0 -2
  335. package/dist/prod/thirdparty/preact/jsx.d.js.map +0 -7
  336. package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js +0 -2
  337. package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js.map +0 -7
  338. package/dist/prod/thirdparty/preact/preact.module.d.js +0 -2
  339. package/dist/prod/thirdparty/preact/preact.module.d.js.map +0 -7
  340. package/dist/prod/types/AnimationMode.js +0 -2
  341. package/dist/prod/types/AnimationMode.js.map +0 -7
  342. package/dist/prod/types/CalendarType.js +0 -2
  343. package/dist/prod/types/CalendarType.js.map +0 -7
  344. package/dist/prod/types/InvisibleMessageMode.js +0 -2
  345. package/dist/prod/types/InvisibleMessageMode.js.map +0 -7
  346. package/dist/prod/types/ItemNavigationBehavior.js +0 -2
  347. package/dist/prod/types/ItemNavigationBehavior.js.map +0 -7
  348. package/dist/prod/types/MovePlacement.js +0 -2
  349. package/dist/prod/types/MovePlacement.js.map +0 -7
  350. package/dist/prod/types/NavigationMode.js +0 -2
  351. package/dist/prod/types/NavigationMode.js.map +0 -7
  352. package/dist/prod/types/Orientation.js +0 -2
  353. package/dist/prod/types/Orientation.js.map +0 -7
  354. package/dist/prod/types/ValueState.js +0 -2
  355. package/dist/prod/types/ValueState.js.map +0 -7
  356. package/dist/prod/types.js +0 -2
  357. package/dist/prod/types.js.map +0 -7
  358. package/dist/prod/updateShadowRoot.js +0 -2
  359. package/dist/prod/updateShadowRoot.js.map +0 -7
  360. package/dist/prod/util/AccessibilityTextsHelper.js +0 -2
  361. package/dist/prod/util/AccessibilityTextsHelper.js.map +0 -7
  362. package/dist/prod/util/Caret.js +0 -2
  363. package/dist/prod/util/Caret.js.map +0 -7
  364. package/dist/prod/util/ColorConversion.js +0 -2
  365. package/dist/prod/util/ColorConversion.js.map +0 -7
  366. package/dist/prod/util/FetchHelper.js +0 -2
  367. package/dist/prod/util/FetchHelper.js.map +0 -7
  368. package/dist/prod/util/FocusableElements.js +0 -2
  369. package/dist/prod/util/FocusableElements.js.map +0 -7
  370. package/dist/prod/util/HTMLSanitizer.js +0 -2
  371. package/dist/prod/util/HTMLSanitizer.js.map +0 -7
  372. package/dist/prod/util/InvisibleMessage.js +0 -2
  373. package/dist/prod/util/InvisibleMessage.js.map +0 -7
  374. package/dist/prod/util/PopupUtils.js +0 -2
  375. package/dist/prod/util/PopupUtils.js.map +0 -7
  376. package/dist/prod/util/SelectionAssistant.js +0 -2
  377. package/dist/prod/util/SelectionAssistant.js.map +0 -7
  378. package/dist/prod/util/SlotsHelper.js +0 -2
  379. package/dist/prod/util/SlotsHelper.js.map +0 -7
  380. package/dist/prod/util/StringHelper.js +0 -2
  381. package/dist/prod/util/StringHelper.js.map +0 -7
  382. package/dist/prod/util/TabbableElements.js +0 -2
  383. package/dist/prod/util/TabbableElements.js.map +0 -7
  384. package/dist/prod/util/arraysAreEqual.js +0 -2
  385. package/dist/prod/util/arraysAreEqual.js.map +0 -7
  386. package/dist/prod/util/clamp.js +0 -2
  387. package/dist/prod/util/clamp.js.map +0 -7
  388. package/dist/prod/util/createLinkInHead.js +0 -2
  389. package/dist/prod/util/createLinkInHead.js.map +0 -7
  390. package/dist/prod/util/debounce.js +0 -2
  391. package/dist/prod/util/debounce.js.map +0 -7
  392. package/dist/prod/util/detectNavigatorLanguage.js +0 -2
  393. package/dist/prod/util/detectNavigatorLanguage.js.map +0 -7
  394. package/dist/prod/util/dragAndDrop/DragRegistry.js +0 -2
  395. package/dist/prod/util/dragAndDrop/DragRegistry.js.map +0 -7
  396. package/dist/prod/util/dragAndDrop/findClosestPosition.js +0 -2
  397. package/dist/prod/util/dragAndDrop/findClosestPosition.js.map +0 -7
  398. package/dist/prod/util/dragAndDrop/handleDragOver.js +0 -2
  399. package/dist/prod/util/dragAndDrop/handleDragOver.js.map +0 -7
  400. package/dist/prod/util/dragAndDrop/handleDrop.js +0 -2
  401. package/dist/prod/util/dragAndDrop/handleDrop.js.map +0 -7
  402. package/dist/prod/util/dragAndDrop/longDragOverHandler.js +0 -2
  403. package/dist/prod/util/dragAndDrop/longDragOverHandler.js.map +0 -7
  404. package/dist/prod/util/escapeRegex.js +0 -2
  405. package/dist/prod/util/escapeRegex.js.map +0 -7
  406. package/dist/prod/util/fixSafariActiveState.js +0 -2
  407. package/dist/prod/util/fixSafariActiveState.js.map +0 -7
  408. package/dist/prod/util/formatMessage.js +0 -2
  409. package/dist/prod/util/formatMessage.js.map +0 -7
  410. package/dist/prod/util/generateHighlightedMarkup.js +0 -2
  411. package/dist/prod/util/generateHighlightedMarkup.js.map +0 -7
  412. package/dist/prod/util/getActiveElement.js +0 -2
  413. package/dist/prod/util/getActiveElement.js.map +0 -7
  414. package/dist/prod/util/getClassCopy.js +0 -2
  415. package/dist/prod/util/getClassCopy.js.map +0 -7
  416. package/dist/prod/util/getDesigntimePropertyAsArray.js +0 -2
  417. package/dist/prod/util/getDesigntimePropertyAsArray.js.map +0 -7
  418. package/dist/prod/util/getEffectiveContentDensity.js +0 -2
  419. package/dist/prod/util/getEffectiveContentDensity.js.map +0 -7
  420. package/dist/prod/util/getEffectiveScrollbarStyle.js +0 -26
  421. package/dist/prod/util/getEffectiveScrollbarStyle.js.map +0 -7
  422. package/dist/prod/util/getFastNavigationGroups.js +0 -2
  423. package/dist/prod/util/getFastNavigationGroups.js.map +0 -7
  424. package/dist/prod/util/getFileExtension.js +0 -2
  425. package/dist/prod/util/getFileExtension.js.map +0 -7
  426. package/dist/prod/util/getNormalizedTarget.js +0 -2
  427. package/dist/prod/util/getNormalizedTarget.js.map +0 -7
  428. package/dist/prod/util/getSingletonElementInstance.js +0 -2
  429. package/dist/prod/util/getSingletonElementInstance.js.map +0 -7
  430. package/dist/prod/util/hash2str.js +0 -2
  431. package/dist/prod/util/hash2str.js.map +0 -7
  432. package/dist/prod/util/isElementClickable.js +0 -2
  433. package/dist/prod/util/isElementClickable.js.map +0 -7
  434. package/dist/prod/util/isElementHidden.js +0 -2
  435. package/dist/prod/util/isElementHidden.js.map +0 -7
  436. package/dist/prod/util/isElementInView.js +0 -2
  437. package/dist/prod/util/isElementInView.js.map +0 -7
  438. package/dist/prod/util/isElementTabbable.js +0 -2
  439. package/dist/prod/util/isElementTabbable.js.map +0 -7
  440. package/dist/prod/util/isValidPropertyName.js +0 -2
  441. package/dist/prod/util/isValidPropertyName.js.map +0 -7
  442. package/dist/prod/util/toLowercaseEnumValue.js +0 -2
  443. package/dist/prod/util/toLowercaseEnumValue.js.map +0 -7
  444. package/dist/prod/util/whenDOMReady.js +0 -2
  445. package/dist/prod/util/whenDOMReady.js.map +0 -7
  446. package/dist/prod/util/willShowContent.js +0 -2
  447. package/dist/prod/util/willShowContent.js.map +0 -7
  448. package/dist/prod/validateThemeRoot.js +0 -2
  449. package/dist/prod/validateThemeRoot.js.map +0 -7
  450. package/dist/vscode.html-custom-data.json +0 -22
  451. /package/cypress/specs/{ConfigurationChange.cy.ts → ConfigurationChange.cy.tsx} +0 -0
  452. /package/cypress/specs/{EventProvider.cy.ts → EventProvider.cy.tsx} +0 -0
  453. /package/cypress/specs/{SystemDOMElements.cy.ts → SystemDOMElements.cy.tsx} +0 -0
  454. /package/cypress/specs/{Theming.cy.ts → Theming.cy.tsx} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CustomElementsRegistry.js","sourceRoot":"","sources":["../src/CustomElementsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGxF,MAAM,IAAI,GAAG,iBAAiB,CAAsB,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACvE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;AAEtC,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC9C,IAAI,cAAmC,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,CAAC,CAAC;AAE3B,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;IACnC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,sBAAsB,EAAE,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,OAAO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACjC,OAAO,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,CAAC,GAAW,EAAE,EAAE;IACpD,IAAI,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,kBAAkB,KA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\nimport { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from \"./Runtimes.js\";\nimport type { Timeout } from \"./types.js\";\n\nconst Tags = getSharedResource<Map<string, number>>(\"Tags\", new Map());\nconst Definitions = new Set<string>();\n\nlet Failures = new Map<number, Set<string>>();\nlet failureTimeout: Timeout | undefined;\n\nconst UNKNOWN_RUNTIME = -1;\n\nconst registerTag = (tag: string) => {\n\tDefinitions.add(tag);\n\tTags.set(tag, getCurrentRuntimeIndex());\n};\n\nconst isTagRegistered = (tag: string) => {\n\treturn Definitions.has(tag);\n};\n\nconst getAllRegisteredTags = () => {\n\treturn [...Definitions.values()];\n};\n\nconst recordTagRegistrationFailure = (tag: string) => {\n\tlet tagRegRuntimeIndex = Tags.get(tag);\n\tif (tagRegRuntimeIndex === undefined) {\n\t\ttagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the \"unknown\" key\n\t}\n\n\tif (!Failures.has(tagRegRuntimeIndex)) {\n\t\tFailures.set(tagRegRuntimeIndex, new Set());\n\t}\n\tFailures.get(tagRegRuntimeIndex)!.add(tag);\n\n\tif (!failureTimeout) {\n\t\tfailureTimeout = setTimeout(() => {\n\t\t\tdisplayFailedRegistrations();\n\t\t\tFailures = new Map();\n\t\t\tfailureTimeout = undefined;\n\t\t}, 1000);\n\t}\n};\n\nconst displayFailedRegistrations = () => {\n\tconst allRuntimes = getAllRuntimes();\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\tconst currentRuntime = allRuntimes[currentRuntimeIndex];\n\n\tlet message = `Multiple UI5 Web Components instances detected.`;\n\n\tif (allRuntimes.length > 1) {\n\t\tmessage = `${message}\\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\\n${runtime.description}`).join(\"\")}`;\n\t}\n\n\t[...Failures.keys()].forEach(otherRuntimeIndex => {\n\t\tlet comparison: number;\n\t\tlet otherRuntime;\n\n\t\tif (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag\n\t\t\tcomparison = 1; // the current runtime is considered newer\n\t\t\totherRuntime = {\n\t\t\t\tdescription: `Older unknown runtime`,\n\t\t\t};\n\t\t} else {\n\t\t\tcomparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);\n\t\t\totherRuntime = allRuntimes[otherRuntimeIndex];\n\t\t}\n\n\t\tlet compareWord;\n\t\tif (comparison > 0) {\n\t\t\tcompareWord = \"an older\";\n\t\t} else if (comparison < 0) {\n\t\t\tcompareWord = \"a newer\";\n\t\t} else {\n\t\t\tcompareWord = \"the same\";\n\t\t}\n\t\tmessage = `${message}\\n\\n\"${currentRuntime.description}\" failed to define ${Failures.get(otherRuntimeIndex)!.size} tag(s) as they were defined by a runtime of ${compareWord} version \"${otherRuntime.description}\": ${([...Failures.get(otherRuntimeIndex)!]).sort().join(\", \")}.`;\n\n\t\tif (comparison > 0) {\n\t\t\tmessage = `${message}\\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;\n\t\t} else {\n\t\t\tmessage = `${message}\\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;\n\t\t}\n\t});\n\n\tmessage = `${message}\\n\\nTo prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`;\n\n\tconsole.warn(message); // eslint-disable-line\n};\n\nexport {\n\tregisterTag,\n\tisTagRegistered,\n\tgetAllRegisteredTags,\n\trecordTagRegistrationFailure,\n};\n"]}
1
+ {"version":3,"file":"CustomElementsRegistry.js","sourceRoot":"","sources":["../src/CustomElementsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGxF,MAAM,IAAI,GAAG,iBAAiB,CAAsB,MAAM,EAAE,IAAI,GA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G,CAAC,EAAE,CAAC;YAC3B,WAAW,GAAG,SAAS,CAAC;QACzB,CAAC;aAAM,CAAC;YACP,WAAW,GAAG,UAAU,CAAC;QAC1B,CAAC;QACD,OAAO,GAAG,GAAG,OAAO,QAAQ,cAAc,CAAC,WAAW,sBAAsB,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAE,CAAC,IAAI,gDAAgD,WAAW,aAAa,YAAY,CAAC,WAAW,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAEpR,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;YACpB,OAAO,GAAG,GAAG,OAAO,qFAAqF,YAAY,CAAC,WAAW,kCAAkC,CAAC;QACrK,CAAC;aAAM,CAAC;YACP,OAAO,GAAG,GAAG,OAAO,+HAA+H,CAAC;QACrJ,CAAC;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,GAAG,OAAO,oNAAoN,CAAC;IAEzO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB;AAC9C,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,GAC5B,CAAC","sourcesContent":["import getSharedResource from \"./getSharedResource.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from \"./Runtimes.js\";\nimport type { Timeout } from \"./types.js\";\n\nconst Tags = getSharedResource<Map<string, number>>(\"Tags\", new Map());\nconst Definitions = new Set<string>();\n\nlet Failures = new Map<number, Set<string>>();\nlet failureTimeout: Timeout | undefined;\n\nconst UNKNOWN_RUNTIME = -1;\n\nconst registerTag = (tag: string) => {\n\tDefinitions.add(tag);\n\tTags.set(tag, getCurrentRuntimeIndex());\n};\n\nconst isTagRegistered = (tag: string) => {\n\treturn Definitions.has(tag);\n};\n\nconst hasRegisteredTags = () => {\n\treturn Definitions.size > 0;\n};\n\nconst getAllRegisteredTags = () => {\n\treturn [...Definitions.values()];\n};\n\nconst recordTagRegistrationFailure = (tag: string) => {\n\tlet tagRegRuntimeIndex = Tags.get(tag);\n\tif (tagRegRuntimeIndex === undefined) {\n\t\ttagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the \"unknown\" key\n\t}\n\n\tif (!Failures.has(tagRegRuntimeIndex)) {\n\t\tFailures.set(tagRegRuntimeIndex, new Set());\n\t}\n\tFailures.get(tagRegRuntimeIndex)!.add(tag);\n\n\tif (!failureTimeout) {\n\t\tfailureTimeout = setTimeout(() => {\n\t\t\tdisplayFailedRegistrations();\n\t\t\tFailures = new Map();\n\t\t\tfailureTimeout = undefined;\n\t\t}, 1000);\n\t}\n};\n\nconst displayFailedRegistrations = () => {\n\tconst allRuntimes = getAllRuntimes();\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\tconst currentRuntime = allRuntimes[currentRuntimeIndex];\n\n\tlet message = `Multiple UI5 Web Components instances detected.`;\n\n\tif (allRuntimes.length > 1) {\n\t\tmessage = `${message}\\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\\n${runtime.description}`).join(\"\")}`;\n\t}\n\n\t[...Failures.keys()].forEach(otherRuntimeIndex => {\n\t\tlet comparison: number;\n\t\tlet otherRuntime;\n\n\t\tif (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag\n\t\t\tcomparison = 1; // the current runtime is considered newer\n\t\t\totherRuntime = {\n\t\t\t\tdescription: `Older unknown runtime`,\n\t\t\t};\n\t\t} else {\n\t\t\tcomparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);\n\t\t\totherRuntime = allRuntimes[otherRuntimeIndex];\n\t\t}\n\n\t\tlet compareWord;\n\t\tif (comparison > 0) {\n\t\t\tcompareWord = \"an older\";\n\t\t} else if (comparison < 0) {\n\t\t\tcompareWord = \"a newer\";\n\t\t} else {\n\t\t\tcompareWord = \"the same\";\n\t\t}\n\t\tmessage = `${message}\\n\\n\"${currentRuntime.description}\" failed to define ${Failures.get(otherRuntimeIndex)!.size} tag(s) as they were defined by a runtime of ${compareWord} version \"${otherRuntime.description}\": ${([...Failures.get(otherRuntimeIndex)!]).sort().join(\", \")}.`;\n\n\t\tif (comparison > 0) {\n\t\t\tmessage = `${message}\\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;\n\t\t} else {\n\t\t\tmessage = `${message}\\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;\n\t\t}\n\t});\n\n\tmessage = `${message}\\n\\nTo prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/06-scoping.md.`;\n\n\tconsole.warn(message); // eslint-disable-line\n};\n\nexport {\n\tregisterTag,\n\tisTagRegistered,\n\thasRegisteredTags,\n\tgetAllRegisteredTags,\n\trecordTagRegistrationFailure,\n};\n"]}
@@ -4,7 +4,9 @@ type Rules = {
4
4
  };
5
5
  /**
6
6
  * Sets the suffix to be used for custom elements scoping, f.e. pass "demo" to get tags such as "ui5-button-demo".
7
- * Note: by default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
7
+ *
8
+ * **Note:** By default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
9
+ * **Note:** Setting the scoping suffix must be done before importing any components.
8
10
  *
9
11
  * @public
10
12
  * @param suffix The scoping suffix
@@ -1,3 +1,4 @@
1
+ import { hasRegisteredTags } from "./CustomElementsRegistry.js";
1
2
  import VersionInfo from "./generated/VersionInfo.js";
2
3
  let suf;
3
4
  let rulesObj = {
@@ -7,7 +8,9 @@ let rulesObj = {
7
8
  const tagsCache = new Map(); // true/false means the tag should/should not be cached, undefined means not known yet.
8
9
  /**
9
10
  * Sets the suffix to be used for custom elements scoping, f.e. pass "demo" to get tags such as "ui5-button-demo".
10
- * Note: by default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
11
+ *
12
+ * **Note:** By default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
13
+ * **Note:** Setting the scoping suffix must be done before importing any components.
11
14
  *
12
15
  * @public
13
16
  * @param suffix The scoping suffix
@@ -16,6 +19,10 @@ const setCustomElementsScopingSuffix = (suffix) => {
16
19
  if (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {
17
20
  throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");
18
21
  }
22
+ if (hasRegisteredTags()) {
23
+ // eslint-disable-next-line no-console
24
+ console.warn("Setting the scoping suffix must be done before importing any components. For proper usage, read the scoping section: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/06-scoping.md.");
25
+ }
19
26
  suf = suffix;
20
27
  };
21
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CustomElementsScopeUtils.js","sourceRoot":"","sources":["../src/CustomElementsScopeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAErD,IAAI,GAAW,CAAC;AAOhB,IAAI,QAAQ,GAAU;IACrB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,EAAE;CACX,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmB,CAAC,CAAC,uFAAuF;AAErI;;;;;;GAMG;AACH,MAAM,8BAA8B,GAAG,CAAC,MAAc,EAAE,EAAE;IACzD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IAC3F,CAAC;IAED,GAAG,GAAG,MAAM,CAAC;AACd,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,8BAA8B,GAAG,GAAG,EAAE;IAC3C,OAAO,GAAG,CAAC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AE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACjH,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,+BAA+B,GAAG,CAAC,GAAW,EAAE,EAAE;IACvD,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,OAAO,8BAA8B,EAAE,CAAC;IACzC,CAAC;AACF,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IAClE,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,UAAU,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,OAAO,EACN,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,EAC/B,gBAAgB,GAChB,CAAC","sourcesContent":["import VersionInfo from \"./generated/VersionInfo.js\";\n\nlet suf: string;\n\ntype Rules = {\n\tinclude: Array<RegExp>,\n\texclude: Array<RegExp>,\n};\n\nlet rulesObj: Rules = {\n\tinclude: [/^ui5-/],\n\texclude: [],\n};\n\nconst tagsCache = new Map<string, boolean>(); // true/false means the tag should/should not be cached, undefined means not known yet.\n\n/**\n * Sets the suffix to be used for custom elements scoping, f.e. pass \"demo\" to get tags such as \"ui5-button-demo\".\n * Note: by default all tags starting with \"ui5-\" will be scoped, unless you change this by calling \"setCustomElementsScopingRules\"\n *\n * @public\n * @param suffix The scoping suffix\n */\nconst setCustomElementsScopingSuffix = (suffix: string) => {\n\tif (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {\n\t\tthrow new Error(\"Only alphanumeric characters and dashes allowed for the scoping suffix\");\n\t}\n\n\tsuf = suffix;\n};\n\n/**\n * Returns the currently set scoping suffix, or undefined if not set.\n *\n * @public\n * @returns {String|undefined}\n */\nconst getCustomElementsScopingSuffix = () => {\n\treturn suf;\n};\n\n/**\n * Sets the rules, governing which custom element tags to scope and which not, f.e.\n * setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);\n * will scope all elements starting with \"ui5-\" but not the ones starting with \"ui5-mylib-\" and not \"ui5-carousel\".\n *\n * @public\n * @param rules Object with \"include\" and \"exclude\" properties, both arrays of regular expressions. Note that \"include\"\n * rules are applied first and \"exclude\" rules second.\n */\nconst setCustomElementsScopingRules = (rules: Rules) => {\n\tif (!rules || !rules.include) {\n\t\tthrow new Error(`\"rules\" must be an object with at least an \"include\" property`);\n\t}\n\n\tif (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {\n\t\tthrow new Error(`\"rules.include\" must be an array of regular expressions`);\n\t}\n\n\tif (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {\n\t\tthrow new Error(`\"rules.exclude\" must be an array of regular expressions`);\n\t}\n\n\trules.exclude = rules.exclude || [];\n\trulesObj = rules;\n\ttagsCache.clear(); // reset the cache upon setting new rules\n};\n\n/**\n * Returns the rules, governing which custom element tags to scope and which not. By default, all elements\n * starting with \"ui5-\" are scoped. The default rules are: {include: [/^ui5-/]}.\n *\n * @public\n * @returns {Object}\n */\nconst getCustomElementsScopingRules = () => {\n\treturn rulesObj;\n};\n\n/**\n * Determines whether custom elements with the given tag should be scoped or not.\n * The tag is first matched against the \"include\" rules and then against the \"exclude\" rules and the\n * result is cached until new rules are set.\n *\n * @public\n * @param tag\n */\nconst shouldScopeCustomElement = (tag: string) => {\n\tif (!tagsCache.has(tag)) {\n\t\tconst result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));\n\t\ttagsCache.set(tag, result);\n\t}\n\n\treturn tagsCache.get(tag);\n};\n\n/**\n * Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.\n *\n * @public\n * @param tag\n * @returns {String}\n */\nconst getEffectiveScopingSuffixForTag = (tag: string) => {\n\tif (shouldScopeCustomElement(tag)) {\n\t\treturn getCustomElementsScopingSuffix();\n\t}\n};\n\n/**\n * @public\n * Used for getting a scoped name for a CSS variable using the same transformation used in the build\n * @name the name of the css variable as written in the code\n * @returns a variable name with the current version inserted as available at runtime\n */\nconst getScopedVarName = (name: string) => {\n\tconst versionStr = `v${VersionInfo.version.replaceAll(\".\", \"-\")}`;\n\tconst expr = /(--_?ui5)([^,:)\\s]+)/g;\n\treturn name.replaceAll(expr, `$1-${versionStr}$2`);\n};\n\nexport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n\tgetScopedVarName,\n};\n"]}
1
+ {"version":3,"file":"CustomElementsScopeUtils.js","sourceRoot":"","sources":["../src/CustomElementsScopeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAErD,IAAI,GAAW,CAAC;AAOhB,IAAI,QAAQ,GAAU;IACrB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,EAAE;CACX,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmB,CAAC,CAAC,uFAAuF;AAErI;;;;;;;;GAQ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AO,EACN,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,EAC/B,gBAAgB,GAChB,CAAC","sourcesContent":["import { hasRegisteredTags } from \"./CustomElementsRegistry.js\";\nimport VersionInfo from \"./generated/VersionInfo.js\";\n\nlet suf: string;\n\ntype Rules = {\n\tinclude: Array<RegExp>,\n\texclude: Array<RegExp>,\n};\n\nlet rulesObj: Rules = {\n\tinclude: [/^ui5-/],\n\texclude: [],\n};\n\nconst tagsCache = new Map<string, boolean>(); // true/false means the tag should/should not be cached, undefined means not known yet.\n\n/**\n * Sets the suffix to be used for custom elements scoping, f.e. pass \"demo\" to get tags such as \"ui5-button-demo\".\n *\n * **Note:** By default all tags starting with \"ui5-\" will be scoped, unless you change this by calling \"setCustomElementsScopingRules\"\n * **Note:** Setting the scoping suffix must be done before importing any components.\n *\n * @public\n * @param suffix The scoping suffix\n */\nconst setCustomElementsScopingSuffix = (suffix: string) => {\n\tif (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {\n\t\tthrow new Error(\"Only alphanumeric characters and dashes allowed for the scoping suffix\");\n\t}\n\n\tif (hasRegisteredTags()) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\"Setting the scoping suffix must be done before importing any components. For proper usage, read the scoping section: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/06-scoping.md.\");\n\t}\n\n\tsuf = suffix;\n};\n\n/**\n * Returns the currently set scoping suffix, or undefined if not set.\n *\n * @public\n * @returns {String|undefined}\n */\nconst getCustomElementsScopingSuffix = () => {\n\treturn suf;\n};\n\n/**\n * Sets the rules, governing which custom element tags to scope and which not, f.e.\n * setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);\n * will scope all elements starting with \"ui5-\" but not the ones starting with \"ui5-mylib-\" and not \"ui5-carousel\".\n *\n * @public\n * @param rules Object with \"include\" and \"exclude\" properties, both arrays of regular expressions. Note that \"include\"\n * rules are applied first and \"exclude\" rules second.\n */\nconst setCustomElementsScopingRules = (rules: Rules) => {\n\tif (!rules || !rules.include) {\n\t\tthrow new Error(`\"rules\" must be an object with at least an \"include\" property`);\n\t}\n\n\tif (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {\n\t\tthrow new Error(`\"rules.include\" must be an array of regular expressions`);\n\t}\n\n\tif (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {\n\t\tthrow new Error(`\"rules.exclude\" must be an array of regular expressions`);\n\t}\n\n\trules.exclude = rules.exclude || [];\n\trulesObj = rules;\n\ttagsCache.clear(); // reset the cache upon setting new rules\n};\n\n/**\n * Returns the rules, governing which custom element tags to scope and which not. By default, all elements\n * starting with \"ui5-\" are scoped. The default rules are: {include: [/^ui5-/]}.\n *\n * @public\n * @returns {Object}\n */\nconst getCustomElementsScopingRules = () => {\n\treturn rulesObj;\n};\n\n/**\n * Determines whether custom elements with the given tag should be scoped or not.\n * The tag is first matched against the \"include\" rules and then against the \"exclude\" rules and the\n * result is cached until new rules are set.\n *\n * @public\n * @param tag\n */\nconst shouldScopeCustomElement = (tag: string) => {\n\tif (!tagsCache.has(tag)) {\n\t\tconst result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));\n\t\ttagsCache.set(tag, result);\n\t}\n\n\treturn tagsCache.get(tag);\n};\n\n/**\n * Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.\n *\n * @public\n * @param tag\n * @returns {String}\n */\nconst getEffectiveScopingSuffixForTag = (tag: string) => {\n\tif (shouldScopeCustomElement(tag)) {\n\t\treturn getCustomElementsScopingSuffix();\n\t}\n};\n\n/**\n * @public\n * Used for getting a scoped name for a CSS variable using the same transformation used in the build\n * @name the name of the css variable as written in the code\n * @returns a variable name with the current version inserted as available at runtime\n */\nconst getScopedVarName = (name: string) => {\n\tconst versionStr = `v${VersionInfo.version.replaceAll(\".\", \"-\")}`;\n\tconst expr = /(--_?ui5)([^,:)\\s]+)/g;\n\treturn name.replaceAll(expr, `$1-${versionStr}$2`);\n};\n\nexport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tshouldScopeCustomElement,\n\tgetEffectiveScopingSuffixForTag,\n\tgetScopedVarName,\n};\n"]}
@@ -1,15 +1,3 @@
1
- import type UI5Element from "./UI5Element.js";
2
- declare abstract class ComponentFeature {
3
- constructor(...args: any[]);
4
- /**
5
- * @deprecated assign the feature's "i18nBundle" static member directly from the component that uses the feature
6
- */
7
- static define?: () => Promise<void>;
8
- static dependencies?: Array<typeof UI5Element>;
9
- }
10
1
  declare const registerFeature: (name: string, feature: object) => void;
11
2
  declare const getFeature: <T>(name: string) => T;
12
- declare const registerComponentFeature: (name: string, feature: typeof ComponentFeature) => Promise<void>;
13
- declare const getComponentFeature: <T>(name: string) => T;
14
- declare const subscribeForFeatureLoad: (name: string, klass: typeof UI5Element, callback: () => void) => void;
15
- export { registerFeature, getFeature, registerComponentFeature, getComponentFeature, subscribeForFeatureLoad, ComponentFeature, };
3
+ export { registerFeature, getFeature, };
@@ -1,45 +1,9 @@
1
- import EventProvider from "./EventProvider.js";
2
- class ComponentFeature {
3
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-empty-function
4
- constructor(...args) { }
5
- }
6
1
  const features = new Map();
7
- const componentFeatures = new Map();
8
- const subscribers = new Map();
9
- const EVENT_NAME = "componentFeatureLoad";
10
- const eventProvider = new EventProvider();
11
- const featureLoadEventName = (name) => `${EVENT_NAME}_${name}`;
12
2
  const registerFeature = (name, feature) => {
13
3
  features.set(name, feature);
14
4
  };
15
5
  const getFeature = (name) => {
16
6
  return features.get(name);
17
7
  };
18
- const registerComponentFeature = async (name, feature) => {
19
- await Promise.all(feature.dependencies?.map(dep => dep.define()) || []);
20
- await feature.define?.();
21
- componentFeatures.set(name, feature);
22
- notifyForFeatureLoad(name);
23
- };
24
- const getComponentFeature = (name) => {
25
- return componentFeatures.get(name);
26
- };
27
- const subscribeForFeatureLoad = (name, klass, callback) => {
28
- const subscriber = subscribers.get(klass);
29
- const isSubscribed = subscriber?.includes(name);
30
- if (isSubscribed) {
31
- return;
32
- }
33
- if (!subscriber) {
34
- subscribers.set(klass, [name]);
35
- }
36
- else {
37
- subscriber.push(name);
38
- }
39
- eventProvider.attachEvent(featureLoadEventName(name), callback);
40
- };
41
- const notifyForFeatureLoad = (name) => {
42
- eventProvider.fireEvent(featureLoadEventName(name), undefined);
43
- };
44
- export { registerFeature, getFeature, registerComponentFeature, getComponentFeature, subscribeForFeatureLoad, ComponentFeature, };
8
+ export { registerFeature, getFeature, };
45
9
  //# sourceMappingURL=FeaturesRegistry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeaturesRegistry.js","sourceRoot":"","sources":["../src/FeaturesRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAG/C,MAAe,gBAAgB;IAC9B,gFAAgF;IAChF,YAAY,GAAG,IAAW,IAAG,CAAC;CAO9B;AAED,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAe,CAAC;AACxC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAA4B,CAAC;AAC9D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAoC,CAAC;AAEhE,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,MAAM,aAAa,GAAG,IAAI,aAAa,EAAmB,CAAC;AAE3D,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,UAAU,IAAI,IAAI,EAAE,CAAC;AAEvE,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE;IACzD,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,C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AC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,OAAO,EACN,eAAe,EACf,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,GAChB,CAAC","sourcesContent":["import EventProvider from \"./EventProvider.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\nabstract class ComponentFeature {\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-empty-function\n\tconstructor(...args: any[]) {}\n\n\t/**\n\t * @deprecated assign the feature's \"i18nBundle\" static member directly from the component that uses the feature\n\t */\n\tstatic define?: () => Promise<void>;\n\tstatic dependencies?: Array<typeof UI5Element>\n}\n\nconst features = new Map<string, any>();\nconst componentFeatures = new Map<string, ComponentFeature>();\nconst subscribers = new Map<typeof UI5Element, Array<string>>();\n\nconst EVENT_NAME = \"componentFeatureLoad\";\nconst eventProvider = new EventProvider<undefined, void>();\n\nconst featureLoadEventName = (name: string) => `${EVENT_NAME}_${name}`;\n\nconst registerFeature = (name: string, feature: object) => {\n\tfeatures.set(name, feature);\n};\n\nconst getFeature = <T>(name: string): T => {\n\treturn features.get(name) as T;\n};\n\nconst registerComponentFeature = async (name: string, feature: typeof ComponentFeature) => {\n\tawait Promise.all(feature.dependencies?.map(dep => dep.define()) || []);\n\tawait feature.define?.();\n\n\tcomponentFeatures.set(name, feature);\n\tnotifyForFeatureLoad(name);\n};\n\nconst getComponentFeature = <T>(name: string): T => {\n\treturn componentFeatures.get(name) as T;\n};\n\nconst subscribeForFeatureLoad = (name: string, klass: typeof UI5Element, callback: () => void) => {\n\tconst subscriber = subscribers.get(klass);\n\tconst isSubscribed = subscriber?.includes(name);\n\n\tif (isSubscribed) {\n\t\treturn;\n\t}\n\n\tif (!subscriber) {\n\t\tsubscribers.set(klass, [name]);\n\t} else {\n\t\tsubscriber.push(name);\n\t}\n\n\teventProvider.attachEvent(featureLoadEventName(name), callback);\n};\n\nconst notifyForFeatureLoad = (name: string) => {\n\teventProvider.fireEvent(featureLoadEventName(name), undefined);\n};\n\nexport {\n\tregisterFeature,\n\tgetFeature,\n\tregisterComponentFeature,\n\tgetComponentFeature,\n\tsubscribeForFeatureLoad,\n\tComponentFeature,\n};\n"]}
1
+ {"version":3,"file":"FeaturesRegistry.js","sourceRoot":"","sources":["../src/FeaturesRegistry.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAe,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE;IACzD,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAI,IAAY,EAAK,EAAE;IACzC,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAM,CAAC;AAChC,CAAC,CAAC;AAEF,OAAO,EACN,eAAe,EACf,UAAU,GACV,CAAC","sourcesContent":["const features = new Map<string, any>();\n\nconst registerFeature = (name: string, feature: object) => {\n\tfeatures.set(name, feature);\n};\n\nconst getFeature = <T>(name: string): T => {\n\treturn features.get(name) as T;\n};\n\nexport {\n\tregisterFeature,\n\tgetFeature,\n};\n"]}
@@ -1,9 +1,7 @@
1
- import type { StyleData, StyleDataCSP } from "./types.js";
2
- declare const createStyle: (data: StyleData, name: string, value?: string, theme?: string) => void;
3
- declare const updateStyle: (data: StyleData, name: string, value?: string, theme?: string) => void;
1
+ declare const createStyle: (content: string, name: string, value?: string, theme?: string) => void;
2
+ declare const updateStyle: (content: string, name: string, value?: string, theme?: string) => void;
4
3
  declare const hasStyle: (name: string, value?: string) => boolean;
5
4
  declare const removeStyle: (name: string, value?: string) => void;
6
- declare const createOrUpdateStyle: (data: StyleData, name: string, value?: string, theme?: string) => void;
7
- declare const mergeStyles: (style1?: StyleData, style2?: StyleData) => StyleData | undefined;
5
+ declare const createOrUpdateStyle: (content: string, name: string, value?: string, theme?: string) => void;
6
+ declare const mergeStyles: (style1?: string, style2?: string) => string | undefined;
8
7
  export { createStyle, hasStyle, updateStyle, removeStyle, createOrUpdateStyle, mergeStyles, };
9
- export type { StyleData, StyleDataCSP, };
@@ -9,8 +9,7 @@ const shouldUpdate = (runtimeIndex) => {
9
9
  }
10
10
  return compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer
11
11
  };
12
- const createStyle = (data, name, value = "", theme) => {
13
- const content = typeof data === "string" ? data : data.content;
12
+ const createStyle = (content, name, value = "", theme) => {
14
13
  const currentRuntimeIndex = getCurrentRuntimeIndex();
15
14
  const stylesheet = new CSSStyleSheet();
16
15
  stylesheet.replaceSync(content);
@@ -21,8 +20,7 @@ const createStyle = (data, name, value = "", theme) => {
21
20
  }
22
21
  document.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];
23
22
  };
24
- const updateStyle = (data, name, value = "", theme) => {
25
- const content = typeof data === "string" ? data : data.content;
23
+ const updateStyle = (content, name, value = "", theme) => {
26
24
  const currentRuntimeIndex = getCurrentRuntimeIndex();
27
25
  const stylesheet = document.adoptedStyleSheets.find(sh => sh._ui5StyleId === getStyleId(name, value));
28
26
  if (!stylesheet) {
@@ -50,12 +48,12 @@ const hasStyle = (name, value = "") => {
50
48
  const removeStyle = (name, value = "") => {
51
49
  document.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => sh._ui5StyleId !== getStyleId(name, value));
52
50
  };
53
- const createOrUpdateStyle = (data, name, value = "", theme) => {
51
+ const createOrUpdateStyle = (content, name, value = "", theme) => {
54
52
  if (hasStyle(name, value)) {
55
- updateStyle(data, name, value, theme);
53
+ updateStyle(content, name, value, theme);
56
54
  }
57
55
  else {
58
- createStyle(data, name, value, theme);
56
+ createStyle(content, name, value, theme);
59
57
  }
60
58
  };
61
59
  const mergeStyles = (style1, style2) => {
@@ -65,15 +63,7 @@ const mergeStyles = (style1, style2) => {
65
63
  if (style2 === undefined) {
66
64
  return style1;
67
65
  }
68
- const style2Content = typeof style2 === "string" ? style2 : style2.content;
69
- if (typeof style1 === "string") {
70
- return `${style1} ${style2Content}`;
71
- }
72
- return {
73
- content: `${style1.content} ${style2Content}`,
74
- packageName: style1.packageName,
75
- fileName: style1.fileName,
76
- };
66
+ return `${style1} ${style2}`;
77
67
  };
78
68
  export { createStyle, hasStyle, updateStyle, removeStyle, createOrUpdateStyle, mergeStyles, };
79
69
  //# sourceMappingURL=ManagedStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ManagedStyles.js","sourceRoot":"","sources":["../src/ManagedStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAExE,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,WAAW,CAAC;AAE9C,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;IAClD,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,YAAgC,EAAE,EAAE;IACzD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,eAAe,CAAC,sBAAsB,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,2FAA2F;AAC5K,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,IAAe,EAAE,IAAY,EAAE,KAAK,GAAG,EAAE,EAAE,KAAc,EAAE,EAAE;IACjF,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IAC/D,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IAErD,MAAM,UAA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CAAC;IACf,CAAC;IACD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC;IACf,CAAC;IACD,MAAM,aAAa,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IAC3E,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IACrC,CAAC;IACD,OAAO;QACN,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,aAAa,EAAE;QAC7C,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;KACzB,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,QAAQ,EACR,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,WAAW,GACX,CAAC","sourcesContent":["import type { StyleData, StyleDataCSP } from \"./types.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"./Runtimes.js\";\n\nconst isSSR = typeof document === \"undefined\";\n\nconst getStyleId = (name: string, value: string) => {\n\treturn value ? `${name}|${value}` : name;\n};\n\nconst shouldUpdate = (runtimeIndex: string | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nconst createStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(content);\n\t(stylesheet as Record<string, any>)._ui5StyleId = getStyleId(name, value); // set an id so that we can find the style later\n\tif (theme) {\n\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = currentRuntimeIndex;\n\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t}\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst updateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tconst content = typeof data === \"string\" ? data : data.content;\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tconst stylesheet = document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\tif (!stylesheet) {\n\t\treturn;\n\t}\n\n\tif (!theme) {\n\t\tstylesheet.replaceSync(content || \"\");\n\t} else {\n\t\tconst stylesheetRuntimeIndex: string | undefined = (stylesheet as Record<string, any>)._ui5RuntimeIndex;\n\t\tconst stylesheetTheme: string | undefined = (stylesheet as Record<string, any>)._ui5Theme;\n\t\tif (stylesheetTheme !== theme || shouldUpdate(stylesheetRuntimeIndex)) {\n\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = String(currentRuntimeIndex);\n\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t}\n\t}\n};\n\nconst hasStyle = (name: string, value = \"\"): boolean => {\n\tif (isSSR) {\n\t\treturn true;\n\t}\n\n\treturn !!document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n};\n\nconst removeStyle = (name: string, value = \"\") => {\n\tdocument.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => (sh as Record<string, any>)._ui5StyleId !== getStyleId(name, value));\n};\n\nconst createOrUpdateStyle = (data: StyleData, name: string, value = \"\", theme?: string) => {\n\tif (hasStyle(name, value)) {\n\t\tupdateStyle(data, name, value, theme);\n\t} else {\n\t\tcreateStyle(data, name, value, theme);\n\t}\n};\n\nconst mergeStyles = (style1?: StyleData, style2?: StyleData) => {\n\tif (style1 === undefined) {\n\t\treturn style2;\n\t}\n\tif (style2 === undefined) {\n\t\treturn style1;\n\t}\n\tconst style2Content = typeof style2 === \"string\" ? style2 : style2.content;\n\tif (typeof style1 === \"string\") {\n\t\treturn `${style1} ${style2Content}`;\n\t}\n\treturn {\n\t\tcontent: `${style1.content} ${style2Content}`,\n\t\tpackageName: style1.packageName,\n\t\tfileName: style1.fileName,\n\t};\n};\n\nexport {\n\tcreateStyle,\n\thasStyle,\n\tupdateStyle,\n\tremoveStyle,\n\tcreateOrUpdateStyle,\n\tmergeStyles,\n};\n\nexport type {\n\tStyleData,\n\tStyleDataCSP,\n};\n"]}
1
+ {"version":3,"file":"ManagedStyles.js","sourceRoot":"","sources":["../src/ManagedStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAExE,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,WAAW,CAAC;AAE9C,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;IAClD,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,YAAgC,EAAE,EAAE;IACzD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,eAAe,CAAC,sBAAsB,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,2FAA2F;AAC5K,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,IAAY,EAAE,KAAK,GAAG,EAAE,EAAE,KAAc,EAAE,EAAE;IACjF,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IAErD,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,UAAkC,CAAC,WAAW,GAAG,UAAU,CAAC,IAAI,EAAE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ourcesContent":["import { getCurrentRuntimeIndex, compareRuntimes } from \"./Runtimes.js\";\n\nconst isSSR = typeof document === \"undefined\";\n\nconst getStyleId = (name: string, value: string) => {\n\treturn value ? `${name}|${value}` : name;\n};\n\nconst shouldUpdate = (runtimeIndex: string | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nconst createStyle = (content: string, name: string, value = \"\", theme?: string) => {\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(content);\n\t(stylesheet as Record<string, any>)._ui5StyleId = getStyleId(name, value); // set an id so that we can find the style later\n\tif (theme) {\n\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = currentRuntimeIndex;\n\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t}\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst updateStyle = (content: string, name: string, value = \"\", theme?: string) => {\n\tconst currentRuntimeIndex = getCurrentRuntimeIndex();\n\n\tconst stylesheet = document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n\tif (!stylesheet) {\n\t\treturn;\n\t}\n\n\tif (!theme) {\n\t\tstylesheet.replaceSync(content || \"\");\n\t} else {\n\t\tconst stylesheetRuntimeIndex: string | undefined = (stylesheet as Record<string, any>)._ui5RuntimeIndex;\n\t\tconst stylesheetTheme: string | undefined = (stylesheet as Record<string, any>)._ui5Theme;\n\t\tif (stylesheetTheme !== theme || shouldUpdate(stylesheetRuntimeIndex)) {\n\t\t\tstylesheet.replaceSync(content || \"\");\n\t\t\t(stylesheet as Record<string, any>)._ui5RuntimeIndex = String(currentRuntimeIndex);\n\t\t\t(stylesheet as Record<string, any>)._ui5Theme = theme;\n\t\t}\n\t}\n};\n\nconst hasStyle = (name: string, value = \"\"): boolean => {\n\tif (isSSR) {\n\t\treturn true;\n\t}\n\n\treturn !!document.adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === getStyleId(name, value));\n};\n\nconst removeStyle = (name: string, value = \"\") => {\n\tdocument.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => (sh as Record<string, any>)._ui5StyleId !== getStyleId(name, value));\n};\n\nconst createOrUpdateStyle = (content: string, name: string, value = \"\", theme?: string) => {\n\tif (hasStyle(name, value)) {\n\t\tupdateStyle(content, name, value, theme);\n\t} else {\n\t\tcreateStyle(content, name, value, theme);\n\t}\n};\n\nconst mergeStyles = (style1?: string, style2?: string) => {\n\tif (style1 === undefined) {\n\t\treturn style2;\n\t}\n\tif (style2 === undefined) {\n\t\treturn style1;\n\t}\n\treturn `${style1} ${style2}`;\n};\n\nexport {\n\tcreateStyle,\n\thasStyle,\n\tupdateStyle,\n\tremoveStyle,\n\tcreateOrUpdateStyle,\n\tmergeStyles,\n};\n"]}
@@ -5,6 +5,7 @@ import type { Slot, SlotValue, State, PropertyValue, Metadata } from "./UI5Eleme
5
5
  import EventProvider from "./EventProvider.js";
6
6
  import type { TemplateFunction } from "./renderer/executeTemplate.js";
7
7
  import type { AccessibilityInfo, PromiseResolve, ComponentStylesData, ClassMap } from "./types.js";
8
+ import type I18nBundle from "./i18nBundle.js";
8
9
  type Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => void;
9
10
  type ChangeInfo = {
10
11
  type: "property" | "slot";
@@ -26,7 +27,7 @@ type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y
26
27
  type IsAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
27
28
  type KebabToCamel<T extends string> = T extends `${infer H}-${infer J}${infer K}` ? `${Uncapitalize<H>}${Capitalize<J>}${KebabToCamel<K>}` : T;
28
29
  type KebabToPascal<T extends string> = Capitalize<KebabToCamel<T>>;
29
- type GlobalHTMLAttributeNames = "accesskey" | "autocapitalize" | "autofocus" | "autocomplete" | "contenteditable" | "contextmenu" | "class" | "dir" | "draggable" | "enterkeyhint" | "hidden" | "id" | "inputmode" | "lang" | "nonce" | "part" | "exportparts" | "pattern" | "slot" | "spellcheck" | "style" | "tabIndex" | "tabindex" | "title" | "translate" | "ref";
30
+ type GlobalHTMLAttributeNames = "accesskey" | "autocapitalize" | "autofocus" | "autocomplete" | "contenteditable" | "contextmenu" | "class" | "dir" | "draggable" | "enterkeyhint" | "hidden" | "id" | "inputmode" | "lang" | "nonce" | "part" | "exportparts" | "pattern" | "slot" | "spellcheck" | "style" | "tabIndex" | "tabindex" | "title" | "translate" | "ref" | "inert";
30
31
  type ElementProps<I> = Partial<Omit<I, keyof HTMLElement>>;
31
32
  type Convert<T> = {
32
33
  [Property in keyof T as `on${KebabToPascal<string & Property>}`]: IsAny<T[Property], any, (e: CustomEvent<T[Property]>) => void>;
@@ -327,6 +328,7 @@ declare abstract class UI5Element extends HTMLElement {
327
328
  * @default true
328
329
  */
329
330
  get isUI5Element(): boolean;
331
+ get isUI5AbstractElement(): boolean;
330
332
  get classes(): ClassMap;
331
333
  /**
332
334
  * Returns the component accessibility info.
@@ -364,9 +366,10 @@ declare abstract class UI5Element extends HTMLElement {
364
366
  static styles: ComponentStylesData;
365
367
  /**
366
368
  * Returns an array with the dependencies for this UI5 Web Component, which could be:
367
- * - composed components (used in its shadow root or static area item)
369
+ * - composed components (used in its shadow root)
368
370
  * - slotted components that the component may need to communicate with
369
371
  *
372
+ * @deprecated no longer necessary for jsxRenderer-enabled components
370
373
  * @protected
371
374
  */
372
375
  static get dependencies(): Array<typeof UI5Element>;
@@ -384,10 +387,12 @@ declare abstract class UI5Element extends HTMLElement {
384
387
  * @deprecated use the "i18n" decorator for fetching message bundles and the "cldr" option in the "customElements" decorator for fetching CLDR
385
388
  */
386
389
  static onDefine(): Promise<void>;
387
- static fetchI18nBundles(): Promise<import("./i18nBundle.js").default[]>;
390
+ static fetchI18nBundles(): Promise<I18nBundle[]>;
388
391
  static fetchCLDR(): Promise<void>;
389
392
  static asyncFinished: boolean;
390
393
  static definePromise: Promise<void> | undefined;
394
+ static i18nBundleStorage: Record<string, I18nBundle>;
395
+ static get i18nBundles(): Record<string, I18nBundle>;
391
396
  /**
392
397
  * Registers a UI5 Web Component in the browser window object
393
398
  * @public
@@ -19,7 +19,6 @@ import { markAsRtlAware } from "./locale/RTLAwareRegistry.js";
19
19
  import executeTemplate from "./renderer/executeTemplate.js";
20
20
  import { shouldScopeCustomElement } from "./CustomElementsScopeUtils.js";
21
21
  import { updateFormValue, setFormValue } from "./features/InputElementsFormSupport.js";
22
- import { getComponentFeature, subscribeForFeatureLoad } from "./FeaturesRegistry.js";
23
22
  import { getI18nBundle } from "./i18nBundle.js";
24
23
  import { fetchCldr } from "./asset-registries/LocaleData.js";
25
24
  import getLocale from "./locale/getLocale.js";
@@ -169,18 +168,6 @@ class UI5Element extends HTMLElement {
169
168
  * @private
170
169
  */
171
170
  async connectedCallback() {
172
- if (DEV_MODE) {
173
- const rootNode = this.getRootNode();
174
- // when an element is connected, check if it exists in the `dependencies` of the parent
175
- if (rootNode instanceof ShadowRoot && instanceOfUI5Element(rootNode.host)) {
176
- const klass = rootNode.host.constructor;
177
- const hasDependency = klass.tagsToScope.includes(this.constructor.getMetadata().getPureTag());
178
- if (!hasDependency) {
179
- // eslint-disable-next-line no-console
180
- console.error(`[UI5-FWK] ${this.constructor.getMetadata().getTag()} not found in dependencies of ${klass.getMetadata().getTag()}`);
181
- }
182
- }
183
- }
184
171
  if (DEV_MODE) {
185
172
  const props = this.constructor.getMetadata().getProperties();
186
173
  for (const [prop, propData] of Object.entries(props)) { // eslint-disable-line
@@ -676,7 +663,7 @@ class UI5Element extends HTMLElement {
676
663
  }
677
664
  */
678
665
  this._changedState = [];
679
- // Update shadow root and static area item
666
+ // Update shadow root
680
667
  if (ctor._needsShadowDOM()) {
681
668
  updateShadowRoot(this);
682
669
  }
@@ -875,6 +862,9 @@ class UI5Element extends HTMLElement {
875
862
  get isUI5Element() {
876
863
  return true;
877
864
  }
865
+ get isUI5AbstractElement() {
866
+ return !this.constructor._needsShadowDOM();
867
+ }
878
868
  get classes() {
879
869
  return {};
880
870
  }
@@ -1001,9 +991,10 @@ class UI5Element extends HTMLElement {
1001
991
  }
1002
992
  /**
1003
993
  * Returns an array with the dependencies for this UI5 Web Component, which could be:
1004
- * - composed components (used in its shadow root or static area item)
994
+ * - composed components (used in its shadow root)
1005
995
  * - slotted components that the component may need to communicate with
1006
996
  *
997
+ * @deprecated no longer necessary for jsxRenderer-enabled components
1007
998
  * @protected
1008
999
  */
1009
1000
  static get dependencies() {
@@ -1045,6 +1036,9 @@ class UI5Element extends HTMLElement {
1045
1036
  }
1046
1037
  return Promise.resolve();
1047
1038
  }
1039
+ static get i18nBundles() {
1040
+ return this.i18nBundleStorage;
1041
+ }
1048
1042
  /**
1049
1043
  * Registers a UI5 Web Component in the browser window object
1050
1044
  * @public
@@ -1060,20 +1054,12 @@ class UI5Element extends HTMLElement {
1060
1054
  const [i18nBundles] = result;
1061
1055
  Object.entries(this.getMetadata().getI18n()).forEach((pair, index) => {
1062
1056
  const propertyName = pair[0];
1063
- const targetClass = pair[1].target;
1064
- targetClass[propertyName] = i18nBundles[index];
1057
+ this.i18nBundleStorage[propertyName] = i18nBundles[index];
1065
1058
  });
1066
1059
  this.asyncFinished = true;
1067
1060
  };
1068
1061
  this.definePromise = defineSequence();
1069
1062
  const tag = this.getMetadata().getTag();
1070
- const features = this.getMetadata().getFeatures();
1071
- features.forEach(feature => {
1072
- if (getComponentFeature(feature)) {
1073
- this.cacheUniqueDependencies();
1074
- }
1075
- subscribeForFeatureLoad(feature, this, this.cacheUniqueDependencies.bind(this));
1076
- });
1077
1063
  const definedLocally = isTagRegistered(tag);
1078
1064
  const definedGlobally = customElements.get(tag);
1079
1065
  if (definedGlobally && !definedLocally) {
@@ -1120,6 +1106,7 @@ UI5Element.metadata = {};
1120
1106
  * @protected
1121
1107
  */
1122
1108
  UI5Element.styles = "";
1109
+ UI5Element.i18nBundleStorage = {};
1123
1110
  /**
1124
1111
  * Always use duck-typing to cover all runtimes on the page.
1125
1112
  */