@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
@@ -1,9 +1,12 @@
1
1
  type ThemeData = string;
2
2
  type ThemeLoader = (themeName: string) => Promise<string>;
3
- declare const registerThemePropertiesLoader: (packageName: string, themeName: string, loader: ThemeLoader) => void;
3
+ type CSSVariablesTarget = "root" | "host";
4
+ declare const registerThemePropertiesLoader: (packageName: string, themeName: string, loader: ThemeLoader, cssVariablesTarget?: CSSVariablesTarget) => void;
4
5
  declare const registerCustomThemePropertiesLoader: (packageName: string, themeName: string, loader: ThemeLoader) => void;
5
6
  declare const getThemeProperties: (packageName: string, themeName: string, externalThemeName?: string) => Promise<string | undefined>;
6
- declare const getRegisteredPackages: () => Set<string>;
7
+ declare const getRegisteredPackages: () => Map<string, {
8
+ cssVariablesTarget: CSSVariablesTarget;
9
+ }>;
7
10
  declare const isThemeRegistered: (theme: string) => boolean;
8
11
  export { registerThemePropertiesLoader, registerCustomThemePropertiesLoader, getThemeProperties, getRegisteredPackages, isThemeRegistered, };
9
12
  export type { ThemeData, ThemeLoader, };
@@ -4,11 +4,11 @@ import { fireThemeRegistered } from "../theming/ThemeRegistered.js";
4
4
  const themeStyles = new Map();
5
5
  const loaders = new Map();
6
6
  const customLoaders = new Map();
7
- const registeredPackages = new Set();
7
+ const registeredPackages = new Map();
8
8
  const registeredThemes = new Set();
