@watermarkinsights/ripple 3.9.0-6 → 3.9.0

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 (355) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-01bb841e.js → chartFunctions-dbbea5a8.js} +417 -417
  3. package/dist/cjs/{functions-33825afb.js → functions-15e21d53.js} +556 -506
  4. package/dist/cjs/{global-d016e7de.js → global-b0e0eac2.js} +60 -60
  5. package/dist/cjs/{http-service-494d81de.js → http-service-9e8c4dd5.js} +49 -49
  6. package/dist/cjs/{index-98c6524c.js → index-acad7ab3.js} +96 -64
  7. package/dist/cjs/{interfaces-a3338581.js → interfaces-30a74c1f.js} +29 -29
  8. package/dist/cjs/loader.cjs.js +4 -4
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -87
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +659 -659
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
  13. package/dist/cjs/ripple.cjs.js +4 -4
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
  15. package/dist/cjs/wm-button.cjs.entry.js +228 -228
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
  17. package/dist/cjs/wm-chart.cjs.entry.js +116 -116
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +267 -267
  19. package/dist/cjs/wm-input.cjs.entry.js +136 -136
  20. package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
  21. package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
  22. package/dist/cjs/wm-modal.cjs.entry.js +164 -164
  23. package/dist/cjs/wm-navigation_3.cjs.entry.js +222 -222
  24. package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
  25. package/dist/cjs/wm-network-uploader.cjs.entry.js +454 -454
  26. package/dist/cjs/wm-option_2.cjs.entry.js +487 -487
  27. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  28. package/dist/cjs/{wm-progress-indicator.cjs.entry.js → wm-progress-indicator_3.cjs.entry.js} +143 -82
  29. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  30. package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
  31. package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
  32. package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
  33. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  34. package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
  35. package/dist/cjs/wm-uploader.cjs.entry.js +380 -380
  36. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  37. package/dist/collection/collection-manifest.json +9 -2
  38. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  39. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  40. package/dist/collection/components/charts/wm-chart/wm-chart.js +332 -332
  41. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +199 -199
  42. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
  43. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  44. package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
  45. package/dist/collection/components/wm-button/wm-button.css +1 -2
  46. package/dist/collection/components/wm-button/wm-button.js +491 -491
  47. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +3 -4
  48. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  49. package/dist/collection/components/wm-datepicker/wm-datepicker.css +1 -2
  50. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  51. package/dist/collection/components/wm-input/wm-input.css +1 -2
  52. package/dist/collection/components/wm-input/wm-input.js +423 -423
  53. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  54. package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
  55. package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
  56. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  57. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +1 -2
  58. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  59. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  60. package/dist/collection/components/wm-navigation/wm-navigation.js +211 -211
  61. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  62. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  63. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  64. package/dist/collection/components/wm-option/wm-option.css +2 -3
  65. package/dist/collection/components/wm-option/wm-option.js +414 -414
  66. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  67. package/dist/collection/components/wm-search/wm-search.js +480 -480
  68. package/dist/collection/components/wm-select/wm-select.css +2 -3
  69. package/dist/collection/components/wm-select/wm-select.js +718 -718
  70. package/dist/collection/components/wm-snackbar/wm-snackbar.css +2 -3
  71. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  72. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
  73. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  74. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  75. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  76. package/dist/collection/components/wm-tag-input/wm-tag-input.css +2 -3
  77. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  78. package/dist/collection/components/wm-timepicker/wm-timepicker.css +2 -3
  79. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  80. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1 -2
  81. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  82. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +1 -2
  83. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +785 -785
  84. package/dist/collection/components/wm-uploader/wm-uploader.css +1 -2
  85. package/dist/collection/components/wm-uploader/wm-uploader.js +780 -780
  86. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  87. package/dist/collection/dev/scripts.js +20 -20
  88. package/dist/collection/global/__mocks__/functions.js +6 -6
  89. package/dist/collection/global/chartFunctions.js +418 -418
  90. package/dist/collection/global/functions.js +468 -468
  91. package/dist/collection/global/global.js +67 -67
  92. package/dist/collection/global/interfaces.js +49 -49
  93. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  94. package/dist/collection/global/services/http-service.js +50 -50
  95. package/dist/collection/lang/lang.js +5 -5
  96. package/dist/collection/lang/missing.js +43 -43
  97. package/dist/collection/lang/piglatin.js +93 -93
  98. package/dist/esm/{chartFunctions-4be35472.js → chartFunctions-303e1644.js} +417 -417
  99. package/dist/esm/{functions-a326c899.js → functions-e552a8b5.js} +556 -506
  100. package/dist/esm/{global-9823b157.js → global-fa341013.js} +60 -60
  101. package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +49 -49
  102. package/dist/esm/{index-d649a861.js → index-7603f98e.js} +96 -64
  103. package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +29 -29
  104. package/dist/esm/loader.js +4 -4
  105. package/dist/esm/polyfills/core-js.js +0 -0
  106. package/dist/esm/polyfills/css-shim.js +1 -1
  107. package/dist/esm/polyfills/dom.js +0 -0
  108. package/dist/esm/polyfills/es5-html-element.js +0 -0
  109. package/dist/esm/polyfills/index.js +0 -0
  110. package/dist/esm/polyfills/system.js +0 -0
  111. package/dist/esm/priv-chart-popover.entry.js +87 -87
  112. package/dist/esm/priv-datepicker.entry.js +659 -659
  113. package/dist/esm/priv-navigator-button.entry.js +19 -19
  114. package/dist/esm/priv-navigator-item.entry.js +24 -24
  115. package/dist/esm/ripple.js +4 -4
  116. package/dist/esm/wm-action-menu_2.entry.js +342 -342
  117. package/dist/esm/wm-button.entry.js +228 -228
  118. package/dist/esm/wm-chart-slice.entry.js +14 -14
  119. package/dist/esm/wm-chart.entry.js +116 -116
  120. package/dist/esm/wm-datepicker.entry.js +267 -267
  121. package/dist/esm/wm-input.entry.js +136 -136
  122. package/dist/esm/wm-modal-footer.entry.js +32 -32
  123. package/dist/esm/wm-modal-header.entry.js +35 -35
  124. package/dist/esm/wm-modal.entry.js +164 -164
  125. package/dist/esm/wm-navigation_3.entry.js +222 -222
  126. package/dist/esm/wm-navigator.entry.js +269 -269
  127. package/dist/esm/wm-network-uploader.entry.js +454 -454
  128. package/dist/esm/wm-option_2.entry.js +487 -487
  129. package/dist/esm/wm-pagination.entry.js +168 -168
  130. package/dist/esm/{wm-progress-indicator.entry.js → wm-progress-indicator_3.entry.js} +142 -83
  131. package/dist/esm/wm-search.entry.js +233 -233
  132. package/dist/esm/wm-snackbar.entry.js +172 -172
  133. package/dist/esm/wm-tab-item_3.entry.js +298 -298
  134. package/dist/esm/wm-tag-input.entry.js +581 -581
  135. package/dist/esm/wm-timepicker.entry.js +385 -385
  136. package/dist/esm/wm-toggletip.entry.js +126 -126
  137. package/dist/esm/wm-uploader.entry.js +380 -380
  138. package/dist/esm/wm-wrapper.entry.js +13 -13
  139. package/dist/esm-es5/chartFunctions-303e1644.js +1 -0
  140. package/dist/esm-es5/functions-e552a8b5.js +15 -0
  141. package/dist/esm-es5/global-fa341013.js +1 -0
  142. package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +1 -1
  143. package/dist/esm-es5/index-7603f98e.js +1 -0
  144. package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +0 -0
  145. package/dist/esm-es5/loader.js +1 -1
  146. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  147. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  148. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  149. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  150. package/dist/esm-es5/ripple.js +1 -1
  151. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  152. package/dist/esm-es5/wm-button.entry.js +1 -1
  153. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  154. package/dist/esm-es5/wm-chart.entry.js +1 -1
  155. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  156. package/dist/esm-es5/wm-input.entry.js +1 -1
  157. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  158. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  159. package/dist/esm-es5/wm-modal.entry.js +1 -1
  160. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  161. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  162. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  163. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  164. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  165. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -0
  166. package/dist/esm-es5/wm-search.entry.js +1 -1
  167. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  168. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  169. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  170. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  171. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  172. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  173. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  174. package/dist/loader/index.d.ts +0 -1
  175. package/dist/ripple/p-01d2c1ab.entry.js +1 -0
  176. package/dist/ripple/p-02a3c14f.entry.js +1 -0
  177. package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +0 -0
  178. package/dist/ripple/p-1116a297.entry.js +1 -0
  179. package/dist/ripple/p-13a746ea.entry.js +1 -0
  180. package/dist/ripple/p-175eba9d.system.js +15 -0
  181. package/dist/ripple/p-1a7a33e0.system.js +1 -0
  182. package/dist/ripple/p-1d0742b0.entry.js +1 -0
  183. package/dist/ripple/{p-bfc1ab2e.system.entry.js → p-1df2adee.system.entry.js} +1 -1
  184. package/dist/ripple/p-2409192f.entry.js +1 -0
  185. package/dist/ripple/p-313b6073.system.js +1 -0
  186. package/dist/ripple/{p-19331b32.system.entry.js → p-32336c78.system.entry.js} +1 -1
  187. package/dist/ripple/p-358bde27.entry.js +1 -0
  188. package/dist/ripple/p-35ce3ff8.entry.js +1 -0
  189. package/dist/ripple/{p-2b63995f.system.entry.js → p-3b3e847c.system.entry.js} +1 -1
  190. package/dist/ripple/p-3bed42bf.entry.js +1 -0
  191. package/dist/ripple/p-3fa5f0f0.system.entry.js +1 -0
  192. package/dist/ripple/p-431220d3.entry.js +1 -0
  193. package/dist/ripple/p-461f08d4.entry.js +1 -0
  194. package/dist/ripple/p-4d59fe86.entry.js +1 -0
  195. package/dist/ripple/p-4f42da30.system.entry.js +1 -0
  196. package/dist/ripple/p-50db2d6a.system.entry.js +1 -0
  197. package/dist/ripple/p-5c099280.entry.js +1 -0
  198. package/dist/ripple/{p-12681f66.system.entry.js → p-64053e24.system.entry.js} +1 -1
  199. package/dist/ripple/p-6910f965.entry.js +1 -0
  200. package/dist/ripple/{p-0ff4d5d1.system.entry.js → p-69f21f1a.system.entry.js} +1 -1
  201. package/dist/ripple/p-6a6408b8.system.js +1 -0
  202. package/dist/ripple/{p-e9951aa1.js → p-6bc557fa.js} +1 -1
  203. package/dist/ripple/{p-66b6f53d.system.entry.js → p-7d26d093.system.entry.js} +1 -1
  204. package/dist/ripple/p-7fae0cc2.entry.js +1 -0
  205. package/dist/ripple/p-823380c1.system.entry.js +1 -0
  206. package/dist/ripple/p-83fe767e.entry.js +1 -0
  207. package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +0 -0
  208. package/dist/ripple/p-89372ba5.system.entry.js +1 -0
  209. package/dist/ripple/{p-099df7b7.system.entry.js → p-90ed3268.system.entry.js} +1 -1
  210. package/dist/ripple/p-936fbfff.entry.js +1 -0
  211. package/dist/ripple/p-9d69aa46.system.entry.js +1 -0
  212. package/dist/ripple/p-a0c3ef16.system.js +1 -0
  213. package/dist/ripple/p-a216c161.system.entry.js +1 -0
  214. package/dist/ripple/p-a51453f6.entry.js +1 -0
  215. package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +0 -0
  216. package/dist/ripple/p-a9e0ce88.entry.js +1 -0
  217. package/dist/ripple/{p-9fae30ed.system.entry.js → p-aa104594.system.entry.js} +1 -1
  218. package/dist/ripple/{p-a1511315.system.entry.js → p-ae6cfbca.system.entry.js} +1 -1
  219. package/dist/ripple/p-b3c71506.js +1 -0
  220. package/dist/ripple/p-b4724251.entry.js +1 -0
  221. package/dist/ripple/{p-ddf157c8.system.entry.js → p-b4efa7d1.system.entry.js} +1 -1
  222. package/dist/ripple/p-b6b5c946.entry.js +1 -0
  223. package/dist/ripple/p-b786a5fd.system.entry.js +1 -0
  224. package/dist/ripple/p-ba76563e.system.entry.js +1 -0
  225. package/dist/ripple/p-bd5a6394.entry.js +1 -0
  226. package/dist/ripple/p-c77d79be.entry.js +1 -0
  227. package/dist/ripple/p-c9541d4d.system.entry.js +1 -0
  228. package/dist/ripple/p-ca7c628f.entry.js +1 -0
  229. package/dist/ripple/p-cae4ebf4.system.entry.js +1 -0
  230. package/dist/ripple/p-cf648440.entry.js +1 -0
  231. package/dist/ripple/p-d93d5885.entry.js +1 -0
  232. package/dist/ripple/p-d9d82a0d.js +1 -0
  233. package/dist/ripple/{p-33d23baa.system.entry.js → p-e490e37f.system.entry.js} +1 -1
  234. package/dist/ripple/p-e51562cd.system.entry.js +1 -0
  235. package/dist/ripple/p-eaedb11d.system.entry.js +1 -0
  236. package/dist/ripple/p-ed8115b9.system.entry.js +1 -0
  237. package/dist/ripple/p-f24ff348.system.js +1 -0
  238. package/dist/ripple/p-f37b54be.js +16 -0
  239. package/dist/ripple/p-f5f8bb25.system.entry.js +1 -0
  240. package/dist/ripple/p-f9c3a2ce.entry.js +1 -0
  241. package/dist/ripple/{p-5c199fd5.system.entry.js → p-fda5a778.system.entry.js} +1 -1
  242. package/dist/ripple/ripple.esm.js +1 -1
  243. package/dist/ripple/ripple.js +1 -1
  244. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
  245. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  246. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +35 -35
  247. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -26
  248. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  249. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  250. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
  251. package/dist/types/components/wm-button/wm-button.d.ts +43 -43
  252. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  253. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  254. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  255. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  256. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
  257. package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
  258. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  259. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  260. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  261. package/dist/types/components/wm-navigation/wm-navigation.d.ts +30 -30
  262. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  263. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  264. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  265. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  266. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  267. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  268. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  269. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  270. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  271. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  272. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  273. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  274. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  275. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  276. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  277. package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
  278. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  279. package/dist/types/components.d.ts +24 -24
  280. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  281. package/dist/types/global/chartFunctions.d.ts +28 -28
  282. package/dist/types/global/functions.d.ts +42 -42
  283. package/dist/types/global/global.d.ts +1 -1
  284. package/dist/types/global/interfaces.d.ts +44 -44
  285. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  286. package/dist/types/global/services/http-service.d.ts +4 -4
  287. package/dist/types/lang/lang.d.ts +5 -5
  288. package/dist/types/stencil-public-runtime.d.ts +6 -4
  289. package/package.json +47 -47
  290. package/dist/cjs/wm-progress-monitor.cjs.entry.js +0 -57
  291. package/dist/cjs/wm-progress-slice.cjs.entry.js +0 -17
  292. package/dist/esm/wm-progress-monitor.entry.js +0 -53
  293. package/dist/esm/wm-progress-slice.entry.js +0 -13
  294. package/dist/esm-es5/chartFunctions-4be35472.js +0 -1
  295. package/dist/esm-es5/functions-a326c899.js +0 -15
  296. package/dist/esm-es5/global-9823b157.js +0 -1
  297. package/dist/esm-es5/index-d649a861.js +0 -1
  298. package/dist/esm-es5/wm-progress-indicator.entry.js +0 -1
  299. package/dist/esm-es5/wm-progress-monitor.entry.js +0 -1
  300. package/dist/esm-es5/wm-progress-slice.entry.js +0 -1
  301. package/dist/ripple/p-0404f9e8.system.js +0 -1
  302. package/dist/ripple/p-09341809.system.entry.js +0 -1
  303. package/dist/ripple/p-0c45ad74.entry.js +0 -1
  304. package/dist/ripple/p-1a2b34ee.system.entry.js +0 -1
  305. package/dist/ripple/p-1e7fc028.entry.js +0 -1
  306. package/dist/ripple/p-2b6246d9.entry.js +0 -1
  307. package/dist/ripple/p-2d20de1e.system.entry.js +0 -1
  308. package/dist/ripple/p-33ee2cf6.js +0 -1
  309. package/dist/ripple/p-34b5af5b.system.entry.js +0 -1
  310. package/dist/ripple/p-36456289.system.entry.js +0 -1
  311. package/dist/ripple/p-3710ef3e.system.entry.js +0 -1
  312. package/dist/ripple/p-407735b2.entry.js +0 -1
  313. package/dist/ripple/p-49bb18cc.entry.js +0 -1
  314. package/dist/ripple/p-50be3b44.js +0 -1
  315. package/dist/ripple/p-59963be9.system.entry.js +0 -1
  316. package/dist/ripple/p-5d6cc9da.system.js +0 -1
  317. package/dist/ripple/p-6c295beb.entry.js +0 -1
  318. package/dist/ripple/p-6c751341.entry.js +0 -1
  319. package/dist/ripple/p-6ea8120e.system.entry.js +0 -1
  320. package/dist/ripple/p-70165cfb.entry.js +0 -1
  321. package/dist/ripple/p-76678c87.system.entry.js +0 -1
  322. package/dist/ripple/p-767d370a.entry.js +0 -1
  323. package/dist/ripple/p-777105ef.entry.js +0 -1
  324. package/dist/ripple/p-77cd6501.system.js +0 -1
  325. package/dist/ripple/p-7918cebe.entry.js +0 -1
  326. package/dist/ripple/p-7b10708b.system.entry.js +0 -1
  327. package/dist/ripple/p-7c2b1682.entry.js +0 -1
  328. package/dist/ripple/p-8aefc87b.entry.js +0 -1
  329. package/dist/ripple/p-8c11c2cb.entry.js +0 -1
  330. package/dist/ripple/p-8caffd40.entry.js +0 -1
  331. package/dist/ripple/p-90d6e070.entry.js +0 -1
  332. package/dist/ripple/p-95139f95.system.entry.js +0 -1
  333. package/dist/ripple/p-97647fa9.entry.js +0 -1
  334. package/dist/ripple/p-9c940014.js +0 -16
  335. package/dist/ripple/p-9d02957d.system.js +0 -1
  336. package/dist/ripple/p-9f07588b.entry.js +0 -1
  337. package/dist/ripple/p-a11f9b93.system.entry.js +0 -1
  338. package/dist/ripple/p-b96c7863.system.entry.js +0 -1
  339. package/dist/ripple/p-b9c1b0bf.entry.js +0 -1
  340. package/dist/ripple/p-bb73ebab.system.js +0 -1
  341. package/dist/ripple/p-c233717a.entry.js +0 -1
  342. package/dist/ripple/p-c3720168.system.entry.js +0 -1
  343. package/dist/ripple/p-c9e598b4.entry.js +0 -1
  344. package/dist/ripple/p-d17345cb.entry.js +0 -1
  345. package/dist/ripple/p-d9912bd5.entry.js +0 -1
  346. package/dist/ripple/p-dc32ec0c.system.entry.js +0 -1
  347. package/dist/ripple/p-dddae010.system.entry.js +0 -1
  348. package/dist/ripple/p-e7212c03.entry.js +0 -1
  349. package/dist/ripple/p-e802ba67.entry.js +0 -1
  350. package/dist/ripple/p-ed6c5269.system.js +0 -15
  351. package/dist/ripple/p-f2b9a140.entry.js +0 -1
  352. package/dist/ripple/p-f5486f80.system.entry.js +0 -1
  353. package/dist/ripple/p-f70cc1ab.entry.js +0 -1
  354. package/dist/ripple/p-fdbfae1c.entry.js +0 -1
  355. package/dist/ripple/p-ffbc5db3.entry.js +0 -1
