@ui5/webcomponents-base 0.0.0-b132dd7b9 → 0.0.0-b3a4f8020

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 (349) hide show
  1. package/AGENTS.md +195 -0
  2. package/CHANGELOG.md +563 -0
  3. package/CLAUDE.md +1 -0
  4. package/LICENSE.txt +201 -0
  5. package/README.md +7 -7
  6. package/dist/.tsbuildinfobuild +1 -1
  7. package/dist/Assets-fetch.d.ts +1 -0
  8. package/dist/Assets-fetch.js +3 -0
  9. package/dist/Assets-fetch.js.map +1 -0
  10. package/dist/Assets-node.d.ts +12 -0
  11. package/dist/Assets-node.js +14 -0
  12. package/dist/Assets-node.js.map +1 -0
  13. package/dist/Assets.d.ts +1 -0
  14. package/dist/Assets.js +3 -0
  15. package/dist/Assets.js.map +1 -0
  16. package/dist/Boot.d.ts +2 -1
  17. package/dist/Boot.js +44 -14
  18. package/dist/Boot.js.map +1 -1
  19. package/dist/CustomElementsRegistry.js +1 -1
  20. package/dist/CustomElementsRegistry.js.map +1 -1
  21. package/dist/CustomElementsScopeUtils.d.ts +10 -3
  22. package/dist/CustomElementsScopeUtils.js +13 -3
  23. package/dist/CustomElementsScopeUtils.js.map +1 -1
  24. package/dist/DragAndDrop.d.ts +2 -0
  25. package/dist/DragAndDrop.js +5 -0
  26. package/dist/DragAndDrop.js.map +1 -0
  27. package/dist/FontFace.css +36 -0
  28. package/dist/FontFace.js +0 -8
  29. package/dist/FontFace.js.map +1 -1
  30. package/dist/InitialConfiguration.js +7 -0
  31. package/dist/InitialConfiguration.js.map +1 -1
  32. package/dist/Keys.d.ts +4 -1
  33. package/dist/Keys.js +4 -1
  34. package/dist/Keys.js.map +1 -1
  35. package/dist/ManagedStyles.js +1 -1
  36. package/dist/ManagedStyles.js.map +1 -1
  37. package/dist/ScrollbarStyles.d.ts +2 -0
  38. package/dist/ScrollbarStyles.js +9 -0
  39. package/dist/ScrollbarStyles.js.map +1 -0
  40. package/dist/SystemCSSVars.js +2 -4
  41. package/dist/SystemCSSVars.js.map +1 -1
  42. package/dist/UI5Element.d.ts +35 -9
  43. package/dist/UI5Element.js +59 -27
  44. package/dist/UI5Element.js.map +1 -1
  45. package/dist/UI5ElementMetadata.d.ts +1 -1
  46. package/dist/UI5ElementMetadata.js.map +1 -1
  47. package/dist/asset-registries/Icons.d.ts +42 -8
  48. package/dist/asset-registries/Icons.js +51 -8
  49. package/dist/asset-registries/Icons.js.map +1 -1
  50. package/dist/asset-registries/Illustrations.d.ts +133 -8
  51. package/dist/asset-registries/Illustrations.js +82 -1
  52. package/dist/asset-registries/Illustrations.js.map +1 -1
  53. package/dist/asset-registries/LocaleData.js +2 -1
  54. package/dist/asset-registries/LocaleData.js.map +1 -1
  55. package/dist/asset-registries/Themes.d.ts +5 -2
  56. package/dist/asset-registries/Themes.js +3 -3
  57. package/dist/asset-registries/Themes.js.map +1 -1
  58. package/dist/config/Language.d.ts +2 -1
  59. package/dist/config/Language.js +12 -1
  60. package/dist/config/Language.js.map +1 -1
  61. package/dist/config/Theme.d.ts +13 -1
  62. package/dist/config/Theme.js +18 -1
  63. package/dist/config/Theme.js.map +1 -1
  64. package/dist/config/ThemeRoot.d.ts +3 -1
  65. package/dist/config/ThemeRoot.js +3 -1
  66. package/dist/config/ThemeRoot.js.map +1 -1
  67. package/dist/css/MultipleDragGhost.css +17 -0
  68. package/dist/css/OpenUI5PopupStyles.css +10 -0
  69. package/dist/css/ScrollbarStyles.css +3 -0
  70. package/dist/css/SystemCSSVars.css +28 -3
  71. package/dist/custom-elements-internal.json +1855 -1738
  72. package/dist/custom-elements.json +1462 -1345
  73. package/dist/decorators/slot-strict.d.ts +27 -0
  74. package/dist/decorators/slot-strict.js +54 -0
  75. package/dist/decorators/slot-strict.js.map +1 -0
  76. package/dist/decorators/slot.d.ts +18 -0
  77. package/dist/decorators/slot.js +18 -0
  78. package/dist/decorators/slot.js.map +1 -1
  79. package/dist/decorators.d.ts +2 -1
  80. package/dist/decorators.js +2 -1
  81. package/dist/decorators.js.map +1 -1
  82. package/dist/features/F6Navigation.d.ts +1 -0
  83. package/dist/features/F6Navigation.js +23 -14
  84. package/dist/features/F6Navigation.js.map +1 -1
  85. package/dist/features/InputElementsFormSupport.d.ts +1 -1
  86. package/dist/features/InputElementsFormSupport.js +6 -2
  87. package/dist/features/InputElementsFormSupport.js.map +1 -1
  88. package/dist/features/OpenUI5Support.d.ts +15 -4
  89. package/dist/features/OpenUI5Support.js +83 -42
  90. package/dist/features/OpenUI5Support.js.map +1 -1
  91. package/dist/features/insertOpenUI5PopupStyles.d.ts +2 -0
  92. package/dist/features/insertOpenUI5PopupStyles.js +9 -0
  93. package/dist/features/insertOpenUI5PopupStyles.js.map +1 -0
  94. package/dist/features/patchPatcher.d.ts +7 -6
  95. package/dist/features/patchPatcher.js +14 -4
  96. package/dist/features/patchPatcher.js.map +1 -1
  97. package/dist/features/patchPopup.d.ts +26 -8
  98. package/dist/features/patchPopup.js +118 -25
  99. package/dist/features/patchPopup.js.map +1 -1
  100. package/dist/generated/VersionInfo.js +6 -6
  101. package/dist/generated/VersionInfo.js.map +1 -1
  102. package/dist/generated/assets/i18n/messagebundle_en.json +1 -0
  103. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
  104. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
  105. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
  106. package/dist/generated/css/FontFace.css.d.ts +1 -1
  107. package/dist/generated/css/FontFace.css.js +36 -1
  108. package/dist/generated/css/FontFace.css.js.map +1 -1
  109. package/dist/generated/css/MultipleDragGhost.css.d.ts +2 -0
  110. package/dist/generated/css/MultipleDragGhost.css.js +2 -0
  111. package/dist/generated/css/MultipleDragGhost.css.js.map +1 -0
  112. package/dist/generated/css/OpenUI5PopupStyles.css.d.ts +2 -0
  113. package/dist/generated/css/OpenUI5PopupStyles.css.js +2 -0
  114. package/dist/generated/css/OpenUI5PopupStyles.css.js.map +1 -0
  115. package/dist/generated/css/ScrollbarStyles.css.d.ts +2 -0
  116. package/dist/generated/css/ScrollbarStyles.css.js +2 -0
  117. package/dist/generated/css/ScrollbarStyles.css.js.map +1 -0
  118. package/dist/generated/css/SystemCSSVars.css.d.ts +1 -1
  119. package/dist/generated/css/SystemCSSVars.css.js +1 -1
  120. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  121. package/dist/generated/i18n/i18n-defaults.d.ts +3 -0
  122. package/dist/generated/i18n/i18n-defaults.js +3 -0
  123. package/dist/generated/i18n/i18n-defaults.js.map +1 -0
  124. package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
  125. package/dist/generated/json-imports/i18n-fetch.js +2 -0
  126. package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
  127. package/dist/generated/json-imports/i18n-node.d.ts +1 -0
  128. package/dist/generated/json-imports/i18n-node.js +2 -0
  129. package/dist/generated/json-imports/i18n-node.js.map +1 -0
  130. package/dist/generated/json-imports/i18n.d.ts +1 -0
  131. package/dist/generated/json-imports/i18n.js +2 -0
  132. package/dist/generated/json-imports/i18n.js.map +1 -0
  133. package/dist/index.d.ts +3 -1
  134. package/dist/index.js +5 -1
  135. package/dist/index.js.map +1 -1
  136. package/dist/jsx-runtime.d.ts +1 -0
  137. package/dist/jsx-runtime.js.map +1 -1
  138. package/dist/prod/Assets-fetch.js +2 -0
  139. package/dist/prod/Assets-fetch.js.map +7 -0
  140. package/dist/prod/Assets-node.js +2 -0
  141. package/dist/prod/Assets-node.js.map +7 -0
  142. package/dist/prod/Assets.js +2 -0
  143. package/dist/prod/Assets.js.map +7 -0
  144. package/dist/prod/Boot.js +1 -1
  145. package/dist/prod/Boot.js.map +3 -3
  146. package/dist/prod/CustomElementsRegistry.js +5 -5
  147. package/dist/prod/CustomElementsRegistry.js.map +2 -2
  148. package/dist/prod/CustomElementsScopeUtils.js +1 -1
  149. package/dist/prod/CustomElementsScopeUtils.js.map +3 -3
  150. package/dist/prod/DragAndDrop.js +2 -0
  151. package/dist/prod/DragAndDrop.js.map +7 -0
  152. package/dist/prod/FontFace.js +1 -1
  153. package/dist/prod/FontFace.js.map +3 -3
  154. package/dist/prod/InitialConfiguration.js +1 -1
  155. package/dist/prod/InitialConfiguration.js.map +2 -2
  156. package/dist/prod/Keys.js +1 -1
  157. package/dist/prod/Keys.js.map +3 -3
  158. package/dist/prod/ManagedStyles.js +1 -1
  159. package/dist/prod/ManagedStyles.js.map +2 -2
  160. package/dist/prod/ScrollbarStyles.js +2 -0
  161. package/dist/prod/ScrollbarStyles.js.map +7 -0
  162. package/dist/prod/SystemCSSVars.js +1 -1
  163. package/dist/prod/SystemCSSVars.js.map +3 -3
  164. package/dist/prod/UI5Element.js +1 -1
  165. package/dist/prod/UI5Element.js.map +3 -3
  166. package/dist/prod/UI5ElementMetadata.js +1 -1
  167. package/dist/prod/UI5ElementMetadata.js.map +1 -1
  168. package/dist/prod/asset-registries/Icons.js +1 -1
  169. package/dist/prod/asset-registries/Icons.js.map +3 -3
  170. package/dist/prod/asset-registries/Illustrations.js +1 -1
  171. package/dist/prod/asset-registries/Illustrations.js.map +3 -3
  172. package/dist/prod/asset-registries/LocaleData.js +1 -1
  173. package/dist/prod/asset-registries/LocaleData.js.map +2 -2
  174. package/dist/prod/asset-registries/Themes.js +1 -1
  175. package/dist/prod/asset-registries/Themes.js.map +3 -3
  176. package/dist/prod/config/Language.js +1 -1
  177. package/dist/prod/config/Language.js.map +3 -3
  178. package/dist/prod/config/Theme.js +1 -1
  179. package/dist/prod/config/Theme.js.map +3 -3
  180. package/dist/prod/config/ThemeRoot.js.map +2 -2
  181. package/dist/prod/decorators/slot-strict.js +2 -0
  182. package/dist/prod/decorators/slot-strict.js.map +7 -0
  183. package/dist/prod/decorators/slot.js.map +2 -2
  184. package/dist/prod/decorators.js +1 -1
  185. package/dist/prod/decorators.js.map +3 -3
  186. package/dist/prod/features/F6Navigation.js +1 -1
  187. package/dist/prod/features/F6Navigation.js.map +3 -3
  188. package/dist/prod/features/InputElementsFormSupport.js +1 -1
  189. package/dist/prod/features/InputElementsFormSupport.js.map +3 -3
  190. package/dist/prod/features/OpenUI5Support.js +1 -1
  191. package/dist/prod/features/OpenUI5Support.js.map +3 -3
  192. package/dist/prod/features/insertOpenUI5PopupStyles.js +2 -0
  193. package/dist/prod/features/insertOpenUI5PopupStyles.js.map +7 -0
  194. package/dist/prod/features/patchPatcher.js +1 -1
  195. package/dist/prod/features/patchPatcher.js.map +3 -3
  196. package/dist/prod/features/patchPopup.js +1 -1
  197. package/dist/prod/features/patchPopup.js.map +3 -3
  198. package/dist/prod/generated/VersionInfo.js +1 -1
  199. package/dist/prod/generated/VersionInfo.js.map +2 -2
  200. package/dist/prod/generated/assets/i18n/messagebundle_en.json +1 -0
  201. package/dist/prod/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
  202. package/dist/prod/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
  203. package/dist/prod/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
  204. package/dist/prod/generated/css/FontFace.css.js +36 -1
  205. package/dist/prod/generated/css/FontFace.css.js.map +2 -2
  206. package/dist/prod/generated/css/MultipleDragGhost.css.js +2 -0
  207. package/dist/prod/generated/css/MultipleDragGhost.css.js.map +7 -0
  208. package/dist/prod/generated/css/OpenUI5PopupStyles.css.js +2 -0
  209. package/dist/prod/generated/css/OpenUI5PopupStyles.css.js.map +7 -0
  210. package/dist/prod/generated/css/ScrollbarStyles.css.js +2 -0
  211. package/dist/prod/generated/css/ScrollbarStyles.css.js.map +7 -0
  212. package/dist/prod/generated/css/SystemCSSVars.css.js +1 -1
  213. package/dist/prod/generated/css/SystemCSSVars.css.js.map +1 -1
  214. package/dist/prod/generated/i18n/i18n-defaults.js +2 -0
  215. package/dist/prod/generated/i18n/i18n-defaults.js.map +7 -0
  216. package/dist/prod/generated/json-imports/i18n-fetch.js +2 -0
  217. package/dist/prod/generated/json-imports/i18n-fetch.js.map +7 -0
  218. package/dist/prod/generated/json-imports/i18n-node.js +2 -0
  219. package/dist/prod/generated/json-imports/i18n-node.js.map +7 -0
  220. package/dist/prod/generated/json-imports/i18n.js +2 -0
  221. package/dist/prod/generated/json-imports/i18n.js.map +7 -0
  222. package/dist/prod/index.js +1 -1
  223. package/dist/prod/index.js.map +3 -3
  224. package/dist/prod/jsx-runtime.js.map +2 -2
  225. package/dist/prod/ssr-dom-shim.js +1 -1
  226. package/dist/prod/ssr-dom-shim.js.map +2 -2
  227. package/dist/prod/theming/applyTheme.js +1 -1
  228. package/dist/prod/theming/applyTheme.js.map +3 -3
  229. package/dist/prod/theming/componentStyles.js +3 -0
  230. package/dist/prod/theming/componentStyles.js.map +7 -0
  231. package/dist/prod/thirdparty/preact/preact.module.js +1 -1
  232. package/dist/prod/updateShadowRoot.js +1 -1
  233. package/dist/prod/updateShadowRoot.js.map +3 -3
  234. package/dist/prod/util/FocusableElements.js +1 -1
  235. package/dist/prod/util/FocusableElements.js.map +2 -2
  236. package/dist/prod/util/SelectionAssistant.js +1 -1
  237. package/dist/prod/util/SelectionAssistant.js.map +3 -3
  238. package/dist/prod/util/TabbableElements.js +1 -1
  239. package/dist/prod/util/TabbableElements.js.map +2 -2
  240. package/dist/prod/util/createInstanceChecker.js +2 -0
  241. package/dist/prod/util/createInstanceChecker.js.map +7 -0
  242. package/dist/prod/util/createMultiInstanceChecker.js +2 -0
  243. package/dist/prod/util/createMultiInstanceChecker.js.map +7 -0
  244. package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
  245. package/dist/prod/util/dragAndDrop/DragRegistry.js.map +3 -3
  246. package/dist/prod/util/getParentElement.js +2 -0
  247. package/dist/prod/util/getParentElement.js.map +7 -0
  248. package/dist/prod/util/isElementHidden.js +1 -1
  249. package/dist/prod/util/isElementHidden.js.map +3 -3
  250. package/dist/prod/util/isEventMarked.js +2 -0
  251. package/dist/prod/util/isEventMarked.js.map +7 -0
  252. package/dist/prod/util/valueStateNavigation.js +2 -0
  253. package/dist/prod/util/valueStateNavigation.js.map +7 -0
  254. package/dist/prod/validateThemeRoot.js +1 -1
  255. package/dist/prod/validateThemeRoot.js.map +2 -2
  256. package/dist/ssr-dom-shim.js +2 -1
  257. package/dist/ssr-dom-shim.js.map +1 -1
  258. package/dist/theming/applyTheme.d.ts +2 -0
  259. package/dist/theming/applyTheme.js +20 -5
  260. package/dist/theming/applyTheme.js.map +1 -1
  261. package/dist/theming/componentStyles.d.ts +3 -0
  262. package/dist/theming/componentStyles.js +15 -0
  263. package/dist/theming/componentStyles.js.map +1 -0
  264. package/dist/thirdparty/preact/preact.module.js +1 -1
  265. package/dist/types.d.ts +11 -3
  266. package/dist/types.js.map +1 -1
  267. package/dist/updateShadowRoot.js +2 -1
  268. package/dist/updateShadowRoot.js.map +1 -1
  269. package/dist/util/FocusableElements.js +3 -3
  270. package/dist/util/FocusableElements.js.map +1 -1
  271. package/dist/util/SelectionAssistant.js +0 -8
  272. package/dist/util/SelectionAssistant.js.map +1 -1
  273. package/dist/util/TabbableElements.js +2 -2
  274. package/dist/util/TabbableElements.js.map +1 -1
  275. package/dist/util/createInstanceChecker.d.ts +2 -0
  276. package/dist/util/createInstanceChecker.js +8 -0
  277. package/dist/util/createInstanceChecker.js.map +1 -0
  278. package/dist/util/createMultiInstanceChecker.d.ts +2 -0
  279. package/dist/util/createMultiInstanceChecker.js +19 -0
  280. package/dist/util/createMultiInstanceChecker.js.map +1 -0
  281. package/dist/util/dragAndDrop/DragRegistry.d.ts +14 -8
  282. package/dist/util/dragAndDrop/DragRegistry.js +46 -50
  283. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
  284. package/dist/util/getClassCopy.d.ts +4 -3
  285. package/dist/util/getParentElement.d.ts +2 -0
  286. package/dist/util/getParentElement.js +5 -0
  287. package/dist/util/getParentElement.js.map +1 -0
  288. package/dist/util/isElementHidden.js +2 -1
  289. package/dist/util/isElementHidden.js.map +1 -1
  290. package/dist/util/isEventMarked.d.ts +2 -0
  291. package/dist/util/isEventMarked.js +6 -0
  292. package/dist/util/isEventMarked.js.map +1 -0
  293. package/dist/util/valueStateNavigation.d.ts +8 -0
  294. package/dist/util/valueStateNavigation.js +40 -0
  295. package/dist/util/valueStateNavigation.js.map +1 -0
  296. package/dist/validateThemeRoot.js +6 -2
  297. package/dist/validateThemeRoot.js.map +1 -1
  298. package/package-scripts.cjs +64 -33
  299. package/package.json +27 -22
  300. package/src/css/MultipleDragGhost.css +17 -0
  301. package/src/css/OpenUI5PopupStyles.css +10 -0
  302. package/src/css/ScrollbarStyles.css +3 -0
  303. package/src/css/SystemCSSVars.css +28 -3
  304. package/src/i18n/messagebundle.properties +5 -0
  305. package/src/i18n/messagebundle_en.properties +2 -0
  306. package/src/i18n/messagebundle_en_US_sappsd.properties +2 -0
  307. package/src/i18n/messagebundle_en_US_saprigi.properties +2 -0
  308. package/src/i18n/messagebundle_en_US_saptrc.properties +2 -0
  309. package/src/thirdparty/preact/preact.module.js +1 -1
  310. package/cypress/specs/Accessor.cy.tsx +0 -79
  311. package/cypress/specs/Boot.cy.tsx +0 -19
  312. package/cypress/specs/ConfigurationChange.cy.tsx +0 -41
  313. package/cypress/specs/ConfigurationScript.cy.tsx +0 -133
  314. package/cypress/specs/ConfigurationURL.cy.tsx +0 -201
  315. package/cypress/specs/CustomMount.cy.tsx +0 -9
  316. package/cypress/specs/CustomTheme.cy.tsx +0 -36
  317. package/cypress/specs/EventProvider.cy.tsx +0 -59
  318. package/cypress/specs/Events.cy.tsx +0 -28
  319. package/cypress/specs/SystemDOMElements.cy.tsx +0 -8
  320. package/cypress/specs/Theming.cy.tsx +0 -74
  321. package/cypress/specs/UI5ElementInvalidation.cy.tsx +0 -252
  322. package/cypress/specs/UI5ElementLifecycle.cy.tsx +0 -82
  323. package/cypress/specs/UI5ElementListenForChildPropChanges.cy.tsx +0 -83
  324. package/cypress/specs/UI5ElementMetadataExt.cy.tsx +0 -42
  325. package/cypress/specs/UI5ElementPropertyValidation.cy.tsx +0 -16
  326. package/cypress/specs/UI5ElementPropsAndAttrs.cy.tsx +0 -113
  327. package/cypress/specs/UI5ElementShadowDOM.cy.tsx +0 -30
  328. package/cypress/specs/UI5ElementSlots.cy.tsx +0 -136
  329. package/cypress/specs/WithComplexTemplate.cy.tsx +0 -32
  330. package/cypress/specs/i18n_texts.cy.tsx +0 -129
  331. package/cypress/specs/util/FocusableElements.cy.tsx +0 -48
  332. package/cypress/support/commands.ts +0 -39
  333. package/cypress/support/component-index.html +0 -12
  334. package/cypress/support/component.ts +0 -17
  335. package/cypress/tsconfig.json +0 -21
  336. package/dist/css/FontFace.css +0 -96
  337. package/dist/css/OverrideFontFace.css +0 -32
  338. package/dist/generated/css/OverrideFontFace.css.d.ts +0 -2
  339. package/dist/generated/css/OverrideFontFace.css.js +0 -2
  340. package/dist/generated/css/OverrideFontFace.css.js.map +0 -1
  341. package/dist/prod/generated/css/OverrideFontFace.css.js +0 -2
  342. package/dist/prod/generated/css/OverrideFontFace.css.js.map +0 -7
  343. package/dist/prod/util/getEffectiveScrollbarStyle.js +0 -28
  344. package/dist/prod/util/getEffectiveScrollbarStyle.js.map +0 -7
  345. package/dist/util/getEffectiveScrollbarStyle.d.ts +0 -2
  346. package/dist/util/getEffectiveScrollbarStyle.js +0 -36
  347. package/dist/util/getEffectiveScrollbarStyle.js.map +0 -1
  348. package/src/css/FontFace.css +0 -96
  349. package/src/css/OverrideFontFace.css +0 -32
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/theming/applyTheme.ts"],
4
- "sourcesContent": ["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\nconst BASE_THEME_PACKAGE = \"@ui5/webcomponents-theming\";\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE, theme);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string, externalThemeName?: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages].map(async packageName => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme, externalThemeName);\n\t\tif (cssData) {\n\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;\n\tawait loadComponentPackages(packagesTheme || DEFAULT_THEME, extTheme && extTheme.themeName === theme ? theme : undefined);\n\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"],
5
- "mappings": "aAAA,OAAS,sBAAAA,EAAoB,yBAAAC,EAAuB,qBAAAC,MAAyB,gCAC7E,OAAS,eAAAC,EAAa,uBAAAC,MAA2B,sBACjD,OAAOC,MAA2B,6BAClC,OAAS,mBAAAC,MAAuB,mBAChC,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,iCAAAC,EAA+B,gBAAAC,MAAoB,yBAE5D,OAAS,iBAAAC,MAAqB,kCAC9B,OAAS,0BAAAC,MAA8B,iBAEvC,MAAMC,EAAqB,6BAErBC,EAAwB,IACFZ,EAAsB,EACvB,IAAIW,CAAkB,EAG3CE,EAAgB,MAAOC,GAAkB,CAC9C,GAAI,CAACF,EAAsB,EAC1B,OAGD,MAAMG,EAAU,MAAMhB,EAAmBY,EAAoBG,CAAK,EAC9DC,GACHZ,EAAoBY,EAAS,4BAA6BJ,EAAoBG,CAAK,CAErF,EAEME,EAAkB,IAAM,CAC7Bd,EAAY,4BAA6BS,CAAkB,CAC5D,EAEMM,EAAwB,MAAOH,EAAeI,IAA+B,CAGlF,MAAMC,EAAyB,CAAC,GAFLnB,EAAsB,CAEI,EAAE,IAAI,MAAMoB,GAAe,CAC/E,GAAIA,IAAgBT,EACnB,OAGD,MAAMI,EAAU,MAAMhB,EAAmBqB,EAAaN,EAAOI,CAAiB,EAC1EH,GACHZ,EAAoBY,EAAS,iCAAiCL,EAAuB,CAAC,GAAIU,CAAW,CAEvG,CAAC,EAED,OAAO,QAAQ,IAAID,CAAsB,CAC1C,EAEME,EAAsB,MAAOP,GAAkB,CAEpD,MAAMQ,EAAWlB,EAAsB,EACvC,GAAIkB,EACH,OAAOA,EAIR,MAAMC,EAAiBjB,EAAkC,gBAAgB,EACzE,GAAIiB,GAAkBA,EAAe,kBAAkB,GAEtD,GADmBA,EAAe,mBAAmB,EAEpD,MAAO,CACN,UAAWA,EAAe,+BAA+B,GAAG,MAC5D,cAAe,EAChB,UAESf,EAAa,EACvB,aAAMD,EAA8BO,CAAK,EAElCV,EAAsB,CAE/B,EAEMoB,EAAa,MAAOV,GAAkB,CAC3C,MAAMQ,EAAW,MAAMD,EAAoBP,CAAK,EAG5C,CAACQ,GAAYR,IAAUQ,EAAS,UACnC,MAAMT,EAAcC,CAAK,EAEzBE,EAAgB,EAIjB,MAAMS,EAAgBxB,EAAkBa,CAAK,EAAIA,EAAQQ,GAAYA,EAAS,cAC9E,MAAML,EAAsBQ,GAAiBhB,EAAea,GAAYA,EAAS,YAAcR,EAAQA,EAAQ,MAAS,EAExHT,EAAgBS,CAAK,CACtB,EAEA,eAAeU",
6
- "names": ["getThemeProperties", "getRegisteredPackages", "isThemeRegistered", "removeStyle", "createOrUpdateStyle", "getThemeDesignerTheme", "fireThemeLoaded", "getFeature", "attachCustomThemeStylesToHead", "getThemeRoot", "DEFAULT_THEME", "getCurrentRuntimeIndex", "BASE_THEME_PACKAGE", "isThemeBaseRegistered", "loadThemeBase", "theme", "cssData", "deleteThemeBase", "loadComponentPackages", "externalThemeName", "packagesStylesPromises", "packageName", "detectExternalTheme", "extTheme", "openUI5Support", "applyTheme", "packagesTheme"]
4
+ "sourcesContent": ["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport { setBaseTheme } from \"../config/Theme.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\nimport { updateComponentStyles } from \"./componentStyles.js\";\n\n// eslint-disable-next-line\nexport let _lib = \"ui5\";\n// eslint-disable-next-line\nexport let _package = \"webcomponents-theming\";\n// eslint-disable-next-line\nconst BASE_THEME_PACKAGE = \"@\" + _lib + \"/\" + _package;\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE, theme);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string, externalThemeName?: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages.entries()].map(async ([packageName, { cssVariablesTarget }]) => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme, externalThemeName);\n\t\tif (cssData) {\n\t\t\tif (cssVariablesTarget === \"root\") {\n\t\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t\t} else if (cssVariablesTarget === \"host\") {\n\t\t\t\tupdateComponentStyles(packageName, cssData);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst externalThemeName = extTheme && extTheme.themeName === theme ? theme : undefined;\n\tconst baseThemeName = extTheme && extTheme.baseThemeName;\n\tconst effectiveThemeName = isThemeRegistered(theme) ? theme : (baseThemeName || DEFAULT_THEME);\n\n\tawait loadComponentPackages(effectiveThemeName, externalThemeName);\n\n\tsetBaseTheme(baseThemeName);\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"],
5
+ "mappings": "aAAA,OAAS,sBAAAA,EAAoB,yBAAAC,EAAuB,qBAAAC,MAAyB,gCAC7E,OAAS,eAAAC,EAAa,uBAAAC,MAA2B,sBACjD,OAAOC,MAA2B,6BAClC,OAAS,mBAAAC,MAAuB,mBAChC,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,iCAAAC,EAA+B,gBAAAC,MAAoB,yBAC5D,OAAS,gBAAAC,MAAoB,qBAE7B,OAAS,iBAAAC,MAAqB,kCAC9B,OAAS,0BAAAC,MAA8B,iBACvC,OAAS,yBAAAC,MAA6B,uBAG/B,WAAI,KAAO,MAEP,SAAW,wBAEtB,MAAMC,EAAqB,IAAM,KAAO,IAAM,SAExCC,EAAwB,IACFd,EAAsB,EACvB,IAAIa,CAAkB,EAG3CE,EAAgB,MAAOC,GAAkB,CAC9C,GAAI,CAACF,EAAsB,EAC1B,OAGD,MAAMG,EAAU,MAAMlB,EAAmBc,EAAoBG,CAAK,EAC9DC,GACHd,EAAoBc,EAAS,4BAA6BJ,EAAoBG,CAAK,CAErF,EAEME,EAAkB,IAAM,CAC7BhB,EAAY,4BAA6BW,CAAkB,CAC5D,EAEMM,EAAwB,MAAOH,EAAeI,IAA+B,CAGlF,MAAMC,EAAyB,CAAC,GAFLrB,EAAsB,EAEK,QAAQ,CAAC,EAAE,IAAI,MAAO,CAACsB,EAAa,CAAE,mBAAAC,CAAmB,CAAC,IAAM,CACrH,GAAID,IAAgBT,EACnB,OAGD,MAAMI,EAAU,MAAMlB,EAAmBuB,EAAaN,EAAOI,CAAiB,EAC1EH,IACCM,IAAuB,OAC1BpB,EAAoBc,EAAS,iCAAiCN,EAAuB,CAAC,GAAIW,CAAW,EAC3FC,IAAuB,QACjCX,EAAsBU,EAAaL,CAAO,EAG7C,CAAC,EAED,OAAO,QAAQ,IAAII,CAAsB,CAC1C,EAEMG,EAAsB,MAAOR,GAAkB,CAEpD,MAAMS,EAAWrB,EAAsB,EACvC,GAAIqB,EACH,OAAOA,EAIR,MAAMC,EAAiBpB,EAAkC,gBAAgB,EACzE,GAAIoB,GAAkBA,EAAe,kBAAkB,GAEtD,GADmBA,EAAe,mBAAmB,EAEpD,MAAO,CACN,UAAWA,EAAe,+BAA+B,GAAG,MAC5D,cAAe,EAChB,UAESlB,EAAa,EACvB,aAAMD,EAA8BS,CAAK,EAElCZ,EAAsB,CAE/B,EAEMuB,EAAa,MAAOX,GAAkB,CAC3C,MAAMS,EAAW,MAAMD,EAAoBR,CAAK,EAG5C,CAACS,GAAYT,IAAUS,EAAS,UACnC,MAAMV,EAAcC,CAAK,EAEzBE,EAAgB,EAIjB,MAAME,EAAoBK,GAAYA,EAAS,YAAcT,EAAQA,EAAQ,OACvEY,EAAgBH,GAAYA,EAAS,cACrCI,EAAqB5B,EAAkBe,CAAK,EAAIA,EAASY,GAAiBlB,EAEhF,MAAMS,EAAsBU,EAAoBT,CAAiB,EAEjEX,EAAamB,CAAa,EAC1BvB,EAAgBW,CAAK,CACtB,EAEA,eAAeW",
6
+ "names": ["getThemeProperties", "getRegisteredPackages", "isThemeRegistered", "removeStyle", "createOrUpdateStyle", "getThemeDesignerTheme", "fireThemeLoaded", "getFeature", "attachCustomThemeStylesToHead", "getThemeRoot", "setBaseTheme", "DEFAULT_THEME", "getCurrentRuntimeIndex", "updateComponentStyles", "BASE_THEME_PACKAGE", "isThemeBaseRegistered", "loadThemeBase", "theme", "cssData", "deleteThemeBase", "loadComponentPackages", "externalThemeName", "packagesStylesPromises", "packageName", "cssVariablesTarget", "detectExternalTheme", "extTheme", "openUI5Support", "applyTheme", "baseThemeName", "effectiveThemeName"]
7
7
  }
