@ui5/webcomponents-base 0.0.0-47cc17a26 → 0.0.0-49bade48d

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 (373) hide show
  1. package/AGENTS.md +195 -0
  2. package/CHANGELOG.md +362 -1
  3. package/CLAUDE.md +1 -0
  4. package/dist/.tsbuildinfobuild +1 -1
  5. package/dist/Boot.d.ts +2 -1
  6. package/dist/Boot.js +42 -14
  7. package/dist/Boot.js.map +1 -1
  8. package/dist/CustomElementsScopeUtils.d.ts +11 -4
  9. package/dist/CustomElementsScopeUtils.js +15 -5
  10. package/dist/CustomElementsScopeUtils.js.map +1 -1
  11. package/dist/FontFace.css +36 -0
  12. package/dist/InitialConfiguration.d.ts +2 -1
  13. package/dist/InitialConfiguration.js +10 -11
  14. package/dist/InitialConfiguration.js.map +1 -1
  15. package/dist/ManagedStyles.js +1 -1
  16. package/dist/ManagedStyles.js.map +1 -1
  17. package/dist/Render.d.ts +9 -1
  18. package/dist/Render.js +15 -3
  19. package/dist/Render.js.map +1 -1
  20. package/dist/Runtimes.d.ts +6 -1
  21. package/dist/Runtimes.js +25 -24
  22. package/dist/Runtimes.js.map +1 -1
  23. package/dist/SystemCSSVars.js +2 -4
  24. package/dist/SystemCSSVars.js.map +1 -1
  25. package/dist/UI5Element.d.ts +33 -7
  26. package/dist/UI5Element.js +73 -25
  27. package/dist/UI5Element.js.map +1 -1
  28. package/dist/UI5ElementMetadata.js +1 -1
  29. package/dist/UI5ElementMetadata.js.map +1 -1
  30. package/dist/asset-registries/Icons.d.ts +1 -0
  31. package/dist/asset-registries/Icons.js +1 -0
  32. package/dist/asset-registries/Icons.js.map +1 -1
  33. package/dist/asset-registries/Themes.d.ts +5 -2
  34. package/dist/asset-registries/Themes.js +3 -3
  35. package/dist/asset-registries/Themes.js.map +1 -1
  36. package/dist/config/ConfigurationSync.d.ts +16 -0
  37. package/dist/config/ConfigurationSync.js +42 -0
  38. package/dist/config/ConfigurationSync.js.map +1 -0
  39. package/dist/config/Language.js +13 -1
  40. package/dist/config/Language.js.map +1 -1
  41. package/dist/config/Theme.d.ts +13 -1
  42. package/dist/config/Theme.js +27 -2
  43. package/dist/config/Theme.js.map +1 -1
  44. package/dist/config/ThemeRoot.js +12 -7
  45. package/dist/config/ThemeRoot.js.map +1 -1
  46. package/dist/config/UrlParams.d.ts +20 -0
  47. package/dist/config/UrlParams.js +30 -0
  48. package/dist/config/UrlParams.js.map +1 -0
  49. package/dist/createReactComponent.d.ts +26 -0
  50. package/dist/createReactComponent.js +51 -0
  51. package/dist/createReactComponent.js.map +1 -0
  52. package/dist/css/OpenUI5PopupStyles.css +5 -0
  53. package/dist/css/SystemCSSVars.css +28 -3
  54. package/dist/custom-elements-internal.json +402 -309
  55. package/dist/custom-elements.json +346 -253
  56. package/dist/decorators/slot-strict.d.ts +27 -0
  57. package/dist/decorators/slot-strict.js +54 -0
  58. package/dist/decorators/slot-strict.js.map +1 -0
  59. package/dist/decorators/slot.d.ts +18 -0
  60. package/dist/decorators/slot.js +18 -0
  61. package/dist/decorators/slot.js.map +1 -1
  62. package/dist/decorators.d.ts +2 -1
  63. package/dist/decorators.js +2 -1
  64. package/dist/decorators.js.map +1 -1
  65. package/dist/features/F6Navigation.d.ts +1 -0
  66. package/dist/features/F6Navigation.js +4 -0
  67. package/dist/features/F6Navigation.js.map +1 -1
  68. package/dist/features/InputElementsFormSupport.d.ts +1 -1
  69. package/dist/features/InputElementsFormSupport.js +26 -4
  70. package/dist/features/InputElementsFormSupport.js.map +1 -1
  71. package/dist/features/OpenUI5Support.d.ts +12 -6
  72. package/dist/features/OpenUI5Support.js +55 -24
  73. package/dist/features/OpenUI5Support.js.map +1 -1
  74. package/dist/features/patchPatcher.d.ts +7 -6
  75. package/dist/features/patchPatcher.js +14 -4
  76. package/dist/features/patchPatcher.js.map +1 -1
  77. package/dist/features/patchPopup.d.ts +17 -12
  78. package/dist/features/patchPopup.js +99 -27
  79. package/dist/features/patchPopup.js.map +1 -1
  80. package/dist/generated/AssetParameters.js +1 -1
  81. package/dist/generated/AssetParameters.js.map +1 -1
  82. package/dist/generated/VersionInfo.js +3 -3
  83. package/dist/generated/VersionInfo.js.map +1 -1
  84. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
  85. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
  86. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
  87. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
  88. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
  89. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
  90. package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
  91. package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
  92. package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
  93. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
  94. package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
  95. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
  96. package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
  97. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
  98. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
  99. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
  100. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
  101. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
  102. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
  103. package/dist/generated/assets/i18n/messagebundle_id.json +1 -0
  104. package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
  105. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
  106. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
  107. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
  108. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
  109. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
  110. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
  111. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
  112. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
  113. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
  114. package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
  115. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
  116. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
  117. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
  118. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
  119. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
  120. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
  121. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
  122. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
  123. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
  124. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
  125. package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
  126. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
  127. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
  128. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
  129. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
  130. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
  131. package/dist/generated/css/FontFace.css.d.ts +1 -1
  132. package/dist/generated/css/FontFace.css.js +36 -36
  133. package/dist/generated/css/FontFace.css.js.map +1 -1
  134. package/dist/generated/css/OpenUI5PopupStyles.css.d.ts +1 -1
  135. package/dist/generated/css/OpenUI5PopupStyles.css.js +1 -1
  136. package/dist/generated/css/OpenUI5PopupStyles.css.js.map +1 -1
  137. package/dist/generated/css/SystemCSSVars.css.d.ts +1 -1
  138. package/dist/generated/css/SystemCSSVars.css.js +1 -1
  139. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  140. package/dist/index.d.ts +3 -1
  141. package/dist/index.js +4 -2
  142. package/dist/index.js.map +1 -1
  143. package/dist/prod/Boot.js +1 -1
  144. package/dist/prod/Boot.js.map +3 -3
  145. package/dist/prod/CustomElementsScopeUtils.js +1 -1
  146. package/dist/prod/CustomElementsScopeUtils.js.map +3 -3
  147. package/dist/prod/InitialConfiguration.js +1 -1
  148. package/dist/prod/InitialConfiguration.js.map +3 -3
  149. package/dist/prod/ManagedStyles.js +1 -1
  150. package/dist/prod/ManagedStyles.js.map +2 -2
  151. package/dist/prod/Render.js +1 -1
  152. package/dist/prod/Render.js.map +3 -3
  153. package/dist/prod/Runtimes.js +1 -1
  154. package/dist/prod/Runtimes.js.map +3 -3
  155. package/dist/prod/SystemCSSVars.js +1 -1
  156. package/dist/prod/SystemCSSVars.js.map +3 -3
  157. package/dist/prod/UI5Element.js +1 -1
  158. package/dist/prod/UI5Element.js.map +3 -3
  159. package/dist/prod/UI5ElementMetadata.js +1 -1
  160. package/dist/prod/UI5ElementMetadata.js.map +2 -2
  161. package/dist/prod/asset-registries/Icons.js +1 -1
  162. package/dist/prod/asset-registries/Icons.js.map +2 -2
  163. package/dist/prod/asset-registries/Themes.js +1 -1
  164. package/dist/prod/asset-registries/Themes.js.map +3 -3
  165. package/dist/prod/config/ConfigurationSync.js +2 -0
  166. package/dist/prod/config/ConfigurationSync.js.map +7 -0
  167. package/dist/prod/config/Language.js +1 -1
  168. package/dist/prod/config/Language.js.map +3 -3
  169. package/dist/prod/config/Theme.js +1 -1
  170. package/dist/prod/config/Theme.js.map +3 -3
  171. package/dist/prod/config/ThemeRoot.js +1 -1
  172. package/dist/prod/config/ThemeRoot.js.map +3 -3
  173. package/dist/prod/config/UrlParams.js +2 -0
  174. package/dist/prod/config/UrlParams.js.map +7 -0
  175. package/dist/prod/createReactComponent.js +2 -0
  176. package/dist/prod/createReactComponent.js.map +7 -0
  177. package/dist/prod/decorators/slot-strict.js +2 -0
  178. package/dist/prod/decorators/slot-strict.js.map +7 -0
  179. package/dist/prod/decorators/slot.js.map +2 -2
  180. package/dist/prod/decorators.js +1 -1
  181. package/dist/prod/decorators.js.map +3 -3
  182. package/dist/prod/features/F6Navigation.js +1 -1
  183. package/dist/prod/features/F6Navigation.js.map +2 -2
  184. package/dist/prod/features/InputElementsFormSupport.js +1 -1
  185. package/dist/prod/features/InputElementsFormSupport.js.map +3 -3
  186. package/dist/prod/features/OpenUI5Support.js +1 -1
  187. package/dist/prod/features/OpenUI5Support.js.map +3 -3
  188. package/dist/prod/features/patchPatcher.js +1 -1
  189. package/dist/prod/features/patchPatcher.js.map +3 -3
  190. package/dist/prod/features/patchPopup.js +1 -1
  191. package/dist/prod/features/patchPopup.js.map +3 -3
  192. package/dist/prod/generated/AssetParameters.js +1 -1
  193. package/dist/prod/generated/AssetParameters.js.map +2 -2
  194. package/dist/prod/generated/VersionInfo.js +1 -1
  195. package/dist/prod/generated/VersionInfo.js.map +1 -1
  196. package/dist/prod/generated/assets/i18n/messagebundle_ar.json +1 -0
  197. package/dist/prod/generated/assets/i18n/messagebundle_bg.json +1 -0
  198. package/dist/prod/generated/assets/i18n/messagebundle_ca.json +1 -0
  199. package/dist/prod/generated/assets/i18n/messagebundle_cnr.json +1 -0
  200. package/dist/prod/generated/assets/i18n/messagebundle_cs.json +1 -0
  201. package/dist/prod/generated/assets/i18n/messagebundle_cy.json +1 -0
  202. package/dist/prod/generated/assets/i18n/messagebundle_da.json +1 -0
  203. package/dist/prod/generated/assets/i18n/messagebundle_de.json +1 -0
  204. package/dist/prod/generated/assets/i18n/messagebundle_el.json +1 -0
  205. package/dist/prod/generated/assets/i18n/messagebundle_en_GB.json +1 -0
  206. package/dist/prod/generated/assets/i18n/messagebundle_es.json +1 -0
  207. package/dist/prod/generated/assets/i18n/messagebundle_es_MX.json +1 -0
  208. package/dist/prod/generated/assets/i18n/messagebundle_et.json +1 -0
  209. package/dist/prod/generated/assets/i18n/messagebundle_fi.json +1 -0
  210. package/dist/prod/generated/assets/i18n/messagebundle_fr.json +1 -0
  211. package/dist/prod/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
  212. package/dist/prod/generated/assets/i18n/messagebundle_hi.json +1 -0
  213. package/dist/prod/generated/assets/i18n/messagebundle_hr.json +1 -0
  214. package/dist/prod/generated/assets/i18n/messagebundle_hu.json +1 -0
  215. package/dist/prod/generated/assets/i18n/messagebundle_id.json +1 -0
  216. package/dist/prod/generated/assets/i18n/messagebundle_it.json +1 -0
  217. package/dist/prod/generated/assets/i18n/messagebundle_iw.json +1 -0
  218. package/dist/prod/generated/assets/i18n/messagebundle_ja.json +1 -0
  219. package/dist/prod/generated/assets/i18n/messagebundle_kk.json +1 -0
  220. package/dist/prod/generated/assets/i18n/messagebundle_ko.json +1 -0
  221. package/dist/prod/generated/assets/i18n/messagebundle_lt.json +1 -0
  222. package/dist/prod/generated/assets/i18n/messagebundle_lv.json +1 -0
  223. package/dist/prod/generated/assets/i18n/messagebundle_mk.json +1 -0
  224. package/dist/prod/generated/assets/i18n/messagebundle_ms.json +1 -0
  225. package/dist/prod/generated/assets/i18n/messagebundle_nl.json +1 -0
  226. package/dist/prod/generated/assets/i18n/messagebundle_no.json +1 -0
  227. package/dist/prod/generated/assets/i18n/messagebundle_pl.json +1 -0
  228. package/dist/prod/generated/assets/i18n/messagebundle_pt.json +1 -0
  229. package/dist/prod/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
  230. package/dist/prod/generated/assets/i18n/messagebundle_ro.json +1 -0
  231. package/dist/prod/generated/assets/i18n/messagebundle_ru.json +1 -0
  232. package/dist/prod/generated/assets/i18n/messagebundle_sh.json +1 -0
  233. package/dist/prod/generated/assets/i18n/messagebundle_sk.json +1 -0
  234. package/dist/prod/generated/assets/i18n/messagebundle_sl.json +1 -0
  235. package/dist/prod/generated/assets/i18n/messagebundle_sr.json +1 -0
  236. package/dist/prod/generated/assets/i18n/messagebundle_sv.json +1 -0
  237. package/dist/prod/generated/assets/i18n/messagebundle_th.json +1 -0
  238. package/dist/prod/generated/assets/i18n/messagebundle_tr.json +1 -0
  239. package/dist/prod/generated/assets/i18n/messagebundle_uk.json +1 -0
  240. package/dist/prod/generated/assets/i18n/messagebundle_vi.json +1 -0
  241. package/dist/prod/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
  242. package/dist/prod/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
  243. package/dist/prod/generated/css/FontFace.css.js +36 -36
  244. package/dist/prod/generated/css/FontFace.css.js.map +1 -1
  245. package/dist/prod/generated/css/OpenUI5PopupStyles.css.js +1 -1
  246. package/dist/prod/generated/css/OpenUI5PopupStyles.css.js.map +1 -1
  247. package/dist/prod/generated/css/SystemCSSVars.css.js +1 -1
  248. package/dist/prod/generated/css/SystemCSSVars.css.js.map +1 -1
  249. package/dist/prod/index.js +1 -1
  250. package/dist/prod/index.js.map +3 -3
  251. package/dist/prod/sap/base/Log.js +15 -29
  252. package/dist/prod/sap/base/assert.js +1 -1
  253. package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +1 -1
  254. package/dist/prod/sap/base/security/URLListValidator.js +9 -5
  255. package/dist/prod/sap/base/security/encodeCSS.js +1 -1
  256. package/dist/prod/sap/base/security/encodeXML.js +1 -1
  257. package/dist/prod/sap/base/security/sanitizeHTML.js +1 -1
  258. package/dist/prod/sap/base/strings/toHex.js +1 -1
  259. package/dist/prod/sap/base/util/now.js +7 -13
  260. package/dist/prod/sap/base/util/uid.js +1 -1
  261. package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +15 -3
  262. package/dist/prod/theming/applyTheme.js +1 -1
  263. package/dist/prod/theming/applyTheme.js.map +3 -3
  264. package/dist/prod/theming/componentStyles.js +3 -0
  265. package/dist/prod/theming/componentStyles.js.map +7 -0
  266. package/dist/prod/thirdparty/preact/preact.module.js +1 -1
  267. package/dist/prod/updateShadowRoot.js +1 -1
  268. package/dist/prod/updateShadowRoot.js.map +3 -3
  269. package/dist/prod/util/SelectionAssistant.js.map +1 -1
  270. package/dist/prod/util/createInstanceChecker.js +2 -0
  271. package/dist/prod/util/createInstanceChecker.js.map +7 -0
  272. package/dist/prod/util/createMultiInstanceChecker.js +2 -0
  273. package/dist/prod/util/createMultiInstanceChecker.js.map +7 -0
  274. package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
  275. package/dist/prod/util/dragAndDrop/DragRegistry.js.map +3 -3
  276. package/dist/prod/util/generateHighlightedMarkupFirstMatch.js +2 -0
  277. package/dist/prod/util/generateHighlightedMarkupFirstMatch.js.map +7 -0
  278. package/dist/prod/validateThemeRoot.js +1 -1
  279. package/dist/prod/validateThemeRoot.js.map +3 -3
  280. package/dist/react18/createReactComponent.d.ts +38 -0
  281. package/dist/react18/createReactComponent.js +112 -0
  282. package/dist/react18/createReactComponent.js.map +1 -0
  283. package/dist/sap/base/Log.js +15 -29
  284. package/dist/sap/base/assert.js +1 -1
  285. package/dist/sap/base/config/MemoryConfigurationProvider.js +1 -1
  286. package/dist/sap/base/security/URLListValidator.js +9 -5
  287. package/dist/sap/base/security/encodeCSS.js +1 -1
  288. package/dist/sap/base/security/encodeXML.js +1 -1
  289. package/dist/sap/base/security/sanitizeHTML.js +1 -1
  290. package/dist/sap/base/strings/toHex.js +1 -1
  291. package/dist/sap/base/util/now.js +7 -13
  292. package/dist/sap/base/util/uid.js +1 -1
  293. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +15 -3
  294. package/dist/theming/applyTheme.js +14 -4
  295. package/dist/theming/applyTheme.js.map +1 -1
  296. package/dist/theming/componentStyles.d.ts +3 -0
  297. package/dist/theming/componentStyles.js +15 -0
  298. package/dist/theming/componentStyles.js.map +1 -0
  299. package/dist/thirdparty/preact/preact.module.js +1 -1
  300. package/dist/types.d.ts +3 -0
  301. package/dist/types.js.map +1 -1
  302. package/dist/updateShadowRoot.js +2 -1
  303. package/dist/updateShadowRoot.js.map +1 -1
  304. package/dist/util/SelectionAssistant.js.map +1 -1
  305. package/dist/util/createInstanceChecker.d.ts +2 -0
  306. package/dist/util/createInstanceChecker.js +8 -0
  307. package/dist/util/createInstanceChecker.js.map +1 -0
  308. package/dist/util/createMultiInstanceChecker.d.ts +2 -0
  309. package/dist/util/createMultiInstanceChecker.js +19 -0
  310. package/dist/util/createMultiInstanceChecker.js.map +1 -0
  311. package/dist/util/dragAndDrop/DragRegistry.d.ts +1 -1
  312. package/dist/util/dragAndDrop/DragRegistry.js +5 -1
  313. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
  314. package/dist/util/generateHighlightedMarkupFirstMatch.d.ts +10 -0
  315. package/dist/util/generateHighlightedMarkupFirstMatch.js +36 -0
  316. package/dist/util/generateHighlightedMarkupFirstMatch.js.map +1 -0
  317. package/dist/util/getClassCopy.d.ts +2 -1
  318. package/dist/validateThemeRoot.js +18 -11
  319. package/dist/validateThemeRoot.js.map +1 -1
  320. package/dist/vscode.html-custom-data.json +1 -1
  321. package/package-scripts.cjs +6 -6
  322. package/package.json +17 -10
  323. package/src/css/OpenUI5PopupStyles.css +5 -0
  324. package/src/css/SystemCSSVars.css +28 -3
  325. package/src/i18n/messagebundle_ar.properties +2 -0
  326. package/src/i18n/messagebundle_bg.properties +2 -0
  327. package/src/i18n/messagebundle_ca.properties +2 -0
  328. package/src/i18n/messagebundle_cnr.properties +2 -0
  329. package/src/i18n/messagebundle_cs.properties +2 -0
  330. package/src/i18n/messagebundle_cy.properties +2 -0
  331. package/src/i18n/messagebundle_da.properties +2 -0
  332. package/src/i18n/messagebundle_de.properties +2 -0
  333. package/src/i18n/messagebundle_el.properties +2 -0
  334. package/src/i18n/messagebundle_en_GB.properties +2 -0
  335. package/src/i18n/messagebundle_es.properties +2 -0
  336. package/src/i18n/messagebundle_es_MX.properties +2 -0
  337. package/src/i18n/messagebundle_et.properties +2 -0
  338. package/src/i18n/messagebundle_fi.properties +2 -0
  339. package/src/i18n/messagebundle_fr.properties +2 -0
  340. package/src/i18n/messagebundle_fr_CA.properties +2 -0
  341. package/src/i18n/messagebundle_hi.properties +2 -0
  342. package/src/i18n/messagebundle_hr.properties +2 -0
  343. package/src/i18n/messagebundle_hu.properties +2 -0
  344. package/src/i18n/messagebundle_id.properties +2 -0
  345. package/src/i18n/messagebundle_it.properties +2 -0
  346. package/src/i18n/messagebundle_iw.properties +2 -0
  347. package/src/i18n/messagebundle_ja.properties +2 -0
  348. package/src/i18n/messagebundle_kk.properties +2 -0
  349. package/src/i18n/messagebundle_ko.properties +2 -0
  350. package/src/i18n/messagebundle_lt.properties +2 -0
  351. package/src/i18n/messagebundle_lv.properties +2 -0
  352. package/src/i18n/messagebundle_mk.properties +2 -0
  353. package/src/i18n/messagebundle_ms.properties +2 -0
  354. package/src/i18n/messagebundle_nl.properties +2 -0
  355. package/src/i18n/messagebundle_no.properties +2 -0
  356. package/src/i18n/messagebundle_pl.properties +2 -0
  357. package/src/i18n/messagebundle_pt.properties +2 -0
  358. package/src/i18n/messagebundle_pt_PT.properties +2 -0
  359. package/src/i18n/messagebundle_ro.properties +2 -0
  360. package/src/i18n/messagebundle_ru.properties +2 -0
  361. package/src/i18n/messagebundle_sh.properties +2 -0
  362. package/src/i18n/messagebundle_sk.properties +2 -0
  363. package/src/i18n/messagebundle_sl.properties +2 -0
  364. package/src/i18n/messagebundle_sr.properties +2 -0
  365. package/src/i18n/messagebundle_sv.properties +2 -0
  366. package/src/i18n/messagebundle_th.properties +2 -0
  367. package/src/i18n/messagebundle_tr.properties +2 -0
  368. package/src/i18n/messagebundle_uk.properties +2 -0
  369. package/src/i18n/messagebundle_vi.properties +2 -0
  370. package/src/i18n/messagebundle_zh_CN.properties +2 -0
  371. package/src/i18n/messagebundle_zh_TW.properties +2 -0
  372. package/src/react18/createReactComponent.tsx +140 -0
  373. package/src/thirdparty/preact/preact.module.js +1 -1
