@ui5/webcomponents-base 0.0.0-4e88b8243 → 0.0.0-50f1454ef

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 (462) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/cypress/specs/{Accessor.cy.ts → Accessor.cy.tsx} +4 -4
  3. package/cypress/specs/{ConfigurationScript.cy.ts → ConfigurationScript.cy.tsx} +21 -4
  4. package/cypress/specs/{ConfigurationURL.cy.ts → ConfigurationURL.cy.tsx} +27 -8
  5. package/cypress/specs/CustomMount.cy.tsx +9 -0
  6. package/cypress/specs/{CustomTheme.cy.ts → CustomTheme.cy.tsx} +2 -2
  7. package/cypress/specs/Events.cy.tsx +28 -0
  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/specs/i18n_texts.cy.tsx +129 -0
  18. package/cypress/specs/util/FocusableElements.cy.tsx +48 -0
  19. package/cypress/support/commands.ts +39 -0
  20. package/cypress/support/component-index.html +12 -0
  21. package/cypress/support/component.ts +17 -0
  22. package/cypress/tsconfig.json +2 -1
  23. package/cypress.config.js +1 -1
  24. package/dist/.tsbuildinfobuild +1 -1
  25. package/dist/CustomElementsRegistry.d.ts +2 -1
  26. package/dist/CustomElementsRegistry.js +4 -1
  27. package/dist/CustomElementsRegistry.js.map +1 -1
  28. package/dist/CustomElementsScopeUtils.d.ts +3 -1
  29. package/dist/CustomElementsScopeUtils.js +8 -1
  30. package/dist/CustomElementsScopeUtils.js.map +1 -1
  31. package/dist/FeaturesRegistry.d.ts +1 -16
  32. package/dist/FeaturesRegistry.js +1 -37
  33. package/dist/FeaturesRegistry.js.map +1 -1
  34. package/dist/UI5Element.d.ts +15 -4
  35. package/dist/UI5Element.js +25 -15
  36. package/dist/UI5Element.js.map +1 -1
  37. package/dist/UI5ElementMetadata.d.ts +0 -5
  38. package/dist/UI5ElementMetadata.js +0 -7
  39. package/dist/UI5ElementMetadata.js.map +1 -1
  40. package/dist/config/Theme.js +1 -2
  41. package/dist/config/Theme.js.map +1 -1
  42. package/dist/custom-elements-internal.json +2803 -0
  43. package/dist/custom-elements.json +2500 -0
  44. package/dist/decorators/customElement.d.ts +1 -0
  45. package/dist/decorators/customElement.js +1 -4
  46. package/dist/decorators/customElement.js.map +1 -1
  47. package/dist/decorators/i18n.js +6 -0
  48. package/dist/decorators/i18n.js.map +1 -1
  49. package/dist/features/F6Navigation.d.ts +1 -0
  50. package/dist/features/F6Navigation.js +21 -2
  51. package/dist/features/F6Navigation.js.map +1 -1
  52. package/dist/features/patchPopup.js +10 -1
  53. package/dist/features/patchPopup.js.map +1 -1
  54. package/dist/generated/AssetParameters.js +1 -1
  55. package/dist/generated/AssetParameters.js.map +1 -1
  56. package/dist/generated/VersionInfo.js +4 -4
  57. package/dist/generated/VersionInfo.js.map +1 -1
  58. package/dist/index.d.ts +43 -3
  59. package/dist/index.js +88 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/jsx-utils.js +11 -2
  62. package/dist/jsx-utils.js.map +1 -1
  63. package/dist/locale/nextFallbackLocale.js +6 -2
  64. package/dist/locale/nextFallbackLocale.js.map +1 -1
  65. package/dist/prod/AssetRegistry.js +2 -0
  66. package/dist/prod/AssetRegistry.js.map +7 -0
  67. package/dist/prod/Boot.js +2 -0
  68. package/dist/prod/Boot.js.map +7 -0
  69. package/dist/prod/CustomElementsRegistry.js +10 -0
  70. package/dist/prod/CustomElementsRegistry.js.map +7 -0
  71. package/dist/prod/CustomElementsScope.js +2 -0
  72. package/dist/prod/CustomElementsScope.js.map +7 -0
  73. package/dist/prod/CustomElementsScopeUtils.js +2 -0
  74. package/dist/prod/CustomElementsScopeUtils.js.map +7 -0
  75. package/dist/prod/DOMObserver.js +2 -0
  76. package/dist/prod/DOMObserver.js.map +7 -0
  77. package/dist/prod/Device.js +2 -0
  78. package/dist/prod/Device.js.map +7 -0
  79. package/dist/prod/EventProvider.js +2 -0
  80. package/dist/prod/EventProvider.js.map +7 -0
  81. package/dist/prod/FeaturesRegistry.js +2 -0
  82. package/dist/prod/FeaturesRegistry.js.map +7 -0
  83. package/dist/prod/FontFace.js +2 -0
  84. package/dist/prod/FontFace.js.map +7 -0
  85. package/dist/prod/IgnoreCustomElements.js +2 -0
  86. package/dist/prod/IgnoreCustomElements.js.map +7 -0
  87. package/dist/prod/InitialConfiguration.js +2 -0
  88. package/dist/prod/InitialConfiguration.js.map +7 -0
  89. package/dist/prod/Keys.js +2 -0
  90. package/dist/prod/Keys.js.map +7 -0
  91. package/dist/prod/Location.js +2 -0
  92. package/dist/prod/Location.js.map +7 -0
  93. package/dist/prod/ManagedStyles.js +2 -0
  94. package/dist/prod/ManagedStyles.js.map +7 -0
  95. package/dist/prod/MediaRange.js +2 -0
  96. package/dist/prod/MediaRange.js.map +7 -0
  97. package/dist/prod/PropertiesFileFormat.js +3 -0
  98. package/dist/prod/PropertiesFileFormat.js.map +7 -0
  99. package/dist/prod/Render.js +2 -0
  100. package/dist/prod/Render.js.map +7 -0
  101. package/dist/prod/RenderQueue.js +2 -0
  102. package/dist/prod/RenderQueue.js.map +7 -0
  103. package/dist/prod/Runtimes.js +2 -0
  104. package/dist/prod/Runtimes.js.map +7 -0
  105. package/dist/prod/SystemCSSVars.js +2 -0
  106. package/dist/prod/SystemCSSVars.js.map +7 -0
  107. package/dist/prod/Theming.js +2 -0
  108. package/dist/prod/Theming.js.map +7 -0
  109. package/dist/prod/UI5Element.js +2 -0
  110. package/dist/prod/UI5Element.js.map +7 -0
  111. package/dist/prod/UI5ElementMetadata.js +2 -0
  112. package/dist/prod/UI5ElementMetadata.js.map +7 -0
  113. package/dist/prod/animations/AnimationQueue.js +2 -0
  114. package/dist/prod/animations/AnimationQueue.js.map +7 -0
  115. package/dist/prod/animations/animate.js +2 -0
  116. package/dist/prod/animations/animate.js.map +7 -0
  117. package/dist/prod/animations/scroll.js +2 -0
  118. package/dist/prod/animations/scroll.js.map +7 -0
  119. package/dist/prod/animations/slideDown.js +2 -0
  120. package/dist/prod/animations/slideDown.js.map +7 -0
  121. package/dist/prod/animations/slideUp.js +2 -0
  122. package/dist/prod/animations/slideUp.js.map +7 -0
  123. package/dist/prod/asset-registries/Icons.js +2 -0
  124. package/dist/prod/asset-registries/Icons.js.map +7 -0
  125. package/dist/prod/asset-registries/Illustrations.js +2 -0
  126. package/dist/prod/asset-registries/Illustrations.js.map +7 -0
  127. package/dist/prod/asset-registries/LocaleData.js +2 -0
  128. package/dist/prod/asset-registries/LocaleData.js.map +7 -0
  129. package/dist/prod/asset-registries/Themes.js +2 -0
  130. package/dist/prod/asset-registries/Themes.js.map +7 -0
  131. package/dist/prod/asset-registries/i18n.js +2 -0
  132. package/dist/prod/asset-registries/i18n.js.map +7 -0
  133. package/dist/prod/asset-registries/util/IconCollectionsAlias.js +2 -0
  134. package/dist/prod/asset-registries/util/IconCollectionsAlias.js.map +7 -0
  135. package/dist/prod/asset-registries/util/IconCollectionsByTheme.js +2 -0
  136. package/dist/prod/asset-registries/util/IconCollectionsByTheme.js.map +7 -0
  137. package/dist/prod/asset-registries/util/getIconCollectionByTheme.js +2 -0
  138. package/dist/prod/asset-registries/util/getIconCollectionByTheme.js.map +7 -0
  139. package/dist/prod/config/AnimationMode.js +2 -0
  140. package/dist/prod/config/AnimationMode.js.map +7 -0
  141. package/dist/prod/config/CalendarType.js +2 -0
  142. package/dist/prod/config/CalendarType.js.map +7 -0
  143. package/dist/prod/config/ConfigurationReset.js +2 -0
  144. package/dist/prod/config/ConfigurationReset.js.map +7 -0
  145. package/dist/prod/config/Fonts.js +2 -0
  146. package/dist/prod/config/Fonts.js.map +7 -0
  147. package/dist/prod/config/FormatSettings.js +2 -0
  148. package/dist/prod/config/FormatSettings.js.map +7 -0
  149. package/dist/prod/config/Icons.js +2 -0
  150. package/dist/prod/config/Icons.js.map +7 -0
  151. package/dist/prod/config/Language.js +2 -0
  152. package/dist/prod/config/Language.js.map +7 -0
  153. package/dist/prod/config/NoConflict.js +2 -0
  154. package/dist/prod/config/NoConflict.js.map +7 -0
  155. package/dist/prod/config/Theme.js +2 -0
  156. package/dist/prod/config/Theme.js.map +7 -0
  157. package/dist/prod/config/ThemeRoot.js +2 -0
  158. package/dist/prod/config/ThemeRoot.js.map +7 -0
  159. package/dist/prod/config/Timezone.js +2 -0
  160. package/dist/prod/config/Timezone.js.map +7 -0
  161. package/dist/prod/config/Tooltips.js +2 -0
  162. package/dist/prod/config/Tooltips.js.map +7 -0
  163. package/dist/prod/connectToComponent.js +2 -0
  164. package/dist/prod/connectToComponent.js.map +7 -0
  165. package/dist/prod/converters/DOMReference.js +2 -0
  166. package/dist/prod/converters/DOMReference.js.map +7 -0
  167. package/dist/prod/decorators/bound.js +2 -0
  168. package/dist/prod/decorators/bound.js.map +7 -0
  169. package/dist/prod/decorators/customElement.js +2 -0
  170. package/dist/prod/decorators/customElement.js.map +7 -0
  171. package/dist/prod/decorators/event-strict.js +2 -0
  172. package/dist/prod/decorators/event-strict.js.map +7 -0
  173. package/dist/prod/decorators/event.js +2 -0
  174. package/dist/prod/decorators/event.js.map +7 -0
  175. package/dist/prod/decorators/i18n.js +2 -0
  176. package/dist/prod/decorators/i18n.js.map +7 -0
  177. package/dist/prod/decorators/property.js +2 -0
  178. package/dist/prod/decorators/property.js.map +7 -0
  179. package/dist/prod/decorators/query.js +2 -0
  180. package/dist/prod/decorators/query.js.map +7 -0
  181. package/dist/prod/decorators/queryAll.js +2 -0
  182. package/dist/prod/decorators/queryAll.js.map +7 -0
  183. package/dist/prod/decorators/slot.js +2 -0
  184. package/dist/prod/decorators/slot.js.map +7 -0
  185. package/dist/prod/decorators.js +2 -0
  186. package/dist/prod/decorators.js.map +7 -0
  187. package/dist/prod/delegate/ItemNavigation.js +2 -0
  188. package/dist/prod/delegate/ItemNavigation.js.map +7 -0
  189. package/dist/prod/delegate/ResizeHandler.js +2 -0
  190. package/dist/prod/delegate/ResizeHandler.js.map +7 -0
  191. package/dist/prod/delegate/ScrollEnablement.js +2 -0
  192. package/dist/prod/delegate/ScrollEnablement.js.map +7 -0
  193. package/dist/prod/features/F6Navigation.js +2 -0
  194. package/dist/prod/features/F6Navigation.js.map +7 -0
  195. package/dist/prod/features/InputElementsFormSupport.js +2 -0
  196. package/dist/prod/features/InputElementsFormSupport.js.map +7 -0
  197. package/dist/prod/features/LegacyDateFormats.js +2 -0
  198. package/dist/prod/features/LegacyDateFormats.js.map +7 -0
  199. package/dist/prod/features/OpenUI5Element.js +2 -0
  200. package/dist/prod/features/OpenUI5Element.js.map +7 -0
  201. package/dist/prod/features/OpenUI5Enablement.js +21 -0
  202. package/dist/prod/features/OpenUI5Enablement.js.map +7 -0
  203. package/dist/prod/features/OpenUI5Support.js +2 -0
  204. package/dist/prod/features/OpenUI5Support.js.map +7 -0
  205. package/dist/prod/features/patchPatcher.js +2 -0
  206. package/dist/prod/features/patchPatcher.js.map +7 -0
  207. package/dist/prod/features/patchPopup.js +2 -0
  208. package/dist/prod/features/patchPopup.js.map +7 -0
  209. package/dist/prod/generated/AssetParameters.js +2 -0
  210. package/dist/prod/generated/AssetParameters.js.map +7 -0
  211. package/dist/prod/generated/VersionInfo.js +2 -0
  212. package/dist/prod/generated/VersionInfo.js.map +7 -0
  213. package/dist/prod/generated/css/BusyIndicator.css.js +2 -0
  214. package/dist/prod/generated/css/BusyIndicator.css.js.map +7 -0
  215. package/dist/prod/generated/css/FontFace.css.js +2 -0
  216. package/dist/prod/generated/css/FontFace.css.js.map +7 -0
  217. package/dist/prod/generated/css/OverrideFontFace.css.js +2 -0
  218. package/dist/prod/generated/css/OverrideFontFace.css.js.map +7 -0
  219. package/dist/prod/generated/css/SystemCSSVars.css.js +2 -0
  220. package/dist/prod/generated/css/SystemCSSVars.css.js.map +7 -0
  221. package/dist/prod/getSharedResource.js +2 -0
  222. package/dist/prod/getSharedResource.js.map +7 -0
  223. package/dist/prod/global.d.js +2 -0
  224. package/dist/prod/global.d.js.map +7 -0
  225. package/dist/prod/i18nBundle.js +2 -0
  226. package/dist/prod/i18nBundle.js.map +7 -0
  227. package/dist/prod/index.js +2 -0
  228. package/dist/prod/index.js.map +7 -0
  229. package/dist/prod/jsx-dev-runtime.js +2 -0
  230. package/dist/prod/jsx-dev-runtime.js.map +7 -0
  231. package/dist/prod/jsx-runtime.js +2 -0
  232. package/dist/prod/jsx-runtime.js.map +7 -0
  233. package/dist/prod/jsx-utils.js +2 -0
  234. package/dist/prod/jsx-utils.js.map +7 -0
  235. package/dist/prod/locale/Locale.js +2 -0
  236. package/dist/prod/locale/Locale.js.map +7 -0
  237. package/dist/prod/locale/RTLAwareRegistry.js +2 -0
  238. package/dist/prod/locale/RTLAwareRegistry.js.map +7 -0
  239. package/dist/prod/locale/applyDirection.js +2 -0
  240. package/dist/prod/locale/applyDirection.js.map +7 -0
  241. package/dist/prod/locale/directionChange.js +2 -0
  242. package/dist/prod/locale/directionChange.js.map +7 -0
  243. package/dist/prod/locale/getEffectiveDir.js +2 -0
  244. package/dist/prod/locale/getEffectiveDir.js.map +7 -0
  245. package/dist/prod/locale/getLocale.js +2 -0
  246. package/dist/prod/locale/getLocale.js.map +7 -0
  247. package/dist/prod/locale/languageChange.js +2 -0
  248. package/dist/prod/locale/languageChange.js.map +7 -0
  249. package/dist/prod/locale/nextFallbackLocale.js +2 -0
  250. package/dist/prod/locale/nextFallbackLocale.js.map +7 -0
  251. package/dist/prod/locale/normalizeLocale.js +2 -0
  252. package/dist/prod/locale/normalizeLocale.js.map +7 -0
  253. package/dist/prod/renderer/JsxRenderer.js +2 -0
  254. package/dist/prod/renderer/JsxRenderer.js.map +7 -0
  255. package/dist/prod/renderer/LitRenderer.js +2 -0
  256. package/dist/prod/renderer/LitRenderer.js.map +7 -0
  257. package/dist/prod/renderer/directives/style-map.js +6 -0
  258. package/dist/prod/renderer/directives/style-map.js.map +7 -0
  259. package/dist/prod/renderer/executeTemplate.js +2 -0
  260. package/dist/prod/renderer/executeTemplate.js.map +7 -0
  261. package/dist/prod/sap/base/Log.js +750 -0
  262. package/dist/prod/sap/base/assert.js +34 -0
  263. package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +20 -0
  264. package/dist/prod/sap/base/security/URLListValidator.js +406 -0
  265. package/dist/prod/sap/base/security/encodeCSS.js +40 -0
  266. package/dist/prod/sap/base/security/encodeXML.js +53 -0
  267. package/dist/prod/sap/base/security/sanitizeHTML.js +38 -0
  268. package/dist/prod/sap/base/strings/toHex.js +33 -0
  269. package/dist/prod/sap/base/util/now.js +28 -0
  270. package/dist/prod/sap/base/util/uid.js +27 -0
  271. package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +3600 -0
  272. package/dist/prod/ssr-dom-shim.js +2 -0
  273. package/dist/prod/ssr-dom-shim.js.map +7 -0
  274. package/dist/prod/ssr-dom.js +2 -0
  275. package/dist/prod/ssr-dom.js.map +7 -0
  276. package/dist/prod/theming/CustomStyle.js +2 -0
  277. package/dist/prod/theming/CustomStyle.js.map +7 -0
  278. package/dist/prod/theming/ThemeLoaded.js +2 -0
  279. package/dist/prod/theming/ThemeLoaded.js.map +7 -0
  280. package/dist/prod/theming/ThemeRegistered.js +2 -0
  281. package/dist/prod/theming/ThemeRegistered.js.map +7 -0
  282. package/dist/prod/theming/applyTheme.js +2 -0
  283. package/dist/prod/theming/applyTheme.js.map +7 -0
  284. package/dist/prod/theming/getConstructableStyle.js +2 -0
  285. package/dist/prod/theming/getConstructableStyle.js.map +7 -0
  286. package/dist/prod/theming/getEffectiveStyle.js +2 -0
  287. package/dist/prod/theming/getEffectiveStyle.js.map +7 -0
  288. package/dist/prod/theming/getStylesString.js +2 -0
  289. package/dist/prod/theming/getStylesString.js.map +7 -0
  290. package/dist/prod/theming/getThemeDesignerTheme.js +2 -0
  291. package/dist/prod/theming/getThemeDesignerTheme.js.map +7 -0
  292. package/dist/prod/thirdparty/_merge.js +2 -0
  293. package/dist/prod/thirdparty/_merge.js.map +7 -0
  294. package/dist/prod/thirdparty/isPlainObject.js +2 -0
  295. package/dist/prod/thirdparty/isPlainObject.js.map +7 -0
  296. package/dist/prod/thirdparty/merge.js +2 -0
  297. package/dist/prod/thirdparty/merge.js.map +7 -0
  298. package/dist/prod/thirdparty/preact/jsx.d.js +2 -0
  299. package/dist/prod/thirdparty/preact/jsx.d.js.map +7 -0
  300. package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js +2 -0
  301. package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js.map +7 -0
  302. package/dist/prod/thirdparty/preact/jsxRuntime.module.js +1 -0
  303. package/dist/prod/thirdparty/preact/preact.module.d.js +2 -0
  304. package/dist/prod/thirdparty/preact/preact.module.d.js.map +7 -0
  305. package/dist/prod/thirdparty/preact/preact.module.js +1 -0
  306. package/dist/prod/types/AnimationMode.js +2 -0
  307. package/dist/prod/types/AnimationMode.js.map +7 -0
  308. package/dist/prod/types/CalendarType.js +2 -0
  309. package/dist/prod/types/CalendarType.js.map +7 -0
  310. package/dist/prod/types/InvisibleMessageMode.js +2 -0
  311. package/dist/prod/types/InvisibleMessageMode.js.map +7 -0
  312. package/dist/prod/types/ItemNavigationBehavior.js +2 -0
  313. package/dist/prod/types/ItemNavigationBehavior.js.map +7 -0
  314. package/dist/prod/types/MovePlacement.js +2 -0
  315. package/dist/prod/types/MovePlacement.js.map +7 -0
  316. package/dist/prod/types/NavigationMode.js +2 -0
  317. package/dist/prod/types/NavigationMode.js.map +7 -0
  318. package/dist/prod/types/Orientation.js +2 -0
  319. package/dist/prod/types/Orientation.js.map +7 -0
  320. package/dist/prod/types/SortOrder.js +2 -0
  321. package/dist/prod/types/SortOrder.js.map +7 -0
  322. package/dist/prod/types/ValueState.js +2 -0
  323. package/dist/prod/types/ValueState.js.map +7 -0
  324. package/dist/prod/types.js +2 -0
  325. package/dist/prod/types.js.map +7 -0
  326. package/dist/prod/updateShadowRoot.js +2 -0
  327. package/dist/prod/updateShadowRoot.js.map +7 -0
  328. package/dist/prod/util/AccessibilityTextsHelper.js +2 -0
  329. package/dist/prod/util/AccessibilityTextsHelper.js.map +7 -0
  330. package/dist/prod/util/Caret.js +2 -0
  331. package/dist/prod/util/Caret.js.map +7 -0
  332. package/dist/prod/util/ColorConversion.js +2 -0
  333. package/dist/prod/util/ColorConversion.js.map +7 -0
  334. package/dist/prod/util/FetchHelper.js +2 -0
  335. package/dist/prod/util/FetchHelper.js.map +7 -0
  336. package/dist/prod/util/FocusableElements.js +2 -0
  337. package/dist/prod/util/FocusableElements.js.map +7 -0
  338. package/dist/prod/util/HTMLSanitizer.js +2 -0
  339. package/dist/prod/util/HTMLSanitizer.js.map +7 -0
  340. package/dist/prod/util/InvisibleMessage.js +2 -0
  341. package/dist/prod/util/InvisibleMessage.js.map +7 -0
  342. package/dist/prod/util/PopupUtils.js +2 -0
  343. package/dist/prod/util/PopupUtils.js.map +7 -0
  344. package/dist/prod/util/SelectionAssistant.js +2 -0
  345. package/dist/prod/util/SelectionAssistant.js.map +7 -0
  346. package/dist/prod/util/SlotsHelper.js +2 -0
  347. package/dist/prod/util/SlotsHelper.js.map +7 -0
  348. package/dist/prod/util/StringHelper.js +2 -0
  349. package/dist/prod/util/StringHelper.js.map +7 -0
  350. package/dist/prod/util/TabbableElements.js +2 -0
  351. package/dist/prod/util/TabbableElements.js.map +7 -0
  352. package/dist/prod/util/arraysAreEqual.js +2 -0
  353. package/dist/prod/util/arraysAreEqual.js.map +7 -0
  354. package/dist/prod/util/clamp.js +2 -0
  355. package/dist/prod/util/clamp.js.map +7 -0
  356. package/dist/prod/util/createLinkInHead.js +2 -0
  357. package/dist/prod/util/createLinkInHead.js.map +7 -0
  358. package/dist/prod/util/debounce.js +2 -0
  359. package/dist/prod/util/debounce.js.map +7 -0
  360. package/dist/prod/util/detectNavigatorLanguage.js +2 -0
  361. package/dist/prod/util/detectNavigatorLanguage.js.map +7 -0
  362. package/dist/prod/util/dragAndDrop/DragRegistry.js +2 -0
  363. package/dist/prod/util/dragAndDrop/DragRegistry.js.map +7 -0
  364. package/dist/prod/util/dragAndDrop/findClosestPosition.js +2 -0
  365. package/dist/prod/util/dragAndDrop/findClosestPosition.js.map +7 -0
  366. package/dist/prod/util/dragAndDrop/handleDragOver.js +2 -0
  367. package/dist/prod/util/dragAndDrop/handleDragOver.js.map +7 -0
  368. package/dist/prod/util/dragAndDrop/handleDrop.js +2 -0
  369. package/dist/prod/util/dragAndDrop/handleDrop.js.map +7 -0
  370. package/dist/prod/util/dragAndDrop/longDragOverHandler.js +2 -0
  371. package/dist/prod/util/dragAndDrop/longDragOverHandler.js.map +7 -0
  372. package/dist/prod/util/escapeRegex.js +2 -0
  373. package/dist/prod/util/escapeRegex.js.map +7 -0
  374. package/dist/prod/util/fixSafariActiveState.js +2 -0
  375. package/dist/prod/util/fixSafariActiveState.js.map +7 -0
  376. package/dist/prod/util/formatMessage.js +2 -0
  377. package/dist/prod/util/formatMessage.js.map +7 -0
  378. package/dist/prod/util/generateHighlightedMarkup.js +2 -0
  379. package/dist/prod/util/generateHighlightedMarkup.js.map +7 -0
  380. package/dist/prod/util/getActiveElement.js +2 -0
  381. package/dist/prod/util/getActiveElement.js.map +7 -0
  382. package/dist/prod/util/getClassCopy.js +2 -0
  383. package/dist/prod/util/getClassCopy.js.map +7 -0
  384. package/dist/prod/util/getDesigntimePropertyAsArray.js +2 -0
  385. package/dist/prod/util/getDesigntimePropertyAsArray.js.map +7 -0
  386. package/dist/prod/util/getEffectiveContentDensity.js +2 -0
  387. package/dist/prod/util/getEffectiveContentDensity.js.map +7 -0
  388. package/dist/prod/util/getEffectiveScrollbarStyle.js +28 -0
  389. package/dist/prod/util/getEffectiveScrollbarStyle.js.map +7 -0
  390. package/dist/prod/util/getFastNavigationGroups.js +2 -0
  391. package/dist/prod/util/getFastNavigationGroups.js.map +7 -0
  392. package/dist/prod/util/getFileExtension.js +2 -0
  393. package/dist/prod/util/getFileExtension.js.map +7 -0
  394. package/dist/prod/util/getNormalizedTarget.js +2 -0
  395. package/dist/prod/util/getNormalizedTarget.js.map +7 -0
  396. package/dist/prod/util/getSingletonElementInstance.js +2 -0
  397. package/dist/prod/util/getSingletonElementInstance.js.map +7 -0
  398. package/dist/prod/util/hash2str.js +2 -0
  399. package/dist/prod/util/hash2str.js.map +7 -0
  400. package/dist/prod/util/isElementClickable.js +2 -0
  401. package/dist/prod/util/isElementClickable.js.map +7 -0
  402. package/dist/prod/util/isElementHidden.js +2 -0
  403. package/dist/prod/util/isElementHidden.js.map +7 -0
  404. package/dist/prod/util/isElementInView.js +2 -0
  405. package/dist/prod/util/isElementInView.js.map +7 -0
  406. package/dist/prod/util/isElementTabbable.js +2 -0
  407. package/dist/prod/util/isElementTabbable.js.map +7 -0
  408. package/dist/prod/util/isValidPropertyName.js +2 -0
  409. package/dist/prod/util/isValidPropertyName.js.map +7 -0
  410. package/dist/prod/util/throttle.js +2 -0
  411. package/dist/prod/util/throttle.js.map +7 -0
  412. package/dist/prod/util/toLowercaseEnumValue.js +2 -0
  413. package/dist/prod/util/toLowercaseEnumValue.js.map +7 -0
  414. package/dist/prod/util/whenDOMReady.js +2 -0
  415. package/dist/prod/util/whenDOMReady.js.map +7 -0
  416. package/dist/prod/util/willShowContent.js +2 -0
  417. package/dist/prod/util/willShowContent.js.map +7 -0
  418. package/dist/prod/validateThemeRoot.js +2 -0
  419. package/dist/prod/validateThemeRoot.js.map +7 -0
  420. package/dist/renderer/JsxRenderer.js +12 -2
  421. package/dist/renderer/JsxRenderer.js.map +1 -1
  422. package/dist/ssr-dom-shim.js +51 -1
  423. package/dist/ssr-dom-shim.js.map +1 -1
  424. package/dist/thirdparty/preact/jsx.d.ts +1 -1
  425. package/dist/thirdparty/preact/jsxRuntime.module.d.ts +3 -3
  426. package/dist/thirdparty/preact/jsxRuntime.module.js +0 -1
  427. package/dist/thirdparty/preact/preact.module.js +1 -2
  428. package/dist/types/SortOrder.d.ts +24 -0
  429. package/dist/types/SortOrder.js +26 -0
  430. package/dist/types/SortOrder.js.map +1 -0
  431. package/dist/util/ColorConversion.js +24 -22
  432. package/dist/util/ColorConversion.js.map +1 -1
  433. package/dist/util/FocusableElements.js +28 -2
  434. package/dist/util/FocusableElements.js.map +1 -1
  435. package/dist/util/HTMLSanitizer.d.ts +2 -0
  436. package/dist/util/HTMLSanitizer.js +2 -2
  437. package/dist/util/HTMLSanitizer.js.map +1 -1
  438. package/dist/util/dragAndDrop/findClosestPosition.d.ts +2 -1
  439. package/dist/util/dragAndDrop/findClosestPosition.js +45 -41
  440. package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -1
  441. package/dist/util/getClassCopy.d.ts +4 -0
  442. package/dist/util/getEffectiveScrollbarStyle.d.ts +1 -1
  443. package/dist/util/getEffectiveScrollbarStyle.js +3 -1
  444. package/dist/util/getEffectiveScrollbarStyle.js.map +1 -1
  445. package/dist/util/getFastNavigationGroups.js +6 -1
  446. package/dist/util/getFastNavigationGroups.js.map +1 -1
  447. package/dist/util/throttle.d.ts +2 -0
  448. package/dist/util/throttle.js +20 -0
  449. package/dist/util/throttle.js.map +1 -0
  450. package/dist/vscode.html-custom-data.json +22 -0
  451. package/package-scripts.cjs +4 -4
  452. package/package.json +12 -7
  453. package/src/thirdparty/preact/jsxRuntime.module.js +0 -1
  454. package/src/thirdparty/preact/preact.module.js +1 -2
  455. package/tsconfig.json +0 -1
  456. package/cypress/specs/CustomMount.cy.ts +0 -34
  457. package/index.js +0 -208
  458. /package/cypress/specs/{Boot.cy.ts → Boot.cy.tsx} +0 -0
  459. /package/cypress/specs/{ConfigurationChange.cy.ts → ConfigurationChange.cy.tsx} +0 -0
  460. /package/cypress/specs/{EventProvider.cy.ts → EventProvider.cy.tsx} +0 -0
  461. /package/cypress/specs/{SystemDOMElements.cy.ts → SystemDOMElements.cy.tsx} +0 -0
  462. /package/cypress/specs/{Theming.cy.ts → Theming.cy.tsx} +0 -0