@@ -1297,6 +1297,12 @@ const fr = {
1297
1297
  type: 0,
1298
1298
  value: "suivant"
1299
1299
  }
1300
+ ],
1301
+ "global.openVerb": [
1302
+ {
1303
+ type: 0,
1304
+ value: "Ouvrir"
1305
+ }
1300
1306
  ],
1301
1307
  "global.previous": [
1302
1308
  {
@@ -1321,6 +1327,18 @@ const fr = {
1321
1327
  type: 0,
1322
1328
  value: "Entrez un nombre valide."
1323
1329
  }
1330
+ ],
1331
+ "navigation.mainNavigation": [
1332
+ {
1333
+ type: 0,
1334
+ value: "Principale"
1335
+ }
1336
+ ],
1337
+ "navigation.showNavigation": [
1338
+ {
1339
+ type: 0,
1340
+ value: "Ouvrir la navigation"
1341
+ }
1324
1342
  ],
1325
1343
  "navigator.WatermarkAppNavigation": [
1326
1344
  {
@@ -1775,6 +1793,12 @@ const fr = {
1775
1793
  type: 0,
1776
1794
  value: "%"
1777
1795
  }
1796
+ ],
1797
+ "uploader.waitToUpload": [
1798
+ {
1799
+ type: 0,
1800
+ value: "Attendez la fin du chargement en cours pour ajouter de nouveaux fichiers."
1801
+ }
1778
1802
  ]
1779
1803
  };
1780
1804
 
@@ -3926,11 +3950,17 @@ function icuUnitToEcma(unit) {
3926
3950
  return unit.replace(/^(.*?)-/, '');
3927
3951
  }
3928
3952
  var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
3929
- var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
3953
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
3930
3954
  var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
3931
3955
  var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
3932
3956
  function parseSignificantPrecision(str) {
3933
3957
  var result = {};
3958
+ if (str[str.length - 1] === 'r') {
3959
+ result.roundingPriority = 'morePrecision';
3960
+ }
3961
+ else if (str[str.length - 1] === 's') {
3962
+ result.roundingPriority = 'lessPrecision';
3963
+ }
3934
3964
  str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
3935
3965
  // @@@ case
3936
3966
  if (typeof g2 !== 'string') {
@@ -4157,8 +4187,13 @@ function parseNumberSkeleton(tokens) {
4157
4187
  }
4158
4188
  return '';
4159
4189
  });
4160
- if (token.options.length) {
4161
- result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
4190
+ var opt = token.options[0];
4191
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
4192
+ if (opt === 'w') {
4193
+ result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
4194
+ }
4195
+ else if (opt) {
4196
+ result = __assign(__assign({}, result), parseSignificantPrecision(opt));
4162
4197
  }
4163
4198
  continue;
4164
4199
  }
@@ -4180,8 +4215,8 @@ function parseNumberSkeleton(tokens) {
4180
4215
  }
4181
4216
 
4182
4217
  var _a;
4183
- var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
4184
- var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
4218
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
4219
+ var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
4185
4220
  function createLocation(start, end) {
4186
4221
  return { start: start, end: end };
4187
4222
  }
@@ -4428,7 +4463,7 @@ var Parser = /** @class */ (function () {
4428
4463
  return {
4429
4464
  val: {
4430
4465
  type: TYPE.literal,
4431
- value: "<" + tagName + "/>",
4466
+ value: "<".concat(tagName, "/>"),
4432
4467
  location: createLocation(startPosition, this.clonePosition()),
4433
4468
  },
4434
4469
  err: null,
@@ -5033,7 +5068,7 @@ var Parser = /** @class */ (function () {
5033
5068
  }
5034
5069
  var code = codePointAt(this.message, offset);
5035
5070
  if (code === undefined) {
5036
- throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
5071
+ throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
5037
5072
  }
5038
5073
  return code;
5039
5074
  };
@@ -5101,7 +5136,7 @@ var Parser = /** @class */ (function () {
5101
5136
  */
5102
5137
  Parser.prototype.bumpTo = function (targetOffset) {
5103
5138
  if (this.offset() > targetOffset) {
5104
- throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
5139
+ throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
5105
5140
  }
5106
5141
  targetOffset = Math.min(targetOffset, this.message.length);
5107
5142
  while (true) {
@@ -5110,7 +5145,7 @@ var Parser = /** @class */ (function () {
5110
5145
  break;
5111
5146
  }
5112
5147
  if (offset > targetOffset) {
5113
- throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
5148
+ throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
5114
5149
  }
5115
5150
  this.bump();
5116
5151
  if (this.isEOF()) {
@@ -5576,28 +5611,28 @@ var FormatError = /** @class */ (function (_super) {
5576
5611
  return _this;
5577
5612
  }
5578
5613
  FormatError.prototype.toString = function () {
5579
- return "[formatjs Error: " + this.code + "] " + this.message;
5614
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
5580
5615
  };
5581
5616
  return FormatError;
5582
5617
  }(Error));
5583
5618
  var InvalidValueError = /** @class */ (function (_super) {
5584
5619
  __extends(InvalidValueError, _super);
5585
5620
  function InvalidValueError(variableId, value, options, originalMessage) {
5586
- return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
5621
+ return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
5587
5622
  }
5588
5623
  return InvalidValueError;
5589
5624
  }(FormatError));
5590
5625
  var InvalidValueTypeError = /** @class */ (function (_super) {
5591
5626
  __extends(InvalidValueTypeError, _super);
5592
5627
  function InvalidValueTypeError(value, type, originalMessage) {
5593
- return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
5628
+ return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
5594
5629
  }
5595
5630
  return InvalidValueTypeError;
5596
5631
  }(FormatError));
5597
5632
  var MissingValueError = /** @class */ (function (_super) {
5598
5633
  __extends(MissingValueError, _super);
5599
5634
  function MissingValueError(variableId, originalMessage) {
5600
- return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
5635
+ return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
5601
5636
  }
5602
5637
  return MissingValueError;
5603
5638
  }(FormatError));
@@ -5758,7 +5793,7 @@ originalMessage) {
5758
5793
  continue;
5759
5794
  }
5760
5795
  if (isPluralElement(el)) {
5761
- var opt = el.options["=" + value];
5796
+ var opt = el.options["=".concat(value)];
5762
5797
  if (!opt) {
5763
5798
  if (!Intl.PluralRules) {
5764
5799
  throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
@@ -5829,7 +5864,7 @@ function createDefaultFormatters(cache) {
5829
5864
  for (var _i = 0; _i < arguments.length; _i++) {
5830
5865
  args[_i] = arguments[_i];
5831
5866
  }
5832
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5867
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5833
5868
  }, {
5834
5869
  cache: createFastMemoizeCache$1(cache.number),
5835
5870
  strategy: strategies.variadic,
@@ -5840,7 +5875,7 @@ function createDefaultFormatters(cache) {
5840
5875
  for (var _i = 0; _i < arguments.length; _i++) {
5841
5876
  args[_i] = arguments[_i];
5842
5877
  }
5843
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5878
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5844
5879
  }, {
5845
5880
  cache: createFastMemoizeCache$1(cache.dateTime),
5846
5881
  strategy: strategies.variadic,
@@ -5851,7 +5886,7 @@ function createDefaultFormatters(cache) {
5851
5886
  for (var _i = 0; _i < arguments.length; _i++) {
5852
5887
  args[_i] = arguments[_i];
5853
5888
  }
5854
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
5889
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
5855
5890
  }, {
5856
5891
  cache: createFastMemoizeCache$1(cache.pluralRules),
5857
5892
  strategy: strategies.variadic,
@@ -6009,7 +6044,13 @@ var IntlErrorCode;
6009
6044
  var IntlError = /** @class */ (function (_super) {
6010
6045
  __extends(IntlError, _super);
6011
6046
  function IntlError(code, message, exception) {
6012
- var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
6047
+ var _this = this;
6048
+ var err = exception
6049
+ ? exception instanceof Error
6050
+ ? exception
6051
+ : new Error(String(exception))
6052
+ : undefined;
6053
+ _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
6013
6054
  _this.code = code;
6014
6055
  // @ts-ignore just so we don't need to declare dep on @types/node
6015
6056
  if (typeof Error.captureStackTrace === 'function') {
@@ -6041,19 +6082,26 @@ var MissingDataError = /** @class */ (function (_super) {
6041
6082
  }
6042
6083
  return MissingDataError;
6043
6084
  }(IntlError));
6085
+ var IntlFormatError = /** @class */ (function (_super) {
6086
+ __extends(IntlFormatError, _super);
6087
+ function IntlFormatError(message, locale, exception) {
6088
+ return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
6089
+ }
6090
+ return IntlFormatError;
6091
+ }(IntlError));
6044
6092
  var MessageFormatError = /** @class */ (function (_super) {
6045
6093
  __extends(MessageFormatError, _super);
6046
6094
  function MessageFormatError(message, locale, descriptor, exception) {
6047
- var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, message + " \nLocale: " + locale + "\nMessageID: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.id) + "\nDefault Message: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage) + "\nDescription: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.description) + " \n", exception) || this;
6095
+ var _this = _super.call(this, "".concat(message, " \nMessageID: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, "\nDefault Message: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, "\nDescription: ").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, " \n"), locale, exception) || this;
6048
6096
  _this.descriptor = descriptor;
6049
6097
  return _this;
6050
6098
  }
6051
6099
  return MessageFormatError;
6052
- }(IntlError));
6100
+ }(IntlFormatError));
6053
6101
  var MissingTranslationError = /** @class */ (function (_super) {
6054
6102
  __extends(MissingTranslationError, _super);
6055
6103
  function MissingTranslationError(descriptor, locale) {
6056
- var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"" + descriptor.id + "\" for locale \"" + locale + "\", using " + (descriptor.defaultMessage ? 'default message' : 'id') + " as fallback.") || this;
6104
+ var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"".concat(descriptor.id, "\" for locale \"").concat(locale, "\", using ").concat(descriptor.defaultMessage ? 'default message' : 'id', " as fallback.")) || this;
6057
6105
  _this.descriptor = descriptor;
6058
6106
  return _this;
6059
6107
  }
@@ -6080,6 +6128,7 @@ var DEFAULT_INTL_CONFIG = {
6080
6128
  timeZone: undefined,
6081
6129
  defaultLocale: 'en',
6082
6130
  defaultFormats: {},
6131
+ fallbackOnEmptyString: true,
6083
6132
  onError: defaultErrorHandler,
6084
6133
  };
6085
6134
  function createIntlCache() {
@@ -6122,7 +6171,7 @@ function createFormatters(cache) {
6122
6171
  for (var _i = 0; _i < arguments.length; _i++) {
6123
6172
  args[_i] = arguments[_i];
6124
6173
  }
6125
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6174
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6126
6175
  }, {
6127
6176
  cache: createFastMemoizeCache(cache.dateTime),
6128
6177
  strategy: strategies.variadic,
@@ -6133,7 +6182,7 @@ function createFormatters(cache) {
6133
6182
  for (var _i = 0; _i < arguments.length; _i++) {
6134
6183
  args[_i] = arguments[_i];
6135
6184
  }
6136
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6185
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6137
6186
  }, {
6138
6187
  cache: createFastMemoizeCache(cache.number),
6139
6188
  strategy: strategies.variadic,
@@ -6144,7 +6193,7 @@ function createFormatters(cache) {
6144
6193
  for (var _i = 0; _i < arguments.length; _i++) {
6145
6194
  args[_i] = arguments[_i];
6146
6195
  }
6147
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
6196
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
6148
6197
  }, {
6149
6198
  cache: createFastMemoizeCache(cache.pluralRules),
6150
6199
  strategy: strategies.variadic,
@@ -6167,7 +6216,7 @@ function createFormatters(cache) {
6167
6216
  for (var _i = 0; _i < arguments.length; _i++) {
6168
6217
  args[_i] = arguments[_i];
6169
6218
  }
6170
- return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
6219
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
6171
6220
  }, {
6172
6221
  cache: createFastMemoizeCache(cache.relativeTime),
6173
6222
  strategy: strategies.variadic,
@@ -6178,7 +6227,7 @@ function createFormatters(cache) {
6178
6227
  for (var _i = 0; _i < arguments.length; _i++) {
6179
6228
  args[_i] = arguments[_i];
6180
6229
  }
6181
- return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
6230
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
6182
6231
  }, {
6183
6232
  cache: createFastMemoizeCache(cache.list),
6184
6233
  strategy: strategies.variadic,
@@ -6188,7 +6237,7 @@ function createFormatters(cache) {
6188
6237
  for (var _i = 0; _i < arguments.length; _i++) {
6189
6238
  args[_i] = arguments[_i];
6190
6239
  }
6191
- return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
6240
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
6192
6241
  }, {
6193
6242
  cache: createFastMemoizeCache(cache.displayNames),
6194
6243
  strategy: strategies.variadic,
@@ -6204,7 +6253,7 @@ function getNamedFormat(formats, type, name, onError) {
6204
6253
  if (format) {
6205
6254
  return format;
6206
6255
  }
6207
- onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
6256
+ onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
6208
6257
  }
6209
6258
 
6210
6259
  /**
@@ -6239,7 +6288,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
6239
6288
  return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });
6240
6289
  }
6241
6290
  function formatMessage(_a, state, messageDescriptor, values, opts) {
6242
- var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;
6291
+ var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, fallbackOnEmptyString = _a.fallbackOnEmptyString, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;
6243
6292
  if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
6244
6293
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
6245
6294
  // `id` is a required field of a Message Descriptor.
@@ -6269,6 +6318,9 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6269
6318
  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
6270
6319
  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
6271
6320
  if (!message) {
6321
+ if (fallbackOnEmptyString === false && message === '') {
6322
+ return message;
6323
+ }
6272
6324
  if (!defaultMessage ||
6273
6325
  (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
6274
6326
  // This prevents warnings from littering the console in development
@@ -6282,7 +6334,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6282
6334
  return formatter.format(values);
6283
6335
  }
6284
6336
  catch (e) {
6285
- onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
6337
+ onError(new MessageFormatError("Error formatting default message for: \"".concat(id, "\", rendering default message verbatim"), locale, messageDescriptor, e));
6286
6338
  return typeof defaultMessage === 'string' ? defaultMessage : id;
6287
6339
  }
6288
6340
  }
@@ -6294,7 +6346,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6294
6346
  return formatter.format(values);
6295
6347
  }
6296
6348
  catch (e) {
6297
- onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
6349
+ onError(new MessageFormatError("Error formatting message: \"".concat(id, "\", using ").concat(defaultMessage ? 'default message' : 'id', " as fallback."), locale, messageDescriptor, e));
6298
6350
  }
6299
6351
  if (defaultMessage) {
6300
6352
  try {
@@ -6302,7 +6354,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6302
6354
  return formatter.format(values);
6303
6355
  }
6304
6356
  catch (e) {
6305
- onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
6357
+ onError(new MessageFormatError("Error formatting the default message for: \"".concat(id, "\", rendering message verbatim"), locale, messageDescriptor, e));
6306
6358
  }
6307
6359
  }
6308
6360
  if (typeof message === 'string') {
@@ -6340,9 +6392,7 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
6340
6392
  if (options === void 0) { options = {}; }
6341
6393
  var format = options.format;
6342
6394
  var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
6343
- var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
6344
- // @ts-expect-error es2020 has a lot stuff from es2021 bleed in
6345
- defaults);
6395
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
6346
6396
  if (type === 'time' &&
6347
6397
  !filteredOptions.hour &&
6348
6398
  !filteredOptions.minute &&
@@ -6459,7 +6509,7 @@ var LIST_FORMAT_OPTIONS = [
6459
6509
  ];
6460
6510
  var now = Date.now();
6461
6511
  function generateToken(i) {
6462
- return now + "_" + i + "_" + now;
6512
+ return "".concat(now, "_").concat(i, "_").concat(now);
6463
6513
  }
6464
6514
  function formatList(opts, getListFormat, values, options) {
6465
6515
  if (options === void 0) { options = {}; }
@@ -6526,7 +6576,7 @@ function formatPlural(_a, getPluralRules, value, options) {
6526
6576
  return getPluralRules(locale, filteredOptions).select(value);
6527
6577
  }
6528
6578
  catch (e) {
6529
- onError(new MessageFormatError('Error formatting plural.', e));
6579
+ onError(new IntlFormatError('Error formatting plural.', locale, e));
6530
6580
  }
6531
6581
  return 'other';
6532
6582
  }
@@ -6553,7 +6603,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
6553
6603
  return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
6554
6604
  }
6555
6605
  catch (e) {
6556
- config.onError(new MessageFormatError('Error formatting relative time.', e));
6606
+ config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));
6557
6607
  }
6558
6608
  return String(value);
6559
6609
  }
@@ -6633,7 +6683,7 @@ function createIntl(config, cache) {
6633
6683
  var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
6634
6684
  if (!locale) {
6635
6685
  if (onError) {
6636
- onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
6686
+ onError(new InvalidConfigError("\"locale\" was not configured, using \"".concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details")));
6637
6687
  }
6638
6688
  // Since there's no registered locale data for `locale`, this will
6639
6689
  // fallback to the `defaultLocale` to make sure things can render.
@@ -6643,481 +6693,481 @@ function createIntl(config, cache) {
6643
6693
  resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
6644
6694
  }
6645
6695
  else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
6646
- onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.NumberFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
6696
+ onError(new MissingDataError("Missing locale data for locale: \"".concat(locale, "\" in Intl.NumberFormat. Using default locale: \"").concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details")));
6647
6697
  }
6648
6698
  else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
6649
6699
  onError) {
6650
- onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.DateTimeFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
6700
+ onError(new MissingDataError("Missing locale data for locale: \"".concat(locale, "\" in Intl.DateTimeFormat. Using default locale: \"").concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details")));
6651
6701
  }
6652
6702
  verifyConfigMessages(resolvedConfig);
6653
6703
  return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
6654
6704
  }
6655
6705
 
6656
- const DEFAULT_LANGUAGE = "en";
6657
- function getBrowserLang() {
6658
- const langAttr = document.documentElement.getAttribute("lang");
6659
- if (!!langAttr) {
6660
- return langAttr;
6661
- }
6662
- else if (window.navigator && window.navigator.language) {
6663
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6664
- return lang.slice(0, 2);
6665
- }
6666
- else {
6667
- return DEFAULT_LANGUAGE;
6668
- }
6669
- }
6670
- // prevents memory leak
6671
- const cache = createIntlCache();
6672
- const locale = getBrowserLang();
6673
- const intl = createIntl({
6674
- locale: locale,
6675
- defaultLocale: "en",
6676
- messages: lang[locale] || en,
6677
- }, cache);
6678
- function generateId() {
6679
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
6680
- }
6681
- // limits how many times a function fires
6682
- // use when the function should run periodically, but not too often (e.g. window resize)
6683
- function throttle(fn, wait) {
6684
- let timeout;
6685
- let shouldWait = false;
6686
- return function () {
6687
- const context = this;
6688
- if (!shouldWait) {
6689
- fn.apply(context, arguments);
6690
- shouldWait = true;
6691
- clearTimeout(timeout);
6692
- timeout = setTimeout(function () {
6693
- shouldWait = false;
6694
- }, wait);
6695
- }
6696
- };
6697
- }
6698
- // waits until it hasn't been called for [timeout] ms.
6699
- // use when the function should run only after something (event) is done firing
6700
- function debounce(fn, wait) {
6701
- let timeout;
6702
- return function () {
6703
- const context = this;
6704
- const functionCall = () => fn.apply(context, arguments);
6705
- clearTimeout(timeout);
6706
- timeout = setTimeout(functionCall, wait);
6707
- };
6708
- }
6709
- function getTextDir() {
6710
- const dir = document.querySelector("html").getAttribute("dir");
6711
- return dir ? dir.toLowerCase() : "";
6712
- }
6713
- function getPosition(el) {
6714
- const coords = el.getBoundingClientRect();
6715
- let x = coords.x;
6716
- let y = coords.y;
6717
- // Edge doesn't have x and y
6718
- if (!x) {
6719
- if (getTextDir() === "rtl") {
6720
- x = coords.right;
6721
- }
6722
- else {
6723
- x = coords.left;
6724
- }
6725
- y = coords.top;
6726
- }
6727
- return { x, y };
6728
- }
6729
- function findParentWithScrollbar(el) {
6730
- while (!!el) {
6731
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6732
- return el;
6733
- }
6734
- el = el.parentElement;
6735
- }
6736
- }
6737
- function findParentWithHiddenOverflow(el) {
6738
- while (!!el) {
6739
- if (window.getComputedStyle(el).overflowY !== "visible") {
6740
- return el;
6741
- }
6742
- el = el.parentElement;
6743
- }
6744
- }
6745
- function getClosableElementMeasurements(fixedEl, closableEl) {
6746
- const parent = findParentWithHiddenOverflow(fixedEl);
6747
- // if parent is not found, measurements are checked against the viewport
6748
- return {
6749
- closableElHeight: closableEl.clientHeight,
6750
- closableElWidth: closableEl.clientWidth,
6751
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6752
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6753
- spaceAbove: parent
6754
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6755
- : fixedEl.getBoundingClientRect().top,
6756
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6757
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6758
- spaceBelow: parent
6759
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6760
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6761
- spaceLeft: parent
6762
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6763
- : fixedEl.getBoundingClientRect().left,
6764
- spaceRight: parent
6765
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6766
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6767
- };
6768
- }
6769
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6770
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6771
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6772
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6773
- ) {
6774
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6775
- //we want to open up only if there's not enough space below AND there is enough space above
6776
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6777
- return openUp;
6778
- }
6779
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6780
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6781
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6782
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6783
- ) {
6784
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6785
- //we want to open up only if there's not enough space below AND there is enough space above
6786
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6787
- return openDown;
6788
- }
6789
- function shouldShiftRight(fixedEl, closableEl) {
6790
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6791
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6792
- return needsSpaceLeft;
6793
- }
6794
- function shouldShiftLeft(fixedEl, closableEl) {
6795
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6796
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6797
- return needsSpaceRight;
6798
- }
6799
- function adjustTooltipPosition(tPos, el, tooltipEl) {
6800
- // position must be reset before measurements are taken in adjustTooltipPosition
6801
- // otherwise text-wrapping from previous position makes width measurement inconsistent
6802
- tooltipEl.style.top = "";
6803
- tooltipEl.style.left = "";
6804
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6805
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6806
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6807
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
6808
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
6809
- // a tooltip should never be closer than 24px to the edge of a screen
6810
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6811
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6812
- const swapAbove = (position) => {
6813
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6814
- };
6815
- const swapBelow = (position) => {
6816
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6817
- };
6818
- const swapLeft = (position, centeredPosition) => {
6819
- if (!enoughSpaceLeft && enoughSpaceRight) {
6820
- position = position.replace("left", "right");
6821
- }
6822
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
6823
- position = centeredPosition;
6824
- }
6825
- return position;
6826
- };
6827
- const swapRight = (position, centeredPosition) => {
6828
- if (!enoughSpaceRight && enoughSpaceLeft) {
6829
- position = position.replace("right", "left");
6830
- }
6831
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
6832
- position = centeredPosition;
6833
- }
6834
- return position;
6835
- };
6836
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6837
- switch (tPos) {
6838
- case "left":
6839
- tPos = swapLeft(tPos, "bottom");
6840
- case "right":
6841
- tPos = swapRight(tPos, "bottom");
6842
- case "top-left":
6843
- tPos = swapLeft(tPos, "top");
6844
- tPos = swapAbove(tPos);
6845
- case "top-right":
6846
- tPos = swapRight(tPos, "top");
6847
- tPos = swapAbove(tPos);
6848
- case "bottom-left":
6849
- tPos = swapLeft(tPos, "bottom");
6850
- tPos = swapBelow(tPos);
6851
- case "bottom-right":
6852
- tPos = swapRight(tPos, "bottom");
6853
- tPos = swapBelow(tPos);
6854
- case "top":
6855
- tPos = swapAbove(tPos);
6856
- case "bottom":
6857
- tPos = swapBelow(tPos);
6858
- }
6859
- return tPos;
6860
- }
6861
- function hasRoomRight(x, spaceNeeded) {
6862
- let horizOffset = 0;
6863
- // if (getTextDir() === "ltr") {
6864
- if (x.type === "click") {
6865
- // if it's a mouse event, deal with mouse coords
6866
- horizOffset = x.clientX;
6867
- // if it's a focus event, the offset is 0
6868
- }
6869
- else if (x.type === "focus") {
6870
- horizOffset = 0;
6871
- }
6872
- else {
6873
- // otherwise an element was passed, calculate how far it is from the edge of the window
6874
- let el = x; // re-assignment is for clarity
6875
- while (el) {
6876
- if (el.tagName == "BODY") {
6877
- // deal with browser quirks with body/window/document and page scroll
6878
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6879
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6880
- }
6881
- else {
6882
- // for all other non-BODY elements
6883
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6884
- }
6885
- el = el.offsetParent;
6886
- }
6887
- // }
6888
- }
6889
- return window.innerWidth - horizOffset >= spaceNeeded;
6890
- }
6891
- function checkForActiveElInShadow(element) {
6892
- while (element && element.shadowRoot) {
6893
- element = element.shadowRoot.activeElement;
6894
- }
6895
- return element;
6896
- }
6897
- function checkForFocusableElInShadow(element) {
6898
- const selectors = [
6899
- "button",
6900
- "a",
6901
- "input",
6902
- "select",
6903
- "textarea",
6904
- "wm-button",
6905
- "wm-search",
6906
- "wm-select",
6907
- "wm-action-menu",
6908
- "wm-tab-item",
6909
- "wm-datepicker",
6910
- ];
6911
- let focusableEl = element;
6912
- selectors.forEach((selector) => {
6913
- if (focusableEl && focusableEl.shadowRoot) {
6914
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6915
- if (elInShadow) {
6916
- if (selector.startsWith("wm-")) {
6917
- focusableEl = checkForFocusableElInShadow(elInShadow);
6918
- }
6919
- else {
6920
- focusableEl = elInShadow;
6921
- }
6922
- }
6923
- }
6924
- });
6925
- return focusableEl;
6926
- }
6927
- function isFocusable(element) {
6928
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6929
- return true;
6930
- }
6931
- if (element.disabled) {
6932
- return false;
6933
- }
6934
- switch (element.nodeName) {
6935
- case "A":
6936
- return !!element.href && element.rel != "ignore";
6937
- case "INPUT":
6938
- return element.type != "hidden" && element.type != "file";
6939
- case "BUTTON":
6940
- case "SELECT":
6941
- case "TEXTAREA":
6942
- case "WM-BUTTON":
6943
- case "WM-SELECT":
6944
- case "WM-ACTION-MENU":
6945
- case "WM-DATEPICKER":
6946
- case "WM-TIMEPICKER":
6947
- case "WM-INPUT":
6948
- case "WM-TAG-INPUT":
6949
- case "WM-TAB-ITEM":
6950
- case "WM-SEARCH":
6951
- return true;
6952
- default:
6953
- return false;
6954
- }
6955
- }
6956
- function getFirstFocusableDescendant(element) {
6957
- if (isFocusable(element)) {
6958
- return checkForFocusableElInShadow(element);
6959
- }
6960
- else if (element.childNodes.length > 0) {
6961
- element.childNodes.forEach((i) => {
6962
- const childEl = getFirstFocusableDescendant(i);
6963
- return childEl && checkForFocusableElInShadow(childEl);
6964
- });
6965
- }
6966
- }
6967
- function hasValidType(file, types) {
6968
- const acceptedExtensions = types.split(" ");
6969
- const parts = file.name && file.name.split(".");
6970
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
6971
- return ext
6972
- ? acceptedExtensions.includes(ext.toLowerCase())
6973
- : // fallback: if we couldn't obtain an extension,
6974
- // validate based on MIME type...
6975
- !!file.type
6976
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6977
- : // ...and if that failed too, accept the file
6978
- // as it's preferable to accept an invalid file
6979
- // than refusing a valid one (back-end will take care of what slips through)
6980
- true;
6981
- }
6982
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6983
- function getAcceptedMimeTypesList(acceptedExtensions) {
6984
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
6985
- // front end checks are just a convenience to users, independent of security.
6986
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
6987
- const lookupTable = {
6988
- aac: ["audio/aac"],
6989
- abw: ["application/x-abiword"],
6990
- arc: ["application/x-freearc"],
6991
- avi: ["video/x-msvideo"],
6992
- azw: ["application/vnd.amazon.ebook"],
6993
- bin: ["application/octet-stream"],
6994
- bmp: ["image/bmp"],
6995
- bz: ["application/x-bzip"],
6996
- bz2: ["application/x-bzip2"],
6997
- csh: ["application/x-csh"],
6998
- css: ["text/css"],
6999
- csv: ["text/csv"],
7000
- doc: ["application/msword"],
7001
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7002
- eot: ["application/vnd.ms-fontobject"],
7003
- epub: ["application/epub+zip"],
7004
- gz: ["application/gzip"],
7005
- gif: ["image/gif"],
7006
- htm: ["text/html"],
7007
- html: ["text/html"],
7008
- ico: ["image/vnd.microsoft.icon"],
7009
- ics: ["text/calendar"],
7010
- jar: ["application/java-archive"],
7011
- jpeg: ["image/jpeg"],
7012
- jpg: ["image/jpeg"],
7013
- js: ["text/javascript"],
7014
- json: ["application/json"],
7015
- jsonld: ["application/ld+json"],
7016
- log: ["text/plain"],
7017
- mid: ["audio/x-midi"],
7018
- midi: ["audio/x-midi"],
7019
- mjs: ["text/javascript"],
7020
- mp3: ["audio/mpeg"],
7021
- mpeg: ["video/mpeg"],
7022
- mpkg: ["application/vnd.apple.installer+xml"],
7023
- odp: ["application/vnd.oasis.opendocument.presentation"],
7024
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7025
- odt: ["application/vnd.oasis.opendocument.text"],
7026
- oga: ["audio/ogg"],
7027
- ogv: ["video/ogg"],
7028
- ogx: ["application/ogg"],
7029
- opus: ["audio/opus"],
7030
- otf: ["font/otf"],
7031
- png: ["image/png"],
7032
- pdf: ["application/pdf"],
7033
- php: ["application/php"],
7034
- ppt: ["application/vnd.ms-powerpoint"],
7035
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7036
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7037
- rtf: ["application/rtf"],
7038
- sh: ["application/x-sh"],
7039
- svg: ["image/svg+xml"],
7040
- swf: ["application/x-shockwave-flash"],
7041
- tar: ["application/x-tar"],
7042
- tif: ["image/tiff"],
7043
- tiff: ["image/tiff"],
7044
- ts: ["video/mp2t"],
7045
- ttf: ["font/ttf"],
7046
- txt: ["text/plain"],
7047
- vsd: ["application/vnd.visio"],
7048
- wav: ["audio/wav"],
7049
- weba: ["audio/webm"],
7050
- webm: ["video/webm"],
7051
- webp: ["image/webp"],
7052
- woff: ["font/woff"],
7053
- woff2: ["font/woff2"],
7054
- xhtml: ["application/xhtml+xml"],
7055
- xls: ["application/vnd.ms-excel"],
7056
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7057
- xml: ["application/xml", "text/xml"],
7058
- xul: ["application/vnd.mozilla.xul+xml"],
7059
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7060
- "3gp": ["video/3gpp", "audio/3gpp"],
7061
- "3g2": ["video/3gpp2", "audio/3gpp2"],
7062
- "7z": ["application/x-7z-compressed"],
7063
- };
7064
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7065
- }
7066
- function snakeCaseToCamelCase(str) {
7067
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7068
- if (snakeCaseRegexp.test(str)) {
7069
- let camelCase = "";
7070
- let arr = str.split("_");
7071
- arr.forEach((word, idx) => {
7072
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7073
- });
7074
- return camelCase;
7075
- }
7076
- else {
7077
- return str;
7078
- }
7079
- }
7080
- function getNewIndexToFocus(currentIndex, direction, listLength) {
7081
- let newIndex = currentIndex;
7082
- if (direction === "ArrowDown") {
7083
- newIndex = (currentIndex + 1) % listLength;
7084
- }
7085
- if (direction === "ArrowUp") {
7086
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7087
- }
7088
- return newIndex;
7089
- }
7090
- function isRelatedTarget(ev, id) {
7091
- // used for onBlur events to check the element that has been clicked
7092
- const ids = id.split(" ");
7093
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7094
- }
7095
- function toBool(val) {
7096
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7097
- return val == "false" ? false : !!val;
7098
- }
7099
- /*
7100
- * this is going to be needed to solve the extra tabbing on navigator
7101
- * and for programmatic focus of tabs
7102
- * Here's a draft, not bug proof, see:
7103
- * https://stackoverflow.com/a/10730308/3741713
7104
-
7105
- function getKeyboardFocusableElements(element = document) {
7106
- const els = Array.from(element.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), wm-search, wm-timepicker, wm-tab-list, wm-tab-item, wm-button, wm-action-menu'));
7107
- return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7108
- }
7109
-
7110
- export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7111
- const els = getKeyboardFocusableElements();
7112
- const current = els.indexOf(element);
7113
- return els[current - 1] as HTMLElement;
7114
- }
7115
-
7116
- export function getNextKeyboardFocusableElement(element: HTMLElement) {
7117
- const els = getKeyboardFocusableElements();
7118
- const current = els.indexOf(element);
7119
- return els[current + 1] as HTMLElement;
7120
- }
6706
+ const DEFAULT_LANGUAGE = "en";
6707
+ function getBrowserLang() {
6708
+ const langAttr = document.documentElement.getAttribute("lang");
6709
+ if (!!langAttr) {
6710
+ return langAttr;
6711
+ }
6712
+ else if (window.navigator && window.navigator.language) {
6713
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6714
+ return lang.slice(0, 2);
6715
+ }
6716
+ else {
6717
+ return DEFAULT_LANGUAGE;
6718
+ }
6719
+ }
6720
+ // prevents memory leak
6721
+ const cache = createIntlCache();
6722
+ const locale = getBrowserLang();
6723
+ const intl = createIntl({
6724
+ locale: locale,
6725
+ defaultLocale: "en",
6726
+ messages: lang[locale] || en,
6727
+ }, cache);
6728
+ function generateId() {
6729
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
6730
+ }
6731
+ // limits how many times a function fires
6732
+ // use when the function should run periodically, but not too often (e.g. window resize)
6733
+ function throttle(fn, wait) {
6734
+ let timeout;
6735
+ let shouldWait = false;
6736
+ return function () {
6737
+ const context = this;
6738
+ if (!shouldWait) {
6739
+ fn.apply(context, arguments);
6740
+ shouldWait = true;
6741
+ clearTimeout(timeout);
6742
+ timeout = setTimeout(function () {
6743
+ shouldWait = false;
6744
+ }, wait);
6745
+ }
6746
+ };
6747
+ }
6748
+ // waits until it hasn't been called for [timeout] ms.
6749
+ // use when the function should run only after something (event) is done firing
6750
+ function debounce(fn, wait) {
6751
+ let timeout;
6752
+ return function () {
6753
+ const context = this;
6754
+ const functionCall = () => fn.apply(context, arguments);
6755
+ clearTimeout(timeout);
6756
+ timeout = setTimeout(functionCall, wait);
6757
+ };
6758
+ }
6759
+ function getTextDir() {
6760
+ const dir = document.querySelector("html").getAttribute("dir");
6761
+ return dir ? dir.toLowerCase() : "";
6762
+ }
6763
+ function getPosition(el) {
6764
+ const coords = el.getBoundingClientRect();
6765
+ let x = coords.x;
6766
+ let y = coords.y;
6767
+ // Edge doesn't have x and y
6768
+ if (!x) {
6769
+ if (getTextDir() === "rtl") {
6770
+ x = coords.right;
6771
+ }
6772
+ else {
6773
+ x = coords.left;
6774
+ }
6775
+ y = coords.top;
6776
+ }
6777
+ return { x, y };
6778
+ }
6779
+ function findParentWithScrollbar(el) {
6780
+ while (!!el) {
6781
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6782
+ return el;
6783
+ }
6784
+ el = el.parentElement;
6785
+ }
6786
+ }
6787
+ function findParentWithHiddenOverflow(el) {
6788
+ while (!!el) {
6789
+ if (window.getComputedStyle(el).overflowY !== "visible") {
6790
+ return el;
6791
+ }
6792
+ el = el.parentElement;
6793
+ }
6794
+ }
6795
+ function getClosableElementMeasurements(fixedEl, closableEl) {
6796
+ const parent = findParentWithHiddenOverflow(fixedEl);
6797
+ // if parent is not found, measurements are checked against the viewport
6798
+ return {
6799
+ closableElHeight: closableEl.clientHeight,
6800
+ closableElWidth: closableEl.clientWidth,
6801
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6802
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6803
+ spaceAbove: parent
6804
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6805
+ : fixedEl.getBoundingClientRect().top,
6806
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6807
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6808
+ spaceBelow: parent
6809
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6810
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6811
+ spaceLeft: parent
6812
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6813
+ : fixedEl.getBoundingClientRect().left,
6814
+ spaceRight: parent
6815
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6816
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6817
+ };
6818
+ }
6819
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6820
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6821
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6822
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6823
+ ) {
6824
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6825
+ //we want to open up only if there's not enough space below AND there is enough space above
6826
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6827
+ return openUp;
6828
+ }
6829
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6830
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6831
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6832
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6833
+ ) {
6834
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6835
+ //we want to open up only if there's not enough space below AND there is enough space above
6836
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6837
+ return openDown;
6838
+ }
6839
+ function shouldShiftRight(fixedEl, closableEl) {
6840
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6841
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6842
+ return needsSpaceLeft;
6843
+ }
6844
+ function shouldShiftLeft(fixedEl, closableEl) {
6845
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6846
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6847
+ return needsSpaceRight;
6848
+ }
6849
+ function adjustTooltipPosition(tPos, el, tooltipEl) {
6850
+ // position must be reset before measurements are taken in adjustTooltipPosition
6851
+ // otherwise text-wrapping from previous position makes width measurement inconsistent
6852
+ tooltipEl.style.top = "";
6853
+ tooltipEl.style.left = "";
6854
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6855
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6856
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6857
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
6858
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
6859
+ // a tooltip should never be closer than 24px to the edge of a screen
6860
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6861
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6862
+ const swapAbove = (position) => {
6863
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6864
+ };
6865
+ const swapBelow = (position) => {
6866
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6867
+ };
6868
+ const swapLeft = (position, centeredPosition) => {
6869
+ if (!enoughSpaceLeft && enoughSpaceRight) {
6870
+ position = position.replace("left", "right");
6871
+ }
6872
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
6873
+ position = centeredPosition;
6874
+ }
6875
+ return position;
6876
+ };
6877
+ const swapRight = (position, centeredPosition) => {
6878
+ if (!enoughSpaceRight && enoughSpaceLeft) {
6879
+ position = position.replace("right", "left");
6880
+ }
6881
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
6882
+ position = centeredPosition;
6883
+ }
6884
+ return position;
6885
+ };
6886
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6887
+ switch (tPos) {
6888
+ case "left":
6889
+ tPos = swapLeft(tPos, "bottom");
6890
+ case "right":
6891
+ tPos = swapRight(tPos, "bottom");
6892
+ case "top-left":
6893
+ tPos = swapLeft(tPos, "top");
6894
+ tPos = swapAbove(tPos);
6895
+ case "top-right":
6896
+ tPos = swapRight(tPos, "top");
6897
+ tPos = swapAbove(tPos);
6898
+ case "bottom-left":
6899
+ tPos = swapLeft(tPos, "bottom");
6900
+ tPos = swapBelow(tPos);
6901
+ case "bottom-right":
6902
+ tPos = swapRight(tPos, "bottom");
6903
+ tPos = swapBelow(tPos);
6904
+ case "top":
6905
+ tPos = swapAbove(tPos);
6906
+ case "bottom":
6907
+ tPos = swapBelow(tPos);
6908
+ }
6909
+ return tPos;
6910
+ }
6911
+ function hasRoomRight(x, spaceNeeded) {
6912
+ let horizOffset = 0;
6913
+ // if (getTextDir() === "ltr") {
6914
+ if (x.type === "click") {
6915
+ // if it's a mouse event, deal with mouse coords
6916
+ horizOffset = x.clientX;
6917
+ // if it's a focus event, the offset is 0
6918
+ }
6919
+ else if (x.type === "focus") {
6920
+ horizOffset = 0;
6921
+ }
6922
+ else {
6923
+ // otherwise an element was passed, calculate how far it is from the edge of the window
6924
+ let el = x; // re-assignment is for clarity
6925
+ while (el) {
6926
+ if (el.tagName == "BODY") {
6927
+ // deal with browser quirks with body/window/document and page scroll
6928
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6929
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6930
+ }
6931
+ else {
6932
+ // for all other non-BODY elements
6933
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6934
+ }
6935
+ el = el.offsetParent;
6936
+ }
6937
+ // }
6938
+ }
6939
+ return window.innerWidth - horizOffset >= spaceNeeded;
6940
+ }
6941
+ function checkForActiveElInShadow(element) {
6942
+ while (element && element.shadowRoot) {
6943
+ element = element.shadowRoot.activeElement;
6944
+ }
6945
+ return element;
6946
+ }
6947
+ function checkForFocusableElInShadow(element) {
6948
+ const selectors = [
6949
+ "button",
6950
+ "a",
6951
+ "input",
6952
+ "select",
6953
+ "textarea",
6954
+ "wm-button",
6955
+ "wm-search",
6956
+ "wm-select",
6957
+ "wm-action-menu",
6958
+ "wm-tab-item",
6959
+ "wm-datepicker",
6960
+ ];
6961
+ let focusableEl = element;
6962
+ selectors.forEach((selector) => {
6963
+ if (focusableEl && focusableEl.shadowRoot) {
6964
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6965
+ if (elInShadow) {
6966
+ if (selector.startsWith("wm-")) {
6967
+ focusableEl = checkForFocusableElInShadow(elInShadow);
6968
+ }
6969
+ else {
6970
+ focusableEl = elInShadow;
6971
+ }
6972
+ }
6973
+ }
6974
+ });
6975
+ return focusableEl;
6976
+ }
6977
+ function isFocusable(element) {
6978
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6979
+ return true;
6980
+ }
6981
+ if (element.disabled) {
6982
+ return false;
6983
+ }
6984
+ switch (element.nodeName) {
6985
+ case "A":
6986
+ return !!element.href && element.rel != "ignore";
6987
+ case "INPUT":
6988
+ return element.type != "hidden" && element.type != "file";
6989
+ case "BUTTON":
6990
+ case "SELECT":
6991
+ case "TEXTAREA":
6992
+ case "WM-BUTTON":
6993
+ case "WM-SELECT":
6994
+ case "WM-ACTION-MENU":
6995
+ case "WM-DATEPICKER":
6996
+ case "WM-TIMEPICKER":
6997
+ case "WM-INPUT":
6998
+ case "WM-TAG-INPUT":
6999
+ case "WM-TAB-ITEM":
7000
+ case "WM-SEARCH":
7001
+ return true;
7002
+ default:
7003
+ return false;
7004
+ }
7005
+ }
7006
+ function getFirstFocusableDescendant(element) {
7007
+ if (isFocusable(element)) {
7008
+ return checkForFocusableElInShadow(element);
7009
+ }
7010
+ else if (element.childNodes.length > 0) {
7011
+ element.childNodes.forEach((i) => {
7012
+ const childEl = getFirstFocusableDescendant(i);
7013
+ return childEl && checkForFocusableElInShadow(childEl);
7014
+ });
7015
+ }
7016
+ }
7017
+ function hasValidType(file, types) {
7018
+ const acceptedExtensions = types.split(" ");
7019
+ const parts = file.name && file.name.split(".");
7020
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
7021
+ return ext
7022
+ ? acceptedExtensions.includes(ext.toLowerCase())
7023
+ : // fallback: if we couldn't obtain an extension,
7024
+ // validate based on MIME type...
7025
+ !!file.type
7026
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
7027
+ : // ...and if that failed too, accept the file
7028
+ // as it's preferable to accept an invalid file
7029
+ // than refusing a valid one (back-end will take care of what slips through)
7030
+ true;
7031
+ }
7032
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
7033
+ function getAcceptedMimeTypesList(acceptedExtensions) {
7034
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
7035
+ // front end checks are just a convenience to users, independent of security.
7036
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
7037
+ const lookupTable = {
7038
+ aac: ["audio/aac"],
7039
+ abw: ["application/x-abiword"],
7040
+ arc: ["application/x-freearc"],
7041
+ avi: ["video/x-msvideo"],
7042
+ azw: ["application/vnd.amazon.ebook"],
7043
+ bin: ["application/octet-stream"],
7044
+ bmp: ["image/bmp"],
7045
+ bz: ["application/x-bzip"],
7046
+ bz2: ["application/x-bzip2"],
7047
+ csh: ["application/x-csh"],
7048
+ css: ["text/css"],
7049
+ csv: ["text/csv"],
7050
+ doc: ["application/msword"],
7051
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7052
+ eot: ["application/vnd.ms-fontobject"],
7053
+ epub: ["application/epub+zip"],
7054
+ gz: ["application/gzip"],
7055
+ gif: ["image/gif"],
7056
+ htm: ["text/html"],
7057
+ html: ["text/html"],
7058
+ ico: ["image/vnd.microsoft.icon"],
7059
+ ics: ["text/calendar"],
7060
+ jar: ["application/java-archive"],
7061
+ jpeg: ["image/jpeg"],
7062
+ jpg: ["image/jpeg"],
7063
+ js: ["text/javascript"],
7064
+ json: ["application/json"],
7065
+ jsonld: ["application/ld+json"],
7066
+ log: ["text/plain"],
7067
+ mid: ["audio/x-midi"],
7068
+ midi: ["audio/x-midi"],
7069
+ mjs: ["text/javascript"],
7070
+ mp3: ["audio/mpeg"],
7071
+ mpeg: ["video/mpeg"],
7072
+ mpkg: ["application/vnd.apple.installer+xml"],
7073
+ odp: ["application/vnd.oasis.opendocument.presentation"],
7074
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7075
+ odt: ["application/vnd.oasis.opendocument.text"],
7076
+ oga: ["audio/ogg"],
7077
+ ogv: ["video/ogg"],
7078
+ ogx: ["application/ogg"],
7079
+ opus: ["audio/opus"],
7080
+ otf: ["font/otf"],
7081
+ png: ["image/png"],
7082
+ pdf: ["application/pdf"],
7083
+ php: ["application/php"],
7084
+ ppt: ["application/vnd.ms-powerpoint"],
7085
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7086
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7087
+ rtf: ["application/rtf"],
7088
+ sh: ["application/x-sh"],
7089
+ svg: ["image/svg+xml"],
7090
+ swf: ["application/x-shockwave-flash"],
7091
+ tar: ["application/x-tar"],
7092
+ tif: ["image/tiff"],
7093
+ tiff: ["image/tiff"],
7094
+ ts: ["video/mp2t"],
7095
+ ttf: ["font/ttf"],
7096
+ txt: ["text/plain"],
7097
+ vsd: ["application/vnd.visio"],
7098
+ wav: ["audio/wav"],
7099
+ weba: ["audio/webm"],
7100
+ webm: ["video/webm"],
7101
+ webp: ["image/webp"],
7102
+ woff: ["font/woff"],
7103
+ woff2: ["font/woff2"],
7104
+ xhtml: ["application/xhtml+xml"],
7105
+ xls: ["application/vnd.ms-excel"],
7106
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7107
+ xml: ["application/xml", "text/xml"],
7108
+ xul: ["application/vnd.mozilla.xul+xml"],
7109
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7110
+ "3gp": ["video/3gpp", "audio/3gpp"],
7111
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
7112
+ "7z": ["application/x-7z-compressed"],
7113
+ };
7114
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7115
+ }
7116
+ function snakeCaseToCamelCase(str) {
7117
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7118
+ if (snakeCaseRegexp.test(str)) {
7119
+ let camelCase = "";
7120
+ let arr = str.split("_");
7121
+ arr.forEach((word, idx) => {
7122
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7123
+ });
7124
+ return camelCase;
7125
+ }
7126
+ else {
7127
+ return str;
7128
+ }
7129
+ }
7130
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
7131
+ let newIndex = currentIndex;
7132
+ if (direction === "ArrowDown") {
7133
+ newIndex = (currentIndex + 1) % listLength;
7134
+ }
7135
+ if (direction === "ArrowUp") {
7136
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7137
+ }
7138
+ return newIndex;
7139
+ }
7140
+ function isRelatedTarget(ev, id) {
7141
+ // used for onBlur events to check the element that has been clicked
7142
+ const ids = id.split(" ");
7143
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7144
+ }
7145
+ function toBool(val) {
7146
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7147
+ return val == "false" ? false : !!val;
7148
+ }
7149
+ /*
7150
+ * this is going to be needed to solve the extra tabbing on navigator
7151
+ * and for programmatic focus of tabs
7152
+ * Here's a draft, not bug proof, see:
7153
+ * https://stackoverflow.com/a/10730308/3741713
7154
+
7155
+ function getKeyboardFocusableElements(element = document) {
7156
+ const els = Array.from(element.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), wm-search, wm-timepicker, wm-tab-list, wm-tab-item, wm-button, wm-action-menu'));
7157
+ return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7158
+ }
7159
+
7160
+ export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7161
+ const els = getKeyboardFocusableElements();
7162
+ const current = els.indexOf(element);
7163
+ return els[current - 1] as HTMLElement;
7164
+ }
7165
+
7166
+ export function getNextKeyboardFocusableElement(element: HTMLElement) {
7167
+ const els = getKeyboardFocusableElements();
7168
+ const current = els.indexOf(element);
7169
+ return els[current + 1] as HTMLElement;
7170
+ }
7121
7171
  */
7122
7172
 
7123
7173
  export { adjustTooltipPosition as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q, throttle as r, snakeCaseToCamelCase as s, toBool as t, hasRoomRight as u };