@@ -0,0 +1,2 @@
1
+ "use strict";import o from"../getSharedResource.js";import s from"../EventProvider.js";const g=()=>o("ConfigChange.eventProvider",new s),r=()=>o("ConfigChange.values",{}),a="configChange",t=new Set,d=(n,e)=>{r()[n]=e,t.add(n);try{g().fireEvent(a,{name:n,value:e})}finally{t.delete(n)}},C=(n,e)=>{g().attachEvent(a,i=>{i.name===n&&!t.has(n)&&e(i.value)})},f=n=>r()[n];export{d as fireConfigChange,C as attachConfigChange,f as getSharedValue};
2
+ //# sourceMappingURL=ConfigurationSync.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/ConfigurationSync.ts"],
4
+ "sourcesContent": ["import getSharedResource from \"../getSharedResource.js\";\nimport EventProvider from \"../EventProvider.js\";\n\ntype ConfigChangeDetail = { name: string; value: unknown };\n\nconst getEventProvider = () => getSharedResource(\"ConfigChange.eventProvider\", new EventProvider<ConfigChangeDetail, void>());\nconst getSharedValues = () => getSharedResource<Record<string, unknown>>(\"ConfigChange.values\", {});\n\nconst CONFIG_CHANGE = \"configChange\";\n\n// Module-level skip flags \u2014 each runtime copy has its own Set,\n// so a runtime's own handler correctly skips when it fires.\nconst skipFlags = new Set<string>();\n\n/**\n * Stores value in shared map and fires a cross-runtime config change event.\n * The firing runtime's own handler is skipped via the skip-guard pattern.\n */\nconst fireConfigChange = (name: string, value: unknown): void => {\n\tgetSharedValues()[name] = value;\n\n\tskipFlags.add(name);\n\ttry {\n\t\tgetEventProvider().fireEvent(CONFIG_CHANGE, { name, value });\n\t} finally {\n\t\tskipFlags.delete(name);\n\t}\n};\n\n/**\n * Registers a per-setting cross-runtime listener.\n * The handler is only called when another runtime fires the change.\n */\nconst attachConfigChange = (name: string, handler: (value: any) => void): void => { // eslint-disable-line\n\tgetEventProvider().attachEvent(CONFIG_CHANGE, (detail: ConfigChangeDetail) => {\n\t\tif (detail.name === name && !skipFlags.has(name)) {\n\t\t\thandler(detail.value);\n\t\t}\n\t});\n};\n\n/**\n * Reads the last-set value from the shared values map.\n * Used by late-booting runtimes to pick up values already set by others.\n */\nconst getSharedValue = <T>(name: string): T | undefined => {\n\treturn getSharedValues()[name] as T | undefined;\n};\n\nexport { fireConfigChange, attachConfigChange, getSharedValue };\n"],
5
+ "mappings": "aAAA,OAAOA,MAAuB,0BAC9B,OAAOC,MAAmB,sBAI1B,MAAMC,EAAmB,IAAMF,EAAkB,6BAA8B,IAAIC,CAAyC,EACtHE,EAAkB,IAAMH,EAA2C,sBAAuB,CAAC,CAAC,EAE5FI,EAAgB,eAIhBC,EAAY,IAAI,IAMhBC,EAAmB,CAACC,EAAcC,IAAyB,CAChEL,EAAgB,EAAEI,CAAI,EAAIC,EAE1BH,EAAU,IAAIE,CAAI,EAClB,GAAI,CACHL,EAAiB,EAAE,UAAUE,EAAe,CAAE,KAAAG,EAAM,MAAAC,CAAM,CAAC,CAC5D,QAAE,CACDH,EAAU,OAAOE,CAAI,CACtB,CACD,EAMME,EAAqB,CAACF,EAAcG,IAAwC,CACjFR,EAAiB,EAAE,YAAYE,EAAgBO,GAA+B,CACzEA,EAAO,OAASJ,GAAQ,CAACF,EAAU,IAAIE,CAAI,GAC9CG,EAAQC,EAAO,KAAK,CAEtB,CAAC,CACF,EAMMC,EAAqBL,GACnBJ,EAAgB,EAAEI,CAAI,EAG9B,OAASD,KAAA,iBAAkBG,KAAA,mBAAoBG,KAAA",
6
+ "names": ["getSharedResource", "EventProvider", "getEventProvider", "getSharedValues", "CONFIG_CHANGE", "skipFlags", "fireConfigChange", "name", "value", "attachConfigChange", "handler", "detail", "getSharedValue"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";import{getLanguage as g,getFetchDefaultLanguage as r}from"../InitialConfiguration.js";import{fireLanguageChange as u}from"../locale/languageChange.js";import{reRenderAllUI5Elements as i}from"../Render.js";import{DEFAULT_LANGUAGE as o}from"../generated/AssetParameters.js";import{isBooted as f}from"../Boot.js";import{attachConfigurationReset as d}from"./ConfigurationReset.js";let e,t;d(()=>{e=void 0,t=void 0});let a=!1;const s=()=>a,l=()=>(e===void 0&&(e=g()),e),L=async n=>{e!==n&&(a=!0,e=n,await u(n),a=!1,f()&&await i({languageAware:!0}))},c=()=>o,m=n=>{t=n},h=()=>(t===void 0&&(t=r()),t);export{l as getLanguage,L as setLanguage,c as getDefaultLanguage,m as setFetchDefaultLanguage,h as getFetchDefaultLanguage,s as getLanguageChangePending};
1
+ "use strict";import{getLanguage as i,getFetchDefaultLanguage as o}from"../InitialConfiguration.js";import{fireLanguageChange as g}from"../locale/languageChange.js";import{reRenderAllUI5Elements as r}from"../Render.js";import{DEFAULT_LANGUAGE as f}from"../generated/AssetParameters.js";import{isBooted as u}from"../Boot.js";import{attachConfigurationReset as s}from"./ConfigurationReset.js";import{fireConfigChange as d,attachConfigChange as l,getSharedValue as m}from"./ConfigurationSync.js";let n,t;s(()=>{n=void 0,t=void 0});let a=!1;l("language",e=>{n=e,a=!0,g(e).then(()=>{a=!1,u()&&r({languageAware:!0})})});const c=()=>a,L=()=>(n===void 0&&(n=m("language")??i()),n),h=async e=>{n!==e&&(a=!0,n=e,d("language",e),await g(e),a=!1,u()&&await r({languageAware:!0}))},C=()=>f,p=e=>{t=e},D=()=>(t===void 0&&(t=o()),t);export{L as getLanguage,h as setLanguage,C as getDefaultLanguage,p as setFetchDefaultLanguage,D as getFetchDefaultLanguage,c as getLanguageChangePending};
2
2
  //# sourceMappingURL=Language.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/Language.ts"],
4
- "sourcesContent": ["import {\n\tgetLanguage as getConfiguredLanguage,\n\tgetFetchDefaultLanguage as getConfiguredFetchDefaultLanguage,\n} from \"../InitialConfiguration.js\";\nimport { fireLanguageChange } from \"../locale/languageChange.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\nimport { isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet curLanguage: string | undefined;\nlet fetchDefaultLanguage: boolean | undefined;\n\nattachConfigurationReset(() => {\n\tcurLanguage = undefined;\n\tfetchDefaultLanguage = undefined;\n});\n\n// Flag indicating that a language change is in progress and not yet complete.\n// While this flag is true, language-aware components will not re-render.\n// These components may rely on language-specific data (e.g., CLDR, language bundles),\n// which might be unavailable during the loading phase.\n// During this phase, all re-rendering is postponed.\n// Once all necessary language data has been loaded, the language change\n// will trigger a re-render of all language-aware components.\nlet languageChangePending = false;\n\nconst getLanguageChangePending = () => languageChangePending;\n\n/**\n * Returns the currently configured language, or the browser language as a fallback.\n * @public\n * @returns {string}\n */\nconst getLanguage = (): string | undefined => {\n\tif (curLanguage === undefined) {\n\t\tcurLanguage = getConfiguredLanguage();\n\t}\n\treturn curLanguage;\n};\n\n/**\n * Changes the current language, re-fetches all message bundles, updates all language-aware components\n * and returns a promise that resolves when all rendering is done.\n *\n * @param {string} language\n * @public\n * @returns {Promise<void>}\n */\nconst setLanguage = async (language: string): Promise<void> => {\n\tif (curLanguage === language) {\n\t\treturn;\n\t}\n\n\tlanguageChangePending = true;\n\tcurLanguage = language;\n\n\tawait fireLanguageChange(language);\n\n\tlanguageChangePending = false;\n\n\tif (isBooted()) {\n\t\tawait reRenderAllUI5Elements({ languageAware: true });\n\t}\n};\n\n/**\n * Returns the default languague.\n *\n * Note: Default language might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultLanguage = (): string => {\n\treturn DEFAULT_LANGUAGE;\n};\n\n/**\n * Defines if the default language, that is inlined, should be\n * fetched over the network instead of using the inlined one.\n * **Note:** By default the language will not be fetched.\n *\n * @public\n * @param {boolean} fetchDefaultLang\n */\nconst setFetchDefaultLanguage = (fetchDefaultLang: boolean) => {\n\tfetchDefaultLanguage = fetchDefaultLang;\n};\n\n/**\n * Returns if the default language, that is inlined, should be fetched over the network.\n * @public\n * @returns {boolean}\n */\nconst getFetchDefaultLanguage = (): boolean => {\n\tif (fetchDefaultLanguage === undefined) {\n\t\tfetchDefaultLanguage = getConfiguredFetchDefaultLanguage();\n\t}\n\n\treturn fetchDefaultLanguage;\n};\n\nexport {\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n\tgetLanguageChangePending,\n};\n"],
5
- "mappings": "aAAA,OACC,eAAeA,EACf,2BAA2BC,MACrB,6BACP,OAAS,sBAAAC,MAA0B,8BACnC,OAAS,0BAAAC,MAA8B,eACvC,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EACAC,EAEJF,EAAyB,IAAM,CAC9BC,EAAc,OACdC,EAAuB,MACxB,CAAC,EASD,IAAIC,EAAwB,GAE5B,MAAMC,EAA2B,IAAMD,EAOjCE,EAAc,KACfJ,IAAgB,SACnBA,EAAcP,EAAsB,GAE9BO,GAWFK,EAAc,MAAOC,GAAoC,CAC1DN,IAAgBM,IAIpBJ,EAAwB,GACxBF,EAAcM,EAEd,MAAMX,EAAmBW,CAAQ,EAEjCJ,EAAwB,GAEpBJ,EAAS,GACZ,MAAMF,EAAuB,CAAE,cAAe,EAAK,CAAC,EAEtD,EAUMW,EAAqB,IACnBV,EAWFW,EAA2BC,GAA8B,CAC9DR,EAAuBQ,CACxB,EAOMC,EAA0B,KAC3BT,IAAyB,SAC5BA,EAAuBP,EAAkC,GAGnDO,GAGR,OACCG,KAAA,YACAC,KAAA,YACAE,KAAA,mBACAC,KAAA,wBACAE,KAAA,wBACAP,KAAA",
6
- "names": ["getConfiguredLanguage", "getConfiguredFetchDefaultLanguage", "fireLanguageChange", "reRenderAllUI5Elements", "DEFAULT_LANGUAGE", "isBooted", "attachConfigurationReset", "curLanguage", "fetchDefaultLanguage", "languageChangePending", "getLanguageChangePending", "getLanguage", "setLanguage", "language", "getDefaultLanguage", "setFetchDefaultLanguage", "fetchDefaultLang", "getFetchDefaultLanguage"]
4
+ "sourcesContent": ["import {\n\tgetLanguage as getConfiguredLanguage,\n\tgetFetchDefaultLanguage as getConfiguredFetchDefaultLanguage,\n} from \"../InitialConfiguration.js\";\nimport { fireLanguageChange } from \"../locale/languageChange.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\nimport { isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\nimport { fireConfigChange, attachConfigChange, getSharedValue } from \"./ConfigurationSync.js\";\n\nlet curLanguage: string | undefined;\nlet fetchDefaultLanguage: boolean | undefined;\n\nattachConfigurationReset(() => {\n\tcurLanguage = undefined;\n\tfetchDefaultLanguage = undefined;\n});\n\n// Flag indicating that a language change is in progress and not yet complete.\n// While this flag is true, language-aware components will not re-render.\n// These components may rely on language-specific data (e.g., CLDR, language bundles),\n// which might be unavailable during the loading phase.\n// During this phase, all re-rendering is postponed.\n// Once all necessary language data has been loaded, the language change\n// will trigger a re-render of all language-aware components.\nlet languageChangePending = false;\n\nattachConfigChange(\"language\", (language: string) => {\n\tcurLanguage = language;\n\tlanguageChangePending = true;\n\tfireLanguageChange(language).then(() => {\n\t\tlanguageChangePending = false;\n\t\tif (isBooted()) {\n\t\t\treRenderAllUI5Elements({ languageAware: true });\n\t\t}\n\t});\n});\n\nconst getLanguageChangePending = () => languageChangePending;\n\n/**\n * Returns the currently configured language, or the browser language as a fallback.\n * @public\n * @returns {string}\n */\nconst getLanguage = (): string | undefined => {\n\tif (curLanguage === undefined) {\n\t\tcurLanguage = getSharedValue<string>(\"language\") ?? getConfiguredLanguage();\n\t}\n\treturn curLanguage;\n};\n\n/**\n * Changes the current language, re-fetches all message bundles, updates all language-aware components\n * and returns a promise that resolves when all rendering is done.\n *\n * @param {string} language\n * @public\n * @returns {Promise<void>}\n */\nconst setLanguage = async (language: string): Promise<void> => {\n\tif (curLanguage === language) {\n\t\treturn;\n\t}\n\n\tlanguageChangePending = true;\n\tcurLanguage = language;\n\n\tfireConfigChange(\"language\", language);\n\n\tawait fireLanguageChange(language);\n\n\tlanguageChangePending = false;\n\n\tif (isBooted()) {\n\t\tawait reRenderAllUI5Elements({ languageAware: true });\n\t}\n};\n\n/**\n * Returns the default languague.\n *\n * Note: Default language might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultLanguage = (): string => {\n\treturn DEFAULT_LANGUAGE;\n};\n\n/**\n * Defines if the default language, that is inlined, should be\n * fetched over the network instead of using the inlined one.\n * **Note:** By default the language will not be fetched.\n *\n * @public\n * @param {boolean} fetchDefaultLang\n */\nconst setFetchDefaultLanguage = (fetchDefaultLang: boolean) => {\n\tfetchDefaultLanguage = fetchDefaultLang;\n};\n\n/**\n * Returns if the default language, that is inlined, should be fetched over the network.\n * @public\n * @returns {boolean}\n */\nconst getFetchDefaultLanguage = (): boolean => {\n\tif (fetchDefaultLanguage === undefined) {\n\t\tfetchDefaultLanguage = getConfiguredFetchDefaultLanguage();\n\t}\n\n\treturn fetchDefaultLanguage;\n};\n\nexport {\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n\tgetLanguageChangePending,\n};\n"],
5
+ "mappings": "aAAA,OACC,eAAeA,EACf,2BAA2BC,MACrB,6BACP,OAAS,sBAAAC,MAA0B,8BACnC,OAAS,0BAAAC,MAA8B,eACvC,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BACzC,OAAS,oBAAAC,EAAkB,sBAAAC,EAAoB,kBAAAC,MAAsB,yBAErE,IAAIC,EACAC,EAEJL,EAAyB,IAAM,CAC9BI,EAAc,OACdC,EAAuB,MACxB,CAAC,EASD,IAAIC,EAAwB,GAE5BJ,EAAmB,WAAaK,GAAqB,CACpDH,EAAcG,EACdD,EAAwB,GACxBV,EAAmBW,CAAQ,EAAE,KAAK,IAAM,CACvCD,EAAwB,GACpBP,EAAS,GACZF,EAAuB,CAAE,cAAe,EAAK,CAAC,CAEhD,CAAC,CACF,CAAC,EAED,MAAMW,EAA2B,IAAMF,EAOjCG,EAAc,KACfL,IAAgB,SACnBA,EAAcD,EAAuB,UAAU,GAAKT,EAAsB,GAEpEU,GAWFM,EAAc,MAAOH,GAAoC,CAC1DH,IAAgBG,IAIpBD,EAAwB,GACxBF,EAAcG,EAEdN,EAAiB,WAAYM,CAAQ,EAErC,MAAMX,EAAmBW,CAAQ,EAEjCD,EAAwB,GAEpBP,EAAS,GACZ,MAAMF,EAAuB,CAAE,cAAe,EAAK,CAAC,EAEtD,EAUMc,EAAqB,IACnBb,EAWFc,EAA2BC,GAA8B,CAC9DR,EAAuBQ,CACxB,EAOMC,EAA0B,KAC3BT,IAAyB,SAC5BA,EAAuBV,EAAkC,GAGnDU,GAGR,OACCI,KAAA,YACAC,KAAA,YACAC,KAAA,mBACAC,KAAA,wBACAE,KAAA,wBACAN,KAAA",
6
+ "names": ["getConfiguredLanguage", "getConfiguredFetchDefaultLanguage", "fireLanguageChange", "reRenderAllUI5Elements", "DEFAULT_LANGUAGE", "isBooted", "attachConfigurationReset", "fireConfigChange", "attachConfigChange", "getSharedValue", "curLanguage", "fetchDefaultLanguage", "languageChangePending", "language", "getLanguageChangePending", "getLanguage", "setLanguage", "getDefaultLanguage", "setFetchDefaultLanguage", "fetchDefaultLang", "getFetchDefaultLanguage"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{getTheme as i}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as o}from"../Render.js";import s from"../theming/applyTheme.js";import m from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as a,SUPPORTED_THEMES as h}from"../generated/AssetParameters.js";import{boot as T,isBooted as c}from"../Boot.js";import{attachConfigurationReset as f}from"./ConfigurationReset.js";let t;f(()=>{t=void 0});const r=()=>(t===void 0&&(t=i()),t),u=async e=>{t!==e&&(t=e,c()&&(await s(t),await o({themeAware:!0})))},g=()=>a,p=e=>r()===e,n=()=>{const e=r();return l(e)?!e.startsWith("sap_horizon"):!m()?.baseThemeName?.startsWith("sap_horizon")},d=async()=>(await T(),n()),l=e=>h.includes(e);export{r as getTheme,u as setTheme,p as isTheme,n as isLegacyThemeFamily,d as isLegacyThemeFamilyAsync,g as getDefaultTheme};
1
+ "use strict";import{getTheme as a}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as n}from"../Render.js";import i from"../theming/applyTheme.js";import h from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as g,SUPPORTED_THEMES as f}from"../generated/AssetParameters.js";import{boot as u,isBooted as s}from"../Boot.js";import{attachConfigurationReset as T}from"./ConfigurationReset.js";import{fireConfigChange as c,attachConfigChange as d,getSharedValue as p}from"./ConfigurationSync.js";let t,o;T(()=>{t=void 0}),d("theme",e=>{t=e,s()&&i(t).then(()=>n({themeAware:!0}))});const r=()=>(t===void 0&&(t=p("theme")??a()),t),l=async e=>{t!==e&&(t=e,c("theme",e),s()&&(await i(t),await n({themeAware:!0})))},y=()=>g,E=e=>r()===e,m=()=>{const e=r();return C(e)?!e.startsWith("sap_horizon"):!h()?.baseThemeName?.startsWith("sap_horizon")},w=async()=>(await u(),m()),C=e=>f.includes(e),A=()=>o,B=e=>{o=e};export{r as getTheme,l as setTheme,E as isTheme,m as isLegacyThemeFamily,w as isLegacyThemeFamilyAsync,y as getDefaultTheme,A as getBaseTheme,B as setBaseTheme};
2
2
  //# sourceMappingURL=Theme.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/Theme.ts"],
