@ui5/webcomponents-base 0.0.0-7d5f73b20 → 0.0.0-8085abb8d

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 (409) hide show
  1. package/.eslintignore +4 -4
  2. package/.eslintrc.cjs +3 -0
  3. package/.npsrc.json +3 -0
  4. package/CHANGELOG.md +229 -0
  5. package/README.md +4 -0
  6. package/bundle.esm.js +8 -1
  7. package/config/wdio.conf.cjs +400 -0
  8. package/dist/AssetRegistry.js.map +1 -1
  9. package/dist/Boot.d.ts +4 -3
  10. package/dist/Boot.js +31 -4
  11. package/dist/Boot.js.map +1 -1
  12. package/dist/CSP.js.map +1 -1
  13. package/dist/CustomElementsRegistry.js.map +1 -1
  14. package/dist/CustomElementsScope.js.map +1 -1
  15. package/dist/CustomElementsScopeUtils.js.map +1 -1
  16. package/dist/DOMObserver.js.map +1 -1
  17. package/dist/Device.js +109 -34
  18. package/dist/Device.js.map +1 -1
  19. package/dist/EventProvider.js +1 -1
  20. package/dist/EventProvider.js.map +1 -1
  21. package/dist/FeaturesRegistry.js.map +1 -1
  22. package/dist/FontFace.js.map +1 -1
  23. package/dist/IgnoreCustomElements.d.ts +27 -0
  24. package/dist/IgnoreCustomElements.js +39 -0
  25. package/dist/IgnoreCustomElements.js.map +1 -0
  26. package/dist/InitialConfiguration.d.ts +6 -1
  27. package/dist/InitialConfiguration.js +11 -2
  28. package/dist/InitialConfiguration.js.map +1 -1
  29. package/dist/Keys.js.map +1 -1
  30. package/dist/ManagedStyles.js +9 -2
  31. package/dist/ManagedStyles.js.map +1 -1
  32. package/dist/MarkedEvents.js.map +1 -1
  33. package/dist/MediaRange.js.map +1 -1
  34. package/dist/PropertiesFileFormat.js.map +1 -1
  35. package/dist/Render.js.map +1 -1
  36. package/dist/RenderQueue.js.map +1 -1
  37. package/dist/Runtimes.js.map +1 -1
  38. package/dist/StaticArea.d.ts +3 -0
  39. package/dist/StaticArea.js +4 -3
  40. package/dist/StaticArea.js.map +1 -1
  41. package/dist/StaticAreaItem.js +3 -0
  42. package/dist/StaticAreaItem.js.map +1 -1
  43. package/dist/SystemCSSVars.js.map +1 -1
  44. package/dist/Theming.js.map +1 -1
  45. package/dist/UI5Element.d.ts +20 -14
  46. package/dist/UI5Element.js +24 -24
  47. package/dist/UI5Element.js.map +1 -1
  48. package/dist/UI5ElementMetadata.js.map +1 -1
  49. package/dist/animations/AnimationQueue.js.map +1 -1
  50. package/dist/animations/animate.js.map +1 -1
  51. package/dist/animations/scroll.js.map +1 -1
  52. package/dist/animations/slideDown.js.map +1 -1
  53. package/dist/animations/slideUp.js.map +1 -1
  54. package/dist/api.json +1 -1
  55. package/dist/asset-registries/Icons.d.ts +18 -10
  56. package/dist/asset-registries/Icons.js +44 -23
  57. package/dist/asset-registries/Icons.js.map +1 -1
  58. package/dist/asset-registries/Illustrations.d.ts +1 -1
  59. package/dist/asset-registries/Illustrations.js.map +1 -1
  60. package/dist/asset-registries/LocaleData.js.map +1 -1
  61. package/dist/asset-registries/Themes.d.ts +1 -0
  62. package/dist/asset-registries/Themes.js +2 -0
  63. package/dist/asset-registries/Themes.js.map +1 -1
  64. package/dist/asset-registries/i18n.js +9 -3
  65. package/dist/asset-registries/i18n.js.map +1 -1
  66. package/dist/assets/Boot.1ee7a8e7.js +9 -0
  67. package/dist/assets/Boot.34b7cea0.css +1 -0
  68. package/dist/assets/bundle.esm.40f75059.js +50 -0
  69. package/dist/assets-meta/IconCollectionsAlias.d.ts +24 -10
  70. package/dist/assets-meta/IconCollectionsAlias.js +29 -9
  71. package/dist/assets-meta/IconCollectionsAlias.js.map +1 -1
  72. package/dist/config/AnimationMode.d.ts +2 -2
  73. package/dist/config/AnimationMode.js +1 -1
  74. package/dist/config/AnimationMode.js.map +1 -1
  75. package/dist/config/CalendarType.js.map +1 -1
  76. package/dist/config/FormatSettings.d.ts +5 -1
  77. package/dist/config/FormatSettings.js +5 -1
  78. package/dist/config/FormatSettings.js.map +1 -1
  79. package/dist/config/Icons.d.ts +43 -18
  80. package/dist/config/Icons.js +81 -26
  81. package/dist/config/Icons.js.map +1 -1
  82. package/dist/config/Language.d.ts +10 -1
  83. package/dist/config/Language.js +13 -1
  84. package/dist/config/Language.js.map +1 -1
  85. package/dist/config/NoConflict.js +1 -0
  86. package/dist/config/NoConflict.js.map +1 -1
  87. package/dist/config/RTL.js +3 -0
  88. package/dist/config/RTL.js.map +1 -1
  89. package/dist/config/Theme.d.ts +15 -5
  90. package/dist/config/Theme.js +25 -6
  91. package/dist/config/Theme.js.map +1 -1
  92. package/dist/config/ThemeRoot.d.ts +29 -0
  93. package/dist/config/ThemeRoot.js +59 -0
  94. package/dist/config/ThemeRoot.js.map +1 -0
  95. package/dist/config/Timezone.d.ts +17 -0
  96. package/dist/config/Timezone.js +30 -0
  97. package/dist/config/Timezone.js.map +1 -0
  98. package/dist/decorators/customElement.d.ts +17 -2
  99. package/dist/decorators/customElement.js +26 -5
  100. package/dist/decorators/customElement.js.map +1 -1
  101. package/dist/decorators/event.js +6 -6
  102. package/dist/decorators/event.js.map +1 -1
  103. package/dist/decorators/property.js +6 -6
  104. package/dist/decorators/property.js.map +1 -1
  105. package/dist/decorators/slot.js +9 -9
  106. package/dist/decorators/slot.js.map +1 -1
  107. package/dist/delegate/ItemNavigation.js.map +1 -1
  108. package/dist/delegate/ResizeHandler.d.ts +2 -1
  109. package/dist/delegate/ResizeHandler.js +7 -3
  110. package/dist/delegate/ResizeHandler.js.map +1 -1
  111. package/dist/delegate/ScrollEnablement.js.map +1 -1
  112. package/dist/features/F6Navigation.d.ts +3 -0
  113. package/dist/features/F6Navigation.js +77 -38
  114. package/dist/features/F6Navigation.js.map +1 -1
  115. package/dist/features/LegacyDateFormats.d.ts +18 -0
  116. package/dist/features/LegacyDateFormats.js +20 -0
  117. package/dist/features/LegacyDateFormats.js.map +1 -0
  118. package/dist/features/OpenUI5Element.js.map +1 -1
  119. package/dist/features/OpenUI5Enablement.js.map +1 -1
  120. package/dist/features/OpenUI5Support.d.ts +3 -0
  121. package/dist/features/OpenUI5Support.js +2 -0
  122. package/dist/features/OpenUI5Support.js.map +1 -1
  123. package/dist/generated/AssetParameters.js +2 -0
  124. package/dist/generated/VersionInfo.js +3 -3
  125. package/dist/generated/css/BusyIndicator.css.js.map +1 -1
  126. package/dist/generated/css/FontFace.css.js.map +1 -1
  127. package/dist/generated/css/OverrideFontFace.css.js.map +1 -1
  128. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  129. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +4 -0
  130. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +8 -10
  131. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +1 -0
  132. package/dist/getSharedResource.d.ts +1 -1
  133. package/dist/getSharedResource.js +16 -2
  134. package/dist/getSharedResource.js.map +1 -1
  135. package/dist/global.d.ts +2 -0
  136. package/dist/i18nBundle.js +2 -1
  137. package/dist/i18nBundle.js.map +1 -1
  138. package/dist/locale/Locale.js.map +1 -1
  139. package/dist/locale/RTLAwareRegistry.d.ts +1 -1
  140. package/dist/locale/RTLAwareRegistry.js.map +1 -1
  141. package/dist/locale/applyDirection.js.map +1 -1
  142. package/dist/locale/directionChange.js.map +1 -1
  143. package/dist/locale/getEffectiveDir.js.map +1 -1
  144. package/dist/locale/getLocale.js.map +1 -1
  145. package/dist/locale/languageChange.js.map +1 -1
  146. package/dist/locale/nextFallbackLocale.js.map +1 -1
  147. package/dist/locale/normalizeLocale.js.map +1 -1
  148. package/dist/renderer/LitRenderer.d.ts +3 -3
  149. package/dist/renderer/LitRenderer.js.map +1 -1
  150. package/dist/renderer/executeTemplate.js +1 -1
  151. package/dist/renderer/executeTemplate.js.map +1 -1
  152. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
  153. package/dist/theming/CustomStyle.js +7 -5
  154. package/dist/theming/CustomStyle.js.map +1 -1
  155. package/dist/theming/ThemeLoaded.js.map +1 -1
  156. package/dist/theming/ThemeRegistered.d.ts +4 -0
  157. package/dist/theming/ThemeRegistered.js +11 -0
  158. package/dist/theming/ThemeRegistered.js.map +1 -0
  159. package/dist/theming/applyTheme.js +3 -2
  160. package/dist/theming/applyTheme.js.map +1 -1
  161. package/dist/theming/getConstructableStyle.js.map +1 -1
  162. package/dist/theming/getEffectiveLinksHrefs.js.map +1 -1
  163. package/dist/theming/getEffectiveStyle.js.map +1 -1
  164. package/dist/theming/getStylesString.d.ts +1 -1
  165. package/dist/theming/getStylesString.js.map +1 -1
  166. package/dist/theming/getThemeDesignerTheme.js.map +1 -1
  167. package/dist/theming/preloadLinks.js.map +1 -1
  168. package/dist/thirdparty/_merge.js.map +1 -1
  169. package/dist/thirdparty/isPlainObject.js.map +1 -1
  170. package/dist/thirdparty/merge.js.map +1 -1
  171. package/dist/types/AnimationMode.d.ts +1 -1
  172. package/dist/types/AnimationMode.js +1 -1
  173. package/dist/types/AnimationMode.js.map +1 -1
  174. package/dist/types/CSSColor.d.ts +0 -1
  175. package/dist/types/CSSColor.js +0 -1
  176. package/dist/types/CSSColor.js.map +1 -1
  177. package/dist/types/CalendarType.d.ts +1 -1
  178. package/dist/types/CalendarType.js +1 -1
  179. package/dist/types/CalendarType.js.map +1 -1
  180. package/dist/types/DOMReference.js.map +1 -1
  181. package/dist/types/DataType.js.map +1 -1
  182. package/dist/types/Float.d.ts +0 -1
  183. package/dist/types/Float.js +0 -1
  184. package/dist/types/Float.js.map +1 -1
  185. package/dist/types/Integer.d.ts +0 -1
  186. package/dist/types/Integer.js +0 -1
  187. package/dist/types/Integer.js.map +1 -1
  188. package/dist/types/InvisibleMessageMode.d.ts +1 -1
  189. package/dist/types/InvisibleMessageMode.js +1 -1
  190. package/dist/types/InvisibleMessageMode.js.map +1 -1
  191. package/dist/types/ItemNavigationBehavior.d.ts +1 -1
  192. package/dist/types/ItemNavigationBehavior.js +1 -1
  193. package/dist/types/ItemNavigationBehavior.js.map +1 -1
  194. package/dist/types/NavigationMode.d.ts +1 -1
  195. package/dist/types/NavigationMode.js +1 -1
  196. package/dist/types/NavigationMode.js.map +1 -1
  197. package/dist/types/ValueState.d.ts +1 -1
  198. package/dist/types/ValueState.js +1 -1
  199. package/dist/types/ValueState.js.map +1 -1
  200. package/dist/types.d.ts +1 -1
  201. package/dist/types.js.map +1 -1
  202. package/dist/updateShadowRoot.js +11 -4
  203. package/dist/updateShadowRoot.js.map +1 -1
  204. package/dist/util/AriaLabelHelper.d.ts +10 -1
  205. package/dist/util/AriaLabelHelper.js +135 -8
  206. package/dist/util/AriaLabelHelper.js.map +1 -1
  207. package/dist/util/Caret.js.map +1 -1
  208. package/dist/util/ColorConversion.js.map +1 -1
  209. package/dist/util/FetchHelper.js.map +1 -1
  210. package/dist/util/FocusableElements.js +4 -3
  211. package/dist/util/FocusableElements.js.map +1 -1
  212. package/dist/util/HTMLSanitizer.js.map +1 -1
  213. package/dist/util/InvisibleMessage.d.ts +1 -1
  214. package/dist/util/InvisibleMessage.js.map +1 -1
  215. package/dist/util/PopupUtils.js.map +1 -1
  216. package/dist/util/SlotsHelper.js.map +1 -1
  217. package/dist/util/StringHelper.js.map +1 -1
  218. package/dist/util/TabbableElements.js.map +1 -1
  219. package/dist/util/arraysAreEqual.js.map +1 -1
  220. package/dist/util/clamp.js.map +1 -1
  221. package/dist/util/createLinkInHead.js.map +1 -1
  222. package/dist/util/createStyleInHead.js.map +1 -1
  223. package/dist/util/debounce.js.map +1 -1
  224. package/dist/util/detectNavigatorLanguage.js.map +1 -1
  225. package/dist/util/escapeRegex.js.map +1 -1
  226. package/dist/util/formatMessage.js.map +1 -1
  227. package/dist/util/generateHighlightedMarkup.js.map +1 -1
  228. package/dist/util/getActiveElement.js.map +1 -1
  229. package/dist/util/getClassCopy.d.ts +9 -9
  230. package/dist/util/getClassCopy.js.map +1 -1
  231. package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
  232. package/dist/util/getEffectiveContentDensity.js.map +1 -1
  233. package/dist/util/getEffectiveScrollbarStyle.js.map +1 -1
  234. package/dist/util/getFastNavigationGroups.js.map +1 -1
  235. package/dist/util/getFileExtension.js.map +1 -1
  236. package/dist/util/getNormalizedTarget.js.map +1 -1
  237. package/dist/util/getSingletonElementInstance.d.ts +10 -1
  238. package/dist/util/getSingletonElementInstance.js +11 -2
  239. package/dist/util/getSingletonElementInstance.js.map +1 -1
  240. package/dist/util/isElementClickable.js.map +1 -1
  241. package/dist/util/isElementHidden.js.map +1 -1
  242. package/dist/util/isElementInView.js.map +1 -1
  243. package/dist/util/isElementTabbable.js.map +1 -1
  244. package/dist/util/isValidPropertyName.js.map +1 -1
  245. package/dist/util/whenDOMReady.js.map +1 -1
  246. package/dist/util/willShowContent.js.map +1 -1
  247. package/dist/validateThemeRoot.js +14 -13
  248. package/dist/validateThemeRoot.js.map +1 -1
  249. package/index.js +227 -1
  250. package/lib/generate-asset-parameters/index.js +4 -2
  251. package/lib/generate-styles/index.js +3 -3
  252. package/lib/generate-version-info/index.js +1 -1
  253. package/{package-scripts.js → package-scripts.cjs} +9 -5
  254. package/package.json +5 -4
  255. package/tsconfig.json +1 -0
  256. package/config/wdio.conf.js +0 -1
  257. package/dist/assets/bundle.esm.5c683084.js +0 -56
  258. package/dist/config/ThemeRoots.d.ts +0 -4
  259. package/dist/config/ThemeRoots.js +0 -28
  260. package/dist/config/ThemeRoots.js.map +0 -1
  261. package/dist/decorators/fastNavigation.d.ts +0 -7
  262. package/dist/decorators/fastNavigation.js +0 -13
  263. package/dist/decorators/fastNavigation.js.map +0 -1
  264. package/dist/decorators/languageAware.d.ts +0 -7
  265. package/dist/decorators/languageAware.js +0 -13
  266. package/dist/decorators/languageAware.js.map +0 -1
  267. package/dist/decorators/themeAware.d.ts +0 -7
  268. package/dist/decorators/themeAware.js +0 -13
  269. package/dist/decorators/themeAware.js.map +0 -1
  270. package/src/AssetRegistry.ts +0 -11
  271. package/src/Boot.ts +0 -61
  272. package/src/CSP.ts +0 -66
  273. package/src/CustomElementsRegistry.ts +0 -98
  274. package/src/CustomElementsScope.ts +0 -33
  275. package/src/CustomElementsScopeUtils.ts +0 -115
  276. package/src/DOMObserver.ts +0 -28
  277. package/src/Device.ts +0 -124
  278. package/src/EventProvider.ts +0 -87
  279. package/src/FeaturesRegistry.ts +0 -14
  280. package/src/FontFace.ts +0 -31
  281. package/src/InitialConfiguration.ts +0 -207
  282. package/src/Keys.ts +0 -295
  283. package/src/ManagedStyles.ts +0 -92
  284. package/src/MarkedEvents.ts +0 -20
  285. package/src/MediaRange.ts +0 -110
  286. package/src/PropertiesFileFormat.ts +0 -95
  287. package/src/Render.ts +0 -180
  288. package/src/RenderQueue.ts +0 -71
  289. package/src/Runtimes.ts +0 -114
  290. package/src/StaticArea.ts +0 -3
  291. package/src/StaticAreaItem.ts +0 -113
  292. package/src/SystemCSSVars.ts +0 -10
  293. package/src/Theming.ts +0 -4
  294. package/src/UI5Element.ts +0 -1156
  295. package/src/UI5ElementMetadata.ts +0 -389
  296. package/src/animations/AnimationQueue.ts +0 -43
  297. package/src/animations/animate.ts +0 -64
  298. package/src/animations/scroll.ts +0 -21
  299. package/src/animations/slideDown.ts +0 -72
  300. package/src/animations/slideUp.ts +0 -67
  301. package/src/asset-registries/Icons.ts +0 -162
  302. package/src/asset-registries/Illustrations.ts +0 -75
  303. package/src/asset-registries/LocaleData.ts +0 -172
  304. package/src/asset-registries/Themes.ts +0 -67
  305. package/src/asset-registries/i18n.ts +0 -118
  306. package/src/assets-meta/IconCollectionsAlias.ts +0 -18
  307. package/src/config/AnimationMode.ts +0 -33
  308. package/src/config/CalendarType.ts +0 -23
  309. package/src/config/FormatSettings.ts +0 -21
  310. package/src/config/Icons.ts +0 -59
  311. package/src/config/Language.ts +0 -72
  312. package/src/config/NoConflict.ts +0 -67
  313. package/src/config/RTL.ts +0 -41
  314. package/src/config/Theme.ts +0 -64
  315. package/src/config/ThemeRoots.ts +0 -41
  316. package/src/decorators/customElement.ts +0 -17
  317. package/src/decorators/event.ts +0 -28
  318. package/src/decorators/fastNavigation.ts +0 -14
  319. package/src/decorators/languageAware.ts +0 -14
  320. package/src/decorators/property.ts +0 -30
  321. package/src/decorators/slot.ts +0 -49
  322. package/src/decorators/themeAware.ts +0 -14
  323. package/src/delegate/ItemNavigation.ts +0 -393
  324. package/src/delegate/ResizeHandler.ts +0 -95
  325. package/src/delegate/ScrollEnablement.ts +0 -224
  326. package/src/features/F6Navigation.ts +0 -141
  327. package/src/features/OpenUI5Element.ts +0 -11
  328. package/src/features/OpenUI5Enablement.ts +0 -117
  329. package/src/features/OpenUI5Support.ts +0 -148
  330. package/src/generated/css/BusyIndicator.css.ts +0 -9
  331. package/src/generated/css/FontFace.css.ts +0 -9
  332. package/src/generated/css/OverrideFontFace.css.ts +0 -9
  333. package/src/generated/css/SystemCSSVars.css.ts +0 -9
  334. package/src/getSharedResource.ts +0 -30
  335. package/src/global.d.ts +0 -38
  336. package/src/i18nBundle.ts +0 -108
  337. package/src/locale/Locale.ts +0 -101
  338. package/src/locale/RTLAwareRegistry.ts +0 -16
  339. package/src/locale/applyDirection.ts +0 -18
  340. package/src/locale/directionChange.ts +0 -34
  341. package/src/locale/getEffectiveDir.ts +0 -28
  342. package/src/locale/getLocale.ts +0 -46
  343. package/src/locale/languageChange.ts +0 -24
  344. package/src/locale/nextFallbackLocale.ts +0 -28
  345. package/src/locale/normalizeLocale.ts +0 -56
  346. package/src/renderer/LitRenderer.ts +0 -60
  347. package/src/renderer/executeTemplate.ts +0 -40
  348. package/src/theming/CustomStyle.ts +0 -62
  349. package/src/theming/ThemeLoaded.ts +0 -24
  350. package/src/theming/applyTheme.ts +0 -90
  351. package/src/theming/getConstructableStyle.ts +0 -31
  352. package/src/theming/getEffectiveLinksHrefs.ts +0 -26
  353. package/src/theming/getEffectiveStyle.ts +0 -41
  354. package/src/theming/getStylesString.ts +0 -15
  355. package/src/theming/getThemeDesignerTheme.ts +0 -101
  356. package/src/theming/preloadLinks.ts +0 -24
  357. package/src/thirdparty/_merge.ts +0 -32
  358. package/src/thirdparty/isPlainObject.ts +0 -18
  359. package/src/thirdparty/merge.ts +0 -5
  360. package/src/types/AnimationMode.ts +0 -33
  361. package/src/types/CSSColor.ts +0 -20
  362. package/src/types/CalendarType.ts +0 -38
  363. package/src/types/DOMReference.ts +0 -28
  364. package/src/types/DataType.ts +0 -51
  365. package/src/types/Float.ts +0 -25
  366. package/src/types/Integer.ts +0 -25
  367. package/src/types/InvisibleMessageMode.ts +0 -27
  368. package/src/types/ItemNavigationBehavior.ts +0 -26
  369. package/src/types/NavigationMode.ts +0 -33
  370. package/src/types/ValueState.ts +0 -47
  371. package/src/types.ts +0 -30
  372. package/src/updateShadowRoot.ts +0 -37
  373. package/src/util/AriaLabelHelper.ts +0 -63
  374. package/src/util/Caret.ts +0 -28
  375. package/src/util/ColorConversion.ts +0 -399
  376. package/src/util/FetchHelper.ts +0 -31
  377. package/src/util/FocusableElements.ts +0 -92
  378. package/src/util/HTMLSanitizer.ts +0 -9
  379. package/src/util/InvisibleMessage.ts +0 -69
  380. package/src/util/PopupUtils.ts +0 -112
  381. package/src/util/SlotsHelper.ts +0 -39
  382. package/src/util/StringHelper.ts +0 -26
  383. package/src/util/TabbableElements.ts +0 -70
  384. package/src/util/arraysAreEqual.ts +0 -15
  385. package/src/util/clamp.ts +0 -12
  386. package/src/util/createLinkInHead.ts +0 -25
  387. package/src/util/createStyleInHead.ts +0 -20
  388. package/src/util/debounce.ts +0 -18
  389. package/src/util/detectNavigatorLanguage.ts +0 -13
  390. package/src/util/escapeRegex.ts +0 -11
  391. package/src/util/formatMessage.ts +0 -24
  392. package/src/util/generateHighlightedMarkup.ts +0 -43
  393. package/src/util/getActiveElement.ts +0 -11
  394. package/src/util/getClassCopy.ts +0 -12
  395. package/src/util/getDesigntimePropertyAsArray.ts +0 -4
  396. package/src/util/getEffectiveContentDensity.ts +0 -5
  397. package/src/util/getEffectiveScrollbarStyle.ts +0 -5
  398. package/src/util/getFastNavigationGroups.ts +0 -63
  399. package/src/util/getFileExtension.ts +0 -21
  400. package/src/util/getNormalizedTarget.ts +0 -16
  401. package/src/util/getSingletonElementInstance.ts +0 -13
  402. package/src/util/isElementClickable.ts +0 -19
  403. package/src/util/isElementHidden.ts +0 -9
  404. package/src/util/isElementInView.ts +0 -15
  405. package/src/util/isElementTabbable.ts +0 -37
  406. package/src/util/isValidPropertyName.ts +0 -29
  407. package/src/util/whenDOMReady.ts +0 -13
  408. package/src/util/willShowContent.ts +0 -7
  409. package/src/validateThemeRoot.ts +0 -58
