@watermarkinsights/ripple 3.9.0-2 → 3.9.0-5

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 (354) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-a1dd1291.js → chartFunctions-08c7054a.js} +416 -416
  3. package/dist/cjs/{functions-0750b767.js → functions-04933f19.js} +544 -506
  4. package/dist/cjs/{global-0a6b313f.js → global-5faea609.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 -422
  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 +82 -82
  29. package/dist/cjs/wm-progress-monitor.cjs.entry.js +51 -47
  30. package/dist/cjs/wm-progress-slice.cjs.entry.js +9 -9
  31. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  32. package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
  33. package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
  34. package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
  35. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  36. package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
  37. package/dist/cjs/wm-uploader.cjs.entry.js +380 -348
  38. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  39. package/dist/collection/collection-manifest.json +2 -2
  40. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  41. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  42. package/dist/collection/components/charts/wm-chart/wm-chart.js +332 -332
  43. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +199 -199
  44. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +92 -95
  45. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  46. package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
  47. package/dist/collection/components/wm-button/wm-button.css +20 -21
  48. package/dist/collection/components/wm-button/wm-button.js +491 -491
  49. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +3 -4
  50. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  51. package/dist/collection/components/wm-datepicker/wm-datepicker.css +1 -2
  52. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  53. package/dist/collection/components/wm-input/wm-input.css +1 -2
  54. package/dist/collection/components/wm-input/wm-input.js +423 -423
  55. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  56. package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
  57. package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
  58. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  59. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +1 -2
  60. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  61. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  62. package/dist/collection/components/wm-navigation/wm-navigation.js +211 -211
  63. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  64. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  65. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  66. package/dist/collection/components/wm-option/wm-option.css +2 -3
  67. package/dist/collection/components/wm-option/wm-option.js +414 -414
  68. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  69. package/dist/collection/components/wm-search/wm-search.js +480 -480
  70. package/dist/collection/components/wm-select/wm-select.css +2 -3
  71. package/dist/collection/components/wm-select/wm-select.js +718 -718
  72. package/dist/collection/components/wm-snackbar/wm-snackbar.css +2 -3
  73. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  74. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
  75. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  76. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  77. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  78. package/dist/collection/components/wm-tag-input/wm-tag-input.css +2 -3
  79. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  80. package/dist/collection/components/wm-timepicker/wm-timepicker.css +2 -3
  81. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  82. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1 -2
  83. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  84. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +20 -21
  85. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +785 -753
  86. package/dist/collection/components/wm-uploader/wm-uploader.css +24 -21
  87. package/dist/collection/components/wm-uploader/wm-uploader.js +780 -748
  88. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  89. package/dist/collection/dev/scripts.js +20 -20
  90. package/dist/collection/global/__mocks__/functions.js +6 -6
  91. package/dist/collection/global/chartFunctions.js +417 -417
  92. package/dist/collection/global/functions.js +468 -468
  93. package/dist/collection/global/global.js +67 -67
  94. package/dist/collection/global/interfaces.js +49 -49
  95. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  96. package/dist/collection/global/services/http-service.js +50 -50
  97. package/dist/collection/lang/lang.js +5 -5
  98. package/dist/collection/lang/missing.js +43 -39
  99. package/dist/collection/lang/piglatin.js +93 -93
  100. package/dist/esm/{chartFunctions-fc11df2b.js → chartFunctions-aa8b2cfe.js} +416 -416
  101. package/dist/esm/{functions-b478ef24.js → functions-ecba807c.js} +544 -506
  102. package/dist/esm/{global-b8be90a6.js → global-8eb97f09.js} +60 -60
  103. package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +49 -49
  104. package/dist/esm/{index-d649a861.js → index-7603f98e.js} +96 -64
  105. package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +29 -29
  106. package/dist/esm/loader.js +4 -4
  107. package/dist/esm/polyfills/core-js.js +0 -0
  108. package/dist/esm/polyfills/css-shim.js +1 -1
  109. package/dist/esm/polyfills/dom.js +0 -0
  110. package/dist/esm/polyfills/es5-html-element.js +0 -0
  111. package/dist/esm/polyfills/index.js +0 -0
  112. package/dist/esm/polyfills/system.js +0 -0
  113. package/dist/esm/priv-chart-popover.entry.js +87 -87
  114. package/dist/esm/priv-datepicker.entry.js +659 -659
  115. package/dist/esm/priv-navigator-button.entry.js +19 -19
  116. package/dist/esm/priv-navigator-item.entry.js +24 -24
  117. package/dist/esm/ripple.js +4 -4
  118. package/dist/esm/wm-action-menu_2.entry.js +342 -342
  119. package/dist/esm/wm-button.entry.js +228 -228
  120. package/dist/esm/wm-chart-slice.entry.js +14 -14
  121. package/dist/esm/wm-chart.entry.js +116 -116
  122. package/dist/esm/wm-datepicker.entry.js +267 -267
  123. package/dist/esm/wm-input.entry.js +136 -136
  124. package/dist/esm/wm-modal-footer.entry.js +32 -32
  125. package/dist/esm/wm-modal-header.entry.js +35 -35
  126. package/dist/esm/wm-modal.entry.js +164 -164
  127. package/dist/esm/wm-navigation_3.entry.js +222 -222
  128. package/dist/esm/wm-navigator.entry.js +269 -269
  129. package/dist/esm/wm-network-uploader.entry.js +454 -422
  130. package/dist/esm/wm-option_2.entry.js +487 -487
  131. package/dist/esm/wm-pagination.entry.js +168 -168
  132. package/dist/esm/wm-progress-indicator.entry.js +82 -82
  133. package/dist/esm/wm-progress-monitor.entry.js +51 -47
  134. package/dist/esm/wm-progress-slice.entry.js +9 -9
  135. package/dist/esm/wm-search.entry.js +233 -233
  136. package/dist/esm/wm-snackbar.entry.js +172 -172
  137. package/dist/esm/wm-tab-item_3.entry.js +298 -298
  138. package/dist/esm/wm-tag-input.entry.js +581 -581
  139. package/dist/esm/wm-timepicker.entry.js +385 -385
  140. package/dist/esm/wm-toggletip.entry.js +126 -126
  141. package/dist/esm/wm-uploader.entry.js +380 -348
  142. package/dist/esm/wm-wrapper.entry.js +13 -13
  143. package/dist/esm-es5/chartFunctions-aa8b2cfe.js +1 -0
  144. package/dist/esm-es5/functions-ecba807c.js +15 -0
  145. package/dist/esm-es5/{global-b8be90a6.js → global-8eb97f09.js} +1 -1
  146. package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +1 -1
  147. package/dist/esm-es5/index-7603f98e.js +1 -0
  148. package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +0 -0
  149. package/dist/esm-es5/loader.js +1 -1
  150. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  151. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  152. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  153. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  154. package/dist/esm-es5/ripple.js +1 -1
  155. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  156. package/dist/esm-es5/wm-button.entry.js +1 -1
  157. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  158. package/dist/esm-es5/wm-chart.entry.js +1 -1
  159. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  160. package/dist/esm-es5/wm-input.entry.js +1 -1
  161. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  162. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  163. package/dist/esm-es5/wm-modal.entry.js +1 -1
  164. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  165. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  166. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  167. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  168. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  169. package/dist/esm-es5/wm-progress-indicator.entry.js +1 -1
  170. package/dist/esm-es5/wm-progress-monitor.entry.js +1 -1
  171. package/dist/esm-es5/wm-progress-slice.entry.js +1 -1
  172. package/dist/esm-es5/wm-search.entry.js +1 -1
  173. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  174. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  175. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  176. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  177. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  178. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  179. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  180. package/dist/loader/index.d.ts +0 -1
  181. package/dist/ripple/p-04255a42.entry.js +1 -0
  182. package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +0 -0
  183. package/dist/ripple/p-0a840636.entry.js +1 -0
  184. package/dist/ripple/p-0c480b92.system.entry.js +1 -0
  185. package/dist/ripple/{p-1b7be30d.system.entry.js → p-11ff0109.system.entry.js} +1 -1
  186. package/dist/ripple/{p-366e00f9.js → p-1523f1e1.js} +1 -1
  187. package/dist/ripple/{p-bfc1ab2e.system.entry.js → p-1df2adee.system.entry.js} +1 -1
  188. package/dist/ripple/p-268f470a.system.entry.js +1 -0
  189. package/dist/ripple/p-2a9e03d8.system.entry.js +1 -0
  190. package/dist/ripple/p-313b6073.system.js +1 -0
  191. package/dist/ripple/{p-fd9380f2.system.entry.js → p-314c79cc.system.entry.js} +1 -1
  192. package/dist/ripple/{p-30e1daf7.system.entry.js → p-32ff1f4d.system.entry.js} +1 -1
  193. package/dist/ripple/p-358bde27.entry.js +1 -0
  194. package/dist/ripple/{p-2b63995f.system.entry.js → p-3b3e847c.system.entry.js} +1 -1
  195. package/dist/ripple/p-3bdad453.system.js +15 -0
  196. package/dist/ripple/p-3e80a569.system.entry.js +1 -0
  197. package/dist/ripple/p-461f08d4.entry.js +1 -0
  198. package/dist/ripple/p-4d20fc46.system.entry.js +1 -0
  199. package/dist/ripple/p-4d59fe86.entry.js +1 -0
  200. package/dist/ripple/p-51aaaedf.entry.js +1 -0
  201. package/dist/ripple/{p-063bc67c.system.entry.js → p-520211f0.system.entry.js} +1 -1
  202. package/dist/ripple/p-52270154.system.entry.js +1 -0
  203. package/dist/ripple/p-5322c156.entry.js +1 -0
  204. package/dist/ripple/p-56fa3181.entry.js +1 -0
  205. package/dist/ripple/p-631aa708.entry.js +1 -0
  206. package/dist/ripple/p-64ca10ea.js +16 -0
  207. package/dist/ripple/{p-3b31eaec.system.js → p-722fbb3c.system.js} +1 -1
  208. package/dist/ripple/p-766def9b.system.entry.js +1 -0
  209. package/dist/ripple/p-781e8913.system.entry.js +1 -0
  210. package/dist/ripple/p-7fae0cc2.entry.js +1 -0
  211. package/dist/ripple/p-8647d034.system.entry.js +1 -0
  212. package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +0 -0
  213. package/dist/ripple/p-8943b3e4.system.js +1 -0
  214. package/dist/ripple/p-8e747ee0.entry.js +1 -0
  215. package/dist/ripple/p-9045fdcc.entry.js +1 -0
  216. package/dist/ripple/p-90dd1cc5.entry.js +1 -0
  217. package/dist/ripple/{p-099df7b7.system.entry.js → p-90ed3268.system.entry.js} +1 -1
  218. package/dist/ripple/p-9233b6c7.entry.js +1 -0
  219. package/dist/ripple/p-93e6bfbe.system.entry.js +1 -0
  220. package/dist/ripple/p-952eab56.entry.js +1 -0
  221. package/dist/ripple/p-98c0e6a6.entry.js +1 -0
  222. package/dist/ripple/p-9b32db76.system.entry.js +1 -0
  223. package/dist/ripple/p-9ce7fa33.entry.js +1 -0
  224. package/dist/ripple/p-9dc909f9.system.entry.js +1 -0
  225. package/dist/ripple/p-a084e205.entry.js +1 -0
  226. package/dist/ripple/p-a0c3ef16.system.js +1 -0
  227. package/dist/ripple/p-a193df9f.entry.js +1 -0
  228. package/dist/ripple/p-a4aa450f.entry.js +1 -0
  229. package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +0 -0
  230. package/dist/ripple/p-a9e0ce88.entry.js +1 -0
  231. package/dist/ripple/p-ae04257e.entry.js +1 -0
  232. package/dist/ripple/{p-a1511315.system.entry.js → p-ae6cfbca.system.entry.js} +1 -1
  233. package/dist/ripple/{p-ea33bda7.system.entry.js → p-af1d4b36.system.entry.js} +1 -1
  234. package/dist/ripple/p-af301845.system.entry.js +1 -0
  235. package/dist/ripple/p-b3c71506.js +1 -0
  236. package/dist/ripple/p-b4e545e2.entry.js +1 -0
  237. package/dist/ripple/{p-ddf157c8.system.entry.js → p-b4efa7d1.system.entry.js} +1 -1
  238. package/dist/ripple/p-bd98cbba.entry.js +1 -0
  239. package/dist/ripple/p-bd9e522e.system.entry.js +1 -0
  240. package/dist/ripple/p-bf64c818.entry.js +1 -0
  241. package/dist/ripple/{p-cb7d8ade.system.entry.js → p-c1795546.system.entry.js} +1 -1
  242. package/dist/ripple/{p-647edff3.system.entry.js → p-c1c25924.system.entry.js} +1 -1
  243. package/dist/ripple/{p-36be0612.js → p-cbdefe19.js} +1 -1
  244. package/dist/ripple/p-cc789f12.system.entry.js +1 -0
  245. package/dist/ripple/p-ce641de3.entry.js +1 -0
  246. package/dist/ripple/p-cfb81685.entry.js +1 -0
  247. package/dist/ripple/p-d636cb95.system.js +1 -0
  248. package/dist/ripple/{p-2b9c54e7.system.entry.js → p-d863abe4.system.entry.js} +1 -1
  249. package/dist/ripple/p-e47a097b.entry.js +1 -0
  250. package/dist/ripple/p-e72c1d68.entry.js +1 -0
  251. package/dist/ripple/p-e75f7966.system.entry.js +1 -0
  252. package/dist/ripple/ripple.esm.js +1 -1
  253. package/dist/ripple/ripple.js +1 -1
  254. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  255. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +35 -35
  256. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  257. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
  258. package/dist/types/components/wm-button/wm-button.d.ts +43 -43
  259. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  260. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  261. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  262. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  263. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
  264. package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
  265. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  266. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  267. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  268. package/dist/types/components/wm-navigation/wm-navigation.d.ts +30 -30
  269. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  270. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  271. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  272. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  273. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  274. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  275. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  276. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  277. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  278. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  279. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  280. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  281. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  282. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  283. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  284. package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
  285. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  286. package/dist/types/components.d.ts +24 -24
  287. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  288. package/dist/types/global/chartFunctions.d.ts +28 -28
  289. package/dist/types/global/functions.d.ts +42 -42
  290. package/dist/types/global/global.d.ts +1 -1
  291. package/dist/types/global/interfaces.d.ts +44 -44
  292. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  293. package/dist/types/global/services/http-service.d.ts +4 -4
  294. package/dist/types/lang/lang.d.ts +5 -5
  295. package/dist/types/stencil-public-runtime.d.ts +6 -4
  296. package/package.json +47 -47
  297. package/dist/esm-es5/chartFunctions-fc11df2b.js +0 -1
  298. package/dist/esm-es5/functions-b478ef24.js +0 -15
  299. package/dist/esm-es5/index-d649a861.js +0 -1
  300. package/dist/ripple/p-0b23a4fe.entry.js +0 -1
  301. package/dist/ripple/p-1b2c3251.system.entry.js +0 -1
  302. package/dist/ripple/p-1e2c46f1.entry.js +0 -1
  303. package/dist/ripple/p-1e7fc028.entry.js +0 -1
  304. package/dist/ripple/p-2296c2c3.entry.js +0 -1
  305. package/dist/ripple/p-24cd6213.system.entry.js +0 -1
  306. package/dist/ripple/p-2587031d.system.entry.js +0 -1
  307. package/dist/ripple/p-29d527c8.entry.js +0 -1
  308. package/dist/ripple/p-2b6246d9.entry.js +0 -1
  309. package/dist/ripple/p-2cc9e6cf.system.entry.js +0 -1
  310. package/dist/ripple/p-30db4ad7.entry.js +0 -1
  311. package/dist/ripple/p-3388ca40.entry.js +0 -1
  312. package/dist/ripple/p-34736928.entry.js +0 -1
  313. package/dist/ripple/p-3eb3a1f8.entry.js +0 -1
  314. package/dist/ripple/p-492ad5d0.system.entry.js +0 -1
  315. package/dist/ripple/p-4f23cdc6.entry.js +0 -1
  316. package/dist/ripple/p-50be3b44.js +0 -1
  317. package/dist/ripple/p-5743d4bc.system.entry.js +0 -1
  318. package/dist/ripple/p-59963be9.system.entry.js +0 -1
  319. package/dist/ripple/p-5d6cc9da.system.js +0 -1
  320. package/dist/ripple/p-5e5f162c.system.entry.js +0 -1
  321. package/dist/ripple/p-6c295beb.entry.js +0 -1
  322. package/dist/ripple/p-6c751341.entry.js +0 -1
  323. package/dist/ripple/p-6f9e8fbc.entry.js +0 -1
  324. package/dist/ripple/p-70ececb5.entry.js +0 -1
  325. package/dist/ripple/p-7674c9b0.system.entry.js +0 -1
  326. package/dist/ripple/p-76b96f77.entry.js +0 -1
  327. package/dist/ripple/p-7a2a0d2e.js +0 -16
  328. package/dist/ripple/p-7c2b1682.entry.js +0 -1
  329. package/dist/ripple/p-7f0c64ac.entry.js +0 -1
  330. package/dist/ripple/p-803f1f22.entry.js +0 -1
  331. package/dist/ripple/p-84fb34b5.entry.js +0 -1
  332. package/dist/ripple/p-8a583f84.entry.js +0 -1
  333. package/dist/ripple/p-8daa2613.system.entry.js +0 -1
  334. package/dist/ripple/p-935a266f.entry.js +0 -1
  335. package/dist/ripple/p-9d02957d.system.js +0 -1
  336. package/dist/ripple/p-a14ac623.entry.js +0 -1
  337. package/dist/ripple/p-b325c35a.system.entry.js +0 -1
  338. package/dist/ripple/p-bfe93d8d.system.entry.js +0 -1
  339. package/dist/ripple/p-c1c7b0b1.system.js +0 -15
  340. package/dist/ripple/p-c20a179f.system.entry.js +0 -1
  341. package/dist/ripple/p-c8bbf15e.entry.js +0 -1
  342. package/dist/ripple/p-cfb62ded.entry.js +0 -1
  343. package/dist/ripple/p-d12e0f49.system.js +0 -1
  344. package/dist/ripple/p-d648d193.entry.js +0 -1
  345. package/dist/ripple/p-d7ff84eb.entry.js +0 -1
  346. package/dist/ripple/p-e90f6915.system.js +0 -1
  347. package/dist/ripple/p-f2566a42.system.entry.js +0 -1
  348. package/dist/ripple/p-f62fc5ea.system.entry.js +0 -1
  349. package/dist/ripple/p-fe0abd10.system.entry.js +0 -1
  350. package/dist/ripple/p-fe2a30d3.entry.js +0 -1
  351. package/dist/ripple/p-ffbc5db3.entry.js +0 -1
  352. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +0 -27
  353. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +0 -26
  354. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +0 -17
@@ -893,6 +893,12 @@ const en = {
893
893
  type: 0,
894
894
  value: "%"
895
895
  }
896
+ ],
897
+ "uploader.waitToUpload": [
898
+ {
899
+ type: 0,
900
+ value: "Please wait for current upload to complete before uploading new files."
901
+ }
896
902
  ]