@@ -56,6 +56,7 @@ declare const customElement: (tagNameOrComponentSettings?: string | {
56
56
  shadowRootOptions?: Partial<ShadowRootInit>;
57
57
  /**
58
58
  * A list of all features, supported by the custom element.
59
+ * @deprecated no longer necessary for jsxRenderer-enabled components
59
60
  */
60
61
  features?: Array<string>;
61
62
  }) => ClassDecorator;
@@ -13,7 +13,7 @@ const customElement = (tagNameOrComponentSettings = {}) => {
13
13
  target.metadata.tag = tagNameOrComponentSettings;
14
14
  return;
15
15
  }
16
- const { tag, languageAware, themeAware, cldr, fastNavigation, formAssociated, shadowRootOptions, features, } = tagNameOrComponentSettings;
16
+ const { tag, languageAware, themeAware, cldr, fastNavigation, formAssociated, shadowRootOptions, } = tagNameOrComponentSettings;
17
17
  target.metadata.tag = tag;
18
18
  if (languageAware) {
19
19
  target.metadata.languageAware = languageAware;
@@ -21,9 +21,6 @@ const customElement = (tagNameOrComponentSettings = {}) => {
21
21
  if (cldr) {
22
22
  target.metadata.cldr = cldr;
23
23
  }
24
- if (features) {
25
- target.metadata.features = features;
26
- }
27
24
  if (themeAware) {
28
25
  target.metadata.themeAware = themeAware;
29
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MA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AAC;QACvD,CAAC;QAED,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,mBAA2B,EAAE,EAAE;YAC1F,MAAM,wBAAwB,GAAG,0BAA0B,CAAC,mBAAuC,CAAC,CAAC;YAErG,wBAAwB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE;gBAC9E,GAAG,EAAE,GAAG,EAAE,CAAC,0BAA0B,CAAC,mBAAuC,CAAC;aAC9E,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\t/**\n\t * The tag name of the custom element (will be suffixed if the scoping feature is used).\n\t */\n\ttag?: string,\n\t/**\n\t * The renderer of the custom element - officially supported are: jsxRenderer and litRender (deprecated).\n\t */\n\trenderer?: Renderer,\n\t/**\n\t * The styles to be injected into the shadow root of the custom element.\n\t */\n\tstyles?: Styles,\n\t/**\n\t * The template function of the custom element - must match the renderer.\n\t */\n\ttemplate?: Template,\n\t/**\n\t * Other custom elements used in the shadow root of the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tdependencies?: Array<typeof UI5Element>,\n\t/**\n\t * Whether the custom element should be re-rendered when the language changes.\n\t */\n\tlanguageAware?: boolean,\n\t/**\n\t * Whether the custom element should be re-rendered when the theme changes.\n\t */\n\tthemeAware?: boolean,\n\t/**\n\t * Whether the custom element needs the CLDR assets.\n\t */\n\tcldr?: boolean,\n\t/**\n\t * Whether the custom element supports the F6 Fast navigation feature (is a fast-navigation group).\n\t */\n\tfastNavigation?: boolean,\n\t/**\n\t * Whether the custom element is form-associated and implements form-relevant features.\n\t */\n\tformAssociated?: boolean,\n\t/**\n\t * The shadow root options of the custom element.\n\t */\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n\t/**\n\t * A list of all features, supported by the custom element.\n\t */\n\tfeatures?: Array<string>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tcldr,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t\tfeatures,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (cldr) {\n\t\t\ttarget.metadata.cldr = cldr;\n\t\t}\n\n\t\tif (features) {\n\t\t\ttarget.metadata.features = features;\n\t\t}\n\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\t\tif (formAssociated) {\n\t\t\ttarget.metadata.formAssociated = formAssociated;\n\t\t}\n\n\t\tif (shadowRootOptions) {\n\t\t\ttarget.metadata.shadowRootOptions = shadowRootOptions;\n\t\t}\n\n\t\t[\"renderer\", \"template\", \"styles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => tagNameOrComponentSettings[customElementEntity as keyof typeof tag],\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"]}
1
+ {"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,6BAmDnB,EAAE,EAAkB,EAAE;IACzB,OAAO,CAAC,MAAW,EAAE,EAAE;QACtB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;YAC/D,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;QACtB,CAAC;QAED,IAAI,OAAO,0BAA0B,KAAK,QAAQ,EAAE,CAAC;YACpD,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,0BAA0B,CAAC;YACjD,OAAO;QACR,CAAC;QAED,MAAM,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,IAAI,EACJ,cAAc,EACd,cAAc,EACd,iBAAiB,GAChB,GAAG,0BAA0B,CAAC;QAEhC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;QAC1B,IAAI,aAAa,EAAE,CAAC;YACnB,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;QAC/C,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;QAC7B,CAAC;QAED,IAAI,UAAU,EAAE,CAAC;YAChB,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;QACzC,CAAC;QACD,IAAI,cAAc,EAAE,CAAC;YACpB,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;QACjD,CAAC;QACD,IAAI,cAAc,EAAE,CAAC;YACpB,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;QACjD,CAAC;QAED,IAAI,iBAAiB,EAAE,CAAC;YACvB,MAAM,CAAC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACvD,CAAC;QAED,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,mBAA2B,EAAE,EAAE;YAC1F,MAAM,wBAAwB,GAAG,0BAA0B,CAAC,mBAAuC,CAAC,CAAC;YAErG,wBAAwB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE;gBAC9E,GAAG,EAAE,GAAG,EAAE,CAAC,0BAA0B,CAAC,mBAAuC,CAAC;aAC9E,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\t/**\n\t * The tag name of the custom element (will be suffixed if the scoping feature is used).\n\t */\n\ttag?: string,\n\t/**\n\t * The renderer of the custom element - officially supported are: jsxRenderer and litRender (deprecated).\n\t */\n\trenderer?: Renderer,\n\t/**\n\t * The styles to be injected into the shadow root of the custom element.\n\t */\n\tstyles?: Styles,\n\t/**\n\t * The template function of the custom element - must match the renderer.\n\t */\n\ttemplate?: Template,\n\t/**\n\t * Other custom elements used in the shadow root of the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tdependencies?: Array<typeof UI5Element>,\n\t/**\n\t * Whether the custom element should be re-rendered when the language changes.\n\t */\n\tlanguageAware?: boolean,\n\t/**\n\t * Whether the custom element should be re-rendered when the theme changes.\n\t */\n\tthemeAware?: boolean,\n\t/**\n\t * Whether the custom element needs the CLDR assets.\n\t */\n\tcldr?: boolean,\n\t/**\n\t * Whether the custom element supports the F6 Fast navigation feature (is a fast-navigation group).\n\t */\n\tfastNavigation?: boolean,\n\t/**\n\t * Whether the custom element is form-associated and implements form-relevant features.\n\t */\n\tformAssociated?: boolean,\n\t/**\n\t * The shadow root options of the custom element.\n\t */\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n\t/**\n\t * A list of all features, supported by the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tfeatures?: Array<string>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tcldr,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (cldr) {\n\t\t\ttarget.metadata.cldr = cldr;\n\t\t}\n\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\t\tif (formAssociated) {\n\t\t\ttarget.metadata.formAssociated = formAssociated;\n\t\t}\n\n\t\tif (shadowRootOptions) {\n\t\t\ttarget.metadata.shadowRootOptions = shadowRootOptions;\n\t\t}\n\n\t\t[\"renderer\", \"template\", \"styles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => tagNameOrComponentSettings[customElementEntity as keyof typeof tag],\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"]}
@@ -16,6 +16,12 @@ const i18n = (bundleName) => {
16
16
  if (!target.metadata.i18n) {
17
17
  target.metadata.i18n = {};
18
18
  }
19
+ Object.defineProperty(target, propertyName, {
20
+ get() {
21
+ return target.i18nBundles[bundleName];
22
+ },
23
+ set() { },
24
+ });
19
25
  target.metadata.i18n[propertyName] = {
20
26
  bundleName,
21
27
  target,
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/decorators/i18n.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,MAAM,IAAI,GAAG,CAAC,UAAkB,EAAiB,EAAE;IAClD,OAAO,CAAC,MAAyB,EAAE,YAAoB,EAAE,EAAE;QAC1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC;QAC3B,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG;YACpC,UAAU;YACV,MAAM;SACN,CAAC;IACH,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\ntype i18nDecorator = (target: typeof UI5Element, propertyName: string) => void;\n\n/**\n * A decorator that converts a static class member into an accessor for the i18n bundle with a specified name\n *\n * @param { string } bundleName name of the i18n bundle to load\n * @returns { i18nDecorator }\n *\n * ```ts\n * class MyComponnet extends UI5Element {\n * @i18n('@ui5/webcomponents')\n * i18nBundle: I18nBundle;\n * }\n * ```\n */\nconst i18n = (bundleName: string): i18nDecorator => {\n\treturn (target: typeof UI5Element, propertyName: string) => {\n\t\tif (!target.metadata.i18n) {\n\t\t\ttarget.metadata.i18n = {};\n\t\t}\n\t\ttarget.metadata.i18n[propertyName] = {\n\t\t\tbundleName,\n\t\t\ttarget,\n\t\t};\n\t};\n};\n\nexport default i18n;\n"]}
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/decorators/i18n.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,MAAM,IAAI,GAAG,CAAC,UAAkB,EAAiB,EAAE;IAClD,OAAO,CAAC,MAAyB,EAAE,YAAoB,EAAE,EAAE;QAC1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC3B,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC;QAC3B,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;YAC3C,GAAG;gBACF,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACvC,CAAC;YACD,GAAG,KAAI,CAAC;SACR,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG;YACpC,UAAU;YACV,MAAM;SACN,CAAC;IACH,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\ntype i18nDecorator = (target: typeof UI5Element, propertyName: string) => void;\n\n/**\n * A decorator that converts a static class member into an accessor for the i18n bundle with a specified name\n *\n * @param { string } bundleName name of the i18n bundle to load\n * @returns { i18nDecorator }\n *\n * ```ts\n * class MyComponnet extends UI5Element {\n * @i18n('@ui5/webcomponents')\n * i18nBundle: I18nBundle;\n * }\n * ```\n */\nconst i18n = (bundleName: string): i18nDecorator => {\n\treturn (target: typeof UI5Element, propertyName: string) => {\n\t\tif (!target.metadata.i18n) {\n\t\t\ttarget.metadata.i18n = {};\n\t\t}\n\n\t\tObject.defineProperty(target, propertyName, {\n\t\t\tget() {\n\t\t\t\treturn target.i18nBundles[bundleName];\n\t\t\t},\n\t\t\tset() {},\n\t\t});\n\n\t\ttarget.metadata.i18n[propertyName] = {\n\t\t\tbundleName,\n\t\t\ttarget,\n\t\t};\n\t};\n};\n\nexport default i18n;\n"]}
@@ -10,6 +10,7 @@ declare class F6Navigation {
10
10
  findPreviousFocusableGroupElement(currentIndex: number): Promise<HTMLElement | undefined>;
11
11
  _keydownHandler(event: KeyboardEvent): Promise<void>;
12
12
  updateGroups(): void;
13
+ findContainer(): HTMLElement;
13
14
  setSelectedGroup(root?: DocumentOrShadowRoot): void;
14
15
  deepActive(root: DocumentOrShadowRoot): Element | null;
15
16
  destroy(): void;
@@ -1,4 +1,4 @@
1
- import { registerFeature } from "../FeaturesRegistry.js";
1
+ import { getFeature, registerFeature } from "../FeaturesRegistry.js";
2
2
  import { isF6Next, isF6Previous } from "../Keys.js";
3
3
  import { instanceOfUI5Element } from "../UI5Element.js";
4
4
  import { getFirstFocusableElement } from "../util/FocusableElements.js";
@@ -103,6 +103,12 @@ class F6Navigation {
103
103
  return elementToFocus;
104
104
  }
105
105
  async _keydownHandler(event) {
106
+ const openUI5Support = getFeature("OpenUI5Support");
107
+ const isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected();
108
+ if (isOpenUI5Detected) {
109
+ this.destroy();
110
+ return;
111
+ }
106
112
  const forward = isF6Next(event);
107
113
  const backward = isF6Previous(event);
108
114
  if (!(forward || backward)) {
@@ -131,8 +137,21 @@ class F6Navigation {
131
137
  elementToFocus?.focus();
132
138
  }
133
139
  updateGroups() {
140
+ const container = this.findContainer();
134
141
  this.setSelectedGroup();
135
- this.groups = getFastNavigationGroups(document.body);
142
+ this.groups = getFastNavigationGroups(container);
143
+ }
144
+ findContainer() {
145
+ const htmlElement = window.document.querySelector("html");
146
+ let element = this.deepActive(window.document);
147
+ while (element && element !== htmlElement) {
148
+ const closestScopeEl = element.closest("[data-sap-ui-fastnavgroup-container='true']");
149
+ if (closestScopeEl) {
150
+ return closestScopeEl;
151
+ }
152
+ element = element.parentElement ? element.parentElement : element.parentNode.host;
153
+ }
154
+ return document.body;
136
155
  }
137
156
  setSelectedGroup(root = window.document) {
138
157
  const htmlElement = window.document.querySelector("html");
@@ -1 +1 @@
1
- {"version":3,"file":"F6Navigation.js","sourceRoot":"","sources":["../../src/features/F6Navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAMxD,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;AAErD,MAAM,YAAY,GAAG,CAAC,YAAgC,EAAE,EAAE;IACzD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,eAAe,CAAC,mBAAmB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,2FAA2F;AAC7J,CAAC,CAAC;AAEF,MAAM,YAAY;IAKjB;QAHA,kBAAa,GAAuB,IAAI,CAAC;QACzC,WAAM,GAAuB,EAAE,CAAC;QAG/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAmC,CAAC;QACxF,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7B,CAAC;IAED,oBAAoB;QACnB,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3D,CAAC;IAED,oBAAo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,CAAC,QAAQ,EAAE,CAAC;YAC1B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tlet nextElementDomRef = nextElement;\n\n\t\tif (instanceOfUI5Element(nextElement)) {\n\t\t\tnextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;\n\t\t}\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(document.body);\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null | ParentNode = this.deepActive(root);\n\n\t\twhile (element && (element as Element).getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = element.parentElement ? element.parentNode : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
1
+ {"version":3,"file":"F6Navigation.js","sourceRoot":"","sources":["../../src/features/F6Navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,wBAAw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aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAED,OAAO;QACN,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,gBAAgB;QACnB,OAAO,mBAAmB,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,IAAI;QACV,MAAM,UAAU,GAAG,iBAAiB,CAAa,YAAY,EAAE,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC1B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { getFeature, registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\nimport type OpenUI5Support from \"./OpenUI5Support.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tlet nextElementDomRef = nextElement;\n\n\t\tif (instanceOfUI5Element(nextElement)) {\n\t\t\tnextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;\n\t\t}\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected();\n\n\t\tif (isOpenUI5Detected) {\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t}\n\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = element.parentElement ? element.parentElement : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\treturn document.body;\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null | ParentNode = this.deepActive(root);\n\n\t\twhile (element && (element as Element).getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = element.parentElement ? element.parentNode : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
@@ -8,11 +8,20 @@ const closeNativePopover = (domRef) => {
8
8
  domRef.removeAttribute("popover");
9
9
  }
10
10
  };
11
+ const isNativePopoverOpen = (root = document) => {
12
+ if (root.querySelector(":popover-open")) {
13
+ return true;
14
+ }
15
+ return Array.from(root.querySelectorAll("*")).some(element => {
16
+ const shadowRoot = element.shadowRoot;
17
+ return shadowRoot && isNativePopoverOpen(shadowRoot);
18
+ });
19
+ };
11
20
  const patchOpen = (Popup) => {
12
21
  const origOpen = Popup.prototype.open;
13
22
  Popup.prototype.open = function open(...args) {
14
23
  origOpen.apply(this, args); // call open first to initiate opening
15
- const topLayerAlreadyInUse = !!document.body.querySelector(":popover-open"); // check if there is already something in the top layer
24
+ const topLayerAlreadyInUse = isNativePopoverOpen();
16
25
  const openingInitiated = ["OPENING", "OPEN"].includes(this.getOpenState());
17
26
  if (openingInitiated && topLayerAlreadyInUse) {
18
27
  const element = this.getContent();
@@ -1 +1 @@
1
- {"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"mappings":"AAgBA,MAAM,iBAAiB,GAAG,CAAC,MAAmB,EAAE,EAAE;IACjD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,WAAW,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,MAAmB,EAAE,EAAE;IAClD,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAmB,EAAE,EAAE;IACzC,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IACtC,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,IAAI,CAAC,GAAG,IAAW;QAClD,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,sCAAsC;QAClE,MAAM,oBAAoB,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,uDAAuD;QACpI,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QAC3E,IAAI,gBAAgB,IAAI,oBAAoB,EAAE,CAAC;YAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAClC,IAAI,OAAO,EAAE,CAAC;gBACb,MAAM,MAAM,GAAG,OAAO,YAAY,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,C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,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,UAAU,CAAC,WAAW,CAAC,+CAA+C,CAAC,CAAC;IACxE,QAAQ,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC1C,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB;IACzC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,0BAA0B;IAC9C,kBAAkB,EAAE,CAAC,CAAC,6FAA6F;IACnH,eAAe,CAAC,KAAK,CAAC,CAAC,CAAA,+BAA+B;AACvD,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["// OpenUI5's Control.js subset\ntype Control = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\tprototype: {\n\t\topen: (...args: any[]) => void,\n\t\t_closed: (...args: any[]) => void,\n\t\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\t\tgetContent: () => Control | HTMLElement | null, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\t\tonFocusEvent: (e: FocusEvent) => void,\n\t}\n};\n\nconst openNativePopover = (domRef: HTMLElement) => {\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.showPopover();\n};\n\nconst closeNativePopover = (domRef: HTMLElement) => {\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n};\n\nconst patchOpen = (Popup: OpenUI5Popup) => {\n\tconst origOpen = Popup.prototype.open;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\tconst topLayerAlreadyInUse = !!document.body.querySelector(\":popover-open\"); // check if there is already something in the top layer\n\t\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(this.getOpenState());\n\t\tif (openingInitiated && topLayerAlreadyInUse) {\n\t\t\tconst element = this.getContent();\n\t\t\tif (element) {\n\t\t\t\tconst domRef = element instanceof HTMLElement ? element : element?.getDomRef();\n\t\t\t\tif (domRef) {\n\t\t\t\t\topenNativePopover(domRef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5Popup) => {\n\tconst _origClosed = Popup.prototype._closed;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tconst element = this.getContent();\n\t\tconst domRef = element instanceof HTMLElement ? element : element?.getDomRef();\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tif (domRef) {\n\t\t\tcloseNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM\n\t\t}\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5Popup) => {\n\tconst origFocusEvent = Popup.prototype.onFocusEvent;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent) {\n\t\tconst isTypeFocus = e.type === \"focus\" || e.type === \"activate\";\n\t\tconst target = e.target as HTMLElement;\n\t\tif (!isTypeFocus || !target.closest(\"[ui5-popover],[ui5-responsive-popover],[ui5-dialog]\")) {\n\t\t\torigFocusEvent.call(this, e);\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5Popup) => {\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n\tpatchFocusEvent(Popup);// Popup.prototype.onFocusEvent\n};\n\nexport default patchPopup;\nexport type { OpenUI5Popup };\n"]}
1
+ {"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"mappings":"AAgBA,MAAM,iBAAiB,GAAG,CAAC,MAAmB,EAAE,EAAE;IACjD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,WAAW,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,MAAmB,EAAE,EAAE;IAClD,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,OAA8B,QAAQ,EAAW,EAAE;IAC/E,IAAI,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,OAAO,UAAU,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAmB,EAAE,EAAE;IACzC,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IACtC,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,IAAI,CAAC,GAAG,IAAW;QAClD,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAA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,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,SAAS,YAAY,CAAC,CAAa;QACjE,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC;QAChE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAqB,CAAC;QACvC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,qDAAqD,CAAC,EAAE,CAAC;YAC5F,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAC9B,CAAC;IACF,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,UAAU,CAAC,WAAW,CAAC,+CAA+C,CAAC,CAAC;IACxE,QAAQ,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC1C,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB;IACzC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,0BAA0B;IAC9C,kBAAkB,EAAE,CAAC,CAAC,6FAA6F;IACnH,eAAe,CAAC,KAAK,CAAC,CAAC,CAAA,+BAA+B;AACvD,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["// OpenUI5's Control.js subset\ntype Control = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\tprototype: {\n\t\topen: (...args: any[]) => void,\n\t\t_closed: (...args: any[]) => void,\n\t\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\t\tgetContent: () => Control | HTMLElement | null, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\t\tonFocusEvent: (e: FocusEvent) => void,\n\t}\n};\n\nconst openNativePopover = (domRef: HTMLElement) => {\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.showPopover();\n};\n\nconst closeNativePopover = (domRef: HTMLElement) => {\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n};\n\nconst isNativePopoverOpen = (root: Document | ShadowRoot = document): boolean => {\n\tif (root.querySelector(\":popover-open\")) {\n\t\treturn true;\n\t}\n\n\treturn Array.from(root.querySelectorAll(\"*\")).some(element => {\n\t\tconst shadowRoot = element.shadowRoot;\n\t\treturn shadowRoot && isNativePopoverOpen(shadowRoot);\n\t});\n};\n\nconst patchOpen = (Popup: OpenUI5Popup) => {\n\tconst origOpen = Popup.prototype.open;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\tconst topLayerAlreadyInUse = isNativePopoverOpen();\n\t\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(this.getOpenState());\n\t\tif (openingInitiated && topLayerAlreadyInUse) {\n\t\t\tconst element = this.getContent();\n\t\t\tif (element) {\n\t\t\t\tconst domRef = element instanceof HTMLElement ? element : element?.getDomRef();\n\t\t\t\tif (domRef) {\n\t\t\t\t\topenNativePopover(domRef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5Popup) => {\n\tconst _origClosed = Popup.prototype._closed;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tconst element = this.getContent();\n\t\tconst domRef = element instanceof HTMLElement ? element : element?.getDomRef();\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tif (domRef) {\n\t\t\tcloseNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM\n\t\t}\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5Popup) => {\n\tconst origFocusEvent = Popup.prototype.onFocusEvent;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent) {\n\t\tconst isTypeFocus = e.type === \"focus\" || e.type === \"activate\";\n\t\tconst target = e.target as HTMLElement;\n\t\tif (!isTypeFocus || !target.closest(\"[ui5-popover],[ui5-responsive-popover],[ui5-dialog]\")) {\n\t\t\torigFocusEvent.call(this, e);\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5Popup) => {\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n\tpatchFocusEvent(Popup);// Popup.prototype.onFocusEvent\n};\n\nexport default patchPopup;\nexport type { OpenUI5Popup };\n"]}
@@ -1,4 +1,4 @@
1
- const assetParameters = { "themes": { "default": "sap_horizon", "all": ["sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_hcb", "sap_horizon_hcw", "sap_horizon_exp", "sap_horizon_dark_exp", "sap_horizon_hcb_exp", "sap_horizon_hcw_exp"] }, "languages": { "default": "en", "all": ["ar", "bg", "ca", "cnr", "cs", "cy", "da", "de", "el", "en", "en_GB", "en_US_sappsd", "en_US_saprigi", "en_US_saptrc", "es", "es_MX", "et", "fi", "fr", "fr_CA", "hi", "hr", "hu", "in", "it", "iw", "ja", "kk", "ko", "lt", "lv", "mk", "ms", "nl", "no", "pl", "pt_PT", "pt", "ro", "ru", "sh", "sk", "sl", "sr", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW"] }, "locales": { "default": "en", "all": ["ar", "ar_EG", "ar_SA", "bg", "ca", "cnr", "cs", "da", "de", "de_AT", "de_CH", "el", "el_CY", "en", "en_AU", "en_GB", "en_HK", "en_IE", "en_IN", "en_NZ", "en_PG", "en_SG", "en_ZA", "es", "es_AR", "es_BO", "es_CL", "es_CO", "es_MX", "es_PE", "es_UY", "es_VE", "et", "fa", "fi", "fr", "fr_BE", "fr_CA", "fr_CH", "fr_LU", "he", "hi", "hr", "hu", "id", "it", "it_CH", "ja", "kk", "ko", "lt", "lv", "ms", "mk", "nb", "nl", "nl_BE", "pl", "pt", "pt_PT", "ro", "ru", "ru_UA", "sk", "sl", "sr", "sr_Latn", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_HK", "zh_SG", "zh_TW"] } };
1
+ const assetParameters = { "themes": { "default": "sap_horizon", "all": ["sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_hcb", "sap_horizon_hcw"] }, "languages": { "default": "en", "all": ["ar", "bg", "ca", "cnr", "cs", "cy", "da", "de", "el", "en", "en_GB", "en_US_sappsd", "en_US_saprigi", "en_US_saptrc", "es", "es_MX", "et", "fi", "fr", "fr_CA", "hi", "hr", "hu", "id", "it", "iw", "ja", "kk", "ko", "lt", "lv", "mk", "ms", "nl", "no", "pl", "pt_PT", "pt", "ro", "ru", "sh", "sk", "sl", "sr", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW"] }, "locales": { "default": "en", "all": ["ar", "ar_EG", "ar_SA", "bg", "ca", "cnr", "cs", "da", "de", "de_AT", "de_CH", "el", "el_CY", "en", "en_AU", "en_GB", "en_HK", "en_IE", "en_IN", "en_NZ", "en_PG", "en_SG", "en_ZA", "es", "es_AR", "es_BO", "es_CL", "es_CO", "es_MX", "es_PE", "es_UY", "es_VE", "et", "fa", "fi", "fr", "fr_BE", "fr_CA", "fr_CH", "fr_LU", "he", "hi", "hr", "hu", "id", "it", "it_CH", "ja", "kk", "ko", "lt", "lv", "ms", "mk", "nb", "nl", "nl_BE", "pl", "pt", "pt_PT", "ro", "ru", "ru_UA", "sk", "sl", "sr", "sr_Latn", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_HK", "zh_SG", "zh_TW"] } };
2
2
  const DEFAULT_THEME = assetParameters.themes.default;
3
3
  const SUPPORTED_THEMES = assetParameters.themes.all;
4
4
  const DEFAULT_LANGUAGE = assetParameters.languages.default;
@@ -1 +1 @@
1
- {"version":3,"file":"AssetParameters.js","sourceRoot":"","sources":["../../src/generated/AssetParameters.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,EAAC,QAAQ,EAAC,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAC,CAAC,aAAa,EAAC,kBAAkB,EAAC,iBAAiB,EAAC,iBAAiB,EAAC,aAAa,EAAC,kBAAkB,EAAC,iBAAiB,EAAC,iBAAiB,EAAC,iBAAiB,EAAC,sBAAsB,EAAC,qBAAqB,EAAC,qBAAqB,CAAC,EAAC,EAAC,WAAW,EAAC,EAAC,SAAS,EAAC,IAAI,EAAC,KAAK,EAAC,CAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,cAAc,EAAC,eAAe,EAAC,cAAc,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,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ACpD,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC;AAC3D,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC;AACvD,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;AAEtD,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,GACjB,CAAC","sourcesContent":["const assetParameters = {\"themes\":{\"default\":\"sap_horizon\",\"all\":[\"sap_fiori_3\",\"sap_fiori_3_dark\",\"sap_fiori_3_hcb\",\"sap_fiori_3_hcw\",\"sap_horizon\",\"sap_horizon_dark\",\"sap_horizon_hcb\",\"sap_horizon_hcw\",\"sap_horizon_exp\",\"sap_horizon_dark_exp\",\"sap_horizon_hcb_exp\",\"sap_horizon_hcw_exp\"]},\"languages\":{\"default\":\"en\",\"all\":[\"ar\",\"bg\",\"ca\",\"cnr\",\"cs\",\"cy\",\"da\",\"de\",\"el\",\"en\",\"en_GB\",\"en_US_sappsd\",\"en_US_saprigi\",\"en_US_saptrc\",\"es\",\"es_MX\",\"et\",\"fi\",\"fr\",\"fr_CA\",\"hi\",\"hr\",\"hu\",\"in\",\"it\",\"iw\",\"ja\",\"kk\",\"ko\",\"lt\",\"lv\",\"mk\",\"ms\",\"nl\",\"no\",\"pl\",\"pt_PT\",\"pt\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sr\",\"sv\",\"th\",\"tr\",\"uk\",\"vi\",\"zh_CN\",\"zh_TW\"]},\"locales\":{\"default\":\"en\",\"all\":[\"ar\",\"ar_EG\",\"ar_SA\",\"bg\",\"ca\",\"cnr\",\"cs\",\"da\",\"de\",\"de_AT\",\"de_CH\",\"el\",\"el_CY\",\"en\",\"en_AU\",\"en_GB\",\"en_HK\",\"en_IE\",\"en_IN\",\"en_NZ\",\"en_PG\",\"en_SG\",\"en_ZA\",\"es\",\"es_AR\",\"es_BO\",\"es_CL\",\"es_CO\",\"es_MX\",\"es_PE\",\"es_UY\",\"es_VE\",\"et\",\"fa\",\"fi\",\"fr\",\"fr_BE\",\"fr_CA\",\"fr_CH\",\"fr_LU\",\"he\",\"hi\",\"hr\",\"hu\",\"id\",\"it\",\"it_CH\",\"ja\",\"kk\",\"ko\",\"lt\",\"lv\",\"ms\",\"mk\",\"nb\",\"nl\",\"nl_BE\",\"pl\",\"pt\",\"pt_PT\",\"ro\",\"ru\",\"ru_UA\",\"sk\",\"sl\",\"sr\",\"sr_Latn\",\"sv\",\"th\",\"tr\",\"uk\",\"vi\",\"zh_CN\",\"zh_HK\",\"zh_SG\",\"zh_TW\"]}};\n\nconst DEFAULT_THEME = assetParameters.themes.default;\nconst SUPPORTED_THEMES = assetParameters.themes.all;\nconst DEFAULT_LANGUAGE = assetParameters.languages.default;\nconst DEFAULT_LOCALE = assetParameters.locales.default;\nconst SUPPORTED_LOCALES = assetParameters.locales.all;\n\nexport {\n\tDEFAULT_THEME,\n\tSUPPORTED_THEMES,\n\tDEFAULT_LANGUAGE,\n\tDEFAULT_LOCALE,\n\tSUPPORTED_LOCALES,\n};"]}
1
+ {"version":3,"file":"AssetParameters.js","sourceRoot":"","sources":["../../src/generated/AssetParameters.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,EAAC,QAAQ,EAAC,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAC,CAAC,aAAa,EAAC,kBAAkB,EAAC,iBAAiB,EAAC,iBAAiB,EAAC,aAAa,EAAC,kBAAkB,EAAC,iBAAiB,EAAC,iBAAiB,CAAC,EAAC,EAAC,WAAW,EAAC,EAAC,SAAS,EAAC,IAAI,EAAC,KAAK,EAAC,CAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,cAAc,EAAC,eAAe,EAAC,cAAc,EAAC,IAAI,EAAC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I,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,CAAC,EAAC,EAAC,CAAC;AAEhjC,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC;AACrD,MAAM,gBAAgB,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC;AACpD,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC;AAC3D,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC;AACvD,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;AAEtD,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,GACjB,CAAC","sourcesContent":["const assetParameters = {\"themes\":{\"default\":\"sap_horizon\",\"all\":[\"sap_fiori_3\",\"sap_fiori_3_dark\",\"sap_fiori_3_hcb\",\"sap_fiori_3_hcw\",\"sap_horizon\",\"sap_horizon_dark\",\"sap_horizon_hcb\",\"sap_horizon_hcw\"]},\"languages\":{\"default\":\"en\",\"all\":[\"ar\",\"bg\",\"ca\",\"cnr\",\"cs\",\"cy\",\"da\",\"de\",\"el\",\"en\",\"en_GB\",\"en_US_sappsd\",\"en_US_saprigi\",\"en_US_saptrc\",\"es\",\"es_MX\",\"et\",\"fi\",\"fr\",\"fr_CA\",\"hi\",\"hr\",\"hu\",\"id\",\"it\",\"iw\",\"ja\",\"kk\",\"ko\",\"lt\",\"lv\",\"mk\",\"ms\",\"nl\",\"no\",\"pl\",\"pt_PT\",\"pt\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sr\",\"sv\",\"th\",\"tr\",\"uk\",\"vi\",\"zh_CN\",\"zh_TW\"]},\"locales\":{\"default\":\"en\",\"all\":[\"ar\",\"ar_EG\",\"ar_SA\",\"bg\",\"ca\",\"cnr\",\"cs\",\"da\",\"de\",\"de_AT\",\"de_CH\",\"el\",\"el_CY\",\"en\",\"en_AU\",\"en_GB\",\"en_HK\",\"en_IE\",\"en_IN\",\"en_NZ\",\"en_PG\",\"en_SG\",\"en_ZA\",\"es\",\"es_AR\",\"es_BO\",\"es_CL\",\"es_CO\",\"es_MX\",\"es_PE\",\"es_UY\",\"es_VE\",\"et\",\"fa\",\"fi\",\"fr\",\"fr_BE\",\"fr_CA\",\"fr_CH\",\"fr_LU\",\"he\",\"hi\",\"hr\",\"hu\",\"id\",\"it\",\"it_CH\",\"ja\",\"kk\",\"ko\",\"lt\",\"lv\",\"ms\",\"mk\",\"nb\",\"nl\",\"nl_BE\",\"pl\",\"pt\",\"pt_PT\",\"ro\",\"ru\",\"ru_UA\",\"sk\",\"sl\",\"sr\",\"sr_Latn\",\"sv\",\"th\",\"tr\",\"uk\",\"vi\",\"zh_CN\",\"zh_HK\",\"zh_SG\",\"zh_TW\"]}};\n\nconst DEFAULT_THEME = assetParameters.themes.default;\nconst SUPPORTED_THEMES = assetParameters.themes.all;\nconst DEFAULT_LANGUAGE = assetParameters.languages.default;\nconst DEFAULT_LOCALE = assetParameters.locales.default;\nconst SUPPORTED_LOCALES = assetParameters.locales.all;\n\nexport {\n\tDEFAULT_THEME,\n\tSUPPORTED_THEMES,\n\tDEFAULT_LANGUAGE,\n\tDEFAULT_LOCALE,\n\tSUPPORTED_LOCALES,\n};"]}
@@ -1,11 +1,11 @@
1
1
  const VersionInfo = {
2
- version: "2.6.0",
2
+ version: "2.11.0-rc.1",
3
3
  major: 2,
4
- minor: 6,
4
+ minor: 11,
5
5
  patch: 0,
6
- suffix: "",
6
+ suffix: "-rc.1",
7
7
  isNext: false,
8
- buildTime: 1736539231,
8
+ buildTime: 1747824876,
9
9
  };
10
10
  export default VersionInfo;
11
11
  //# sourceMappingURL=VersionInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.6.0\",\n\tmajor: 2,\n\tminor: 6,\n\tpatch: 0,\n\tsuffix: \"\",\n\tisNext: false,\n\tbuildTime: 1736539231,\n};\nexport default VersionInfo;"]}
1
+ {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.11.0-rc.1\",\n\tmajor: 2,\n\tminor: 11,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1747824876,\n};\nexport default VersionInfo;"]}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,48 @@
1
1
  import type { JSX } from "./jsx-runtime.d.ts";
2
-
3
- export type UI5CustomEvent<T extends UI5Element, N extends keyof T["eventDetails"]> = CustomEvent<T["eventDetails"][N]>;
2
+ import scroll from "./animations/scroll.js";
3
+ import slideDown from "./animations/slideDown.js";
4
+ import slideUp from "./animations/slideUp.js";
5
+ import { getAnimationMode, setAnimationMode } from "./config/AnimationMode.js";
6
+ import { getCalendarType } from "./config/CalendarType.js";
7
+ import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./config/FormatSettings.js";
8
+ import { setDefaultIconCollection, getDefaultIconCollection } from "./config/Icons.js";
9
+ import { RegisteredIconCollection } from "./asset-registries/util/IconCollectionsByTheme.js";
10
+ import getEffectiveIconCollection from "./asset-registries/util/getIconCollectionByTheme.js";
11
+ import { getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage } from "./config/Language.js";
12
+ import { getNoConflict, setNoConflict } from "./config/NoConflict.js";
13
+ import { getTheme, setTheme, getDefaultTheme } from "./config/Theme.js";
14
+ import customElement from "./decorators/customElement.js";
15
+ import event from "./decorators/event.js";
16
+ import property from "./decorators/property.js";
17
+ import slot from "./decorators/slot.js";
18
+ import ItemNavigation from "./delegate/ItemNavigation.js";
19
+ import ResizeHandler from "./delegate/ResizeHandler.js";
20
+ import ScrollEnablement from "./delegate/ScrollEnablement.js";
21
+ import applyDirection from "./locale/applyDirection.js";
22
+ import { attachDirectionChange, detachDirectionChange } from "./locale/directionChange.js";
23
+ import getEffectiveDir from "./locale/getEffectiveDir.js";
24
+ import { attachLanguageChange, detachLanguageChange } from "./locale/languageChange.js";
25
+ import { URLListValidator, sanitizeHTML } from "./util/HTMLSanitizer.js";
26
+ import { registerI18nLoader } from "./asset-registries/i18n.js";
27
+ import { registerLocaleDataLoader } from "./asset-registries/LocaleData.js";
28
+ import { registerThemePropertiesLoader } from "./asset-registries/Themes.js";
29
+ import { registerIconLoader } from "./asset-registries/Icons.js";
30
+ import { attachBoot } from "./Boot.js";
31
+ import { setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, getEffectiveScopingSuffixForTag } from "./CustomElementsScope.js";
32
+ import { supportsTouch, isSafari, isChrome, isFirefox, isPhone, isTablet, isDesktop, isCombi, isIOS, isAndroid } from "./Device.js";
33
+ import EventProvider from "./EventProvider.js";
34
+ import I18nBundle, { getI18nBundle, registerCustomI18nBundleGetter } from "./i18nBundle.js";
35
+ import MediaRange from "./MediaRange.js";
36
+ import { renderDeferred, renderImmediately, cancelRender, renderFinished } from "./Render.js";
37
+ import { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from "./Theming.js";
38
+ import UI5Element from "./UI5Element.js";
39
+ export default UI5Element;
40
+ export { scroll, slideDown, slideUp, getAnimationMode, setAnimationMode, getCalendarType, getFirstDayOfWeek, getLegacyDateCalendarCustomizing, setDefaultIconCollection, getDefaultIconCollection, getEffectiveIconCollection, RegisteredIconCollection, getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage, getNoConflict, setNoConflict, getTheme, setTheme, getDefaultTheme, customElement, event, property, slot, ItemNavigation, ResizeHandler, ScrollEnablement, applyDirection, attachDirectionChange, detachDirectionChange, getEffectiveDir, attachLanguageChange, detachLanguageChange, URLListValidator, sanitizeHTML, registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerIconLoader, attachBoot, setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, getEffectiveScopingSuffixForTag, supportsTouch, isSafari, isChrome, isFirefox, isPhone, isTablet, isDesktop, isCombi, isIOS, isAndroid, EventProvider, I18nBundle, getI18nBundle, registerCustomI18nBundleGetter, MediaRange, renderDeferred, renderImmediately, cancelRender, renderFinished, addCustomCSS, attachThemeLoaded, detachThemeLoaded, UI5Element, };
41
+ type TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, "currentTarget"> & {
42
+ currentTarget: T;
43
+ };
44
+ export type UI5CustomEvent<T extends UI5Element, N extends keyof T["eventDetails"]> = TargetedCustomEvent<T["eventDetails"][N], T>;
4
45
  export type JsxTemplateResult = JSX.Element | void;
5
46
  export type JsxTemplate = () => JsxTemplateResult;
6
-
7
47
  export type * from "./types.d.ts";
8
48
  export type * from "./jsx-runtime.d.ts";
package/dist/index.js ADDED
@@ -0,0 +1,88 @@
1
+ // animations/
2
+ import scroll from "./animations/scroll.js";
3
+ import slideDown from "./animations/slideDown.js";
4
+ import slideUp from "./animations/slideUp.js";
5
+ // config/
6
+ import { getAnimationMode, setAnimationMode } from "./config/AnimationMode.js";
7
+ import { getCalendarType } from "./config/CalendarType.js";
8
+ import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./config/FormatSettings.js";
9
+ import { setDefaultIconCollection, getDefaultIconCollection, } from "./config/Icons.js";
10
+ import { RegisteredIconCollection } from "./asset-registries/util/IconCollectionsByTheme.js";
11
+ import getEffectiveIconCollection from "./asset-registries/util/getIconCollectionByTheme.js";
12
+ import { getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage, } from "./config/Language.js";
13
+ import { getNoConflict, setNoConflict } from "./config/NoConflict.js";
14
+ import { getTheme, setTheme, getDefaultTheme, } from "./config/Theme.js";
15
+ // decorators/
16
+ import customElement from "./decorators/customElement.js";
17
+ import event from "./decorators/event.js";
18
+ import property from "./decorators/property.js";
19
+ import slot from "./decorators/slot.js";
20
+ // delegate/
21
+ import ItemNavigation from "./delegate/ItemNavigation.js";
22
+ import ResizeHandler from "./delegate/ResizeHandler.js";
23
+ import ScrollEnablement from "./delegate/ScrollEnablement.js";
24
+ // locale/
25
+ import applyDirection from "./locale/applyDirection.js";
26
+ import { attachDirectionChange, detachDirectionChange } from "./locale/directionChange.js";
27
+ import getEffectiveDir from "./locale/getEffectiveDir.js";
28
+ import { attachLanguageChange, detachLanguageChange } from "./locale/languageChange.js";
29
+ // util/
30
+ import { URLListValidator, sanitizeHTML } from "./util/HTMLSanitizer.js";
31
+ // Assets.ts
32
+ import { registerI18nLoader } from "./asset-registries/i18n.js";
33
+ import { registerLocaleDataLoader } from "./asset-registries/LocaleData.js";
34
+ import { registerThemePropertiesLoader } from "./asset-registries/Themes.js";
35
+ import { registerIconLoader } from "./asset-registries/Icons.js";
36
+ // Boot.ts
37
+ import { attachBoot } from "./Boot.js";
38
+ // CustomElementsScope.ts
39
+ import { setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, getEffectiveScopingSuffixForTag, } from "./CustomElementsScope.js";
40
+ // Device.ts
41
+ import { supportsTouch, isSafari, isChrome, isFirefox, isPhone, isTablet, isDesktop, isCombi, isIOS, isAndroid, } from "./Device.js";
42
+ // EventProvider.ts
43
+ import EventProvider from "./EventProvider.js";
44
+ // i18nBundle.ts
45
+ import I18nBundle, { getI18nBundle, registerCustomI18nBundleGetter } from "./i18nBundle.js";
46
+ // MediaRange.ts
47
+ import MediaRange from "./MediaRange.js";
48
+ // Render.ts
49
+ import { renderDeferred, renderImmediately, cancelRender, renderFinished, } from "./Render.js";
50
+ // Theming.ts
51
+ import { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from "./Theming.js";
52
+ // UI5Element.ts
53
+ import UI5Element from "./UI5Element.js";
54
+ export default UI5Element;
55
+ export {
56
+ // animations/
57
+ scroll, slideDown, slideUp,
58
+ // config/
59
+ getAnimationMode, setAnimationMode, getCalendarType, getFirstDayOfWeek, getLegacyDateCalendarCustomizing, setDefaultIconCollection, getDefaultIconCollection, getEffectiveIconCollection, RegisteredIconCollection, getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage, getNoConflict, setNoConflict, getTheme, setTheme, getDefaultTheme,
60
+ // decorators/
61
+ customElement, event, property, slot,
62
+ // delegate/
63
+ ItemNavigation, ResizeHandler, ScrollEnablement,
64
+ // locale/
65
+ applyDirection, attachDirectionChange, detachDirectionChange, getEffectiveDir, attachLanguageChange, detachLanguageChange,
66
+ // util/
67
+ URLListValidator, sanitizeHTML,
68
+ // Assets.ts
69
+ registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerIconLoader,
70
+ // Boot.ts
71
+ attachBoot,
72
+ // CustomElementsScope.ts
73
+ setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, getEffectiveScopingSuffixForTag,
74
+ // Device.ts
75
+ supportsTouch, isSafari, isChrome, isFirefox, isPhone, isTablet, isDesktop, isCombi, isIOS, isAndroid,
76
+ // EventProvider.ts
77
+ EventProvider,
78
+ // i18nBundle.ts
79
+ I18nBundle, getI18nBundle, registerCustomI18nBundleGetter,
80
+ // MediaRange.ts
81
+ MediaRange,
82
+ // Render.ts
83
+ renderDeferred, renderImmediately, cancelRender, renderFinished,
84
+ // Theming.ts
85
+ addCustomCSS, attachThemeLoaded, detachThemeLoaded,
86
+ // UI5Element.ts
87
+ UI5Element, };
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc;AACd,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAE9C,UAAU;AACV,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,EACN,wBAAwB,EACxB,wBAAwB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,0BAA0B,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EACN,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,GACf,MAAM,mBAAmB,CAAC;AAE3B,cAAc;AACd,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D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mB;AACnB,aAAa;AAEb,gBAAgB;AAChB,UAAU,EACV,aAAa,EACb,8BAA8B;AAE9B,gBAAgB;AAChB,UAAU;AAEV,YAAY;AACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc;AAEd,aAAa;AACb,YAAY,EACZ,iBAAiB,EACjB,iBAAiB;AAEjB,gBAAgB;AAChB,UAAU,GACV,CAAC","sourcesContent":["import type { JSX } from \"./jsx-runtime.d.ts\";\n\n// animations/\nimport scroll from \"./animations/scroll.js\";\nimport slideDown from \"./animations/slideDown.js\";\nimport slideUp from \"./animations/slideUp.js\";\n\n// config/\nimport { getAnimationMode, setAnimationMode } from \"./config/AnimationMode.js\";\nimport { getCalendarType } from \"./config/CalendarType.js\";\nimport { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from \"./config/FormatSettings.js\";\nimport {\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n} from \"./config/Icons.js\";\nimport { RegisteredIconCollection } from \"./asset-registries/util/IconCollectionsByTheme.js\";\nimport getEffectiveIconCollection from \"./asset-registries/util/getIconCollectionByTheme.js\";\nimport {\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n} from \"./config/Language.js\";\nimport { getNoConflict, setNoConflict } from \"./config/NoConflict.js\";\nimport {\n\tgetTheme,\n\tsetTheme,\n\tgetDefaultTheme,\n} from \"./config/Theme.js\";\n\n// decorators/\nimport customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\n\n// delegate/\nimport ItemNavigation from \"./delegate/ItemNavigation.js\";\nimport ResizeHandler from \"./delegate/ResizeHandler.js\";\nimport ScrollEnablement from \"./delegate/ScrollEnablement.js\";\n\n// locale/\nimport applyDirection from \"./locale/applyDirection.js\";\nimport { attachDirectionChange, detachDirectionChange } from \"./locale/directionChange.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport { attachLanguageChange, detachLanguageChange } from \"./locale/languageChange.js\";\n\n// util/\nimport { URLListValidator, sanitizeHTML } from \"./util/HTMLSanitizer.js\";\n\n// Assets.ts\nimport { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\n// Boot.ts\nimport { attachBoot } from \"./Boot.js\";\n\n// CustomElementsScope.ts\nimport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tgetEffectiveScopingSuffixForTag,\n} from \"./CustomElementsScope.js\";\n\n// Device.ts\nimport {\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop,\n\tisCombi,\n\tisIOS,\n\tisAndroid,\n} from \"./Device.js\";\n\n// EventProvider.ts\nimport EventProvider from \"./EventProvider.js\";\n\n// i18nBundle.ts\nimport I18nBundle, { getI18nBundle, registerCustomI18nBundleGetter } from \"./i18nBundle.js\";\n\n// MediaRange.ts\nimport MediaRange from \"./MediaRange.js\";\n\n// Render.ts\nimport {\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n\trenderFinished,\n} from \"./Render.js\";\n\n// Theming.ts\nimport { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from \"./Theming.js\";\n\n// UI5Element.ts\nimport UI5Element from \"./UI5Element.js\";\n\nexport default UI5Element;\nexport {\n\t// animations/\n\tscroll,\n\tslideDown,\n\tslideUp,\n\n\t// config/\n\tgetAnimationMode,\n\tsetAnimationMode,\n\tgetCalendarType,\n\tgetFirstDayOfWeek,\n\tgetLegacyDateCalendarCustomizing,\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n\tgetEffectiveIconCollection,\n\tRegisteredIconCollection,\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tsetNoConflict,\n\tgetTheme,\n\tsetTheme,\n\tgetDefaultTheme,\n\n\t// decorators/\n\tcustomElement,\n\tevent,\n\tproperty,\n\tslot,\n\n\t// delegate/\n\tItemNavigation,\n\tResizeHandler,\n\tScrollEnablement,\n\n\t// locale/\n\tapplyDirection,\n\tattachDirectionChange,\n\tdetachDirectionChange,\n\tgetEffectiveDir,\n\tattachLanguageChange,\n\tdetachLanguageChange,\n\n\t// util/\n\tURLListValidator,\n\tsanitizeHTML,\n\n\t// Assets.ts\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterIconLoader,\n\n\t// Boot.ts\n\tattachBoot,\n\n\t// CustomElementsScope.ts\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tgetEffectiveScopingSuffixForTag,\n\n\t// Device.ts\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop,\n\tisCombi,\n\tisIOS,\n\tisAndroid,\n\n\t// EventProvider.ts\n\tEventProvider,\n\n\t// i18nBundle.ts\n\tI18nBundle,\n\tgetI18nBundle,\n\tregisterCustomI18nBundleGetter,\n\n\t// MediaRange.ts\n\tMediaRange,\n\n\t// Render.ts\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n\trenderFinished,\n\n\t// Theming.ts\n\taddCustomCSS,\n\tattachThemeLoaded,\n\tdetachThemeLoaded,\n\n\t// UI5Element.ts\n\tUI5Element,\n};\n\ntype TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, \"currentTarget\"> & { currentTarget: T };\n// export type UI5NativeEvent<T extends keyof HTMLElementTagNameMap, N> = Parameters<JSX.IntrinsicElements[T][N]>[0];\nexport type UI5CustomEvent<T extends UI5Element, N extends keyof T[\"eventDetails\"]> = TargetedCustomEvent<T[\"eventDetails\"][N], T>;\nexport type JsxTemplateResult = JSX.Element | void;\nexport type JsxTemplate = () => JsxTemplateResult;\n\nexport type * from \"./types.d.ts\";\nexport type * from \"./jsx-runtime.d.ts\";\n"]}
package/dist/jsx-utils.js CHANGED
@@ -7,10 +7,19 @@ function convertEventScoping(type, props, key) {
7
7
  // Exteract the kebab-case event: onChange - change, onSelectionChange - selection-change, etc.
8
8
  const pascalEvent = prop.slice("on".length);
9
9
  const kebabCaseEvent = pascalToKebabCase(pascalEvent);
10
- // Attach for the "ui5-" preffixed event
10
+ // Also support camelCase events
11
+ const camelCaseEvent = pascalEvent.charAt(0).toLowerCase() + pascalEvent.slice(1);
12
+ let origEvent;
11
13
  if (kebabCaseEvent in events) {
14
+ origEvent = kebabCaseEvent;
15
+ }
16
+ else if (camelCaseEvent in events) {
17
+ origEvent = camelCaseEvent;
18
+ }
19
+ // Attach for the "ui5-" preffixed event
20
+ if (origEvent) {
12
21
  if ((prop !== "onClick")) {
13
- props[`onui5-${kebabCaseEvent}`] = props[prop];
22
+ props[`onui5-${origEvent}`] = props[prop];
14
23
  // TODO keep native events for now, find a way to mark them for runtime
15
24
  delete props[prop];
16
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-utils.js","sourceRoot":"","sources":["../src/jsx-utils.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,SAAS,mBAAmB,CAAC,IAAuB,EAAE,KAA0B,EAAE,GAAW;IAC5F,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC;IAE9C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACjC,IAAI,IAAI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ascalToKebabCase } from \"./util/StringHelper.js\";\n\nfunction convertEventScoping(type: typeof UI5Element, props: Record<string, any>, key: string) {\n\tconst events = type.getMetadata().getEvents();\n\n\tObject.keys(props).forEach(prop => {\n\t\tif (prop.startsWith(\"on\")) {\n\t\t\t// Exteract the kebab-case event: onChange - change, onSelectionChange - selection-change, etc.\n\t\t\tconst pascalEvent = prop.slice(\"on\".length);\n\t\t\tconst kebabCaseEvent = pascalToKebabCase(pascalEvent);\n\n\t\t\t// Attach for the \"ui5-\" preffixed event\n\t\t\tif (kebabCaseEvent in events) {\n\t\t\t\tif ((prop !== \"onClick\")) {\n\t\t\t\t\tprops[`onui5-${kebabCaseEvent}`] = props[prop];\n\t\t\t\t\t// TODO keep native events for now, find a way to mark them for runtime\n\t\t\t\t\tdelete props[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport function isUI5ElementClass(type: string | typeof UI5Element): type is typeof UI5Element {\n\treturn typeof type === \"function\" && \"getMetadata\" in type;\n}\n\nexport function preprocess(type: string | typeof UI5Element, props: Record<string, any>, key: string) {\n\tlet tag: string;\n\tif (isUI5ElementClass(type)) {\n\t\ttag = type.getMetadata().getTag();\n\t\tconvertEventScoping(type, props, key);\n\t} else {\n\t\ttag = type;\n\t}\n\n\t// convert class object to string\n\tif (typeof props.class === \"object\") {\n\t\tprops.class = hash2str(props.class);\n\t}\n\n\treturn tag;\n}\n"]}
1
+ {"version":3,"file":"jsx-utils.js","sourceRoot":"","sources":["../src/jsx-utils.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,SAAS,mBAAmB,CAAC,IAAuB,EAAE,KAA0B,EAAE,GAAW;IAC5F,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC;IAE9C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,O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,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;QACP,GAAG,GAAG,IAAI,CAAC;IACZ,CAAC;IAED,iCAAiC;IACjC,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC","sourcesContent":["import type UI5Element from \"./UI5Element.js\";\nimport hash2str from \"./util/hash2str.js\";\nimport { pascalToKebabCase } from \"./util/StringHelper.js\";\n\nfunction convertEventScoping(type: typeof UI5Element, props: Record<string, any>, key: string) {\n\tconst events = type.getMetadata().getEvents();\n\n\tObject.keys(props).forEach(prop => {\n\t\tif (prop.startsWith(\"on\")) {\n\t\t\t// Exteract the kebab-case event: onChange - change, onSelectionChange - selection-change, etc.\n\t\t\tconst pascalEvent = prop.slice(\"on\".length);\n\t\t\tconst kebabCaseEvent = pascalToKebabCase(pascalEvent);\n\t\t\t// Also support camelCase events\n\t\t\tconst camelCaseEvent = pascalEvent.charAt(0).toLowerCase() + pascalEvent.slice(1);\n\n\t\t\tlet origEvent: string | undefined;\n\t\t\tif (kebabCaseEvent in events) {\n\t\t\t\torigEvent = kebabCaseEvent;\n\t\t\t} else if (camelCaseEvent in events) {\n\t\t\t\torigEvent = camelCaseEvent;\n\t\t\t}\n\t\t\t// Attach for the \"ui5-\" preffixed event\n\t\t\tif (origEvent) {\n\t\t\t\tif ((prop !== \"onClick\")) {\n\t\t\t\t\tprops[`onui5-${origEvent}`] = props[prop];\n\t\t\t\t\t// TODO keep native events for now, find a way to mark them for runtime\n\t\t\t\t\tdelete props[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport function isUI5ElementClass(type: string | typeof UI5Element): type is typeof UI5Element {\n\treturn typeof type === \"function\" && \"getMetadata\" in type;\n}\n\nexport function preprocess(type: string | typeof UI5Element, props: Record<string, any>, key: string) {\n\tlet tag: string;\n\tif (isUI5ElementClass(type)) {\n\t\ttag = type.getMetadata().getTag();\n\t\tconvertEventScoping(type, props, key);\n\t} else {\n\t\ttag = type;\n\t}\n\n\t// convert class object to string\n\tif (typeof props.class === \"object\") {\n\t\tprops.class = hash2str(props.class);\n\t}\n\n\treturn tag;\n}\n"]}
@@ -1,4 +1,8 @@
1
1
  import { DEFAULT_LOCALE } from "../generated/AssetParameters.js";
2
+ const LOCALE_FALBACK_MAP = {
3
+ "zh_HK": "zh_TW",
4
+ "in": "id",
5
+ };
2
6
  /**
3
7
  * Calculates the next fallback locale for the given locale.
4
8
  *
@@ -9,8 +13,8 @@ const nextFallbackLocale = (locale) => {
9
13
  if (!locale) {
10
14
  return DEFAULT_LOCALE;
11
15
  }
12
- if (locale === "zh_HK") {
13
- return "zh_TW";
16
+ if (LOCALE_FALBACK_MAP[locale]) {
17
+ return LOCALE_FALBACK_MAP[locale];
14
18
  }
15
19
  // if there are multiple segments (separated by underscores), remove the last one
16
20
  const p = locale.lastIndexOf("_");
@@ -1 +1 @@
1
- {"version":3,"file":"nextFallbackLocale.js","sourceRoot":"","sources":["../../src/locale/nextFallbackLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACxB,OAAO,OAAO,CAAC;IAChB,CAAC;IAED,iFAAiF;IACjF,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,2HAA2H;IAC3H,OAAO,MAAM,KAAK,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;AACxD,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { DEFAULT_LOCALE } from \"../generated/AssetParameters.js\";\n\n/**\n * Calculates the next fallback locale for the given locale.\n *\n * @param {string} locale Locale string in Java format (underscores) or null\n * @returns {string} Next fallback Locale or \"en\" if no fallbacks found.\n */\nconst nextFallbackLocale = (locale: string) => {\n\tif (!locale) {\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\tif (locale === \"zh_HK\") {\n\t\treturn \"zh_TW\";\n\t}\n\n\t// if there are multiple segments (separated by underscores), remove the last one\n\tconst p = locale.lastIndexOf(\"_\");\n\tif (p >= 0) {\n\t\treturn locale.slice(0, p);\n\t}\n\n\t// for any language but the default, fallback to the default first before falling back to the 'raw' language (empty string)\n\treturn locale !== DEFAULT_LOCALE ? DEFAULT_LOCALE : \"\";\n};\n\nexport default nextFallbackLocale;\n"]}
1
+ {"version":3,"file":"nextFallbackLocale.js","sourceRoot":"","sources":["../../src/locale/nextFallbackLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,kBAAkB,GAAG;IAC1B,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,IAAI;CACV,CAAC;AAEF;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,IAAI,kBAAkB,CAAC,MAAyC,CAAC,EAAE,CAAC;QACnE,OAAO,kBAAkB,CAAC,MAAyC,CAAC,CAAC;IACtE,CAAC;IAED,iFAAiF;IACjF,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,2HAA2H;IAC3H,OAAO,MAAM,KAAK,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;AACxD,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { DEFAULT_LOCALE } from \"../generated/AssetParameters.js\";\n\nconst LOCALE_FALBACK_MAP = {\n\t\"zh_HK\": \"zh_TW\",\n\t\"in\": \"id\",\n};\n\n/**\n * Calculates the next fallback locale for the given locale.\n *\n * @param {string} locale Locale string in Java format (underscores) or null\n * @returns {string} Next fallback Locale or \"en\" if no fallbacks found.\n */\nconst nextFallbackLocale = (locale: string) => {\n\tif (!locale) {\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\tif (LOCALE_FALBACK_MAP[locale as keyof typeof LOCALE_FALBACK_MAP]) {\n\t\treturn LOCALE_FALBACK_MAP[locale as keyof typeof LOCALE_FALBACK_MAP];\n\t}\n\n\t// if there are multiple segments (separated by underscores), remove the last one\n\tconst p = locale.lastIndexOf(\"_\");\n\tif (p >= 0) {\n\t\treturn locale.slice(0, p);\n\t}\n\n\t// for any language but the default, fallback to the default first before falling back to the 'raw' language (empty string)\n\treturn locale !== DEFAULT_LOCALE ? DEFAULT_LOCALE : \"\";\n};\n\nexport default nextFallbackLocale;\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";import{registerI18nLoader as r}from"./asset-registries/i18n.js";import{registerLocaleDataLoader as e}from"./asset-registries/LocaleData.js";import{registerThemePropertiesLoader as o,registerCustomThemePropertiesLoader as t}from"./asset-registries/Themes.js";import{registerIconLoader as i}from"./asset-registries/Icons.js";export{r as registerI18nLoader,e as registerLocaleDataLoader,o as registerThemePropertiesLoader,t as registerCustomThemePropertiesLoader,i as registerIconLoader};
2
+ //# sourceMappingURL=AssetRegistry.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/AssetRegistry.ts"],
4
+ "sourcesContent": ["import { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader, registerCustomThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\nexport {\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterCustomThemePropertiesLoader,\n\tregisterIconLoader,\n};\n"],
5
+ "mappings": "aAAA,OAAS,sBAAAA,MAA0B,6BACnC,OAAS,4BAAAC,MAAgC,mCACzC,OAAS,iCAAAC,EAA+B,uCAAAC,MAA2C,+BACnF,OAAS,sBAAAC,MAA0B,8BAEnC,OACCJ,KAAA,mBACAC,KAAA,yBACAC,KAAA,8BACAC,KAAA,oCACAC,KAAA",
6
+ "names": ["registerI18nLoader", "registerLocaleDataLoader", "registerThemePropertiesLoader", "registerCustomThemePropertiesLoader", "registerIconLoader"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import d from"./util/whenDOMReady.js";import v from"./EventProvider.js";import c from"./FontFace.js";import u from"./SystemCSSVars.js";import{getTheme as i}from"./config/Theme.js";import a from"./theming/applyTheme.js";import{registerCurrentRuntime as y}from"./Runtimes.js";import{getFeature as m}from"./FeaturesRegistry.js";import{attachThemeRegistered as g}from"./theming/ThemeRegistered.js";import S from"./util/fixSafariActiveState.js";let o=!1,r;const p=new v,h=()=>o,P=e=>{if(!o){p.attachEvent("boot",e);return}e()},l=async()=>{if(r!==void 0)return r;const e=async n=>{if(y(),typeof document>"u"){n();return}g(b);const t=m("OpenUI5Support"),f=t?t.isOpenUI5Detected():!1,s=m("F6Navigation");t&&await t.init(),s&&!f&&s.init(),await d(),await a(i()),t&&t.attachListeners(),c(),u(),S(),n(),o=!0,p.fireEvent("boot")};return r=new Promise(e),r},b=e=>{o&&e===i()&&a(i())};export{l as boot,P as attachBoot,h as isBooted};
2
+ //# sourceMappingURL=Boot.js.map