@@ -1,98 +0,0 @@
1
- import getSharedResource from "./getSharedResource.js";
2
- import { getCurrentRuntimeIndex, compareRuntimes, getAllRuntimes } from "./Runtimes.js";
3
- import { Timeout } from "./types.js";
4
-
5
- const Tags = getSharedResource<Map<string, number>>("Tags", new Map());
6
- const Definitions = new Set<string>();
7
-
8
- let Failures = new Map<number, Set<string>>();
9
- let failureTimeout: Timeout | undefined;
10
-
11
- const UNKNOWN_RUNTIME = -1;
12
-
13
- const registerTag = (tag: string) => {
14
- Definitions.add(tag);
15
- Tags.set(tag, getCurrentRuntimeIndex());
16
- };
17
-
18
- const isTagRegistered = (tag: string) => {
19
- return Definitions.has(tag);
20
- };
21
-
22
- const getAllRegisteredTags = () => {
23
- return [...Definitions.values()];
24
- };
25
-
26
- const recordTagRegistrationFailure = (tag: string) => {
27
- let tagRegRuntimeIndex = Tags.get(tag);
28
- if (tagRegRuntimeIndex === undefined) {
29
- tagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the "unknown" key
30
- }
31
-
32
- if (!Failures.has(tagRegRuntimeIndex)) {
33
- Failures.set(tagRegRuntimeIndex, new Set());
34
- }
35
- Failures.get(tagRegRuntimeIndex)!.add(tag);
36
-
37
- if (!failureTimeout) {
38
- failureTimeout = setTimeout(() => {
39
- displayFailedRegistrations();
40
- Failures = new Map();
41
- failureTimeout = undefined;
42
- }, 1000);
43
- }
44
- };
45
-
46
- const displayFailedRegistrations = () => {
47
- const allRuntimes = getAllRuntimes();
48
- const currentRuntimeIndex = getCurrentRuntimeIndex();
49
- const currentRuntime = allRuntimes[currentRuntimeIndex];
50
-
51
- let message = `Multiple UI5 Web Components instances detected.`;
52
-
53
- if (allRuntimes.length > 1) {
54
- message = `${message}\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\n${runtime.description}`).join("")}`;
55
- }
56
-
57
- [...Failures.keys()].forEach(otherRuntimeIndex => {
58
- let comparison: number;
59
- let otherRuntime;
60
-
61
- if (otherRuntimeIndex === UNKNOWN_RUNTIME) { // version < 1.1.0 defined the tag
62
- comparison = 1; // the current runtime is considered newer
63
- otherRuntime = {
64
- description: `Older unknown runtime`,
65
- };
66
- } else {
67
- comparison = compareRuntimes(currentRuntimeIndex, otherRuntimeIndex);
68
- otherRuntime = allRuntimes[otherRuntimeIndex];
69
- }
70
-
71
- let compareWord;
72
- if (comparison > 0) {
73
- compareWord = "an older";
74
- } else if (comparison < 0) {
75
- compareWord = "a newer";
76
- } else {
77
- compareWord = "the same";
78
- }
79
- message = `${message}\n\n"${currentRuntime.description}" failed to define ${Failures.get(otherRuntimeIndex)!.size} tag(s) as they were defined by a runtime of ${compareWord} version "${otherRuntime.description}": ${([...Failures.get(otherRuntimeIndex)!]).sort().join(", ")}.`;
80
-
81
- if (comparison > 0) {
82
- message = `${message}\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;
83
- } else {
84
- message = `${message}\nSince the above web components were defined by the same or newer version runtime, they should be compatible with your code.`;
85
- }
86
- });
87
-
88
- message = `${message}\n\nTo prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`;
89
-
90
- console.warn(message); // eslint-disable-line
91
- };
92
-
93
- export {
94
- registerTag,
95
- isTagRegistered,
96
- getAllRegisteredTags,
97
- recordTagRegistrationFailure,
98
- };
@@ -1,33 +0,0 @@
1
- import {
2
- html,
3
- svg,
4
- unsafeStatic,
5
- } from "lit-html/static.js";
6
-
7
- import {
8
- setCustomElementsScopingSuffix,
9
- getCustomElementsScopingSuffix,
10
- setCustomElementsScopingRules,
11
- getCustomElementsScopingRules,
12
- shouldScopeCustomElement,
13
- getEffectiveScopingSuffixForTag,
14
- } from "./CustomElementsScopeUtils.js";
15
- import { registerFeature } from "./FeaturesRegistry.js";
16
-
17
- class LitStatic {
18
- static html = html;
19
- static svg = svg;
20
- static unsafeStatic: (value: string) => object = unsafeStatic;
21
- }
22
-
23
- registerFeature("LitStatic", LitStatic);
24
-
25
- export {
26
- LitStatic,
27
- setCustomElementsScopingSuffix,
28
- getCustomElementsScopingSuffix,
29
- setCustomElementsScopingRules,
30
- getCustomElementsScopingRules,
31
- shouldScopeCustomElement,
32
- getEffectiveScopingSuffixForTag,
33
- };
@@ -1,115 +0,0 @@
1
- let suf: string;
2
-
3
- type Rules = {
4
- include: Array<RegExp>,
5
- exclude: Array<RegExp>,
6
- };
7
-
8
- let rulesObj: Rules = {
9
- include: [/^ui5-/],
10
- exclude: [],
11
- };
12
-
13
- const tagsCache = new Map<string, boolean>(); // true/false means the tag should/should not be cached, undefined means not known yet.
14
-
15
- /**
16
- * Sets the suffix to be used for custom elements scoping, f.e. pass "demo" to get tags such as "ui5-button-demo".
17
- * Note: by default all tags starting with "ui5-" will be scoped, unless you change this by calling "setCustomElementsScopingRules"
18
- *
19
- * @public
20
- * @param suffix The scoping suffix
21
- */
22
- const setCustomElementsScopingSuffix = (suffix: string) => {
23
- if (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {
24
- throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");
25
- }
26
-
27
- suf = suffix;
28
- };
29
-
30
- /**
31
- * Returns the currently set scoping suffix, or undefined if not set.
32
- *
33
- * @public
34
- * @returns {String|undefined}
35
- */
36
- const getCustomElementsScopingSuffix = () => {
37
- return suf;
38
- };
39
-
40
- /**
41
- * Sets the rules, governing which custom element tags to scope and which not, f.e.
42
- * setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);
43
- * will scope all elements starting with "ui5-" but not the ones starting with "ui5-mylib-" and not "ui5-carousel".
44
- *
45
- * @public
46
- * @param rules Object with "include" and "exclude" properties, both arrays of regular expressions. Note that "include"
47
- * rules are applied first and "exclude" rules second.
48
- */
49
- const setCustomElementsScopingRules = (rules: Rules) => {
50
- if (!rules || !rules.include) {
51
- throw new Error(`"rules" must be an object with at least an "include" property`);
52
- }
53
-
54
- if (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {
55
- throw new Error(`"rules.include" must be an array of regular expressions`);
56
- }
57
-
58
- if (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {
59
- throw new Error(`"rules.exclude" must be an array of regular expressions`);
60
- }
61
-
62
- rules.exclude = rules.exclude || [];
63
- rulesObj = rules;
64
- tagsCache.clear(); // reset the cache upon setting new rules
65
- };
66
-
67
- /**
68
- * Returns the rules, governing which custom element tags to scope and which not. By default, all elements
69
- * starting with "ui5-" are scoped. The default rules are: {include: [/^ui5-/]}.
70
- *
71
- * @public
72
- * @returns {Object}
73
- */
74
- const getCustomElementsScopingRules = () => {
75
- return rulesObj;
76
- };
77
-
78
- /**
79
- * Determines whether custom elements with the given tag should be scoped or not.
80
- * The tag is first matched against the "include" rules and then against the "exclude" rules and the
81
- * result is cached until new rules are set.
82
- *
83
- * @public
84
- * @param tag
85
- */
86
- const shouldScopeCustomElement = (tag: string) => {
87
- if (!tagsCache.has(tag)) {
88
- const result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));
89
- tagsCache.set(tag, result);
90
- }
91
-
92
- return tagsCache.get(tag);
93
- };
94
-
95
- /**
96
- * Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.
97
- *
98
- * @public
99
- * @param tag
100
- * @returns {String}
101
- */
102
- const getEffectiveScopingSuffixForTag = (tag: string) => {
103
- if (shouldScopeCustomElement(tag)) {
104
- return getCustomElementsScopingSuffix();
105
- }
106
- };
107
-
108
- export {
109
- setCustomElementsScopingSuffix,
110
- getCustomElementsScopingSuffix,
111
- setCustomElementsScopingRules,
112
- getCustomElementsScopingRules,
113
- shouldScopeCustomElement,
114
- getEffectiveScopingSuffixForTag,
115
- };
@@ -1,28 +0,0 @@
1
- const observers = new WeakMap<Node, MutationObserver>();
2
-
3
- /**
4
- * @param node
5
- * @param callback
6
- * @param options
7
- */
8
- const observeDOMNode = (node: Node, callback: MutationCallback, options?: MutationObserverInit) => {
9
- const observer = new MutationObserver(callback);
10
- observers.set(node, observer);
11
- observer.observe(node, options);
12
- };
13
-
14
- /**
15
- * @param node
16
- */
17
- const unobserveDOMNode = (node: Node) => {
18
- const observer = observers.get(node);
19
- if (observer) {
20
- observer.disconnect();
21
- observers.delete(node);
22
- }
23
- };
24
-
25
- export {
26
- observeDOMNode,
27
- unobserveDOMNode,
28
- };
package/src/Device.ts DELETED
@@ -1,124 +0,0 @@
1
- const ua = navigator.userAgent;
2
- const touch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
3
- const ie = /(msie|trident)/i.test(ua);
4
- const chrome = !ie && /(Chrome|CriOS)/.test(ua);
5
- const firefox = /Firefox/.test(ua);
6
- const safari = !ie && !chrome && /(Version|PhantomJS)\/(\d+\.\d+).*Safari/.test(ua);
7
- const webkit = !ie && /webkit/.test(ua);
8
- const windows = navigator.platform.indexOf("Win") !== -1;
9
- const iOS = !!(navigator.platform.match(/iPhone|iPad|iPod/)) || !!(navigator.userAgent.match(/Mac/) && "ontouchend" in document);
10
- const android = !windows && /Android/.test(ua);
11
- const androidPhone = android && /(?=android)(?=.*mobile)/i.test(ua);
12
- const ipad = /ipad/i.test(ua) || (/Macintosh/i.test(ua) && "ontouchend" in document);
13
- // With iOS 13 the string 'iPad' was removed from the user agent string through a browser setting, which is applied on all sites by default:
14
- // "Request Desktop Website -> All websites" (for more infos see: https://forums.developer.apple.com/thread/119186).
15
- // Therefore the OS is detected as MACINTOSH instead of iOS and the device is a tablet if the Device.support.touch is true.
16
-
17
- let windowsVersion: number;
18
- let webkitVersion: number;
19
- let tablet: boolean;
20
-
21
- const isWindows8OrAbove = () => {
22
- if (!windows) {
23
- return false;
24
- }
25
-
26
- if (windowsVersion === undefined) {
27
- const matches = ua.match(/Windows NT (\d+).(\d)/);
28
- windowsVersion = matches ? parseFloat(matches[1]) : 0;
29
- }
30
-
31
- return windowsVersion >= 8;
32
- };
33
-
34
- const isWebkit537OrAbove = () => {
35
- if (!webkit) {
36
- return false;
37
- }
38
-
39
- if (webkitVersion === undefined) {
40
- const matches = ua.match(/(webkit)[ /]([\w.]+)/);
41
- webkitVersion = matches ? parseFloat(matches[1]) : 0;
42
- }
43
-
44
- return webkitVersion >= 537.10;
45
- };
46
-
47
- const detectTablet = () => {
48
- if (tablet !== undefined) {
49
- return;
50
- }
51
-
52
- if (ipad) {
53
- tablet = true;
54
- return;
55
- }
56
-
57
- if (touch) {
58
- if (isWindows8OrAbove()) {
59
- tablet = true;
60
- return;
61
- }
62
-
63
- if (chrome && android) {
64
- tablet = !/Mobile Safari\/[.0-9]+/.test(ua);
65
- return;
66
- }
67
-
68
- let densityFactor = window.devicePixelRatio ? window.devicePixelRatio : 1; // may be undefined in Windows Phone devices
69
- if (android && isWebkit537OrAbove()) {
70
- densityFactor = 1;
71
- }
72
-
73
- tablet = (Math.min(window.screen.width / densityFactor, window.screen.height / densityFactor) >= 600);
74
- return;
75
- }
76
-
77
- tablet = (ie && ua.indexOf("Touch") !== -1) || (android && !androidPhone);
78
- };
79
-
80
- const supportsTouch = (): boolean => touch;
81
- const isIE = (): boolean => ie;
82
- const isSafari = (): boolean => safari;
83
- const isChrome = (): boolean => chrome;
84
- const isFirefox = (): boolean => firefox;
85
-
86
- const isTablet = (): boolean => {
87
- detectTablet();
88
- return (touch || isWindows8OrAbove()) && tablet;
89
- };
90
-
91
- const isPhone = (): boolean => {
92
- detectTablet();
93
- return touch && !tablet;
94
- };
95
-
96
- const isDesktop = (): boolean => {
97
- return (!isTablet() && !isPhone()) || isWindows8OrAbove();
98
- };
99
-
100
- const isCombi = (): boolean => {
101
- return isTablet() && isDesktop();
102
- };
103
-
104
- const isIOS = (): boolean => {
105
- return iOS;
106
- };
107
-
108
- const isAndroid = (): boolean => {
109
- return android || androidPhone;
110
- };
111
-
112
- export {
113
- supportsTouch,
114
- isIE,
115
- isSafari,
116
- isChrome,
117
- isFirefox,
118
- isPhone,
119
- isTablet,
120
- isDesktop,
121
- isCombi,
122
- isIOS,
123
- isAndroid,
124
- };
@@ -1,87 +0,0 @@
1
- class EventProvider<EventListenerParam, EventListenerReturn> {
2
- _eventRegistry: Map<string, Array<(param: EventListenerParam) => EventListenerReturn>>;
3
-
4
- constructor() {
5
- this._eventRegistry = new Map();
6
- }
7
-
8
- attachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {
9
- const eventRegistry = this._eventRegistry;
10
- const eventListeners = eventRegistry.get(eventName);
11
-
12
- if (!Array.isArray(eventListeners)) {
13
- eventRegistry.set(eventName, [fnFunction]);
14
- return;
15
- }
16
-
17
- if (!eventListeners.includes(fnFunction)) {
18
- eventListeners.push(fnFunction);
19
- }
20
- }
21
-
22
- detachEvent(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {
23
- const eventRegistry = this._eventRegistry;
24
- const eventListeners = eventRegistry.get(eventName);
25
-
26
- if (!eventListeners) {
27
- return;
28
- }
29
- const indexOfFnToDetach = eventListeners.indexOf(fnFunction);
30
-
31
- if (indexOfFnToDetach !== -1) {
32
- eventListeners.splice(indexOfFnToDetach, 1);
33
- }
34
-
35
- if (eventListeners.length === 0) {
36
- eventRegistry.delete(eventName);
37
- }
38
- }
39
-
40
- /**
41
- * Fires an event and returns the results of all event listeners as an array.
42
- *
43
- * @param eventName the event to fire
44
- * @param data optional data to pass to each event listener
45
- * @returns {Array} an array with the results of all event listeners
46
- */
47
- fireEvent(eventName: string, data: EventListenerParam) {
48
- const eventRegistry = this._eventRegistry;
49
- const eventListeners = eventRegistry.get(eventName);
50
-
51
- if (!eventListeners) {
52
- return [];
53
- }
54
-
55
- return eventListeners.map(fn => {
56
- return fn.call(this, data); // eslint-disable-line
57
- });
58
- }
59
-
60
- /**
61
- * Fires an event and returns a promise that will resolve once all listeners have resolved.
62
- *
63
- * @param eventName the event to fire
64
- * @param data optional data to pass to each event listener
65
- * @returns {Promise} a promise that will resolve when all listeners have resolved
66
- */
67
- fireEventAsync(eventName: string, data: EventListenerParam) {
68
- return Promise.all(this.fireEvent(eventName, data));
69
- }
70
-
71
- isHandlerAttached(eventName: string, fnFunction: (param: EventListenerParam) => EventListenerReturn) {
72
- const eventRegistry = this._eventRegistry;
73
- const eventListeners = eventRegistry.get(eventName);
74
-
75
- if (!eventListeners) {
76
- return false;
77
- }
78
-
79
- return eventListeners.includes(fnFunction);
80
- }
81
-
82
- hasListeners(eventName: string) {
83
- return !!this._eventRegistry.get(eventName);
84
- }
85
- }
86
-
87
- export default EventProvider;
@@ -1,14 +0,0 @@
1
- const features = new Map<string, any>();
2
-
3
- const registerFeature = (name: string, feature: object) => {
4
- features.set(name, feature);
5
- };
6
-
7
- const getFeature = <T>(name: string): T => {
8
- return features.get(name) as T;
9
- };
10
-
11
- export {
12
- registerFeature,
13
- getFeature,
14
- };
package/src/FontFace.ts DELETED
@@ -1,31 +0,0 @@
1
- import { hasStyle, createStyle } from "./ManagedStyles.js";
2
- import { getFeature } from "./FeaturesRegistry.js";
3
- import fontFaceCSS from "./generated/css/FontFace.css.js";
4
- import overrideFontFaceCSS from "./generated/css/OverrideFontFace.css.js";
5
- import type OpenUI5Support from "./features/OpenUI5Support.js";
6
-
7
- const insertFontFace = () => {
8
- const openUI5Support = getFeature<typeof OpenUI5Support>("OpenUI5Support");
9
-
10
- // Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded
11
- if (!openUI5Support || !openUI5Support.isLoaded()) {
12
- insertMainFontFace();
13
- }
14
-
15
- // Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font
16
- insertOverrideFontFace();
17
- };
18
-
19
- const insertMainFontFace = () => {
20
- if (!hasStyle("data-ui5-font-face")) {
21
- createStyle(fontFaceCSS, "data-ui5-font-face");
22
- }
23
- };
24
-
25
- const insertOverrideFontFace = () => {
26
- if (!hasStyle("data-ui5-font-face-override")) {
27
- createStyle(overrideFontFaceCSS, "data-ui5-font-face-override");
28
- }
29
- };
30
-
31
- export default insertFontFace;