@ui5/webcomponents-base 0.0.0-5b79982e1 → 0.0.0-5e31d3069

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 (702) hide show
  1. package/.eslintignore +8 -3
  2. package/.npsrc.json +3 -0
  3. package/CHANGELOG.md +614 -0
  4. package/README.md +53 -7
  5. package/bundle.esm.js +30 -22
  6. package/config/wdio.conf.cjs +400 -0
  7. package/dist/AssetRegistry.d.ts +5 -0
  8. package/dist/AssetRegistry.js +6 -12
  9. package/dist/AssetRegistry.js.map +1 -0
  10. package/dist/Boot.d.ts +9 -0
  11. package/dist/Boot.js +71 -0
  12. package/dist/Boot.js.map +1 -0
  13. package/dist/CSP.d.ts +30 -0
  14. package/dist/CSP.js +51 -0
  15. package/dist/CSP.js.map +1 -0
  16. package/dist/CustomElementsRegistry.d.ts +5 -0
  17. package/dist/CustomElementsRegistry.js +69 -30
  18. package/dist/CustomElementsRegistry.js.map +1 -0
  19. package/dist/CustomElementsScope.d.ts +7 -0
  20. package/dist/CustomElementsScope.js +11 -108
  21. package/dist/CustomElementsScope.js.map +1 -0
  22. package/dist/CustomElementsScopeUtils.d.ts +55 -0
  23. package/{src/CustomElementsScope.js → dist/CustomElementsScopeUtils.js} +34 -52
  24. package/dist/CustomElementsScopeUtils.js.map +1 -0
  25. package/dist/DOMObserver.d.ts +11 -0
  26. package/dist/DOMObserver.js +23 -0
  27. package/dist/DOMObserver.js.map +1 -0
  28. package/dist/Device.d.ts +12 -0
  29. package/dist/Device.js +159 -816
  30. package/dist/Device.js.map +1 -0
  31. package/dist/EventProvider.d.ts +25 -0
  32. package/dist/EventProvider.js +67 -78
  33. package/dist/EventProvider.js.map +1 -0
  34. package/dist/FeaturesRegistry.d.ts +3 -0
  35. package/dist/FeaturesRegistry.js +5 -7
  36. package/dist/FeaturesRegistry.js.map +1 -0
  37. package/dist/FontFace.d.ts +2 -0
  38. package/dist/FontFace.js +17 -110
  39. package/dist/FontFace.js.map +1 -0
  40. package/dist/InitialConfiguration.d.ts +27 -0
  41. package/dist/InitialConfiguration.js +124 -118
  42. package/dist/InitialConfiguration.js.map +1 -0
  43. package/dist/Keys.d.ts +57 -0
  44. package/dist/Keys.js +174 -217
  45. package/dist/Keys.js.map +1 -0
  46. package/dist/ManagedStyles.d.ts +8 -0
  47. package/dist/ManagedStyles.js +77 -0
  48. package/dist/ManagedStyles.js.map +1 -0
  49. package/dist/MarkedEvents.d.ts +9 -0
  50. package/dist/MarkedEvents.js +15 -0
  51. package/dist/MarkedEvents.js.map +1 -0
  52. package/dist/MediaRange.d.ts +37 -0
  53. package/dist/MediaRange.js +98 -0
  54. package/dist/MediaRange.js.map +1 -0
  55. package/dist/PropertiesFileFormat.d.ts +8 -0
  56. package/dist/PropertiesFileFormat.js +85 -0
  57. package/dist/PropertiesFileFormat.js.map +1 -0
  58. package/dist/Render.d.ts +47 -0
  59. package/dist/Render.js +143 -0
  60. package/dist/Render.js.map +1 -0
  61. package/dist/RenderQueue.d.ts +19 -0
  62. package/dist/RenderQueue.js +52 -62
  63. package/dist/RenderQueue.js.map +1 -0
  64. package/dist/Runtimes.d.ts +27 -0
  65. package/dist/Runtimes.js +86 -0
  66. package/dist/Runtimes.js.map +1 -0
  67. package/dist/StaticArea.d.ts +3 -0
  68. package/dist/StaticArea.js +4 -28
  69. package/dist/StaticArea.js.map +1 -0
  70. package/dist/StaticAreaItem.d.ts +36 -0
  71. package/dist/StaticAreaItem.js +92 -101
  72. package/dist/StaticAreaItem.js.map +1 -0
  73. package/dist/SystemCSSVars.d.ts +2 -0
  74. package/dist/SystemCSSVars.js +6 -28
  75. package/dist/SystemCSSVars.js.map +1 -0
  76. package/{src/Theming.js → dist/Theming.d.ts} +0 -1
  77. package/dist/Theming.js +1 -1
  78. package/dist/Theming.js.map +1 -0
  79. package/dist/UI5Element.d.ts +378 -0
  80. package/dist/UI5Element.js +924 -1144
  81. package/dist/UI5Element.js.map +1 -0
  82. package/dist/UI5ElementMetadata.d.ts +150 -0
  83. package/dist/UI5ElementMetadata.js +278 -267
  84. package/dist/UI5ElementMetadata.js.map +1 -0
  85. package/dist/animations/AnimationQueue.d.ts +8 -0
  86. package/dist/animations/AnimationQueue.js +31 -38
  87. package/dist/animations/AnimationQueue.js.map +1 -0
  88. package/dist/animations/animate.d.ts +14 -0
  89. package/dist/animations/animate.js +46 -51
  90. package/dist/animations/animate.js.map +1 -0
  91. package/dist/animations/scroll.d.ts +5 -0
  92. package/dist/animations/scroll.js +18 -27
  93. package/dist/animations/scroll.js.map +1 -0
  94. package/dist/animations/slideDown.d.ts +5 -0
  95. package/dist/animations/slideDown.js +53 -78
  96. package/dist/animations/slideDown.js.map +1 -0
  97. package/dist/animations/slideUp.d.ts +5 -0
  98. package/dist/animations/slideUp.js +49 -70
  99. package/dist/animations/slideUp.js.map +1 -0
  100. package/dist/api.json +1 -0
  101. package/dist/asset-registries/Icons.d.ts +38 -0
  102. package/dist/asset-registries/Icons.js +125 -32
  103. package/dist/asset-registries/Icons.js.map +1 -0
  104. package/dist/asset-registries/Illustrations.d.ts +17 -0
  105. package/dist/asset-registries/Illustrations.js +46 -0
  106. package/dist/asset-registries/Illustrations.js.map +1 -0
  107. package/dist/asset-registries/LocaleData.d.ts +7 -0
  108. package/dist/asset-registries/LocaleData.js +119 -118
  109. package/dist/asset-registries/LocaleData.js.map +1 -0
  110. package/dist/asset-registries/Themes.d.ts +11 -0
  111. package/dist/asset-registries/Themes.js +41 -77
  112. package/dist/asset-registries/Themes.js.map +1 -0
  113. package/dist/asset-registries/i18n.d.ts +23 -0
  114. package/dist/asset-registries/i18n.js +77 -86
  115. package/dist/asset-registries/i18n.js.map +1 -0
  116. package/dist/assets/Boot.34b7cea0.css +1 -0
  117. package/dist/assets/Boot.8220f4ab.js +9 -0
  118. package/dist/assets/bundle.esm.efe1daa8.js +50 -0
  119. package/dist/assets-meta/IconCollectionsAlias.d.ts +31 -0
  120. package/dist/assets-meta/IconCollectionsAlias.js +38 -0
  121. package/dist/assets-meta/IconCollectionsAlias.js.map +1 -0
  122. package/dist/config/AnimationMode.d.ts +14 -0
  123. package/dist/config/AnimationMode.js +21 -18
  124. package/dist/config/AnimationMode.js.map +1 -0
  125. package/dist/config/CalendarType.d.ts +8 -0
  126. package/dist/config/CalendarType.js +13 -12
  127. package/dist/config/CalendarType.js.map +1 -0
  128. package/dist/config/FormatSettings.d.ts +15 -0
  129. package/dist/config/FormatSettings.js +15 -9
  130. package/dist/config/FormatSettings.js.map +1 -0
  131. package/dist/config/Icons.d.ts +55 -0
  132. package/dist/config/Icons.js +103 -0
  133. package/dist/config/Icons.js.map +1 -0
  134. package/dist/config/Language.d.ts +40 -0
  135. package/dist/config/Language.js +49 -51
  136. package/dist/config/Language.js.map +1 -0
  137. package/dist/config/NoConflict.d.ts +20 -0
  138. package/dist/config/NoConflict.js +41 -41
  139. package/dist/config/NoConflict.js.map +1 -0
  140. package/dist/config/RTL.d.ts +7 -0
  141. package/dist/config/RTL.js +26 -20
  142. package/dist/config/RTL.js.map +1 -0
  143. package/dist/config/Theme.d.ts +38 -0
  144. package/dist/config/Theme.js +64 -22
  145. package/dist/config/Theme.js.map +1 -0
  146. package/dist/config/ThemeRoots.d.ts +4 -0
  147. package/dist/config/ThemeRoots.js +28 -0
  148. package/dist/config/ThemeRoots.js.map +1 -0
  149. package/dist/config/Timezone.d.ts +17 -0
  150. package/dist/config/Timezone.js +30 -0
  151. package/dist/config/Timezone.js.map +1 -0
  152. package/dist/css/BusyIndicator.css +80 -0
  153. package/dist/css/FontFace.css +66 -0
  154. package/dist/css/OverrideFontFace.css +32 -0
  155. package/dist/css/SystemCSSVars.css +17 -0
  156. package/dist/decorators/customElement.d.ts +23 -0
  157. package/dist/decorators/customElement.js +37 -0
  158. package/dist/decorators/customElement.js.map +1 -0
  159. package/dist/decorators/event.d.ts +10 -0
  160. package/dist/decorators/event.js +24 -0
  161. package/dist/decorators/event.js.map +1 -0
  162. package/dist/decorators/property.d.ts +9 -0
  163. package/dist/decorators/property.js +24 -0
  164. package/dist/decorators/property.js.map +1 -0
  165. package/dist/decorators/slot.d.ts +9 -0
  166. package/dist/decorators/slot.js +37 -0
  167. package/dist/decorators/slot.js.map +1 -0
  168. package/dist/delegate/ItemNavigation.d.ts +113 -0
  169. package/dist/delegate/ItemNavigation.js +280 -277
  170. package/dist/delegate/ItemNavigation.js.map +1 -0
  171. package/dist/delegate/ResizeHandler.d.ts +25 -0
  172. package/dist/delegate/ResizeHandler.js +84 -62
  173. package/dist/delegate/ResizeHandler.js.map +1 -0
  174. package/dist/delegate/ScrollEnablement.d.ts +49 -0
  175. package/dist/delegate/ScrollEnablement.js +159 -176
  176. package/dist/delegate/ScrollEnablement.js.map +1 -0
  177. package/dist/features/F6Navigation.d.ts +19 -0
  178. package/dist/features/F6Navigation.js +151 -0
  179. package/dist/features/F6Navigation.js.map +1 -0
  180. package/dist/features/LegacyDateFormats.d.ts +18 -0
  181. package/dist/features/LegacyDateFormats.js +20 -0
  182. package/dist/features/LegacyDateFormats.js.map +1 -0
  183. package/dist/features/OpenUI5Element.d.ts +9 -0
  184. package/dist/features/OpenUI5Element.js +5 -0
  185. package/dist/features/OpenUI5Element.js.map +1 -0
  186. package/dist/features/OpenUI5Enablement.d.ts +11 -0
  187. package/dist/features/OpenUI5Enablement.js +96 -0
  188. package/dist/features/OpenUI5Enablement.js.map +1 -0
  189. package/dist/features/OpenUI5Support.d.ts +26 -0
  190. package/dist/features/OpenUI5Support.js +95 -86
  191. package/dist/features/OpenUI5Support.js.map +1 -0
  192. package/dist/generated/AssetParameters.js +3 -1
  193. package/dist/generated/VersionInfo.js +10 -0
  194. package/dist/generated/css/BusyIndicator.css.d.ts +3 -0
  195. package/dist/generated/css/BusyIndicator.css.js +7 -0
  196. package/dist/generated/css/BusyIndicator.css.js.map +1 -0
  197. package/dist/generated/css/FontFace.css.d.ts +3 -0
  198. package/dist/generated/css/FontFace.css.js +7 -0
  199. package/dist/generated/css/FontFace.css.js.map +1 -0
  200. package/dist/generated/css/OverrideFontFace.css.d.ts +3 -0
  201. package/dist/generated/css/OverrideFontFace.css.js +7 -0
  202. package/dist/generated/css/OverrideFontFace.css.js.map +1 -0
  203. package/dist/generated/css/SystemCSSVars.css.d.ts +3 -0
  204. package/dist/generated/css/SystemCSSVars.css.js +7 -0
  205. package/dist/generated/css/SystemCSSVars.css.js.map +1 -0
  206. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +11 -0
  207. package/dist/getSharedResource.d.ts +11 -0
  208. package/dist/getSharedResource.js +22 -18
  209. package/dist/getSharedResource.js.map +1 -0
  210. package/dist/global.d.ts +40 -0
  211. package/dist/i18nBundle.d.ts +43 -0
  212. package/dist/i18nBundle.js +68 -42
  213. package/dist/i18nBundle.js.map +1 -0
  214. package/dist/locale/Locale.d.ts +22 -0
  215. package/dist/locale/Locale.js +75 -87
  216. package/dist/locale/Locale.js.map +1 -0
  217. package/dist/locale/RTLAwareRegistry.d.ts +4 -0
  218. package/dist/locale/RTLAwareRegistry.js +6 -11
  219. package/dist/locale/RTLAwareRegistry.js.map +1 -0
  220. package/dist/locale/applyDirection.d.ts +10 -0
  221. package/dist/locale/applyDirection.js +8 -9
  222. package/dist/locale/applyDirection.js.map +1 -0
  223. package/dist/locale/directionChange.d.ts +15 -0
  224. package/dist/locale/directionChange.js +7 -15
  225. package/dist/locale/directionChange.js.map +1 -0
  226. package/dist/locale/getEffectiveDir.d.ts +2 -0
  227. package/dist/locale/getEffectiveDir.js +24 -0
  228. package/dist/locale/getEffectiveDir.js.map +1 -0
  229. package/dist/locale/getLocale.d.ts +7 -0
  230. package/dist/locale/getLocale.js +26 -29
  231. package/dist/locale/getLocale.js.map +1 -0
  232. package/dist/locale/languageChange.d.ts +5 -0
  233. package/dist/locale/languageChange.js +8 -16
  234. package/dist/locale/languageChange.js.map +1 -0
  235. package/dist/locale/nextFallbackLocale.d.ts +8 -0
  236. package/dist/locale/nextFallbackLocale.js +15 -19
  237. package/dist/locale/nextFallbackLocale.js.map +1 -0
  238. package/dist/locale/normalizeLocale.d.ts +7 -0
  239. package/dist/locale/normalizeLocale.js +34 -41
  240. package/dist/locale/normalizeLocale.js.map +1 -0
  241. package/dist/renderer/LitRenderer.d.ts +14 -0
  242. package/dist/renderer/LitRenderer.js +34 -24
  243. package/dist/renderer/LitRenderer.js.map +1 -0
  244. package/dist/renderer/directives/style-map.js +72 -0
  245. package/dist/renderer/executeTemplate.d.ts +13 -0
  246. package/dist/renderer/executeTemplate.js +20 -7
  247. package/dist/renderer/executeTemplate.js.map +1 -0
  248. package/dist/sap/base/Log.js +240 -0
  249. package/dist/sap/base/assert.js +7 -0
  250. package/dist/sap/base/security/URLListValidator.js +159 -0
  251. package/dist/sap/base/security/encodeCSS.js +14 -0
  252. package/dist/sap/base/security/encodeXML.js +23 -0
  253. package/dist/sap/base/security/sanitizeHTML.js +16 -0
  254. package/dist/sap/base/strings/toHex.js +8 -0
  255. package/dist/sap/base/util/now.js +7 -0
  256. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +3585 -0
  257. package/dist/theming/CustomStyle.d.ts +6 -0
  258. package/dist/theming/CustomStyle.js +40 -32
  259. package/dist/theming/CustomStyle.js.map +1 -0
  260. package/dist/theming/ThemeLoaded.d.ts +5 -0
  261. package/dist/theming/ThemeLoaded.js +8 -16
  262. package/dist/theming/ThemeLoaded.js.map +1 -0
  263. package/dist/theming/ThemeRegistered.d.ts +4 -0
  264. package/dist/theming/ThemeRegistered.js +11 -0
  265. package/dist/theming/ThemeRegistered.js.map +1 -0
  266. package/dist/theming/applyTheme.d.ts +2 -0
  267. package/dist/theming/applyTheme.js +62 -71
  268. package/dist/theming/applyTheme.js.map +1 -0
  269. package/dist/theming/getConstructableStyle.d.ts +9 -0
  270. package/dist/theming/getConstructableStyle.js +13 -17
  271. package/dist/theming/getConstructableStyle.js.map +1 -0
  272. package/dist/theming/getEffectiveLinksHrefs.d.ts +3 -0
  273. package/dist/theming/getEffectiveLinksHrefs.js +17 -0
  274. package/dist/theming/getEffectiveLinksHrefs.js.map +1 -0
  275. package/dist/theming/getEffectiveStyle.d.ts +3 -0
  276. package/dist/theming/getEffectiveStyle.js +26 -17
  277. package/dist/theming/getEffectiveStyle.js.map +1 -0
  278. package/dist/theming/getStylesString.d.ts +3 -0
  279. package/dist/theming/getStylesString.js +9 -11
  280. package/dist/theming/getStylesString.js.map +1 -0
  281. package/dist/theming/getThemeDesignerTheme.d.ts +7 -0
  282. package/dist/theming/getThemeDesignerTheme.js +73 -60
  283. package/dist/theming/getThemeDesignerTheme.js.map +1 -0
  284. package/dist/theming/preloadLinks.d.ts +3 -0
  285. package/dist/theming/preloadLinks.js +19 -0
  286. package/dist/theming/preloadLinks.js.map +1 -0
  287. package/dist/thirdparty/_merge.d.ts +2 -0
  288. package/dist/thirdparty/_merge.js +7 -4
  289. package/dist/thirdparty/_merge.js.map +1 -0
  290. package/dist/thirdparty/isPlainObject.d.ts +2 -0
  291. package/dist/thirdparty/isPlainObject.js +11 -10
  292. package/dist/thirdparty/isPlainObject.js.map +1 -0
  293. package/dist/thirdparty/merge.d.ts +2 -0
  294. package/dist/thirdparty/merge.js +4 -8
  295. package/dist/thirdparty/merge.js.map +1 -0
  296. package/dist/types/AnimationMode.d.ts +32 -0
  297. package/dist/types/AnimationMode.js +33 -6
  298. package/dist/types/AnimationMode.js.map +1 -0
  299. package/dist/types/CSSColor.d.ts +15 -0
  300. package/dist/types/CSSColor.js +18 -0
  301. package/dist/types/CSSColor.js.map +1 -0
  302. package/dist/types/CalendarType.d.ts +37 -0
  303. package/dist/types/CalendarType.js +35 -18
  304. package/dist/types/CalendarType.js.map +1 -0
  305. package/dist/types/DOMReference.d.ts +17 -0
  306. package/dist/types/DOMReference.js +25 -0
  307. package/dist/types/DOMReference.js.map +1 -0
  308. package/dist/types/DataType.d.ts +25 -0
  309. package/dist/types/DataType.js +33 -14
  310. package/dist/types/DataType.js.map +1 -0
  311. package/dist/types/Float.d.ts +17 -0
  312. package/dist/types/Float.js +17 -6
  313. package/dist/types/Float.js.map +1 -0
  314. package/dist/types/Integer.d.ts +17 -0
  315. package/dist/types/Integer.js +17 -5
  316. package/dist/types/Integer.js.map +1 -0
  317. package/dist/types/InvisibleMessageMode.d.ts +25 -0
  318. package/dist/types/InvisibleMessageMode.js +27 -0
  319. package/dist/types/InvisibleMessageMode.js.map +1 -0
  320. package/dist/types/ItemNavigationBehavior.d.ts +24 -0
  321. package/dist/types/ItemNavigationBehavior.js +22 -12
  322. package/dist/types/ItemNavigationBehavior.js.map +1 -0
  323. package/dist/types/NavigationMode.d.ts +32 -0
  324. package/dist/types/NavigationMode.js +33 -6
  325. package/dist/types/NavigationMode.js.map +1 -0
  326. package/dist/types/ValueState.d.ts +42 -0
  327. package/dist/types/ValueState.js +41 -19
  328. package/dist/types/ValueState.js.map +1 -0
  329. package/dist/types.d.ts +18 -0
  330. package/dist/types.js +2 -0
  331. package/dist/types.js.map +1 -0
  332. package/dist/updateShadowRoot.d.ts +8 -0
  333. package/dist/updateShadowRoot.js +38 -0
  334. package/dist/updateShadowRoot.js.map +1 -0
  335. package/dist/util/AriaLabelHelper.d.ts +15 -0
  336. package/dist/util/AriaLabelHelper.js +166 -36
  337. package/dist/util/AriaLabelHelper.js.map +1 -0
  338. package/dist/util/Caret.d.ts +7 -0
  339. package/dist/util/Caret.js +16 -38
  340. package/dist/util/Caret.js.map +1 -0
  341. package/dist/util/ColorConversion.d.ts +30 -0
  342. package/dist/util/ColorConversion.js +337 -0
  343. package/dist/util/ColorConversion.js.map +1 -0
  344. package/dist/util/FetchHelper.d.ts +3 -0
  345. package/dist/util/FetchHelper.js +19 -25
  346. package/dist/util/FetchHelper.js.map +1 -0
  347. package/dist/util/FocusableElements.d.ts +4 -0
  348. package/dist/util/FocusableElements.js +67 -68
  349. package/dist/util/FocusableElements.js.map +1 -0
  350. package/dist/util/HTMLSanitizer.d.ts +3 -0
  351. package/dist/util/HTMLSanitizer.js +6 -0
  352. package/dist/util/HTMLSanitizer.js.map +1 -0
  353. package/dist/util/InvisibleMessage.d.ts +10 -0
  354. package/dist/util/InvisibleMessage.js +56 -0
  355. package/dist/util/InvisibleMessage.js.map +1 -0
  356. package/dist/util/PopupUtils.d.ts +7 -0
  357. package/dist/util/PopupUtils.js +74 -0
  358. package/dist/util/PopupUtils.js.map +1 -0
  359. package/dist/util/SlotsHelper.d.ts +9 -0
  360. package/dist/util/SlotsHelper.js +30 -0
  361. package/dist/util/SlotsHelper.js.map +1 -0
  362. package/dist/util/StringHelper.d.ts +3 -0
  363. package/dist/util/StringHelper.js +17 -20
  364. package/dist/util/StringHelper.js.map +1 -0
  365. package/dist/util/TabbableElements.d.ts +17 -0
  366. package/dist/util/TabbableElements.js +53 -43
  367. package/dist/util/TabbableElements.js.map +1 -0
  368. package/dist/util/arraysAreEqual.d.ts +2 -0
  369. package/dist/util/arraysAreEqual.js +10 -12
  370. package/dist/util/arraysAreEqual.js.map +1 -0
  371. package/dist/util/clamp.d.ts +9 -0
  372. package/dist/util/clamp.js +12 -0
  373. package/dist/util/clamp.js.map +1 -0
  374. package/dist/util/createLinkInHead.d.ts +7 -0
  375. package/dist/util/createLinkInHead.js +21 -0
  376. package/dist/util/createLinkInHead.js.map +1 -0
  377. package/dist/util/createStyleInHead.d.ts +8 -0
  378. package/dist/util/createStyleInHead.js +10 -10
  379. package/dist/util/createStyleInHead.js.map +1 -0
  380. package/dist/util/debounce.d.ts +2 -0
  381. package/dist/util/debounce.js +15 -0
  382. package/dist/util/debounce.js.map +1 -0
  383. package/dist/util/detectNavigatorLanguage.d.ts +2 -0
  384. package/dist/util/detectNavigatorLanguage.js +7 -10
  385. package/dist/util/detectNavigatorLanguage.js.map +1 -0
  386. package/dist/util/escapeRegex.d.ts +8 -0
  387. package/dist/util/escapeRegex.js +11 -0
  388. package/dist/util/escapeRegex.js.map +1 -0
  389. package/dist/util/formatMessage.d.ts +2 -0
  390. package/dist/util/formatMessage.js +15 -19
  391. package/dist/util/formatMessage.js.map +1 -0
  392. package/dist/util/generateHighlightedMarkup.d.ts +9 -0
  393. package/dist/util/generateHighlightedMarkup.js +41 -0
  394. package/dist/util/generateHighlightedMarkup.js.map +1 -0
  395. package/dist/util/getActiveElement.d.ts +2 -0
  396. package/dist/util/getActiveElement.js +6 -8
  397. package/dist/util/getActiveElement.js.map +1 -0
  398. package/dist/util/getClassCopy.d.ts +398 -0
  399. package/dist/util/getClassCopy.js +10 -0
  400. package/dist/util/getClassCopy.js.map +1 -0
  401. package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -0
  402. package/dist/util/getDesigntimePropertyAsArray.js +4 -3
  403. package/dist/util/getDesigntimePropertyAsArray.js.map +1 -0
  404. package/dist/util/getEffectiveContentDensity.d.ts +2 -0
  405. package/dist/util/getEffectiveContentDensity.js +4 -0
  406. package/dist/util/getEffectiveContentDensity.js.map +1 -0
  407. package/dist/util/getEffectiveScrollbarStyle.d.ts +2 -0
  408. package/dist/util/getEffectiveScrollbarStyle.js +4 -0
  409. package/dist/util/getEffectiveScrollbarStyle.js.map +1 -0
  410. package/dist/util/getFastNavigationGroups.d.ts +2 -0
  411. package/dist/util/getFastNavigationGroups.js +51 -0
  412. package/dist/util/getFastNavigationGroups.js.map +1 -0
  413. package/{src/util/getFileExtension.js → dist/util/getFileExtension.d.ts} +3 -12
  414. package/dist/util/getFileExtension.js +9 -11
  415. package/dist/util/getFileExtension.js.map +1 -0
  416. package/dist/util/getNormalizedTarget.d.ts +7 -0
  417. package/dist/util/getNormalizedTarget.js +14 -0
  418. package/dist/util/getNormalizedTarget.js.map +1 -0
  419. package/dist/util/getSingletonElementInstance.d.ts +2 -0
  420. package/dist/util/getSingletonElementInstance.js +7 -10
  421. package/dist/util/getSingletonElementInstance.js.map +1 -0
  422. package/dist/util/isElementClickable.d.ts +2 -0
  423. package/dist/util/isElementClickable.js +16 -0
  424. package/dist/util/isElementClickable.js.map +1 -0
  425. package/dist/util/isElementHidden.d.ts +2 -0
  426. package/dist/util/isElementHidden.js +8 -0
  427. package/dist/util/isElementHidden.js.map +1 -0
  428. package/dist/util/isElementInView.d.ts +6 -0
  429. package/dist/util/isElementInView.js +12 -0
  430. package/dist/util/isElementInView.js.map +1 -0
  431. package/dist/util/isElementTabbable.d.ts +9 -0
  432. package/dist/util/isElementTabbable.js +30 -0
  433. package/dist/util/isElementTabbable.js.map +1 -0
  434. package/dist/util/isValidPropertyName.d.ts +8 -0
  435. package/dist/util/isValidPropertyName.js +16 -17
  436. package/dist/util/isValidPropertyName.js.map +1 -0
  437. package/dist/util/whenDOMReady.d.ts +2 -0
  438. package/dist/util/whenDOMReady.js +11 -10
  439. package/dist/util/whenDOMReady.js.map +1 -0
  440. package/dist/util/willShowContent.d.ts +2 -0
  441. package/dist/util/willShowContent.js +7 -0
  442. package/dist/util/willShowContent.js.map +1 -0
  443. package/dist/validateThemeRoot.d.ts +2 -0
  444. package/dist/validateThemeRoot.js +48 -0
  445. package/dist/validateThemeRoot.js.map +1 -0
  446. package/index.js +228 -2
  447. package/lib/generate-asset-parameters/index.js +11 -6
  448. package/lib/generate-styles/index.js +31 -0
  449. package/lib/generate-version-info/index.js +32 -0
  450. package/package-scripts.cjs +71 -0
  451. package/package.json +21 -13
  452. package/src/css/BusyIndicator.css +80 -0
  453. package/src/css/FontFace.css +66 -0
  454. package/src/css/OverrideFontFace.css +32 -0
  455. package/src/css/SystemCSSVars.css +17 -0
  456. package/src/renderer/directives/style-map.js +72 -0
  457. package/tsconfig.json +14 -0
  458. package/used-modules.txt +10 -0
  459. package/bundle.es5.js +0 -28
  460. package/config/rollup.config.js +0 -1
  461. package/config/wdio.conf.js +0 -1
  462. package/dist/RenderScheduler.js +0 -169
  463. package/dist/SVGIconRegistry.js +0 -73
  464. package/dist/animations/config.js +0 -5
  465. package/dist/boot.js +0 -34
  466. package/dist/compatibility/DOMObserver.js +0 -62
  467. package/dist/compatibility/patchNodeValue.js +0 -24
  468. package/dist/compatibility/whenPolyfillLoaded.js +0 -26
  469. package/dist/config/AssetsPath.js +0 -17
  470. package/dist/delegate/CustomResize.js +0 -78
  471. package/dist/delegate/NativeResize.js +0 -45
  472. package/dist/features/PropertiesFormatSupport.js +0 -8
  473. package/dist/features/browsersupport/Edge.js +0 -6
  474. package/dist/features/browsersupport/IE11.js +0 -43
  475. package/dist/features/browsersupport/IE11WithWebComponentsPolyfill.js +0 -5
  476. package/dist/renderer/ifDefined.js +0 -21
  477. package/dist/renderer/scopeHTML.js +0 -32
  478. package/dist/resources/bundle.es5.js +0 -225
  479. package/dist/resources/bundle.es5.js.map +0 -1
  480. package/dist/resources/bundle.esm.js +0 -129
  481. package/dist/resources/bundle.esm.js.map +0 -1
  482. package/dist/test-resources/assets/Themes.js +0 -17
  483. package/dist/test-resources/elements/Child.js +0 -35
  484. package/dist/test-resources/elements/Generic.js +0 -84
  485. package/dist/test-resources/elements/GenericExt.js +0 -26
  486. package/dist/test-resources/elements/NoShadowDOM.js +0 -13
  487. package/dist/test-resources/elements/Parent.js +0 -41
  488. package/dist/test-resources/elements/WithStaticArea.js +0 -76
  489. package/dist/test-resources/pages/AllTestElements.html +0 -42
  490. package/dist/test-resources/pages/Configuration.html +0 -20
  491. package/dist/test-resources/pages/ConfigurationScript.html +0 -36
  492. package/dist/test-resources/pages/assets/messagebundle_de.properties +0 -1
  493. package/dist/test-resources/pages/assets/messagebundle_en.properties +0 -1
  494. package/dist/test-resources/pages/assets/messagebundle_es.properties +0 -1
  495. package/dist/test-resources/pages/assets/messagebundle_fr.properties +0 -1
  496. package/dist/test-resources/pages/i18n.html +0 -40
  497. package/dist/test-resources/specs/ConfigurationChange.spec.js +0 -25
  498. package/dist/test-resources/specs/ConfigurationScript.spec.js +0 -61
  499. package/dist/test-resources/specs/ConfigurationURL.spec.js +0 -45
  500. package/dist/test-resources/specs/CustomTheme.spec.js +0 -25
  501. package/dist/test-resources/specs/StaticArea.spec.js +0 -34
  502. package/dist/test-resources/specs/Theming.spec.js +0 -31
  503. package/dist/test-resources/specs/UI5ElementInvalidation.js +0 -240
  504. package/dist/test-resources/specs/UI5ElementLifecycle.js +0 -96
  505. package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +0 -73
  506. package/dist/test-resources/specs/UI5ElementMetadataExt.js +0 -40
  507. package/dist/test-resources/specs/UI5ElementPropertyValidation.js +0 -12
  508. package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +0 -65
  509. package/dist/test-resources/specs/UI5ElementShadowDOM.js +0 -22
  510. package/dist/test-resources/specs/UI5ElementSlots.js +0 -34
  511. package/dist/theming/CSSVarsPonyfill.js +0 -68
  512. package/dist/theming/adaptCSSForIE.js +0 -95
  513. package/dist/theming/createComponentStyleTag.js +0 -54
  514. package/dist/theming/createThemePropertiesStyleTag.js +0 -20
  515. package/dist/thirdparty/Array.from.js +0 -16
  516. package/dist/thirdparty/Array.prototype.fill.js +0 -44
  517. package/dist/thirdparty/Array.prototype.find.js +0 -46
  518. package/dist/thirdparty/Array.prototype.findIndex.js +0 -46
  519. package/dist/thirdparty/Array.prototype.includes.js +0 -51
  520. package/dist/thirdparty/Element.prototype.closest.js +0 -11
  521. package/dist/thirdparty/Element.prototype.matches.js +0 -6
  522. package/dist/thirdparty/Map.prototype.keys.js +0 -9
  523. package/dist/thirdparty/Number.isInteger.js +0 -5
  524. package/dist/thirdparty/Number.isNaN.js +0 -1
  525. package/dist/thirdparty/Number.parseFloat.js +0 -1
  526. package/dist/thirdparty/Number.parseInt.js +0 -1
  527. package/dist/thirdparty/Object.assign.js +0 -31
  528. package/dist/thirdparty/Object.entries.js +0 -11
  529. package/dist/thirdparty/Symbol.js +0 -2
  530. package/dist/thirdparty/WeakSet.js +0 -27
  531. package/dist/thirdparty/es6-string-methods.js +0 -182
  532. package/dist/thirdparty/events-polyfills.js +0 -89
  533. package/dist/thirdparty/fetch.js +0 -1
  534. package/dist/thirdparty/template.js +0 -600
  535. package/dist/thirdparty/webcomponents-sd-ce-pf.js +0 -318
  536. package/dist/types/CSSSize.js +0 -9
  537. package/dist/types/PopupState.js +0 -37
  538. package/dist/util/EffectiveAssetPath.js +0 -27
  539. package/dist/util/encodeCSS.js +0 -24
  540. package/dist/util/findNodeOwner.js +0 -35
  541. package/dist/util/isDescendantOf.js +0 -15
  542. package/dist/util/isNodeClickable.js +0 -19
  543. package/dist/util/isNodeHidden.js +0 -9
  544. package/dist/util/isNodeTabbable.js +0 -28
  545. package/dist/util/isSlot.js +0 -3
  546. package/dist/util/parseProperties.js +0 -89
  547. package/dist/util/setToArray.js +0 -10
  548. package/dist/webcomponentsjs/LICENSE.md +0 -19
  549. package/dist/webcomponentsjs/README.md +0 -229
  550. package/dist/webcomponentsjs/bundles/webcomponents-ce.js +0 -63
  551. package/dist/webcomponentsjs/bundles/webcomponents-ce.js.map +0 -1
  552. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +0 -297
  553. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +0 -1
  554. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js +0 -208
  555. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +0 -1
  556. package/dist/webcomponentsjs/bundles/webcomponents-sd.js +0 -166
  557. package/dist/webcomponentsjs/bundles/webcomponents-sd.js.map +0 -1
  558. package/dist/webcomponentsjs/custom-elements-es5-adapter.js +0 -15
  559. package/dist/webcomponentsjs/package.json +0 -46
  560. package/dist/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +0 -16
  561. package/dist/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +0 -53
  562. package/dist/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +0 -17
  563. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +0 -19
  564. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +0 -28
  565. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +0 -18
  566. package/dist/webcomponentsjs/webcomponents-bundle.js +0 -298
  567. package/dist/webcomponentsjs/webcomponents-bundle.js.map +0 -1
  568. package/dist/webcomponentsjs/webcomponents-loader.js +0 -185
  569. package/package-scripts.js +0 -47
  570. package/src/AssetRegistry.js +0 -12
  571. package/src/CustomElementsRegistry.js +0 -39
  572. package/src/Device.js +0 -823
  573. package/src/EventProvider.js +0 -81
  574. package/src/FeaturesRegistry.js +0 -11
  575. package/src/FontFace.js +0 -118
  576. package/src/InitialConfiguration.js +0 -150
  577. package/src/Keys.js +0 -221
  578. package/src/RenderQueue.js +0 -66
  579. package/src/RenderScheduler.js +0 -169
  580. package/src/SVGIconRegistry.js +0 -73
  581. package/src/StaticArea.js +0 -31
  582. package/src/StaticAreaItem.js +0 -108
  583. package/src/SystemCSSVars.js +0 -31
  584. package/src/UI5Element.js +0 -1175
  585. package/src/UI5ElementMetadata.js +0 -280
  586. package/src/animations/AnimationQueue.js +0 -42
  587. package/src/animations/animate.js +0 -53
  588. package/src/animations/config.js +0 -5
  589. package/src/animations/scroll.js +0 -28
  590. package/src/animations/slideDown.js +0 -79
  591. package/src/animations/slideUp.js +0 -71
  592. package/src/asset-registries/Icons.js +0 -32
  593. package/src/asset-registries/LocaleData.js +0 -135
  594. package/src/asset-registries/Themes.js +0 -88
  595. package/src/asset-registries/i18n.js +0 -110
  596. package/src/boot.js +0 -34
  597. package/src/compatibility/DOMObserver.js +0 -62
  598. package/src/compatibility/patchNodeValue.js +0 -24
  599. package/src/compatibility/whenPolyfillLoaded.js +0 -26
  600. package/src/config/AnimationMode.js +0 -23
  601. package/src/config/AssetsPath.js +0 -17
  602. package/src/config/CalendarType.js +0 -18
  603. package/src/config/FormatSettings.js +0 -13
  604. package/src/config/Language.js +0 -70
  605. package/src/config/NoConflict.js +0 -51
  606. package/src/config/RTL.js +0 -31
  607. package/src/config/Theme.js +0 -28
  608. package/src/delegate/CustomResize.js +0 -78
  609. package/src/delegate/ItemNavigation.js +0 -313
  610. package/src/delegate/NativeResize.js +0 -45
  611. package/src/delegate/ResizeHandler.js +0 -65
  612. package/src/delegate/ScrollEnablement.js +0 -182
  613. package/src/features/OpenUI5Support.js +0 -90
  614. package/src/features/PropertiesFormatSupport.js +0 -8
  615. package/src/features/browsersupport/Edge.js +0 -6
  616. package/src/features/browsersupport/IE11.js +0 -43
  617. package/src/features/browsersupport/IE11WithWebComponentsPolyfill.js +0 -5
  618. package/src/getSharedResource.js +0 -30
  619. package/src/i18nBundle.js +0 -52
  620. package/src/locale/Locale.js +0 -91
  621. package/src/locale/RTLAwareRegistry.js +0 -14
  622. package/src/locale/applyDirection.js +0 -18
  623. package/src/locale/directionChange.js +0 -32
  624. package/src/locale/getLocale.js +0 -41
  625. package/src/locale/languageChange.js +0 -22
  626. package/src/locale/nextFallbackLocale.js +0 -28
  627. package/src/locale/normalizeLocale.js +0 -54
  628. package/src/renderer/LitRenderer.js +0 -31
  629. package/src/renderer/executeTemplate.js +0 -17
  630. package/src/renderer/ifDefined.js +0 -21
  631. package/src/renderer/scopeHTML.js +0 -32
  632. package/src/theming/CSSVarsPonyfill.js +0 -68
  633. package/src/theming/CustomStyle.js +0 -40
  634. package/src/theming/ThemeLoaded.js +0 -22
  635. package/src/theming/adaptCSSForIE.js +0 -95
  636. package/src/theming/applyTheme.js +0 -84
  637. package/src/theming/createComponentStyleTag.js +0 -54
  638. package/src/theming/createThemePropertiesStyleTag.js +0 -20
  639. package/src/theming/getConstructableStyle.js +0 -29
  640. package/src/theming/getEffectiveStyle.js +0 -23
  641. package/src/theming/getStylesString.js +0 -13
  642. package/src/theming/getThemeDesignerTheme.js +0 -67
  643. package/src/thirdparty/Array.from.js +0 -16
  644. package/src/thirdparty/Array.prototype.fill.js +0 -44
  645. package/src/thirdparty/Array.prototype.find.js +0 -46
  646. package/src/thirdparty/Array.prototype.findIndex.js +0 -46
  647. package/src/thirdparty/Array.prototype.includes.js +0 -51
  648. package/src/thirdparty/Element.prototype.closest.js +0 -11
  649. package/src/thirdparty/Element.prototype.matches.js +0 -6
  650. package/src/thirdparty/Map.prototype.keys.js +0 -9
  651. package/src/thirdparty/Number.isInteger.js +0 -5
  652. package/src/thirdparty/Number.isNaN.js +0 -1
  653. package/src/thirdparty/Number.parseFloat.js +0 -1
  654. package/src/thirdparty/Number.parseInt.js +0 -1
  655. package/src/thirdparty/Object.assign.js +0 -31
  656. package/src/thirdparty/Object.entries.js +0 -11
  657. package/src/thirdparty/Symbol.js +0 -2
  658. package/src/thirdparty/WeakSet.js +0 -27
  659. package/src/thirdparty/_merge.js +0 -32
  660. package/src/thirdparty/es6-string-methods.js +0 -182
  661. package/src/thirdparty/events-polyfills.js +0 -89
  662. package/src/thirdparty/fetch.js +0 -1
  663. package/src/thirdparty/isPlainObject.js +0 -18
  664. package/src/thirdparty/merge.js +0 -10
  665. package/src/thirdparty/template.js +0 -600
  666. package/src/thirdparty/webcomponents-sd-ce-pf.js +0 -318
  667. package/src/types/AnimationMode.js +0 -7
  668. package/src/types/CSSSize.js +0 -9
  669. package/src/types/CalendarType.js +0 -22
  670. package/src/types/DataType.js +0 -25
  671. package/src/types/Float.js +0 -10
  672. package/src/types/Integer.js +0 -9
  673. package/src/types/ItemNavigationBehavior.js +0 -16
  674. package/src/types/NavigationMode.js +0 -7
  675. package/src/types/PopupState.js +0 -37
  676. package/src/types/ValueState.js +0 -22
  677. package/src/util/AriaLabelHelper.js +0 -41
  678. package/src/util/Caret.js +0 -45
  679. package/src/util/EffectiveAssetPath.js +0 -27
  680. package/src/util/FetchHelper.js +0 -31
  681. package/src/util/FocusableElements.js +0 -73
  682. package/src/util/StringHelper.js +0 -26
  683. package/src/util/TabbableElements.js +0 -47
  684. package/src/util/arraysAreEqual.js +0 -15
  685. package/src/util/createStyleInHead.js +0 -18
  686. package/src/util/detectNavigatorLanguage.js +0 -13
  687. package/src/util/encodeCSS.js +0 -24
  688. package/src/util/findNodeOwner.js +0 -35
  689. package/src/util/formatMessage.js +0 -23
  690. package/src/util/getActiveElement.js +0 -11
  691. package/src/util/getDesigntimePropertyAsArray.js +0 -4
  692. package/src/util/getSingletonElementInstance.js +0 -13
  693. package/src/util/isDescendantOf.js +0 -15
  694. package/src/util/isNodeClickable.js +0 -19
  695. package/src/util/isNodeHidden.js +0 -9
  696. package/src/util/isNodeTabbable.js +0 -28
  697. package/src/util/isSlot.js +0 -3
  698. package/src/util/isValidPropertyName.js +0 -29
  699. package/src/util/parseProperties.js +0 -89
  700. package/src/util/setToArray.js +0 -10
  701. package/src/util/whenDOMReady.js +0 -13
  702. /package/{config/.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -1,182 +0,0 @@
1
- import { isPhone } from "../Device.js";
2
- import EventProvider from "../EventProvider.js";
3
- import scroll from "../animations/scroll.js";
4
-
5
- const scrollEventName = "scroll";
6
- const touchEndEventName = isPhone() ? "touchend" : "mouseup";
7
-
8
- class ScrollEnablement extends EventProvider {
9
- constructor(containerComponent) {
10
- super();
11
- this.containerComponent = containerComponent;
12
- this.mouseMove = this.ontouchmove.bind(this);
13
- this.mouseUp = this.ontouchend.bind(this);
14
- this.touchStart = this.ontouchstart.bind(this);
15
-
16
- this.isPhone = isPhone();
17
-
18
- // On Android devices touchmove is thrown one more time than neccessary (together with touchend)
19
- // so we have to cache the previus coordinates in order to provide correct parameters in the
20
- // event for Android
21
- this.cachedValue = {};
22
-
23
- // In components like Carousel you need to know if the user has clicked on something or swiped
24
- // in order to throw the needed event or not
25
- this.startX = 0;
26
- this.startY = 0;
27
-
28
- if (this.isPhone) {
29
- containerComponent.addEventListener("touchstart", this.touchStart, { passive: true });
30
- containerComponent.addEventListener("touchmove", this.mouseMove, { passive: true });
31
- containerComponent.addEventListener("touchend", this.mouseUp, { passive: true });
32
- } else {
33
- containerComponent.addEventListener("mousedown", this.touchStart, { passive: true });
34
- }
35
- }
36
-
37
- set scrollContainer(container) {
38
- this._container = container;
39
- }
40
-
41
- get scrollContainer() {
42
- return this._container;
43
- }
44
-
45
- /**
46
- * Scrolls the container to the left/top position, retrying retryCount times, if the container is not yet painted
47
- *
48
- * @param left
49
- * @param top
50
- * @param retryCount
51
- * @param retryInterval
52
- * @returns {Promise<void>} resolved when scrolled successfully
53
- */
54
- async scrollTo(left, top, retryCount = 0, retryInterval = 0) {
55
- let containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;
56
-
57
- /* eslint-disable no-loop-func, no-await-in-loop */
58
- while (!containerPainted && retryCount > 0) {
59
- await new Promise(resolve => {
60
- setTimeout(() => {
61
- containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;
62
- retryCount--;
63
- resolve();
64
- }, retryInterval);
65
- });
66
- }
67
- /* eslint-disable no-loop-func, no-await-in-loop */
68
-
69
- this._container.scrollLeft = left;
70
- this._container.scrollTop = top;
71
- }
72
-
73
- move(dx, dy) {
74
- return scroll({
75
- element: this._container,
76
- dx,
77
- dy,
78
- });
79
- }
80
-
81
- getScrollLeft() {
82
- return this._container.scrollLeft;
83
- }
84
-
85
- getScrollTop() {
86
- return this._container.scrollTop;
87
- }
88
-
89
- _isTouchInside(touch) {
90
- const rect = this._container.getBoundingClientRect();
91
- const x = this.isPhone ? touch.clientX : touch.x;
92
- const y = this.isPhone ? touch.clientY : touch.y;
93
-
94
- return x >= rect.left && x <= rect.right
95
- && y >= rect.top && y <= rect.bottom;
96
- }
97
-
98
- ontouchstart(event) {
99
- const touch = this.isPhone ? event.touches[0] : null;
100
-
101
- if (!this.isPhone) {
102
- document.addEventListener("mouseup", this.mouseUp, { passive: true });
103
- document.addEventListener("mousemove", this.mouseMove, { passive: true });
104
- } else {
105
- // Needed only on mobile
106
- this.startX = touch.pageX;
107
- this.startY = touch.pageY;
108
- }
109
-
110
- this._prevDragX = this.isPhone ? touch.pageX : event.x;
111
- this._prevDragY = this.isPhone ? touch.pageY : event.y;
112
-
113
- this._canScroll = this._isTouchInside(this.isPhone ? touch : event);
114
- }
115
-
116
- ontouchmove(event) {
117
- if (!this._canScroll) {
118
- return;
119
- }
120
-
121
- const container = this._container;
122
- const touch = this.isPhone ? event.touches[0] : null;
123
-
124
- const dragX = this.isPhone ? touch.pageX : event.x;
125
- const dragY = this.isPhone ? touch.pageY : event.y;
126
-
127
- container.scrollLeft += this._prevDragX - dragX;
128
- container.scrollTop += this._prevDragY - dragY;
129
-
130
- this.fireEvent(scrollEventName, {
131
- isLeft: dragX > this._prevDragX,
132
- isRight: dragX < this._prevDragX,
133
- });
134
-
135
- this.cachedValue.dragX = this._prevDragX;
136
- this.cachedValue.dragY = this._prevDragY;
137
-
138
- this._prevDragX = dragX;
139
- this._prevDragY = dragY;
140
- }
141
-
142
- ontouchend(event) {
143
- if (this.isPhone) {
144
- const deltaX = Math.abs(event.changedTouches[0].pageX - this.startX);
145
- const deltaY = Math.abs(event.changedTouches[0].pageY - this.startY);
146
-
147
- if (deltaX < 10 && deltaY < 10) {
148
- return;
149
- }
150
- }
151
-
152
- if (!this._canScroll) {
153
- return;
154
- }
155
-
156
- const container = this._container;
157
- const dragX = this.isPhone ? event.changedTouches[0].pageX : event.x;
158
- const dragY = this.isPhone ? event.changedTouches[0].pageY : event.y;
159
-
160
- container.scrollLeft += this._prevDragX - dragX;
161
- container.scrollTop += this._prevDragY - dragY;
162
-
163
- const useCachedValues = dragX === this._prevDragX;
164
- const _dragX = useCachedValues ? this.cachedValue.dragX : dragX;
165
- // const _dragY = useCachedValues ? this.cachedValue.dragY : dragY; add if needed
166
-
167
- this.fireEvent(touchEndEventName, {
168
- isLeft: _dragX < this._prevDragX,
169
- isRight: _dragX > this._prevDragX,
170
- });
171
-
172
- this._prevDragX = dragX;
173
- this._prevDragY = dragY;
174
-
175
- if (!this.isPhone) {
176
- document.removeEventListener("mousemove", this.mouseMove, { passive: true });
177
- document.removeEventListener("mouseup", this.mouseUp);
178
- }
179
- }
180
- }
181
-
182
- export default ScrollEnablement;
@@ -1,90 +0,0 @@
1
- import { registerFeature } from "../FeaturesRegistry.js";
2
- import { setTheme } from "../config/Theme.js";
3
-
4
- const sap = window.sap;
5
- const core = sap && sap.ui && typeof sap.ui.getCore === "function" && sap.ui.getCore();
6
-
7
- const isLoaded = () => {
8
- return !!core;
9
- };
10
-
11
- const init = () => {
12
- if (!core) {
13
- return Promise.resolve();
14
- }
15
-
16
- return new Promise(resolve => {
17
- core.attachInit(() => {
18
- sap.ui.require(["sap/ui/core/LocaleData"], resolve);
19
- });
20
- });
21
- };
22
-
23
- const getConfigurationSettingsObject = () => {
24
- if (!core) {
25
- return;
26
- }
27
-
28
- const config = core.getConfiguration();
29
- const LocaleData = sap.ui.require("sap/ui/core/LocaleData");
30
-
31
- return {
32
- animationMode: config.getAnimationMode(),
33
- language: config.getLanguage(),
34
- theme: config.getTheme(),
35
- rtl: config.getRTL(),
36
- calendarType: config.getCalendarType(),
37
- formatSettings: {
38
- firstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,
39
- },
40
- };
41
- };
42
-
43
- const getLocaleDataObject = () => {
44
- if (!core) {
45
- return;
46
- }
47
-
48
- const config = core.getConfiguration();
49
- const LocaleData = sap.ui.require("sap/ui/core/LocaleData");
50
- return LocaleData.getInstance(config.getLocale())._get();
51
- };
52
-
53
- const listenForThemeChange = () => {
54
- const config = core.getConfiguration();
55
- core.attachThemeChanged(async () => {
56
- await setTheme(config.getTheme());
57
- });
58
- };
59
-
60
- const attachListeners = () => {
61
- if (!core) {
62
- return;
63
- }
64
-
65
- listenForThemeChange();
66
- };
67
-
68
- const cssVariablesLoaded = () => {
69
- if (!core) {
70
- return;
71
- }
72
-
73
- const link = [...document.head.children].find(el => el.id === "sap-ui-theme-sap.ui.core"); // more reliable than querySelector early
74
- if (!link) {
75
- return;
76
- }
77
-
78
- return !!link.href.match(/\/css(-|_)variables\.css/);
79
- };
80
-
81
- const OpenUI5Support = {
82
- isLoaded,
83
- init,
84
- getConfigurationSettingsObject,
85
- getLocaleDataObject,
86
- attachListeners,
87
- cssVariablesLoaded,
88
- };
89
-
90
- registerFeature("OpenUI5Support", OpenUI5Support);
@@ -1,8 +0,0 @@
1
- import { registerFeature } from "../FeaturesRegistry.js";
2
- import parseProperties from "../util/parseProperties.js";
3
-
4
- const PropertiesFormatSupport = {
5
- parser: parseProperties,
6
- };
7
-
8
- registerFeature("PropertiesFormatSupport", PropertiesFormatSupport);
@@ -1,6 +0,0 @@
1
- // URLSearchParams
2
- import "url-search-params-polyfill/index.js";
3
-
4
-
5
- // "pseudo mutation observer" fix for nodeValue
6
- import "../../compatibility/patchNodeValue.js";
@@ -1,43 +0,0 @@
1
- // CSS Custom Properties
2
- import cssVars from "css-vars-ponyfill/dist/css-vars-ponyfill.esm.js";
3
-
4
- // String
5
- import "../../thirdparty/es6-string-methods.js";
6
-
7
- // Object
8
- import "../../thirdparty/Object.entries.js";
9
-
10
- // Array
11
- import "../../thirdparty/Array.prototype.fill.js";
12
- import "../../thirdparty/Array.prototype.find.js";
13
- import "../../thirdparty/Array.prototype.findIndex.js";
14
- import "../../thirdparty/Array.prototype.includes.js";
15
-
16
- // Map
17
- import "../../thirdparty/Map.prototype.keys.js";
18
-
19
- // Number
20
- import "../../thirdparty/Number.isInteger.js";
21
- import "../../thirdparty/Number.isNaN.js";
22
- import "../../thirdparty/Number.parseFloat.js";
23
- import "../../thirdparty/Number.parseInt.js";
24
-
25
- // Element
26
- import "../../thirdparty/Element.prototype.matches.js";
27
- import "../../thirdparty/Element.prototype.closest.js";
28
-
29
- // WeakSet
30
- import "../../thirdparty/WeakSet.js";
31
-
32
- // fetch
33
- import "../../thirdparty/fetch.js";
34
-
35
- // async - await
36
- import "regenerator-runtime/runtime.js";
37
-
38
- // Plus all polyfills needed for Edge are also needed for IE11
39
- import "./Edge.js";
40
-
41
- window.CSSVarsPonyfill = {
42
- cssVars,
43
- };
@@ -1,5 +0,0 @@
1
- // All web components polyfills (including platform) with "window" passed as argument to the iife
2
- import "../../thirdparty/webcomponents-sd-ce-pf.js";
3
-
4
- // All IE11 polyfills, needed by the project itself
5
- import "./IE11.js";
@@ -1,30 +0,0 @@
1
- import getSingletonElementInstance from "./util/getSingletonElementInstance.js";
2
-
3
- const getSharedResourcesInstance = () => getSingletonElementInstance("ui5-shared-resources", document.head);
4
-
5
- /**
6
- * Use this method to initialize/get resources that you would like to be shared among UI5 Web Components runtime instances.
7
- * The data will be accessed via a singleton "ui5-shared-resources" HTML element in the "head" element of the page.
8
- *
9
- * @public
10
- * @param namespace Unique ID of the resource, may contain "." to denote hierarchy
11
- * @param initialValue Object or primitive that will be used as an initial value if the resource does not exist
12
- * @returns {*}
13
- */
14
- const getSharedResource = (namespace, initialValue) => {
15
- const parts = namespace.split(".");
16
- let current = getSharedResourcesInstance();
17
-
18
- for (let i = 0; i < parts.length; i++) {
19
- const part = parts[i];
20
- const lastPart = i === parts.length - 1;
21
- if (!Object.prototype.hasOwnProperty.call(current, part)) {
22
- current[part] = lastPart ? initialValue : {};
23
- }
24
- current = current[part];
25
- }
26
-
27
- return current;
28
- };
29
-
30
- export default getSharedResource;
package/src/i18nBundle.js DELETED
@@ -1,52 +0,0 @@
1
- import { registerI18nBundle, fetchI18nBundle, getI18nBundleData } from "./asset-registries/i18n.js";
2
- import formatMessage from "./util/formatMessage.js";
3
-
4
- const I18nBundleInstances = new Map();
5
-
6
- /**
7
- * @class
8
- * @public
9
- */
10
- class I18nBundle {
11
- constructor(packageName) {
12
- this.packageName = packageName;
13
- }
14
-
15
- /**
16
- * Returns a text in the currently loaded language
17
- *
18
- * @param {Object|String} textObj key/defaultText pair or just the key
19
- * @param params Values for the placeholders
20
- * @returns {*}
21
- */
22
- getText(textObj, ...params) {
23
- if (typeof textObj === "string") {
24
- textObj = { key: textObj, defaultText: textObj };
25
- }
26
-
27
- if (!textObj || !textObj.key) {
28
- return "";
29
- }
30
-
31
- const bundle = getI18nBundleData(this.packageName);
32
- const messageText = bundle && bundle[textObj.key] ? bundle[textObj.key] : (textObj.defaultText || textObj.key);
33
-
34
- return formatMessage(messageText, params);
35
- }
36
- }
37
-
38
- const getI18nBundle = packageName => {
39
- if (I18nBundleInstances.has(packageName)) {
40
- return I18nBundleInstances.get(packageName);
41
- }
42
-
43
- const i18nBundle = new I18nBundle(packageName);
44
- I18nBundleInstances.set(packageName, i18nBundle);
45
- return i18nBundle;
46
- };
47
-
48
- export {
49
- registerI18nBundle,
50
- fetchI18nBundle,
51
- getI18nBundle,
52
- };
@@ -1,91 +0,0 @@
1
- const rLocale = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
2
-
3
- class Locale {
4
- constructor(sLocaleId) {
5
- const aResult = rLocale.exec(sLocaleId.replace(/_/g, "-"));
6
- if (aResult === null) {
7
- throw new Error(`The given language ${sLocaleId} does not adhere to BCP-47.`);
8
- }
9
- this.sLocaleId = sLocaleId;
10
- this.sLanguage = aResult[1] || null;
11
- this.sScript = aResult[2] || null;
12
- this.sRegion = aResult[3] || null;
13
- this.sVariant = (aResult[4] && aResult[4].slice(1)) || null;
14
- this.sExtension = (aResult[5] && aResult[5].slice(1)) || null;
15
- this.sPrivateUse = aResult[6] || null;
16
- if (this.sLanguage) {
17
- this.sLanguage = this.sLanguage.toLowerCase();
18
- }
19
- if (this.sScript) {
20
- this.sScript = this.sScript.toLowerCase().replace(/^[a-z]/, s => {
21
- return s.toUpperCase();
22
- });
23
- }
24
- if (this.sRegion) {
25
- this.sRegion = this.sRegion.toUpperCase();
26
- }
27
- }
28
-
29
- getLanguage() {
30
- return this.sLanguage;
31
- }
32
-
33
- getScript() {
34
- return this.sScript;
35
- }
36
-
37
- getRegion() {
38
- return this.sRegion;
39
- }
40
-
41
- getVariant() {
42
- return this.sVariant;
43
- }
44
-
45
- getVariantSubtags() {
46
- return this.sVariant ? this.sVariant.split("-") : [];
47
- }
48
-
49
- getExtension() {
50
- return this.sExtension;
51
- }
52
-
53
- getExtensionSubtags() {
54
- return this.sExtension ? this.sExtension.slice(2).split("-") : [];
55
- }
56
-
57
- getPrivateUse() {
58
- return this.sPrivateUse;
59
- }
60
-
61
- getPrivateUseSubtags() {
62
- return this.sPrivateUse ? this.sPrivateUse.slice(2).split("-") : [];
63
- }
64
-
65
- hasPrivateUseSubtag(sSubtag) {
66
- return this.getPrivateUseSubtags().indexOf(sSubtag) >= 0;
67
- }
68
-
69
- toString() {
70
- const r = [this.sLanguage];
71
-
72
- if (this.sScript) {
73
- r.push(this.sScript);
74
- }
75
- if (this.sRegion) {
76
- r.push(this.sRegion);
77
- }
78
- if (this.sVariant) {
79
- r.push(this.sVariant);
80
- }
81
- if (this.sExtension) {
82
- r.push(this.sExtension);
83
- }
84
- if (this.sPrivateUse) {
85
- r.push(this.sPrivateUse);
86
- }
87
- return r.join("-");
88
- }
89
- }
90
-
91
- export default Locale;
@@ -1,14 +0,0 @@
1
- const rtlAwareSet = new Set();
2
-
3
- const markAsRtlAware = klass => {
4
- rtlAwareSet.add(klass);
5
- };
6
-
7
- const isRtlAware = klass => {
8
- return rtlAwareSet.has(klass);
9
- };
10
-
11
- export {
12
- markAsRtlAware,
13
- isRtlAware,
14
- };
@@ -1,18 +0,0 @@
1
- import RenderScheduler from "../RenderScheduler.js";
2
- import { fireDirectionChange } from "./directionChange.js";
3
-
4
- /**
5
- * Re-renders all RTL-aware UI5 Elements.
6
- * Call this method whenever you change the "dir" property anywhere in your HTML page
7
- * Example: document.body.dir = "rtl"; applyDirection();
8
- *
9
- * @returns {Promise<void>}
10
- */
11
- const applyDirection = async () => {
12
- const listenersResults = fireDirectionChange();
13
- await Promise.all(listenersResults);
14
- RenderScheduler.reRenderAllUI5Elements({ rtlAware: true });
15
- return RenderScheduler.whenFinished();
16
- };
17
-
18
- export default applyDirection;
@@ -1,32 +0,0 @@
1
- import EventProvider from "../EventProvider.js";
2
-
3
- const eventProvider = new EventProvider();
4
- const DIR_CHANGE = "directionChange";
5
-
6
- /**
7
- * Attach a callback that will be executed whenever the application calls the "applyDirection" function
8
- * @public
9
- * @param listener
10
- */
11
- const attachDirectionChange = listener => {
12
- eventProvider.attachEvent(DIR_CHANGE, listener);
13
- };
14
-
15
- /**
16
- * Detach a callback that was passed with "attachDirectionChange"
17
- * @public
18
- * @param listener
19
- */
20
- const detachDirectionChange = listener => {
21
- eventProvider.detachEvent(DIR_CHANGE, listener);
22
- };
23
-
24
- const fireDirectionChange = () => {
25
- return eventProvider.fireEvent(DIR_CHANGE);
26
- };
27
-
28
- export {
29
- attachDirectionChange,
30
- detachDirectionChange,
31
- fireDirectionChange,
32
- };
@@ -1,41 +0,0 @@
1
- import detectNavigatorLanguage from "../util/detectNavigatorLanguage.js";
2
- import { getLanguage as getConfigLanguage } from "../config/Language.js";
3
- import Locale from "./Locale.js";
4
-
5
- const cache = new Map();
6
-
7
- const getLocaleInstance = lang => {
8
- if (!cache.has(lang)) {
9
- cache.set(lang, new Locale(lang));
10
- }
11
-
12
- return cache.get(lang);
13
- };
14
-
15
- const convertToLocaleOrNull = lang => {
16
- try {
17
- if (lang && typeof lang === "string") {
18
- return getLocaleInstance(lang);
19
- }
20
- } catch (e) {
21
- // ignore
22
- }
23
- };
24
-
25
- /**
26
- * Returns the locale based on the parameter or configured language Configuration#getLanguage
27
- * If no language has been configured - a new locale based on browser language is returned
28
- */
29
- const getLocale = lang => {
30
- if (lang) {
31
- return convertToLocaleOrNull(lang);
32
- }
33
-
34
- if (getConfigLanguage()) {
35
- return getLocaleInstance(getConfigLanguage());
36
- }
37
-
38
- return convertToLocaleOrNull(detectNavigatorLanguage());
39
- };
40
-
41
- export default getLocale;
@@ -1,22 +0,0 @@
1
- import EventProvider from "../EventProvider.js";
2
-
3
- const eventProvider = new EventProvider();
4
- const LANG_CHANGE = "languageChange";
5
-
6
- const attachLanguageChange = listener => {
7
- eventProvider.attachEvent(LANG_CHANGE, listener);
8
- };
9
-
10
- const detachLanguageChange = listener => {
11
- eventProvider.detachEvent(LANG_CHANGE, listener);
12
- };
13
-
14
- const fireLanguageChange = lang => {
15
- return eventProvider.fireEvent(LANG_CHANGE, lang);
16
- };
17
-
18
- export {
19
- attachLanguageChange,
20
- detachLanguageChange,
21
- fireLanguageChange,
22
- };
@@ -1,28 +0,0 @@
1
- import { DEFAULT_LOCALE } from "../generated/AssetParameters.js";
2
-
3
- /**
4
- * Calculates the next fallback locale for the given locale.
5
- *
6
- * @param {string} locale Locale string in Java format (underscores) or null
7
- * @returns {string} Next fallback Locale or "en" if no fallbacks found.
8
- */
9
- const nextFallbackLocale = locale => {
10
- if (!locale) {
11
- return DEFAULT_LOCALE;
12
- }
13
-
14
- if (locale === "zh_HK") {
15
- return "zh_TW";
16
- }
17
-
18
- // if there are multiple segments (separated by underscores), remove the last one
19
- const p = locale.lastIndexOf("_");
20
- if (p >= 0) {
21
- return locale.slice(0, p);
22
- }
23
-
24
- // for any language but the default, fallback to the default first before falling back to the 'raw' language (empty string)
25
- return locale !== DEFAULT_LOCALE ? DEFAULT_LOCALE : "";
26
- };
27
-
28
- export default nextFallbackLocale;