@watermarkinsights/ripple 3.9.0-0 → 3.9.0-3

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 (359) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/chartFunctions-a1dd1291.js +429 -0
  3. package/dist/cjs/{functions-b90816b8.js → functions-0750b767.js} +506 -532
  4. package/dist/cjs/{global-e85ea0f9.js → global-f2a6d27b.js} +60 -65
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{index-0e7e3668.js → index-98c6524c.js} +69 -96
  7. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  8. package/dist/cjs/loader.cjs.js +4 -4
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -79
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +659 -674
  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 +117 -476
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +267 -273
  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 +422 -422
  26. package/dist/cjs/wm-option_2.cjs.entry.js +487 -497
  27. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  28. package/dist/cjs/wm-progress-indicator.cjs.entry.js +92 -0
  29. package/dist/cjs/wm-progress-monitor.cjs.entry.js +61 -0
  30. package/dist/cjs/wm-progress-slice.cjs.entry.js +17 -0
  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 +348 -348
  38. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  39. package/dist/collection/collection-manifest.json +8 -5
  40. package/dist/collection/components/{wm-chart → charts}/priv-chart-popover/priv-chart-popover.css +0 -0
  41. package/dist/collection/components/{wm-chart → charts}/priv-chart-popover/priv-chart-popover.js +258 -232
  42. package/dist/collection/components/{wm-chart → charts/wm-chart}/wm-chart-slice.js +115 -115
  43. package/dist/collection/components/charts/wm-chart/wm-chart.css +460 -0
  44. package/dist/collection/components/charts/wm-chart/wm-chart.js +332 -0
  45. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +460 -0
  46. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +199 -0
  47. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +53 -0
  48. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +92 -0
  49. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -0
  50. package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
  51. package/dist/collection/components/wm-button/wm-button.css +2 -1
  52. package/dist/collection/components/wm-button/wm-button.js +491 -491
  53. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -3
  54. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1039
  55. package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
  56. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -483
  57. package/dist/collection/components/wm-input/wm-input.css +2 -1
  58. package/dist/collection/components/wm-input/wm-input.js +423 -423
  59. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  60. package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
  61. package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
  62. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  63. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +2 -1
  64. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  65. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  66. package/dist/collection/components/wm-navigation/wm-navigation.js +211 -211
  67. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  68. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  69. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  70. package/dist/collection/components/wm-option/wm-option.css +3 -2
  71. package/dist/collection/components/wm-option/wm-option.js +414 -422
  72. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  73. package/dist/collection/components/wm-search/wm-search.js +480 -480
  74. package/dist/collection/components/wm-select/wm-select.css +3 -2
  75. package/dist/collection/components/wm-select/wm-select.js +718 -720
  76. package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -2
  77. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  78. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
  79. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  80. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  81. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  82. package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -2
  83. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  84. package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -2
  85. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  86. package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -1
  87. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  88. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +2 -1
  89. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
  90. package/dist/collection/components/wm-uploader/wm-uploader.css +2 -1
  91. package/dist/collection/components/wm-uploader/wm-uploader.js +748 -748
  92. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  93. package/dist/collection/dev/scripts.js +20 -20
  94. package/dist/collection/global/__mocks__/functions.js +6 -6
  95. package/dist/collection/global/chartFunctions.js +417 -0
  96. package/dist/collection/global/functions.js +468 -468
  97. package/dist/collection/global/global.js +67 -72
  98. package/dist/collection/global/interfaces.js +49 -49
  99. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  100. package/dist/collection/global/services/http-service.js +50 -50
  101. package/dist/collection/lang/lang.js +5 -5
  102. package/dist/collection/lang/missing.js +39 -39
  103. package/dist/collection/lang/piglatin.js +93 -93
  104. package/dist/esm/chartFunctions-fc11df2b.js +420 -0
  105. package/dist/esm/{functions-8d09a511.js → functions-b478ef24.js} +506 -532
  106. package/dist/esm/{global-717c81fe.js → global-64333900.js} +60 -65
  107. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  108. package/dist/esm/{index-cd8f9ae2.js → index-d649a861.js} +69 -96
  109. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  110. package/dist/esm/loader.js +4 -4
  111. package/dist/esm/polyfills/core-js.js +0 -0
  112. package/dist/esm/polyfills/css-shim.js +1 -1
  113. package/dist/esm/polyfills/dom.js +0 -0
  114. package/dist/esm/polyfills/es5-html-element.js +0 -0
  115. package/dist/esm/polyfills/index.js +0 -0
  116. package/dist/esm/polyfills/system.js +0 -0
  117. package/dist/esm/priv-chart-popover.entry.js +87 -79
  118. package/dist/esm/priv-datepicker.entry.js +659 -674
  119. package/dist/esm/priv-navigator-button.entry.js +19 -19
  120. package/dist/esm/priv-navigator-item.entry.js +24 -24
  121. package/dist/esm/ripple.js +4 -4
  122. package/dist/esm/wm-action-menu_2.entry.js +342 -342
  123. package/dist/esm/wm-button.entry.js +228 -228
  124. package/dist/esm/wm-chart-slice.entry.js +14 -14
  125. package/dist/esm/wm-chart.entry.js +117 -476
  126. package/dist/esm/wm-datepicker.entry.js +267 -273
  127. package/dist/esm/wm-input.entry.js +136 -136
  128. package/dist/esm/wm-modal-footer.entry.js +32 -32
  129. package/dist/esm/wm-modal-header.entry.js +35 -35
  130. package/dist/esm/wm-modal.entry.js +164 -164
  131. package/dist/esm/wm-navigation_3.entry.js +222 -222
  132. package/dist/esm/wm-navigator.entry.js +269 -269
  133. package/dist/esm/wm-network-uploader.entry.js +422 -422
  134. package/dist/esm/wm-option_2.entry.js +487 -497
  135. package/dist/esm/wm-pagination.entry.js +168 -168
  136. package/dist/esm/wm-progress-indicator.entry.js +88 -0
  137. package/dist/esm/wm-progress-monitor.entry.js +57 -0
  138. package/dist/esm/wm-progress-slice.entry.js +13 -0
  139. package/dist/esm/wm-search.entry.js +233 -233
  140. package/dist/esm/wm-snackbar.entry.js +172 -172
  141. package/dist/esm/wm-tab-item_3.entry.js +298 -298
  142. package/dist/esm/wm-tag-input.entry.js +581 -581
  143. package/dist/esm/wm-timepicker.entry.js +385 -385
  144. package/dist/esm/wm-toggletip.entry.js +126 -126
  145. package/dist/esm/wm-uploader.entry.js +348 -348
  146. package/dist/esm/wm-wrapper.entry.js +13 -13
  147. package/dist/esm-es5/chartFunctions-fc11df2b.js +1 -0
  148. package/dist/esm-es5/functions-b478ef24.js +15 -0
  149. package/dist/esm-es5/global-64333900.js +1 -0
  150. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
  151. package/dist/esm-es5/index-d649a861.js +1 -0
  152. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  153. package/dist/esm-es5/loader.js +1 -1
  154. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  155. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  156. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  157. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  158. package/dist/esm-es5/ripple.js +1 -1
  159. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  160. package/dist/esm-es5/wm-button.entry.js +1 -1
  161. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  162. package/dist/esm-es5/wm-chart.entry.js +1 -1
  163. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  164. package/dist/esm-es5/wm-input.entry.js +1 -1
  165. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  166. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  167. package/dist/esm-es5/wm-modal.entry.js +1 -1
  168. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  169. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  170. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  171. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  172. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  173. package/dist/esm-es5/wm-progress-indicator.entry.js +1 -0
  174. package/dist/esm-es5/wm-progress-monitor.entry.js +1 -0
  175. package/dist/esm-es5/wm-progress-slice.entry.js +1 -0
  176. package/dist/esm-es5/wm-search.entry.js +1 -1
  177. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  178. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  179. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  180. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  181. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  182. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  183. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  184. package/dist/loader/index.d.ts +1 -0
  185. package/dist/ripple/p-063bc67c.system.entry.js +1 -0
  186. package/dist/ripple/{p-504579c2.system.entry.js → p-099df7b7.system.entry.js} +1 -1
  187. package/dist/ripple/p-0b23a4fe.entry.js +1 -0
  188. package/dist/ripple/p-1b2c3251.system.entry.js +1 -0
  189. package/dist/ripple/{p-34e0410e.system.entry.js → p-1b7be30d.system.entry.js} +1 -1
  190. package/dist/ripple/p-1e2c46f1.entry.js +1 -0
  191. package/dist/ripple/p-1e7fc028.entry.js +1 -0
  192. package/dist/ripple/p-2296c2c3.entry.js +1 -0
  193. package/dist/ripple/p-2587031d.system.entry.js +1 -0
  194. package/dist/ripple/p-29d527c8.entry.js +1 -0
  195. package/dist/ripple/p-2b6246d9.entry.js +1 -0
  196. package/dist/ripple/{p-a5177480.system.entry.js → p-2b63995f.system.entry.js} +1 -1
  197. package/dist/ripple/p-2b9c54e7.system.entry.js +1 -0
  198. package/dist/ripple/p-2cc9e6cf.system.entry.js +1 -0
  199. package/dist/ripple/p-30db4ad7.entry.js +1 -0
  200. package/dist/ripple/{p-dc0e6d55.system.entry.js → p-30e1daf7.system.entry.js} +1 -1
  201. package/dist/ripple/p-34736928.entry.js +1 -0
  202. package/dist/ripple/p-366e00f9.js +1 -0
  203. package/dist/ripple/p-3eb3a1f8.entry.js +1 -0
  204. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  205. package/dist/ripple/p-492ad5d0.system.entry.js +1 -0
  206. package/dist/ripple/p-4f23cdc6.entry.js +1 -0
  207. package/dist/ripple/p-50be3b44.js +1 -0
  208. package/dist/ripple/p-5743d4bc.system.entry.js +1 -0
  209. package/dist/ripple/p-59963be9.system.entry.js +1 -0
  210. package/dist/ripple/p-5d6cc9da.system.js +1 -0
  211. package/dist/ripple/p-5e5f162c.system.entry.js +1 -0
  212. package/dist/ripple/{p-53caf7e4.system.entry.js → p-647edff3.system.entry.js} +1 -1
  213. package/dist/ripple/p-6c295beb.entry.js +1 -0
  214. package/dist/ripple/p-6c751341.entry.js +1 -0
  215. package/dist/ripple/p-6f9e8fbc.entry.js +1 -0
  216. package/dist/ripple/p-70ececb5.entry.js +1 -0
  217. package/dist/ripple/p-7674c9b0.system.entry.js +1 -0
  218. package/dist/ripple/p-76b96f77.entry.js +1 -0
  219. package/dist/ripple/p-7a2a0d2e.js +16 -0
  220. package/dist/ripple/p-7c2b1682.entry.js +1 -0
  221. package/dist/ripple/p-7ef7bb76.system.entry.js +1 -0
  222. package/dist/ripple/p-7f0c64ac.entry.js +1 -0
  223. package/dist/ripple/p-803f1f22.entry.js +1 -0
  224. package/dist/ripple/p-84fb34b5.entry.js +1 -0
  225. package/dist/ripple/p-8a583f84.entry.js +1 -0
  226. package/dist/ripple/p-8be292a2.system.js +1 -0
  227. package/dist/ripple/p-8daa2613.system.entry.js +1 -0
  228. package/dist/ripple/p-935a266f.entry.js +1 -0
  229. package/dist/ripple/p-9d02957d.system.js +1 -0
  230. package/dist/ripple/p-a14ac623.entry.js +1 -0
  231. package/dist/ripple/{p-e758db14.system.entry.js → p-a1511315.system.entry.js} +1 -1
  232. package/dist/ripple/p-b325c35a.system.entry.js +1 -0
  233. package/dist/ripple/p-bf3fbca8.js +1 -0
  234. package/dist/ripple/{p-9a9743f5.system.entry.js → p-bfc1ab2e.system.entry.js} +1 -1
  235. package/dist/ripple/p-bfe93d8d.system.entry.js +1 -0
  236. package/dist/ripple/p-c1c7b0b1.system.js +15 -0
  237. package/dist/ripple/p-c20a179f.system.entry.js +1 -0
  238. package/dist/ripple/p-c8bbf15e.entry.js +1 -0
  239. package/dist/ripple/{p-7913283e.system.entry.js → p-cb7d8ade.system.entry.js} +1 -1
  240. package/dist/ripple/p-cfb62ded.entry.js +1 -0
  241. package/dist/ripple/p-d648d193.entry.js +1 -0
  242. package/dist/ripple/p-d7ff84eb.entry.js +1 -0
  243. package/dist/ripple/{p-c19298a5.system.entry.js → p-ddf157c8.system.entry.js} +1 -1
  244. package/dist/ripple/p-e6f0f663.entry.js +1 -0
  245. package/dist/ripple/p-e90f6915.system.js +1 -0
  246. package/dist/ripple/p-ea33bda7.system.entry.js +1 -0
  247. package/dist/ripple/p-f2566a42.system.entry.js +1 -0
  248. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  249. package/dist/ripple/p-f62fc5ea.system.entry.js +1 -0
  250. package/dist/ripple/p-f99d8fe3.system.js +1 -0
  251. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  252. package/dist/ripple/{p-dcfe93ea.system.entry.js → p-fd9380f2.system.entry.js} +1 -1
  253. package/dist/ripple/p-fe0abd10.system.entry.js +1 -0
  254. package/dist/ripple/p-fe2a30d3.entry.js +1 -0
  255. package/dist/ripple/p-ffbc5db3.entry.js +1 -0
  256. package/dist/ripple/ripple.esm.js +1 -1
  257. package/dist/ripple/ripple.js +1 -1
  258. package/dist/types/components/{wm-chart → charts}/priv-chart-popover/priv-chart-popover.d.ts +27 -23
  259. package/dist/types/components/{wm-chart → charts/wm-chart}/wm-chart-slice.d.ts +11 -11
  260. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +35 -0
  261. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -0
  262. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -0
  263. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -0
  264. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
  265. package/dist/types/components/wm-button/wm-button.d.ts +43 -43
  266. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  267. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -42
  268. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  269. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  270. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
  271. package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
  272. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  273. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  274. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  275. package/dist/types/components/wm-navigation/wm-navigation.d.ts +30 -30
  276. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  277. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  278. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  279. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  280. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  281. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  282. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  283. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  284. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  285. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  286. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  287. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  288. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  289. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  290. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  291. package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
  292. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  293. package/dist/types/components.d.ts +86 -24
  294. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  295. package/dist/types/global/chartFunctions.d.ts +28 -0
  296. package/dist/types/global/functions.d.ts +42 -42
  297. package/dist/types/global/global.d.ts +1 -1
  298. package/dist/types/global/interfaces.d.ts +44 -34
  299. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  300. package/dist/types/global/services/http-service.d.ts +4 -4
  301. package/dist/types/lang/lang.d.ts +5 -5
  302. package/dist/types/stencil-public-runtime.d.ts +4 -6
  303. package/package.json +47 -47
  304. package/dist/collection/components/wm-chart/wm-chart.css +0 -346
  305. package/dist/collection/components/wm-chart/wm-chart.js +0 -718
  306. package/dist/esm-es5/functions-8d09a511.js +0 -15
  307. package/dist/esm-es5/global-717c81fe.js +0 -1
  308. package/dist/esm-es5/index-cd8f9ae2.js +0 -1
  309. package/dist/ripple/p-0019a53b.entry.js +0 -1
  310. package/dist/ripple/p-09508c2d.entry.js +0 -1
  311. package/dist/ripple/p-0a916c6e.entry.js +0 -1
  312. package/dist/ripple/p-142d292c.system.entry.js +0 -1
  313. package/dist/ripple/p-1924d623.system.js +0 -1
  314. package/dist/ripple/p-1ef19ec1.entry.js +0 -1
  315. package/dist/ripple/p-20856a2d.system.js +0 -1
  316. package/dist/ripple/p-244877c8.entry.js +0 -1
  317. package/dist/ripple/p-253a08fe.system.js +0 -15
  318. package/dist/ripple/p-27f0d9be.entry.js +0 -1
  319. package/dist/ripple/p-313b6073.system.js +0 -1
  320. package/dist/ripple/p-38062c39.js +0 -1
  321. package/dist/ripple/p-39eea6bd.system.entry.js +0 -1
  322. package/dist/ripple/p-3b6b7618.entry.js +0 -1
  323. package/dist/ripple/p-3ba3afca.entry.js +0 -1
  324. package/dist/ripple/p-44342459.system.entry.js +0 -1
  325. package/dist/ripple/p-56963e2f.system.entry.js +0 -1
  326. package/dist/ripple/p-597985b9.entry.js +0 -1
  327. package/dist/ripple/p-5adc422a.entry.js +0 -1
  328. package/dist/ripple/p-5bc67a90.system.entry.js +0 -1
  329. package/dist/ripple/p-5e0d47b9.system.entry.js +0 -1
  330. package/dist/ripple/p-67f74636.entry.js +0 -1
  331. package/dist/ripple/p-6c65643e.system.entry.js +0 -1
  332. package/dist/ripple/p-71a400fd.entry.js +0 -1
  333. package/dist/ripple/p-7484c4e6.system.entry.js +0 -1
  334. package/dist/ripple/p-764fa608.entry.js +0 -1
  335. package/dist/ripple/p-7b6362ae.js +0 -1
  336. package/dist/ripple/p-80c042e2.system.js +0 -1
  337. package/dist/ripple/p-8a0450fd.entry.js +0 -1
  338. package/dist/ripple/p-8af7c223.entry.js +0 -1
  339. package/dist/ripple/p-8e2cbae6.system.entry.js +0 -1
  340. package/dist/ripple/p-93b1c864.system.entry.js +0 -1
  341. package/dist/ripple/p-991abdb9.system.entry.js +0 -1
  342. package/dist/ripple/p-99d610f9.entry.js +0 -1
  343. package/dist/ripple/p-9de1bcc5.system.entry.js +0 -1
  344. package/dist/ripple/p-a605a78b.system.entry.js +0 -1
  345. package/dist/ripple/p-a8d66745.js +0 -16
  346. package/dist/ripple/p-adde97b9.entry.js +0 -1
  347. package/dist/ripple/p-bd449bb6.entry.js +0 -1
  348. package/dist/ripple/p-bdd8caf1.entry.js +0 -1
  349. package/dist/ripple/p-bf3c22d9.entry.js +0 -1
  350. package/dist/ripple/p-c043d040.system.entry.js +0 -1
  351. package/dist/ripple/p-c8040acd.system.entry.js +0 -1
  352. package/dist/ripple/p-c9284e6b.entry.js +0 -1
  353. package/dist/ripple/p-cd75be7a.entry.js +0 -1
  354. package/dist/ripple/p-cdd5ce00.entry.js +0 -1
  355. package/dist/ripple/p-d680d98f.entry.js +0 -1
  356. package/dist/ripple/p-dd6b9aee.entry.js +0 -1
  357. package/dist/ripple/p-ef344252.entry.js +0 -1
  358. package/dist/ripple/p-f6b0fd8d.system.entry.js +0 -1
  359. package/dist/types/components/wm-chart/wm-chart.d.ts +0 -82