9
- const registerThemePropertiesLoader = (packageName, themeName, loader) => {
9
+ const registerThemePropertiesLoader = (packageName, themeName, loader, cssVariablesTarget = "root") => {
10
10
  loaders.set(`${packageName}/${themeName}`, loader);
11
- registeredPackages.add(packageName);
11
+ registeredPackages.set(packageName, { cssVariablesTarget });
12
12
  registeredThemes.add(themeName);
13
13
  fireThemeRegistered(themeName);
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Themes.js","sourceRoot":"","sources":["../../src/asset-registries/Themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAKpE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC9C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC/C,MAAM,aAAa,GAAG,IAAI,GAAG,EAAuB,CAAC;AACrD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,CAAC,CAAC,yBAAyB;QAChE,OAAO;IACR,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,GAAG,EAAE;IAClC,OAAO,kBAAkB,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC3C,OAAO,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EACN,6BAA6B,EAC7B,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GACjB,CAAC","sourcesContent":["import { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { mergeStyles } from \"../ManagedStyles.js\";\nimport { fireThemeRegistered } from \"../theming/ThemeRegistered.js\";\n\ntype ThemeData = string;\ntype ThemeLoader = (themeName: string) => Promise<string>;\n\nconst themeStyles = new Map<string, string>();\nconst loaders = new Map<string, ThemeLoader>();\nconst customLoaders = new Map<string, ThemeLoader>();\nconst registeredPackages = new Set<string>();\nconst registeredThemes = new Set<string>();\n\nconst registerThemePropertiesLoader = (packageName: string, themeName: string, loader: ThemeLoader) => {\n\tloaders.set(`${packageName}/${themeName}`, loader);\n\tregisteredPackages.add(packageName);\n\tregisteredThemes.add(themeName);\n\tfireThemeRegistered(themeName);\n};\n\nconst registerCustomThemePropertiesLoader = (packageName: string, themeName: string, loader: ThemeLoader) => {\n\tcustomLoaders.set(`${packageName}/${themeName}`, loader);\n};\n\nconst getThemeProperties = async (packageName: string, themeName: string, externalThemeName?: string) => {\n\tconst cacheKey = `${packageName}_${themeName}_${externalThemeName || \"\"}`;\n\tconst cachedStyleData = themeStyles.get(cacheKey);\n\tif (cachedStyleData !== undefined) { // it's valid for style to be an empty string\n\t\treturn cachedStyleData;\n\t}\n\n\tif (!registeredThemes.has(themeName)) {\n\t\tconst regThemesStr = [...registeredThemes.values()].join(\", \");\n\t\tconsole.warn(`You have requested a non-registered theme ${themeName} - falling back to ${DEFAULT_THEME}. Registered themes are: ${regThemesStr}`); /* eslint-disable-line */\n\t\treturn _getThemeProperties(packageName, DEFAULT_THEME);\n\t}\n\n\tconst [style, customStyle] = await Promise.all([\n\t\t_getThemeProperties(packageName, themeName),\n\t\texternalThemeName ? _getThemeProperties(packageName, externalThemeName, true) : undefined,\n\t]);\n\n\tconst styleData = mergeStyles(style, customStyle);\n\tif (styleData) {\n\t\tthemeStyles.set(cacheKey, styleData);\n\t}\n\n\treturn styleData;\n};\n\nconst _getThemeProperties = async (packageName: string, themeName: string, forCustomTheme = false) => {\n\tconst loadersMap = forCustomTheme ? customLoaders : loaders;\n\tconst loader = loadersMap.get(`${packageName}/${themeName}`);\n\tif (!loader) {\n\t\t// no themes for package\n\t\tif (!forCustomTheme) {\n\t\t\tconsole.error(`Theme [${themeName}] not registered for package [${packageName}]`); /* eslint-disable-line */\n\t\t}\n\t\treturn;\n\t}\n\tlet data;\n\ttry {\n\t\tdata = await loader(themeName);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tconsole.error(packageName, e.message); /* eslint-disable-line */\n\t\treturn;\n\t}\n\n\treturn data;\n};\n\nconst getRegisteredPackages = () => {\n\treturn registeredPackages;\n};\n\nconst isThemeRegistered = (theme: string) => {\n\treturn registeredThemes.has(theme);\n};\n\nexport {\n\tregisterThemePropertiesLoader,\n\tregisterCustomThemePropertiesLoader,\n\tgetThemeProperties,\n\tgetRegisteredPackages,\n\tisThemeRegistered,\n};\n\nexport type {\n\tThemeData,\n\tThemeLoader,\n};\n"]}
1
+ {"version":3,"file":"Themes.js","sourceRoot":"","sources":["../../src/asset-registries/Themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,MAAM,WAAW,GAAG,IAAI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M,MAAM,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,KAAc,CAAC;QACzB,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB;QAChE,OAAO;IACR,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,GAAG,EAAE;IAClC,OAAO,kBAAkB,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC3C,OAAO,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EACN,6BAA6B,EAC7B,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GACjB,CAAC","sourcesContent":["import { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { mergeStyles } from \"../ManagedStyles.js\";\nimport { fireThemeRegistered } from \"../theming/ThemeRegistered.js\";\n\ntype ThemeData = string;\ntype ThemeLoader = (themeName: string) => Promise<string>;\n\ntype CSSVariablesTarget = \"root\" | \"host\";\n\nconst themeStyles = new Map<string, string>();\nconst loaders = new Map<string, ThemeLoader>();\nconst customLoaders = new Map<string, ThemeLoader>();\nconst registeredPackages = new Map<string, { cssVariablesTarget: CSSVariablesTarget }>();\nconst registeredThemes = new Set<string>();\n\nconst registerThemePropertiesLoader = (packageName: string, themeName: string, loader: ThemeLoader, cssVariablesTarget: CSSVariablesTarget = \"root\") => {\n\tloaders.set(`${packageName}/${themeName}`, loader);\n\tregisteredPackages.set(packageName, { cssVariablesTarget });\n\tregisteredThemes.add(themeName);\n\tfireThemeRegistered(themeName);\n};\n\nconst registerCustomThemePropertiesLoader = (packageName: string, themeName: string, loader: ThemeLoader) => {\n\tcustomLoaders.set(`${packageName}/${themeName}`, loader);\n};\n\nconst getThemeProperties = async (packageName: string, themeName: string, externalThemeName?: string) => {\n\tconst cacheKey = `${packageName}_${themeName}_${externalThemeName || \"\"}`;\n\tconst cachedStyleData = themeStyles.get(cacheKey);\n\tif (cachedStyleData !== undefined) { // it's valid for style to be an empty string\n\t\treturn cachedStyleData;\n\t}\n\n\tif (!registeredThemes.has(themeName)) {\n\t\tconst regThemesStr = [...registeredThemes.values()].join(\", \");\n\t\tconsole.warn(`You have requested a non-registered theme ${themeName} - falling back to ${DEFAULT_THEME}. Registered themes are: ${regThemesStr}`); /* eslint-disable-line */\n\t\treturn _getThemeProperties(packageName, DEFAULT_THEME);\n\t}\n\n\tconst [style, customStyle] = await Promise.all([\n\t\t_getThemeProperties(packageName, themeName),\n\t\texternalThemeName ? _getThemeProperties(packageName, externalThemeName, true) : undefined,\n\t]);\n\n\tconst styleData = mergeStyles(style, customStyle);\n\tif (styleData) {\n\t\tthemeStyles.set(cacheKey, styleData);\n\t}\n\n\treturn styleData;\n};\n\nconst _getThemeProperties = async (packageName: string, themeName: string, forCustomTheme = false) => {\n\tconst loadersMap = forCustomTheme ? customLoaders : loaders;\n\tconst loader = loadersMap.get(`${packageName}/${themeName}`);\n\tif (!loader) {\n\t\t// no themes for package\n\t\tif (!forCustomTheme) {\n\t\t\tconsole.error(`Theme [${themeName}] not registered for package [${packageName}]`); /* eslint-disable-line */\n\t\t}\n\t\treturn;\n\t}\n\tlet data;\n\ttry {\n\t\tdata = await loader(themeName);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tconsole.error(packageName, e.message); /* eslint-disable-line */\n\t\treturn;\n\t}\n\n\treturn data;\n};\n\nconst getRegisteredPackages = () => {\n\treturn registeredPackages;\n};\n\nconst isThemeRegistered = (theme: string) => {\n\treturn registeredThemes.has(theme);\n};\n\nexport {\n\tregisterThemePropertiesLoader,\n\tregisterCustomThemePropertiesLoader,\n\tgetThemeProperties,\n\tgetRegisteredPackages,\n\tisThemeRegistered,\n};\n\nexport type {\n\tThemeData,\n\tThemeLoader,\n};\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Stores value in shared map and fires a cross-runtime config change event.
3
+ * The firing runtime's own handler is skipped via the skip-guard pattern.
4
+ */
5
+ declare const fireConfigChange: (name: string, value: unknown) => void;
6
+ /**
7
+ * Registers a per-setting cross-runtime listener.
8
+ * The handler is only called when another runtime fires the change.
9
+ */
10
+ declare const attachConfigChange: (name: string, handler: (value: any) => void) => void;
11
+ /**
12
+ * Reads the last-set value from the shared values map.
13
+ * Used by late-booting runtimes to pick up values already set by others.
14
+ */
15
+ declare const getSharedValue: <T>(name: string) => T | undefined;
16
+ export { fireConfigChange, attachConfigChange, getSharedValue };
@@ -0,0 +1,42 @@
1
+ import getSharedResource from "../getSharedResource.js";
2
+ import EventProvider from "../EventProvider.js";
3
+ const getEventProvider = () => getSharedResource("ConfigChange.eventProvider", new EventProvider());
4
+ const getSharedValues = () => getSharedResource("ConfigChange.values", {});
5
+ const CONFIG_CHANGE = "configChange";
6
+ // Module-level skip flags — each runtime copy has its own Set,
7
+ // so a runtime's own handler correctly skips when it fires.
8
+ const skipFlags = new Set();
9
+ /**
10
+ * Stores value in shared map and fires a cross-runtime config change event.
11
+ * The firing runtime's own handler is skipped via the skip-guard pattern.
12
+ */
13
+ const fireConfigChange = (name, value) => {
14
+ getSharedValues()[name] = value;
15
+ skipFlags.add(name);
16
+ try {
17
+ getEventProvider().fireEvent(CONFIG_CHANGE, { name, value });
18
+ }
19
+ finally {
20
+ skipFlags.delete(name);
21
+ }
22
+ };
23
+ /**
24
+ * Registers a per-setting cross-runtime listener.
25
+ * The handler is only called when another runtime fires the change.
26
+ */
27
+ const attachConfigChange = (name, handler) => {
28
+ getEventProvider().attachEvent(CONFIG_CHANGE, (detail) => {
29
+ if (detail.name === name && !skipFlags.has(name)) {
30
+ handler(detail.value);
31
+ }
32
+ });
33
+ };
34
+ /**
35
+ * Reads the last-set value from the shared values map.
36
+ * Used by late-booting runtimes to pick up values already set by others.
37
+ */
38
+ const getSharedValue = (name) => {
39
+ return getSharedValues()[name];
40
+ };
41
+ export { fireConfigChange, attachConfigChange, getSharedValue };
42
+ //# sourceMappingURL=ConfigurationSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigurationSync.js","sourceRoot":"","sources":["../../src/config/ConfigurationSync.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAIhD,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,4BAA4B,EAAE,IAAI,aAAa,EAA4B,CAAC,CAAC;AAC9H,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAA0B,qBAAqB,EAAE,EAAE,CAAC,CAAC;AAEpG,MAAM,aAAa,GAAG,cAAc,CAAC;AAErC,+DAA+D;AAC/D,4DAA4D;AAC5D,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,KAAc,EAAQ,EAAE;IAC/D,eAAe,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAEhC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,IAAI,CAAC;QACJ,gBAAgB,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9D,CAAC;YAAS,CAAC;QACV,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;AACF,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,OAA6B,EAAQ,EAAE;IAChF,gBAAgB,EAAE,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,MAA0B,EAAE,EAAE;QAC5E,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAI,IAAY,EAAiB,EAAE;IACzD,OAAO,eAAe,EAAE,CAAC,IAAI,CAAkB,CAAC;AACjD,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC","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 — 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"]}
@@ -4,6 +4,7 @@ import { reRenderAllUI5Elements } from "../Render.js";
4
4
  import { DEFAULT_LANGUAGE } from "../generated/AssetParameters.js";
5
5
  import { isBooted } from "../Boot.js";
6
6
  import { attachConfigurationReset } from "./ConfigurationReset.js";
7
+ import { fireConfigChange, attachConfigChange, getSharedValue } from "./ConfigurationSync.js";
7
8
  let curLanguage;
8
9
  let fetchDefaultLanguage;
9
10
  attachConfigurationReset(() => {
@@ -18,6 +19,16 @@ attachConfigurationReset(() => {
18
19
  // Once all necessary language data has been loaded, the language change
19
20
  // will trigger a re-render of all language-aware components.
20
21
  let languageChangePending = false;
22
+ attachConfigChange("language", (language) => {
23
+ curLanguage = language;
24
+ languageChangePending = true;
25
+ fireLanguageChange(language).then(() => {
26
+ languageChangePending = false;
27
+ if (isBooted()) {
28
+ reRenderAllUI5Elements({ languageAware: true });
29
+ }
30
+ });
31
+ });
21
32
  const getLanguageChangePending = () => languageChangePending;
22
33
  /**
23
34
  * Returns the currently configured language, or the browser language as a fallback.
@@ -26,7 +37,7 @@ const getLanguageChangePending = () => languageChangePending;
26
37
  */
27
38
  const getLanguage = () => {
28
39
  if (curLanguage === undefined) {
29
- curLanguage = getConfiguredLanguage();
40
+ curLanguage = getSharedValue("language") ?? getConfiguredLanguage();
30
41
  }
31
42
  return curLanguage;
32
43
  };
@@ -44,6 +55,7 @@ const setLanguage = async (language) => {
44
55
  }
45
56
  languageChangePending = true;
46
57
  curLanguage = language;
58
+ fireConfigChange("language", language);
47
59
  await fireLanguageChange(language);
48
60
  languageChangePending = false;
49
61
  if (isBooted()) {
@@ -1 +1 @@
1
- {"version":3,"file":"Language.js","sourceRoot":"","sources":["../../src/config/Language.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,IAAI,qBAAqB,EACpC,uBAAuB,IAAI,iCAAiC,GAC5D,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAA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AEF;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG,GAAW,EAAE;IACvC,OAAO,gBAAgB,CAAC;AACzB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,uBAAuB,GAAG,CAAC,gBAAyB,EAAE,EAAE;IAC7D,oBAAoB,GAAG,gBAAgB,CAAC;AACzC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,GAAY,EAAE;IAC7C,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACxC,oBAAoB,GAAG,iCAAiC,EAAE,CAAC;IAC5D,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,GACxB,CAAC","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"]}
1
+ {"version":3,"file":"Language.js","sourceRoot":"","sources":["../../src/config/Language.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,IAAI,qBAAqB,EACpC,uBAAuB,IAAI,iCAAiC,GAC5D,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACj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CAAC;AACpB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,KAAK,EAAE,QAAgB,EAAiB,EAAE;IAC7D,IAAI,WAAW,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO;IACR,CAAC;IAED,qBAAqB,GAAG,IAAI,CAAC;IAC7B,WAAW,GAAG,QAAQ,CAAC;IAEvB,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAEvC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAEnC,qBAAqB,GAAG,KAAK,CAAC;IAE9B,IAAI,QAAQ,EAAE,EAAE,CAAC;QAChB,MAAM,sBAAsB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACF,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG,GAAW,EAAE;IACvC,OAAO,gBAAgB,CAAC;AACzB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,uBAAuB,GAAG,CAAC,gBAAyB,EAAE,EAAE;IAC7D,oBAAoB,GAAG,gBAAgB,CAAC;AACzC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,GAAY,EAAE;IAC7C,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACxC,oBAAoB,GAAG,iCAAiC,EAAE,CAAC;IAC5D,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EACN,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,GACxB,CAAC","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"]}
@@ -36,4 +36,16 @@ declare const isTheme: (theme: string) => boolean;
36
36
  */
37
37
  declare const isLegacyThemeFamily: () => boolean;
38
38
  declare const isLegacyThemeFamilyAsync: () => Promise<boolean>;
39
- export { getTheme, setTheme, isTheme, isLegacyThemeFamily, isLegacyThemeFamilyAsync, getDefaultTheme, };
39
+ /**
40
+ * Returns the base theme of external theme.
41
+ * @private
42
+ * @returns {string | undefined} the base theme name
43
+ */
44
+ declare const getBaseTheme: () => string | undefined;
45
+ /**
46
+ * Sets the base theme of the current external theme.
47
+ * @param { string | undefined } theme the name of the new base theme
48
+ * @private
49
+ */
50
+ declare const setBaseTheme: (theme: string | undefined) => void;
51
+ export { getTheme, setTheme, isTheme, isLegacyThemeFamily, isLegacyThemeFamilyAsync, getDefaultTheme, getBaseTheme, setBaseTheme, };
@@ -5,10 +5,18 @@ import getThemeDesignerTheme from "../theming/getThemeDesignerTheme.js";
5
5
  import { DEFAULT_THEME, SUPPORTED_THEMES } from "../generated/AssetParameters.js";
6
6
  import { boot, isBooted } from "../Boot.js";
7
7
  import { attachConfigurationReset } from "./ConfigurationReset.js";
8
+ import { fireConfigChange, attachConfigChange, getSharedValue } from "./ConfigurationSync.js";
8
9
  let curTheme;
10
+ let curBaseTheme;
9
11
  attachConfigurationReset(() => {
10
12
  curTheme = undefined;
11
13
  });
14
+ attachConfigChange("theme", (theme) => {
15
+ curTheme = theme;
16
+ if (isBooted()) {
17
+ applyTheme(curTheme).then(() => reRenderAllUI5Elements({ themeAware: true }));
18
+ }
19
+ });
12
20
  /**
13
21
  * Returns the current theme.
14
22
  * @public
@@ -16,7 +24,7 @@ attachConfigurationReset(() => {
16
24
  */
17
25
  const getTheme = () => {
18
26
  if (curTheme === undefined) {
19
- curTheme = getConfiguredTheme();
27
+ curTheme = getSharedValue("theme") ?? getConfiguredTheme();
20
28
  }
21
29
  return curTheme;
22
30
  };
@@ -31,6 +39,7 @@ const setTheme = async (theme) => {
31
39
  return;
32
40
  }
33
41
  curTheme = theme;
42
+ fireConfigChange("theme", theme);
34
43
  if (isBooted()) {
35
44
  // Update CSS Custom Properties
36
45
  await applyTheme(curTheme);
@@ -76,5 +85,21 @@ const isLegacyThemeFamilyAsync = async () => {
76
85
  return isLegacyThemeFamily();
77
86
  };
78
87
  const isKnownTheme = (theme) => SUPPORTED_THEMES.includes(theme);
79
- export { getTheme, setTheme, isTheme, isLegacyThemeFamily, isLegacyThemeFamilyAsync, getDefaultTheme, };
88
+ /**
89
+ * Returns the base theme of external theme.
90
+ * @private
91
+ * @returns {string | undefined} the base theme name
92
+ */
93
+ const getBaseTheme = () => {
94
+ return curBaseTheme;
95
+ };
96
+ /**
97
+ * Sets the base theme of the current external theme.
98
+ * @param { string | undefined } theme the name of the new base theme
99
+ * @private
100
+ */
101
+ const setBaseTheme = (theme) => {
102
+ curBaseTheme = theme;
103
+ };
104
+ export { getTheme, setTheme, isTheme, isLegacyThemeFamily, isLegacyThemeFamilyAsync, getDefaultTheme, getBaseTheme, setBaseTheme, };
80
105
  //# sourceMappingURL=Theme.js.map
@@ -1 +1 @@
1
- {"version":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M,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE;IACjC,OAAO,QAAQ,EAAE,KAAK,KAAK,CAAC;AAC7B,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,MAAM,YAAY,GAAG,QAAQ,EAAE,CAAC;IAEhC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,qBAAqB,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,KAAK,IAAI,EAAE;IAC3C,MAAM,IAAI,EAAE,CAAC;IACb,OAAO,mBAAmB,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEzE,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GACf,CAAC","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"]}
1
+ {"version":3,"file":"Theme.js","sourceRoot":"","sources":["../../src/config/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,C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wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,YAAY,GACZ,CAAC","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"]}
@@ -43,21 +43,26 @@ const setThemeRoot = (themeRoot) => {
43
43
  return;
44
44
  }
45
45
  currThemeRoot = themeRoot;
46
- if (!validateThemeRoot(themeRoot)) {
47
- console.warn(`The ${themeRoot} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`); // eslint-disable-line
48
- return;
49
- }
50
46
  return attachCustomThemeStylesToHead(getTheme());
51
47
  };
52
- const formatThemeLink = (theme) => {
53
- return `${getThemeRoot()}Base/baseLib/${theme}/css_variables.css`; // theme root is always set at this point.
48
+ const formatThemeLink = (theme, validatedThemeRoot) => {
49
+ return `${validatedThemeRoot}Base/baseLib/${theme}/css_variables.css`;
54
50
  };
55
51
  const attachCustomThemeStylesToHead = async (theme) => {
56
52
  const link = document.querySelector(`[sap-ui-webcomponents-theme="${theme}"]`);
57
53
  if (link) {
58
54
  document.head.removeChild(link);
59
55
  }
60
- await createLinkInHead(formatThemeLink(theme), { "sap-ui-webcomponents-theme": theme });
56
+ const themeRoot = getThemeRoot();
57
+ if (!themeRoot) {
58
+ return;
59
+ }
60
+ const validatedThemeRoot = validateThemeRoot(themeRoot);
61
+ if (!validatedThemeRoot) {
62
+ console.warn(`The ${themeRoot} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`); // eslint-disable-line
63
+ return;
64
+ }
65
+ await createLinkInHead(formatThemeLink(theme, validatedThemeRoot), { "sap-ui-webcomponents-theme": theme });
61
66
  };
62
67
  export { getThemeRoot, setThemeRoot, attachCustomThemeStylesToHead, };
63
68
  //# sourceMappingURL=ThemeRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeRoot.js","sourceRoot":"","sources":["../../src/config/ThemeRoot.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,IAAI,aAAiC,CAAC;AAEtC,wBAAwB,CAAC,GAAG,EAAE;IAC7B,aAAa,GAAG,SAAS,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,GAAuB,EAAE;IAC7C,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QACjC,aAAa,GAAG,sBAAsB,EAAE,CAAC;IAC1C,CAAC;IAED,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,YAAY,GAAG,CAAC,SAAiB,EAA6B,EAAE;IACrE,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO;IACR,CAAC;IAED,aAAa,GAAG,SAAS,CAAC;IAE1B,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,OAAO,SAAS,0FAA0F,CAAC,CAAC,CAAC,sBAAsB;QAChJ,OAAO;IACR,CAAC;IAED,OAAO,6BAA6B,CAAC,QAAQ,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,GAAG,YAAY,EAAG,gBAAgB,KAAK,oBAAoB,CAAC,CAAC,0CAA0C;AAC/G,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;IAC5E,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,gCAAgC,KAAK,IAAI,CAAC,CAAC;IAE/E,IAAI,IAAI,EAAE,CAAC;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,gBAAgB,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,EAAE,4BAA4B,EAAE,KAAK,EAAE,CAAC,CAAC;AACzF,CAAC,CAAC;AAEF,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,6BAA6B,GAC7B,CAAC","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\tattachCust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,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO;IACR,CAAC;IAED,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAExD,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,OAAO,SAAS,0FAA0F,CAAC,CAAC,CAAC,sBAAsB;QAChJ,OAAO;IACR,CAAC;IAED,MAAM,gBAAgB,CAAC,eAAe,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAAE,EAAE,4BAA4B,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7G,CAAC,CAAC;AAEF,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,6BAA6B,GAC7B,CAAC","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"]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Returns if the "ignoreUrlParams" configuration is set.
3
+ * @public
4
+ * @since 2.23.0
5
+ * @returns { boolean }
6
+ */
7
+ declare const getIgnoreUrlParams: () => boolean;
8
+ /**
9
+ * Defines the "ignoreUrlParams" setting.
10
+ *
11
+ * - When set to "true", the framework will not process URL parameters
12
+ * (e.g. sap-ui-theme, sap-ui-language) during initialization.
13
+ * - When set to "false" (default), URL parameters are processed normally.
14
+ *
15
+ * @public
16
+ * @since 2.23.0
17
+ * @param { boolean } ignoreUrlParams
18
+ */
19
+ declare const setIgnoreUrlParams: (ignoreUrlParams: boolean) => void;
20
+ export { getIgnoreUrlParams, setIgnoreUrlParams, };
@@ -0,0 +1,30 @@
1
+ import { getIgnoreUrlParams as getConfiguredIgnoreUrlParams } from "../InitialConfiguration.js";
2
+ let _ignoreUrlParams;
3
+ /**
4
+ * Returns if the "ignoreUrlParams" configuration is set.
5
+ * @public
6
+ * @since 2.23.0
7
+ * @returns { boolean }
8
+ */
9
+ const getIgnoreUrlParams = () => {
10
+ if (_ignoreUrlParams === undefined) {
11
+ _ignoreUrlParams = getConfiguredIgnoreUrlParams();
12
+ }
13
+ return _ignoreUrlParams;
14
+ };
15
+ /**
16
+ * Defines the "ignoreUrlParams" setting.
17
+ *
18
+ * - When set to "true", the framework will not process URL parameters
19
+ * (e.g. sap-ui-theme, sap-ui-language) during initialization.
20
+ * - When set to "false" (default), URL parameters are processed normally.
21
+ *
22
+ * @public
23
+ * @since 2.23.0
24
+ * @param { boolean } ignoreUrlParams
25
+ */
26
+ const setIgnoreUrlParams = (ignoreUrlParams) => {
27
+ _ignoreUrlParams = ignoreUrlParams;
28
+ };
29
+ export { getIgnoreUrlParams, setIgnoreUrlParams, };
30
+ //# sourceMappingURL=UrlParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrlParams.js","sourceRoot":"","sources":["../../src/config/UrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,IAAI,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAEhG,IAAI,gBAAyB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,GAAY,EAAE;IACxC,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACpC,gBAAgB,GAAG,4BAA4B,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,gBAAgB,CAAC;AACzB,CAAC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,kBAAkB,GAAG,CAAC,eAAwB,EAAE,EAAE;IACvD,gBAAgB,GAAG,eAAe,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EACN,kBAAkB,EAClB,kBAAkB,GAClB,CAAC","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"]}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * React wrapper factory for UI5 Web Components.
3
+ *
4
+ * This lightweight factory creates typed React components that wrap UI5 Web Components.
5
+ * It handles:
6
+ * - Event prop conversion (onXxx → ui5-xxx event listeners)
7
+ * - Ref forwarding
8
+ * - Children handling
9
+ *
10
+ * Note: Supports React >=19.
11
+ *
12
+ * Note: This is for documentation samples only - for production React apps,
13
+ * use the official @ui5/webcomponents-react library.
14
+ */
15
+ import type UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
16
+ /**
17
+ * Creates a React component wrapper for a UI5 Web Component.
18
+ *
19
+ * @param ComponentClass - The UI5 Web Component class (e.g., Button from "@ui5/webcomponents/dist/Button.js")
20
+ * @returns A React component that renders the custom element with proper TypeScript types
21
+ * @since 2.21.0
22
+ * @example
23
+ * import Button from "@ui5/webcomponents/dist/Button.js";
24
+ * const ReactButton = createReactComponent(Button);
25
+ */
26
+ export default function createReactComponent<T extends typeof UI5Element>(klass: T): (props: InstanceType<T>["_jsxProps"]) => import("react").DOMElement<Record<string, unknown>, Element>;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * React wrapper factory for UI5 Web Components.
3
+ *
4
+ * This lightweight factory creates typed React components that wrap UI5 Web Components.
5
+ * It handles:
6
+ * - Event prop conversion (onXxx → ui5-xxx event listeners)
7
+ * - Ref forwarding
8
+ * - Children handling
9
+ *
10
+ * Note: Supports React >=19.
11
+ *
12
+ * Note: This is for documentation samples only - for production React apps,
13
+ * use the official @ui5/webcomponents-react library.
14
+ */
15
+ import { createElement } from "react";
16
+ /**
17
+ * Creates a React component wrapper for a UI5 Web Component.
18
+ *
19
+ * @param ComponentClass - The UI5 Web Component class (e.g., Button from "@ui5/webcomponents/dist/Button.js")
20
+ * @returns A React component that renders the custom element with proper TypeScript types
21
+ * @since 2.21.0
22
+ * @example
23
+ * import Button from "@ui5/webcomponents/dist/Button.js";
24
+ * const ReactButton = createReactComponent(Button);
25
+ */
26
+ export default function createReactComponent(klass) {
27
+ const tag = klass.getMetadata().getTag();
28
+ return function Component(props) {
29
+ const patchedProps = {};
30
+ Object.entries(props).forEach(([key, value]) => {
31
+ if (key.startsWith("on") && typeof value === "function") {
32
+ // React 19 wraps DOM events (change, click, input, etc.) in SyntheticEvent,
33
+ // hiding CustomEvent.detail under nativeEvent.detail.
34
+ // Patch all event handlers to restore detail from nativeEvent.
35
+ const originalHandler = value;
36
+ patchedProps[key] = (e) => {
37
+ const nativeDetail = e.nativeEvent?.detail;
38
+ if (nativeDetail !== undefined) {
39
+ e.detail = nativeDetail;
40
+ }
41
+ originalHandler(e);
42
+ };
43
+ }
44
+ else {
45
+ patchedProps[key] = value;
46
+ }
47
+ });
48
+ return createElement(tag, patchedProps);
49
+ };
50
+ }
51
+ //# sourceMappingURL=createReactComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createReactComponent.js","sourceRoot":"","sources":["../src/createReactComponent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAA8B,KAAQ;IACjF,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC;IAEzC,OAAO,SAAS,SAAS,CAAC,KAAmC;QAC5D,MAAM,YAAY,GAA4B,EAAE,CAAC;QAEjD,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACzE,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;gBACzD,4EAA4E;gBAC5E,sDAAsD;gBACtD,+DAA+D;gBAC/D,MAAM,eAAe,GAAG,KAAK,CAAC;gBAC9B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAQ,EAAE,EAAE;oBAChC,MAAM,YAAY,GAAI,CAAsD,CAAC,WAAW,EAAE,MAAM,CAAC;oBACjG,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;wBAC/B,CAAoC,CAAC,MAAM,GAAG,YAAY,CAAC;oBAC7D,CAAC;oBACD,eAAe,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACP,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAC3B,CAAC;QACF,CAAC,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IACzC,CAAC,CAAC;AACH,CAAC","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 → 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"]}
@@ -2,4 +2,9 @@
2
2
  border: none;
3
3
  overflow: visible;
4
4
  margin: 0;
5
+ }
6
+
7
+ .sapUiBLy[popover] {
8
+ width: 100%;
9
+ height: 100%;
5
10
  }
@@ -1,9 +1,34 @@
1
1
  :root {
2
- --_ui5_content_density:cozy;
2
+ /*
3
+ Use a non-existent variable to always trigger the fallback.
4
+ Because this variable is never defined, the fallback is used
5
+ in all cases.
6
+
7
+ Using `initial` as a fallback can work only for properties
8
+ that treat it as an invalid value. To avoid this inconsistency,
9
+ we intentionally reference an undefined variable, which is
10
+ always considered invalid and undefined.
11
+ */
12
+ --_ui5-cozy-size: var(--_ui5-f2d95f8);
13
+
14
+ --_ui5-compact-size: ;
15
+ --_ui5_content_density: cozy;
3
16
  }
4
17
 
5
18
  [data-ui5-compact-size],
6
19
  .ui5-content-density-compact,
7
20
  .sapUiSizeCompact {
8
- --_ui5_content_density:compact;
9
- }
21
+ --_ui5-cozy-size: ;
22
+ /*
23
+ Use a non-existent variable to always trigger the fallback.
24
+ Because this variable is never defined, the fallback is used
25
+ in all cases.
26
+
27
+ Using `initial` as a fallback can work only for properties
28
+ that treat it as an invalid value. To avoid this inconsistency,
29
+ we intentionally reference an undefined variable, which is
30
+ always considered invalid and undefined.
31
+ */
32
+ --_ui5-compact-size: var(--_ui5-f2d95f8);
33
+ --_ui5_content_density: compact;
34
+ }