@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,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/util/dragAndDrop/DragRegistry.ts"],
4
- "sourcesContent": ["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null) => {\n\tdraggedElement = element;\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"],
5
- "mappings": "aACA,OAAOA,MAA0B,+CAEjC,OAAS,iBAAAC,MAAqB,sBAE9B,OACC,2BAAAC,MACM,wCAEP,MAAMC,EAAuB,EAE7B,IAAIC,EAAqC,KAEzC,MAAMC,EAAqBC,GAAgC,CAC1DF,EAAiBE,CAClB,EAEMC,EAAsB,IAAM,CACjCH,EAAiB,IAClB,EAEMI,EAAoB,IAClBJ,EAGFK,EAAgC,MAAOC,GAAwC,CACpF,MAAMC,EAAc,SAAS,cAAc,KAAK,EAC1CC,EAAa,MAAMX,EAAc,yBAAyB,EAE1DY,EAAoBF,EAAY,aAAa,CAAE,KAAM,MAAO,CAAC,EAE7DG,EAAS,IAAI,cACnB,OAAAA,EAAO,YAAYd,CAAoB,EAEvCa,EAAkB,mBAAqB,CAACC,CAAM,EAC9CD,EAAkB,YAAcD,EAAW,QAAQV,EAAyBQ,CAAK,EAE1EC,CACR,EAUMI,EAAoB,MAAOL,EAAeM,IAAiB,CAChE,GAAIN,EAAQP,EAAsB,CACjC,QAAQ,KAAK,yCAAyCO,CAAK,gBAAgBP,CAAoB,GAAG,EAClG,MACD,CAEA,GAAI,CAACa,EAAE,aACN,OAGD,MAAMC,EAAoB,MAAMR,EAA8BC,CAAK,EAGnE,SAAS,KAAK,YAAYO,CAAiB,EAE3CD,EAAE,aAAa,aAAaC,EAAmB,EAAG,CAAC,EAGnD,sBAAsB,IAAM,CAC3BA,EAAkB,OAAO,CAC1B,CAAC,CACF,EAwBMC,EAAe,CACpB,kBAAAb,EACA,oBAAAE,EACA,kBAAAC,EACA,kBAAAO,CACD,EAEA,eAAeG,EACf,OACCH,KAAA",
6
- "names": ["MultipleDragGhostCss", "getI18nBundle", "DRAG_DROP_MULTIPLE_TEXT", "MIN_MULTI_DRAG_COUNT", "draggedElement", "setDraggedElement", "element", "clearDraggedElement", "getDraggedElement", "createDefaultMultiDragElement", "count", "dragElement", "i18nBundle", "dragElementShadow", "styles", "startMultipleDrag", "e", "customDragElement", "DragRegistry"]
4
+ "sourcesContent": ["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null, e?: DragEvent) => {\n\tdraggedElement = element;\n\n\t// Store the dragged element's ID in the dataTransfer object to ensure\n\t// the drag operation is recognized across different browsers and contexts.\n\t// Without this, Safari browser in iOS may not recognize the drag operation.\n\te?.dataTransfer?.setData(\"text/plain\", element ? element.id : \"\");\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"],
5
+ "mappings": "aACA,OAAOA,MAA0B,+CAEjC,OAAS,iBAAAC,MAAqB,sBAE9B,OACC,2BAAAC,MACM,wCAEP,MAAMC,EAAuB,EAE7B,IAAIC,EAAqC,KAEzC,MAAMC,EAAoB,CAACC,EAA6BC,IAAkB,CACzEH,EAAiBE,EAKjBC,GAAG,cAAc,QAAQ,aAAcD,EAAUA,EAAQ,GAAK,EAAE,CACjE,EAEME,EAAsB,IAAM,CACjCJ,EAAiB,IAClB,EAEMK,EAAoB,IAClBL,EAGFM,EAAgC,MAAOC,GAAwC,CACpF,MAAMC,EAAc,SAAS,cAAc,KAAK,EAC1CC,EAAa,MAAMZ,EAAc,yBAAyB,EAE1Da,EAAoBF,EAAY,aAAa,CAAE,KAAM,MAAO,CAAC,EAE7DG,EAAS,IAAI,cACnB,OAAAA,EAAO,YAAYf,CAAoB,EAEvCc,EAAkB,mBAAqB,CAACC,CAAM,EAC9CD,EAAkB,YAAcD,EAAW,QAAQX,EAAyBS,CAAK,EAE1EC,CACR,EAUMI,EAAoB,MAAOL,EAAeJ,IAAiB,CAChE,GAAII,EAAQR,EAAsB,CACjC,QAAQ,KAAK,yCAAyCQ,CAAK,gBAAgBR,CAAoB,GAAG,EAClG,MACD,CAEA,GAAI,CAACI,EAAE,aACN,OAGD,MAAMU,EAAoB,MAAMP,EAA8BC,CAAK,EAGnE,SAAS,KAAK,YAAYM,CAAiB,EAE3CV,EAAE,aAAa,aAAaU,EAAmB,EAAG,CAAC,EAGnD,sBAAsB,IAAM,CAC3BA,EAAkB,OAAO,CAC1B,CAAC,CACF,EAwBMC,EAAe,CACpB,kBAAAb,EACA,oBAAAG,EACA,kBAAAC,EACA,kBAAAO,CACD,EAEA,eAAeE,EACf,OACCF,KAAA",
6
+ "names": ["MultipleDragGhostCss", "getI18nBundle", "DRAG_DROP_MULTIPLE_TEXT", "MIN_MULTI_DRAG_COUNT", "draggedElement", "setDraggedElement", "element", "e", "clearDraggedElement", "getDraggedElement", "createDefaultMultiDragElement", "count", "dragElement", "i18nBundle", "dragElementShadow", "styles", "startMultipleDrag", "customDragElement", "DragRegistry"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";import u from"./escapeRegex.js";import r from"../sap/base/security/encodeXML.js";function m(o,s){const e=o||"";if(!e||!s)return r(e);const i=s.toLowerCase(),n=e.toLowerCase(),a=s.length;let t=n.search(new RegExp(`(^|\\s)${u(i)}`));if(t!==-1&&n[t]===" "&&t++,t===-1)return r(e);const c=r(e.substring(0,t)),g=r(e.substring(t,t+a)),f=r(e.substring(t+a));return`${c}<b>${g}</b>${f}`}export default m;
2
+ //# sourceMappingURL=generateHighlightedMarkupFirstMatch.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/generateHighlightedMarkupFirstMatch.ts"],
4
+ "sourcesContent": ["import escapeRegex from \"./escapeRegex.js\";\n// @ts-expect-error\nimport encodeXML from \"../sap/base/security/encodeXML.js\";\n\n/**\n * Generate markup for a raw string where the first match following StartsWithPerTerm pattern is wrapped with `<b>` tag.\n * StartsWithPerTerm pattern: finds the first word (at start or after whitespace) that starts with the search text.\n * All inputs to this function are considered literal text, and special characters will always be escaped.\n * @param {string} text The text to add highlighting to\n * @param {string} textToHighlight The text which should be highlighted (case-insensitive)\n * @return {string} the markup HTML which contains the first match surrounded with a `<b>` tag.\n */\nfunction generateHighlightedMarkupFirstMatch(text: string, textToHighlight: string): string {\n\tconst normalizedText = text || \"\";\n\n\tif (!normalizedText || !textToHighlight) {\n\t\treturn encodeXML(normalizedText) as string;\n\t}\n\n\tconst filterValue = textToHighlight.toLowerCase();\n\tconst lowerText = normalizedText.toLowerCase();\n\tconst matchLength = textToHighlight.length;\n\n\t// Find the first word that starts with textToHighlight (StartsWithPerTerm pattern)\n\tlet matchIndex = lowerText.search(new RegExp(`(^|\\\\s)${escapeRegex(filterValue)}`));\n\tif (matchIndex !== -1 && lowerText[matchIndex] === \" \") {\n\t\tmatchIndex++; // Skip the space\n\t}\n\n\t// If no match found, return encoded text\n\tif (matchIndex === -1) {\n\t\treturn encodeXML(normalizedText) as string;\n\t}\n\n\t// Build highlighted markup with only the first match\n\tconst beforeMatch = encodeXML(normalizedText.substring(0, matchIndex)) as string;\n\tconst match = encodeXML(normalizedText.substring(matchIndex, matchIndex + matchLength)) as string;\n\tconst afterMatch = encodeXML(normalizedText.substring(matchIndex + matchLength)) as string;\n\n\treturn `${beforeMatch}<b>${match}</b>${afterMatch}`;\n}\n\nexport default generateHighlightedMarkupFirstMatch;\n"],
5
+ "mappings": "aAAA,OAAOA,MAAiB,mBAExB,OAAOC,MAAe,oCAUtB,SAASC,EAAoCC,EAAcC,EAAiC,CAC3F,MAAMC,EAAiBF,GAAQ,GAE/B,GAAI,CAACE,GAAkB,CAACD,EACvB,OAAOH,EAAUI,CAAc,EAGhC,MAAMC,EAAcF,EAAgB,YAAY,EAC1CG,EAAYF,EAAe,YAAY,EACvCG,EAAcJ,EAAgB,OAGpC,IAAIK,EAAaF,EAAU,OAAO,IAAI,OAAO,UAAUP,EAAYM,CAAW,CAAC,EAAE,CAAC,EAMlF,GALIG,IAAe,IAAMF,EAAUE,CAAU,IAAM,KAClDA,IAIGA,IAAe,GAClB,OAAOR,EAAUI,CAAc,EAIhC,MAAMK,EAAcT,EAAUI,EAAe,UAAU,EAAGI,CAAU,CAAC,EAC/DE,EAAQV,EAAUI,EAAe,UAAUI,EAAYA,EAAaD,CAAW,CAAC,EAChFI,EAAaX,EAAUI,EAAe,UAAUI,EAAaD,CAAW,CAAC,EAE/E,MAAO,GAAGE,CAAW,MAAMC,CAAK,OAAOC,CAAU,EAClD,CAEA,eAAeV",
6
+ "names": ["escapeRegex", "encodeXML", "generateHighlightedMarkupFirstMatch", "text", "textToHighlight", "normalizedText", "filterValue", "lowerText", "matchLength", "matchIndex", "beforeMatch", "match", "afterMatch"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";import{getLocationHref as i}from"./Location.js";const s=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},o=e=>{const t=s("sap-allowed-theme-origins")??s("sap-allowedThemeOrigins");return t?t.split(",").some(n=>n==="*"||e===n.trim()):!1},a=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},g=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,i()).toString();else{const n=new URL(e),r=n.origin;r&&o(r)?t=n.toString():t=a(n.toString(),i())}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};export default g;
1
+ "use strict";import{getLocationHref as s}from"./Location.js";const a=t=>{const e=document.querySelector(`META[name="${t}"]`);return e&&e.getAttribute("content")},g=(t,e=!1)=>{const n=a("sap-allowed-theme-origins")??a("sap-allowedThemeOrigins");return n?e?!0:n.split(",").some(r=>r==="*"||t===r.trim()):!1},l=t=>{let e,n=!1;try{if(t.startsWith(".")||t.startsWith("/")&&!t.startsWith("//"))e=new URL(t,s()).toString(),n=!0;else{const r=t.startsWith("//")?new URL(t,s()):new URL(t),i=r.origin,o=new URL(s()).origin;if(n=i===o,i&&g(i,n))e=r.toString();else return}return e.endsWith("/")||(e=`${e}/`),`${e}UI5/`}catch{return}};export default l;
2
2
  //# sourceMappingURL=validateThemeRoot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/validateThemeRoot.ts"],
4
- "sourcesContent": ["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowed-theme-origins\") ?? getMetaTagValue(\"sap-allowedThemeOrigins\"); // Prioritize the new meta tag name\n\n\t// If no allowed origins are specified, block.\n\tif (!allowedOrigins) {\n\t\treturn false;\n\t}\n\n\treturn allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst buildCorrectUrl = (oldUrl: string, newOrigin: string) => {\n\tconst oldUrlPath = new URL(oldUrl).pathname;\n\n\treturn new URL(oldUrlPath, newOrigin).toString();\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || themeRoot.startsWith(\"/\")) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, getLocationHref()).toString();\n\t\t} else {\n\t\t\tconst themeRootURL = new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\n\t\t\tif (origin && validateThemeOrigin(origin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allow and the URL is not relative, we have to replace the origin\n\t\t\t\t// with current location\n\t\t\t\tresultUrl = buildCorrectUrl(themeRootURL.toString(), getLocationHref());\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t}\n};\n\nexport default validateThemeRoot;\n"],
5
- "mappings": "aAAA,OAAS,mBAAAA,MAAuB,gBAEhC,MAAMC,EAAmBC,GAAwB,CAChD,MAAMC,EAAU,SAAS,cAAc,cAAcD,CAAW,IAAI,EAGpE,OAFkBC,GAAWA,EAAQ,aAAa,SAAS,CAG5D,EAEMC,EAAuBC,GAAmB,CAC/C,MAAMC,EAAiBL,EAAgB,2BAA2B,GAAKA,EAAgB,yBAAyB,EAGhH,OAAKK,EAIEA,EAAe,MAAM,GAAG,EAAE,KAAKC,GAC9BA,IAAkB,KAAOF,IAAWE,EAAc,KAAK,CAC9D,EALO,EAMT,EAEMC,EAAkB,CAACC,EAAgBC,IAAsB,CAC9D,MAAMC,EAAa,IAAI,IAAIF,CAAM,EAAE,SAEnC,OAAO,IAAI,IAAIE,EAAYD,CAAS,EAAE,SAAS,CAChD,EAEME,EAAqBC,GAAsB,CAChD,IAAIC,EAEJ,GAAI,CACH,GAAID,EAAU,WAAW,GAAG,GAAKA,EAAU,WAAW,GAAG,EAKxDC,EAAY,IAAI,IAAID,EAAWb,EAAgB,CAAC,EAAE,SAAS,MACrD,CACN,MAAMe,EAAe,IAAI,IAAIF,CAAS,EAChCR,EAASU,EAAa,OAExBV,GAAUD,EAAoBC,CAAM,EAEvCS,EAAYC,EAAa,SAAS,EAIlCD,EAAYN,EAAgBO,EAAa,SAAS,EAAGf,EAAgB,CAAC,CAExE,CAEA,OAAKc,EAAU,SAAS,GAAG,IAC1BA,EAAY,GAAGA,CAAS,KAGlB,GAAGA,CAAS,MACpB,MAAY,CAEZ,CACD,EAEA,eAAeF",
6
- "names": ["getLocationHref", "getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "allowedOrigins", "allowedOrigin", "buildCorrectUrl", "oldUrl", "newOrigin", "oldUrlPath", "validateThemeRoot", "themeRoot", "resultUrl", "themeRootURL"]
4
+ "sourcesContent": ["import { getLocationHref } from \"./Location.js\";\n\nconst getMetaTagValue = (metaTagName: string) => {\n\tconst metaTag = document.querySelector(`META[name=\"${metaTagName}\"]`),\n\t\tmetaTagContent = metaTag && metaTag.getAttribute(\"content\");\n\n\treturn metaTagContent;\n};\n\nconst validateThemeOrigin = (origin: string, isSameOrigin: boolean = false) => {\n\tconst allowedOrigins = getMetaTagValue(\"sap-allowed-theme-origins\") ?? getMetaTagValue(\"sap-allowedThemeOrigins\"); // Prioritize the new meta tag name\n\n\t// If no allowed origins are specified, block.\n\tif (!allowedOrigins) {\n\t\treturn false;\n\t}\n\n\t// If it's same-origin (relative URL resolved to current page), allow it when there's any meta tag present\n\t// The presence of the meta tag indicates the user wants to use theme roots\n\tif (isSameOrigin) {\n\t\treturn true;\n\t}\n\n\treturn allowedOrigins.split(\",\").some(allowedOrigin => {\n\t\treturn allowedOrigin === \"*\" || origin === allowedOrigin.trim();\n\t});\n};\n\nconst validateThemeRoot = (themeRoot: string) => {\n\tlet resultUrl;\n\tlet isSameOrigin = false;\n\n\ttry {\n\t\tif (themeRoot.startsWith(\".\") || (themeRoot.startsWith(\"/\") && !themeRoot.startsWith(\"//\"))) {\n\t\t\t// Handle relative url\n\t\t\t// new URL(\"/newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\t// new URL(\"./newExmPath\", \"http://example.com/exmPath\") => http://example.com/exmPath/newExmPath\n\t\t\t// new URL(\"../newExmPath\", \"http://example.com/exmPath\") => http://example.com/newExmPath\n\t\t\tresultUrl = new URL(themeRoot, getLocationHref()).toString();\n\t\t\tisSameOrigin = true;\n\t\t} else {\n\t\t\t// Protocol-relative URLs (//host/path) need a base to resolve the protocol\n\t\t\tconst themeRootURL = themeRoot.startsWith(\"//\") ? new URL(themeRoot, getLocationHref()) : new URL(themeRoot);\n\t\t\tconst origin = themeRootURL.origin;\n\t\t\tconst currentOrigin = new URL(getLocationHref()).origin;\n\n\t\t\t// Check if the absolute URL is same-origin\n\t\t\tisSameOrigin = origin === currentOrigin;\n\n\t\t\tif (origin && validateThemeOrigin(origin, isSameOrigin)) {\n\t\t\t\t// If origin is allowed, use it\n\t\t\t\tresultUrl = themeRootURL.toString();\n\t\t\t} else {\n\t\t\t\t// If origin is not allowed, return undefined to indicate validation failed\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tif (!resultUrl.endsWith(\"/\")) {\n\t\t\tresultUrl = `${resultUrl}/`;\n\t\t}\n\n\t\treturn `${resultUrl}UI5/`;\n\t} catch (e) {\n\t\t// Catch if URL is not correct\n\t\treturn undefined;\n\t}\n};\n\nexport default validateThemeRoot;\n"],
5
+ "mappings": "aAAA,OAAS,mBAAAA,MAAuB,gBAEhC,MAAMC,EAAmBC,GAAwB,CAChD,MAAMC,EAAU,SAAS,cAAc,cAAcD,CAAW,IAAI,EAGpE,OAFkBC,GAAWA,EAAQ,aAAa,SAAS,CAG5D,EAEMC,EAAsB,CAACC,EAAgBC,EAAwB,KAAU,CAC9E,MAAMC,EAAiBN,EAAgB,2BAA2B,GAAKA,EAAgB,yBAAyB,EAGhH,OAAKM,EAMDD,EACI,GAGDC,EAAe,MAAM,GAAG,EAAE,KAAKC,GAC9BA,IAAkB,KAAOH,IAAWG,EAAc,KAAK,CAC9D,EAXO,EAYT,EAEMC,EAAqBC,GAAsB,CAChD,IAAIC,EACAL,EAAe,GAEnB,GAAI,CACH,GAAII,EAAU,WAAW,GAAG,GAAMA,EAAU,WAAW,GAAG,GAAK,CAACA,EAAU,WAAW,IAAI,EAKxFC,EAAY,IAAI,IAAID,EAAWV,EAAgB,CAAC,EAAE,SAAS,EAC3DM,EAAe,OACT,CAEN,MAAMM,EAAeF,EAAU,WAAW,IAAI,EAAI,IAAI,IAAIA,EAAWV,EAAgB,CAAC,EAAI,IAAI,IAAIU,CAAS,EACrGL,EAASO,EAAa,OACtBC,EAAgB,IAAI,IAAIb,EAAgB,CAAC,EAAE,OAKjD,GAFAM,EAAeD,IAAWQ,EAEtBR,GAAUD,EAAoBC,EAAQC,CAAY,EAErDK,EAAYC,EAAa,SAAS,MAGlC,OAEF,CAEA,OAAKD,EAAU,SAAS,GAAG,IAC1BA,EAAY,GAAGA,CAAS,KAGlB,GAAGA,CAAS,MACpB,MAAY,CAEX,MACD,CACD,EAEA,eAAeF",
6
+ "names": ["getLocationHref", "getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "isSameOrigin", "allowedOrigins", "allowedOrigin", "validateThemeRoot", "themeRoot", "resultUrl", "themeRootURL", "currentOrigin"]
7
7
  }
@@ -0,0 +1,38 @@
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: The function supports react >= 18.
11
+ * Note: This is for documentation samples only - for production React apps,
12
+ * use the official @ui5/webcomponents-react library.
13
+ */
14
+ import * as React from "react";
15
+ import type { ReactNode } from "react";
16
+ import type UI5Element from "../UI5Element.js";
17
+ interface UI5ComponentClass<T extends UI5Element = UI5Element> {
18
+ new (): T;
19
+ getMetadata(): {
20
+ getTag(): string;
21
+ };
22
+ }
23
+ /**
24
+ * Creates a React component wrapper for a UI5 Web Component.
25
+ * Uses the component's _jsxProps type for full TypeScript support.
26
+ *
27
+ * @param ComponentClass - The UI5 Web Component class (e.g., Button from "@ui5/webcomponents/dist/Button.js")
28
+ * @returns A React component that renders the custom element with proper TypeScript types
29
+ * @since 2.21.0
30
+ * @example
31
+ * import Button from "@ui5/webcomponents/dist/Button.js";
32
+ * const ReactButton = createReactComponent(Button);
33
+ * // ReactButton props are typed based on Button's _jsxProps
34
+ */
35
+ declare function createReactComponent<T extends UI5Element>(ComponentClass: UI5ComponentClass<T>): React.ForwardRefExoticComponent<React.PropsWithoutRef<T["_jsxProps"] & {
36
+ children?: ReactNode;
37
+ }> & React.RefAttributes<T>>;
38
+ export default createReactComponent;
@@ -0,0 +1,112 @@
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: The function supports react >= 18.
11
+ * Note: This is for documentation samples only - for production React apps,
12
+ * use the official @ui5/webcomponents-react library.
13
+ */
14
+ import * as React from "react";
15
+ import { useRef, useEffect, forwardRef, } from "react";
16
+ // Helper to convert event name
17
+ const toEventName = (propName) => {
18
+ return propName
19
+ .slice(2) // Remove "on"
20
+ .replace(/([A-Z])/g, (match, letter, index) => {
21
+ return index === 0 ? letter.toLowerCase() : `-${letter.toLowerCase()}`;
22
+ });
23
+ };
24
+ // Helper to create cleanup function for event listener
25
+ const createEventCleanup = (element, eventName, handler) => {
26
+ element.addEventListener(eventName, handler);
27
+ return () => element.removeEventListener(eventName, handler);
28
+ };
29
+ /**
30
+ * Creates a React component wrapper for a UI5 Web Component.
31
+ * Uses the component's _jsxProps type for full TypeScript support.
32
+ *
33
+ * @param ComponentClass - The UI5 Web Component class (e.g., Button from "@ui5/webcomponents/dist/Button.js")
34
+ * @returns A React component that renders the custom element with proper TypeScript types
35
+ * @since 2.21.0
36
+ * @example
37
+ * import Button from "@ui5/webcomponents/dist/Button.js";
38
+ * const ReactButton = createReactComponent(Button);
39
+ * // ReactButton props are typed based on Button's _jsxProps
40
+ */
41
+ function createReactComponent(ComponentClass) {
42
+ const tagName = ComponentClass.getMetadata().getTag();
43
+ const Component = forwardRef((props, ref) => {
44
+ const { children, ...restProps } = props;
45
+ const elementRef = useRef(null);
46
+ // Forward ref
47
+ useEffect(() => {
48
+ if (ref) {
49
+ if (typeof ref === "function") {
50
+ ref(elementRef.current);
51
+ }
52
+ else {
53
+ ref.current = elementRef.current;
54
+ }
55
+ }
56
+ }, [ref]);
57
+ // Handle event props and boolean props imperatively
58
+ useEffect(() => {
59
+ const element = elementRef.current;
60
+ if (!element) {
61
+ return;
62
+ }
63
+ const eventCleanups = [];
64
+ Object.keys(restProps).forEach(propName => {
65
+ const propValue = restProps[propName];
66
+ if (propName.startsWith("on") && typeof propValue === "function") {
67
+ // Convert React event naming (onClick, onSelectionChange) to DOM event naming
68
+ // onClick -> click, onSelectionChange -> selection-change
69
+ const eventName = toEventName(propName);
70
+ const handler = propValue;
71
+ eventCleanups.push(createEventCleanup(element, eventName, handler));
72
+ }
73
+ else if (typeof propValue === "boolean") {
74
+ // React 18 sets false booleans as empty string attributes on custom elements.
75
+ // Set as property directly to avoid this.
76
+ element[propName] = propValue;
77
+ }
78
+ });
79
+ return () => {
80
+ eventCleanups.forEach(cleanup => cleanup());
81
+ };
82
+ }, [restProps]);
83
+ // Filter out event handlers and booleans from DOM props
84
+ const domProps = {};
85
+ Object.keys(restProps).forEach(propName => {
86
+ const propValue = restProps[propName];
87
+ if (propName.startsWith("on") && typeof propValue === "function") {
88
+ return;
89
+ }
90
+ if (typeof propValue === "boolean") {
91
+ return;
92
+ } // handled in useEffect
93
+ // className → class for React compatibility
94
+ if (propName === "className") {
95
+ // eslint-disable-next-line dot-notation
96
+ domProps["class"] = propValue;
97
+ return;
98
+ }
99
+ // Convert camelCase to kebab-case for HTML attributes
100
+ const attrName = propName.replace(/([A-Z])/g, "-$1").toLowerCase();
101
+ domProps[attrName] = propValue;
102
+ });
103
+ return React.createElement(tagName, { ref: elementRef, ...domProps }, children);
104
+ });
105
+ Component.displayName = tagName
106
+ .split("-")
107
+ .map(part => part.charAt(0).toUpperCase() + part.slice(1))
108
+ .join("");
109
+ return Component;
110
+ }
111
+ export default createReactComponent;
112
+ //# sourceMappingURL=createReactComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createReactComponent.js","sourceRoot":"","sources":["../../src/react18/createReactComponent.tsx"],"names":[],"mappings":"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","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: The function supports react >= 18.\n * Note: This is for documentation samples only - for production React apps,\n * use the official @ui5/webcomponents-react library.\n */\n\nimport * as React from \"react\";\nimport type { ReactNode } from \"react\";\nimport {\n\tuseRef,\n\tuseEffect,\n\tforwardRef,\n} from \"react\";\nimport type UI5Element from \"../UI5Element.js\";\n\ntype EventHandler<E = Event> = (event: E) => void;\n\n// Interface for UI5 Web Component classes with _jsxProps support\ninterface UI5ComponentClass<T extends UI5Element = UI5Element> {\n\tnew (): T;\n\tgetMetadata(): {\n\t\tgetTag(): string;\n\t};\n}\n\n// Helper to convert event name\nconst toEventName = (propName: string): string => {\n\treturn propName\n\t\t.slice(2) // Remove \"on\"\n\t\t.replace(/([A-Z])/g, (match: string, letter: string, index: number): string => {\n\t\t\treturn index === 0 ? letter.toLowerCase() : `-${letter.toLowerCase()}`;\n\t\t});\n};\n\n// Helper to create cleanup function for event listener\nconst createEventCleanup = (element: UI5Element, eventName: string, handler: EventHandler): (() => void) => {\n\telement.addEventListener(eventName, handler);\n\treturn () => element.removeEventListener(eventName, handler);\n};\n\n/**\n * Creates a React component wrapper for a UI5 Web Component.\n * Uses the component's _jsxProps type for full TypeScript support.\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 * // ReactButton props are typed based on Button's _jsxProps\n */\nfunction createReactComponent<T extends UI5Element>(\n\tComponentClass: UI5ComponentClass<T>,\n): React.ForwardRefExoticComponent<\n\tReact.PropsWithoutRef<T[\"_jsxProps\"] & { children?: ReactNode }> & React.RefAttributes<T>\n> {\n\tconst tagName = ComponentClass.getMetadata().getTag();\n\n\tconst Component = forwardRef<T, T[\"_jsxProps\"] & { children?: ReactNode }>((props, ref) => {\n\t\tconst { children, ...restProps } = props;\n\t\tconst elementRef = useRef<T>(null);\n\n\t\t// Forward ref\n\t\tuseEffect(() => {\n\t\t\tif (ref) {\n\t\t\t\tif (typeof ref === \"function\") {\n\t\t\t\t\tref(elementRef.current);\n\t\t\t\t} else {\n\t\t\t\t\tref.current = elementRef.current;\n\t\t\t\t}\n\t\t\t}\n\t\t}, [ref]);\n\n\t\t// Handle event props and boolean props imperatively\n\t\tuseEffect(() => {\n\t\t\tconst element = elementRef.current;\n\t\t\tif (!element) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst eventCleanups: Array<() => void> = [];\n\n\t\t\tObject.keys(restProps).forEach(propName => {\n\t\t\t\tconst propValue = (restProps as Record<string, unknown>)[propName];\n\t\t\t\tif (propName.startsWith(\"on\") && typeof propValue === \"function\") {\n\t\t\t\t\t// Convert React event naming (onClick, onSelectionChange) to DOM event naming\n\t\t\t\t\t// onClick -> click, onSelectionChange -> selection-change\n\t\t\t\t\tconst eventName = toEventName(propName);\n\t\t\t\t\tconst handler = propValue as EventHandler;\n\t\t\t\t\teventCleanups.push(createEventCleanup(element, eventName, handler));\n\t\t\t\t} else if (typeof propValue === \"boolean\") {\n\t\t\t\t\t// React 18 sets false booleans as empty string attributes on custom elements.\n\t\t\t\t\t// Set as property directly to avoid this.\n\t\t\t\t\t(element as any)[propName] = propValue;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\teventCleanups.forEach(cleanup => cleanup());\n\t\t\t};\n\t\t}, [restProps]);\n\n\t\t// Filter out event handlers and booleans from DOM props\n\t\tconst domProps: Record<string, unknown> = {};\n\t\tObject.keys(restProps).forEach(propName => {\n\t\t\tconst propValue = (restProps as Record<string, unknown>)[propName];\n\t\t\tif (propName.startsWith(\"on\") && typeof propValue === \"function\") { return; }\n\t\t\tif (typeof propValue === \"boolean\") { return; } // handled in useEffect\n\t\t\t// className → class for React compatibility\n\t\t\tif (propName === \"className\") {\n\t\t\t\t// eslint-disable-next-line dot-notation\n\t\t\t\tdomProps[\"class\"] = propValue;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Convert camelCase to kebab-case for HTML attributes\n\t\t\tconst attrName = propName.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n\t\t\tdomProps[attrName] = propValue;\n\t\t});\n\n\t\treturn React.createElement(tagName, { ref: elementRef, ...domProps }, children);\n\t});\n\n\tComponent.displayName = tagName\n\t\t.split(\"-\")\n\t\t.map(part => part.charAt(0).toUpperCase() + part.slice(1))\n\t\t.join(\"\");\n\n\treturn Component;\n}\n\nexport default createReactComponent;\n"]}
@@ -1,9 +1,8 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
- import BaseConfig from "./config.js";
7
6
  import now from "./util/now.js";
8
7
  /**
9
8
  * A Logging API for JavaScript.
@@ -202,8 +201,8 @@ function getLogEntryListenerInstance() {
202
201
  * Name of the component that produced the log entry
203
202
  * @param {function} [fnSupportInfo]
204
203
  * Callback that returns an additional support object to be logged in support mode.
205
- * This function is only called if support info mode is turned on with
206
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
204
+ * This function is only called if support info mode is turned on via
205
+ * the Support Assistant. To avoid negative effects regarding execution times and
207
206
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
208
207
  * static and stable content.
209
208
  * @public
@@ -225,8 +224,8 @@ Log.fatal = function (sMessage, vDetails, sComponent, fnSupportInfo) {
225
224
  * Name of the component that produced the log entry
226
225
  * @param {function} [fnSupportInfo]
227
226
  * Callback that returns an additional support object to be logged in support mode.
228
- * This function is only called if support info mode is turned on with
229
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
227
+ * This function is only called if support info mode is turned on via
228
+ * the Support Assistant. To avoid negative effects regarding execution times and
230
229
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
231
230
  * static and stable content.
232
231
  * @public
@@ -248,8 +247,8 @@ Log.error = function (sMessage, vDetails, sComponent, fnSupportInfo) {
248
247
  * Name of the component that produced the log entry
249
248
  * @param {function} [fnSupportInfo]
250
249
  * Callback that returns an additional support object to be logged in support mode.
251
- * This function is only called if support info mode is turned on with
252
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
250
+ * This function is only called if support info mode is turned on via
251
+ * the Support Assistant. To avoid negative effects regarding execution times and
253
252
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
254
253
  * static and stable content.
255
254
  * @public
@@ -271,8 +270,8 @@ Log.warning = function (sMessage, vDetails, sComponent, fnSupportInfo) {
271
270
  * Name of the component that produced the log entry
272
271
  * @param {function} [fnSupportInfo]
273
272
  * Callback that returns an additional support object to be logged in support mode.
274
- * This function is only called if support info mode is turned on with
275
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
273
+ * This function is only called if support info mode is turned on via
274
+ * the Support Assistant. To avoid negative effects regarding execution times and
276
275
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
277
276
  * static and stable content.
278
277
  * @public
@@ -294,8 +293,8 @@ Log.info = function (sMessage, vDetails, sComponent, fnSupportInfo) {
294
293
  * Name of the component that produced the log entry
295
294
  * @param {function} [fnSupportInfo]
296
295
  * Callback that returns an additional support object to be logged in support mode.
297
- * This function is only called if support info mode is turned on with
298
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
296
+ * This function is only called if support info mode is turned on via
297
+ * the Support Assistant. To avoid negative effects regarding execution times and
299
298
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
300
299
  * static and stable content.
301
300
  * @public
@@ -317,8 +316,8 @@ Log.debug = function (sMessage, vDetails, sComponent, fnSupportInfo) {
317
316
  * Name of the component that produced the log entry
318
317
  * @param {function} [fnSupportInfo]
319
318
  * Callback that returns an additional support object to be logged in support mode.
320
- * This function is only called if support info mode is turned on with
321
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
319
+ * This function is only called if support info mode is turned on via
320
+ * the Support Assistant. To avoid negative effects regarding execution times and
322
321
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
323
322
  * static and stable content.
324
323
  * @public
@@ -418,8 +417,8 @@ Log.logSupportInfo = function (bEnabled) {
418
417
  * @param {string} [sComponent]
419
418
  * The log component under which the message should be logged
420
419
  * @param {function} [fnSupportInfo] Callback that returns an additional support object to be
421
- * logged in support mode. This function is only called if support info mode is turned on with
422
- * <code>logSupportInfo(true)</code>. To avoid negative effects regarding execution times and
420
+ * logged in support mode. This function is only called if support info mode is turned on via
421
+ * the Support Assistant. To avoid negative effects regarding execution times and
423
422
  * memory consumption, the returned object should be a simple immutable JSON object with mostly
424
423
  * static and stable content.
425
424
  * @returns {module:sap/base/Log.Entry}
@@ -734,17 +733,4 @@ Log.getLogger = function (sComponent, iDefaultLogLevel) {
734
733
  }
735
734
  return new Logger(sComponent);
736
735
  };
737
-
738
- // set LogLevel
739
- const sLogLevel = BaseConfig.get({
740
- name: "sapUiLogLevel",
741
- type: BaseConfig.Type.String,
742
- defaultValue: undefined,
743
- external: true
744
- });
745
- if (sLogLevel) {
746
- Log.setLevel(Log.Level[sLogLevel.toUpperCase()] || parseInt(sLogLevel));
747
- } else if (!globalThis["sap-ui-optimized"]) {
748
- Log.setLevel(Log.Level.DEBUG);
749
- }
750
736
  export default Log;
@@ -19,7 +19,7 @@
19
19
  *
20
20
  */ /*!
21
21
  * OpenUI5
22
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
22
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
23
23
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
24
24
  */
25
25
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  import uid from "../util/uid.js";
@@ -1,11 +1,11 @@
1
1
  // validation regexes
2
2
  /*!
3
3
  * OpenUI5
4
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
5
5
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
6
  */
7
7
 
8
- var rBasicUrl = /^(?:([^:\/?#]+):)?((?:[\/\\]{2,}((?:\[[^\]]+\]|[^\/?#:]+))(?::([0-9]+))?)?([^?#]*))(?:\?([^#]*))?(?:#(.*))?$/;
8
+ var rBasicUrl = /^(?:([^:\/?#]+):)?((?:[\/\\]{2,}(?:(?:[^@\/?#]*@)?(\[[^\]]+\]|[^\/?#:]+)(?::([0-9]+))?)?)?([^?#]*))(?:\?([^#]*))?(?:#(.*))?$/;
9
9
  var rCheckPath = /^([a-z0-9-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*$/i;
10
10
  var rCheckQuery = /^([a-z0-9-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*$/i;
11
11
  var rCheckFragment = rCheckQuery;
@@ -104,7 +104,8 @@ oURLListValidator.clear = function () {
104
104
  * @param {string} [protocol] The protocol of the URL, can be falsy to allow all protocols for an entry e.g. "", "http", "mailto"
105
105
  * @param {string} [host] The host of the URL, can be falsy to allow all hosts. A wildcard asterisk can be set at the beginning, e.g. "examples.com", "*.example.com"
106
106
  * @param {string} [port] The port of the URL, can be falsy to allow all ports, e.g. "", "8080"
107
- * @param {string} [path] the path of the URL, path of the url, can be falsy to allow all paths. A wildcard asterisk can be set at the end, e.g. "/my-example*", "/my-news"
107
+ * @param {string} [path] the path of the URL, e.g. "/my-news". Can be falsy to allow all paths. A wildcard asterisk can be set at the end to ensure a path starts with the given string, e.g. "/my-example*".
108
+ * When using wildcards, make sure to only provide normalized URLs to the validate function in order to mitigate the risk of path traversal attacks.
108
109
  * @public
109
110
  */
110
111
  oURLListValidator.add = function (protocol, host, port, path) {
@@ -139,13 +140,16 @@ oURLListValidator.entries = function () {
139
140
  * Validates a URL. Check if it's not a script or other security issue.
140
141
  *
141
142
  * <b>Note</b>:
142
- * It is strongly recommended to validate only absolute URLs. There's almost no case
143
+ * It is strongly recommended to validate only absolute, normalized URLs. There's almost no case
143
144
  * where checking only the path of a URL would allow to ensure its validity.
144
- * For compatibility reasons, this API cannot automatically resolve URLs relative to
145
+ * For compatibility reasons, this API does not normalize URLs and cannot automatically resolve URLs relative to
145
146
  * <code>document.baseURI</code>, but callers should do so. In that case, and when the
146
147
  * allow list is not empty, an entry for the origin of <code>document.baseURI</code>
147
148
  * must be added to the allow list.
148
149
  *
150
+ * Any measures to mitigate path traversal or similar attack vectors must be taken by the caller, e.g. by using the
151
+ * {@link https://developer.mozilla.org/docs/Web/API/URL URL} API to normalize the URL beforehand.
152
+ *
149
153
  * <h3>Details</h3>
150
154
  * Splits the given URL into components and checks for allowed characters according to RFC 3986:
151
155
  *
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  import toHex from "../strings/toHex.js";
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  import toHex from "../strings/toHex.js";
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  /*
@@ -15,7 +15,7 @@
15
15
  * @returns {string} padded hex representation of the given character code
16
16
  */ /*!
17
17
  * OpenUI5
18
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
18
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
19
19
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
20
20
  */
21
21
  /*
@@ -1,9 +1,6 @@
1
- // @evo-todo window.performance does not exist on node.js, but there is a module performance-now. Maybe use it
2
-
3
1
  /**
4
- * Returns a high resolution timestamp in microseconds if supported by the environment, otherwise in milliseconds.
5
- * The timestamp is based on 01/01/1970 00:00:00 (UNIX epoch) as float with microsecond precision or
6
- * with millisecond precision, if high resolution timestamps are not available.
2
+ * Returns a high resolution timestamp in microseconds.
3
+ * The timestamp is based on 01/01/1970 00:00:00 (UNIX epoch) as float with microsecond precision.
7
4
  * The fractional part of the timestamp represents fractions of a millisecond.
8
5
  * Converting to a <code>Date</code> is possible by using <code>require(["sap/base/util/now"], function(now){new Date(now());}</code>
9
6
  *
@@ -11,18 +8,15 @@
11
8
  * @since 1.58
12
9
  * @public
13
10
  * @alias module:sap/base/util/now
14
- * @returns {float} timestamp in microseconds if supported by the environment otherwise in milliseconds
11
+ * @returns {float} timestamp in microseconds
15
12
  */ /*!
16
13
  * OpenUI5
17
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
14
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
18
15
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
19
16
  */
20
17
  /*global performance */
21
18
 
22
- var fnNow = !(typeof window != "undefined" && window.performance && performance.now && performance.timing) ? Date.now : function () {
23
- var iNavigationStart = performance.timing.navigationStart;
24
- return function perfnow() {
25
- return iNavigationStart + performance.now();
26
- };
27
- }();
19
+ var fnNow = function now() {
20
+ return performance.timeOrigin + performance.now();
21
+ };
28
22
  export default fnNow;
@@ -4,7 +4,7 @@
4
4
  * @private
5
5
  */ /*!
6
6
  * OpenUI5
7
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
7
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
9
9
  */
10
10
 
@@ -118,7 +118,11 @@ var cssSchema = (function () {
118
118
  'inset' ], [ 'invert' ], [ 'justify' ], [ 'local' ], [ 'medium' ], [
119
119
  'mix' ], [ 'none' ], [ 'normal' ], [ 'once' ], [ 'repeat' ], [ 'scroll'
120
120
  ], [ 'separate' ], [ 'small-caps' ], [ 'spell-out' ], [ 'transparent' ],
121
- [ 'visible' ] ];
121
+ [ 'visible' ],
122
+ // ##### BEGIN: MODIFIED BY SAP
123
+ [ 'flex', 'inline-flex', 'grid', 'inline-grid', 'flow-root', 'contents' ], [ 'initial', 'revert', 'revert-layer', 'unset' ]
124
+ // ##### END: MODIFIED BY SAP
125
+ ];
122
126
  return {
123
127
  '-moz-border-radius': {
124
128
  'cssExtra': c[ 0 ],
@@ -440,7 +444,9 @@ var cssSchema = (function () {
440
444
  },
441
445
  'display': {
442
446
  'cssPropBits': 32,
443
- 'cssLitGroup': [ L[ 2 ], L[ 47 ], L[ 54 ] ]
447
+ // ##### BEGIN: MODIFIED BY SAP
448
+ 'cssLitGroup': [ L[ 2 ], L[ 47 ], L[ 54 ], L[ 64 ], L[ 65 ] ]
449
+ // ##### END: MODIFIED BY SAP
444
450
  },
445
451
  'elevation': {
446
452
  'cssPropBits': 5,
@@ -707,6 +713,12 @@ var cssSchema = (function () {
707
713
  'cssPropBits': 0,
708
714
  'cssLitGroup': [ L[ 18 ], L[ 47 ], L[ 54 ] ]
709
715
  },
716
+ // ##### BEGIN: MODIFIED BY SAP
717
+ 'text-decoration-line': {
718
+ 'cssPropBits': 0,
719
+ 'cssLitGroup': [ L[ 18 ], L[ 47 ], L[ 54 ] ]
720
+ },
721
+ // ##### END: MODIFIED BY SAP
710
722
  'text-indent': {
711
723
  'cssPropBits': 5,
712
724
  'cssLitGroup': [ L[ 47 ] ]
@@ -2004,7 +2016,7 @@ if (typeof window !== 'undefined') {
2004
2016
  }
2005
2017
  /*!
2006
2018
  * OpenUI5
2007
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
2019
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
2008
2020
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
2009
2021
  */
2010
2022
  // Based on coding from the HTML4 Sanitizer by Google Inc.
@@ -4,8 +4,10 @@ import getThemeDesignerTheme from "./getThemeDesignerTheme.js";
4
4
  import { fireThemeLoaded } from "./ThemeLoaded.js";
5
5
  import { getFeature } from "../FeaturesRegistry.js";
6
6
  import { attachCustomThemeStylesToHead, getThemeRoot } from "../config/ThemeRoot.js";
7
+ import { setBaseTheme } from "../config/Theme.js";
7
8
  import { DEFAULT_THEME } from "../generated/AssetParameters.js";
8
9
  import { getCurrentRuntimeIndex } from "../Runtimes.js";
10
+ import { updateComponentStyles } from "./componentStyles.js";
9
11
  // eslint-disable-next-line
10
12
  export let _lib = "ui5";
11
13
  // eslint-disable-next-line
@@ -30,13 +32,18 @@ const deleteThemeBase = () => {
30
32
  };
31
33
  const loadComponentPackages = async (theme, externalThemeName) => {
32
34
  const registeredPackages = getRegisteredPackages();
33
- const packagesStylesPromises = [...registeredPackages].map(async (packageName) => {
35
+ const packagesStylesPromises = [...registeredPackages.entries()].map(async ([packageName, { cssVariablesTarget }]) => {
34
36
  if (packageName === BASE_THEME_PACKAGE) {
35
37
  return;
36
38
  }
37
39
  const cssData = await getThemeProperties(packageName, theme, externalThemeName);
38
40
  if (cssData) {
39
- createOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);
41
+ if (cssVariablesTarget === "root") {
42
+ createOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);
43
+ }
44
+ else if (cssVariablesTarget === "host") {
45
+ updateComponentStyles(packageName, cssData);
46
+ }
40
47
  }
41
48
  });
42
49
  return Promise.all(packagesStylesPromises);
@@ -73,8 +80,11 @@ const applyTheme = async (theme) => {
73
80
  deleteThemeBase();
74
81
  }
75
82
  // Always load component packages properties. For non-registered themes, try with the base theme, if any
76
- const packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;
77
- await loadComponentPackages(packagesTheme || DEFAULT_THEME, extTheme && extTheme.themeName === theme ? theme : undefined);
83
+ const externalThemeName = extTheme && extTheme.themeName === theme ? theme : undefined;
84
+ const baseThemeName = extTheme && extTheme.baseThemeName;
85
+ const effectiveThemeName = isThemeRegistered(theme) ? theme : (baseThemeName || DEFAULT_THEME);
86
+ await loadComponentPackages(effectiveThemeName, externalThemeName);
87
+ setBaseTheme(baseThemeName);
78
88
  fireThemeLoaded(theme);
79
89
  };
80
90
  export default applyTheme;