@@ -3916,17 +3916,11 @@ function icuUnitToEcma(unit) {
3916
3916
  return unit.replace(/^(.*?)-/, '');
3917
3917
  }
3918
3918
  var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
3919
- var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
3919
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
3920
3920
  var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
3921
3921
  var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
3922
3922
  function parseSignificantPrecision(str) {
3923
3923
  var result = {};
3924
- if (str[str.length - 1] === 'r') {
3925
- result.roundingPriority = 'morePrecision';
3926
- }
3927
- else if (str[str.length - 1] === 's') {
3928
- result.roundingPriority = 'lessPrecision';
3929
- }
3930
3924
  str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
3931
3925
  // @@@ case
3932
3926
  if (typeof g2 !== 'string') {
@@ -4153,13 +4147,8 @@ function parseNumberSkeleton(tokens) {
4153
4147
  }
4154
4148
  return '';
4155
4149
  });
4156
- var opt = token.options[0];
4157
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
4158
- if (opt === 'w') {
4159
- result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
4160
- }
4161
- else if (opt) {
4162
- result = __assign(__assign({}, result), parseSignificantPrecision(opt));
4150
+ if (token.options.length) {
4151
+ result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
4163
4152
  }
4164
4153
  continue;
4165
4154
  }
@@ -4181,8 +4170,8 @@ function parseNumberSkeleton(tokens) {
4181
4170
  }