897
903
  };
898
904
 
@@ -3549,6 +3555,12 @@ const pig = {
3549
3555
  type: 0,
3550
3556
  value: "%"
3551
3557
  }
3558
+ ],
3559
+ "uploader.waitToUpload": [
3560
+ {
3561
+ type: 0,
3562
+ value: "Easeplay aitway orfay urrentcay uploadyay otay ompletecay eforebay uploadingyay ewnay ilesfay."
3563
+ }
3552
3564
  ]
3553
3565
  };
3554
3566
 
@@ -3916,11 +3928,17 @@ function icuUnitToEcma(unit) {
3916
3928
  return unit.replace(/^(.*?)-/, '');
3917
3929
  }
3918
3930
  var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
3919
- var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
3931
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
3920
3932
  var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
3921
3933
  var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
3922
3934
  function parseSignificantPrecision(str) {
3923
3935
  var result = {};
3936
+ if (str[str.length - 1] === 'r') {
3937
+ result.roundingPriority = 'morePrecision';
3938
+ }
3939
+ else if (str[str.length - 1] === 's') {
3940
+ result.roundingPriority = 'lessPrecision';
3941
+ }
3924
3942
  str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
3925
3943
  // @@@ case
3926
3944
  if (typeof g2 !== 'string') {
@@ -4147,8 +4165,13 @@ function parseNumberSkeleton(tokens) {
4147
4165
  }
4148
4166
  return '';
4149
4167
  });
