@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,79 +0,0 @@
1
- import Accessor from "../../test/test-elements/Accessor.js";
2
-
3
- describe("Framework boot", () => {
4
- it("Setting property updates attribute, state and DOM", () => {
5
- cy.mount(<Accessor></Accessor>);
6
-
7
- cy.get("[ui5-test-accessor]")
8
- .as("testAccessor")
9
- .invoke("prop", "myProp", true);
10
-
11
- cy.get("@testAccessor")
12
- .should("have.attr", "my-prop");
13
-
14
- cy.get("@testAccessor")
15
- .shadow()
16
- .find("div")
17
- .should("have.text", "true");
18
-
19
- cy.get("@testAccessor")
20
- .should("have.prop", "storage", true);
21
-
22
- cy.get("[ui5-test-accessor]")
23
- .as("testAccessor")
24
- .invoke("prop", "myProp", false);
25
-
26
- cy.get("@testAccessor")
27
- .should("not.have.attr", "my-prop");
28
-
29
- cy.get("@testAccessor")
30
- .shadow()
31
- .find("div")
32
- .should("have.text", "false");
33
-
34
- cy.get("@testAccessor")
35
- .should("have.prop", "storage", false);
36
- });
37
-
38
- it("Setting attribute updates property, state and DOM", () => {
39
- cy.mount(<Accessor></Accessor>);
40
-
41
- cy.get("[ui5-test-accessor]")
42
- .as("testAccessor")
43
- .invoke("attr", "my-prop", "");
44
-
45
- cy.get("@testAccessor")
46
- .should("have.attr", "my-prop");
47
-
48
- cy.get("@testAccessor")
49
- .shadow()
50
- .find("div")
51
- .should("have.text", "true");
52
-
53
- cy.get("@testAccessor")
54
- .should("have.prop", "storage", true);
55
-
56
- cy.get("[ui5-test-accessor]")
57
- .as("testAccessor")
58
- .invoke("removeAttr", "my-prop");
59
-
60
- cy.get("@testAccessor")
61
- .should("not.have.attr", "my-prop");
62
-
63
- cy.get("@testAccessor")
64
- .shadow()
65
- .find("div")
66
- .should("have.text", "false");
67
-
68
- cy.get("@testAccessor")
69
- .should("have.prop", "storage", false);
70
- });
71
-
72
- it("should stop searching for accessors when HTMLElement is reached", () => {
73
- cy.mount(<Accessor></Accessor>);
74
-
75
- cy.get("[ui5-test-accessor]")
76
- .invoke("prop", "title")
77
- .should("be.undefined");
78
- });
79
- });
@@ -1,19 +0,0 @@
1
- import { registerThemePropertiesLoader } from "../../src/AssetRegistry.js";
2
- import { boot } from "../../src/Boot.js";
3
- import { hasStyle } from "../../src/ManagedStyles.js";
4
-
5
- describe("Framework boot", () => {
6
- it("Tests theme loading, when registered after 'attachBoot' and 'boot'", () => {
7
- cy.wrap({ boot })
8
- .invoke("boot");
9
-
10
- cy.wrap({ registerThemePropertiesLoader })
11
- .invoke("registerThemePropertiesLoader", "@ui5/webcomponents-theming", "sap_horizon", () => {
12
- return Promise.resolve(`:root{ --customCol: #fff; --customBg: #000; }`);
13
- });
14
-
15
- cy.wrap({ hasStyle })
16
- .invoke("hasStyle", "data-ui5-theme-properties", "@ui5/webcomponents-theming")
17
- .should("be.true");
18
- });
19
- });
@@ -1,41 +0,0 @@
1
- import "../../test/test-elements/Accessor.js";
2
- import { setTheme, getTheme } from "../../src/config/Theme.js";
3
- import { setThemeRoot, getThemeRoot } from "../../src/config/ThemeRoot.js";
4
- import { setNoConflict, getNoConflict } from "../../src/config/NoConflict.js";
5
-
6
- describe("Some configuration options can be changed at runtime", () => {
7
- it("Tests that theme can be changed", () => {
8
- const newTheme = "sap_horizon_hcb";
9
-
10
- cy.wrap({ setTheme })
11
- .invoke("setTheme", newTheme);
12
-
13
- cy.wrap({ getTheme })
14
- .invoke("getTheme")
15
- .should("equal", newTheme);
16
- });
17
-
18
- it("Tests that noConflict can be changed", () => {
19
- const noConflictObject = { events: ["selection-change"] };
20
-
21
- cy.wrap({ setNoConflict })
22
- .invoke("setNoConflict", noConflictObject);
23
-
24
- cy.wrap({ getNoConflict })
25
- .invoke("getNoConflict")
26
- .should("deep.equal", noConflictObject)
27
- .its("events")
28
- .should("deep.equal", noConflictObject.events);
29
- });
30
-
31
- it("Tests that theme root is applied", () => {
32
- const newThemeRoot = "https://example.com/";
33
-
34
- cy.wrap({ setThemeRoot })
35
- .invoke("setThemeRoot", newThemeRoot);
36
-
37
- cy.wrap({ getThemeRoot })
38
- .invoke("getThemeRoot")
39
- .should("deep.equal", newThemeRoot);
40
- });
41
- });
@@ -1,133 +0,0 @@
1
- import { getAnimationMode } from "../../src/config/AnimationMode.js";
2
- import { getCalendarType } from "../../src/config/CalendarType.js";
3
- import { getDefaultFontLoading } from "../../src/config/Fonts.js";
4
- import TestGeneric from "../../test/test-elements/Generic.js";
5
- import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "../../src/config/FormatSettings.js";
6
- import { getLanguage } from "../../src/config/Language.js";
7
- import { getNoConflict } from "../../src/config/NoConflict.js";
8
- import { getTheme } from "../../src/config/Theme.js";
9
- import { getEnableDefaultTooltips } from "../../src/config/Tooltips.js";
10
- import { resetConfiguration } from "../../src/InitialConfiguration.js";
11
-
12
- describe("Configuration script", () => {
13
- const configurationObject = {
14
- "theme": "sap_horizon_hcb",
15
- "animationMode": "basic",
16
- "rtl": true,
17
- "language": "ja",
18
- "calendarType": "Japanese",
19
- "formatSettings": {
20
- "firstDayOfWeek": 0,
21
- "legacyDateCalendarCustomizing": [
22
- {
23
- "dateFormat": "A",
24
- "islamicMonthStart": "14351201",
25
- "gregDate": "20140925",
26
- },
27
- {
28
- "dateFormat": "A",
29
- "islamicMonthStart": "14360101",
30
- "gregDate": "20141024",
31
- },
32
- {
33
- "dateFormat": "A",
34
- "islamicMonthStart": "14360201",
35
- "gregDate": "20141123",
36
- },
37
- ],
38
- },
39
- "noConflict": {
40
- "events": ["selection-change", "header-click"],
41
- },
42
- "defaultFontLoading": false,
43
- "enableDefaultTooltips": false,
44
- };
45
-
46
- before(() => {
47
- cy.window()
48
- .then($el => {
49
- const scriptElement = document.createElement("script");
50
- scriptElement.type = "application/json";
51
- scriptElement.setAttribute("data-ui5-config", "true");
52
- scriptElement.innerHTML = JSON.stringify(configurationObject);
53
- return $el.document.head.append(scriptElement);
54
- })
55
-
56
-
57
- cy.wrap({ resetConfiguration })
58
- .invoke("resetConfiguration", true);
59
-
60
- cy.mount(<TestGeneric />);
61
- cy.get("script[data-ui5-config]")
62
- .should("exist")
63
- .then($el => {
64
- return $el.get(0)?.innerHTML;
65
- })
66
- .should("equal", JSON.stringify(configurationObject));
67
- });
68
-
69
- after(() => {
70
- cy.window()
71
- .then($el => {
72
- const scriptElement = $el.document.head.querySelector("script[data-ui5-config]");
73
-
74
- scriptElement?.remove();
75
- })
76
- })
77
-
78
- it("getLanguage", () => {
79
- cy.wrap({ getLanguage })
80
- .invoke("getLanguage")
81
- .should("equal", configurationObject.language);
82
- });
83
-
84
- it("getCalendarType", () => {
85
- cy.wrap({ getCalendarType })
86
- .invoke("getCalendarType")
87
- .should("equal", configurationObject.calendarType);
88
- });
89
-
90
- it("getFirstDayOfWeek", () => {
91
- cy.wrap({ getFirstDayOfWeek })
92
- .invoke("getFirstDayOfWeek")
93
- .should("equal", configurationObject.formatSettings.firstDayOfWeek);
94
- });
95
-
96
- it("getLegacyDateCalendarCustomizing", () => {
97
- cy.wrap({ getLegacyDateCalendarCustomizing })
98
- .invoke("getLegacyDateCalendarCustomizing")
99
- .should("deep.equal", configurationObject.formatSettings.legacyDateCalendarCustomizing);
100
- });
101
-
102
- it("getAnimationMode", () => {
103
- cy.wrap({ getAnimationMode })
104
- .invoke("getAnimationMode")
105
- .should("equal", configurationObject.animationMode);
106
- });
107
-
108
- it("getEnableDefaultTooltips", () => {
109
- cy.wrap({ getTheme })
110
- .invoke("getTheme")
111
- .should("equal", configurationObject.theme);
112
- });
113
-
114
- it("getNoConflict", () => {
115
- cy.wrap({ getNoConflict })
116
- .invoke("getNoConflict")
117
- .should("deep.equal", configurationObject.noConflict)
118
- .its("events")
119
- .should("deep.equal", configurationObject.noConflict.events);
120
- });
121
-
122
- it("getDefaultFontLoading", () => {
123
- cy.wrap({ getDefaultFontLoading })
124
- .invoke("getDefaultFontLoading")
125
- .should("equal", false);
126
- });
127
-
128
- it("getEnableDefaultTooltips", () => {
129
- cy.wrap({ getEnableDefaultTooltips })
130
- .invoke("getEnableDefaultTooltips")
131
- .should("equal", false);
132
- });
133
- });
@@ -1,201 +0,0 @@
1
- import { internals } from "../../src/Location.js";
2
- import TestGeneric from "../../test/test-elements/Generic.js";
3
- import { resetConfiguration } from "../../src/InitialConfiguration.js";
4
- import { getLanguage } from "../../src/config/Language.js";
5
- import { getCalendarType } from "../../src/config/CalendarType.js";
6
- import { getTheme } from "../../src/config/Theme.js";
7
- import { getAnimationMode } from "../../src/config/AnimationMode.js";
8
- import AnimationMode from "../../src/types/AnimationMode.js";
9
- import { getThemeRoot } from "../../src/config/ThemeRoot.js";
10
-
11
- describe("Some settings can be set via SAP UI URL params", () => {
12
- before(() => {
13
- const searchParams = "sap-ui-rtl=true&sap-ui-language=ja&sap-ui-calendarType=Japanese&sap-ui-theme=sap_horizon_hcb&sap-ui-animationMode=basic";
14
-
15
- cy.stub(internals, "search", () => {
16
- return searchParams;
17
- });
18
-
19
- cy.then(() => {
20
- return resetConfiguration(true);
21
- });
22
-
23
- cy.wrap(internals)
24
- .invoke("search")
25
- .should("be.equal", searchParams);
26
-
27
- cy.mount(<TestGeneric />);
28
- });
29
-
30
- it("Tests that language is applied", () => {
31
- cy.wrap({ getLanguage })
32
- .invoke("getLanguage")
33
- .should("equal", "ja");
34
- });
35
-
36
- it("Tests that calendarType is applied", () => {
37
- cy.wrap({ getCalendarType })
38
- .invoke("getCalendarType")
39
- .should("equal", "Japanese");
40
- });
41
-
42
- it("Tests that theme is applied", () => {
43
- cy.wrap({ getTheme })
44
- .invoke("getTheme")
45
- .should("equal", "sap_horizon_hcb");
46
- });
47
-
48
- it("Tests that animationMode is applied", () => {
49
- cy.wrap({ getAnimationMode })
50
- .invoke("getAnimationMode")
51
- .should("equal", AnimationMode.Basic);
52
- });
53
- });
54
-
55
- describe("Different themeRoot configurations", () => {
56
- it("Allowed theme root", () => {
57
- const searchParams = "sap-ui-theme=sap_horizon_hcb@https://example.com";
58
-
59
- // All allowed theme roots need to be described inside the meta tag.
60
- cy.window()
61
- .then($el => {
62
- const metaTag = document.createElement("meta");
63
- metaTag.name = "sap-allowedThemeOrigins";
64
- metaTag.content = "https://example.com";
65
-
66
- $el.document.head.append(metaTag);
67
- })
68
-
69
- cy.stub(internals, "search", () => {
70
- return searchParams;
71
- });
72
-
73
- cy.wrap({ resetConfiguration })
74
- .invoke("resetConfiguration", true);
75
-
76
- cy.wrap(internals)
77
- .invoke("search")
78
- .should("be.equal", searchParams);
79
-
80
- cy.mount(<TestGeneric />);
81
-
82
- cy.wrap({ getThemeRoot })
83
- .invoke("getThemeRoot")
84
- .should("equal", "https://example.com/UI5/");
85
-
86
- // All allowed theme roots need to be described inside the meta tag.
87
- cy.window()
88
- .then($el => {
89
- const metaTag = $el.document.head.querySelector("[name='sap-allowedThemeOrigins']");
90
-
91
- metaTag?.remove();
92
- })
93
- });
94
-
95
- it("Unallowed theme root", () => {
96
- const searchParams = "sap-ui-theme=sap_horizon_hcb@https://another-example.com";
97
-
98
- cy.stub(internals, "search", () => {
99
- return searchParams;
100
- });
101
-
102
- cy.wrap({ resetConfiguration })
103
- .invoke("resetConfiguration", true);
104
-
105
- cy.wrap(internals)
106
- .invoke("search")
107
- .should("be.equal", searchParams);
108
-
109
- cy.mount(<TestGeneric />);
110
-
111
- cy.wrap({ getThemeRoot })
112
- .invoke("getThemeRoot")
113
- .should("equal", `${window.location.origin}/UI5/`);
114
- });
115
-
116
- it("Relative theme root", () => {
117
- const searchParams = "sap-ui-theme=sap_horizon_hcb@./test";
118
-
119
- cy.stub(internals, "search", () => {
120
- return searchParams;
121
- });
122
-
123
- cy.wrap({ resetConfiguration })
124
- .invoke("resetConfiguration", true);
125
-
126
- cy.wrap(internals)
127
- .invoke("search")
128
- .should("be.equal", searchParams);
129
-
130
- cy.mount(<TestGeneric />);
131
-
132
- cy.wrap({ getThemeRoot })
133
- .invoke("getThemeRoot")
134
- .then(themeRoot => {
135
- return themeRoot?.endsWith("/test/UI5/");
136
- })
137
- .should("be.true");
138
- });
139
- });
140
-
141
- describe("Some settings can be set via SAP URL params", () => {
142
- before(() => {
143
- const searchParams = "sap-language=bg&sap-theme=sap_fiori_3_dark";
144
-
145
- cy.stub(internals, "search", () => {
146
- return searchParams;
147
- });
148
-
149
- cy.wrap({ resetConfiguration })
150
- .invoke("resetConfiguration", true);
151
-
152
- cy.wrap(internals)
153
- .invoke("search")
154
- .should("be.equal", searchParams);
155
-
156
- cy.mount(<TestGeneric />);
157
- });
158
-
159
- it("Tests that language is applied via sap-ui-language", () => {
160
- cy.wrap({ getLanguage })
161
- .invoke("getLanguage")
162
- .should("equal", "bg");
163
- });
164
-
165
- it("Tests that theme is applied via sap-ui-theme", () => {
166
- cy.wrap({ getTheme })
167
- .invoke("getTheme")
168
- .should("equal", "sap_fiori_3_dark");
169
- });
170
- });
171
-
172
- describe("Some settings can be set via SAP UI URL params", () => {
173
- before(() => {
174
- const searchParams = "sap-language=bg&sap-ui-language=de&sap-theme=sap_fiori_3_dark&sap-theme=sap_fiori_3_hcb";
175
-
176
- cy.stub(internals, "search", () => {
177
- return searchParams;
178
- });
179
-
180
- cy.wrap({ resetConfiguration })
181
- .invoke("resetConfiguration", true);
182
-
183
- cy.wrap(internals)
184
- .invoke("search")
185
- .should("be.equal", searchParams);
186
-
187
- cy.mount(<TestGeneric />);
188
- });
189
-
190
- it("Tests that language is applied via sap-ui-language", () => {
191
- cy.wrap({ getLanguage })
192
- .invoke("getLanguage")
193
- .should("equal", "de");
194
- });
195
-
196
- it("Tests that theme is applied via sap-ui-theme", () => {
197
- cy.wrap({ getTheme })
198
- .invoke("getTheme")
199
- .should("equal", "sap_fiori_3_hcb");
200
- });
201
- });
@@ -1,9 +0,0 @@
1
- describe("Custom mount", () => {
2
- it("mount", () => {
3
- cy.mount(<button>Test</button>);
4
-
5
- cy.get("button")
6
- .should("exist")
7
- .and("have.text", "Test");
8
- });
9
- });
@@ -1,36 +0,0 @@
1
- import { registerThemePropertiesLoader } from "../../src/AssetRegistry.js";
2
- import { setTheme } from "../../src/config/Theme.js";
3
- import { getCurrentRuntimeIndex } from "../../src/Runtimes.js";
4
- import TestGeneric from "../../test/test-elements/Generic.js";
5
-
6
- describe("Custom themes can be registered", () => {
7
- it("Tests that theme parameters are changed on theme change", () => {
8
- const newTheme = "my_custom_theme";
9
- const var1 = "--var1: #555555";
10
- const currentRuntime = 0;
11
- const dataPropAttr = `data-ui5-component-properties-${currentRuntime}`;
12
-
13
- cy.mount(<TestGeneric />);
14
-
15
- cy.wrap({ getCurrentRuntimeIndex })
16
- .invoke("getCurrentRuntimeIndex")
17
- .should("equal", currentRuntime);
18
-
19
- cy.wrap({ registerThemePropertiesLoader })
20
- .invoke("registerThemePropertiesLoader", "@ui5/webcomponents-base-test", newTheme, () => Promise.resolve(`:root{ ${var1}; }`));
21
-
22
- cy.wrap({ setTheme })
23
- .invoke("setTheme", newTheme);
24
-
25
- cy.document()
26
- .its("adoptedStyleSheets")
27
- .then(adoptedStyleSheets => {
28
- // eslint-disable-next-line
29
- return adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === `${dataPropAttr}|@ui5/webcomponents-base-test`);
30
- })
31
- .its("cssRules")
32
- .its(0)
33
- .its("cssText")
34
- .should("include", var1);
35
- });
36
- });
@@ -1,59 +0,0 @@
1
- import EventProvider from "../../src/EventProvider.js";
2
-
3
- describe("Event provider attaches and detaches listeners properly", () => {
4
- it("Tests that listeners can be removed (1 listener)", () => {
5
- let timesCalled = 0;
6
-
7
- cy.then(() => {
8
- const ep = new EventProvider();
9
- const callback = () => {
10
- timesCalled++;
11
- };
12
-
13
- // Setup
14
- ep.attachEvent("test", callback);
15
-
16
- // Act
17
- ep.fireEvent("test", undefined); // should execute the callback and increase the counter
18
-
19
- // Setup
20
- ep.detachEvent("test", callback);
21
-
22
- // Act
23
- ep.fireEvent("test", undefined); // should not execute the callback and increase the counter
24
- })
25
- .then(() => {
26
- return timesCalled;
27
- })
28
- .should("equal", 1);
29
- });
30
-
31
- it("Tests that listeners can be removed (more than 1 listener)", () => {
32
- let timesCalled = 0;
33
-
34
- cy.then(() => {
35
- const ep = new EventProvider();
36
- const callback = () => {
37
- timesCalled++;
38
- };
39
- const somePreviousCallback = () => { };
40
-
41
- // Setup
42
- ep.attachEvent("test", somePreviousCallback); // Attach something so that after detachEvent the listeners array is not empty!
43
- ep.attachEvent("test", callback);
44
-
45
- // Act
46
- ep.fireEvent("test", undefined); // should execute the callback and increase the counter
47
-
48
- // Setup
49
- ep.detachEvent("test", callback);
50
-
51
- // Act
52
- ep.fireEvent("test", undefined); // should not execute the callback and increase the counter
53
- })
54
- .then(() => {
55
- return timesCalled;
56
- })
57
- .should("equal", 1);
58
- });
59
- });
@@ -1,28 +0,0 @@
1
- import EventsConsumer from "../../test/test-elements/Events.js";
2
- import type { Events } from "../../test/test-elements/Events.js";
3
-
4
- describe("Event provider attaches and detaches listeners properly", () => {
5
- it("Tests that attaching camelCase and kebab-case events in templates works", () => {
6
- cy.mount(<EventsConsumer></EventsConsumer>);
7
- cy.get<EventsConsumer>("[ui5-test-events-consumer]")
8
- .as("eventsConsumer");
9
-
10
- cy.get("@eventsConsumer")
11
- .shadow()
12
- .find("[ui5-test-events]")
13
- .then(elements => {
14
- (elements[0] as Events).fireKebaCaseEvent();
15
- });
16
- cy.get("@eventsConsumer")
17
- .should("have.prop", "kebabCaseFired", true);
18
-
19
- cy.get("@eventsConsumer")
20
- .shadow()
21
- .find("[ui5-test-events]")
22
- .then(elements => {
23
- (elements[0] as Events).fireCamelCaseEvent();
24
- });
25
- cy.get("@eventsConsumer")
26
- .should("have.prop", "camelCaseFired", true);
27
- });
28
- });
@@ -1,8 +0,0 @@
1
- import "../../test/test-elements/Accessor.js";
2
-
3
- describe("Shared Resources", () => {
4
- it("Tests the presense of the shared resources 'meta' element", () => {
5
- cy.get(`meta[name="ui5-shared-resources"]`)
6
- .should("exist");
7
- });
8
- });
@@ -1,74 +0,0 @@
1
- import { setTheme } from "../../src/config/Theme.js";
2
- import { getCurrentRuntimeIndex } from "../../src/Runtimes.js";
3
- import "../../test/test-elements/Accessor.js";
4
- import "../../test/assets/Themes.js";
5
-
6
- describe("Theming works", () => {
7
- it("Tests that the parameters for the default theme are embedded on boot", () => {
8
- const currentRuntime = 0;
9
- const dataPropAttr = `data-ui5-component-properties-${currentRuntime}`;
10
-
11
- cy.wrap({ getCurrentRuntimeIndex })
12
- .invoke("getCurrentRuntimeIndex")
13
- .should("equal", currentRuntime);
14
-
15
- cy.document()
16
- .its("adoptedStyleSheets")
17
- .then(adoptedStyleSheets => {
18
- // eslint-disable-next-line
19
- return adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === `${dataPropAttr}|@ui5/webcomponents-base-test`);
20
- })
21
- .its("cssRules")
22
- .its(0)
23
- .its("cssText")
24
- .should("include", "--var1: grey");
25
- });
26
-
27
- it("Tests that the parameters for the default theme are embedded on boot", () => {
28
- const newTheme = "sap_fiori_3_hcb";
29
- const currentRuntime = 0;
30
- const dataPropAttr = `data-ui5-component-properties-${currentRuntime}`;
31
-
32
- cy.wrap({ getCurrentRuntimeIndex })
33
- .invoke("getCurrentRuntimeIndex")
34
- .should("equal", currentRuntime);
35
-
36
- cy.wrap({ setTheme })
37
- .invoke("setTheme", newTheme);
38
-
39
- cy.document()
40
- .its("adoptedStyleSheets")
41
- .then(adoptedStyleSheets => {
42
- // eslint-disable-next-line
43
- return adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === `${dataPropAttr}|@ui5/webcomponents-base-test`);
44
- })
45
- .its("cssRules")
46
- .its(0)
47
- .its("cssText")
48
- .should("include", "--var1: yellow");
49
- });
50
-
51
- it("Tests that the parameters for the default theme are embedded on boot", () => {
52
- const unknownTheme = "sap_unknown_theme";
53
- const currentRuntime = 0;
54
- const dataPropAttr = `data-ui5-component-properties-${currentRuntime}`;
55
-
56
- cy.wrap({ getCurrentRuntimeIndex })
57
- .invoke("getCurrentRuntimeIndex")
58
- .should("equal", currentRuntime);
59
-
60
- cy.wrap({ setTheme })
61
- .invoke("setTheme", unknownTheme);
62
-
63
- cy.document()
64
- .its("adoptedStyleSheets")
65
- .then(adoptedStyleSheets => {
66
- // eslint-disable-next-line
67
- return adoptedStyleSheets.find(sh => (sh as Record<string, any>)._ui5StyleId === `${dataPropAttr}|@ui5/webcomponents-base-test`);
68
- })
69
- .its("cssRules")
70
- .its(0)
71
- .its("cssText")
72
- .should("include", "--var1: grey");
73
- });
74
- });