@@ -0,0 +1,3 @@
1
+ "use strict";const t=new Map;let e;const n=()=>(e||(e=new CSSStyleSheet),e),r=(o,s)=>{t.set(o,s);const S=Array.from(t.values()).join(`
2
+ `);n().replaceSync(S)};export{n as getComponentStyles,r as updateComponentStyles};
3
+ //# sourceMappingURL=componentStyles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/theming/componentStyles.ts"],
4
+ "sourcesContent": ["const packageMap = new Map<string, string>();\nlet componentsStyleSheet: CSSStyleSheet;\n\nconst getComponentStyles = () => {\n\tif (!componentsStyleSheet) {\n\t\tcomponentsStyleSheet = new CSSStyleSheet();\n\t}\n\n\treturn componentsStyleSheet;\n};\n\nconst updateComponentStyles = (packageName: string, content: string) => {\n\tpackageMap.set(packageName, content);\n\n\tconst combinedStyles = Array.from(packageMap.values()).join(\"\\n\");\n\tgetComponentStyles().replaceSync(combinedStyles);\n};\n\nexport {\n\tgetComponentStyles,\n\tupdateComponentStyles,\n};\n"],
5
+ "mappings": "aAAA,MAAMA,EAAa,IAAI,IACvB,IAAIC,EAEJ,MAAMC,EAAqB,KACrBD,IACJA,EAAuB,IAAI,eAGrBA,GAGFE,EAAwB,CAACC,EAAqBC,IAAoB,CACvEL,EAAW,IAAII,EAAaC,CAAO,EAEnC,MAAMC,EAAiB,MAAM,KAAKN,EAAW,OAAO,CAAC,EAAE,KAAK;AAAA,CAAI,EAChEE,EAAmB,EAAE,YAAYI,CAAc,CAChD,EAEA,OACCJ,KAAA,mBACAC,KAAA",
6
+ "names": ["packageMap", "componentsStyleSheet", "getComponentStyles", "updateComponentStyles", "packageName", "content", "combinedStyles"]
7
+ }
@@ -1 +1 @@
1
- var n,l,t,u,i,o,r,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var t in l)n[t]=l[t];return n}function _(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function g(l,t,u){var i,o,r,e={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:e[r]=t[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m(l,e,i,o,null)}function m(n,u,i,o,r){var e={type:n,props:u,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function C(n,l){if(null==l)return n.__?C(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?C(n):null}function S(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return S(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(P)}function P(){var n,t,u,o,r,f,c,s;for(i.sort(e);n=i.shift();)n.__d&&(t=i.length,o=void 0,f=(r=(u=n).__v).__e,c=[],s=[],u.__P&&((o=w({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),F(u.__P,o,r,u.__n,u.__P.namespaceURI,32&r.__u?[f]:null,c,null==f?C(r):f,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,z(c,o,s),o.__e!=f&&S(o)),i.length>t&&i.sort(e));P.__r=0}function $(n,l,t,u,i,o,r,e,f,c,s){var a,h,y,d,w,_,g=u&&u.__k||v,m=l.length;for(f=I(t,l,g,f),a=0;a<m;a++)null!=(y=t.__k[a])&&(h=-1===y.__i?p:g[y.__i]||p,y.__i=a,_=F(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&V(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),4&y.__u||h.__k===y.__k?f=H(y,f,n):"function"==typeof y.type&&void 0!==_?f=_:d&&(f=d.nextSibling),y.__u&=-7);return t.__e=w,f}function I(n,l,t,u){var i,o,r,e,f,c=l.length,s=t.length,a=s,h=0;for(n.__k=[],i=0;i<c;i++)null!=(o=l[i])&&"boolean"!=typeof o&&"function"!=typeof o?(e=i+h,(o=n.__k[i]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,r=null,-1!==(f=o.__i=O(o,t,e,a))&&(a--,(r=t[f])&&(r.__u|=2)),null==r||null===r.__v?(-1==f&&h--,"function"!=typeof o.type&&(o.__u|=4)):f!==e&&(f==e-1?h--:f==e+1?h++:(f>e?h--:h++,o.__u|=4))):o=n.__k[i]=null;if(a)for(i=0;i<s;i++)null!=(r=t[i])&&0==(2&r.__u)&&(r.__e==u&&(u=C(r)),q(r,r));return u}function H(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=H(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=C(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function L(n,l){return l=l||[],null==n||"boolean"==typeof n||(d(n)?n.some(function(n){L(n,l)}):l.push(n)),l}function O(n,l,t,u){var i=n.key,o=n.type,r=t-1,e=t+1,f=l[t];if(null===f||f&&i==f.key&&o===f.type&&0==(2&f.__u))return t;if(("function"!=typeof o||o===k||i)&&u>(null!=f&&0==(2&f.__u)?1:0))for(;r>=0||e<l.length;){if(r>=0){if((f=l[r])&&0==(2&f.__u)&&i==f.key&&o===f.type)return r;r--}if(e<l.length){if((f=l[e])&&0==(2&f.__u)&&i==f.key&&o===f.type)return e;e++}}return-1}function T(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||y.test(l)?t:t+"px"}function j(n,l,t,u,i){var o,r;n:if("style"===l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,o?a:s,o)):n.removeEventListener(l,o?a:s,o);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{r=n.tagName&&n.tagName.includes("-"),t!==u&&(n[l]=null!=t||r?t:"");break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function A(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function F(n,t,u,i,o,r,e,f,c,s){var a,h,p,v,y,g,m,b,C,S,M,P,I,H,L,O,T,j=t.type;if(void 0!==t.constructor)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof j)try{if(b=t.props,C="prototype"in j&&j.prototype.render,S=(a=j.contextType)&&i[a.__c],M=a?S?S.props.value:a.__:i,u.__c?m=(h=t.__c=u.__c).__=h.__E:(C?t.__c=h=new j(b,M):(t.__c=h=new x(b,M),h.constructor=j,h.render=B),S&&S.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=t,p)C&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||t.__v===u.__v)){for(t.__v!==u.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,g)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,I=l.__r,H=0,C){for(h.state=h.__s,h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),L=0;L<h._sb.length;L++)h.__h.push(h._sb[L]);h._sb=[]}else do{h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++H<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(v,y)),f=$(n,d(O=null!=a&&a.type===k&&null==a.key?a.props.children:a)?O:[O],t,u,i,o,r,e,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=r)if(n.then){for(t.__u|=c?160:128;f&&8===f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,t.__e=f}else for(T=r.length;T--;)_(r[T]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==r&&t.__v===u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=N(u.__e,t,u,i,o,r,e,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var i=0;i<u.length;i++)V(u[i],u[++i],u[++i]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(t,u,i,o,r,e,f,c,s){var a,h,v,y,w,g,m,b,k=i.props,x=u.props,S=u.type;if("svg"===S?r="http://www.w3.org/2000/svg":"math"===S?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!S&&(S?w.localName===S:3===w.nodeType)){t=w,e[a]=null;break}if(null==t){if(null===S)return document.createTextNode(x);t=document.createElementNS(r,S,x.is&&x),c&&(l.__m&&l.__m(u,e),c=!1),e=null}if(null===S)k===x||c&&t.data===x||(t.data=x);else{if(e=e&&n.call(t.childNodes),k=i.props||p,!c&&null!=e)for(k={},a=0;a<t.attributes.length;a++)k[(w=t.attributes[a]).name]=w.value;for(a in k)if(w=k[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in x)){if("value"==a&&"defaultValue"in x||"checked"==a&&"defaultChecked"in x)continue;j(t,a,null,w,r)}for(a in x)w=x[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?g=w:"checked"==a?m=w:c&&"function"!=typeof w||k[a]===w||((a.startsWith("on")||"ref"===a&&"function"==typeof w)&&(b=o[Object.keys(o)[0]])&&(w=w.bind(b.props.value)),j(t,a,w,k[a],r));if(h)c||v&&(h.__html===v.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(v&&(t.innerHTML=""),$(t,d(y)?y:[y],u,i,o,"foreignObject"===S?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&C(i,0),c,s),null!=e)for(a=e.length;a--;)_(e[a]);c||(a="value","progress"===S&&null==g?t.removeAttribute("value"):void 0!==g&&(g!==t[a]||"progress"===S&&!g||"option"===S&&g!==k[a])&&j(t,a,g,k[a],r),a="checked",void 0!==m&&m!==t[a]&&j(t,a,m,k[a],r))}return t}function V(n,t,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function q(n,t,u){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||V(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&q(i[o],t,u||"function"!=typeof n.type);u||_(n.__e),n.__c=n.__=n.__e=void 0}function B(n,l,t){return this.constructor(n,t)}function D(t,u,i){var o,r,e,f;u===document&&(u=document.documentElement),l.__&&l.__(t,u),r=(o="function"==typeof i)?null:i&&i.__k||u.__k,e=[],f=[],F(u,t=(!o&&i||u).__k=g(k,null,[t]),r||p,p,u.namespaceURI,!o&&i?[i]:r?null:u.firstChild?n.call(u.childNodes):null,e,!o&&i?i:r?r.__e:u.firstChild,o,f),z(e,t,f)}function E(n,l){D(n,l,E)}function G(l,t,u){var i,o,r,e,f=w({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),t)"key"==r?i=t[r]:"ref"==r?o=t[r]:f[r]=void 0===t[r]&&void 0!==e?e[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),m(l.type,f,i||l.key,o||l.ref,null)}function J(n,l){var t={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}n=v.slice,l={__e:function(n,l,t,u){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof n&&(n=n(w({},t),this.props)),n&&w(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=A(!1),a=A(!0),h=0;export{x as Component,k as Fragment,G as cloneElement,J as createContext,g as createElement,b as createRef,g as h,E as hydrate,u as isValidElement,l as options,D as render,L as toChildArray};
1
+ var n,l,t,u,i,o,r,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var t in l)n[t]=l[t];return n}function _(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function g(l,t,u){var i,o,r,e={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:e[r]=t[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m(l,e,i,o,null)}function m(n,u,i,o,r){var e={type:n,props:u,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function C(n,l){if(null==l)return n.__?C(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?C(n):null}function S(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return S(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(P)}function P(){var n,t,u,o,r,f,c,s;for(i.sort(e);n=i.shift();)n.__d&&(t=i.length,o=void 0,f=(r=(u=n).__v).__e,c=[],s=[],u.__P&&((o=w({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),F(u.__P,o,r,u.__n,u.__P.namespaceURI,32&r.__u?[f]:null,c,null==f?C(r):f,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,z(c,o,s),o.__e!=f&&S(o)),i.length>t&&i.sort(e));P.__r=0}function $(n,l,t,u,i,o,r,e,f,c,s){var a,h,y,d,w,_,g=u&&u.__k||v,m=l.length;for(f=I(t,l,g,f),a=0;a<m;a++)null!=(y=t.__k[a])&&(h=-1===y.__i?p:g[y.__i]||p,y.__i=a,_=F(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&V(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),4&y.__u||h.__k===y.__k?f=H(y,f,n):"function"==typeof y.type&&void 0!==_?f=_:d&&(f=d.nextSibling),y.__u&=-7);return t.__e=w,f}function I(n,l,t,u){var i,o,r,e,f,c=l.length,s=t.length,a=s,h=0;for(n.__k=[],i=0;i<c;i++)null!=(o=l[i])&&"boolean"!=typeof o&&"function"!=typeof o?(e=i+h,(o=n.__k[i]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(k,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,r=null,-1!==(f=o.__i=O(o,t,e,a))&&(a--,(r=t[f])&&(r.__u|=2)),null==r||null===r.__v?(-1==f&&h--,"function"!=typeof o.type&&(o.__u|=4)):f!==e&&(f==e-1?h--:f==e+1?h++:(f>e?h--:h++,o.__u|=4))):o=n.__k[i]=null;if(a)for(i=0;i<s;i++)null!=(r=t[i])&&0==(2&r.__u)&&(r.__e==u&&(u=C(r)),q(r,r));return u}function H(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=H(u[i],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=C(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function L(n,l){return l=l||[],null==n||"boolean"==typeof n||(d(n)?n.some(function(n){L(n,l)}):l.push(n)),l}function O(n,l,t,u){var i=n.key,o=n.type,r=t-1,e=t+1,f=l[t];if(null===f||f&&i==f.key&&o===f.type&&0==(2&f.__u))return t;if(("function"!=typeof o||o===k||i)&&u>(null!=f&&0==(2&f.__u)?1:0))for(;r>=0||e<l.length;){if(r>=0){if((f=l[r])&&0==(2&f.__u)&&i==f.key&&o===f.type)return r;r--}if(e<l.length){if((f=l[e])&&0==(2&f.__u)&&i==f.key&&o===f.type)return e;e++}}return-1}function T(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||y.test(l)?t:t+"px"}function j(n,l,t,u,i){var o,r;n:if("style"===l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,o?a:s,o)):n.removeEventListener(l,o?a:s,o);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{r=n.tagName&&n.tagName.includes("-"),/*t!==u&&*/(n[l]=null!=t||r?t:"");break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function A(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function F(n,t,u,i,o,r,e,f,c,s){var a,h,p,v,y,g,m,b,C,S,M,P,I,H,L,O,T,j=t.type;if(void 0!==t.constructor)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof j)try{if(b=t.props,C="prototype"in j&&j.prototype.render,S=(a=j.contextType)&&i[a.__c],M=a?S?S.props.value:a.__:i,u.__c?m=(h=t.__c=u.__c).__=h.__E:(C?t.__c=h=new j(b,M):(t.__c=h=new x(b,M),h.constructor=j,h.render=B),S&&S.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=t,p)C&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||t.__v===u.__v)){for(t.__v!==u.__v&&(h.props=b,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,g)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,I=l.__r,H=0,C){for(h.state=h.__s,h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),L=0;L<h._sb.length;L++)h.__h.push(h._sb[L]);h._sb=[]}else do{h.__d=!1,I&&I(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++H<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(v,y)),f=$(n,d(O=null!=a&&a.type===k&&null==a.key?a.props.children:a)?O:[O],t,u,i,o,r,e,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=r)if(n.then){for(t.__u|=c?160:128;f&&8===f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,t.__e=f}else for(T=r.length;T--;)_(r[T]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==r&&t.__v===u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=N(u.__e,t,u,i,o,r,e,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var i=0;i<u.length;i++)V(u[i],u[++i],u[++i]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(t,u,i,o,r,e,f,c,s){var a,h,v,y,w,g,m,b,k=i.props,x=u.props,S=u.type;if("svg"===S?r="http://www.w3.org/2000/svg":"math"===S?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!S&&(S?w.localName===S:3===w.nodeType)){t=w,e[a]=null;break}if(null==t){if(null===S)return document.createTextNode(x);t=document.createElementNS(r,S,x.is&&x),c&&(l.__m&&l.__m(u,e),c=!1),e=null}if(null===S)k===x||c&&t.data===x||(t.data=x);else{if(e=e&&n.call(t.childNodes),k=i.props||p,!c&&null!=e)for(k={},a=0;a<t.attributes.length;a++)k[(w=t.attributes[a]).name]=w.value;for(a in k)if(w=k[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in x)){if("value"==a&&"defaultValue"in x||"checked"==a&&"defaultChecked"in x)continue;j(t,a,null,w,r)}for(a in x)w=x[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?g=w:"checked"==a?m=w:c&&"function"!=typeof w||k[a]===w||((a.startsWith("on")||"ref"===a&&"function"==typeof w)&&(b=o[Object.keys(o)[0]])&&(w=w.bind(b.props.value)),j(t,a,w,k[a],r));if(h)c||v&&(h.__html===v.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(v&&(t.innerHTML=""),$(t,d(y)?y:[y],u,i,o,"foreignObject"===S?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&C(i,0),c,s),null!=e)for(a=e.length;a--;)_(e[a]);c||(a="value","progress"===S&&null==g?t.removeAttribute("value"):void 0!==g&&(g!==t[a]||"progress"===S&&!g||"option"===S&&g!==k[a])&&j(t,a,g,k[a],r),a="checked",void 0!==m&&m!==t[a]&&j(t,a,m,k[a],r))}return t}function V(n,t,u){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function q(n,t,u){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||V(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&q(i[o],t,u||"function"!=typeof n.type);u||_(n.__e),n.__c=n.__=n.__e=void 0}function B(n,l,t){return this.constructor(n,t)}function D(t,u,i){var o,r,e,f;u===document&&(u=document.documentElement),l.__&&l.__(t,u),r=(o="function"==typeof i)?null:i&&i.__k||u.__k,e=[],f=[],F(u,t=(!o&&i||u).__k=g(k,null,[t]),r||p,p,u.namespaceURI,!o&&i?[i]:r?null:u.firstChild?n.call(u.childNodes):null,e,!o&&i?i:r?r.__e:u.firstChild,o,f),z(e,t,f)}function E(n,l){D(n,l,E)}function G(l,t,u){var i,o,r,e,f=w({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),t)"key"==r?i=t[r]:"ref"==r?o=t[r]:f[r]=void 0===t[r]&&void 0!==e?e[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),m(l.type,f,i||l.key,o||l.ref,null)}function J(n,l){var t={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}n=v.slice,l={__e:function(n,l,t,u){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof n&&(n=n(w({},t),this.props)),n&&w(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=A(!1),a=A(!0),h=0;export{x as Component,k as Fragment,G as cloneElement,J as createContext,g as createElement,b as createRef,g as h,E as hydrate,u as isValidElement,l as options,D as render,L as toChildArray};
@@ -1,2 +1,2 @@
1
- "use strict";import r from"./theming/getConstructableStyle.js";const s=o=>{const e=o.constructor,t=o.shadowRoot;if(!t){console.warn("There is no shadow root to update");return}t.adoptedStyleSheets=r(e),e.renderer(o,t)};export default s;
1
+ "use strict";import r from"./theming/getConstructableStyle.js";import{getComponentStyles as n}from"./theming/componentStyles.js";const s=o=>{const e=o.constructor,t=o.shadowRoot;if(!t){console.warn("There is no shadow root to update");return}t.adoptedStyleSheets=[n(),...r(e)],e.renderer(o,t)};export default s;
2
2
  //# sourceMappingURL=updateShadowRoot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/updateShadowRoot.ts"],
4
- "sourcesContent": ["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n */\nconst updateShadowRoot = (element: UI5Element) => {\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = element.shadowRoot;\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor);\n\tctor.renderer(element, shadowRoot);\n};\n\nexport default updateShadowRoot;\n"],
5
- "mappings": "aAAA,OAAOA,MAA2B,qCAOlC,MAAMC,EAAoBC,GAAwB,CACjD,MAAMC,EAAOD,EAAQ,YACfE,EAAaF,EAAQ,WAE3B,GAAI,CAACE,EAAY,CAChB,QAAQ,KAAK,mCAAmC,EAChD,MACD,CAEAA,EAAW,mBAAqBJ,EAAsBG,CAAI,EAC1DA,EAAK,SAASD,EAASE,CAAU,CAClC,EAEA,eAAeH",
6
- "names": ["getConstructableStyle", "updateShadowRoot", "element", "ctor", "shadowRoot"]
4
+ "sourcesContent": ["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport { getComponentStyles } from \"./theming/componentStyles.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n */\nconst updateShadowRoot = (element: UI5Element) => {\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = element.shadowRoot;\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tshadowRoot.adoptedStyleSheets = [getComponentStyles(), ...getConstructableStyle(ctor)];\n\tctor.renderer(element, shadowRoot);\n};\n\nexport default updateShadowRoot;\n"],
5
+ "mappings": "aAAA,OAAOA,MAA2B,qCAClC,OAAS,sBAAAC,MAA0B,+BAOnC,MAAMC,EAAoBC,GAAwB,CACjD,MAAMC,EAAOD,EAAQ,YACfE,EAAaF,EAAQ,WAE3B,GAAI,CAACE,EAAY,CAChB,QAAQ,KAAK,mCAAmC,EAChD,MACD,CAEAA,EAAW,mBAAqB,CAACJ,EAAmB,EAAG,GAAGD,EAAsBI,CAAI,CAAC,EACrFA,EAAK,SAASD,EAASE,CAAU,CAClC,EAEA,eAAeH",
6
+ "names": ["getConstructableStyle", "getComponentStyles", "updateShadowRoot", "element", "ctor", "shadowRoot"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import o from"./isElementHidden.js";import f from"./isElementClickable.js";import{instanceOfUI5Element as a}from"../UI5Element.js";import{isSafari as c}from"../Device.js";const E=e=>e.hasAttribute("data-ui5-focus-trap"),d=e=>{const l=getComputedStyle(e);return e.scrollHeight>e.clientHeight&&["scroll","auto"].indexOf(l.overflowY)>=0||e.scrollWidth>e.clientWidth&&["scroll","auto"].indexOf(l.overflowX)>=0},b=async(e,l)=>!e||o(e)?null:m(e,!0,l),H=async(e,l)=>!e||o(e)?null:m(e,!1,l),T=e=>e.hasAttribute("data-ui5-focus-redirect")||!o(e),L=e=>{if(a(e)){const l=e.getAttribute("tabindex");if(l!==null&&parseInt(l)<0)return!0}return!1},m=async(e,l,r)=>{let t,s,n=-1;e.shadowRoot?t=l?e.shadowRoot.firstChild:e.shadowRoot.lastChild:e instanceof HTMLSlotElement&&e.assignedNodes()?(s=e.assignedNodes(),n=l?0:s.length-1,t=s[n]):r?t=e:t=l?e.firstElementChild:e.lastElementChild;let i;for(;t;){const u=t;if(!o(u)&&!L(u)){if(a(t)&&(await t._waitForDomRef(),t=t.getDomRef()),!t||o(t))return null;if(t.nodeType===1&&T(t)&&!E(t)){if(f(t)||(i=await m(t,l),!c()&&!i&&d(t)))return t&&typeof t.focus=="function"?t:null;if(i)return i&&typeof i.focus=="function"?i:null}}t=l?u.nextSibling:u.previousSibling,s&&!s[n].contains(t)&&(n=l?n+1:n-1,t=s[n])}return null};export{b as getFirstFocusableElement,H as getLastFocusableElement};
1
+ "use strict";import o from"./isElementHidden.js";import f from"./isElementClickable.js";import{instanceOfUI5Element as a}from"../UI5Element.js";import{isSafari as E}from"../Device.js";const c=e=>e.hasAttribute("data-ui5-focus-trap"),d=e=>{const l=getComputedStyle(e);return e.scrollHeight>e.clientHeight&&["scroll","auto"].indexOf(l.overflowY)>=0||e.scrollWidth>e.clientWidth&&["scroll","auto"].indexOf(l.overflowX)>=0},b=async(e,l)=>!e||o(e)?null:u(e,!0,l),H=async(e,l)=>!e||o(e)?null:u(e,!1,l),T=e=>e.hasAttribute("data-ui5-focus-redirect")||!o(e),L=e=>{if(a(e)){const l=e.getAttribute("tabindex");if(l!==null&&parseInt(l)<0)return!0}return!1},u=async(e,l,r)=>{let t,s,n=-1;e.shadowRoot?t=l?e.shadowRoot.firstElementChild:e.shadowRoot.lastElementChild:e instanceof HTMLSlotElement&&e.assignedNodes()?(s=e.assignedElements(),n=l?0:s.length-1,t=s[n]):r?t=e:t=l?e.firstElementChild:e.lastElementChild;let i;for(;t;){const m=t;if(!o(m)&&!L(m)){if(a(t)&&(await t._waitForDomRef(),t=t.getDomRef()),!t||o(t))return null;if(t.nodeType===1&&T(t)&&!c(t)){if(f(t)||(i=await u(t,l),!E()&&!i&&d(t)))return t&&typeof t.focus=="function"?t:null;if(i)return i&&typeof i.focus=="function"?i:null}}t=l?m.nextElementSibling:m.previousElementSibling,s&&!s[n].contains(t)&&(n=l?n+1:n-1,t=s[n])}return null};export{b as getFirstFocusableElement,H as getLastFocusableElement};
2
2
  //# sourceMappingURL=FocusableElements.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/FocusableElements.ts"],
4
- "sourcesContent": ["import isElementHidden from \"./isElementHidden.js\";\nimport isElementClickable from \"./isElementClickable.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { isSafari } from \"../Device.js\";\n\ntype FocusableElementPromise = Promise<HTMLElement | null>;\n\nconst isFocusTrap = (el: HTMLElement) => {\n\treturn el.hasAttribute(\"data-ui5-focus-trap\");\n};\n\nconst isScrollable = (el: HTMLElement) => {\n\tconst computedStyle = getComputedStyle(el);\n\n\treturn (el.scrollHeight > el.clientHeight && [\"scroll\", \"auto\"].indexOf(computedStyle.overflowY) >= 0)\n\t\t|| (el.scrollWidth > el.clientWidth && [\"scroll\", \"auto\"].indexOf(computedStyle.overflowX) >= 0);\n};\n\nconst getFirstFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {\n\tif (!container || isElementHidden(container)) {\n\t\treturn null;\n\t}\n\n\treturn findFocusableElement(container, true, startFromContainer);\n};\n\nconst getLastFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {\n\tif (!container || isElementHidden(container)) {\n\t\treturn null;\n\t}\n\n\treturn findFocusableElement(container, false, startFromContainer);\n};\n\nconst isElemFocusable = (el: HTMLElement) => {\n\treturn el.hasAttribute(\"data-ui5-focus-redirect\") || !isElementHidden(el);\n};\n\nconst isUI5ElementWithNegativeTabIndex = (el: HTMLElement) => {\n\tif (instanceOfUI5Element(el)) {\n\t\tconst tabIndex = el.getAttribute(\"tabindex\");\n\t\tif (tabIndex !== null && parseInt(tabIndex) < 0) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst findFocusableElement = async (container: HTMLElement, forward: boolean, startFromContainer?: boolean): FocusableElementPromise => {\n\tlet child: HTMLElement | undefined;\n\tlet assignedElements;\n\tlet currentIndex = -1;\n\n\tif (container.shadowRoot) {\n\t\tchild = forward ? container.shadowRoot.firstChild as HTMLElement : container.shadowRoot.lastChild as HTMLElement;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedNodes();\n\t\tcurrentIndex = forward ? 0 : assignedElements.length - 1;\n\t\tchild = assignedElements[currentIndex] as HTMLElement;\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = forward ? container.firstElementChild as HTMLElement : container.lastElementChild as HTMLElement;\n\t}\n\n\tlet focusableDescendant;\n\n\t/* eslint-disable no-await-in-loop */\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement | undefined = child;\n\n\t\tif (!isElementHidden(originalChild) && !isUI5ElementWithNegativeTabIndex(originalChild)) {\n\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\t// getDomRef is used because some components mark their focusable ref in an inner\n\t\t\t\t// html but there might also be focusable targets outside of it\n\t\t\t\t// as an example - TreeItemBase\n\t\t\t\t// div - root of the component returned by getDomRef()\n\t\t\t\t// \tli.ui5-li-tree - returned by getFocusDomRef() and may not be focusable (ItemNavigation manages tabindex)\n\t\t\t\t// \tul.subtree - may still contain focusable targets (sub nodes of the tree item)\n\t\t\t\tawait child._waitForDomRef();\n\t\t\t\tchild = child.getDomRef();\n\t\t\t}\n\n\t\t\tif (!child || isElementHidden(child)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (child.nodeType === 1 && isElemFocusable(child) && !isFocusTrap(child)) {\n\t\t\t\tif (isElementClickable(child)) {\n\t\t\t\t\treturn (child && typeof child.focus === \"function\") ? child : null;\n\t\t\t\t}\n\n\t\t\t\tfocusableDescendant = await findFocusableElement(child, forward);\n\n\t\t\t\t// check if it is a keyboard focusable scroll container\n\t\t\t\tif (!isSafari() && !focusableDescendant && isScrollable(child)) {\n\t\t\t\t\treturn (child && typeof child.focus === \"function\") ? child : null;\n\t\t\t\t}\n\n\t\t\t\tif (focusableDescendant) {\n\t\t\t\t\treturn (focusableDescendant && typeof focusableDescendant.focus === \"function\") ? focusableDescendant : null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tchild = forward ? originalChild.nextSibling as HTMLElement : originalChild.previousSibling as HTMLElement;\n\n\t\t// If the child element is not part of the currently assigned element,\n\t\t// we have to check the next/previous element assigned to the slot or continue with the next/previous sibling of the slot,\n\t\t// otherwise, the nextSibling/previousSibling is the next element inside the light DOM\n\t\tif (assignedElements && !assignedElements[currentIndex].contains(child)) {\n\t\t\tcurrentIndex = forward ? currentIndex + 1 : currentIndex - 1;\n\n\t\t\tchild = assignedElements[currentIndex] as HTMLElement;\n\t\t}\n\t}\n\n\t/* eslint-enable no-await-in-loop */\n\n\treturn null;\n};\n\nexport {\n\tgetFirstFocusableElement,\n\tgetLastFocusableElement,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAqB,uBAC5B,OAAOC,MAAwB,0BAC/B,OAAS,wBAAAC,MAA4B,mBACrC,OAAS,YAAAC,MAAgB,eAIzB,MAAMC,EAAeC,GACbA,EAAG,aAAa,qBAAqB,EAGvCC,EAAgBD,GAAoB,CACzC,MAAME,EAAgB,iBAAiBF,CAAE,EAEzC,OAAQA,EAAG,aAAeA,EAAG,cAAgB,CAAC,SAAU,MAAM,EAAE,QAAQE,EAAc,SAAS,GAAK,GAC/FF,EAAG,YAAcA,EAAG,aAAe,CAAC,SAAU,MAAM,EAAE,QAAQE,EAAc,SAAS,GAAK,CAChG,EAEMC,EAA2B,MAAOC,EAAwBC,IAC3D,CAACD,GAAaT,EAAgBS,CAAS,EACnC,KAGDE,EAAqBF,EAAW,GAAMC,CAAkB,EAG1DE,EAA0B,MAAOH,EAAwBC,IAC1D,CAACD,GAAaT,EAAgBS,CAAS,EACnC,KAGDE,EAAqBF,EAAW,GAAOC,CAAkB,EAG3DG,EAAmBR,GACjBA,EAAG,aAAa,yBAAyB,GAAK,CAACL,EAAgBK,CAAE,EAGnES,EAAoCT,GAAoB,CAC7D,GAAIH,EAAqBG,CAAE,EAAG,CAC7B,MAAMU,EAAWV,EAAG,aAAa,UAAU,EAC3C,GAAIU,IAAa,MAAQ,SAASA,CAAQ,EAAI,EAC7C,MAAO,EAET,CAEA,MAAO,EACR,EAEMJ,EAAuB,MAAOF,EAAwBO,EAAkBN,IAA0D,CACvI,IAAIO,EACAC,EACAC,EAAe,GAEfV,EAAU,WACbQ,EAAQD,EAAUP,EAAU,WAAW,WAA4BA,EAAU,WAAW,UAC9EA,aAAqB,iBAAmBA,EAAU,cAAc,GAC1ES,EAAmBT,EAAU,cAAc,EAC3CU,EAAeH,EAAU,EAAIE,EAAiB,OAAS,EACvDD,EAAQC,EAAiBC,CAAY,GAC3BT,EACVO,EAAQR,EAERQ,EAAQD,EAAUP,EAAU,kBAAmCA,EAAU,iBAG1E,IAAIW,EAIJ,KAAOH,GAAO,CACb,MAAMI,EAAyCJ,EAE/C,GAAI,CAACjB,EAAgBqB,CAAa,GAAK,CAACP,EAAiCO,CAAa,EAAG,CAYxF,GAXInB,EAAqBe,CAAK,IAO7B,MAAMA,EAAM,eAAe,EAC3BA,EAAQA,EAAM,UAAU,GAGrB,CAACA,GAASjB,EAAgBiB,CAAK,EAClC,OAAO,KAGR,GAAIA,EAAM,WAAa,GAAKJ,EAAgBI,CAAK,GAAK,CAACb,EAAYa,CAAK,EAAG,CAQ1E,GAPIhB,EAAmBgB,CAAK,IAI5BG,EAAsB,MAAMT,EAAqBM,EAAOD,CAAO,EAG3D,CAACb,EAAS,GAAK,CAACiB,GAAuBd,EAAaW,CAAK,GAC5D,OAAQA,GAAS,OAAOA,EAAM,OAAU,WAAcA,EAAQ,KAG/D,GAAIG,EACH,OAAQA,GAAuB,OAAOA,EAAoB,OAAU,WAAcA,EAAsB,IAE1G,CACD,CAEAH,EAAQD,EAAUK,EAAc,YAA6BA,EAAc,gBAKvEH,GAAoB,CAACA,EAAiBC,CAAY,EAAE,SAASF,CAAK,IACrEE,EAAeH,EAAUG,EAAe,EAAIA,EAAe,EAE3DF,EAAQC,EAAiBC,CAAY,EAEvC,CAIA,OAAO,IACR,EAEA,OACCX,KAAA,yBACAI,KAAA",
4
+ "sourcesContent": ["import isElementHidden from \"./isElementHidden.js\";\nimport isElementClickable from \"./isElementClickable.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { isSafari } from \"../Device.js\";\n\ntype FocusableElementPromise = Promise<HTMLElement | null>;\n\nconst isFocusTrap = (el: HTMLElement) => {\n\treturn el.hasAttribute(\"data-ui5-focus-trap\");\n};\n\nconst isScrollable = (el: HTMLElement) => {\n\tconst computedStyle = getComputedStyle(el);\n\n\treturn (el.scrollHeight > el.clientHeight && [\"scroll\", \"auto\"].indexOf(computedStyle.overflowY) >= 0)\n\t\t|| (el.scrollWidth > el.clientWidth && [\"scroll\", \"auto\"].indexOf(computedStyle.overflowX) >= 0);\n};\n\nconst getFirstFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {\n\tif (!container || isElementHidden(container)) {\n\t\treturn null;\n\t}\n\n\treturn findFocusableElement(container, true, startFromContainer);\n};\n\nconst getLastFocusableElement = async (container: HTMLElement, startFromContainer?: boolean): FocusableElementPromise => {\n\tif (!container || isElementHidden(container)) {\n\t\treturn null;\n\t}\n\n\treturn findFocusableElement(container, false, startFromContainer);\n};\n\nconst isElemFocusable = (el: HTMLElement) => {\n\treturn el.hasAttribute(\"data-ui5-focus-redirect\") || !isElementHidden(el);\n};\n\nconst isUI5ElementWithNegativeTabIndex = (el: HTMLElement) => {\n\tif (instanceOfUI5Element(el)) {\n\t\tconst tabIndex = el.getAttribute(\"tabindex\");\n\t\tif (tabIndex !== null && parseInt(tabIndex) < 0) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n\nconst findFocusableElement = async (container: HTMLElement, forward: boolean, startFromContainer?: boolean): FocusableElementPromise => {\n\tlet child: HTMLElement | undefined;\n\tlet assignedElements;\n\tlet currentIndex = -1;\n\n\tif (container.shadowRoot) {\n\t\tchild = forward ? container.shadowRoot.firstElementChild as HTMLElement : container.shadowRoot.lastElementChild as HTMLElement;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedElements();\n\t\tcurrentIndex = forward ? 0 : assignedElements.length - 1;\n\t\tchild = assignedElements[currentIndex] as HTMLElement;\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = forward ? container.firstElementChild as HTMLElement : container.lastElementChild as HTMLElement;\n\t}\n\n\tlet focusableDescendant;\n\n\t/* eslint-disable no-await-in-loop */\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement | undefined = child;\n\n\t\tif (!isElementHidden(originalChild) && !isUI5ElementWithNegativeTabIndex(originalChild)) {\n\t\t\tif (instanceOfUI5Element(child)) {\n\t\t\t\t// getDomRef is used because some components mark their focusable ref in an inner\n\t\t\t\t// html but there might also be focusable targets outside of it\n\t\t\t\t// as an example - TreeItemBase\n\t\t\t\t// div - root of the component returned by getDomRef()\n\t\t\t\t// \tli.ui5-li-tree - returned by getFocusDomRef() and may not be focusable (ItemNavigation manages tabindex)\n\t\t\t\t// \tul.subtree - may still contain focusable targets (sub nodes of the tree item)\n\t\t\t\tawait child._waitForDomRef();\n\t\t\t\tchild = child.getDomRef();\n\t\t\t}\n\n\t\t\tif (!child || isElementHidden(child)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (child.nodeType === 1 && isElemFocusable(child) && !isFocusTrap(child)) {\n\t\t\t\tif (isElementClickable(child)) {\n\t\t\t\t\treturn (child && typeof child.focus === \"function\") ? child : null;\n\t\t\t\t}\n\n\t\t\t\tfocusableDescendant = await findFocusableElement(child, forward);\n\n\t\t\t\t// check if it is a keyboard focusable scroll container\n\t\t\t\tif (!isSafari() && !focusableDescendant && isScrollable(child)) {\n\t\t\t\t\treturn (child && typeof child.focus === \"function\") ? child : null;\n\t\t\t\t}\n\n\t\t\t\tif (focusableDescendant) {\n\t\t\t\t\treturn (focusableDescendant && typeof focusableDescendant.focus === \"function\") ? focusableDescendant : null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tchild = forward ? originalChild.nextElementSibling as HTMLElement : originalChild.previousElementSibling as HTMLElement;\n\n\t\t// If the child element is not part of the currently assigned element,\n\t\t// we have to check the next/previous element assigned to the slot or continue with the next/previous sibling of the slot,\n\t\t// otherwise, the nextSibling/previousSibling is the next element inside the light DOM\n\t\tif (assignedElements && !assignedElements[currentIndex].contains(child)) {\n\t\t\tcurrentIndex = forward ? currentIndex + 1 : currentIndex - 1;\n\n\t\t\tchild = assignedElements[currentIndex] as HTMLElement;\n\t\t}\n\t}\n\n\t/* eslint-enable no-await-in-loop */\n\n\treturn null;\n};\n\nexport {\n\tgetFirstFocusableElement,\n\tgetLastFocusableElement,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAqB,uBAC5B,OAAOC,MAAwB,0BAC/B,OAAS,wBAAAC,MAA4B,mBACrC,OAAS,YAAAC,MAAgB,eAIzB,MAAMC,EAAeC,GACbA,EAAG,aAAa,qBAAqB,EAGvCC,EAAgBD,GAAoB,CACzC,MAAME,EAAgB,iBAAiBF,CAAE,EAEzC,OAAQA,EAAG,aAAeA,EAAG,cAAgB,CAAC,SAAU,MAAM,EAAE,QAAQE,EAAc,SAAS,GAAK,GAC/FF,EAAG,YAAcA,EAAG,aAAe,CAAC,SAAU,MAAM,EAAE,QAAQE,EAAc,SAAS,GAAK,CAChG,EAEMC,EAA2B,MAAOC,EAAwBC,IAC3D,CAACD,GAAaT,EAAgBS,CAAS,EACnC,KAGDE,EAAqBF,EAAW,GAAMC,CAAkB,EAG1DE,EAA0B,MAAOH,EAAwBC,IAC1D,CAACD,GAAaT,EAAgBS,CAAS,EACnC,KAGDE,EAAqBF,EAAW,GAAOC,CAAkB,EAG3DG,EAAmBR,GACjBA,EAAG,aAAa,yBAAyB,GAAK,CAACL,EAAgBK,CAAE,EAGnES,EAAoCT,GAAoB,CAC7D,GAAIH,EAAqBG,CAAE,EAAG,CAC7B,MAAMU,EAAWV,EAAG,aAAa,UAAU,EAC3C,GAAIU,IAAa,MAAQ,SAASA,CAAQ,EAAI,EAC7C,MAAO,EAET,CAEA,MAAO,EACR,EAEMJ,EAAuB,MAAOF,EAAwBO,EAAkBN,IAA0D,CACvI,IAAIO,EACAC,EACAC,EAAe,GAEfV,EAAU,WACbQ,EAAQD,EAAUP,EAAU,WAAW,kBAAmCA,EAAU,WAAW,iBACrFA,aAAqB,iBAAmBA,EAAU,cAAc,GAC1ES,EAAmBT,EAAU,iBAAiB,EAC9CU,EAAeH,EAAU,EAAIE,EAAiB,OAAS,EACvDD,EAAQC,EAAiBC,CAAY,GAC3BT,EACVO,EAAQR,EAERQ,EAAQD,EAAUP,EAAU,kBAAmCA,EAAU,iBAG1E,IAAIW,EAIJ,KAAOH,GAAO,CACb,MAAMI,EAAyCJ,EAE/C,GAAI,CAACjB,EAAgBqB,CAAa,GAAK,CAACP,EAAiCO,CAAa,EAAG,CAYxF,GAXInB,EAAqBe,CAAK,IAO7B,MAAMA,EAAM,eAAe,EAC3BA,EAAQA,EAAM,UAAU,GAGrB,CAACA,GAASjB,EAAgBiB,CAAK,EAClC,OAAO,KAGR,GAAIA,EAAM,WAAa,GAAKJ,EAAgBI,CAAK,GAAK,CAACb,EAAYa,CAAK,EAAG,CAQ1E,GAPIhB,EAAmBgB,CAAK,IAI5BG,EAAsB,MAAMT,EAAqBM,EAAOD,CAAO,EAG3D,CAACb,EAAS,GAAK,CAACiB,GAAuBd,EAAaW,CAAK,GAC5D,OAAQA,GAAS,OAAOA,EAAM,OAAU,WAAcA,EAAQ,KAG/D,GAAIG,EACH,OAAQA,GAAuB,OAAOA,EAAoB,OAAU,WAAcA,EAAsB,IAE1G,CACD,CAEAH,EAAQD,EAAUK,EAAc,mBAAoCA,EAAc,uBAK9EH,GAAoB,CAACA,EAAiBC,CAAY,EAAE,SAASF,CAAK,IACrEE,EAAeH,EAAUG,EAAe,EAAIA,EAAe,EAE3DF,EAAQC,EAAiBC,CAAY,EAEvC,CAIA,OAAO,IACR,EAEA,OACCX,KAAA,yBACAI,KAAA",
6
6
  "names": ["isElementHidden", "isElementClickable", "instanceOfUI5Element", "isSafari", "isFocusTrap", "el", "isScrollable", "computedStyle", "getFirstFocusableElement", "container", "startFromContainer", "findFocusableElement", "getLastFocusableElement", "isElemFocusable", "isUI5ElementWithNegativeTabIndex", "tabIndex", "forward", "child", "assignedElements", "currentIndex", "focusableDescendant", "originalChild"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import r from"../util/getEffectiveScrollbarStyle.js";const d=(t,e)=>{const o=getComputedStyle(t);for(let l=0;l<o.length;l++){const s=o[l];e.style.setProperty(s,o.getPropertyValue(s))}t.tagName==="INPUT"&&a(e),e.style.position="absolute",e.style.left=`${t.getBoundingClientRect().left}px`,e.style.top=`${t.getBoundingClientRect().top}px`,y(e),document.body.appendChild(e)},y=t=>{t.style.position="absolute",t.style.userSelect="none",t.style.pointerEvents="none",t.style.zIndex="-1",t.style.opacity="0"},a=t=>{t.style.whiteSpace="nowrap",t.style.overflowX="auto",t.style.overflowY="hidden"},p=()=>{const t=new CSSStyleSheet,e=r();t.replaceSync(e),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]},u=()=>{const t=document.createElement("div");t.id="ui5-selection-mirror",t.contentEditable="true",p(),document.body.appendChild(t)},S=(t,e)=>{e.scrollTop=t.scrollTop,e.scrollLeft=t.scrollLeft},g=(t,e)=>{const{selectionStart:o,selectionEnd:l}=t,s=t.value.slice(o,t.selectionEnd),c=document.createRange();c.setStart(e.firstChild,l-1),c.setEnd(e.firstChild,l),S(t,e);const n=c.getBoundingClientRect(),i={x:n.x,y:n.y,width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left};return document.body.removeChild(e),{...i,selectedText:s}},h=t=>{const e=t.shadowRoot.querySelector("textarea")||t.shadowRoot.querySelector("input");document.getElementById("ui5-selection-mirror")||u();const o=document.getElementById("ui5-selection-mirror");return o.textContent=e.value,e&&d(e,o),g(e,o)};export default h;
1
+ "use strict";const r=(t,e)=>{const o=getComputedStyle(t);for(let l=0;l<o.length;l++){const s=o[l];e.style.setProperty(s,o.getPropertyValue(s))}t.tagName==="INPUT"&&a(e),e.style.position="absolute",e.style.left=`${t.getBoundingClientRect().left}px`,e.style.top=`${t.getBoundingClientRect().top}px`,d(e),document.body.appendChild(e)},d=t=>{t.style.position="absolute",t.style.userSelect="none",t.style.pointerEvents="none",t.style.zIndex="-1",t.style.opacity="0"},a=t=>{t.style.whiteSpace="nowrap",t.style.overflowX="auto",t.style.overflowY="hidden"},y=()=>{const t=document.createElement("div");t.id="ui5-selection-mirror",t.contentEditable="true",document.body.appendChild(t)},u=(t,e)=>{e.scrollTop=t.scrollTop,e.scrollLeft=t.scrollLeft},p=(t,e)=>{const{selectionStart:o,selectionEnd:l}=t,s=t.value.slice(o,t.selectionEnd),c=document.createRange();c.setStart(e.firstChild,l-1),c.setEnd(e.firstChild,l),u(t,e);const n=c.getBoundingClientRect(),i={x:n.x,y:n.y,width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left};return document.body.removeChild(e),{...i,selectedText:s}},g=t=>{const e=t.shadowRoot.querySelector("textarea")||t.shadowRoot.querySelector("input");document.getElementById("ui5-selection-mirror")||y();const o=document.getElementById("ui5-selection-mirror");return o.textContent=e.value,e&&r(e,o),p(e,o)};export default g;
2
2
  //# sourceMappingURL=SelectionAssistant.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/SelectionAssistant.ts"],
4
- "sourcesContent": ["import getEffectiveScrollbarStyle from \"../util/getEffectiveScrollbarStyle.js\";\n\nconst copyAndApplyStyles = (element: HTMLElement, copiedElement: HTMLElement) => {\n\tconst computedStyles = getComputedStyle(element);\n\n\tfor (let i = 0; i < computedStyles.length; i++) {\n\t\tconst propertyName = computedStyles[i];\n\t\tcopiedElement.style.setProperty(propertyName, computedStyles.getPropertyValue(propertyName));\n\t}\n\n\telement.tagName === \"INPUT\" && setInputSpecificStyles(copiedElement);\n\n\tcopiedElement.style.position = \"absolute\";\n\tcopiedElement.style.left = `${element.getBoundingClientRect().left}px`;\n\tcopiedElement.style.top = `${element.getBoundingClientRect().top}px`;\n\n\tsetUnInteractableStyles(copiedElement);\n\n\tdocument.body.appendChild(copiedElement);\n};\n\nconst setUnInteractableStyles = (element: HTMLElement) => {\n\telement.style.position = \"absolute\";\n\telement.style.userSelect = \"none\";\n\telement.style.pointerEvents = \"none\";\n\telement.style.zIndex = \"-1\";\n\telement.style.opacity = \"0\";\n};\n\nconst setInputSpecificStyles = (element: HTMLElement) => {\n\telement.style.whiteSpace = \"nowrap\";\n\telement.style.overflowX = \"auto\";\n\telement.style.overflowY = \"hidden\";\n};\n\nconst applyScrollStylings = () => {\n\tconst sheet = new CSSStyleSheet();\n\tconst styles = getEffectiveScrollbarStyle();\n\n\tsheet.replaceSync(styles);\n\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];\n};\n\nconst createCopy = () => {\n\tconst copiedElement = document.createElement(\"div\");\n\n\tcopiedElement.id = \"ui5-selection-mirror\";\n\tcopiedElement.contentEditable = \"true\";\n\n\tapplyScrollStylings();\n\n\tdocument.body.appendChild(copiedElement);\n};\n\nconst applyScrollPosition = (element: HTMLElement, copiedElement: HTMLElement) => {\n\tcopiedElement.scrollTop = element.scrollTop;\n\tcopiedElement.scrollLeft = element.scrollLeft;\n};\n\nconst getSelectionCoordinates = (element: HTMLInputElement | HTMLTextAreaElement, mirror: HTMLDivElement) => {\n\tconst { selectionStart, selectionEnd } = element;\n\tconst selectedText = element.value.slice(\n\t\tselectionStart!,\n\t\telement.selectionEnd!,\n\t);\n\tconst range = document.createRange();\n\n\trange.setStart(mirror.firstChild!, selectionEnd! - 1);\n\trange.setEnd(mirror.firstChild!, selectionEnd!);\n\n\tapplyScrollPosition(element, mirror);\n\n\tconst rangeRect = range.getBoundingClientRect();\n\tconst rectObject = {\n\t\tx: rangeRect.x,\n\t\ty: rangeRect.y,\n\t\twidth: rangeRect.width,\n\t\theight: rangeRect.height,\n\t\ttop: rangeRect.top,\n\t\tright: rangeRect.right,\n\t\tbottom: rangeRect.bottom,\n\t\tleft: rangeRect.left,\n\t};\n\n\tdocument.body.removeChild(mirror);\n\n\treturn { ...rectObject, selectedText };\n};\n\nconst getElementSelection = (element: HTMLElement) => {\n\tconst innerElement = element.shadowRoot!.querySelector(\"textarea\")\n\t\t|| element.shadowRoot!.querySelector(\"input\");\n\n\tif (!document.getElementById(\"ui5-selection-mirror\")) {\n\t\tcreateCopy();\n\t}\n\n\tconst copiedElement = document.getElementById(\n\t\t\"ui5-selection-mirror\",\n\t)!;\n\n\tcopiedElement.textContent = innerElement!.value;\n\n\tif (innerElement) {\n\t\tcopyAndApplyStyles(innerElement, copiedElement)!;\n\t}\n\n\treturn getSelectionCoordinates(innerElement!, copiedElement as HTMLDivElement);\n};\n\nexport default getElementSelection;\n"],
5
- "mappings": "aAAA,OAAOA,MAAgC,wCAEvC,MAAMC,EAAqB,CAACC,EAAsBC,IAA+B,CAChF,MAAMC,EAAiB,iBAAiBF,CAAO,EAE/C,QAASG,EAAI,EAAGA,EAAID,EAAe,OAAQC,IAAK,CAC/C,MAAMC,EAAeF,EAAeC,CAAC,EACrCF,EAAc,MAAM,YAAYG,EAAcF,EAAe,iBAAiBE,CAAY,CAAC,CAC5F,CAEAJ,EAAQ,UAAY,SAAWK,EAAuBJ,CAAa,EAEnEA,EAAc,MAAM,SAAW,WAC/BA,EAAc,MAAM,KAAO,GAAGD,EAAQ,sBAAsB,EAAE,IAAI,KAClEC,EAAc,MAAM,IAAM,GAAGD,EAAQ,sBAAsB,EAAE,GAAG,KAEhEM,EAAwBL,CAAa,EAErC,SAAS,KAAK,YAAYA,CAAa,CACxC,EAEMK,EAA2BN,GAAyB,CACzDA,EAAQ,MAAM,SAAW,WACzBA,EAAQ,MAAM,WAAa,OAC3BA,EAAQ,MAAM,cAAgB,OAC9BA,EAAQ,MAAM,OAAS,KACvBA,EAAQ,MAAM,QAAU,GACzB,EAEMK,EAA0BL,GAAyB,CACxDA,EAAQ,MAAM,WAAa,SAC3BA,EAAQ,MAAM,UAAY,OAC1BA,EAAQ,MAAM,UAAY,QAC3B,EAEMO,EAAsB,IAAM,CACjC,MAAMC,EAAQ,IAAI,cACZC,EAASX,EAA2B,EAE1CU,EAAM,YAAYC,CAAM,EAExB,SAAS,mBAAqB,CAAC,GAAG,SAAS,mBAAoBD,CAAK,CACrE,EAEME,EAAa,IAAM,CACxB,MAAMT,EAAgB,SAAS,cAAc,KAAK,EAElDA,EAAc,GAAK,uBACnBA,EAAc,gBAAkB,OAEhCM,EAAoB,EAEpB,SAAS,KAAK,YAAYN,CAAa,CACxC,EAEMU,EAAsB,CAACX,EAAsBC,IAA+B,CACjFA,EAAc,UAAYD,EAAQ,UAClCC,EAAc,WAAaD,EAAQ,UACpC,EAEMY,EAA0B,CAACZ,EAAiDa,IAA2B,CAC5G,KAAM,CAAE,eAAAC,EAAgB,aAAAC,CAAa,EAAIf,EACnCgB,EAAehB,EAAQ,MAAM,MAClCc,EACAd,EAAQ,YACT,EACMiB,EAAQ,SAAS,YAAY,EAEnCA,EAAM,SAASJ,EAAO,WAAaE,EAAgB,CAAC,EACpDE,EAAM,OAAOJ,EAAO,WAAaE,CAAa,EAE9CJ,EAAoBX,EAASa,CAAM,EAEnC,MAAMK,EAAYD,EAAM,sBAAsB,EACxCE,EAAa,CAClB,EAAGD,EAAU,EACb,EAAGA,EAAU,EACb,MAAOA,EAAU,MACjB,OAAQA,EAAU,OAClB,IAAKA,EAAU,IACf,MAAOA,EAAU,MACjB,OAAQA,EAAU,OAClB,KAAMA,EAAU,IACjB,EAEA,gBAAS,KAAK,YAAYL,CAAM,EAEzB,CAAE,GAAGM,EAAY,aAAAH,CAAa,CACtC,EAEMI,EAAuBpB,GAAyB,CACrD,MAAMqB,EAAerB,EAAQ,WAAY,cAAc,UAAU,GAC7DA,EAAQ,WAAY,cAAc,OAAO,EAExC,SAAS,eAAe,sBAAsB,GAClDU,EAAW,EAGZ,MAAMT,EAAgB,SAAS,eAC9B,sBACD,EAEA,OAAAA,EAAc,YAAcoB,EAAc,MAEtCA,GACHtB,EAAmBsB,EAAcpB,CAAa,EAGxCW,EAAwBS,EAAepB,CAA+B,CAC9E,EAEA,eAAemB",
6
- "names": ["getEffectiveScrollbarStyle", "copyAndApplyStyles", "element", "copiedElement", "computedStyles", "i", "propertyName", "setInputSpecificStyles", "setUnInteractableStyles", "applyScrollStylings", "sheet", "styles", "createCopy", "applyScrollPosition", "getSelectionCoordinates", "mirror", "selectionStart", "selectionEnd", "selectedText", "range", "rangeRect", "rectObject", "getElementSelection", "innerElement"]
4
+ "sourcesContent": ["const copyAndApplyStyles = (element: HTMLElement, copiedElement: HTMLElement) => {\n\tconst computedStyles = getComputedStyle(element);\n\n\tfor (let i = 0; i < computedStyles.length; i++) {\n\t\tconst propertyName = computedStyles[i];\n\t\tcopiedElement.style.setProperty(propertyName, computedStyles.getPropertyValue(propertyName));\n\t}\n\n\telement.tagName === \"INPUT\" && setInputSpecificStyles(copiedElement);\n\n\tcopiedElement.style.position = \"absolute\";\n\tcopiedElement.style.left = `${element.getBoundingClientRect().left}px`;\n\tcopiedElement.style.top = `${element.getBoundingClientRect().top}px`;\n\n\tsetUnInteractableStyles(copiedElement);\n\n\tdocument.body.appendChild(copiedElement);\n};\n\nconst setUnInteractableStyles = (element: HTMLElement) => {\n\telement.style.position = \"absolute\";\n\telement.style.userSelect = \"none\";\n\telement.style.pointerEvents = \"none\";\n\telement.style.zIndex = \"-1\";\n\telement.style.opacity = \"0\";\n};\n\nconst setInputSpecificStyles = (element: HTMLElement) => {\n\telement.style.whiteSpace = \"nowrap\";\n\telement.style.overflowX = \"auto\";\n\telement.style.overflowY = \"hidden\";\n};\n\nconst createCopy = () => {\n\tconst copiedElement = document.createElement(\"div\");\n\n\tcopiedElement.id = \"ui5-selection-mirror\";\n\tcopiedElement.contentEditable = \"true\";\n\n\tdocument.body.appendChild(copiedElement);\n};\n\nconst applyScrollPosition = (element: HTMLElement, copiedElement: HTMLElement) => {\n\tcopiedElement.scrollTop = element.scrollTop;\n\tcopiedElement.scrollLeft = element.scrollLeft;\n};\n\nconst getSelectionCoordinates = (element: HTMLInputElement | HTMLTextAreaElement, mirror: HTMLDivElement) => {\n\tconst { selectionStart, selectionEnd } = element;\n\tconst selectedText = element.value.slice(\n\t\tselectionStart!,\n\t\telement.selectionEnd!,\n\t);\n\tconst range = document.createRange();\n\n\trange.setStart(mirror.firstChild!, selectionEnd! - 1);\n\trange.setEnd(mirror.firstChild!, selectionEnd!);\n\n\tapplyScrollPosition(element, mirror);\n\n\tconst rangeRect = range.getBoundingClientRect();\n\tconst rectObject = {\n\t\tx: rangeRect.x,\n\t\ty: rangeRect.y,\n\t\twidth: rangeRect.width,\n\t\theight: rangeRect.height,\n\t\ttop: rangeRect.top,\n\t\tright: rangeRect.right,\n\t\tbottom: rangeRect.bottom,\n\t\tleft: rangeRect.left,\n\t};\n\n\tdocument.body.removeChild(mirror);\n\n\treturn { ...rectObject, selectedText };\n};\n\nconst getElementSelection = (element: HTMLElement) => {\n\tconst innerElement = element.shadowRoot!.querySelector(\"textarea\")\n\t\t|| element.shadowRoot!.querySelector(\"input\");\n\n\tif (!document.getElementById(\"ui5-selection-mirror\")) {\n\t\tcreateCopy();\n\t}\n\n\tconst copiedElement = document.getElementById(\n\t\t\"ui5-selection-mirror\",\n\t)!;\n\n\tcopiedElement.textContent = innerElement!.value;\n\n\tif (innerElement) {\n\t\tcopyAndApplyStyles(innerElement, copiedElement);\n\t}\n\n\treturn getSelectionCoordinates(innerElement!, copiedElement as HTMLDivElement);\n};\n\nexport default getElementSelection;\n"],
5
+ "mappings": "aAAA,MAAMA,EAAqB,CAACC,EAAsBC,IAA+B,CAChF,MAAMC,EAAiB,iBAAiBF,CAAO,EAE/C,QAASG,EAAI,EAAGA,EAAID,EAAe,OAAQC,IAAK,CAC/C,MAAMC,EAAeF,EAAeC,CAAC,EACrCF,EAAc,MAAM,YAAYG,EAAcF,EAAe,iBAAiBE,CAAY,CAAC,CAC5F,CAEAJ,EAAQ,UAAY,SAAWK,EAAuBJ,CAAa,EAEnEA,EAAc,MAAM,SAAW,WAC/BA,EAAc,MAAM,KAAO,GAAGD,EAAQ,sBAAsB,EAAE,IAAI,KAClEC,EAAc,MAAM,IAAM,GAAGD,EAAQ,sBAAsB,EAAE,GAAG,KAEhEM,EAAwBL,CAAa,EAErC,SAAS,KAAK,YAAYA,CAAa,CACxC,EAEMK,EAA2BN,GAAyB,CACzDA,EAAQ,MAAM,SAAW,WACzBA,EAAQ,MAAM,WAAa,OAC3BA,EAAQ,MAAM,cAAgB,OAC9BA,EAAQ,MAAM,OAAS,KACvBA,EAAQ,MAAM,QAAU,GACzB,EAEMK,EAA0BL,GAAyB,CACxDA,EAAQ,MAAM,WAAa,SAC3BA,EAAQ,MAAM,UAAY,OAC1BA,EAAQ,MAAM,UAAY,QAC3B,EAEMO,EAAa,IAAM,CACxB,MAAMN,EAAgB,SAAS,cAAc,KAAK,EAElDA,EAAc,GAAK,uBACnBA,EAAc,gBAAkB,OAEhC,SAAS,KAAK,YAAYA,CAAa,CACxC,EAEMO,EAAsB,CAACR,EAAsBC,IAA+B,CACjFA,EAAc,UAAYD,EAAQ,UAClCC,EAAc,WAAaD,EAAQ,UACpC,EAEMS,EAA0B,CAACT,EAAiDU,IAA2B,CAC5G,KAAM,CAAE,eAAAC,EAAgB,aAAAC,CAAa,EAAIZ,EACnCa,EAAeb,EAAQ,MAAM,MAClCW,EACAX,EAAQ,YACT,EACMc,EAAQ,SAAS,YAAY,EAEnCA,EAAM,SAASJ,EAAO,WAAaE,EAAgB,CAAC,EACpDE,EAAM,OAAOJ,EAAO,WAAaE,CAAa,EAE9CJ,EAAoBR,EAASU,CAAM,EAEnC,MAAMK,EAAYD,EAAM,sBAAsB,EACxCE,EAAa,CAClB,EAAGD,EAAU,EACb,EAAGA,EAAU,EACb,MAAOA,EAAU,MACjB,OAAQA,EAAU,OAClB,IAAKA,EAAU,IACf,MAAOA,EAAU,MACjB,OAAQA,EAAU,OAClB,KAAMA,EAAU,IACjB,EAEA,gBAAS,KAAK,YAAYL,CAAM,EAEzB,CAAE,GAAGM,EAAY,aAAAH,CAAa,CACtC,EAEMI,EAAuBjB,GAAyB,CACrD,MAAMkB,EAAelB,EAAQ,WAAY,cAAc,UAAU,GAC7DA,EAAQ,WAAY,cAAc,OAAO,EAExC,SAAS,eAAe,sBAAsB,GAClDO,EAAW,EAGZ,MAAMN,EAAgB,SAAS,eAC9B,sBACD,EAEA,OAAAA,EAAc,YAAciB,EAAc,MAEtCA,GACHnB,EAAmBmB,EAAcjB,CAAa,EAGxCQ,EAAwBS,EAAejB,CAA+B,CAC9E,EAEA,eAAegB",
6
+ "names": ["copyAndApplyStyles", "element", "copiedElement", "computedStyles", "i", "propertyName", "setInputSpecificStyles", "setUnInteractableStyles", "createCopy", "applyScrollPosition", "getSelectionCoordinates", "mirror", "selectionStart", "selectionEnd", "selectedText", "range", "rangeRect", "rectObject", "getElementSelection", "innerElement"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import o from"./isElementTabbable.js";const b=t=>a([...t.children]),E=t=>{const n=a([...t.children]);return n.length?n[n.length-1]:null},a=(t,n)=>{const l=n||[];return t&&t.forEach(r=>{if(r.nodeType===Node.TEXT_NODE||r.nodeType===Node.COMMENT_NODE)return;const e=r;if(!e.hasAttribute("data-sap-no-tab-ref"))if(o(e)&&l.push(e),e.tagName==="SLOT")a(e.assignedNodes(),l);else{const s=e.shadowRoot?e.shadowRoot.children:e.children;a([...s],l)}}),l};export{b as getTabbableElements,E as getLastTabbableElement};
1
+ "use strict";import o from"./isElementTabbable.js";const b=e=>l(e.tagName==="SLOT"?[e]:[...e.children]),E=e=>{const n=l([...e.children]);return n.length?n[n.length-1]:null},l=(e,n)=>{const a=n||[];return e&&e.forEach(r=>{if(r.nodeType===Node.TEXT_NODE||r.nodeType===Node.COMMENT_NODE)return;const t=r;if(!t.hasAttribute("data-sap-no-tab-ref"))if(o(t)&&a.push(t),t.tagName==="SLOT")l(t.assignedElements(),a);else{const s=t.shadowRoot?t.shadowRoot.children:t.children;l([...s],a)}}),a};export{b as getTabbableElements,E as getLastTabbableElement};
2
2
  //# sourceMappingURL=TabbableElements.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/TabbableElements.ts"],
4
- "sourcesContent": ["import isElementTabbable from \"./isElementTabbable.js\";\n\n/**\n * Returns the tabbable elements within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { Array<HTMLElement> } the tabbable elements\n */\nconst getTabbableElements = (el: HTMLElement): Array<HTMLElement> => {\n\treturn getTabbables([...el.children]);\n};\n\n/**\n * Returns the last tabbable element within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { HTMLElement | null } the last tabbable element or \"null\" if not found\n */\nconst getLastTabbableElement = (el: HTMLElement): HTMLElement | null => {\n\tconst tabbables = getTabbables([...el.children]);\n\treturn tabbables.length ? tabbables[tabbables.length - 1] : null;\n};\n\nconst getTabbables = (nodes: Array<Node>, tabbables?: Array<HTMLElement>): Array<HTMLElement> => {\n\tconst tabbableElements = tabbables || [];\n\n\tif (!nodes) {\n\t\treturn tabbableElements;\n\t}\n\n\tnodes.forEach(currentNode => {\n\t\tif (currentNode.nodeType === Node.TEXT_NODE || currentNode.nodeType === Node.COMMENT_NODE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentElement = currentNode as HTMLElement;\n\t\tif (currentElement.hasAttribute(\"data-sap-no-tab-ref\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isElementTabbable(currentElement)) {\n\t\t\ttabbableElements.push(currentElement);\n\t\t}\n\n\t\tif (currentElement.tagName === \"SLOT\") {\n\t\t\tgetTabbables((currentElement as HTMLSlotElement).assignedNodes() as Array<HTMLElement>, tabbableElements);\n\t\t} else {\n\t\t\tconst children = currentElement.shadowRoot ? currentElement.shadowRoot.children : currentElement.children;\n\t\t\tgetTabbables([...children], tabbableElements);\n\t\t}\n\t});\n\n\treturn tabbableElements;\n};\n\nexport {\n\tgetTabbableElements,\n\tgetLastTabbableElement,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAuB,yBAS9B,MAAMC,EAAuBC,GACrBC,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAU/BE,EAA0BF,GAAwC,CACvE,MAAMG,EAAYF,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAC/C,OAAOG,EAAU,OAASA,EAAUA,EAAU,OAAS,CAAC,EAAI,IAC7D,EAEMF,EAAe,CAACG,EAAoBD,IAAuD,CAChG,MAAME,EAAmBF,GAAa,CAAC,EAEvC,OAAKC,GAILA,EAAM,QAAQE,GAAe,CAC5B,GAAIA,EAAY,WAAa,KAAK,WAAaA,EAAY,WAAa,KAAK,aAC5E,OAGD,MAAMC,EAAiBD,EACvB,GAAI,CAAAC,EAAe,aAAa,qBAAqB,EAQrD,GAJIT,EAAkBS,CAAc,GACnCF,EAAiB,KAAKE,CAAc,EAGjCA,EAAe,UAAY,OAC9BN,EAAcM,EAAmC,cAAc,EAAyBF,CAAgB,MAClG,CACN,MAAMG,EAAWD,EAAe,WAAaA,EAAe,WAAW,SAAWA,EAAe,SACjGN,EAAa,CAAC,GAAGO,CAAQ,EAAGH,CAAgB,CAC7C,CACD,CAAC,EAEMA,CACR,EAEA,OACCN,KAAA,oBACAG,KAAA",
4
+ "sourcesContent": ["import isElementTabbable from \"./isElementTabbable.js\";\n\n/**\n * Returns the tabbable elements within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { Array<HTMLElement> } the tabbable elements\n */\nconst getTabbableElements = (el: HTMLElement): Array<HTMLElement> => {\n\treturn getTabbables(el.tagName === \"SLOT\" ? [el] : [...el.children]);\n};\n\n/**\n * Returns the last tabbable element within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { HTMLElement | null } the last tabbable element or \"null\" if not found\n */\nconst getLastTabbableElement = (el: HTMLElement): HTMLElement | null => {\n\tconst tabbables = getTabbables([...el.children]);\n\treturn tabbables.length ? tabbables[tabbables.length - 1] : null;\n};\n\nconst getTabbables = (nodes: Array<Node>, tabbables?: Array<HTMLElement>): Array<HTMLElement> => {\n\tconst tabbableElements = tabbables || [];\n\n\tif (!nodes) {\n\t\treturn tabbableElements;\n\t}\n\n\tnodes.forEach(currentNode => {\n\t\tif (currentNode.nodeType === Node.TEXT_NODE || currentNode.nodeType === Node.COMMENT_NODE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentElement = currentNode as HTMLElement;\n\t\tif (currentElement.hasAttribute(\"data-sap-no-tab-ref\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isElementTabbable(currentElement)) {\n\t\t\ttabbableElements.push(currentElement);\n\t\t}\n\n\t\tif (currentElement.tagName === \"SLOT\") {\n\t\t\tgetTabbables((currentElement as HTMLSlotElement).assignedElements(), tabbableElements);\n\t\t} else {\n\t\t\tconst children = currentElement.shadowRoot ? currentElement.shadowRoot.children : currentElement.children;\n\t\t\tgetTabbables([...children], tabbableElements);\n\t\t}\n\t});\n\n\treturn tabbableElements;\n};\n\nexport {\n\tgetTabbableElements,\n\tgetLastTabbableElement,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAuB,yBAS9B,MAAMC,EAAuBC,GACrBC,EAAaD,EAAG,UAAY,OAAS,CAACA,CAAE,EAAI,CAAC,GAAGA,EAAG,QAAQ,CAAC,EAU9DE,EAA0BF,GAAwC,CACvE,MAAMG,EAAYF,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAC/C,OAAOG,EAAU,OAASA,EAAUA,EAAU,OAAS,CAAC,EAAI,IAC7D,EAEMF,EAAe,CAACG,EAAoBD,IAAuD,CAChG,MAAME,EAAmBF,GAAa,CAAC,EAEvC,OAAKC,GAILA,EAAM,QAAQE,GAAe,CAC5B,GAAIA,EAAY,WAAa,KAAK,WAAaA,EAAY,WAAa,KAAK,aAC5E,OAGD,MAAMC,EAAiBD,EACvB,GAAI,CAAAC,EAAe,aAAa,qBAAqB,EAQrD,GAJIT,EAAkBS,CAAc,GACnCF,EAAiB,KAAKE,CAAc,EAGjCA,EAAe,UAAY,OAC9BN,EAAcM,EAAmC,iBAAiB,EAAGF,CAAgB,MAC/E,CACN,MAAMG,EAAWD,EAAe,WAAaA,EAAe,WAAW,SAAWA,EAAe,SACjGN,EAAa,CAAC,GAAGO,CAAQ,EAAGH,CAAgB,CAC7C,CACD,CAAC,EAEMA,CACR,EAEA,OACCN,KAAA,oBACAG,KAAA",
6
6
  "names": ["isElementTabbable", "getTabbableElements", "el", "getTabbables", "getLastTabbableElement", "tabbables", "nodes", "tabbableElements", "currentNode", "currentElement", "children"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";function r(n){return e=>e!==void 0&&n in e&&e[n]===!0}export default r;
2
+ //# sourceMappingURL=createInstanceChecker.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/createInstanceChecker.ts"],
4
+ "sourcesContent": ["// createInstanceChecker<A>(\"isAItem\")\nfunction createChecker<T, P extends keyof T = keyof T>(prop: P) {\n\treturn (object: any): object is T => {\n\t\treturn object !== undefined && prop in object && object[prop] === true;\n\t};\n}\n\nexport default createChecker;\n"],
5
+ "mappings": "aACA,SAASA,EAA8CC,EAAS,CAC/D,OAAQC,GACAA,IAAW,QAAaD,KAAQC,GAAUA,EAAOD,CAAI,IAAM,EAEpE,CAEA,eAAeD",
6
+ "names": ["createChecker", "prop", "object"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";export const createMultiInstanceChecker=r=>e=>e?(Array.isArray(r)?r:[r]).some(t=>t in e&&e[t]===!0):!1;export default createMultiInstanceChecker;
2
+ //# sourceMappingURL=createMultiInstanceChecker.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/createMultiInstanceChecker.ts"],
4
+ "sourcesContent": ["// Allows filtering of multiple types at once\n// const isInstanceOfAOrB = createMultiInstanceChecker<A | B>([\"isAItem\", \"isBItem\"])\n// const filteredItems = items.filter(isInstanceOfAOrB)\n//\n// Alternatively, use \"createInstanceChecker\" and filter separately:\n// const isInstanceOfA = createInstanceChecker<A>(\"isAItem\");\n// const isInstanceOfB = createInstanceChecker<A>(\"isBItem\")\n// const filteredItems = [...items.filter(isInstanceOfA), ...items.filter(isInstanceOfB)];\nexport const createMultiInstanceChecker = <T>(props: string[] | string) => {\n\treturn (object: any): object is T => {\n\t\tif (!object) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst propsArray = Array.isArray(props) ? props : [props];\n\t\treturn propsArray.some(prop => prop in object && object[prop] === true);\n\t};\n};\n\nexport default createMultiInstanceChecker;\n"],
5
+ "mappings": "aAQO,aAAM,2BAAiCA,GACrCC,GACFA,GAIc,MAAM,QAAQD,CAAK,EAAIA,EAAQ,CAACA,CAAK,GACtC,KAAKE,GAAQA,KAAQD,GAAUA,EAAOC,CAAI,IAAM,EAAI,EAJ9D,GAQV,eAAe",
6
+ "names": ["props", "object", "prop"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";let t=null,n=!1;const o=new Set,a=new Set,r=e=>{!e.dataTransfer||!(e.target instanceof HTMLElement)||a.has(e.target)||(t=e.target)},d=()=>{t=null},l=()=>{t=null},s=e=>{t=e},m=()=>t,g=()=>{n||(document.body.addEventListener("dragstart",r),document.body.addEventListener("dragend",d),document.body.addEventListener("drop",l))},c=()=>{document.body.removeEventListener("dragstart",r),document.body.removeEventListener("dragend",d),document.body.removeEventListener("drop",l),n=!1},i=e=>{o.add(e),n||g()},E=e=>{o.delete(e),o.size===0&&n&&c()},u=e=>(a.add(e),s),v=e=>{a.delete(e)},p={subscribe:i,unsubscribe:E,addSelfManagedArea:u,removeSelfManagedArea:v,getDraggedElement:m};export default p;
1
+ "use strict";import m from"../../generated/css/MultipleDragGhost.css.js";import{getI18nBundle as i}from"../../i18nBundle.js";import{DRAG_DROP_MULTIPLE_TEXT as c}from"../../generated/i18n/i18n-defaults.js";const l=2;let a=null;const g=(e,t)=>{a=e,t?.dataTransfer?.setData("text/plain",e?e.id:"")},d=()=>{a=null},p=()=>a,u=async e=>{const t=document.createElement("div"),n=await i("@ui5/webcomponents-base"),r=t.attachShadow({mode:"open"}),o=new CSSStyleSheet;return o.replaceSync(m),r.adoptedStyleSheets=[o],r.textContent=n.getText(c,e),t},s=async(e,t)=>{if(e<l){console.warn(`Cannot start multiple drag with count ${e}. Minimum is ${l}.`);return}if(!t.dataTransfer)return;const n=await u(e);document.body.appendChild(n),t.dataTransfer.setDragImage(n,0,0),requestAnimationFrame(()=>{n.remove()})},D={setDraggedElement:g,clearDraggedElement:d,getDraggedElement:p,startMultipleDrag:s};export default D;export{s as startMultipleDrag};
2
2
  //# sourceMappingURL=DragRegistry.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/util/dragAndDrop/DragRegistry.ts"],
4
- "sourcesContent": ["import type UI5Element from \"../../UI5Element.js\";\nimport type MovePlacement from \"../../types/MovePlacement.js\";\n\nlet draggedElement: HTMLElement | null = null;\nlet globalHandlersAttached = false;\nconst subscribers = new Set<UI5Element>();\nconst selfManagedDragAreas = new Set<HTMLElement | ShadowRoot>();\n\nconst ondragstart = (e: DragEvent) => {\n\tif (!e.dataTransfer || !(e.target instanceof HTMLElement)) {\n\t\treturn;\n\t}\n\n\tif (!selfManagedDragAreas.has(e.target)) {\n\t\tdraggedElement = e.target;\n\t}\n};\n\nconst ondragend = () => {\n\tdraggedElement = null;\n};\n\nconst ondrop = () => {\n\tdraggedElement = null;\n};\n\nconst setDraggedElement = (element: HTMLElement | null) => {\n\tdraggedElement = element;\n};\ntype SetDraggedElementFunction = typeof setDraggedElement;\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst attachGlobalHandlers = () => {\n\tif (globalHandlersAttached) {\n\t\treturn;\n\t}\n\n\tdocument.body.addEventListener(\"dragstart\", ondragstart);\n\tdocument.body.addEventListener(\"dragend\", ondragend);\n\tdocument.body.addEventListener(\"drop\", ondrop);\n};\n\nconst detachGlobalHandlers = () => {\n\tdocument.body.removeEventListener(\"dragstart\", ondragstart);\n\tdocument.body.removeEventListener(\"dragend\", ondragend);\n\tdocument.body.removeEventListener(\"drop\", ondrop);\n\tglobalHandlersAttached = false;\n};\n\nconst subscribe = (subscriber: UI5Element) => {\n\tsubscribers.add(subscriber);\n\n\tif (!globalHandlersAttached) {\n\t\tattachGlobalHandlers();\n\t}\n};\n\nconst unsubscribe = (subscriber: UI5Element) => {\n\tsubscribers.delete(subscriber);\n\n\tif (subscribers.size === 0 && globalHandlersAttached) {\n\t\tdetachGlobalHandlers();\n\t}\n};\n\nconst addSelfManagedArea = (area: HTMLElement | ShadowRoot) => {\n\tselfManagedDragAreas.add(area);\n\n\treturn setDraggedElement;\n};\n\nconst removeSelfManagedArea = (area: HTMLElement | ShadowRoot) => {\n\tselfManagedDragAreas.delete(area);\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\tsubscribe,\n\tunsubscribe,\n\taddSelfManagedArea,\n\tremoveSelfManagedArea,\n\tgetDraggedElement,\n};\n\nexport default DragRegistry;\nexport type {\n\tSetDraggedElementFunction,\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"],
5
- "mappings": "aAGA,IAAIA,EAAqC,KACrCC,EAAyB,GAC7B,MAAMC,EAAc,IAAI,IAClBC,EAAuB,IAAI,IAE3BC,EAAe,GAAiB,CACjC,CAAC,EAAE,cAAgB,EAAE,EAAE,kBAAkB,cAIxCD,EAAqB,IAAI,EAAE,MAAM,IACrCH,EAAiB,EAAE,OAErB,EAEMK,EAAY,IAAM,CACvBL,EAAiB,IAClB,EAEMM,EAAS,IAAM,CACpBN,EAAiB,IAClB,EAEMO,EAAqBC,GAAgC,CAC1DR,EAAiBQ,CAClB,EAGMC,EAAoB,IAClBT,EAGFU,EAAuB,IAAM,CAC9BT,IAIJ,SAAS,KAAK,iBAAiB,YAAaG,CAAW,EACvD,SAAS,KAAK,iBAAiB,UAAWC,CAAS,EACnD,SAAS,KAAK,iBAAiB,OAAQC,CAAM,EAC9C,EAEMK,EAAuB,IAAM,CAClC,SAAS,KAAK,oBAAoB,YAAaP,CAAW,EAC1D,SAAS,KAAK,oBAAoB,UAAWC,CAAS,EACtD,SAAS,KAAK,oBAAoB,OAAQC,CAAM,EAChDL,EAAyB,EAC1B,EAEMW,EAAaC,GAA2B,CAC7CX,EAAY,IAAIW,CAAU,EAErBZ,GACJS,EAAqB,CAEvB,EAEMI,EAAeD,GAA2B,CAC/CX,EAAY,OAAOW,CAAU,EAEzBX,EAAY,OAAS,GAAKD,GAC7BU,EAAqB,CAEvB,EAEMI,EAAsBC,IAC3Bb,EAAqB,IAAIa,CAAI,EAEtBT,GAGFU,EAAyBD,GAAmC,CACjEb,EAAqB,OAAOa,CAAI,CACjC,EAwBME,EAAe,CACpB,UAAAN,EACA,YAAAE,EACA,mBAAAC,EACA,sBAAAE,EACA,kBAAAR,CACD,EAEA,eAAeS",
6
- "names": ["draggedElement", "globalHandlersAttached", "subscribers", "selfManagedDragAreas", "ondragstart", "ondragend", "ondrop", "setDraggedElement", "element", "getDraggedElement", "attachGlobalHandlers", "detachGlobalHandlers", "subscribe", "subscriber", "unsubscribe", "addSelfManagedArea", "area", "removeSelfManagedArea", "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";const e=t=>t.parentElement?t.parentElement:t.parentNode.host;export default e;
2
+ //# sourceMappingURL=getParentElement.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/getParentElement.ts"],
4
+ "sourcesContent": ["const getParentElement = (element: Element) : Element | null => {\n\treturn element.parentElement ? element.parentElement : (element.parentNode as ShadowRoot).host;\n};\n\nexport default getParentElement;\n"],
5
+ "mappings": "aAAA,MAAMA,EAAoBC,GAClBA,EAAQ,cAAgBA,EAAQ,cAAiBA,EAAQ,WAA0B,KAG3F,eAAeD",
6
+ "names": ["getParentElement", "element"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";const t=e=>e.nodeName==="SLOT"?!1:e.offsetWidth<=0&&e.offsetHeight<=0||e.style&&e.style.visibility==="hidden";export default t;
1
+ "use strict";const i=t=>{if(t.nodeName==="SLOT")return!1;const e=window.getComputedStyle(t);return e.display!=="contents"&&t.offsetWidth<=0&&t.offsetHeight<=0||e.visibility==="hidden"};export default i;
2
2
  //# sourceMappingURL=isElementHidden.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/isElementHidden.ts"],
4
- "sourcesContent": ["const isElementHidden = (el: HTMLElement) => {\n\tif (el.nodeName === \"SLOT\") {\n\t\treturn false;\n\t}\n\n\treturn (el.offsetWidth <= 0 && el.offsetHeight <= 0) || (el.style && el.style.visibility === \"hidden\");\n};\n\nexport default isElementHidden;\n"],
5
- "mappings": "aAAA,MAAMA,EAAmBC,GACpBA,EAAG,WAAa,OACZ,GAGAA,EAAG,aAAe,GAAKA,EAAG,cAAgB,GAAOA,EAAG,OAASA,EAAG,MAAM,aAAe,SAG9F,eAAeD",
6
- "names": ["isElementHidden", "el"]
4
+ "sourcesContent": ["const isElementHidden = (el: HTMLElement) => {\n\tif (el.nodeName === \"SLOT\") {\n\t\treturn false;\n\t}\n\n\tconst computedStyle = window.getComputedStyle(el);\n\n\treturn (computedStyle.display !== \"contents\" && (el.offsetWidth <= 0 && el.offsetHeight <= 0)) || (computedStyle.visibility === \"hidden\");\n};\n\nexport default isElementHidden;\n"],
5
+ "mappings": "aAAA,MAAMA,EAAmBC,GAAoB,CAC5C,GAAIA,EAAG,WAAa,OACnB,MAAO,GAGR,MAAMC,EAAgB,OAAO,iBAAiBD,CAAE,EAEhD,OAAQC,EAAc,UAAY,YAAeD,EAAG,aAAe,GAAKA,EAAG,cAAgB,GAAQC,EAAc,aAAe,QACjI,EAEA,eAAeF",
6
+ "names": ["isElementHidden", "el", "computedStyle"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";const t="handledByControl",a=(e,n=t)=>!!e[`_sapui_${n}`];export default a;
2
+ //# sourceMappingURL=isEventMarked.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/isEventMarked.ts"],
4
+ "sourcesContent": ["const defaultOpenUI5Key = \"handledByControl\";\n\nconst isEventMarked = (event: any, key: string = defaultOpenUI5Key) => {\n\treturn !!event[`_sapui_${key}`];\n};\n\nexport default isEventMarked;\n"],
5
+ "mappings": "aAAA,MAAMA,EAAoB,mBAEpBC,EAAgB,CAACC,EAAYC,EAAcH,IACzC,CAAC,CAACE,EAAM,UAAUC,CAAG,EAAE,EAG/B,eAAeF",
6
+ "names": ["defaultOpenUI5Key", "isEventMarked", "event", "key"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{isDown as i,isUp as p,isTabNext as n,isTabPrevious as r,isEscape as s}from"../Keys.js";const f=(t,a,e,o)=>{n(t)&&(e!==a.length-1?(t.stopImmediatePropagation(),t.preventDefault(),a[e+1].focus()):(o.closeValueState(),o.focusInput())),r(t)&&(t.preventDefault(),t.stopImmediatePropagation(),e>0?a[e-1].focus():o.focusInput()),p(t)&&(t.preventDefault(),t.stopImmediatePropagation(),o.isPopoverOpen()&&o.focusInput()),i(t)&&(t.preventDefault(),t.stopImmediatePropagation(),o.navigateToItem()),s(t)&&(t.preventDefault(),t.stopImmediatePropagation())};export{f as attachListeners};
2
+ //# sourceMappingURL=valueStateNavigation.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/valueStateNavigation.ts"],
4
+ "sourcesContent": ["import {\n\tisDown,\n\tisUp,\n\tisTabNext,\n\tisTabPrevious,\n\tisEscape,\n} from \"../Keys.js\";\n\ninterface ControlHandlers {\n\tcloseValueState: () => void;\n\tfocusInput: () => void;\n\tnavigateToItem: () => void;\n\tisPopoverOpen: () => boolean;\n}\n\nconst attachListeners = (e: KeyboardEvent, links: Array<HTMLElement>, index: number, handlers: ControlHandlers) => {\n\tif (isTabNext(e)) {\n\t\tif (index !== links.length - 1) {\n\t\t\te.stopImmediatePropagation();\n\t\t\te.preventDefault();\n\t\t\tlinks[index + 1].focus();\n\t\t} else {\n\t\t\thandlers.closeValueState();\n\t\t\thandlers.focusInput();\n\t\t}\n\t}\n\n\tif (isTabPrevious(e)) {\n\t\te.preventDefault();\n\t\te.stopImmediatePropagation();\n\t\tif (index > 0) {\n\t\t\tlinks[index - 1].focus();\n\t\t} else {\n\t\t\thandlers.focusInput();\n\t\t}\n\t}\n\n\tif (isUp(e)) {\n\t\te.preventDefault();\n\t\te.stopImmediatePropagation();\n\t\thandlers.isPopoverOpen() && handlers.focusInput();\n\t}\n\n\tif (isDown(e)) {\n\t\te.preventDefault();\n\t\te.stopImmediatePropagation();\n\t\thandlers.navigateToItem();\n\t}\n\n\tif (isEscape(e)) {\n\t\te.preventDefault();\n\t\te.stopImmediatePropagation();\n\t}\n};\n\nexport { attachListeners, ControlHandlers };\n"],
5
+ "mappings": "aAAA,OACC,UAAAA,EACA,QAAAC,EACA,aAAAC,EACA,iBAAAC,EACA,YAAAC,MACM,aASP,MAAMC,EAAkB,CAACC,EAAkBC,EAA2BC,EAAeC,IAA8B,CAC9GP,EAAUI,CAAC,IACVE,IAAUD,EAAM,OAAS,GAC5BD,EAAE,yBAAyB,EAC3BA,EAAE,eAAe,EACjBC,EAAMC,EAAQ,CAAC,EAAE,MAAM,IAEvBC,EAAS,gBAAgB,EACzBA,EAAS,WAAW,IAIlBN,EAAcG,CAAC,IAClBA,EAAE,eAAe,EACjBA,EAAE,yBAAyB,EACvBE,EAAQ,EACXD,EAAMC,EAAQ,CAAC,EAAE,MAAM,EAEvBC,EAAS,WAAW,GAIlBR,EAAKK,CAAC,IACTA,EAAE,eAAe,EACjBA,EAAE,yBAAyB,EAC3BG,EAAS,cAAc,GAAKA,EAAS,WAAW,GAG7CT,EAAOM,CAAC,IACXA,EAAE,eAAe,EACjBA,EAAE,yBAAyB,EAC3BG,EAAS,eAAe,GAGrBL,EAASE,CAAC,IACbA,EAAE,eAAe,EACjBA,EAAE,yBAAyB,EAE7B,EAEA,OAASD,KAAA",
6
+ "names": ["isDown", "isUp", "isTabNext", "isTabPrevious", "isEscape", "attachListeners", "e", "links", "index", "handlers"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";import{getLocationHref as i}from"./Location.js";const o=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},s=e=>{const t=o("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},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&&s(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 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;
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-allowedThemeOrigins\");\n\n\treturn allowedOrigins && 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,yBAAyB,EAEhE,OAAOK,GAAkBA,EAAe,MAAM,GAAG,EAAE,KAAKC,GAChDA,IAAkB,KAAOF,IAAWE,EAAc,KAAK,CAC9D,CACF,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",
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
6
  "names": ["getLocationHref", "getMetaTagValue", "metaTagName", "metaTag", "validateThemeOrigin", "origin", "allowedOrigins", "allowedOrigin", "buildCorrectUrl", "oldUrl", "newOrigin", "oldUrlPath", "validateThemeRoot", "themeRoot", "resultUrl", "themeRootURL"]
7
7
  }
@@ -53,8 +53,9 @@ globalThis.ResizeObserver = class ResizeObserver {
53
53
  // do nothing
54
54
  }
55
55
  };
56
- // empty showPopover method
56
+ // empty showPopover & hidePopover method
57
57
  globalThis.HTMLElement.prototype.showPopover = function () { };
58
+ globalThis.HTMLElement.prototype.hidePopover = function () { };
58
59
  // ElementInternals
59
60
  globalThis.HTMLElement.prototype.attachInternals = function () {
60
61
  return new ElementInternals();
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-dom-shim.js","sourceRoot":"","sources":["../src/ssr-dom-shim.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhG,UAAU,CAAC,WAAW,KAAK,WAAW,CAAC;AACvC,UAAU,CAAC,OAAO,KAAK,OAAO,CAAC;AAC/B,UAAU,CAAC,cAAc,KAAK,cAAc,CAAC;AAE7C,MAAM,QAAQ;CAAG;AACjB,UAAU,CAAC,IAAI,KAAK,QAAiC,CAAC;AAEtD,MAAM,YAAY;CAAG;AACrB,UAAU,CAAC,QAAQ,KAAK,YAAyC,CAAC;AAElE,+BAA+B;AAE/B,8EAA8E;AAC9E,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAAE,CAAC;AAEzC,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,CAAC,oBAAoB,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;IACzE,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,EAAE;QAC9D,GAAG;YACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QACD,GAAG,CAAC,MAAuB;YACzB,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,IAAI,UAAU,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;IAC7E,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,oBAAoB,EAAE;QAChE,GAAG;YACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QACD,GAAG,CAAC,MAAuB;YACzB,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,kDAAkD;AAClD,IAAI,UAAU,CAAC,aAAa,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;IAC1E,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,EAAE;QAC5D,KAAK,CAAC,OAAe;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAEH,wBAAwB;AACxB,UAAU,CAAC,cAAc,GAAG,MAAM,cAAc;IAC5C,OAAO;QACL,aAAa;IACf,CAAC;IACD,SAAS;QACP,aAAa;IACf,CAAC;IACD,UAAU;QACR,aAAa;IACf,CAAC;CACJ,CAAC;AAEF,2BAA2B;AAC3B,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,cAAa,CAAC,CAAC;AAE9D,oBAAoB;AACpB,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,eAAe,GAAG;IAC/C,OAAO,IAAI,gBAAgB,EAAE,CAAC;AAClC,CAAC,CAAA","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { HTMLElement, Element, customElements, ElementInternals } from \"@lit-labs/ssr-dom-shim\";\n\nglobalThis.HTMLElement ??= HTMLElement;\nglobalThis.Element ??= Element;\nglobalThis.customElements ??= customElements;\n\nclass NodeShim {}\nglobalThis.Node ??= NodeShim as object as typeof Node;\n\nclass FileListShim {}\nglobalThis.FileList ??= FileListShim as object as typeof FileList;\n\n// ------- JS DOM shims -------\n\n// Polyfill `adoptedStyleSheets` globally for both `Document` and `ShadowRoot`\nconst adoptedSheetsStore = new WeakMap();\n\nif (globalThis.Document && !(\"adoptedStyleSheets\" in Document.prototype)) {\n Object.defineProperty(Document.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\nif (globalThis.ShadowRoot && !(\"adoptedStyleSheets\" in ShadowRoot.prototype)) {\n Object.defineProperty(ShadowRoot.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\n// Polyfill CSSStyleSheet to provide `replaceSync`\nif (globalThis.CSSStyleSheet && !(\"replaceSync\" in CSSStyleSheet.prototype)) {\n Object.defineProperty(CSSStyleSheet.prototype, \"replaceSync\", {\n value(cssText: string) {\n this.cssText = cssText;\n return cssText;\n },\n });\n }\n\n// Empty resize observer\nglobalThis.ResizeObserver = class ResizeObserver {\n observe() {\n // do nothing\n }\n unobserve() {\n // do nothing\n }\n disconnect() {\n // do nothing\n }\n};\n\n// empty showPopover method\nglobalThis.HTMLElement.prototype.showPopover = function () {};\n\n// ElementInternals\nglobalThis.HTMLElement.prototype.attachInternals = function() {\n return new ElementInternals();\n}"]}
1
+ {"version":3,"file":"ssr-dom-shim.js","sourceRoot":"","sources":["../src/ssr-dom-shim.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhG,UAAU,CAAC,WAAW,KAAK,WAAW,CAAC;AACvC,UAAU,CAAC,OAAO,KAAK,OAAO,CAAC;AAC/B,UAAU,CAAC,cAAc,KAAK,cAAc,CAAC;AAE7C,MAAM,QAAQ;CAAG;AACjB,UAAU,CAAC,IAAI,KAAK,QAAiC,CAAC;AAEtD,MAAM,YAAY;CAAG;AACrB,UAAU,CAAC,QAAQ,KAAK,YAAyC,CAAC;AAElE,+BAA+B;AAE/B,8EAA8E;AAC9E,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAAE,CAAC;AAEzC,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,CAAC,oBAAoB,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;IACzE,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,EAAE;QAC9D,GAAG;YACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QACD,GAAG,CAAC,MAAuB;YACzB,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,IAAI,UAAU,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;IAC7E,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,oBAAoB,EAAE;QAChE,GAAG;YACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QACD,GAAG,CAAC,MAAuB;YACzB,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,kDAAkD;AAClD,IAAI,UAAU,CAAC,aAAa,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;IAC1E,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,EAAE;QAC5D,KAAK,CAAC,OAAe;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAEH,wBAAwB;AACxB,UAAU,CAAC,cAAc,GAAG,MAAM,cAAc;IAC5C,OAAO;QACL,aAAa;IACf,CAAC;IACD,SAAS;QACP,aAAa;IACf,CAAC;IACD,UAAU;QACR,aAAa;IACf,CAAC;CACJ,CAAC;AAEF,yCAAyC;AACzC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,cAAa,CAAC,CAAC;AAC9D,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,cAAa,CAAC,CAAC;AAE9D,oBAAoB;AACpB,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,eAAe,GAAG;IAC/C,OAAO,IAAI,gBAAgB,EAAE,CAAC;AAClC,CAAC,CAAA","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { HTMLElement, Element, customElements, ElementInternals } from \"@lit-labs/ssr-dom-shim\";\n\nglobalThis.HTMLElement ??= HTMLElement;\nglobalThis.Element ??= Element;\nglobalThis.customElements ??= customElements;\n\nclass NodeShim {}\nglobalThis.Node ??= NodeShim as object as typeof Node;\n\nclass FileListShim {}\nglobalThis.FileList ??= FileListShim as object as typeof FileList;\n\n// ------- JS DOM shims -------\n\n// Polyfill `adoptedStyleSheets` globally for both `Document` and `ShadowRoot`\nconst adoptedSheetsStore = new WeakMap();\n\nif (globalThis.Document && !(\"adoptedStyleSheets\" in Document.prototype)) {\n Object.defineProperty(Document.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\nif (globalThis.ShadowRoot && !(\"adoptedStyleSheets\" in ShadowRoot.prototype)) {\n Object.defineProperty(ShadowRoot.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\n// Polyfill CSSStyleSheet to provide `replaceSync`\nif (globalThis.CSSStyleSheet && !(\"replaceSync\" in CSSStyleSheet.prototype)) {\n Object.defineProperty(CSSStyleSheet.prototype, \"replaceSync\", {\n value(cssText: string) {\n this.cssText = cssText;\n return cssText;\n },\n });\n }\n\n// Empty resize observer\nglobalThis.ResizeObserver = class ResizeObserver {\n observe() {\n // do nothing\n }\n unobserve() {\n // do nothing\n }\n disconnect() {\n // do nothing\n }\n};\n\n// empty showPopover & hidePopover method\nglobalThis.HTMLElement.prototype.showPopover = function () {};\nglobalThis.HTMLElement.prototype.hidePopover = function () {};\n\n// ElementInternals\nglobalThis.HTMLElement.prototype.attachInternals = function() {\n return new ElementInternals();\n}"]}
@@ -1,2 +1,4 @@
1
+ export declare let _lib: string;
2
+ export declare let _package: string;
1
3
  declare const applyTheme: (theme: string) => Promise<void>;
2
4
  export default applyTheme;
@@ -4,9 +4,16 @@ 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";
9
- const BASE_THEME_PACKAGE = "@ui5/webcomponents-theming";
10
+ import { updateComponentStyles } from "./componentStyles.js";
11
+ // eslint-disable-next-line
12
+ export let _lib = "ui5";
13
+ // eslint-disable-next-line
14
+ export let _package = "webcomponents-theming";
15
+ // eslint-disable-next-line
16
+ const BASE_THEME_PACKAGE = "@" + _lib + "/" + _package;
10
17
  const isThemeBaseRegistered = () => {
11
18
  const registeredPackages = getRegisteredPackages();
12
19
  return registeredPackages.has(BASE_THEME_PACKAGE);
@@ -25,13 +32,18 @@ const deleteThemeBase = () => {
25
32
  };
26
33
  const loadComponentPackages = async (theme, externalThemeName) => {
27
34
  const registeredPackages = getRegisteredPackages();
28
- const packagesStylesPromises = [...registeredPackages].map(async (packageName) => {
35
+ const packagesStylesPromises = [...registeredPackages.entries()].map(async ([packageName, { cssVariablesTarget }]) => {
29
36
  if (packageName === BASE_THEME_PACKAGE) {
30
37
  return;
31
38
  }
32
39
  const cssData = await getThemeProperties(packageName, theme, externalThemeName);
33
40
  if (cssData) {
34
- 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
+ }
35
47
  }
36
48
  });
37
49
  return Promise.all(packagesStylesPromises);
@@ -68,8 +80,11 @@ const applyTheme = async (theme) => {
68
80
  deleteThemeBase();
69
81
  }
70
82
  // Always load component packages properties. For non-registered themes, try with the base theme, if any
71
- const packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;
72
- 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);
73
88
  fireThemeLoaded(theme);
74
89
  };
75
90
  export default applyTheme;