4150
- if (token.options.length) {
4151
- result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
4168
+ var opt = token.options[0];
4169
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
4170
+ if (opt === 'w') {
4171
+ result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
4172
+ }
4173
+ else if (opt) {
4174
+ result = __assign(__assign({}, result), parseSignificantPrecision(opt));
4152
4175
  }
4153
4176
  continue;
4154
4177
  }
@@ -4170,8 +4193,8 @@ function parseNumberSkeleton(tokens) {
4170
4193
  }
4171
4194
 
4172
4195
  var _a;
4173
- var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
4174
- var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
4196
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
4197
+ var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
4175
4198
  function createLocation(start, end) {
4176
4199
  return { start: start, end: end };
4177
4200
  }
@@ -4418,7 +4441,7 @@ var Parser = /** @class */ (function () {
4418
4441
  return {
4419
4442
  val: {
4420
4443
  type: TYPE.literal,
4421
- value: "<" + tagName + "/>",
4444
+ value: "<".concat(tagName, "/>"),
4422
4445
  location: createLocation(startPosition, this.clonePosition()),
4423
4446
  },
4424
4447
  err: null,
@@ -5023,7 +5046,7 @@ var Parser = /** @class */ (function () {
5023
5046
  }
5024
5047
  var code = codePointAt(this.message, offset);
5025
5048
  if (code === undefined) {
5026
- throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
5049
+ throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
5027
5050
  }
5028
5051
  return code;
5029
5052
  };
@@ -5091,7 +5114,7 @@ var Parser = /** @class */ (function () {
5091
5114
  */
5092
5115
  Parser.prototype.bumpTo = function (targetOffset) {
5093
5116
  if (this.offset() > targetOffset) {
5094
- throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
5117
+ throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
5095
5118
  }
5096
5119
  targetOffset = Math.min(targetOffset, this.message.length);
5097
5120
  while (true) {
@@ -5100,7 +5123,7 @@ var Parser = /** @class */ (function () {
5100
5123
  break;
5101
5124
  }
5102
5125
  if (offset > targetOffset) {
5103
- throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
5126
+ throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
5104
5127
  }
5105
5128
  this.bump();
5106
5129
  if (this.isEOF()) {
@@ -5566,28 +5589,28 @@ var FormatError = /** @class */ (function (_super) {
5566
5589
  return _this;
5567
5590
  }
5568
5591
  FormatError.prototype.toString = function () {
5569
- return "[formatjs Error: " + this.code + "] " + this.message;
5592
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
5570
5593
  };
5571
5594
  return FormatError;
5572
5595
  }(Error));
5573
5596
  var InvalidValueError = /** @class */ (function (_super) {
5574
5597
  __extends(InvalidValueError, _super);
5575
5598
  function InvalidValueError(variableId, value, options, originalMessage) {
5576
- return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
5599
+ return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
5577
5600
  }
5578
5601
  return InvalidValueError;
5579
5602
  }(FormatError));
5580
5603
  var InvalidValueTypeError = /** @class */ (function (_super) {
5581
5604
  __extends(InvalidValueTypeError, _super);
5582
5605
  function InvalidValueTypeError(value, type, originalMessage) {
5583
- return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
5606
+ return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
5584
5607
  }
5585
5608
  return InvalidValueTypeError;
5586
5609
  }(FormatError));
5587
5610
  var MissingValueError = /** @class */ (function (_super) {
5588
5611
  __extends(MissingValueError, _super);
5589
5612
  function MissingValueError(variableId, originalMessage) {
5590
- return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
5613
+ return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
5591
5614
  }
5592
5615
  return MissingValueError;
5593
5616
  }(FormatError));
@@ -5748,7 +5771,7 @@ originalMessage) {
5748
5771
  continue;
5749
5772
  }
5750
5773
  if (isPluralElement(el)) {
5751
- var opt = el.options["=" + value];
5774
+ var opt = el.options["=".concat(value)];
5752
5775
  if (!opt) {
5753
5776
  if (!Intl.PluralRules) {
5754
5777
  throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
@@ -5819,7 +5842,7 @@ function createDefaultFormatters(cache) {
5819
5842
  for (var _i = 0; _i < arguments.length; _i++) {
5820
5843
  args[_i] = arguments[_i];
5821
5844
  }
5822
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5845
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5823
5846
  }, {
5824
5847
  cache: createFastMemoizeCache$1(cache.number),
5825
5848
  strategy: strategies.variadic,
@@ -5830,7 +5853,7 @@ function createDefaultFormatters(cache) {
5830
5853
  for (var _i = 0; _i < arguments.length; _i++) {
5831
5854
  args[_i] = arguments[_i];
5832
5855
  }
5833
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5856
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5834
5857
  }, {
5835
5858
  cache: createFastMemoizeCache$1(cache.dateTime),
5836
5859
  strategy: strategies.variadic,
@@ -5841,7 +5864,7 @@ function createDefaultFormatters(cache) {
5841
5864
  for (var _i = 0; _i < arguments.length; _i++) {
5842
5865
  args[_i] = arguments[_i];
5843
5866
  }
5844
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
5867
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
5845
5868
  }, {
5846
5869
  cache: createFastMemoizeCache$1(cache.pluralRules),
5847
5870
  strategy: strategies.variadic,
@@ -5999,7 +6022,13 @@ var IntlErrorCode;
5999
6022
  var IntlError = /** @class */ (function (_super) {
6000
6023
  __extends(IntlError, _super);
6001
6024
  function IntlError(code, message, exception) {
6002
- var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
6025
+ var _this = this;
6026
+ var err = exception
6027
+ ? exception instanceof Error
6028
+ ? exception
6029
+ : new Error(String(exception))
6030
+ : undefined;
6031
+ _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
6003
6032
  _this.code = code;
6004
6033
  // @ts-ignore just so we don't need to declare dep on @types/node
6005
6034
  if (typeof Error.captureStackTrace === 'function') {
@@ -6031,19 +6060,26 @@ var MissingDataError = /** @class */ (function (_super) {
6031
6060
  }
6032
6061
  return MissingDataError;
6033
6062
  }(IntlError));
6063
+ var IntlFormatError = /** @class */ (function (_super) {
6064
+ __extends(IntlFormatError, _super);
6065
+ function IntlFormatError(message, locale, exception) {
6066
+ return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
6067
+ }
6068
+ return IntlFormatError;
6069
+ }(IntlError));
6034
6070
  var MessageFormatError = /** @class */ (function (_super) {
6035
6071
  __extends(MessageFormatError, _super);
6036
6072
  function MessageFormatError(message, locale, descriptor, exception) {
6037
- 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;
6073
+ 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;
6038
6074
  _this.descriptor = descriptor;
6039
6075
  return _this;
6040
6076
  }
6041
6077
  return MessageFormatError;
6042
- }(IntlError));
6078
+ }(IntlFormatError));
6043
6079
  var MissingTranslationError = /** @class */ (function (_super) {
6044
6080
  __extends(MissingTranslationError, _super);
6045
6081
  function MissingTranslationError(descriptor, locale) {
6046
- var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"" + descriptor.id + "\" for locale \"" + locale + "\", using " + (descriptor.defaultMessage ? 'default message' : 'id') + " as fallback.") || this;
6082
+ 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;
6047
6083
  _this.descriptor = descriptor;
6048
6084
  return _this;
6049
6085
  }
@@ -6070,6 +6106,7 @@ var DEFAULT_INTL_CONFIG = {
6070
6106
  timeZone: undefined,
6071
6107
  defaultLocale: 'en',
6072
6108
  defaultFormats: {},
6109
+ fallbackOnEmptyString: true,
6073
6110
  onError: defaultErrorHandler,
6074
6111
  };
6075
6112
  function createIntlCache() {
@@ -6112,7 +6149,7 @@ function createFormatters(cache) {
6112
6149
  for (var _i = 0; _i < arguments.length; _i++) {
6113
6150
  args[_i] = arguments[_i];
6114
6151
  }
6115
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6152
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6116
6153
  }, {
6117
6154
  cache: createFastMemoizeCache(cache.dateTime),
6118
6155
  strategy: strategies.variadic,
@@ -6123,7 +6160,7 @@ function createFormatters(cache) {
6123
6160
  for (var _i = 0; _i < arguments.length; _i++) {
6124
6161
  args[_i] = arguments[_i];
6125
6162
  }
6126
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6163
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6127
6164
  }, {
6128
6165
  cache: createFastMemoizeCache(cache.number),
6129
6166
  strategy: strategies.variadic,
@@ -6134,7 +6171,7 @@ function createFormatters(cache) {
6134
6171
  for (var _i = 0; _i < arguments.length; _i++) {
6135
6172
  args[_i] = arguments[_i];
6136
6173
  }
6137
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
6174
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
6138
6175
  }, {
6139
6176
  cache: createFastMemoizeCache(cache.pluralRules),
6140
6177
  strategy: strategies.variadic,
@@ -6157,7 +6194,7 @@ function createFormatters(cache) {
6157
6194
  for (var _i = 0; _i < arguments.length; _i++) {
6158
6195
  args[_i] = arguments[_i];
6159
6196
  }
6160
- return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
6197
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
6161
6198
  }, {
6162
6199
  cache: createFastMemoizeCache(cache.relativeTime),
6163
6200
  strategy: strategies.variadic,
@@ -6168,7 +6205,7 @@ function createFormatters(cache) {
6168
6205
  for (var _i = 0; _i < arguments.length; _i++) {
6169
6206
  args[_i] = arguments[_i];
6170
6207
  }
6171
- return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
6208
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
6172
6209
  }, {
6173
6210
  cache: createFastMemoizeCache(cache.list),
6174
6211
  strategy: strategies.variadic,
@@ -6178,7 +6215,7 @@ function createFormatters(cache) {
6178
6215
  for (var _i = 0; _i < arguments.length; _i++) {
6179
6216
  args[_i] = arguments[_i];
6180
6217
  }
6181
- return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
6218
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
6182
6219
  }, {
6183
6220
  cache: createFastMemoizeCache(cache.displayNames),
6184
6221
  strategy: strategies.variadic,
@@ -6194,7 +6231,7 @@ function getNamedFormat(formats, type, name, onError) {
6194
6231
  if (format) {
6195
6232
  return format;
6196
6233
  }
6197
- onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
6234
+ onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
6198
6235
  }
6199
6236
 
6200
6237
  /**
@@ -6229,7 +6266,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
6229
6266
  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)) });
6230
6267
  }
6231
6268
  function formatMessage(_a, state, messageDescriptor, values, opts) {
6232
- 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;
6269
+ 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;
6233
6270
  if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
6234
6271
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
6235
6272
  // `id` is a required field of a Message Descriptor.
@@ -6259,6 +6296,9 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6259
6296
  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
6260
6297
  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
6261
6298
  if (!message) {
6299
+ if (fallbackOnEmptyString === false && message === '') {
6300
+ return message;
6301
+ }
6262
6302
  if (!defaultMessage ||
6263
6303
  (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
6264
6304
  // This prevents warnings from littering the console in development
@@ -6272,7 +6312,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6272
6312
  return formatter.format(values);
6273
6313
  }
6274
6314
  catch (e) {
6275
- onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
6315
+ onError(new MessageFormatError("Error formatting default message for: \"".concat(id, "\", rendering default message verbatim"), locale, messageDescriptor, e));
6276
6316
  return typeof defaultMessage === 'string' ? defaultMessage : id;
6277
6317
  }
6278
6318
  }
@@ -6284,7 +6324,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6284
6324
  return formatter.format(values);
6285
6325
  }
6286
6326
  catch (e) {
6287
- onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
6327
+ onError(new MessageFormatError("Error formatting message: \"".concat(id, "\", using ").concat(defaultMessage ? 'default message' : 'id', " as fallback."), locale, messageDescriptor, e));
6288
6328
  }
6289
6329
  if (defaultMessage) {
6290
6330
  try {
@@ -6292,7 +6332,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6292
6332
  return formatter.format(values);
6293
6333
  }
6294
6334
  catch (e) {
6295
- onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
6335
+ onError(new MessageFormatError("Error formatting the default message for: \"".concat(id, "\", rendering message verbatim"), locale, messageDescriptor, e));
6296
6336
  }
6297
6337
  }
6298
6338
  if (typeof message === 'string') {
@@ -6330,9 +6370,7 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
6330
6370
  if (options === void 0) { options = {}; }
6331
6371
  var format = options.format;
6332
6372
  var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
6333
- var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
6334
- // @ts-expect-error es2020 has a lot stuff from es2021 bleed in
6335
- defaults);
6373
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
6336
6374
  if (type === 'time' &&
6337
6375
  !filteredOptions.hour &&
6338
6376
  !filteredOptions.minute &&
@@ -6449,7 +6487,7 @@ var LIST_FORMAT_OPTIONS = [
6449
6487
  ];
6450
6488
  var now = Date.now();
6451
6489
  function generateToken(i) {
6452
- return now + "_" + i + "_" + now;
6490
+ return "".concat(now, "_").concat(i, "_").concat(now);
6453
6491
  }
6454
6492
  function formatList(opts, getListFormat, values, options) {
6455
6493
  if (options === void 0) { options = {}; }
@@ -6516,7 +6554,7 @@ function formatPlural(_a, getPluralRules, value, options) {
6516
6554
  return getPluralRules(locale, filteredOptions).select(value);
6517
6555
  }
6518
6556
  catch (e) {
6519
- onError(new MessageFormatError('Error formatting plural.', e));
6557
+ onError(new IntlFormatError('Error formatting plural.', locale, e));
6520
6558
  }
6521
6559
  return 'other';
6522
6560
  }
@@ -6543,7 +6581,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
6543
6581
  return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
6544
6582
  }
6545
6583
  catch (e) {
6546
- config.onError(new MessageFormatError('Error formatting relative time.', e));
6584
+ config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));
6547
6585
  }
6548
6586
  return String(value);
6549
6587
  }
@@ -6623,7 +6661,7 @@ function createIntl(config, cache) {
6623
6661
  var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
6624
6662
  if (!locale) {
6625
6663
  if (onError) {
6626
- onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
6664
+ onError(new InvalidConfigError("\"locale\" was not configured, using \"".concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details")));
6627
6665
  }
6628
6666
  // Since there's no registered locale data for `locale`, this will
6629
6667
  // fallback to the `defaultLocale` to make sure things can render.
@@ -6633,481 +6671,481 @@ function createIntl(config, cache) {
6633
6671
  resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
6634
6672
  }
6635
6673
  else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
6636
- 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"));
6674
+ 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")));
6637
6675
  }
6638
6676
  else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
6639
6677
  onError) {
6640
- 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"));
6678
+ 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")));
6641
6679
  }
6642
6680
  verifyConfigMessages(resolvedConfig);
6643
6681
  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) });
6644
6682
  }
6645
6683
 
6646
- const DEFAULT_LANGUAGE = "en";
6647
- function getBrowserLang() {
6648
- const langAttr = document.documentElement.getAttribute("lang");
6649
- if (!!langAttr) {
6650
- return langAttr;
6651
- }
6652
- else if (window.navigator && window.navigator.language) {
6653
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6654
- return lang.slice(0, 2);
6655
- }
6656
- else {
6657
- return DEFAULT_LANGUAGE;
6658
- }
6659
- }
6660
- // prevents memory leak
6661
- const cache = createIntlCache();
6662
- const locale = getBrowserLang();
6663
- const intl = createIntl({
6664
- locale: locale,
6665
- defaultLocale: "en",
6666
- messages: lang[locale] || en,
6667
- }, cache);
6668
- function generateId() {
6669
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
6670
- }
6671
- // limits how many times a function fires
6672
- // use when the function should run periodically, but not too often (e.g. window resize)
6673
- function throttle(fn, wait) {
6674
- let timeout;
6675
- let shouldWait = false;
6676
- return function () {
6677
- const context = this;
6678
- if (!shouldWait) {
6679
- fn.apply(context, arguments);
6680
- shouldWait = true;
6681
- clearTimeout(timeout);
6682
- timeout = setTimeout(function () {
6683
- shouldWait = false;
6684
- }, wait);
6685
- }
6686
- };
6687
- }
6688
- // waits until it hasn't been called for [timeout] ms.
6689
- // use when the function should run only after something (event) is done firing
6690
- function debounce(fn, wait) {
6691
- let timeout;
6692
- return function () {
6693
- const context = this;
6694
- const functionCall = () => fn.apply(context, arguments);
6695
- clearTimeout(timeout);
6696
- timeout = setTimeout(functionCall, wait);
6697
- };
6698
- }
6699
- function getTextDir() {
6700
- const dir = document.querySelector("html").getAttribute("dir");
6701
- return dir ? dir.toLowerCase() : "";
6702
- }
6703
- function getPosition(el) {
6704
- const coords = el.getBoundingClientRect();
6705
- let x = coords.x;
6706
- let y = coords.y;
6707
- // Edge doesn't have x and y
6708
- if (!x) {
6709
- if (getTextDir() === "rtl") {
6710
- x = coords.right;
6711
- }
6712
- else {
6713
- x = coords.left;
6714
- }
6715
- y = coords.top;
6716
- }
6717
- return { x, y };
6718
- }
6719
- function findParentWithScrollbar(el) {
6720
- while (!!el) {
6721
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6722
- return el;
6723
- }
6724
- el = el.parentElement;
6725
- }
6726
- }
6727
- function findParentWithHiddenOverflow(el) {
6728
- while (!!el) {
6729
- if (window.getComputedStyle(el).overflowY !== "visible") {
6730
- return el;
6731
- }
6732
- el = el.parentElement;
6733
- }
6734
- }
6735
- function getClosableElementMeasurements(fixedEl, closableEl) {
6736
- const parent = findParentWithHiddenOverflow(fixedEl);
6737
- // if parent is not found, measurements are checked against the viewport
6738
- return {
6739
- closableElHeight: closableEl.clientHeight,
6740
- closableElWidth: closableEl.clientWidth,
6741
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6742
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6743
- spaceAbove: parent
6744
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6745
- : fixedEl.getBoundingClientRect().top,
6746
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6747
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6748
- spaceBelow: parent
6749
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6750
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6751
- spaceLeft: parent
6752
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6753
- : fixedEl.getBoundingClientRect().left,
6754
- spaceRight: parent
6755
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6756
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6757
- };
6758
- }
6759
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6760
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6761
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6762
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6763
- ) {
6764
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6765
- //we want to open up only if there's not enough space below AND there is enough space above
6766
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6767
- return openUp;
6768
- }
6769
- function shouldOpenDown(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 openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6777
- return openDown;
6778
- }
6779
- function shouldShiftRight(fixedEl, closableEl) {
6780
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6781
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6782
- return needsSpaceLeft;
6783
- }
6784
- function shouldShiftLeft(fixedEl, closableEl) {
6785
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6786
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6787
- return needsSpaceRight;
6788
- }
6789
- function adjustTooltipPosition(tPos, el, tooltipEl) {
6790
- // position must be reset before measurements are taken in adjustTooltipPosition
6791
- // otherwise text-wrapping from previous position makes width measurement inconsistent
6792
- tooltipEl.style.top = "";
6793
- tooltipEl.style.left = "";
6794
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6795
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6796
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6797
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
6798
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
6799
- // a tooltip should never be closer than 24px to the edge of a screen
6800
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6801
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6802
- const swapAbove = (position) => {
6803
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6804
- };
6805
- const swapBelow = (position) => {
6806
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6807
- };
6808
- const swapLeft = (position, centeredPosition) => {
6809
- if (!enoughSpaceLeft && enoughSpaceRight) {
6810
- position = position.replace("left", "right");
6811
- }
6812
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
6813
- position = centeredPosition;
6814
- }
6815
- return position;
6816
- };
6817
- const swapRight = (position, centeredPosition) => {
6818
- if (!enoughSpaceRight && enoughSpaceLeft) {
6819
- position = position.replace("right", "left");
6820
- }
6821
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
6822
- position = centeredPosition;
6823
- }
6824
- return position;
6825
- };
6826
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6827
- switch (tPos) {
6828
- case "left":
6829
- tPos = swapLeft(tPos, "bottom");
6830
- case "right":
6831
- tPos = swapRight(tPos, "bottom");
6832
- case "top-left":
6833
- tPos = swapLeft(tPos, "top");
6834
- tPos = swapAbove(tPos);
6835
- case "top-right":
6836
- tPos = swapRight(tPos, "top");
6837
- tPos = swapAbove(tPos);
6838
- case "bottom-left":
6839
- tPos = swapLeft(tPos, "bottom");
6840
- tPos = swapBelow(tPos);
6841
- case "bottom-right":
6842
- tPos = swapRight(tPos, "bottom");
6843
- tPos = swapBelow(tPos);
6844
- case "top":
6845
- tPos = swapAbove(tPos);
6846
- case "bottom":
6847
- tPos = swapBelow(tPos);
6848
- }
6849
- return tPos;
6850
- }
6851
- function hasRoomRight(x, spaceNeeded) {
6852
- let horizOffset = 0;
6853
- // if (getTextDir() === "ltr") {
6854
- if (x.type === "click") {
6855
- // if it's a mouse event, deal with mouse coords
6856
- horizOffset = x.clientX;
6857
- // if it's a focus event, the offset is 0
6858
- }
6859
- else if (x.type === "focus") {
6860
- horizOffset = 0;
6861
- }
6862
- else {
6863
- // otherwise an element was passed, calculate how far it is from the edge of the window
6864
- let el = x; // re-assignment is for clarity
6865
- while (el) {
6866
- if (el.tagName == "BODY") {
6867
- // deal with browser quirks with body/window/document and page scroll
6868
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6869
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6870
- }
6871
- else {
6872
- // for all other non-BODY elements
6873
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6874
- }
6875
- el = el.offsetParent;
6876
- }
6877
- // }
6878
- }
6879
- return window.innerWidth - horizOffset >= spaceNeeded;
6880
- }
6881
- function checkForActiveElInShadow(element) {
6882
- while (element && element.shadowRoot) {
6883
- element = element.shadowRoot.activeElement;
6884
- }
6885
- return element;
6886
- }
6887
- function checkForFocusableElInShadow(element) {
6888
- const selectors = [
6889
- "button",
6890
- "a",
6891
- "input",
6892
- "select",
6893
- "textarea",
6894
- "wm-button",
6895
- "wm-search",
6896
- "wm-select",
6897
- "wm-action-menu",
6898
- "wm-tab-item",
6899
- "wm-datepicker",
6900
- ];
6901
- let focusableEl = element;
6902
- selectors.forEach((selector) => {
6903
- if (focusableEl && focusableEl.shadowRoot) {
6904
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6905
- if (elInShadow) {
6906
- if (selector.startsWith("wm-")) {
6907
- focusableEl = checkForFocusableElInShadow(elInShadow);
6908
- }
6909
- else {
6910
- focusableEl = elInShadow;
6911
- }
6912
- }
6913
- }
6914
- });
6915
- return focusableEl;
6916
- }
6917
- function isFocusable(element) {
6918
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6919
- return true;
6920
- }
6921
- if (element.disabled) {
6922
- return false;
6923
- }
6924
- switch (element.nodeName) {
6925
- case "A":
6926
- return !!element.href && element.rel != "ignore";
6927
- case "INPUT":
6928
- return element.type != "hidden" && element.type != "file";
6929
- case "BUTTON":
6930
- case "SELECT":
6931
- case "TEXTAREA":
6932
- case "WM-BUTTON":
6933
- case "WM-SELECT":
6934
- case "WM-ACTION-MENU":
6935
- case "WM-DATEPICKER":
6936
- case "WM-TIMEPICKER":
6937
- case "WM-INPUT":
6938
- case "WM-TAG-INPUT":
6939
- case "WM-TAB-ITEM":
6940
- case "WM-SEARCH":
6941
- return true;
6942
- default:
6943
- return false;
6944
- }
6945
- }
6946
- function getFirstFocusableDescendant(element) {
6947
- if (isFocusable(element)) {
6948
- return checkForFocusableElInShadow(element);
6949
- }
6950
- else if (element.childNodes.length > 0) {
6951
- element.childNodes.forEach((i) => {
6952
- const childEl = getFirstFocusableDescendant(i);
6953
- return childEl && checkForFocusableElInShadow(childEl);
6954
- });
6955
- }
6956
- }
6957
- function hasValidType(file, types) {
6958
- const acceptedExtensions = types.split(" ");
6959
- const parts = file.name && file.name.split(".");
6960
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
6961
- return ext
6962
- ? acceptedExtensions.includes(ext.toLowerCase())
6963
- : // fallback: if we couldn't obtain an extension,
6964
- // validate based on MIME type...
6965
- !!file.type
6966
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6967
- : // ...and if that failed too, accept the file
6968
- // as it's preferable to accept an invalid file
6969
- // than refusing a valid one (back-end will take care of what slips through)
6970
- true;
6971
- }
6972
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6973
- function getAcceptedMimeTypesList(acceptedExtensions) {
6974
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
6975
- // front end checks are just a convenience to users, independent of security.
6976
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
6977
- const lookupTable = {
6978
- aac: ["audio/aac"],
6979
- abw: ["application/x-abiword"],
6980
- arc: ["application/x-freearc"],
6981
- avi: ["video/x-msvideo"],
6982
- azw: ["application/vnd.amazon.ebook"],
6983
- bin: ["application/octet-stream"],
6984
- bmp: ["image/bmp"],
6985
- bz: ["application/x-bzip"],
6986
- bz2: ["application/x-bzip2"],
6987
- csh: ["application/x-csh"],
6988
- css: ["text/css"],
6989
- csv: ["text/csv"],
6990
- doc: ["application/msword"],
6991
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
6992
- eot: ["application/vnd.ms-fontobject"],
6993
- epub: ["application/epub+zip"],
6994
- gz: ["application/gzip"],
6995
- gif: ["image/gif"],
6996
- htm: ["text/html"],
6997
- html: ["text/html"],
6998
- ico: ["image/vnd.microsoft.icon"],
6999
- ics: ["text/calendar"],
7000
- jar: ["application/java-archive"],
7001
- jpeg: ["image/jpeg"],
7002
- jpg: ["image/jpeg"],
7003
- js: ["text/javascript"],
7004
- json: ["application/json"],
7005
- jsonld: ["application/ld+json"],
7006
- log: ["text/plain"],
7007
- mid: ["audio/x-midi"],
7008
- midi: ["audio/x-midi"],
7009
- mjs: ["text/javascript"],
7010
- mp3: ["audio/mpeg"],
7011
- mpeg: ["video/mpeg"],
7012
- mpkg: ["application/vnd.apple.installer+xml"],
7013
- odp: ["application/vnd.oasis.opendocument.presentation"],
7014
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7015
- odt: ["application/vnd.oasis.opendocument.text"],
7016
- oga: ["audio/ogg"],
7017
- ogv: ["video/ogg"],
7018
- ogx: ["application/ogg"],
7019
- opus: ["audio/opus"],
7020
- otf: ["font/otf"],
7021
- png: ["image/png"],
7022
- pdf: ["application/pdf"],
7023
- php: ["application/php"],
7024
- ppt: ["application/vnd.ms-powerpoint"],
7025
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7026
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7027
- rtf: ["application/rtf"],
7028
- sh: ["application/x-sh"],
7029
- svg: ["image/svg+xml"],
7030
- swf: ["application/x-shockwave-flash"],
7031
- tar: ["application/x-tar"],
7032
- tif: ["image/tiff"],
7033
- tiff: ["image/tiff"],
7034
- ts: ["video/mp2t"],
7035
- ttf: ["font/ttf"],
7036
- txt: ["text/plain"],
7037
- vsd: ["application/vnd.visio"],
7038
- wav: ["audio/wav"],
7039
- weba: ["audio/webm"],
7040
- webm: ["video/webm"],
7041
- webp: ["image/webp"],
7042
- woff: ["font/woff"],
7043
- woff2: ["font/woff2"],
7044
- xhtml: ["application/xhtml+xml"],
7045
- xls: ["application/vnd.ms-excel"],
7046
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7047
- xml: ["application/xml", "text/xml"],
7048
- xul: ["application/vnd.mozilla.xul+xml"],
7049
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7050
- "3gp": ["video/3gpp", "audio/3gpp"],
7051
- "3g2": ["video/3gpp2", "audio/3gpp2"],
7052
- "7z": ["application/x-7z-compressed"],
7053
- };
7054
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7055
- }
7056
- function snakeCaseToCamelCase(str) {
7057
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7058
- if (snakeCaseRegexp.test(str)) {
7059
- let camelCase = "";
7060
- let arr = str.split("_");
7061
- arr.forEach((word, idx) => {
7062
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7063
- });
7064
- return camelCase;
7065
- }
7066
- else {
7067
- return str;
7068
- }
7069
- }
7070
- function getNewIndexToFocus(currentIndex, direction, listLength) {
7071
- let newIndex = currentIndex;
7072
- if (direction === "ArrowDown") {
7073
- newIndex = (currentIndex + 1) % listLength;
7074
- }
7075
- if (direction === "ArrowUp") {
7076
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7077
- }
7078
- return newIndex;
7079
- }
7080
- function isRelatedTarget(ev, id) {
7081
- // used for onBlur events to check the element that has been clicked
7082
- const ids = id.split(" ");
7083
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7084
- }
7085
- function toBool(val) {
7086
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7087
- return val == "false" ? false : !!val;
7088
- }
7089
- /*
7090
- * this is going to be needed to solve the extra tabbing on navigator
7091
- * and for programmatic focus of tabs
7092
- * Here's a draft, not bug proof, see:
7093
- * https://stackoverflow.com/a/10730308/3741713
7094
-
7095
- function getKeyboardFocusableElements(element = document) {
7096
- 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'));
7097
- return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7098
- }
7099
-
7100
- export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7101
- const els = getKeyboardFocusableElements();
7102
- const current = els.indexOf(element);
7103
- return els[current - 1] as HTMLElement;
7104
- }
7105
-
7106
- export function getNextKeyboardFocusableElement(element: HTMLElement) {
7107
- const els = getKeyboardFocusableElements();
7108
- const current = els.indexOf(element);
7109
- return els[current + 1] as HTMLElement;
7110
- }
6684
+ const DEFAULT_LANGUAGE = "en";
6685
+ function getBrowserLang() {
6686
+ const langAttr = document.documentElement.getAttribute("lang");
6687
+ if (!!langAttr) {
6688
+ return langAttr;
6689
+ }
6690
+ else if (window.navigator && window.navigator.language) {
6691
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6692
+ return lang.slice(0, 2);
6693
+ }
6694
+ else {
6695
+ return DEFAULT_LANGUAGE;
6696
+ }
6697
+ }
6698
+ // prevents memory leak
6699
+ const cache = createIntlCache();
6700
+ const locale = getBrowserLang();
6701
+ const intl = createIntl({
6702
+ locale: locale,
6703
+ defaultLocale: "en",
6704
+ messages: lang[locale] || en,
6705
+ }, cache);
6706
+ function generateId() {
6707
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
6708
+ }
6709
+ // limits how many times a function fires
6710
+ // use when the function should run periodically, but not too often (e.g. window resize)
6711
+ function throttle(fn, wait) {
6712
+ let timeout;
6713
+ let shouldWait = false;
6714
+ return function () {
6715
+ const context = this;
6716
+ if (!shouldWait) {
6717
+ fn.apply(context, arguments);
6718
+ shouldWait = true;
6719
+ clearTimeout(timeout);
6720
+ timeout = setTimeout(function () {
6721
+ shouldWait = false;
6722
+ }, wait);
6723
+ }
6724
+ };
6725
+ }
6726
+ // waits until it hasn't been called for [timeout] ms.
6727
+ // use when the function should run only after something (event) is done firing
6728
+ function debounce(fn, wait) {
6729
+ let timeout;
6730
+ return function () {
6731
+ const context = this;
6732
+ const functionCall = () => fn.apply(context, arguments);
6733
+ clearTimeout(timeout);
6734
+ timeout = setTimeout(functionCall, wait);
6735
+ };
6736
+ }
6737
+ function getTextDir() {
6738
+ const dir = document.querySelector("html").getAttribute("dir");
6739
+ return dir ? dir.toLowerCase() : "";
6740
+ }
6741
+ function getPosition(el) {
6742
+ const coords = el.getBoundingClientRect();
6743
+ let x = coords.x;
6744
+ let y = coords.y;
6745
+ // Edge doesn't have x and y
6746
+ if (!x) {
6747
+ if (getTextDir() === "rtl") {
6748
+ x = coords.right;
6749
+ }
6750
+ else {
6751
+ x = coords.left;
6752
+ }
6753
+ y = coords.top;
6754
+ }
6755
+ return { x, y };
6756
+ }
6757
+ function findParentWithScrollbar(el) {
6758
+ while (!!el) {
6759
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6760
+ return el;
6761
+ }
6762
+ el = el.parentElement;
6763
+ }
6764
+ }
6765
+ function findParentWithHiddenOverflow(el) {
6766
+ while (!!el) {
6767
+ if (window.getComputedStyle(el).overflowY !== "visible") {
6768
+ return el;
6769
+ }
6770
+ el = el.parentElement;
6771
+ }
6772
+ }
6773
+ function getClosableElementMeasurements(fixedEl, closableEl) {
6774
+ const parent = findParentWithHiddenOverflow(fixedEl);
6775
+ // if parent is not found, measurements are checked against the viewport
6776
+ return {
6777
+ closableElHeight: closableEl.clientHeight,
6778
+ closableElWidth: closableEl.clientWidth,
6779
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6780
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6781
+ spaceAbove: parent
6782
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6783
+ : fixedEl.getBoundingClientRect().top,
6784
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6785
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6786
+ spaceBelow: parent
6787
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6788
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6789
+ spaceLeft: parent
6790
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6791
+ : fixedEl.getBoundingClientRect().left,
6792
+ spaceRight: parent
6793
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6794
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6795
+ };
6796
+ }
6797
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6798
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6799
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6800
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6801
+ ) {
6802
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6803
+ //we want to open up only if there's not enough space below AND there is enough space above
6804
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6805
+ return openUp;
6806
+ }
6807
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6808
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6809
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6810
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6811
+ ) {
6812
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6813
+ //we want to open up only if there's not enough space below AND there is enough space above
6814
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6815
+ return openDown;
6816
+ }
6817
+ function shouldShiftRight(fixedEl, closableEl) {
6818
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6819
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6820
+ return needsSpaceLeft;
6821
+ }
6822
+ function shouldShiftLeft(fixedEl, closableEl) {
6823
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6824
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6825
+ return needsSpaceRight;
6826
+ }
6827
+ function adjustTooltipPosition(tPos, el, tooltipEl) {
6828
+ // position must be reset before measurements are taken in adjustTooltipPosition
6829
+ // otherwise text-wrapping from previous position makes width measurement inconsistent
6830
+ tooltipEl.style.top = "";
6831
+ tooltipEl.style.left = "";
6832
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6833
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6834
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6835
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
6836
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
6837
+ // a tooltip should never be closer than 24px to the edge of a screen
6838
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6839
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6840
+ const swapAbove = (position) => {
6841
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6842
+ };
6843
+ const swapBelow = (position) => {
6844
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6845
+ };
6846
+ const swapLeft = (position, centeredPosition) => {
6847
+ if (!enoughSpaceLeft && enoughSpaceRight) {
6848
+ position = position.replace("left", "right");
6849
+ }
6850
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
6851
+ position = centeredPosition;
6852
+ }
6853
+ return position;
6854
+ };
6855
+ const swapRight = (position, centeredPosition) => {
6856
+ if (!enoughSpaceRight && enoughSpaceLeft) {
6857
+ position = position.replace("right", "left");
6858
+ }
6859
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
6860
+ position = centeredPosition;
6861
+ }
6862
+ return position;
6863
+ };
6864
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6865
+ switch (tPos) {
6866
+ case "left":
6867
+ tPos = swapLeft(tPos, "bottom");
6868
+ case "right":
6869
+ tPos = swapRight(tPos, "bottom");
6870
+ case "top-left":
6871
+ tPos = swapLeft(tPos, "top");
6872
+ tPos = swapAbove(tPos);
6873
+ case "top-right":
6874
+ tPos = swapRight(tPos, "top");
6875
+ tPos = swapAbove(tPos);
6876
+ case "bottom-left":
6877
+ tPos = swapLeft(tPos, "bottom");
6878
+ tPos = swapBelow(tPos);
6879
+ case "bottom-right":
6880
+ tPos = swapRight(tPos, "bottom");
6881
+ tPos = swapBelow(tPos);
6882
+ case "top":
6883
+ tPos = swapAbove(tPos);
6884
+ case "bottom":
6885
+ tPos = swapBelow(tPos);
6886
+ }
6887
+ return tPos;
6888
+ }
6889
+ function hasRoomRight(x, spaceNeeded) {
6890
+ let horizOffset = 0;
6891
+ // if (getTextDir() === "ltr") {
6892
+ if (x.type === "click") {
6893
+ // if it's a mouse event, deal with mouse coords
6894
+ horizOffset = x.clientX;
6895
+ // if it's a focus event, the offset is 0
6896
+ }
6897
+ else if (x.type === "focus") {
6898
+ horizOffset = 0;
6899
+ }
6900
+ else {
6901
+ // otherwise an element was passed, calculate how far it is from the edge of the window
6902
+ let el = x; // re-assignment is for clarity
6903
+ while (el) {
6904
+ if (el.tagName == "BODY") {
6905
+ // deal with browser quirks with body/window/document and page scroll
6906
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6907
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6908
+ }
6909
+ else {
6910
+ // for all other non-BODY elements
6911
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6912
+ }
6913
+ el = el.offsetParent;
6914
+ }
6915
+ // }
6916
+ }
6917
+ return window.innerWidth - horizOffset >= spaceNeeded;
6918
+ }
6919
+ function checkForActiveElInShadow(element) {
6920
+ while (element && element.shadowRoot) {
6921
+ element = element.shadowRoot.activeElement;
6922
+ }
6923
+ return element;
6924
+ }
6925
+ function checkForFocusableElInShadow(element) {
6926
+ const selectors = [
6927
+ "button",
6928
+ "a",
6929
+ "input",
6930
+ "select",
6931
+ "textarea",
6932
+ "wm-button",
6933
+ "wm-search",
6934
+ "wm-select",
6935
+ "wm-action-menu",
6936
+ "wm-tab-item",
6937
+ "wm-datepicker",
6938
+ ];
6939
+ let focusableEl = element;
6940
+ selectors.forEach((selector) => {
6941
+ if (focusableEl && focusableEl.shadowRoot) {
6942
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6943
+ if (elInShadow) {
6944
+ if (selector.startsWith("wm-")) {
6945
+ focusableEl = checkForFocusableElInShadow(elInShadow);
6946
+ }
6947
+ else {
6948
+ focusableEl = elInShadow;
6949
+ }
6950
+ }
6951
+ }
6952
+ });
6953
+ return focusableEl;
6954
+ }
6955
+ function isFocusable(element) {
6956
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6957
+ return true;
6958
+ }
6959
+ if (element.disabled) {
6960
+ return false;
6961
+ }
6962
+ switch (element.nodeName) {
6963
+ case "A":
6964
+ return !!element.href && element.rel != "ignore";
6965
+ case "INPUT":
6966
+ return element.type != "hidden" && element.type != "file";
6967
+ case "BUTTON":
6968
+ case "SELECT":
6969
+ case "TEXTAREA":
6970
+ case "WM-BUTTON":
6971
+ case "WM-SELECT":
6972
+ case "WM-ACTION-MENU":
6973
+ case "WM-DATEPICKER":
6974
+ case "WM-TIMEPICKER":
6975
+ case "WM-INPUT":
6976
+ case "WM-TAG-INPUT":
6977
+ case "WM-TAB-ITEM":
6978
+ case "WM-SEARCH":
6979
+ return true;
6980
+ default:
6981
+ return false;
6982
+ }
6983
+ }
6984
+ function getFirstFocusableDescendant(element) {
6985
+ if (isFocusable(element)) {
6986
+ return checkForFocusableElInShadow(element);
6987
+ }
6988
+ else if (element.childNodes.length > 0) {
6989
+ element.childNodes.forEach((i) => {
6990
+ const childEl = getFirstFocusableDescendant(i);
6991
+ return childEl && checkForFocusableElInShadow(childEl);
6992
+ });
6993
+ }
6994
+ }
6995
+ function hasValidType(file, types) {
6996
+ const acceptedExtensions = types.split(" ");
6997
+ const parts = file.name && file.name.split(".");
6998
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
6999
+ return ext
7000
+ ? acceptedExtensions.includes(ext.toLowerCase())
7001
+ : // fallback: if we couldn't obtain an extension,
7002
+ // validate based on MIME type...
7003
+ !!file.type
7004
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
7005
+ : // ...and if that failed too, accept the file
7006
+ // as it's preferable to accept an invalid file
7007
+ // than refusing a valid one (back-end will take care of what slips through)
7008
+ true;
7009
+ }
7010
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
7011
+ function getAcceptedMimeTypesList(acceptedExtensions) {
7012
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
7013
+ // front end checks are just a convenience to users, independent of security.
7014
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
7015
+ const lookupTable = {
7016
+ aac: ["audio/aac"],
7017
+ abw: ["application/x-abiword"],
7018
+ arc: ["application/x-freearc"],
7019
+ avi: ["video/x-msvideo"],
7020
+ azw: ["application/vnd.amazon.ebook"],
7021
+ bin: ["application/octet-stream"],
7022
+ bmp: ["image/bmp"],
7023
+ bz: ["application/x-bzip"],
7024
+ bz2: ["application/x-bzip2"],
7025
+ csh: ["application/x-csh"],
7026
+ css: ["text/css"],
7027
+ csv: ["text/csv"],
7028
+ doc: ["application/msword"],
7029
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7030
+ eot: ["application/vnd.ms-fontobject"],
7031
+ epub: ["application/epub+zip"],
7032
+ gz: ["application/gzip"],
7033
+ gif: ["image/gif"],
7034
+ htm: ["text/html"],
7035
+ html: ["text/html"],
7036
+ ico: ["image/vnd.microsoft.icon"],
7037
+ ics: ["text/calendar"],
7038
+ jar: ["application/java-archive"],
7039
+ jpeg: ["image/jpeg"],
7040
+ jpg: ["image/jpeg"],
7041
+ js: ["text/javascript"],
7042
+ json: ["application/json"],
7043
+ jsonld: ["application/ld+json"],
7044
+ log: ["text/plain"],
7045
+ mid: ["audio/x-midi"],
7046
+ midi: ["audio/x-midi"],
7047
+ mjs: ["text/javascript"],
7048
+ mp3: ["audio/mpeg"],
7049
+ mpeg: ["video/mpeg"],
7050
+ mpkg: ["application/vnd.apple.installer+xml"],
7051
+ odp: ["application/vnd.oasis.opendocument.presentation"],
7052
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7053
+ odt: ["application/vnd.oasis.opendocument.text"],
7054
+ oga: ["audio/ogg"],
7055
+ ogv: ["video/ogg"],
7056
+ ogx: ["application/ogg"],
7057
+ opus: ["audio/opus"],
7058
+ otf: ["font/otf"],
7059
+ png: ["image/png"],
7060
+ pdf: ["application/pdf"],
7061
+ php: ["application/php"],
7062
+ ppt: ["application/vnd.ms-powerpoint"],
7063
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7064
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7065
+ rtf: ["application/rtf"],
7066
+ sh: ["application/x-sh"],
7067
+ svg: ["image/svg+xml"],
7068
+ swf: ["application/x-shockwave-flash"],
7069
+ tar: ["application/x-tar"],
7070
+ tif: ["image/tiff"],
7071
+ tiff: ["image/tiff"],
7072
+ ts: ["video/mp2t"],
7073
+ ttf: ["font/ttf"],
7074
+ txt: ["text/plain"],
7075
+ vsd: ["application/vnd.visio"],
7076
+ wav: ["audio/wav"],
7077
+ weba: ["audio/webm"],
7078
+ webm: ["video/webm"],
7079
+ webp: ["image/webp"],
7080
+ woff: ["font/woff"],
7081
+ woff2: ["font/woff2"],
7082
+ xhtml: ["application/xhtml+xml"],
7083
+ xls: ["application/vnd.ms-excel"],
7084
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7085
+ xml: ["application/xml", "text/xml"],
7086
+ xul: ["application/vnd.mozilla.xul+xml"],
7087
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7088
+ "3gp": ["video/3gpp", "audio/3gpp"],
7089
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
7090
+ "7z": ["application/x-7z-compressed"],
7091
+ };
7092
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7093
+ }
7094
+ function snakeCaseToCamelCase(str) {
7095
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7096
+ if (snakeCaseRegexp.test(str)) {
7097
+ let camelCase = "";
7098
+ let arr = str.split("_");
7099
+ arr.forEach((word, idx) => {
7100
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7101
+ });
7102
+ return camelCase;
7103
+ }
7104
+ else {
7105
+ return str;
7106
+ }
7107
+ }
7108
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
7109
+ let newIndex = currentIndex;
7110
+ if (direction === "ArrowDown") {
7111
+ newIndex = (currentIndex + 1) % listLength;
7112
+ }
7113
+ if (direction === "ArrowUp") {
7114
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7115
+ }
7116
+ return newIndex;
7117
+ }
7118
+ function isRelatedTarget(ev, id) {
7119
+ // used for onBlur events to check the element that has been clicked
7120
+ const ids = id.split(" ");
7121
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7122
+ }
7123
+ function toBool(val) {
7124
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7125
+ return val == "false" ? false : !!val;
7126
+ }
7127
+ /*
7128
+ * this is going to be needed to solve the extra tabbing on navigator
7129
+ * and for programmatic focus of tabs
7130
+ * Here's a draft, not bug proof, see:
7131
+ * https://stackoverflow.com/a/10730308/3741713
7132
+
7133
+ function getKeyboardFocusableElements(element = document) {
7134
+ 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'));
7135
+ return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7136
+ }
7137
+
7138
+ export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7139
+ const els = getKeyboardFocusableElements();
7140
+ const current = els.indexOf(element);
7141
+ return els[current - 1] as HTMLElement;
7142
+ }
7143
+
7144
+ export function getNextKeyboardFocusableElement(element: HTMLElement) {
7145
+ const els = getKeyboardFocusableElements();
7146
+ const current = els.indexOf(element);
7147
+ return els[current + 1] as HTMLElement;
7148
+ }
7111
7149
  */
7112
7150
 
7113
7151
  exports.adjustTooltipPosition = adjustTooltipPosition;