4
- "sourcesContent": ["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport getThemeDesignerTheme from \"../theming/getThemeDesignerTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet curTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getThemeDesignerTheme()?.baseThemeName?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n};\n"],
5
- "mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAOC,MAA2B,sCAClC,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,aAC/B,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAW,MACZ,CAAC,EAOD,MAAMC,EAAW,KACZD,IAAa,SAChBA,EAAWT,EAAmB,GAGxBS,GASFE,EAAW,MAAOC,GAAiC,CACpDH,IAAaG,IAIjBH,EAAWG,EAEPL,EAAS,IAEZ,MAAML,EAAWO,CAAQ,EACzB,MAAMR,EAAuB,CAAE,WAAY,EAAK,CAAC,GAEnD,EAUMY,EAAkB,IAChBT,EASFU,EAAWF,GACTF,EAAS,IAAME,EAUjBG,EAAsB,IAAM,CACjC,MAAMC,EAAeN,EAAS,EAE9B,OAAKO,EAAaD,CAAY,EAIvB,CAACA,EAAa,WAAW,aAAa,EAHrC,CAACb,EAAsB,GAAG,eAAe,WAAW,aAAa,CAI1E,EAEMe,EAA2B,UAChC,MAAMZ,EAAK,EACJS,EAAoB,GAGtBE,EAAgBL,GAAkBP,EAAiB,SAASO,CAAK,EAEvE,OACCF,KAAA,SACAC,KAAA,SACAG,KAAA,QACAC,KAAA,oBACAG,KAAA,yBACAL,KAAA",
6
- "names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "attachConfigurationReset", "curTheme", "getTheme", "setTheme", "theme", "getDefaultTheme", "isTheme", "isLegacyThemeFamily", "currentTheme", "isKnownTheme", "isLegacyThemeFamilyAsync"]
4
+ "sourcesContent": ["import { getTheme as getConfiguredTheme } from \"../InitialConfiguration.js\";\nimport { reRenderAllUI5Elements } from \"../Render.js\";\nimport applyTheme from \"../theming/applyTheme.js\";\nimport getThemeDesignerTheme from \"../theming/getThemeDesignerTheme.js\";\nimport { DEFAULT_THEME, SUPPORTED_THEMES } from \"../generated/AssetParameters.js\";\nimport { boot, isBooted } from \"../Boot.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\nimport { fireConfigChange, attachConfigChange, getSharedValue } from \"./ConfigurationSync.js\";\n\nlet curTheme: string | undefined;\nlet curBaseTheme: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurTheme = undefined;\n});\n\nattachConfigChange(\"theme\", (theme: string) => {\n\tcurTheme = theme;\n\tif (isBooted()) {\n\t\tapplyTheme(curTheme).then(() => reRenderAllUI5Elements({ themeAware: true }));\n\t}\n});\n\n/**\n * Returns the current theme.\n * @public\n * @returns {string} the current theme name\n */\nconst getTheme = (): string => {\n\tif (curTheme === undefined) {\n\t\tcurTheme = getSharedValue<string>(\"theme\") ?? getConfiguredTheme();\n\t}\n\n\treturn curTheme;\n};\n\n/**\n * Applies a new theme after fetching its assets from the network.\n * @public\n * @param {string} theme the name of the new theme\n * @returns {Promise<void>} a promise that is resolved when the new theme assets have been fetched and applied to the DOM\n */\nconst setTheme = async (theme: string): Promise<void> => {\n\tif (curTheme === theme) {\n\t\treturn;\n\t}\n\n\tcurTheme = theme;\n\n\tfireConfigChange(\"theme\", theme);\n\n\tif (isBooted()) {\n\t\t// Update CSS Custom Properties\n\t\tawait applyTheme(curTheme);\n\t\tawait reRenderAllUI5Elements({ themeAware: true });\n\t}\n};\n\n/**\n * Returns the default theme.\n *\n * Note: Default theme might be different than the configurated one.\n *\n * @public\n * @returns {string}\n */\nconst getDefaultTheme = (): string => {\n\treturn DEFAULT_THEME;\n};\n\n/**\n * Returns if the given theme name is the one currently applied.\n * @private\n * @param {string} theme\n * @returns {boolean}\n */\nconst isTheme = (theme: string) => {\n\treturn getTheme() === theme;\n};\n\n/**\n * Returns if the currently set theme is part of legacy theme families (\"sap_fiori_3\").\n * **Note**: in addition, the method checks the base theme of a custom theme, built via the ThemeDesigner.\n *\n * @private\n * @returns { boolean }\n */\nconst isLegacyThemeFamily = () => {\n\tconst currentTheme = getTheme();\n\n\tif (!isKnownTheme(currentTheme)) {\n\t\treturn !getThemeDesignerTheme()?.baseThemeName?.startsWith(\"sap_horizon\");\n\t}\n\n\treturn !currentTheme.startsWith(\"sap_horizon\");\n};\n\nconst isLegacyThemeFamilyAsync = async () => {\n\tawait boot();\n\treturn isLegacyThemeFamily();\n};\n\nconst isKnownTheme = (theme: string) => SUPPORTED_THEMES.includes(theme);\n\n/**\n * Returns the base theme of external theme.\n * @private\n * @returns {string | undefined} the base theme name\n */\nconst getBaseTheme = (): string | undefined => {\n\treturn curBaseTheme;\n};\n\n/**\n * Sets the base theme of the current external theme.\n * @param { string | undefined } theme the name of the new base theme\n * @private\n */\nconst setBaseTheme = (theme: string | undefined): void => {\n\tcurBaseTheme = theme;\n};\n\nexport {\n\tgetTheme,\n\tsetTheme,\n\tisTheme,\n\tisLegacyThemeFamily,\n\tisLegacyThemeFamilyAsync,\n\tgetDefaultTheme,\n\tgetBaseTheme,\n\tsetBaseTheme,\n};\n"],
5
+ "mappings": "aAAA,OAAS,YAAYA,MAA0B,6BAC/C,OAAS,0BAAAC,MAA8B,eACvC,OAAOC,MAAgB,2BACvB,OAAOC,MAA2B,sCAClC,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,kCAChD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,aAC/B,OAAS,4BAAAC,MAAgC,0BACzC,OAAS,oBAAAC,EAAkB,sBAAAC,EAAoB,kBAAAC,MAAsB,yBAErE,IAAIC,EACAC,EAEJL,EAAyB,IAAM,CAC9BI,EAAW,MACZ,CAAC,EAEDF,EAAmB,QAAUI,GAAkB,CAC9CF,EAAWE,EACPP,EAAS,GACZL,EAAWU,CAAQ,EAAE,KAAK,IAAMX,EAAuB,CAAE,WAAY,EAAK,CAAC,CAAC,CAE9E,CAAC,EAOD,MAAMc,EAAW,KACZH,IAAa,SAChBA,EAAWD,EAAuB,OAAO,GAAKX,EAAmB,GAG3DY,GASFI,EAAW,MAAOF,GAAiC,CACpDF,IAAaE,IAIjBF,EAAWE,EAEXL,EAAiB,QAASK,CAAK,EAE3BP,EAAS,IAEZ,MAAML,EAAWU,CAAQ,EACzB,MAAMX,EAAuB,CAAE,WAAY,EAAK,CAAC,GAEnD,EAUMgB,EAAkB,IAChBb,EASFc,EAAWJ,GACTC,EAAS,IAAMD,EAUjBK,EAAsB,IAAM,CACjC,MAAMC,EAAeL,EAAS,EAE9B,OAAKM,EAAaD,CAAY,EAIvB,CAACA,EAAa,WAAW,aAAa,EAHrC,CAACjB,EAAsB,GAAG,eAAe,WAAW,aAAa,CAI1E,EAEMmB,EAA2B,UAChC,MAAMhB,EAAK,EACJa,EAAoB,GAGtBE,EAAgBP,GAAkBT,EAAiB,SAASS,CAAK,EAOjES,EAAe,IACbV,EAQFW,EAAgBV,GAAoC,CACzDD,EAAeC,CAChB,EAEA,OACCC,KAAA,SACAC,KAAA,SACAE,KAAA,QACAC,KAAA,oBACAG,KAAA,yBACAL,KAAA,gBACAM,KAAA,aACAC,KAAA",
6
+ "names": ["getConfiguredTheme", "reRenderAllUI5Elements", "applyTheme", "getThemeDesignerTheme", "DEFAULT_THEME", "SUPPORTED_THEMES", "boot", "isBooted", "attachConfigurationReset", "fireConfigChange", "attachConfigChange", "getSharedValue", "curTheme", "curBaseTheme", "theme", "getTheme", "setTheme", "getDefaultTheme", "isTheme", "isLegacyThemeFamily", "currentTheme", "isKnownTheme", "isLegacyThemeFamilyAsync", "getBaseTheme", "setBaseTheme"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as a}from"../InitialConfiguration.js";import{getTheme as m}from"./Theme.js";import{attachConfigurationReset as d}from"./ConfigurationReset.js";let t;d(()=>{t=void 0});const n=()=>(t===void 0&&(t=a()),t),c=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(m())}},u=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(u(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,c as setThemeRoot,i as attachCustomThemeStylesToHead};
1
+ "use strict";import m from"../util/createLinkInHead.js";import a from"../validateThemeRoot.js";import{getThemeRoot as d}from"../InitialConfiguration.js";import{getTheme as c}from"./Theme.js";import{attachConfigurationReset as u}from"./ConfigurationReset.js";let t;u(()=>{t=void 0});const r=()=>(t===void 0&&(t=d()),t),h=e=>{if(t!==e)return t=e,s(c())},f=(e,o)=>`${o}Base/baseLib/${e}/css_variables.css`,s=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o);const n=r();if(!n)return;const i=a(n);if(!i){console.warn(`The ${n} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}await m(f(e,i),{"sap-ui-webcomponents-theme":e})};export{r as getThemeRoot,h as setThemeRoot,s as attachCustomThemeStylesToHead};
2
2
  //# sourceMappingURL=ThemeRoot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/ThemeRoot.ts"],
4
- "sourcesContent": ["import createLinkInHead from \"../util/createLinkInHead.js\";\nimport validateThemeRoot from \"../validateThemeRoot.js\";\nimport { getThemeRoot as getConfiguredThemeRoot } from \"../InitialConfiguration.js\";\nimport { getTheme } from \"./Theme.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet currThemeRoot: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurrThemeRoot = undefined;\n});\n\n/**\n * Returns the current theme root.\n *\n * @public\n * @since 1.14.0\n * @returns { string } the current theme root\n */\nconst getThemeRoot = (): string | undefined => {\n\tif (currThemeRoot === undefined) {\n\t\tcurrThemeRoot = getConfiguredThemeRoot();\n\t}\n\n\treturn currThemeRoot;\n};\n\n/**\n * Sets theme root for the current theme.\n * When set, the framework will validate the theme root and fetch the theme styles (CSS variables) from this location.\n *\n * **Note:** The feature is specific to custom themes, created with the `UI Theme Designer`.\n * The provided theme root is used only as a base to construct the actual location of the theme styles: `{themeRoot}/.../css_variables.css`.\n *\n * **Note:** Certain security restrictions will apply before fetching the theme assets.\n * Absolute URLs to a different origin than the current page will result in using the current page as an origin.\n *\n * **Important:** To use this feature you must explicitly allow specific origins by using &lt;meta name=\"sap-allowed-theme-origins\" content=\"https://my-example-host.com/\"&gt; tag inside the &lt;head&gt; of the page.\n * Failing to do so will result in a warning in the console and the theme root will not be set.\n *\n * @public\n * @since 1.14.0\n * @param { string } themeRoot the new theme root\n * @returns { Promise<void> }\n */\nconst setThemeRoot = (themeRoot: string): Promise<void> | undefined => {\n\tif (currThemeRoot === themeRoot) {\n\t\treturn;\n\t}\n\n\tcurrThemeRoot = themeRoot;\n\n\tif (!validateThemeRoot(themeRoot)) {\n\t\tconsole.warn(`The ${themeRoot} is not valid. Check the allowed origins as suggested in the \"setThemeRoot\" description.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\treturn attachCustomThemeStylesToHead(getTheme());\n};\n\nconst formatThemeLink = (theme: string) => {\n\treturn `${getThemeRoot()!}Base/baseLib/${theme}/css_variables.css`; // theme root is always set at this point.\n};\n\nconst attachCustomThemeStylesToHead = async (theme: string): Promise<void> => {\n\tconst link = document.querySelector(`[sap-ui-webcomponents-theme=\"${theme}\"]`);\n\n\tif (link) {\n\t\tdocument.head.removeChild(link);\n\t}\n\n\tawait createLinkInHead(formatThemeLink(theme), { \"sap-ui-webcomponents-theme\": theme });\n};\n\nexport {\n\tgetThemeRoot,\n\tsetThemeRoot,\n\tattachCustomThemeStylesToHead,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAsB,8BAC7B,OAAOC,MAAuB,0BAC9B,OAAS,gBAAgBC,MAA8B,6BACvD,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAgB,MACjB,CAAC,EASD,MAAMC,EAAe,KAChBD,IAAkB,SACrBA,EAAgBH,EAAuB,GAGjCG,GAqBFE,EAAgBC,GAAiD,CACtE,GAAIH,IAAkBG,EAMtB,IAFAH,EAAgBG,EAEZ,CAACP,EAAkBO,CAAS,EAAG,CAClC,QAAQ,KAAK,OAAOA,CAAS,0FAA0F,EACvH,MACD,CAEA,OAAOC,EAA8BN,EAAS,CAAC,EAChD,EAEMO,EAAmBC,GACjB,GAAGL,EAAa,CAAE,gBAAgBK,CAAK,qBAGzCF,EAAgC,MAAOE,GAAiC,CAC7E,MAAMC,EAAO,SAAS,cAAc,gCAAgCD,CAAK,IAAI,EAEzEC,GACH,SAAS,KAAK,YAAYA,CAAI,EAG/B,MAAMZ,EAAiBU,EAAgBC,CAAK,EAAG,CAAE,6BAA8BA,CAAM,CAAC,CACvF,EAEA,OACCL,KAAA,aACAC,KAAA,aACAE,KAAA",
6
- "names": ["createLinkInHead", "validateThemeRoot", "getConfiguredThemeRoot", "getTheme", "attachConfigurationReset", "currThemeRoot", "getThemeRoot", "setThemeRoot", "themeRoot", "attachCustomThemeStylesToHead", "formatThemeLink", "theme", "link"]
4
+ "sourcesContent": ["import createLinkInHead from \"../util/createLinkInHead.js\";\nimport validateThemeRoot from \"../validateThemeRoot.js\";\nimport { getThemeRoot as getConfiguredThemeRoot } from \"../InitialConfiguration.js\";\nimport { getTheme } from \"./Theme.js\";\nimport { attachConfigurationReset } from \"./ConfigurationReset.js\";\n\nlet currThemeRoot: string | undefined;\n\nattachConfigurationReset(() => {\n\tcurrThemeRoot = undefined;\n});\n\n/**\n * Returns the current theme root.\n *\n * @public\n * @since 1.14.0\n * @returns { string } the current theme root\n */\nconst getThemeRoot = (): string | undefined => {\n\tif (currThemeRoot === undefined) {\n\t\tcurrThemeRoot = getConfiguredThemeRoot();\n\t}\n\n\treturn currThemeRoot;\n};\n\n/**\n * Sets theme root for the current theme.\n * When set, the framework will validate the theme root and fetch the theme styles (CSS variables) from this location.\n *\n * **Note:** The feature is specific to custom themes, created with the `UI Theme Designer`.\n * The provided theme root is used only as a base to construct the actual location of the theme styles: `{themeRoot}/.../css_variables.css`.\n *\n * **Note:** Certain security restrictions will apply before fetching the theme assets.\n * Absolute URLs to a different origin than the current page will result in using the current page as an origin.\n *\n * **Important:** To use this feature you must explicitly allow specific origins by using &lt;meta name=\"sap-allowed-theme-origins\" content=\"https://my-example-host.com/\"&gt; tag inside the &lt;head&gt; of the page.\n * Failing to do so will result in a warning in the console and the theme root will not be set.\n *\n * @public\n * @since 1.14.0\n * @param { string } themeRoot the new theme root\n * @returns { Promise<void> }\n */\nconst setThemeRoot = (themeRoot: string): Promise<void> | undefined => {\n\tif (currThemeRoot === themeRoot) {\n\t\treturn;\n\t}\n\n\tcurrThemeRoot = themeRoot;\n\n\treturn attachCustomThemeStylesToHead(getTheme());\n};\n\nconst formatThemeLink = (theme: string, validatedThemeRoot: string) => {\n\treturn `${validatedThemeRoot}Base/baseLib/${theme}/css_variables.css`;\n};\n\nconst attachCustomThemeStylesToHead = async (theme: string): Promise<void> => {\n\tconst link = document.querySelector(`[sap-ui-webcomponents-theme=\"${theme}\"]`);\n\n\tif (link) {\n\t\tdocument.head.removeChild(link);\n\t}\n\n\tconst themeRoot = getThemeRoot();\n\n\tif (!themeRoot) {\n\t\treturn;\n\t}\n\n\tconst validatedThemeRoot = validateThemeRoot(themeRoot);\n\n\tif (!validatedThemeRoot) {\n\t\tconsole.warn(`The ${themeRoot} is not valid. Check the allowed origins as suggested in the \"setThemeRoot\" description.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tawait createLinkInHead(formatThemeLink(theme, validatedThemeRoot), { \"sap-ui-webcomponents-theme\": theme });\n};\n\nexport {\n\tgetThemeRoot,\n\tsetThemeRoot,\n\tattachCustomThemeStylesToHead,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAsB,8BAC7B,OAAOC,MAAuB,0BAC9B,OAAS,gBAAgBC,MAA8B,6BACvD,OAAS,YAAAC,MAAgB,aACzB,OAAS,4BAAAC,MAAgC,0BAEzC,IAAIC,EAEJD,EAAyB,IAAM,CAC9BC,EAAgB,MACjB,CAAC,EASD,MAAMC,EAAe,KAChBD,IAAkB,SACrBA,EAAgBH,EAAuB,GAGjCG,GAqBFE,EAAgBC,GAAiD,CACtE,GAAIH,IAAkBG,EAItB,OAAAH,EAAgBG,EAETC,EAA8BN,EAAS,CAAC,CAChD,EAEMO,EAAkB,CAACC,EAAeC,IAChC,GAAGA,CAAkB,gBAAgBD,CAAK,qBAG5CF,EAAgC,MAAOE,GAAiC,CAC7E,MAAME,EAAO,SAAS,cAAc,gCAAgCF,CAAK,IAAI,EAEzEE,GACH,SAAS,KAAK,YAAYA,CAAI,EAG/B,MAAML,EAAYF,EAAa,EAE/B,GAAI,CAACE,EACJ,OAGD,MAAMI,EAAqBX,EAAkBO,CAAS,EAEtD,GAAI,CAACI,EAAoB,CACxB,QAAQ,KAAK,OAAOJ,CAAS,0FAA0F,EACvH,MACD,CAEA,MAAMR,EAAiBU,EAAgBC,EAAOC,CAAkB,EAAG,CAAE,6BAA8BD,CAAM,CAAC,CAC3G,EAEA,OACCL,KAAA,aACAC,KAAA,aACAE,KAAA",
6
+ "names": ["createLinkInHead", "validateThemeRoot", "getConfiguredThemeRoot", "getTheme", "attachConfigurationReset", "currThemeRoot", "getThemeRoot", "setThemeRoot", "themeRoot", "attachCustomThemeStylesToHead", "formatThemeLink", "theme", "validatedThemeRoot", "link"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";import{getIgnoreUrlParams as o}from"../InitialConfiguration.js";let r;const a=()=>(r===void 0&&(r=o()),r),n=e=>{r=e};export{a as getIgnoreUrlParams,n as setIgnoreUrlParams};
2
+ //# sourceMappingURL=UrlParams.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/UrlParams.ts"],
4
+ "sourcesContent": ["import { getIgnoreUrlParams as getConfiguredIgnoreUrlParams } from \"../InitialConfiguration.js\";\n\nlet _ignoreUrlParams: boolean;\n\n/**\n * Returns if the \"ignoreUrlParams\" configuration is set.\n * @public\n * @since 2.23.0\n * @returns { boolean }\n */\nconst getIgnoreUrlParams = (): boolean => {\n\tif (_ignoreUrlParams === undefined) {\n\t\t_ignoreUrlParams = getConfiguredIgnoreUrlParams();\n\t}\n\n\treturn _ignoreUrlParams;\n};\n\n/**\n * Defines the \"ignoreUrlParams\" setting.\n *\n * - When set to \"true\", the framework will not process URL parameters\n * (e.g. sap-ui-theme, sap-ui-language) during initialization.\n * - When set to \"false\" (default), URL parameters are processed normally.\n *\n * @public\n * @since 2.23.0\n * @param { boolean } ignoreUrlParams\n */\nconst setIgnoreUrlParams = (ignoreUrlParams: boolean) => {\n\t_ignoreUrlParams = ignoreUrlParams;\n};\n\nexport {\n\tgetIgnoreUrlParams,\n\tsetIgnoreUrlParams,\n};\n"],
5
+ "mappings": "aAAA,OAAS,sBAAsBA,MAAoC,6BAEnE,IAAIC,EAQJ,MAAMC,EAAqB,KACtBD,IAAqB,SACxBA,EAAmBD,EAA6B,GAG1CC,GAcFE,EAAsBC,GAA6B,CACxDH,EAAmBG,CACpB,EAEA,OACCF,KAAA,mBACAC,KAAA",
6
+ "names": ["getConfiguredIgnoreUrlParams", "_ignoreUrlParams", "getIgnoreUrlParams", "setIgnoreUrlParams", "ignoreUrlParams"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{createElement as d}from"react";export default function p(i){const s=i.getMetadata().getTag();return function(r){const n={};return Object.entries(r).forEach(([t,e])=>{if(t.startsWith("on")&&typeof e=="function"){const c=e;n[t]=o=>{const a=o.nativeEvent?.detail;a!==void 0&&(o.detail=a),c(o)}}else n[t]=e}),d(s,n)}}
2
+ //# sourceMappingURL=createReactComponent.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/createReactComponent.ts"],
4
+ "sourcesContent": ["/**\n * React wrapper factory for UI5 Web Components.\n *\n * This lightweight factory creates typed React components that wrap UI5 Web Components.\n * It handles:\n * - Event prop conversion (onXxx \u2192 ui5-xxx event listeners)\n * - Ref forwarding\n * - Children handling\n *\n * Note: Supports React >=19.\n *\n * Note: This is for documentation samples only - for production React apps,\n * use the official @ui5/webcomponents-react library.\n */\n\nimport { createElement } from \"react\";\nimport type UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n\n/**\n * Creates a React component wrapper for a UI5 Web Component.\n *\n * @param ComponentClass - The UI5 Web Component class (e.g., Button from \"@ui5/webcomponents/dist/Button.js\")\n * @returns A React component that renders the custom element with proper TypeScript types\n * @since 2.21.0\n * @example\n * import Button from \"@ui5/webcomponents/dist/Button.js\";\n * const ReactButton = createReactComponent(Button);\n */\nexport default function createReactComponent<T extends typeof UI5Element>(klass: T) {\n\tconst tag = klass.getMetadata().getTag();\n\n\treturn function Component(props: InstanceType<T>[\"_jsxProps\"]) {\n\t\tconst patchedProps: Record<string, unknown> = {};\n\n\t\tObject.entries(props as Record<string, unknown>).forEach(([key, value]) => {\n\t\t\tif (key.startsWith(\"on\") && typeof value === \"function\") {\n\t\t\t\t// React 19 wraps DOM events (change, click, input, etc.) in SyntheticEvent,\n\t\t\t\t// hiding CustomEvent.detail under nativeEvent.detail.\n\t\t\t\t// Patch all event handlers to restore detail from nativeEvent.\n\t\t\t\tconst originalHandler = value;\n\t\t\t\tpatchedProps[key] = (e: Event) => {\n\t\t\t\t\tconst nativeDetail = (e as unknown as { nativeEvent?: { detail: unknown } }).nativeEvent?.detail;\n\t\t\t\t\tif (nativeDetail !== undefined) {\n\t\t\t\t\t\t(e as unknown as { detail: unknown }).detail = nativeDetail;\n\t\t\t\t\t}\n\t\t\t\t\toriginalHandler(e);\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tpatchedProps[key] = value;\n\t\t\t}\n\t\t});\n\n\t\treturn createElement(tag, patchedProps);\n\t};\n}\n"],
5
+ "mappings": "aAeA,OAAS,iBAAAA,MAAqB,QAa9B,wBAAwBC,EAAkDC,EAAU,CACnF,MAAMC,EAAMD,EAAM,YAAY,EAAE,OAAO,EAEvC,OAAO,SAAmBE,EAAqC,CAC9D,MAAMC,EAAwC,CAAC,EAE/C,cAAO,QAAQD,CAAgC,EAAE,QAAQ,CAAC,CAACE,EAAKC,CAAK,IAAM,CAC1E,GAAID,EAAI,WAAW,IAAI,GAAK,OAAOC,GAAU,WAAY,CAIxD,MAAMC,EAAkBD,EACxBF,EAAaC,CAAG,EAAKG,GAAa,CACjC,MAAMC,EAAgBD,EAAuD,aAAa,OACtFC,IAAiB,SACnBD,EAAqC,OAASC,GAEhDF,EAAgBC,CAAC,CAClB,CACD,MACCJ,EAAaC,CAAG,EAAIC,CAEtB,CAAC,EAEMP,EAAcG,EAAKE,CAAY,CACvC,CACD",
6
+ "names": ["createElement", "createReactComponent", "klass", "tag", "props", "patchedProps", "key", "value", "originalHandler", "e", "nativeDetail"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";function d(t){return(r,a)=>{const n=r.constructor;Object.prototype.hasOwnProperty.call(n,"metadata")||(n.metadata={});const o=n.metadata;o.slots||(o.slots={});const e=o.slots;if(t&&t.default&&e.default)throw new Error("Only one slot can be the default slot.");const l=t&&t.default?"default":a;t=t||{type:HTMLElement},t.type||(t.type=HTMLElement),e[l]||(e[l]=t),t.default&&(delete e.default.default,e.default.propertyName=a),n.metadata.managedSlots=!0}}export default d;
2
+ //# sourceMappingURL=slot-strict.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/slot-strict.ts"],
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"../UI5Element.js\";\nimport type { Slot as SlotMetadata } from \"../UI5ElementMetadata.js\";\n\n/**\n * Decorator for declaring a slot in a UI5 Web Component.\n * It adds the slot metadata to the component's constructor.\n *\n * @public\n * @since 2.19.0\n * @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.\n *\n * Example usage:\n * ```ts\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n *\n * @slot()\n * header!: Slot<HTMLElement>;\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<HTMLElement>;\n * }\n * ```\n */\nfunction slot<\n\tT extends Record<K, Slot<unknown> | DefaultSlot<unknown>>,\n\tK extends string\n>(slotData?: SlotMetadata): (target: T, prop: K) => void {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : (slotKey as string);\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n}\n\nexport default slot;\n"],
5
+ "mappings": "aA2BA,SAASA,EAGPC,EAAuD,CACxD,MAAO,CAACC,EAAaC,IAA6B,CACjD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,QACbA,EAAS,MAAQ,CAAC,GAGnB,MAAMC,EAAeD,EAAS,MAE9B,GAAIJ,GAAYA,EAAS,SAAWK,EAAa,QAChD,MAAM,IAAI,MAAM,wCAAwC,EAGzD,MAAMC,EAAMN,GAAYA,EAAS,QAAU,UAAaE,EACxDF,EAAWA,GAAY,CAAE,KAAM,WAAY,EAEtCA,EAAS,OACbA,EAAS,KAAO,aAGZK,EAAaC,CAAG,IACpBD,EAAaC,CAAG,EAAIN,GAGjBA,EAAS,UACZ,OAAOK,EAAa,QAAQ,QAC5BA,EAAa,QAAQ,aAAeH,GAGrCC,EAAK,SAAS,aAAe,EAC9B,CACD,CAEA,eAAeJ",
6
+ "names": ["slot", "slotData", "target", "slotKey", "ctor", "metadata", "slotMetadata", "key"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/slot.ts"],
4
- "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"],
5
- "mappings": "aASA,MAAMA,EAAQC,GACN,CAACC,EAAaC,IAA6B,CACjD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,QACbA,EAAS,MAAQ,CAAC,GAGnB,MAAMC,EAAeD,EAAS,MAE9B,GAAIJ,GAAYA,EAAS,SAAWK,EAAa,QAChD,MAAM,IAAI,MAAM,wCAAwC,EAGzD,MAAMC,EAAMN,GAAYA,EAAS,QAAU,UAAYE,EACvDF,EAAWA,GAAY,CAAE,KAAM,WAAY,EAEtCA,EAAS,OACbA,EAAS,KAAO,aAGZK,EAAaC,CAAG,IACpBD,EAAaC,CAAG,EAAIN,GAGjBA,EAAS,UACZ,OAAOK,EAAa,QAAQ,QAC5BA,EAAa,QAAQ,aAAeH,GAGrCC,EAAK,SAAS,aAAe,EAC9B,EAGD,eAAeJ",
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.\n * For Example:\n * ```ts\n * // If you previously used the `slot` decorator:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\n *\n * // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n * @slot()\n * header!: Slot<T> // Array<T> -> Slot<T>\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>\n * }\n * ```\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"],
5
+ "mappings": "aA2BA,MAAMA,EAAQC,GACN,CAACC,EAAaC,IAA6B,CACjD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,QACbA,EAAS,MAAQ,CAAC,GAGnB,MAAMC,EAAeD,EAAS,MAE9B,GAAIJ,GAAYA,EAAS,SAAWK,EAAa,QAChD,MAAM,IAAI,MAAM,wCAAwC,EAGzD,MAAMC,EAAMN,GAAYA,EAAS,QAAU,UAAYE,EACvDF,EAAWA,GAAY,CAAE,KAAM,WAAY,EAEtCA,EAAS,OACbA,EAAS,KAAO,aAGZK,EAAaC,CAAG,IACpBD,EAAaC,CAAG,EAAIN,GAGjBA,EAAS,UACZ,OAAOK,EAAa,QAAQ,QAC5BA,EAAa,QAAQ,aAAeH,GAGrCC,EAAK,SAAS,aAAe,EAC9B,EAGD,eAAeJ",
6
6
  "names": ["slot", "slotData", "target", "slotKey", "ctor", "metadata", "slotMetadata", "key"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import o from"./decorators/customElement.js";import r from"./decorators/event.js";import m from"./decorators/event-strict.js";import t from"./decorators/property.js";import p from"./decorators/slot.js";import i from"./decorators/bound.js";import e from"./decorators/i18n.js";export{o as customElement,r as event,m as eventStrict,t as property,p as slot,i as bound,e as i18n};
1
+ "use strict";import o from"./decorators/customElement.js";import r from"./decorators/event.js";import t from"./decorators/event-strict.js";import m from"./decorators/property.js";import i from"./decorators/slot.js";import p from"./decorators/slot-strict.js";import e from"./decorators/bound.js";import f from"./decorators/i18n.js";export{o as customElement,r as event,t as eventStrict,m as property,i as slot,p as slotStrict,e as bound,f as i18n};
2
2
  //# sourceMappingURL=decorators.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/decorators.ts"],
4
- "sourcesContent": ["import customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport eventStrict from \"./decorators/event-strict.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\nimport bound from \"./decorators/bound.js\";\nimport i18n from \"./decorators/i18n.js\";\n\nexport {\n\tcustomElement,\n\tevent,\n\teventStrict,\n\tproperty,\n\tslot,\n\tbound,\n\ti18n,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAmB,gCAC1B,OAAOC,MAAW,wBAClB,OAAOC,MAAiB,+BACxB,OAAOC,MAAc,2BACrB,OAAOC,MAAU,uBACjB,OAAOC,MAAW,wBAClB,OAAOC,MAAU,uBAEjB,OACCN,KAAA,cACAC,KAAA,MACAC,KAAA,YACAC,KAAA,SACAC,KAAA,KACAC,KAAA,MACAC,KAAA",
6
- "names": ["customElement", "event", "eventStrict", "property", "slot", "bound", "i18n"]
4
+ "sourcesContent": ["import customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport eventStrict from \"./decorators/event-strict.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\nimport slotStrict from \"./decorators/slot-strict.js\";\nimport bound from \"./decorators/bound.js\";\nimport i18n from \"./decorators/i18n.js\";\n\nexport {\n\tcustomElement,\n\tevent,\n\teventStrict,\n\tproperty,\n\tslot,\n\tslotStrict,\n\tbound,\n\ti18n,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAmB,gCAC1B,OAAOC,MAAW,wBAClB,OAAOC,MAAiB,+BACxB,OAAOC,MAAc,2BACrB,OAAOC,MAAU,uBACjB,OAAOC,MAAgB,8BACvB,OAAOC,MAAW,wBAClB,OAAOC,MAAU,uBAEjB,OACCP,KAAA,cACAC,KAAA,MACAC,KAAA,YACAC,KAAA,SACAC,KAAA,KACAC,KAAA,WACAC,KAAA,MACAC,KAAA",
6
+ "names": ["customElement", "event", "eventStrict", "property", "slot", "slotStrict", "bound", "i18n"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{getFeature as c,registerFeature as m}from"../FeaturesRegistry.js";import{isF6Next as d,isF6Previous as h}from"../Keys.js";import{getFirstFocusableElement as f}from"../util/FocusableElements.js";import g from"../util/getFastNavigationGroups.js";import E from"../util/isElementClickable.js";import{getCurrentRuntimeIndex as w,compareRuntimes as v}from"../Runtimes.js";import y from"../getSharedResource.js";import a from"../util/getParentElement.js";const p=w(),F=l=>l===void 0?!0:v(p,l)===1;class r{constructor(){this.selectedGroup=null;this.groups=[];this.keydownHandler=this._keydownHandler.bind(this),this.attachEventListeners()}attachEventListeners(){document.addEventListener("keydown",this.keydownHandler)}removeEventListeners(){document.removeEventListener("keydown",this.keydownHandler)}async groupElementToFocus(e){if(e){if(E(e))return e;const t=await f(e);if(t)return t}}async findNextFocusableGroupElement(e){let t;for(let o=0;o<this.groups.length;o++){let s;if(e>-1?e+1>=this.groups.length?(e=0,s=this.groups[e]):(e+=1,s=this.groups[e]):(e=0,s=this.groups[e]),t=await this.groupElementToFocus(s),t)break}return t}async findPreviousFocusableGroupElement(e){let t;for(let o=0;o<this.groups.length;o++){let s;if(e>0){const u=await this.groupElementToFocus(this.groups[e]);let i=1;for(let n=1;n<this.groups.length&&await this.groupElementToFocus(this.groups[e-n])===u;n++)i++;e-=i,e<0&&(e=this.groups.length-1),s=this.groups[e]}else e=this.groups.length-1,s=this.groups[e];if(t=await this.groupElementToFocus(s),t)break}return t}async _keydownHandler(e){const t=c("OpenUI5Support");if(t&&t.isOpenUI5Detected()){this.destroy();return}const s=d(e),u=h(e);if(!(s||u)||(this.updateGroups(),this.groups.length<1))return;e.preventDefault();let i;if(this.groups.length===0)return i=await this.groupElementToFocus(this.groups[0]),i?.focus();let n=-1;this.selectedGroup&&(n=this.groups.indexOf(this.selectedGroup)),s&&(i=await this.findNextFocusableGroupElement(n)),u&&(i=await this.findPreviousFocusableGroupElement(n)),i?.focus()}updateGroups(){const e=this.findContainer();this.setSelectedGroup(),this.groups=g(e)}findContainer(){const e=window.document.querySelector("html");let t=this.deepActive(window.document);for(;t&&t!==e;){const o=t.closest("[data-sap-ui-fastnavgroup-container='true']");if(o)return o;t=a(t)}return document.body}setSelectedGroup(e=window.document){const t=window.document.querySelector("html");let o=this.deepActive(e);for(;o&&o.getAttribute("data-sap-ui-fastnavgroup")!=="true"&&o!==t;)o=a(o);this.selectedGroup=o}deepActive(e){return e?.activeElement?.shadowRoot?.activeElement?this.deepActive(e.activeElement.shadowRoot):e.activeElement}destroy(){this.removeEventListeners()}get _ui5RuntimeIndex(){return p}static init(){const e=y("F6Registry",{});e.instance?F(e.instance?._ui5RuntimeIndex)&&(e.instance?.destroy(),e.instance=new r):e.instance=new r}}m("F6Navigation",r);export default r;
1
+ "use strict";import{getFeature as m,registerFeature as d}from"../FeaturesRegistry.js";import{isF6Next as h,isF6Previous as f}from"../Keys.js";import{getFirstFocusableElement as g}from"../util/FocusableElements.js";import y from"../util/getFastNavigationGroups.js";import E from"../util/isElementClickable.js";import{getCurrentRuntimeIndex as w,compareRuntimes as v}from"../Runtimes.js";import l from"../getSharedResource.js";import p from"../util/getParentElement.js";const c=w(),F=a=>a===void 0?!0:v(c,a)===1;class r{constructor(){this.selectedGroup=null;this.groups=[];this.keydownHandler=this._keydownHandler.bind(this),this.attachEventListeners()}attachEventListeners(){document.addEventListener("keydown",this.keydownHandler)}removeEventListeners(){document.removeEventListener("keydown",this.keydownHandler)}async groupElementToFocus(e){if(e){if(E(e))return e;const t=await g(e);if(t)return t}}async findNextFocusableGroupElement(e){let t;for(let s=0;s<this.groups.length;s++){let o;if(e>-1?e+1>=this.groups.length?(e=0,o=this.groups[e]):(e+=1,o=this.groups[e]):(e=0,o=this.groups[e]),t=await this.groupElementToFocus(o),t)break}return t}async findPreviousFocusableGroupElement(e){let t;for(let s=0;s<this.groups.length;s++){let o;if(e>0){const u=await this.groupElementToFocus(this.groups[e]);let i=1;for(let n=1;n<this.groups.length&&await this.groupElementToFocus(this.groups[e-n])===u;n++)i++;e-=i,e<0&&(e=this.groups.length-1),o=this.groups[e]}else e=this.groups.length-1,o=this.groups[e];if(t=await this.groupElementToFocus(o),t)break}return t}async _keydownHandler(e){const t=m("OpenUI5Support");if(t&&t.isOpenUI5Detected()){this.destroy();return}const o=h(e),u=f(e);if(!(o||u)||(this.updateGroups(),this.groups.length<1))return;e.preventDefault();let i;if(this.groups.length===0)return i=await this.groupElementToFocus(this.groups[0]),i?.focus();let n=-1;this.selectedGroup&&(n=this.groups.indexOf(this.selectedGroup)),o&&(i=await this.findNextFocusableGroupElement(n)),u&&(i=await this.findPreviousFocusableGroupElement(n)),i?.focus()}updateGroups(){const e=this.findContainer();this.setSelectedGroup(),this.groups=y(e)}findContainer(){const e=window.document.querySelector("html");let t=this.deepActive(window.document);for(;t&&t!==e;){const s=t.closest("[data-sap-ui-fastnavgroup-container='true']");if(s)return s;t=p(t)}return document.body}setSelectedGroup(e=window.document){const t=window.document.querySelector("html");let s=this.deepActive(e);for(;s&&s.getAttribute("data-sap-ui-fastnavgroup")!=="true"&&s!==t;)s=p(s);this.selectedGroup=s}deepActive(e){return e?.activeElement?.shadowRoot?.activeElement?this.deepActive(e.activeElement.shadowRoot):e.activeElement}destroy(){this.removeEventListeners()}get _ui5RuntimeIndex(){return c}static init(){const e=l("F6Registry",{});e.instance?F(e.instance?._ui5RuntimeIndex)&&(e.instance?.destroy(),e.instance=new r):e.instance=new r}static destroy(){l("F6Registry",{}).instance?.destroy()}}d("F6Navigation",r);export default r;
2
2
  //# sourceMappingURL=F6Navigation.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/F6Navigation.ts"],
4
- "sourcesContent": ["import { getFeature, registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.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\";\nimport getParentElement from \"../util/getParentElement.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\tif (nextElement) {\n\t\t\tif (isElementClickable(nextElement)) {\n\t\t\t\treturn nextElement;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElement);\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 currentGroupFocusable = await this.groupElementToFocus(this.groups[currentIndex]);\n\t\t\t\tlet distanceToNextGroup = 1;\n\n\t\t\t\tfor (let distanceIndex = 1; distanceIndex < this.groups.length; distanceIndex++) {\n\t\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - distanceIndex]);\n\n\t\t\t\t\tif (firstFocusable === currentGroupFocusable) {\n\t\t\t\t\t\tdistanceToNextGroup++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentIndex -= distanceToNextGroup;\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 = getParentElement(element);\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 = this.deepActive(root);\n\n\t\twhile (element && element.getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = getParentElement(element);\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"],
5
- "mappings": "aAAA,OAAS,cAAAA,EAAY,mBAAAC,MAAuB,yBAC5C,OAAS,YAAAC,EAAU,gBAAAC,MAAoB,aACvC,OAAS,4BAAAC,MAAgC,+BACzC,OAAOC,MAA6B,qCACpC,OAAOC,MAAwB,gCAC/B,OAAS,0BAAAC,EAAwB,mBAAAC,MAAuB,iBACxD,OAAOC,MAAuB,0BAE9B,OAAOC,MAAsB,8BAM7B,MAAMC,EAAsBJ,EAAuB,EAE7CK,EAAgBC,GACjBA,IAAiB,OACb,GAEDL,EAAgBG,EAAqBE,CAAY,IAAM,EAG/D,MAAMC,CAAa,CAKlB,aAAc,CAHd,mBAAoC,KACpC,YAA6B,CAAC,EAG7B,KAAK,eAAiB,KAAK,gBAAgB,KAAK,IAAI,EACpD,KAAK,qBAAqB,CAC3B,CAEA,sBAAuB,CACtB,SAAS,iBAAiB,UAAW,KAAK,cAAc,CACzD,CAEA,sBAAuB,CACtB,SAAS,oBAAoB,UAAW,KAAK,cAAc,CAC5D,CAEA,MAAM,oBAAoBC,EAA0B,CACnD,GAAIA,EAAa,CAChB,GAAIT,EAAmBS,CAAW,EACjC,OAAOA,EAGR,MAAMC,EAAiB,MAAMZ,EAAyBW,CAAW,EAEjE,GAAIC,EACH,OAAOA,CAET,CACD,CAEA,MAAM,8BAA8BC,E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AC,CAAC,EAE5DsB,EAAW,SAELnB,EAAamB,EAAW,UAAU,gBAAgB,IAC5DA,EAAW,UAAU,QAAQ,EAC7BA,EAAW,SAAW,IAAIjB,GAH1BiB,EAAW,SAAW,IAAIjB,CAK5B,CACD,CAEAb,EAAgB,eAAgBa,CAAY,EAE5C,eAAeA",
4
+ "sourcesContent": ["import { getFeature, registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.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\";\nimport getParentElement from \"../util/getParentElement.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\tif (nextElement) {\n\t\t\tif (isElementClickable(nextElement)) {\n\t\t\t\treturn nextElement;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElement);\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 currentGroupFocusable = await this.groupElementToFocus(this.groups[currentIndex]);\n\t\t\t\tlet distanceToNextGroup = 1;\n\n\t\t\t\tfor (let distanceIndex = 1; distanceIndex < this.groups.length; distanceIndex++) {\n\t\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - distanceIndex]);\n\n\t\t\t\t\tif (firstFocusable === currentGroupFocusable) {\n\t\t\t\t\t\tdistanceToNextGroup++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentIndex -= distanceToNextGroup;\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 = getParentElement(element);\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 = this.deepActive(root);\n\n\t\twhile (element && element.getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = getParentElement(element);\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\tstatic destroy() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\t\tf6Registry.instance?.destroy();\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"],
5
+ "mappings": "aAAA,OAAS,cAAAA,EAAY,mBAAAC,MAAuB,yBAC5C,OAAS,YAAAC,EAAU,gBAAAC,MAAoB,aACvC,OAAS,4BAAAC,MAAgC,+BACzC,OAAOC,MAA6B,qCACpC,OAAOC,MAAwB,gCAC/B,OAAS,0BAAAC,EAAwB,mBAAAC,MAAuB,iBACxD,OAAOC,MAAuB,0BAE9B,OAAOC,MAAsB,8BAM7B,MAAMC,EAAsBJ,EAAuB,EAE7CK,EAAgBC,GACjBA,IAAiB,OACb,GAEDL,EAAgBG,EAAqBE,CAAY,IAAM,EAG/D,MAAMC,CAAa,CAKlB,aAAc,CAHd,mBAAoC,KACpC,YAA6B,CAAC,EAG7B,KAAK,eAAiB,KAAK,gBAAgB,KAAK,IAAI,EACpD,KAAK,qBAAqB,CAC3B,CAEA,sBAAuB,CACtB,SAAS,iBAAiB,UAAW,KAAK,cAAc,CACzD,CAEA,sBAAuB,CACtB,SAAS,oBAAoB,UAAW,KAAK,cAAc,CAC5D,CAEA,MAAM,oBAAoBC,EAA0B,CACnD,GAAIA,EAAa,CAChB,GAAIT,EAAmBS,CAAW,EACjC,OAAOA,EAGR,MAAMC,EAAiB,MAAMZ,EAAyBW,CAAW,EAEjE,GAAIC,EACH,OAAOA,CAET,CACD,CAEA,MAAM,8BAA8BC,EAAsB,CACzD,IAAID,EAGJ,QAASE,EAAQ,EAAGA,EAAQ,KAAK,OAAO,OAAQA,IAAS,CACxD,IAAIH,EAiBJ,GAfIE,EAAe,GACdA,EAAe,GAAK,KAAK,OAAO,QACnCA,EAAe,EACfF,EAAc,KAAK,OAAOE,CAAY,IAEtCA,GAAgB,EAChBF,EAAc,KAAK,OAAOE,CAAY,I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EAR,EAAgB,eAAgBa,CAAY,EAE5C,eAAeA",
6
6
  "names": ["getFeature", "registerFeature", "isF6Next", "isF6Previous", "getFirstFocusableElement", "getFastNavigationGroups", "isElementClickable", "getCurrentRuntimeIndex", "compareRuntimes", "getSharedResource", "getParentElement", "currentRuntimeINdex", "shouldUpdate", "runtimeIndex", "F6Navigation", "nextElement", "elementToFocus", "currentIndex", "index", "currentGroupFocusable", "distanceToNextGroup", "distanceIndex", "event", "openUI5Support", "forward", "backward", "container", "htmlElement", "element", "closestScopeEl", "root", "f6Registry"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const o=t=>{s(t)&&e(t)},e=t=>{if(t._internals?.form){if(n(t),!t.name){t._internals?.setFormValue(null);return}t._internals.setFormValue(t.formFormattedValue)}},n=async t=>{if(t._internals?.form)if(t.formValidity&&Object.keys(t.formValidity).some(r=>r)){const r=await t.formElementAnchor?.();t._internals.setValidity(t.formValidity,t.formValidityMessage,r)}else t._internals.setValidity({})},i=t=>{t._internals?.form?.requestSubmit()},m=t=>{t._internals?.form?.reset()},s=t=>"formFormattedValue"in t&&"name"in t;export{o as updateFormValue,e as setFormValue,n as setFormValidity,i as submitForm,m as resetForm};
1
+ "use strict";const m=t=>{const r=t.getAttribute("form");if(r){const e=document.getElementById(r);return e instanceof HTMLFormElement?e:null}return t._internals?.form??null},a=t=>{s(t)&&i(t)},i=t=>{if(t._internals?.form){if(n(t),!t.name){t._internals?.setFormValue(null);return}t._internals.setFormValue(t.formFormattedValue)}},n=async t=>{if(!(!t.isUI5Element||!t._internals?.form))if(t._internals.setValidity({customError:!0}," "),await t.definePromise,t.formValidity&&Object.keys(t.formValidity).some(r=>r)){const r=await t.formElementAnchor?.();t._internals.setValidity(t.formValidity,t.formValidityMessage,r)}else t._internals.setValidity({})},l=async t=>{const r=m(t);if(!r)return;const e=[...r.elements];await Promise.all(e.map(o=>s(o)?n(o):Promise.resolve())),r.requestSubmit()},u=t=>{m(t)?.reset()},s=t=>"formFormattedValue"in t&&"name"in t;export{a as updateFormValue,i as setFormValue,n as setFormValidity,l as submitForm,u as resetForm};
2
2
  //# sourceMappingURL=InputElementsFormSupport.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/InputElementsFormSupport.ts"],
4
- "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\n\ninterface IFormInputElement extends UI5Element {\n\tname?: string;\n\tformFormattedValue: FormData | string | null;\n\tformValidityMessage?: string;\n\tformValidity?: ValidityStateFlags;\n\tformElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;\n}\n\nconst updateFormValue = (element: IFormInputElement | UI5Element) => {\n\tif (isInputElement(element)) {\n\t\tsetFormValue(element);\n\t}\n};\n\nconst setFormValue = (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\n\tsetFormValidity(element);\n\n\tif (!element.name) {\n\t\telement._internals?.setFormValue(null);\n\t\treturn;\n\t}\n\n\telement._internals.setFormValue(element.formFormattedValue);\n};\n\nconst setFormValidity = async (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\tif (element.formValidity && Object.keys(element.formValidity).some(key => key)) {\n\t\tconst focusRef = await element.formElementAnchor?.();\n\t\telement._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);\n\t} else {\n\t\telement._internals.setValidity({});\n\t}\n};\n\nconst submitForm = (element: UI5Element) => {\n\telement._internals?.form?.requestSubmit();\n};\n\nconst resetForm = (element: UI5Element) => {\n\telement._internals?.form?.reset();\n};\n\nconst isInputElement = (element: IFormInputElement | UI5Element): element is IFormInputElement => {\n\treturn \"formFormattedValue\" in element && \"name\" in element;\n};\n\nexport {\n\tupdateFormValue,\n\tsetFormValue,\n\tsetFormValidity,\n\tsubmitForm,\n\tresetForm,\n};\n\nexport type {\n\tIFormInputElement,\n};\n"],
5
- "mappings": "aAUA,MAAMA,EAAmBC,GAA4C,CAChEC,EAAeD,CAAO,GACzBE,EAAaF,CAAO,CAEtB,EAEME,EAAgBF,GAA+B,CACpD,GAAKA,EAAQ,YAAY,KAMzB,IAFAG,EAAgBH,CAAO,EAEnB,CAACA,EAAQ,KAAM,CAClBA,EAAQ,YAAY,aAAa,IAAI,EACrC,MACD,CAEAA,EAAQ,WAAW,aAAaA,EAAQ,kBAAkB,EAC3D,EAEMG,EAAkB,MAAOH,GAA+B,CAC7D,GAAKA,EAAQ,YAAY,KAGzB,GAAIA,EAAQ,cAAgB,OAAO,KAAKA,EAAQ,YAAY,EAAE,KAAKI,GAAOA,CAAG,EAAG,CAC/E,MAAMC,EAAW,MAAML,EAAQ,oBAAoB,EACnDA,EAAQ,WAAW,YAAYA,EAAQ,aAAcA,EAAQ,oBAAqBK,CAAQ,CAC3F,MACCL,EAAQ,WAAW,YAAY,CAAC,CAAC,CAEnC,EAEMM,EAAcN,GAAwB,CAC3CA,EAAQ,YAAY,MAAM,cAAc,CACzC,EAEMO,EAAaP,GAAwB,CAC1CA,EAAQ,YAAY,MAAM,MAAM,CACjC,EAEMC,EAAkBD,GAChB,uBAAwBA,GAAW,SAAUA,EAGrD,OACCD,KAAA,gBACAG,KAAA,aACAC,KAAA,gBACAG,KAAA,WACAC,KAAA",
6
- "names": ["updateFormValue", "element", "isInputElement", "setFormValue", "setFormValidity", "key", "focusRef", "submitForm", "resetForm"]
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\n\ninterface IFormInputElement extends UI5Element {\n\tname?: string;\n\tformFormattedValue: FormData | string | null;\n\tformValidityMessage?: string;\n\tformValidity?: ValidityStateFlags;\n\tformElementAnchor?: () => HTMLElement | undefined | Promise<HTMLElement | undefined>;\n}\n\n/**\n * Gets the associated form for an element.\n * If the element has a `form` attribute, it looks up the form by ID.\n * Otherwise, it falls back to the form associated via ElementInternals.\n */\nconst getAssociatedForm = (element: UI5Element): HTMLFormElement | null => {\n\tconst formAttribute = element.getAttribute(\"form\");\n\n\tif (formAttribute) {\n\t\tconst form = document.getElementById(formAttribute);\n\t\treturn form instanceof HTMLFormElement ? form : null;\n\t}\n\n\treturn element._internals?.form ?? null;\n};\n\nconst updateFormValue = (element: IFormInputElement | UI5Element) => {\n\tif (isInputElement(element)) {\n\t\tsetFormValue(element);\n\t}\n};\n\nconst setFormValue = (element: IFormInputElement) => {\n\tif (!element._internals?.form) {\n\t\treturn;\n\t}\n\n\tsetFormValidity(element);\n\n\tif (!element.name) {\n\t\telement._internals?.setFormValue(null);\n\t\treturn;\n\t}\n\n\telement._internals.setFormValue(element.formFormattedValue);\n};\n\nconst setFormValidity = async (element: IFormInputElement) => {\n\tif (!element.isUI5Element || !element._internals?.form) {\n\t\treturn;\n\t}\n\n\telement._internals.setValidity({ customError: true }, \" \"); // treat the form as invalid until CLDR and message bundles are loaded\n\tawait element.definePromise;\n\n\tif (element.formValidity && Object.keys(element.formValidity).some(key => key)) {\n\t\tconst focusRef = await element.formElementAnchor?.();\n\t\telement._internals.setValidity(element.formValidity, element.formValidityMessage, focusRef);\n\t} else {\n\t\telement._internals.setValidity({});\n\t}\n};\n\nconst submitForm = async (element: UI5Element) => {\n\tconst form = getAssociatedForm(element);\n\n\tif (!form) {\n\t\treturn;\n\t}\n\n\tconst elements = [...form.elements] as Array<IFormInputElement | UI5Element>;\n\n\tawait Promise.all(elements.map(el => { return isInputElement(el) ? setFormValidity(el) : Promise.resolve(); }));\n\n\tform.requestSubmit();\n};\n\nconst resetForm = (element: UI5Element) => {\n\tconst form = getAssociatedForm(element);\n\tform?.reset();\n};\n\nconst isInputElement = (element: IFormInputElement | UI5Element): element is IFormInputElement => {\n\treturn \"formFormattedValue\" in element && \"name\" in element;\n};\n\nexport {\n\tupdateFormValue,\n\tsetFormValue,\n\tsetFormValidity,\n\tsubmitForm,\n\tresetForm,\n};\n\nexport type {\n\tIFormInputElement,\n};\n"],
5
+ "mappings": "aAeA,MAAMA,EAAqBC,GAAgD,CAC1E,MAAMC,EAAgBD,EAAQ,aAAa,MAAM,EAEjD,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C,KAAA,gBACAG,KAAA,WACAG,KAAA",
6
+ "names": ["getAssociatedForm", "element", "formAttribute", "form", "updateFormValue", "isInputElement", "setFormValue", "setFormValidity", "key", "focusRef", "submitForm", "elements", "el", "resetForm"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import u from"./patchPatcher.js";import{patchPopup as p,addOpenedPopup as l,removeOpenedPopup as m,getTopmostPopup as d}from"./patchPopup.js";import{registerFeature as C}from"../FeaturesRegistry.js";import{setTheme as c}from"../config/Theme.js";class a{static isAtLeastVersion116(){if(!window.sap.ui.version)return!0;const e=window.sap.ui.version.split(".");return!e||e.length<2?!1:parseInt(e[0])>1||parseInt(e[1])>=116}static isOpenUI5Detected(){return typeof window.sap?.ui?.require=="function"}static init(){return a.isOpenUI5Detected()?(a.initPromise||(a.initPromise=new Promise(t=>{window.sap.ui.require(["sap/ui/core/Core"],async e=>{const i=()=>{let o=["sap/ui/core/Popup","sap/m/Dialog","sap/m/Popover","sap/ui/core/Patcher","sap/ui/core/LocaleData"];a.isAtLeastVersion116()&&(o=[...o,"sap/base/i18n/Formatting","sap/base/i18n/Localization","sap/ui/core/ControlBehavior","sap/ui/core/Theming","sap/ui/core/date/CalendarUtils"]),window.sap.ui.require(o,(n,s,r,g)=>{u(g),p(n,s,r),t()})};a.isAtLeastVersion116()?(await e.ready(),i()):e.attachInit(i)})})),a.initPromise):Promise.resolve()}static getConfigurationSettingsObject(){if(!a.isOpenUI5Detected())return{};if(a.isAtLeastVersion116()){const o=window.sap.ui.require("sap/ui/core/ControlBehavior"),n=window.sap.ui.require("sap/base/i18n/Localization"),s=window.sap.ui.require("sap/ui/core/Theming"),r=window.sap.ui.require("sap/base/i18n/Formatting"),g=window.sap.ui.require("sap/ui/core/date/CalendarUtils");return{animationMode:o.getAnimationMode(),language:n.getLanguage(),theme:s.getTheme(),themeRoot:s.getThemeRoot(),rtl:n.getRTL(),timezone:n.getTimezone(),calendarType:r.getCalendarType(),formatSettings:{firstDayOfWeek:g.getWeekConfigurationValues().firstDayOfWeek,legacyDateCalendarCustomizing:r.getCustomIslamicCalendarData?.()??r.getLegacyDateCalendarCustomizing?.()}}}const e=window.sap.ui.require("sap/ui/core/Core").getConfiguration(),i=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:e.getAnimationMode(),language:e.getLanguage(),theme:e.getTheme(),themeRoot:e.getThemeRoot(),rtl:e.getRTL(),timezone:e.getTimezone(),calendarType:e.getCalendarType(),formatSettings:{firstDayOfWeek:i?i.getInstance(e.getLocale()).getFirstDayOfWeek():void 0,legacyDateCalendarCustomizing:e.getFormatSettings().getLegacyDateCalendarCustomizing()}}}static getLocaleDataObject(){if(!a.isOpenUI5Detected())return;const t=window.sap.ui.require("sap/ui/core/LocaleData");if(a.isAtLeastVersion116()){const o=window.sap.ui.require("sap/base/i18n/Localization");return t.getInstance(o.getLanguageTag())._get()}const i=window.sap.ui.require("sap/ui/core/Core").getConfiguration();return t.getInstance(i.getLocale())._get()}static _listenForThemeChange(){if(a.isAtLeastVersion116()){const t=window.sap.ui.require("sap/ui/core/Theming");t.attachApplied(()=>{c(t.getTheme())})}else{const t=window.sap.ui.require("sap/ui/core/Core"),e=t.getConfiguration();t.attachThemeChanged(()=>{c(e.getTheme())})}}static attachListeners(){a.isOpenUI5Detected()&&a._listenForThemeChange()}static cssVariablesLoaded(){if(!a.isOpenUI5Detected())return;const t=[...document.head.children].find(e=>e.id==="sap-ui-theme-sap.ui.core");return t?!!t.href.match(/\/css(-|_)variables\.css/)||!!t.href.match(/\/library\.css/):!1}static addOpenedPopup(t){l(t)}static removeOpenedPopup(t){m(t)}static getTopmostPopup(){return d()}}C("OpenUI5Support",a);export default a;
1
+ "use strict";import l from"./patchPatcher.js";import{patchPopup as u,addOpenedPopup as m,removeOpenedPopup as d,getTopmostPopup as p}from"./patchPopup.js";import{registerFeature as f}from"../FeaturesRegistry.js";import{setTheme as g}from"../config/Theme.js";import{secondaryBoot as C}from"../Boot.js";const h=100;class t{static{this.enablePolling=!1}static isAtLeastVersion(e){if(!window.sap.ui.version)return!0;const i=window.sap.ui.version.split(".");return!i||i.length<2?!1:parseInt(i[0])>1||parseInt(i[1])>=e}static isOpenUI5Detected(){return typeof window.sap?.ui?.require=="function"}static{this.OpenUI5DelayedInit=async()=>{t.init(),await C()}}static awaitForOpenUI5(){if(t.enablePolling){const e=setInterval(()=>{t.isOpenUI5Detected()&&(clearInterval(e),t.OpenUI5DelayedInit())},h)}else document.addEventListener("sap-ui-core-ready",()=>{t.OpenUI5DelayedInit()})}static init(){return t.isOpenUI5Detected()?(t.initPromise||(t.initPromise=new Promise(e=>{window.sap.ui.require(["sap/ui/core/Core"],async a=>{const i=()=>{let n=["sap/ui/core/Popup","sap/m/Dialog","sap/ui/core/Patcher","sap/ui/core/LocaleData"];t.isAtLeastVersion(116)&&(n=[...n,"sap/base/i18n/Formatting","sap/base/i18n/Localization","sap/ui/core/ControlBehavior","sap/ui/core/Theming","sap/ui/core/date/CalendarUtils"]),window.sap.ui.require(n,(o,r,s)=>{l(s),u(o,r),e()})};t.isAtLeastVersion(116)?(await a.ready(),i()):a.attachInit(i)})})),t.initPromise):t.awaitForOpenUI5()}static getConfigurationSettingsObject(){if(!t.isOpenUI5Detected())return{};if(t.isAtLeastVersion(116)){const n=window.sap.ui.require("sap/ui/core/ControlBehavior"),o=window.sap.ui.require("sap/base/i18n/Localization"),r=window.sap.ui.require("sap/ui/core/Theming"),s=window.sap.ui.require("sap/base/i18n/Formatting"),c=window.sap.ui.require("sap/ui/core/date/CalendarUtils");return{animationMode:n.getAnimationMode(),language:o.getLanguage(),theme:r.getTheme(),themeRoot:r.getThemeRoot(),rtl:o.getRTL(),timezone:o.getTimezone(),calendarType:s.getCalendarType(),formatSettings:{firstDayOfWeek:c.getWeekConfigurationValues().firstDayOfWeek,legacyDateCalendarCustomizing:s.getCustomIslamicCalendarData?.()??s.getLegacyDateCalendarCustomizing?.()}}}const a=window.sap.ui.require("sap/ui/core/Core").getConfiguration(),i=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:a.getAnimationMode(),language:a.getLanguage(),theme:a.getTheme(),themeRoot:typeof a.getThemeRoot=="function"?a.getThemeRoot():void 0,rtl:a.getRTL(),timezone:typeof a.getTimezone=="function"?a.getTimezone():void 0,calendarType:a.getCalendarType(),formatSettings:{firstDayOfWeek:i?i.getInstance(a.getLocale()).getFirstDayOfWeek():void 0,legacyDateCalendarCustomizing:a.getFormatSettings().getLegacyDateCalendarCustomizing()}}}static getLocaleDataObject(){if(!t.isOpenUI5Detected())return;const e=window.sap.ui.require("sap/ui/core/LocaleData");if(t.isAtLeastVersion(116)){const n=window.sap.ui.require("sap/base/i18n/Localization");return e.getInstance(n.getLanguageTag())._get()}const i=window.sap.ui.require("sap/ui/core/Core").getConfiguration();return e.getInstance(i.getLocale())._get()}static _listenForThemeChange(){if(t.isAtLeastVersion(116)){const e=window.sap.ui.require("sap/ui/core/Theming");e.attachApplied(()=>{g(e.getTheme())})}else{const e=window.sap.ui.require("sap/ui/core/Core"),a=e.getConfiguration();e.attachThemeChanged(()=>{g(a.getTheme())})}}static attachListeners(){return t.isOpenUI5Detected()?(t._listenForThemeChange(),!0):!1}static cssVariablesLoaded(){if(!t.isOpenUI5Detected())return;const e=[...document.head.children].find(a=>a.id==="sap-ui-theme-sap.ui.core");return e?t.isAtLeastVersion(127)?!!e.href.match(/\/css(-|_)variables\.css/)||!!e.href.match(/\/library\.css/):!!e.href.match(/\/css(-|_)variables\.css/):!1}static addOpenedPopup(e){m(e)}static removeOpenedPopup(e){d(e)}static getTopmostPopup(){return p()}}f("OpenUI5Support",t);export default t;
2
2
  //# sourceMappingURL=OpenUI5Support.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/OpenUI5Support.ts"],
4
- "sourcesContent": ["import patchPatcher from \"./patchPatcher.js\";\nimport type { OpenUI5Patcher } from \"./patchPatcher.js\";\nimport {\n\tpatchPopup,\n\taddOpenedPopup,\n\tremoveOpenedPopup,\n\tgetTopmostPopup,\n} from \"./patchPopup.js\";\nimport type { OpenUI5Popup, OpenUI5PopupBasedControl, PopupInfo } from \"./patchPopup.js\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport { setTheme } from \"../config/Theme.js\";\nimport type { CLDRData } from \"../asset-registries/LocaleData.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\n\ntype OpenUI5Core = {\n\tattachInit: (callback: () => void) => void,\n\tready: () => Promise<void>,\n\tattachThemeChanged: (callback: () => void) => void,\n\tgetConfiguration: () => OpenUI5CoreConfiguration,\n};\n\ntype OpenUI5CoreConfiguration = {\n\tgetAnimationMode: () => string,\n\tgetLanguage: () => string,\n\tgetTheme: () => string,\n\tgetThemeRoot: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n\tgetCalendarType: () => string,\n\tgetLocale: () => string,\n\tgetFormatSettings: () => {\n\t\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing;\n\t}\n};\n\ntype ControlBehavior = {\n\tgetAnimationMode: () => string,\n}\n\ntype Localization = {\n\tgetLanguage: () => string,\n\tgetLanguageTag: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n}\n\ntype LocaleData = {\n\tgetInstance: (locale: string) => Locale,\n}\n\ntype Theming = {\n\tgetThemeRoot: () => string,\n\tgetTheme: () => string,\n\tattachApplied: (callback: () => void) => void,\n}\n\ntype Formatting = {\n\tgetCalendarType: () => string,\n\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing,\n\tgetCustomIslamicCalendarData?: () => LegacyDateCalendarCustomizing,\n}\n\ntype CalendarUtils = {\n\tgetWeekConfigurationValues: () => {\n\t\tfirstDayOfWeek: number | undefined,\n\t},\n}\n\ntype Locale = {\n\tgetFirstDayOfWeek: () => number,\n\t_get: () => CLDRData,\n};\n\nclass OpenUI5Support {\n\tstatic isAtLeastVersion116() {\n\t\tif (!window.sap.ui!.version) {\n\t\t\treturn true; // sap.ui.version will be removed in newer OpenUI5 versions\n\t\t}\n\t\tconst version = window.sap.ui!.version as string;\n\t\tconst parts = version.split(\".\");\n\t\tif (!parts || parts.length < 2) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parseInt(parts[0]) > 1 || parseInt(parts[1]) >= 116;\n\t}\n\n\tstatic isOpenUI5Detected() {\n\t\treturn typeof window.sap?.ui?.require === \"function\";\n\t}\n\n\tstatic initPromise?: Promise<void>;\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tif (!OpenUI5Support.initPromise) {\n\t\t\tOpenUI5Support.initPromise = new Promise<void>(resolve => {\n\t\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\t\tconst callback = () => {\n\t\t\t\t\t\tlet deps: Array<string> = [\"sap/ui/core/Popup\", \"sap/m/Dialog\", \"sap/m/Popover\", \"sap/ui/core/Patcher\", \"sap/ui/core/LocaleData\"];\n\t\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5Popup, Dialog: OpenUI5PopupBasedControl, Popover: OpenUI5PopupBasedControl, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\t\tpatchPopup(Popup, Dialog, Popover);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\t\t\t\tawait Core.ready();\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn OpenUI5Support.initPromise;\n\t}\n\n\tstatic getConfigurationSettingsObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst ControlBehavior = window.sap.ui.require(\"sap/ui/core/ControlBehavior\") as ControlBehavior;\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\tconst Theming = window.sap.ui.require(\"sap/ui/core/Theming\") as Theming;\n\t\t\tconst Formatting = window.sap.ui.require(\"sap/base/i18n/Formatting\") as Formatting;\n\t\t\tconst CalendarUtils = window.sap.ui.require(\"sap/ui/core/date/CalendarUtils\") as CalendarUtils;\n\n\t\t\treturn {\n\t\t\t\tanimationMode: ControlBehavior.getAnimationMode(),\n\t\t\t\tlanguage: Localization.getLanguage(),\n\t\t\t\ttheme: Theming.getTheme(),\n\t\t\t\tthemeRoot: Theming.getThemeRoot(),\n\t\t\t\trtl: Localization.getRTL(),\n\t\t\t\ttimezone: Localization.getTimezone(),\n\t\t\t\tcalendarType: Formatting.getCalendarType(),\n\t\t\t\tformatSettings: {\n\t\t\t\t\tfirstDayOfWeek: CalendarUtils.getWeekConfigurationValues().firstDayOfWeek,\n\t\t\t\t\tlegacyDateCalendarCustomizing: Formatting.getCustomIslamicCalendarData?.()\n\t\t\t\t\t\t\t\t\t\t\t\t?? Formatting.getLegacyDateCalendarCustomizing?.(),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\treturn {\n\t\t\tanimationMode: config.getAnimationMode(),\n\t\t\tlanguage: config.getLanguage(),\n\t\t\ttheme: config.getTheme(),\n\t\t\tthemeRoot: config.getThemeRoot(),\n\t\t\trtl: config.getRTL(),\n\t\t\ttimezone: config.getTimezone(),\n\t\t\tcalendarType: config.getCalendarType(),\n\t\t\tformatSettings: {\n\t\t\t\tfirstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,\n\t\t\t\tlegacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic getLocaleDataObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\treturn LocaleData.getInstance(Localization.getLanguageTag())._get();\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\treturn LocaleData.getInstance(config.getLocale())._get();\n\t}\n\n\tstatic _listenForThemeChange() {\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Theming: Theming = window.sap.ui.require(\"sap/ui/core/Theming\");\n\t\t\tTheming.attachApplied(() => {\n\t\t\t\tsetTheme(Theming.getTheme());\n\t\t\t});\n\t\t} else {\n\t\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\t\tconst config = Core.getConfiguration();\n\t\t\tCore.attachThemeChanged(() => {\n\t\t\t\tsetTheme(config.getTheme());\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic attachListeners() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tOpenUI5Support._listenForThemeChange();\n\t}\n\n\tstatic cssVariablesLoaded() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst link = [...document.head.children].find(el => el.id === \"sap-ui-theme-sap.ui.core\") as HTMLLinkElement; // more reliable than querySelector early\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// The file name is \"css_variables.css\" until 1.127 and \"library.css\" from 1.127 onwards\n\t\treturn !!link.href.match(/\\/css(-|_)variables\\.css/) || !!link.href.match(/\\/library\\.css/);\n\t}\n\n\tstatic addOpenedPopup(popupInfo: PopupInfo) {\n\t\taddOpenedPopup(popupInfo);\n\t}\n\n\tstatic removeOpenedPopup(popup: object) {\n\t\tremoveOpenedPopup(popup);\n\t}\n\n\tstatic getTopmostPopup() {\n\t\treturn getTopmostPopup();\n\t}\n}\n\nregisterFeature(\"OpenUI5Support\", OpenUI5Support);\n\nexport default OpenUI5Support;\n"],
5
- "mappings": "aAAA,OAAOA,MAAkB,oBAEzB,OACC,cAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,mBAAAC,MACM,kBAEP,OAAS,mBAAAC,MAAuB,yBAChC,OAAS,YAAAC,MAAgB,qBA+DzB,MAAMC,CAAe,CACpB,OAAO,qBAAsB,CAC5B,GAAI,CAAC,OAAO,IAAI,GAAI,QACnB,MAAO,GAGR,MAAMC,EADU,OAAO,IAAI,GAAI,QACT,MAAM,GAAG,EAC/B,MAAI,CAACA,GAASA,EAAM,OAAS,EACrB,GAED,SAASA,EAAM,CAAC,CAAC,EAAI,GAAK,SAASA,EAAM,CAAC,CAAC,GAAK,GACxD,CAEA,OAAO,mBAAoB,CAC1B,OAAO,OAAO,OAAO,KAAK,IAAI,SAAY,UAC3C,CAIA,OAAO,MAAO,CACb,OAAKD,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AAO,SAAS,CAAC,CAC3B,CAAC,CACF,CACD,CAEA,OAAO,iBAAkB,CACnBf,EAAe,kBAAkB,GAItCA,EAAe,sBAAsB,CACtC,CAEA,OAAO,oBAAqB,CAC3B,GAAI,CAACA,EAAe,kBAAkB,EACrC,OAGD,MAAMiB,EAAO,CAAC,GAAG,SAAS,KAAK,QAAQ,EAAE,KAAKC,GAAMA,EAAG,KAAO,0BAA0B,EACxF,OAAKD,EAKE,CAAC,CAACA,EAAK,KAAK,MAAM,0BAA0B,GAAK,CAAC,CAACA,EAAK,KAAK,MAAM,gBAAgB,EAJlF,EAKT,CAEA,OAAO,eAAeE,EAAsB,CAC3CxB,EAAewB,CAAS,CACzB,CAEA,OAAO,kBAAkBC,EAAe,CACvCxB,EAAkBwB,CAAK,CACxB,CAEA,OAAO,iBAAkB,CACxB,OAAOvB,EAAgB,CACxB,CACD,CAEAC,EAAgB,iBAAkBE,CAAc,EAEhD,eAAeA",
6
- "names": ["patchPatcher", "patchPopup", "addOpenedPopup", "removeOpenedPopup", "getTopmostPopup", "registerFeature", "setTheme", "OpenUI5Support", "parts", "resolve", "Core", "callback", "deps", "Popup", "Dialog", "Popover", "Patcher", "ControlBehavior", "Localization", "Theming", "Formatting", "CalendarUtils", "config", "LocaleData", "link", "el", "popupInfo", "popup"]
4
+ "sourcesContent": ["import patchPatcher from \"./patchPatcher.js\";\nimport type { OpenUI5Patcher } from \"./patchPatcher.js\";\nimport {\n\tpatchPopup,\n\taddOpenedPopup,\n\tremoveOpenedPopup,\n\tgetTopmostPopup,\n} from \"./patchPopup.js\";\nimport type { OpenUI5PopupClass, OpenUI5DialogClass, PopupInfo } from \"./patchPopup.js\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport { setTheme } from \"../config/Theme.js\";\nimport type { CLDRData } from \"../asset-registries/LocaleData.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\nimport { secondaryBoot } from \"../Boot.js\";\n\ntype OpenUI5Core = {\n\tattachInit: (callback: () => void) => void,\n\tready: () => Promise<void>,\n\tattachThemeChanged: (callback: () => void) => void,\n\tgetConfiguration: () => OpenUI5CoreConfiguration,\n};\n\ntype OpenUI5CoreConfiguration = {\n\tgetAnimationMode: () => string,\n\tgetLanguage: () => string,\n\tgetTheme: () => string,\n\tgetThemeRoot: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n\tgetCalendarType: () => string,\n\tgetLocale: () => string,\n\tgetFormatSettings: () => {\n\t\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing;\n\t}\n};\n\ntype ControlBehavior = {\n\tgetAnimationMode: () => string,\n}\n\ntype Localization = {\n\tgetLanguage: () => string,\n\tgetLanguageTag: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n}\n\ntype LocaleData = {\n\tgetInstance: (locale: string) => Locale,\n}\n\ntype Theming = {\n\tgetThemeRoot: () => string,\n\tgetTheme: () => string,\n\tattachApplied: (callback: () => void) => void,\n}\n\ntype Formatting = {\n\tgetCalendarType: () => string,\n\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing,\n\tgetCustomIslamicCalendarData?: () => LegacyDateCalendarCustomizing,\n}\n\ntype CalendarUtils = {\n\tgetWeekConfigurationValues: () => {\n\t\tfirstDayOfWeek: number | undefined,\n\t},\n}\n\ntype Locale = {\n\tgetFirstDayOfWeek: () => number,\n\t_get: () => CLDRData,\n};\n\nconst OPENUI5_POLLING_INTERVAL = 100;\n\nclass OpenUI5Support {\n\tstatic enablePolling = false; // set to true for old OpenUI5 versions\n\n\tstatic isAtLeastVersion(minor: number) {\n\t\tif (!window.sap.ui!.version) {\n\t\t\treturn true; // sap.ui.version will be removed in newer OpenUI5 versions\n\t\t}\n\t\tconst version = window.sap.ui!.version as string;\n\t\tconst parts = version.split(\".\");\n\t\tif (!parts || parts.length < 2) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parseInt(parts[0]) > 1 || parseInt(parts[1]) >= minor;\n\t}\n\n\tstatic isOpenUI5Detected() {\n\t\treturn typeof window.sap?.ui?.require === \"function\";\n\t}\n\n\tstatic initPromise?: Promise<void>;\n\n\t/**\n\t * Important - if OpenUI5 is loaded after UI5 Web Components, configuration is not synchronized and it's up to the app to initialize OpenUI5 with the same settings as UI5 Web Components for consistency.\n\t */\n\tstatic OpenUI5DelayedInit = async () => {\n\t\tOpenUI5Support.init(); // This ensures patchPopover and patchPatcher are called; and from this point OpenUI5 CSS vars start being detected\n\t\tawait secondaryBoot(); // Re-run the parts of boot that were skipped due to OpenUI5 not having been loaded\n\t}\n\n\tstatic awaitForOpenUI5() {\n\t\tif (OpenUI5Support.enablePolling) {\n\t\t\tconst interval = setInterval(() => {\n\t\t\t\tif (OpenUI5Support.isOpenUI5Detected()) {\n\t\t\t\t\tclearInterval(interval);\n\t\t\t\t\tOpenUI5Support.OpenUI5DelayedInit();\n\t\t\t\t}\n\t\t\t}, OPENUI5_POLLING_INTERVAL);\n\t\t} else {\n\t\t\tdocument.addEventListener(\"sap-ui-core-ready\", () => {\n\t\t\t\tOpenUI5Support.OpenUI5DelayedInit();\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn OpenUI5Support.awaitForOpenUI5();\n\t\t}\n\n\t\tif (!OpenUI5Support.initPromise) {\n\t\t\tOpenUI5Support.initPromise = new Promise<void>(resolve => {\n\t\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\t\tconst callback = () => {\n\t\t\t\t\t\tlet deps: Array<string> = [\"sap/ui/core/Popup\", \"sap/m/Dialog\", \"sap/ui/core/Patcher\", \"sap/ui/core/LocaleData\"];\n\t\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion(116)) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5PopupClass, Dialog: OpenUI5DialogClass, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\t\tpatchPopup(Popup, Dialog);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion(116)) {\n\t\t\t\t\t\tawait Core.ready();\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn OpenUI5Support.initPromise;\n\t}\n\n\tstatic getConfigurationSettingsObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (OpenUI5Support.isAtLeastVersion(116)) {\n\t\t\tconst ControlBehavior = window.sap.ui.require(\"sap/ui/core/ControlBehavior\") as ControlBehavior;\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\tconst Theming = window.sap.ui.require(\"sap/ui/core/Theming\") as Theming;\n\t\t\tconst Formatting = window.sap.ui.require(\"sap/base/i18n/Formatting\") as Formatting;\n\t\t\tconst CalendarUtils = window.sap.ui.require(\"sap/ui/core/date/CalendarUtils\") as CalendarUtils;\n\n\t\t\treturn {\n\t\t\t\tanimationMode: ControlBehavior.getAnimationMode(),\n\t\t\t\tlanguage: Localization.getLanguage(),\n\t\t\t\ttheme: Theming.getTheme(),\n\t\t\t\tthemeRoot: Theming.getThemeRoot(),\n\t\t\t\trtl: Localization.getRTL(),\n\t\t\t\ttimezone: Localization.getTimezone(),\n\t\t\t\tcalendarType: Formatting.getCalendarType(),\n\t\t\t\tformatSettings: {\n\t\t\t\t\tfirstDayOfWeek: CalendarUtils.getWeekConfigurationValues().firstDayOfWeek,\n\t\t\t\t\tlegacyDateCalendarCustomizing: Formatting.getCustomIslamicCalendarData?.()\n\t\t\t\t\t\t?? Formatting.getLegacyDateCalendarCustomizing?.(),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\treturn {\n\t\t\tanimationMode: config.getAnimationMode(),\n\t\t\tlanguage: config.getLanguage(),\n\t\t\ttheme: config.getTheme(),\n\t\t\tthemeRoot: typeof config.getThemeRoot === \"function\" ? config.getThemeRoot() : undefined,\n\t\t\trtl: config.getRTL(),\n\t\t\ttimezone: typeof config.getTimezone === \"function\" ? config.getTimezone() : undefined,\n\t\t\tcalendarType: config.getCalendarType(),\n\t\t\tformatSettings: {\n\t\t\t\tfirstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,\n\t\t\t\tlegacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic getLocaleDataObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\tif (OpenUI5Support.isAtLeastVersion(116)) {\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\treturn LocaleData.getInstance(Localization.getLanguageTag())._get();\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\treturn LocaleData.getInstance(config.getLocale())._get();\n\t}\n\n\tstatic _listenForThemeChange() {\n\t\tif (OpenUI5Support.isAtLeastVersion(116)) {\n\t\t\tconst Theming: Theming = window.sap.ui.require(\"sap/ui/core/Theming\");\n\t\t\tTheming.attachApplied(() => {\n\t\t\t\tsetTheme(Theming.getTheme());\n\t\t\t});\n\t\t} else {\n\t\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\t\tconst config = Core.getConfiguration();\n\t\t\tCore.attachThemeChanged(() => {\n\t\t\t\tsetTheme(config.getTheme());\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic attachListeners() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tOpenUI5Support._listenForThemeChange();\n\t\treturn true;\n\t}\n\n\tstatic cssVariablesLoaded() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst link = [...document.head.children].find(el => el.id === \"sap-ui-theme-sap.ui.core\") as HTMLLinkElement; // more reliable than querySelector early\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// The file name is \"css_variables.css\" until 1.127 and \"library.css\" from 1.127 onwards\n\t\tif (OpenUI5Support.isAtLeastVersion(127)) {\n\t\t\treturn !!link.href.match(/\\/css(-|_)variables\\.css/) || !!link.href.match(/\\/library\\.css/);\n\t\t}\n\n\t\treturn !!link.href.match(/\\/css(-|_)variables\\.css/);\n\t}\n\n\tstatic addOpenedPopup(popupInfo: PopupInfo) {\n\t\taddOpenedPopup(popupInfo);\n\t}\n\n\tstatic removeOpenedPopup(popup: object) {\n\t\tremoveOpenedPopup(popup);\n\t}\n\n\tstatic getTopmostPopup() {\n\t\treturn getTopmostPopup();\n\t}\n}\n\nregisterFeature(\"OpenUI5Support\", OpenUI5Support);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GAAG,SAAS,KAAK,QAAQ,EAAE,KAAKC,GAAMA,EAAG,KAAO,0BAA0B,EACxF,OAAKD,EAKDlB,EAAe,iBAAiB,GAAG,EAC/B,CAAC,CAACkB,EAAK,KAAK,MAAM,0BAA0B,GAAK,CAAC,CAACA,EAAK,KAAK,MAAM,gBAAgB,EAGpF,CAAC,CAACA,EAAK,KAAK,MAAM,0BAA0B,EAR3C,EAST,CAEA,OAAO,eAAeE,EAAsB,CAC3C3B,EAAe2B,CAAS,CACzB,CAEA,OAAO,kBAAkBC,EAAe,CACvC3B,EAAkB2B,CAAK,CACxB,CAEA,OAAO,iBAAkB,CACxB,OAAO1B,EAAgB,CACxB,CACD,CAEAC,EAAgB,iBAAkBI,CAAc,EAEhD,eAAeA",
6
+ "names": ["patchPatcher", "patchPopup", "addOpenedPopup", "removeOpenedPopup", "getTopmostPopup", "registerFeature", "setTheme", "secondaryBoot", "OPENUI5_POLLING_INTERVAL", "OpenUI5Support", "minor", "parts", "interval", "resolve", "Core", "callback", "deps", "Popup", "Dialog", "Patcher", "ControlBehavior", "Localization", "Theming", "Formatting", "CalendarUtils", "config", "LocaleData", "link", "el", "popupInfo", "popup"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const p=t=>{const e=t.prototype.openEnd;t.prototype.openEnd=function(){return this._mAttributes.popover&&delete this._mAttributes.popover,e.apply(this)}};export default p;
1
+ "use strict";const e=t=>{const p=t.openEnd;t.openEnd=function(){return this._mAttributes?.popover&&delete this._mAttributes.popover,p.apply(this)}},n=t=>{"prototype"in t&&"openEnd"in t.prototype?e(t.prototype):"openEnd"in t&&e(t)};export default n;
2
2
  //# sourceMappingURL=patchPatcher.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/patchPatcher.ts"],
4
- "sourcesContent": ["type OpenUI5Patcher = {\n\tprototype: {\n\t\t_mAttributes: { [key: string]: string },\n\t\topenEnd: () => OpenUI5Patcher,\n\t}\n};\n\nconst patchPatcher = (Patcher: OpenUI5Patcher) => {\n\tconst origOpenEnd = Patcher.prototype.openEnd;\n\tPatcher.prototype.openEnd = function openEnd() {\n\t\tif (this._mAttributes.popover) {\n\t\t\tdelete this._mAttributes.popover; // The \"popover\" attribute will be managed externally, don't let Patcher remove it\n\t\t}\n\t\treturn origOpenEnd.apply(this);\n\t};\n};\n\nexport default patchPatcher;\nexport type { OpenUI5Patcher };\n"],
5
- "mappings": "aAOA,MAAMA,EAAgBC,GAA4B,CACjD,MAAMC,EAAcD,EAAQ,UAAU,QACtCA,EAAQ,UAAU,QAAU,UAAmB,CAC9C,OAAI,KAAK,aAAa,SACrB,OAAO,KAAK,aAAa,QAEnBC,EAAY,MAAM,IAAI,CAC9B,CACD,EAEA,eAAeF",
6
- "names": ["patchPatcher", "Patcher", "origOpenEnd"]
4
+ "sourcesContent": ["type PatcherTarget = {\n\t_mAttributes: { [key: string]: string },\n\topenEnd: () => OpenUI5Patcher,\n};\n\ntype OpenUI5Patcher = { prototype: PatcherTarget } // newer versions (on prototype)\n\t| PatcherTarget; // older versions (on constructor directly)\n\nconst patchOpenEnd = (target: PatcherTarget) => {\n\tconst origOpenEnd = target.openEnd;\n\ttarget.openEnd = function openEnd() {\n\t\tif (this._mAttributes?.popover) {\n\t\t\tdelete this._mAttributes.popover; // The \"popover\" attribute will be managed externally, don't let Patcher remove it\n\t\t}\n\t\treturn origOpenEnd.apply(this);\n\t};\n};\n\nconst patchPatcher = (Patcher: OpenUI5Patcher) => {\n\t// Newer version: properties are on prototype\n\tif (\"prototype\" in Patcher && \"openEnd\" in Patcher.prototype) {\n\t\tpatchOpenEnd(Patcher.prototype);\n\t} else if (\"openEnd\" in Patcher) {\n\t\t// Older version: properties are on constructor directly\n\t\tpatchOpenEnd(Patcher);\n\t}\n};\n\nexport default patchPatcher;\nexport type { OpenUI5Patcher };\n"],
5
+ "mappings": "aAQA,MAAMA,EAAgBC,GAA0B,CAC/C,MAAMC,EAAcD,EAAO,QAC3BA,EAAO,QAAU,UAAmB,CACnC,OAAI,KAAK,cAAc,SACtB,OAAO,KAAK,aAAa,QAEnBC,EAAY,MAAM,IAAI,CAC9B,CACD,EAEMC,EAAgBC,GAA4B,CAE7C,cAAeA,GAAW,YAAaA,EAAQ,UAClDJ,EAAaI,EAAQ,SAAS,EACpB,YAAaA,GAEvBJ,EAAaI,CAAO,CAEtB,EAEA,eAAeD",
6
+ "names": ["patchOpenEnd", "target", "origOpenEnd", "patchPatcher", "Patcher"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import g from"../getSharedResource.js";import h from"./insertOpenUI5PopupStyles.js";const p=g("AllOpenedPopupsRegistry",{openedRegistry:[]}),a=e=>{p.openedRegistry.push(e)},u=e=>{const o=p.openedRegistry.findIndex(t=>t.instance===e);o>-1&&p.openedRegistry.splice(o,1)},O=()=>p.openedRegistry[p.openedRegistry.length-1].instance,l=e=>{for(let o=p.openedRegistry.length-1;o>=0;o--){const t=p.openedRegistry[o];if(t.type==="WebComponent")return!0;if(t.instance===e)break}return!1},P=e=>{e.setAttribute("popover","manual"),e.showPopover()},f=e=>{e.hasAttribute("popover")&&(e.hidePopover(),e.removeAttribute("popover"))},y=(e=document)=>e.querySelector(":popover-open")?!0:Array.from(e.querySelectorAll("*")).some(o=>{const t=o.shadowRoot;return t&&y(t)}),d=e=>{const o=e.prototype.onsapescape;e.prototype.onsapescape=function(...n){l(this.oPopup)||o.apply(this,n)}},m=e=>{const o=e.prototype.open;e.prototype.open=function(...n){o.apply(this,n);const s=y();if(["OPENING","OPEN"].includes(this.getOpenState())&&s){const r=this.getContent();if(r){const i=r instanceof HTMLElement?r:r?.getDomRef();i&&P(i)}}a({type:"OpenUI5",instance:this})}},I=e=>{const o=e.prototype._closed;e.prototype._closed=function(...n){const s=this.getContent(),c=s instanceof HTMLElement?s:s?.getDomRef();o.apply(this,n),c&&f(c),u(this)}},v=e=>{const o=e.prototype.onFocusEvent;e.prototype.onFocusEvent=function(...n){l(this)||o.apply(this,n)}},C=()=>{const e=new CSSStyleSheet;e.replaceSync(".sapMPopup-CTX:popover-open { inset: unset; }"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]},S=(e,o,t)=>{h(),m(e),I(e),C(),v(e),d(o),d(t)};export{S as patchPopup,a as addOpenedPopup,u as removeOpenedPopup,O as getTopmostPopup};
1
+ "use strict";import u from"../getSharedResource.js";import P from"./insertOpenUI5PopupStyles.js";import i from"../generated/VersionInfo.js";import{compareVersions as h}from"../Runtimes.js";const t=u("PatchedFunctions",{}),a=o=>{const e=t[o];return!e||!e.version?!0:h(i,e.version)>0},p=u("AllOpenedPopupsRegistry",{openedRegistry:[]}),y=o=>{p.openedRegistry.push(o)},d=o=>{const e=p.openedRegistry.findIndex(n=>n.instance===o);e===p.openedRegistry.length-1&&O(),e>-1&&p.openedRegistry.splice(e,1)},g=()=>p.openedRegistry.length===0?null:p.openedRegistry[p.openedRegistry.length-1].instance,f=o=>{for(let e=p.openedRegistry.length-1;e>=0;e--){const n=p.openedRegistry[e];if(n.type==="WebComponent")return!0;if(n.instance===o)break}return!1},c=o=>{const e=o.getContent();return e instanceof HTMLElement?e:e?.getDomRef()||null},v=o=>{if(!["OPENING","OPEN"].includes(o.getOpenState())||!l())return;const n=c(o);if(!n)return;const s=document.getElementById("sap-ui-blocklayer-popup");o.getModal()&&s&&(s.setAttribute("popover","manual"),s.hidePopover(),s.showPopover()),n.setAttribute("popover","manual"),n.showPopover()},I=o=>{const e=c(o);if(e&&(e.hasAttribute("popover")&&(e.hidePopover(),e.removeAttribute("popover")),g()===o&&o.getModal())){const n=document.getElementById("sap-ui-blocklayer-popup");n&&n.hasAttribute("popover")&&n.hidePopover()}},O=()=>{if(!l())return;const o=p.openedRegistry[p.openedRegistry.length-2];if(!o||o.type!=="OpenUI5"||!o.instance.getModal())return;const e=c(o.instance),n=document.getElementById("sap-ui-blocklayer-popup");e?.hidePopover(),n?.showPopover(),e?.showPopover()},l=(o=document)=>o.querySelector(":popover-open")?!0:Array.from(o.querySelectorAll("*")).some(e=>{const n=e.shadowRoot;return n&&l(n)}),m=o=>{const e="Dialog.prototype.onsapescape";a(e)&&(t[e]={version:i,originalFn:t[e]?.originalFn??o.prototype.onsapescape});const n=t[e].originalFn;o.prototype.onsapescape=function(...r){f(this.oPopup)||n.apply(this,r)}},R=o=>{const e="Popup.prototype.open";a(e)&&(t[e]={version:i,originalFn:t[e]?.originalFn??o.prototype.open});const n=t[e].originalFn;o.prototype.open=function(...r){n.apply(this,r),v(this),y({type:"OpenUI5",instance:this})}},F=o=>{const e="Popup.prototype._closed";a(e)&&(t[e]={version:i,originalFn:t[e]?.originalFn??o.prototype._closed});const n=t[e].originalFn;o.prototype._closed=function(...r){I(this),n.apply(this,r),d(this)}},U=o=>{const e="Popup.prototype.onFocusEvent";a(e)&&(t[e]={version:i,originalFn:t[e]?.originalFn??o.prototype.onFocusEvent});const n=t[e].originalFn;o.prototype.onFocusEvent=function(...r){f(this)||n.apply(this,r)}},C=()=>{const o=new CSSStyleSheet;o.replaceSync(".sapMPopup-CTX:popover-open { inset: unset; }"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,o]},b=(o,e)=>{P(),R(o),F(o),C(),U(o),m(e)};export{b as patchPopup,y as addOpenedPopup,d as removeOpenedPopup,g as getTopmostPopup};
2
2
  //# sourceMappingURL=patchPopup.js.map