4182
4171
 
4183
4172
  var _a;
4184
- var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
4185
- var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
4173
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
4174
+ var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
4186
4175
  function createLocation(start, end) {
4187
4176
  return { start: start, end: end };
4188
4177
  }
@@ -4429,7 +4418,7 @@ var Parser = /** @class */ (function () {
4429
4418
  return {
4430
4419
  val: {
4431
4420
  type: TYPE.literal,
4432
- value: "<".concat(tagName, "/>"),
4421
+ value: "<" + tagName + "/>",
4433
4422
  location: createLocation(startPosition, this.clonePosition()),
4434
4423
  },
4435
4424
  err: null,
@@ -5034,7 +5023,7 @@ var Parser = /** @class */ (function () {
5034
5023
  }
5035
5024
  var code = codePointAt(this.message, offset);
5036
5025
  if (code === undefined) {
5037
- throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
5026
+ throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
5038
5027
  }
5039
5028
  return code;
5040
5029
  };
@@ -5102,7 +5091,7 @@ var Parser = /** @class */ (function () {
5102
5091
  */
5103
5092
  Parser.prototype.bumpTo = function (targetOffset) {
5104
5093
  if (this.offset() > targetOffset) {
5105
- throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
5094
+ throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
5106
5095
  }
5107
5096
  targetOffset = Math.min(targetOffset, this.message.length);
5108
5097
  while (true) {
@@ -5111,7 +5100,7 @@ var Parser = /** @class */ (function () {
5111
5100
  break;
5112
5101
  }
5113
5102
  if (offset > targetOffset) {
5114
- throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
5103
+ throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
5115
5104
  }
5116
5105
  this.bump();
5117
5106
  if (this.isEOF()) {
@@ -5577,28 +5566,28 @@ var FormatError = /** @class */ (function (_super) {
5577
5566
  return _this;
5578
5567
  }
5579
5568
  FormatError.prototype.toString = function () {
5580
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
5569
+ return "[formatjs Error: " + this.code + "] " + this.message;
5581
5570
  };
5582
5571
  return FormatError;
5583
5572
  }(Error));
5584
5573
  var InvalidValueError = /** @class */ (function (_super) {
5585
5574
  __extends(InvalidValueError, _super);
5586
5575
  function InvalidValueError(variableId, value, options, originalMessage) {
5587
- return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
5576
+ return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
5588
5577
  }
5589
5578
  return InvalidValueError;
5590
5579
  }(FormatError));
5591
5580
  var InvalidValueTypeError = /** @class */ (function (_super) {
5592
5581
  __extends(InvalidValueTypeError, _super);
5593
5582
  function InvalidValueTypeError(value, type, originalMessage) {
5594
- return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
5583
+ return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
5595
5584
  }
5596
5585
  return InvalidValueTypeError;
5597
5586
  }(FormatError));
5598
5587
  var MissingValueError = /** @class */ (function (_super) {
5599
5588
  __extends(MissingValueError, _super);
5600
5589
  function MissingValueError(variableId, originalMessage) {
5601
- return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
5590
+ return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
5602
5591
  }
5603
5592
  return MissingValueError;
5604
5593
  }(FormatError));
@@ -5759,7 +5748,7 @@ originalMessage) {
5759
5748
  continue;
5760
5749
  }
5761
5750
  if (isPluralElement(el)) {
5762
- var opt = el.options["=".concat(value)];
5751
+ var opt = el.options["=" + value];
5763
5752
  if (!opt) {
5764
5753
  if (!Intl.PluralRules) {
5765
5754
  throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
@@ -5830,7 +5819,7 @@ function createDefaultFormatters(cache) {
5830
5819
  for (var _i = 0; _i < arguments.length; _i++) {
5831
5820
  args[_i] = arguments[_i];
5832
5821
  }
5833
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5822
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5834
5823
  }, {
5835
5824
  cache: createFastMemoizeCache$1(cache.number),
5836
5825
  strategy: strategies.variadic,
@@ -5841,7 +5830,7 @@ function createDefaultFormatters(cache) {
5841
5830
  for (var _i = 0; _i < arguments.length; _i++) {
5842
5831
  args[_i] = arguments[_i];
5843
5832
  }
5844
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5833
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5845
5834
  }, {
5846
5835
  cache: createFastMemoizeCache$1(cache.dateTime),
5847
5836
  strategy: strategies.variadic,
@@ -5852,7 +5841,7 @@ function createDefaultFormatters(cache) {
5852
5841
  for (var _i = 0; _i < arguments.length; _i++) {
5853
5842
  args[_i] = arguments[_i];
5854
5843
  }
5855
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
5844
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
5856
5845
  }, {
5857
5846
  cache: createFastMemoizeCache$1(cache.pluralRules),
5858
5847
  strategy: strategies.variadic,
@@ -6010,13 +5999,7 @@ var IntlErrorCode;
6010
5999
  var IntlError = /** @class */ (function (_super) {
6011
6000
  __extends(IntlError, _super);
6012
6001
  function IntlError(code, message, exception) {
6013
- var _this = this;
6014
- var err = exception
6015
- ? exception instanceof Error
6016
- ? exception
6017
- : new Error(String(exception))
6018
- : undefined;
6019
- _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
6002
+ var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
6020
6003
  _this.code = code;
6021
6004
  // @ts-ignore just so we don't need to declare dep on @types/node
6022
6005
  if (typeof Error.captureStackTrace === 'function') {
@@ -6048,26 +6031,19 @@ var MissingDataError = /** @class */ (function (_super) {
6048
6031
  }
6049
6032
  return MissingDataError;
6050
6033
  }(IntlError));
6051
- var IntlFormatError = /** @class */ (function (_super) {
6052
- __extends(IntlFormatError, _super);
6053
- function IntlFormatError(message, locale, exception) {
6054
- return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
6055
- }
6056
- return IntlFormatError;
6057
- }(IntlError));
6058
6034
  var MessageFormatError = /** @class */ (function (_super) {
6059
6035
  __extends(MessageFormatError, _super);
6060
6036
  function MessageFormatError(message, locale, descriptor, exception) {
6061
- 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;
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;
6062
6038
  _this.descriptor = descriptor;
6063
6039
  return _this;
6064
6040
  }
6065
6041
  return MessageFormatError;
6066
- }(IntlFormatError));
6042
+ }(IntlError));
6067
6043
  var MissingTranslationError = /** @class */ (function (_super) {
6068
6044
  __extends(MissingTranslationError, _super);
6069
6045
  function MissingTranslationError(descriptor, locale) {
6070
- 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;
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;
6071
6047
  _this.descriptor = descriptor;
6072
6048
  return _this;
6073
6049
  }
@@ -6094,7 +6070,6 @@ var DEFAULT_INTL_CONFIG = {
6094
6070
  timeZone: undefined,
6095
6071
  defaultLocale: 'en',
6096
6072
  defaultFormats: {},
6097
- fallbackOnEmptyString: true,
6098
6073
  onError: defaultErrorHandler,
6099
6074
  };
6100
6075
  function createIntlCache() {
@@ -6137,7 +6112,7 @@ function createFormatters(cache) {
6137
6112
  for (var _i = 0; _i < arguments.length; _i++) {
6138
6113
  args[_i] = arguments[_i];
6139
6114
  }
6140
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6115
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6141
6116
  }, {
6142
6117
  cache: createFastMemoizeCache(cache.dateTime),
6143
6118
  strategy: strategies.variadic,
@@ -6148,7 +6123,7 @@ function createFormatters(cache) {
6148
6123
  for (var _i = 0; _i < arguments.length; _i++) {
6149
6124
  args[_i] = arguments[_i];
6150
6125
  }
6151
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6126
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6152
6127
  }, {
6153
6128
  cache: createFastMemoizeCache(cache.number),
6154
6129
  strategy: strategies.variadic,
@@ -6159,7 +6134,7 @@ function createFormatters(cache) {
6159
6134
  for (var _i = 0; _i < arguments.length; _i++) {
6160
6135
  args[_i] = arguments[_i];
6161
6136
  }
6162
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
6137
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
6163
6138
  }, {
6164
6139
  cache: createFastMemoizeCache(cache.pluralRules),
6165
6140
  strategy: strategies.variadic,
@@ -6182,7 +6157,7 @@ function createFormatters(cache) {
6182
6157
  for (var _i = 0; _i < arguments.length; _i++) {
6183
6158
  args[_i] = arguments[_i];
6184
6159
  }
6185
- return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
6160
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
6186
6161
  }, {
6187
6162
  cache: createFastMemoizeCache(cache.relativeTime),
6188
6163
  strategy: strategies.variadic,
@@ -6193,7 +6168,7 @@ function createFormatters(cache) {
6193
6168
  for (var _i = 0; _i < arguments.length; _i++) {
6194
6169
  args[_i] = arguments[_i];
6195
6170
  }
6196
- return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
6171
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
6197
6172
  }, {
6198
6173
  cache: createFastMemoizeCache(cache.list),
6199
6174
  strategy: strategies.variadic,
@@ -6203,7 +6178,7 @@ function createFormatters(cache) {
6203
6178
  for (var _i = 0; _i < arguments.length; _i++) {
6204
6179
  args[_i] = arguments[_i];
6205
6180
  }
6206
- return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
6181
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
6207
6182
  }, {
6208
6183
  cache: createFastMemoizeCache(cache.displayNames),
6209
6184
  strategy: strategies.variadic,
@@ -6219,7 +6194,7 @@ function getNamedFormat(formats, type, name, onError) {
6219
6194
  if (format) {
6220
6195
  return format;
6221
6196
  }
6222
- onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
6197
+ onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
6223
6198
  }
6224
6199
 
6225
6200
  /**
@@ -6254,7 +6229,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
6254
6229
  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)) });
6255
6230
  }
6256
6231
  function formatMessage(_a, state, messageDescriptor, values, opts) {
6257
- 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;
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;
6258
6233
  if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
6259
6234
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
6260
6235
  // `id` is a required field of a Message Descriptor.
@@ -6284,9 +6259,6 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6284
6259
  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
6285
6260
  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
6286
6261
  if (!message) {
6287
- if (fallbackOnEmptyString === false && message === '') {
6288
- return message;
6289
- }
6290
6262
  if (!defaultMessage ||
6291
6263
  (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
6292
6264
  // This prevents warnings from littering the console in development
@@ -6300,7 +6272,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6300
6272
  return formatter.format(values);
6301
6273
  }
6302
6274
  catch (e) {
6303
- onError(new MessageFormatError("Error formatting default message for: \"".concat(id, "\", rendering default message verbatim"), locale, messageDescriptor, e));
6275
+ onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
6304
6276
  return typeof defaultMessage === 'string' ? defaultMessage : id;
6305
6277
  }
6306
6278
  }
@@ -6312,7 +6284,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6312
6284
  return formatter.format(values);
6313
6285
  }
6314
6286
  catch (e) {
6315
- onError(new MessageFormatError("Error formatting message: \"".concat(id, "\", using ").concat(defaultMessage ? 'default message' : 'id', " as fallback."), locale, messageDescriptor, e));
6287
+ onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
6316
6288
  }
6317
6289
  if (defaultMessage) {
6318
6290
  try {
@@ -6320,7 +6292,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6320
6292
  return formatter.format(values);
6321
6293
  }
6322
6294
  catch (e) {
6323
- onError(new MessageFormatError("Error formatting the default message for: \"".concat(id, "\", rendering message verbatim"), locale, messageDescriptor, e));
6295
+ onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
6324
6296
  }
6325
6297
  }
6326
6298
  if (typeof message === 'string') {
@@ -6358,7 +6330,9 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
6358
6330
  if (options === void 0) { options = {}; }
6359
6331
  var format = options.format;
6360
6332
  var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
6361
- var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
6333
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
6334
+ // @ts-expect-error es2020 has a lot stuff from es2021 bleed in
6335
+ defaults);
6362
6336
  if (type === 'time' &&
6363
6337
  !filteredOptions.hour &&
6364
6338
  !filteredOptions.minute &&
@@ -6475,7 +6449,7 @@ var LIST_FORMAT_OPTIONS = [
6475
6449
  ];
6476
6450
  var now = Date.now();
6477
6451
  function generateToken(i) {
6478
- return "".concat(now, "_").concat(i, "_").concat(now);
6452
+ return now + "_" + i + "_" + now;
6479
6453
  }
6480
6454
  function formatList(opts, getListFormat, values, options) {
6481
6455
  if (options === void 0) { options = {}; }
@@ -6542,7 +6516,7 @@ function formatPlural(_a, getPluralRules, value, options) {
6542
6516
  return getPluralRules(locale, filteredOptions).select(value);
6543
6517
  }
6544
6518
  catch (e) {
6545
- onError(new IntlFormatError('Error formatting plural.', locale, e));
6519
+ onError(new MessageFormatError('Error formatting plural.', e));
6546
6520
  }
6547
6521
  return 'other';
6548
6522
  }
@@ -6569,7 +6543,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
6569
6543
  return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
6570
6544
  }
6571
6545
  catch (e) {
6572
- config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));
6546
+ config.onError(new MessageFormatError('Error formatting relative time.', e));
6573
6547
  }
6574
6548
  return String(value);
6575
6549
  }
@@ -6649,7 +6623,7 @@ function createIntl(config, cache) {
6649
6623
  var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
6650
6624
  if (!locale) {
6651
6625
  if (onError) {
6652
- onError(new InvalidConfigError("\"locale\" was not configured, using \"".concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details")));
6626
+ onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
6653
6627
  }
6654
6628
  // Since there's no registered locale data for `locale`, this will
6655
6629
  // fallback to the `defaultLocale` to make sure things can render.
@@ -6659,481 +6633,481 @@ function createIntl(config, cache) {
6659
6633
  resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
6660
6634
  }
6661
6635
  else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
6662
- 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")));
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"));
6663
6637
  }
6664
6638
  else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
6665
6639
  onError) {
6666
- 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")));
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"));
6667
6641
  }
6668
6642
  verifyConfigMessages(resolvedConfig);
6669
6643
  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) });
6670
6644
  }
6671
6645
 
6672
- const DEFAULT_LANGUAGE = "en";
6673
- function getBrowserLang() {
6674
- const langAttr = document.documentElement.getAttribute("lang");
6675
- if (!!langAttr) {
6676
- return langAttr;
6677
- }
6678
- else if (window.navigator && window.navigator.language) {
6679
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6680
- return lang.slice(0, 2);
6681
- }
6682
- else {
6683
- return DEFAULT_LANGUAGE;
6684
- }
6685
- }
6686
- // prevents memory leak
6687
- const cache = createIntlCache();
6688
- const locale = getBrowserLang();
6689
- const intl = createIntl({
6690
- locale: locale,
6691
- defaultLocale: "en",
6692
- messages: lang[locale] || en,
6693
- }, cache);
6694
- function generateId() {
6695
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
6696
- }
6697
- // limits how many times a function fires
6698
- // use when the function should run periodically, but not too often (e.g. window resize)
6699
- function throttle(fn, wait) {
6700
- let timeout;
6701
- let shouldWait = false;
6702
- return function () {
6703
- const context = this;
6704
- if (!shouldWait) {
6705
- fn.apply(context, arguments);
6706
- shouldWait = true;
6707
- clearTimeout(timeout);
6708
- timeout = setTimeout(function () {
6709
- shouldWait = false;
6710
- }, wait);
6711
- }
6712
- };
6713
- }
6714
- // waits until it hasn't been called for [timeout] ms.
6715
- // use when the function should run only after something (event) is done firing
6716
- function debounce(fn, wait) {
6717
- let timeout;
6718
- return function () {
6719
- const context = this;
6720
- const functionCall = () => fn.apply(context, arguments);
6721
- clearTimeout(timeout);
6722
- timeout = setTimeout(functionCall, wait);
6723
- };
6724
- }
6725
- function getTextDir() {
6726
- const dir = document.querySelector("html").getAttribute("dir");
6727
- return dir ? dir.toLowerCase() : "";
6728
- }
6729
- function getPosition(el) {
6730
- const coords = el.getBoundingClientRect();
6731
- let x = coords.x;
6732
- let y = coords.y;
6733
- // Edge doesn't have x and y
6734
- if (!x) {
6735
- if (getTextDir() === "rtl") {
6736
- x = coords.right;
6737
- }
6738
- else {
6739
- x = coords.left;
6740
- }
6741
- y = coords.top;
6742
- }
6743
- return { x, y };
6744
- }
6745
- function findParentWithScrollbar(el) {
6746
- while (!!el) {
6747
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6748
- return el;
6749
- }
6750
- el = el.parentElement;
6751
- }
6752
- }
6753
- function findParentWithHiddenOverflow(el) {
6754
- while (!!el) {
6755
- if (window.getComputedStyle(el).overflowY !== "visible") {
6756
- return el;
6757
- }
6758
- el = el.parentElement;
6759
- }
6760
- }
6761
- function getClosableElementMeasurements(fixedEl, closableEl) {
6762
- const parent = findParentWithHiddenOverflow(fixedEl);
6763
- // if parent is not found, measurements are checked against the viewport
6764
- return {
6765
- closableElHeight: closableEl.clientHeight,
6766
- closableElWidth: closableEl.clientWidth,
6767
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6768
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6769
- spaceAbove: parent
6770
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6771
- : fixedEl.getBoundingClientRect().top,
6772
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6773
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6774
- spaceBelow: parent
6775
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6776
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6777
- spaceLeft: parent
6778
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6779
- : fixedEl.getBoundingClientRect().left,
6780
- spaceRight: parent
6781
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6782
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6783
- };
6784
- }
6785
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6786
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6787
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6788
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6789
- ) {
6790
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6791
- //we want to open up only if there's not enough space below AND there is enough space above
6792
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6793
- return openUp;
6794
- }
6795
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6796
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6797
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6798
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6799
- ) {
6800
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6801
- //we want to open up only if there's not enough space below AND there is enough space above
6802
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6803
- return openDown;
6804
- }
6805
- function shouldShiftRight(fixedEl, closableEl) {
6806
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6807
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6808
- return needsSpaceLeft;
6809
- }
6810
- function shouldShiftLeft(fixedEl, closableEl) {
6811
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6812
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6813
- return needsSpaceRight;
6814
- }
6815
- function adjustTooltipPosition(tPos, el, tooltipEl) {
6816
- // position must be reset before measurements are taken in adjustTooltipPosition
6817
- // otherwise text-wrapping from previous position makes width measurement inconsistent
6818
- tooltipEl.style.top = "";
6819
- tooltipEl.style.left = "";
6820
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6821
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6822
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6823
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
6824
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
6825
- // a tooltip should never be closer than 24px to the edge of a screen
6826
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6827
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6828
- const swapAbove = (position) => {
6829
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6830
- };
6831
- const swapBelow = (position) => {
6832
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6833
- };
6834
- const swapLeft = (position, centeredPosition) => {
6835
- if (!enoughSpaceLeft && enoughSpaceRight) {
6836
- position = position.replace("left", "right");
6837
- }
6838
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
6839
- position = centeredPosition;
6840
- }
6841
- return position;
6842
- };
6843
- const swapRight = (position, centeredPosition) => {
6844
- if (!enoughSpaceRight && enoughSpaceLeft) {
6845
- position = position.replace("right", "left");
6846
- }
6847
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
6848
- position = centeredPosition;
6849
- }
6850
- return position;
6851
- };
6852
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6853
- switch (tPos) {
6854
- case "left":
6855
- tPos = swapLeft(tPos, "bottom");
6856
- case "right":
6857
- tPos = swapRight(tPos, "bottom");
6858
- case "top-left":
6859
- tPos = swapLeft(tPos, "top");
6860
- tPos = swapAbove(tPos);
6861
- case "top-right":
6862
- tPos = swapRight(tPos, "top");
6863
- tPos = swapAbove(tPos);
6864
- case "bottom-left":
6865
- tPos = swapLeft(tPos, "bottom");
6866
- tPos = swapBelow(tPos);
6867
- case "bottom-right":
6868
- tPos = swapRight(tPos, "bottom");
6869
- tPos = swapBelow(tPos);
6870
- case "top":
6871
- tPos = swapAbove(tPos);
6872
- case "bottom":
6873
- tPos = swapBelow(tPos);
6874
- }
6875
- return tPos;
6876
- }
6877
- function hasRoomRight(x, spaceNeeded) {
6878
- let horizOffset = 0;
6879
- // if (getTextDir() === "ltr") {
6880
- if (x.type === "click") {
6881
- // if it's a mouse event, deal with mouse coords
6882
- horizOffset = x.clientX;
6883
- // if it's a focus event, the offset is 0
6884
- }
6885
- else if (x.type === "focus") {
6886
- horizOffset = 0;
6887
- }
6888
- else {
6889
- // otherwise an element was passed, calculate how far it is from the edge of the window
6890
- let el = x; // re-assignment is for clarity
6891
- while (el) {
6892
- if (el.tagName == "BODY") {
6893
- // deal with browser quirks with body/window/document and page scroll
6894
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6895
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6896
- }
6897
- else {
6898
- // for all other non-BODY elements
6899
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6900
- }
6901
- el = el.offsetParent;
6902
- }
6903
- // }
6904
- }
6905
- return window.innerWidth - horizOffset >= spaceNeeded;
6906
- }
6907
- function checkForActiveElInShadow(element) {
6908
- while (element && element.shadowRoot) {
6909
- element = element.shadowRoot.activeElement;
6910
- }
6911
- return element;
6912
- }
6913
- function checkForFocusableElInShadow(element) {
6914
- const selectors = [
6915
- "button",
6916
- "a",
6917
- "input",
6918
- "select",
6919
- "textarea",
6920
- "wm-button",
6921
- "wm-search",
6922
- "wm-select",
6923
- "wm-action-menu",
6924
- "wm-tab-item",
6925
- "wm-datepicker",
6926
- ];
6927
- let focusableEl = element;
6928
- selectors.forEach((selector) => {
6929
- if (focusableEl && focusableEl.shadowRoot) {
6930
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6931
- if (elInShadow) {
6932
- if (selector.startsWith("wm-")) {
6933
- focusableEl = checkForFocusableElInShadow(elInShadow);
6934
- }
6935
- else {
6936
- focusableEl = elInShadow;
6937
- }
6938
- }
6939
- }
6940
- });
6941
- return focusableEl;
6942
- }
6943
- function isFocusable(element) {
6944
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6945
- return true;
6946
- }
6947
- if (element.disabled) {
6948
- return false;
6949
- }
6950
- switch (element.nodeName) {
6951
- case "A":
6952
- return !!element.href && element.rel != "ignore";
6953
- case "INPUT":
6954
- return element.type != "hidden" && element.type != "file";
6955
- case "BUTTON":
6956
- case "SELECT":
6957
- case "TEXTAREA":
6958
- case "WM-BUTTON":
6959
- case "WM-SELECT":
6960
- case "WM-ACTION-MENU":
6961
- case "WM-DATEPICKER":
6962
- case "WM-TIMEPICKER":
6963
- case "WM-INPUT":
6964
- case "WM-TAG-INPUT":
6965
- case "WM-TAB-ITEM":
6966
- case "WM-SEARCH":
6967
- return true;
6968
- default:
6969
- return false;
6970
- }
6971
- }
6972
- function getFirstFocusableDescendant(element) {
6973
- if (isFocusable(element)) {
6974
- return checkForFocusableElInShadow(element);
6975
- }
6976
- else if (element.childNodes.length > 0) {
6977
- element.childNodes.forEach((i) => {
6978
- const childEl = getFirstFocusableDescendant(i);
6979
- return childEl && checkForFocusableElInShadow(childEl);
6980
- });
6981
- }
6982
- }
6983
- function hasValidType(file, types) {
6984
- const acceptedExtensions = types.split(" ");
6985
- const parts = file.name && file.name.split(".");
6986
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
6987
- return ext
6988
- ? acceptedExtensions.includes(ext.toLowerCase())
6989
- : // fallback: if we couldn't obtain an extension,
6990
- // validate based on MIME type...
6991
- !!file.type
6992
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6993
- : // ...and if that failed too, accept the file
6994
- // as it's preferable to accept an invalid file
6995
- // than refusing a valid one (back-end will take care of what slips through)
6996
- true;
6997
- }
6998
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6999
- function getAcceptedMimeTypesList(acceptedExtensions) {
7000
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
7001
- // front end checks are just a convenience to users, independent of security.
7002
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
7003
- const lookupTable = {
7004
- aac: ["audio/aac"],
7005
- abw: ["application/x-abiword"],
7006
- arc: ["application/x-freearc"],
7007
- avi: ["video/x-msvideo"],
7008
- azw: ["application/vnd.amazon.ebook"],
7009
- bin: ["application/octet-stream"],
7010
- bmp: ["image/bmp"],
7011
- bz: ["application/x-bzip"],
7012
- bz2: ["application/x-bzip2"],
7013
- csh: ["application/x-csh"],
7014
- css: ["text/css"],
7015
- csv: ["text/csv"],
7016
- doc: ["application/msword"],
7017
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7018
- eot: ["application/vnd.ms-fontobject"],
7019
- epub: ["application/epub+zip"],
7020
- gz: ["application/gzip"],
7021
- gif: ["image/gif"],
7022
- htm: ["text/html"],
7023
- html: ["text/html"],
7024
- ico: ["image/vnd.microsoft.icon"],
7025
- ics: ["text/calendar"],
7026
- jar: ["application/java-archive"],
7027
- jpeg: ["image/jpeg"],
7028
- jpg: ["image/jpeg"],
7029
- js: ["text/javascript"],
7030
- json: ["application/json"],
7031
- jsonld: ["application/ld+json"],
7032
- log: ["text/plain"],
7033
- mid: ["audio/x-midi"],
7034
- midi: ["audio/x-midi"],
7035
- mjs: ["text/javascript"],
7036
- mp3: ["audio/mpeg"],
7037
- mpeg: ["video/mpeg"],
7038
- mpkg: ["application/vnd.apple.installer+xml"],
7039
- odp: ["application/vnd.oasis.opendocument.presentation"],
7040
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7041
- odt: ["application/vnd.oasis.opendocument.text"],
7042
- oga: ["audio/ogg"],
7043
- ogv: ["video/ogg"],
7044
- ogx: ["application/ogg"],
7045
- opus: ["audio/opus"],
7046
- otf: ["font/otf"],
7047
- png: ["image/png"],
7048
- pdf: ["application/pdf"],
7049
- php: ["application/php"],
7050
- ppt: ["application/vnd.ms-powerpoint"],
7051
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7052
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7053
- rtf: ["application/rtf"],
7054
- sh: ["application/x-sh"],
7055
- svg: ["image/svg+xml"],
7056
- swf: ["application/x-shockwave-flash"],
7057
- tar: ["application/x-tar"],
7058
- tif: ["image/tiff"],
7059
- tiff: ["image/tiff"],
7060
- ts: ["video/mp2t"],
7061
- ttf: ["font/ttf"],
7062
- txt: ["text/plain"],
7063
- vsd: ["application/vnd.visio"],
7064
- wav: ["audio/wav"],
7065
- weba: ["audio/webm"],
7066
- webm: ["video/webm"],
7067
- webp: ["image/webp"],
7068
- woff: ["font/woff"],
7069
- woff2: ["font/woff2"],
7070
- xhtml: ["application/xhtml+xml"],
7071
- xls: ["application/vnd.ms-excel"],
7072
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7073
- xml: ["application/xml", "text/xml"],
7074
- xul: ["application/vnd.mozilla.xul+xml"],
7075
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7076
- "3gp": ["video/3gpp", "audio/3gpp"],
7077
- "3g2": ["video/3gpp2", "audio/3gpp2"],
7078
- "7z": ["application/x-7z-compressed"],
7079
- };
7080
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7081
- }
7082
- function snakeCaseToCamelCase(str) {
7083
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7084
- if (snakeCaseRegexp.test(str)) {
7085
- let camelCase = "";
7086
- let arr = str.split("_");
7087
- arr.forEach((word, idx) => {
7088
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7089
- });
7090
- return camelCase;
7091
- }
7092
- else {
7093
- return str;
7094
- }
7095
- }
7096
- function getNewIndexToFocus(currentIndex, direction, listLength) {
7097
- let newIndex = currentIndex;
7098
- if (direction === "ArrowDown") {
7099
- newIndex = (currentIndex + 1) % listLength;
7100
- }
7101
- if (direction === "ArrowUp") {
7102
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7103
- }
7104
- return newIndex;
7105
- }
7106
- function isRelatedTarget(ev, id) {
7107
- // used for onBlur events to check the element that has been clicked
7108
- const ids = id.split(" ");
7109
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7110
- }
7111
- function toBool(val) {
7112
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7113
- return val == "false" ? false : !!val;
7114
- }
7115
- /*
7116
- * this is going to be needed to solve the extra tabbing on navigator
7117
- * and for programmatic focus of tabs
7118
- * Here's a draft, not bug proof, see:
7119
- * https://stackoverflow.com/a/10730308/3741713
7120
-
7121
- function getKeyboardFocusableElements(element = document) {
7122
- 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'));
7123
- return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7124
- }
7125
-
7126
- export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7127
- const els = getKeyboardFocusableElements();
7128
- const current = els.indexOf(element);
7129
- return els[current - 1] as HTMLElement;
7130
- }
7131
-
7132
- export function getNextKeyboardFocusableElement(element: HTMLElement) {
7133
- const els = getKeyboardFocusableElements();
7134
- const current = els.indexOf(element);
7135
- return els[current + 1] as HTMLElement;
7136
- }
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
+ }
7137
7111
  */
7138
7112
 
7139
7113
  exports.adjustTooltipPosition = adjustTooltipPosition;