@watermarkinsights/ripple 3.8.0-2 → 3.8.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 (333) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{functions-edfdd03f.js → functions-83193a8d.js} +508 -509
  3. package/dist/cjs/{global-ffd0392c.js → global-2f521eb7.js} +65 -65
  4. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  5. package/dist/cjs/{index-0e7e3668.js → index-cd179539.js} +64 -96
  6. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  7. package/dist/cjs/loader.cjs.js +4 -4
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +79 -79
  9. package/dist/cjs/priv-datepicker.cjs.entry.js +674 -674
  10. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  11. package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
  12. package/dist/cjs/ripple.cjs.js +4 -4
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
  14. package/dist/cjs/wm-button.cjs.entry.js +228 -238
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
  16. package/dist/cjs/wm-chart.cjs.entry.js +475 -475
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +273 -273
  18. package/dist/cjs/wm-input.cjs.entry.js +136 -136
  19. package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
  20. package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
  21. package/dist/cjs/wm-modal.cjs.entry.js +164 -164
  22. package/dist/cjs/wm-navigation_3.cjs.entry.js +239 -0
  23. package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
  24. package/dist/cjs/wm-network-uploader.cjs.entry.js +422 -422
  25. package/dist/cjs/wm-option_2.cjs.entry.js +497 -497
  26. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  27. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  28. package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
  29. package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
  30. package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
  31. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  32. package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
  33. package/dist/cjs/wm-uploader.cjs.entry.js +348 -348
  34. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  35. package/dist/collection/collection-manifest.json +9 -7
  36. package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
  37. package/dist/collection/components/wm-button/wm-button.css +6 -1
  38. package/dist/collection/components/wm-button/wm-button.js +491 -503
  39. package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.js +232 -232
  40. package/dist/collection/components/wm-chart/wm-chart-slice.js +115 -115
  41. package/dist/collection/components/wm-chart/wm-chart.js +718 -718
  42. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -3
  43. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1039 -1039
  44. package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
  45. package/dist/collection/components/wm-datepicker/wm-datepicker.js +483 -483
  46. package/dist/collection/components/wm-input/wm-input.css +2 -1
  47. package/dist/collection/components/wm-input/wm-input.js +423 -423
  48. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  49. package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
  50. package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
  51. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  52. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +5 -3
  53. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +152 -96
  54. package/dist/collection/components/wm-navigation/wm-navigation-item.js +105 -101
  55. package/dist/collection/components/wm-navigation/wm-navigation.css +8 -3
  56. package/dist/collection/components/wm-navigation/wm-navigation.js +193 -142
  57. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  58. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  59. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  60. package/dist/collection/components/wm-option/wm-option.css +3 -2
  61. package/dist/collection/components/wm-option/wm-option.js +422 -422
  62. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  63. package/dist/collection/components/wm-search/wm-search.js +480 -480
  64. package/dist/collection/components/wm-select/wm-select.css +3 -2
  65. package/dist/collection/components/wm-select/wm-select.js +720 -720
  66. package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -2
  67. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  68. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
  69. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  70. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  71. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  72. package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -2
  73. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  74. package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -2
  75. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  76. package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -1
  77. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  78. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +2 -1
  79. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
  80. package/dist/collection/components/wm-uploader/wm-uploader.css +2 -1
  81. package/dist/collection/components/wm-uploader/wm-uploader.js +748 -748
  82. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  83. package/dist/collection/dev/scripts.js +20 -20
  84. package/dist/collection/global/__mocks__/functions.js +6 -6
  85. package/dist/collection/global/functions.js +468 -445
  86. package/dist/collection/global/global.js +72 -72
  87. package/dist/collection/global/interfaces.js +49 -49
  88. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  89. package/dist/collection/global/services/http-service.js +50 -50
  90. package/dist/collection/lang/lang.js +5 -5
  91. package/dist/collection/lang/missing.js +39 -39
  92. package/dist/collection/lang/piglatin.js +93 -93
  93. package/dist/esm/{functions-6cd52dcf.js → functions-7eebdc16.js} +507 -510
  94. package/dist/esm/{global-51d6ea5f.js → global-0dc2eb57.js} +65 -65
  95. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  96. package/dist/esm/{index-cd8f9ae2.js → index-66f8130e.js} +64 -96
  97. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  98. package/dist/esm/loader.js +4 -4
  99. package/dist/esm/polyfills/core-js.js +0 -0
  100. package/dist/esm/polyfills/css-shim.js +1 -1
  101. package/dist/esm/polyfills/dom.js +0 -0
  102. package/dist/esm/polyfills/es5-html-element.js +0 -0
  103. package/dist/esm/polyfills/index.js +0 -0
  104. package/dist/esm/polyfills/system.js +0 -0
  105. package/dist/esm/priv-chart-popover.entry.js +79 -79
  106. package/dist/esm/priv-datepicker.entry.js +674 -674
  107. package/dist/esm/priv-navigator-button.entry.js +19 -19
  108. package/dist/esm/priv-navigator-item.entry.js +24 -24
  109. package/dist/esm/ripple.js +4 -4
  110. package/dist/esm/wm-action-menu_2.entry.js +342 -342
  111. package/dist/esm/wm-button.entry.js +228 -238
  112. package/dist/esm/wm-chart-slice.entry.js +14 -14
  113. package/dist/esm/wm-chart.entry.js +475 -475
  114. package/dist/esm/wm-datepicker.entry.js +273 -273
  115. package/dist/esm/wm-input.entry.js +136 -136
  116. package/dist/esm/wm-modal-footer.entry.js +32 -32
  117. package/dist/esm/wm-modal-header.entry.js +35 -35
  118. package/dist/esm/wm-modal.entry.js +164 -164
  119. package/dist/esm/wm-navigation_3.entry.js +233 -0
  120. package/dist/esm/wm-navigator.entry.js +269 -269
  121. package/dist/esm/wm-network-uploader.entry.js +422 -422
  122. package/dist/esm/wm-option_2.entry.js +497 -497
  123. package/dist/esm/wm-pagination.entry.js +168 -168
  124. package/dist/esm/wm-search.entry.js +233 -233
  125. package/dist/esm/wm-snackbar.entry.js +172 -172
  126. package/dist/esm/wm-tab-item_3.entry.js +298 -298
  127. package/dist/esm/wm-tag-input.entry.js +581 -581
  128. package/dist/esm/wm-timepicker.entry.js +385 -385
  129. package/dist/esm/wm-toggletip.entry.js +126 -126
  130. package/dist/esm/wm-uploader.entry.js +348 -348
  131. package/dist/esm/wm-wrapper.entry.js +13 -13
  132. package/dist/esm-es5/functions-7eebdc16.js +15 -0
  133. package/dist/esm-es5/{global-51d6ea5f.js → global-0dc2eb57.js} +1 -1
  134. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
  135. package/dist/esm-es5/index-66f8130e.js +1 -0
  136. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  137. package/dist/esm-es5/loader.js +1 -1
  138. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  139. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  140. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  141. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  142. package/dist/esm-es5/ripple.js +1 -1
  143. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  144. package/dist/esm-es5/wm-button.entry.js +1 -1
  145. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  146. package/dist/esm-es5/wm-chart.entry.js +1 -1
  147. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  148. package/dist/esm-es5/wm-input.entry.js +1 -1
  149. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  150. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  151. package/dist/esm-es5/wm-modal.entry.js +1 -1
  152. package/dist/esm-es5/wm-navigation_3.entry.js +1 -0
  153. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  154. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  155. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  156. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  157. package/dist/esm-es5/wm-search.entry.js +1 -1
  158. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  159. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  160. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  161. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  162. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  163. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  164. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  165. package/dist/loader/index.d.ts +1 -0
  166. package/dist/ripple/p-00e0bf57.system.js +1 -0
  167. package/dist/ripple/p-061a0f47.entry.js +1 -0
  168. package/dist/ripple/p-0b345e33.system.entry.js +1 -0
  169. package/dist/ripple/p-0b746618.entry.js +1 -0
  170. package/dist/ripple/p-0c58f50d.entry.js +1 -0
  171. package/dist/ripple/p-0d8bd4ee.entry.js +1 -0
  172. package/dist/ripple/p-0f8d7b58.system.entry.js +1 -0
  173. package/dist/ripple/p-119a14c1.entry.js +1 -0
  174. package/dist/ripple/{p-aedd95e6.system.js → p-149db379.system.js} +1 -1
  175. package/dist/ripple/{p-4ed98fb1.system.entry.js → p-18af6ca6.system.entry.js} +1 -1
  176. package/dist/ripple/{p-45ee5b9d.system.entry.js → p-1ec7130b.system.entry.js} +1 -1
  177. package/dist/ripple/{p-c19298a5.system.entry.js → p-261ea633.system.entry.js} +1 -1
  178. package/dist/ripple/{p-9a9743f5.system.entry.js → p-2d49a016.system.entry.js} +1 -1
  179. package/dist/ripple/p-312f22ca.entry.js +1 -0
  180. package/dist/ripple/p-37907055.entry.js +1 -0
  181. package/dist/ripple/p-3c592c3b.entry.js +1 -0
  182. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  183. package/dist/ripple/p-48b385e6.entry.js +1 -0
  184. package/dist/ripple/p-501404ff.entry.js +1 -0
  185. package/dist/ripple/p-593e891e.entry.js +1 -0
  186. package/dist/ripple/p-5a08d74b.entry.js +1 -0
  187. package/dist/ripple/p-5a87e7d6.entry.js +1 -0
  188. package/dist/ripple/p-62a0f6a4.system.entry.js +1 -0
  189. package/dist/ripple/{p-83028f2c.js → p-6b6643f9.js} +1 -1
  190. package/dist/ripple/p-7093d32b.entry.js +1 -0
  191. package/dist/ripple/p-716fd2fa.system.entry.js +1 -0
  192. package/dist/ripple/{p-088e3c4c.system.entry.js → p-71bb4f49.system.entry.js} +1 -1
  193. package/dist/ripple/{p-e758db14.system.entry.js → p-7a9aac92.system.entry.js} +1 -1
  194. package/dist/ripple/{p-504579c2.system.entry.js → p-7bc744bf.system.entry.js} +1 -1
  195. package/dist/ripple/p-7fc8d607.system.entry.js +1 -0
  196. package/dist/ripple/p-820a1198.entry.js +1 -0
  197. package/dist/ripple/p-8b0eb05e.entry.js +1 -0
  198. package/dist/ripple/p-8bc0b663.system.entry.js +1 -0
  199. package/dist/ripple/p-99548d58.system.js +1 -0
  200. package/dist/ripple/p-99db8501.entry.js +1 -0
  201. package/dist/ripple/p-9b8f993d.entry.js +1 -0
  202. package/dist/ripple/p-9baa3039.js +1 -0
  203. package/dist/ripple/p-9d02957d.system.js +1 -0
  204. package/dist/ripple/p-a59094c9.system.entry.js +1 -0
  205. package/dist/ripple/p-a59713ca.entry.js +1 -0
  206. package/dist/ripple/p-a7e0ab85.entry.js +1 -0
  207. package/dist/ripple/{p-a5177480.system.entry.js → p-b3ce2033.system.entry.js} +1 -1
  208. package/dist/ripple/{p-284a9749.system.entry.js → p-bb31d263.system.entry.js} +1 -1
  209. package/dist/ripple/p-c34de6f3.system.entry.js +1 -0
  210. package/dist/ripple/p-c3615fa0.system.entry.js +1 -0
  211. package/dist/ripple/p-c45caf33.system.entry.js +1 -0
  212. package/dist/ripple/{p-f2ba1a0f.system.entry.js → p-c652f945.system.entry.js} +1 -1
  213. package/dist/ripple/p-c68975d3.entry.js +1 -0
  214. package/dist/ripple/p-ca21ca3a.js +16 -0
  215. package/dist/ripple/p-cb283dba.system.entry.js +1 -0
  216. package/dist/ripple/p-ceabb993.entry.js +1 -0
  217. package/dist/ripple/p-d044fcf4.system.js +15 -0
  218. package/dist/ripple/p-d0643c9b.entry.js +1 -0
  219. package/dist/ripple/p-de09f545.system.entry.js +1 -0
  220. package/dist/ripple/{p-1d7049b5.system.entry.js → p-dea73ebd.system.entry.js} +1 -1
  221. package/dist/ripple/p-e639b06c.system.entry.js +1 -0
  222. package/dist/ripple/p-eb0c2d8f.system.entry.js +1 -0
  223. package/dist/ripple/p-f4fcd826.entry.js +1 -0
  224. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  225. package/dist/ripple/{p-15759528.system.entry.js → p-f781014a.system.entry.js} +1 -1
  226. package/dist/ripple/p-f927e5da.entry.js +1 -0
  227. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  228. package/dist/ripple/p-ffc746cb.entry.js +1 -0
  229. package/dist/ripple/ripple.esm.js +1 -1
  230. package/dist/ripple/ripple.js +1 -1
  231. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
  232. package/dist/types/components/wm-button/wm-button.d.ts +43 -44
  233. package/dist/types/components/wm-chart/priv-chart-popover/priv-chart-popover.d.ts +23 -23
  234. package/dist/types/components/wm-chart/wm-chart-slice.d.ts +11 -11
  235. package/dist/types/components/wm-chart/wm-chart.d.ts +82 -82
  236. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  237. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -42
  238. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  239. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  240. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
  241. package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
  242. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  243. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +20 -13
  244. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +11 -10
  245. package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -19
  246. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  247. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  248. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  249. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  250. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  251. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  252. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  253. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  254. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  255. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  256. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  257. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  258. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  259. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  260. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  261. package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
  262. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  263. package/dist/types/components.d.ts +26 -24
  264. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  265. package/dist/types/global/functions.d.ts +42 -40
  266. package/dist/types/global/global.d.ts +1 -1
  267. package/dist/types/global/interfaces.d.ts +34 -34
  268. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  269. package/dist/types/global/services/http-service.d.ts +4 -4
  270. package/dist/types/lang/lang.d.ts +5 -5
  271. package/dist/types/stencil-public-runtime.d.ts +4 -6
  272. package/package.json +47 -47
  273. package/dist/cjs/wm-navigation-hamburger.cjs.entry.js +0 -56
  274. package/dist/cjs/wm-navigation-item.cjs.entry.js +0 -31
  275. package/dist/cjs/wm-navigation.cjs.entry.js +0 -87
  276. package/dist/esm/wm-navigation-hamburger.entry.js +0 -52
  277. package/dist/esm/wm-navigation-item.entry.js +0 -27
  278. package/dist/esm/wm-navigation.entry.js +0 -83
  279. package/dist/esm-es5/functions-6cd52dcf.js +0 -15
  280. package/dist/esm-es5/index-cd8f9ae2.js +0 -1
  281. package/dist/esm-es5/wm-navigation-hamburger.entry.js +0 -1
  282. package/dist/esm-es5/wm-navigation-item.entry.js +0 -1
  283. package/dist/esm-es5/wm-navigation.entry.js +0 -1
  284. package/dist/ripple/p-05b44011.system.entry.js +0 -1
  285. package/dist/ripple/p-17fef956.entry.js +0 -1
  286. package/dist/ripple/p-20856a2d.system.js +0 -1
  287. package/dist/ripple/p-2206c8d0.entry.js +0 -1
  288. package/dist/ripple/p-244877c8.entry.js +0 -1
  289. package/dist/ripple/p-2b526a98.entry.js +0 -1
  290. package/dist/ripple/p-2f63e022.system.entry.js +0 -1
  291. package/dist/ripple/p-313b6073.system.js +0 -1
  292. package/dist/ripple/p-323c8fbd.entry.js +0 -1
  293. package/dist/ripple/p-38062c39.js +0 -1
  294. package/dist/ripple/p-3ba3afca.entry.js +0 -1
  295. package/dist/ripple/p-48ab9e16.entry.js +0 -1
  296. package/dist/ripple/p-4999f5dc.entry.js +0 -1
  297. package/dist/ripple/p-4ab257fe.entry.js +0 -1
  298. package/dist/ripple/p-4c0de099.system.entry.js +0 -1
  299. package/dist/ripple/p-4c75587a.system.entry.js +0 -1
  300. package/dist/ripple/p-58a1e616.system.entry.js +0 -1
  301. package/dist/ripple/p-5fd47eac.entry.js +0 -1
  302. package/dist/ripple/p-664c3f62.entry.js +0 -1
  303. package/dist/ripple/p-6923b8f6.system.js +0 -15
  304. package/dist/ripple/p-6e5a35ae.system.entry.js +0 -1
  305. package/dist/ripple/p-741972e8.system.entry.js +0 -1
  306. package/dist/ripple/p-764fa608.entry.js +0 -1
  307. package/dist/ripple/p-77bd8d1b.entry.js +0 -1
  308. package/dist/ripple/p-7ff67db9.entry.js +0 -1
  309. package/dist/ripple/p-8139cdfe.system.js +0 -1
  310. package/dist/ripple/p-864b71bf.system.entry.js +0 -1
  311. package/dist/ripple/p-87b8fddf.entry.js +0 -1
  312. package/dist/ripple/p-8a0450fd.entry.js +0 -1
  313. package/dist/ripple/p-9173f673.entry.js +0 -1
  314. package/dist/ripple/p-9f442b49.system.entry.js +0 -1
  315. package/dist/ripple/p-a2c2f475.system.entry.js +0 -1
  316. package/dist/ripple/p-a3fcdd9f.entry.js +0 -1
  317. package/dist/ripple/p-a588ae81.entry.js +0 -1
  318. package/dist/ripple/p-a8358b36.entry.js +0 -1
  319. package/dist/ripple/p-a88d46f9.system.entry.js +0 -1
  320. package/dist/ripple/p-a8dfec6d.system.entry.js +0 -1
  321. package/dist/ripple/p-b1d25dec.entry.js +0 -1
  322. package/dist/ripple/p-b542340c.system.entry.js +0 -1
  323. package/dist/ripple/p-c401898d.entry.js +0 -1
  324. package/dist/ripple/p-ce81ccb4.system.entry.js +0 -1
  325. package/dist/ripple/p-cfa8106a.system.entry.js +0 -1
  326. package/dist/ripple/p-dadb6c78.js +0 -16
  327. package/dist/ripple/p-db7f5d60.entry.js +0 -1
  328. package/dist/ripple/p-dff01b0a.system.entry.js +0 -1
  329. package/dist/ripple/p-ecb6a2e0.entry.js +0 -1
  330. package/dist/ripple/p-ef344252.entry.js +0 -1
  331. package/dist/ripple/p-f0dfc5d7.entry.js +0 -1
  332. package/dist/ripple/p-f92f2d83.entry.js +0 -1
  333. package/dist/ripple/p-fe0a25c1.entry.js +0 -1
@@ -3878,17 +3878,11 @@ function icuUnitToEcma(unit) {
3878
3878
  return unit.replace(/^(.*?)-/, '');
3879
3879
  }
3880
3880
  var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
3881
- var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
3881
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
3882
3882
  var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
3883
3883
  var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
3884
3884
  function parseSignificantPrecision(str) {
3885
3885
  var result = {};
3886
- if (str[str.length - 1] === 'r') {
3887
- result.roundingPriority = 'morePrecision';
3888
- }
3889
- else if (str[str.length - 1] === 's') {
3890
- result.roundingPriority = 'lessPrecision';
3891
- }
3892
3886
  str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
3893
3887
  // @@@ case
3894
3888
  if (typeof g2 !== 'string') {
@@ -4115,13 +4109,8 @@ function parseNumberSkeleton(tokens) {
4115
4109
  }
4116
4110
  return '';
4117
4111
  });
4118
- var opt = token.options[0];
4119
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
4120
- if (opt === 'w') {
4121
- result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
4122
- }
4123
- else if (opt) {
4124
- result = __assign(__assign({}, result), parseSignificantPrecision(opt));
4112
+ if (token.options.length) {
4113
+ result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
4125
4114
  }
4126
4115
  continue;
4127
4116
  }
@@ -4143,8 +4132,8 @@ function parseNumberSkeleton(tokens) {
4143
4132
  }
4144
4133
 
4145
4134
  var _a;
4146
- var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
4147
- var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
4135
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
4136
+ var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
4148
4137
  function createLocation(start, end) {
4149
4138
  return { start: start, end: end };
4150
4139
  }
@@ -4391,7 +4380,7 @@ var Parser = /** @class */ (function () {
4391
4380
  return {
4392
4381
  val: {
4393
4382
  type: TYPE.literal,
4394
- value: "<".concat(tagName, "/>"),
4383
+ value: "<" + tagName + "/>",
4395
4384
  location: createLocation(startPosition, this.clonePosition()),
4396
4385
  },
4397
4386
  err: null,
@@ -4996,7 +4985,7 @@ var Parser = /** @class */ (function () {
4996
4985
  }
4997
4986
  var code = codePointAt(this.message, offset);
4998
4987
  if (code === undefined) {
4999
- throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
4988
+ throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
5000
4989
  }
5001
4990
  return code;
5002
4991
  };
@@ -5064,7 +5053,7 @@ var Parser = /** @class */ (function () {
5064
5053
  */
5065
5054
  Parser.prototype.bumpTo = function (targetOffset) {
5066
5055
  if (this.offset() > targetOffset) {
5067
- throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
5056
+ throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
5068
5057
  }
5069
5058
  targetOffset = Math.min(targetOffset, this.message.length);
5070
5059
  while (true) {
@@ -5073,7 +5062,7 @@ var Parser = /** @class */ (function () {
5073
5062
  break;
5074
5063
  }
5075
5064
  if (offset > targetOffset) {
5076
- throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
5065
+ throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
5077
5066
  }
5078
5067
  this.bump();
5079
5068
  if (this.isEOF()) {
@@ -5539,28 +5528,28 @@ var FormatError = /** @class */ (function (_super) {
5539
5528
  return _this;
5540
5529
  }
5541
5530
  FormatError.prototype.toString = function () {
5542
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
5531
+ return "[formatjs Error: " + this.code + "] " + this.message;
5543
5532
  };
5544
5533
  return FormatError;
5545
5534
  }(Error));
5546
5535
  var InvalidValueError = /** @class */ (function (_super) {
5547
5536
  __extends(InvalidValueError, _super);
5548
5537
  function InvalidValueError(variableId, value, options, originalMessage) {
5549
- return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
5538
+ return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
5550
5539
  }
5551
5540
  return InvalidValueError;
5552
5541
  }(FormatError));
5553
5542
  var InvalidValueTypeError = /** @class */ (function (_super) {
5554
5543
  __extends(InvalidValueTypeError, _super);
5555
5544
  function InvalidValueTypeError(value, type, originalMessage) {
5556
- return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
5545
+ return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
5557
5546
  }
5558
5547
  return InvalidValueTypeError;
5559
5548
  }(FormatError));
5560
5549
  var MissingValueError = /** @class */ (function (_super) {
5561
5550
  __extends(MissingValueError, _super);
5562
5551
  function MissingValueError(variableId, originalMessage) {
5563
- return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
5552
+ return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
5564
5553
  }
5565
5554
  return MissingValueError;
5566
5555
  }(FormatError));
@@ -5721,7 +5710,7 @@ originalMessage) {
5721
5710
  continue;
5722
5711
  }
5723
5712
  if (isPluralElement(el)) {
5724
- var opt = el.options["=".concat(value)];
5713
+ var opt = el.options["=" + value];
5725
5714
  if (!opt) {
5726
5715
  if (!Intl.PluralRules) {
5727
5716
  throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
@@ -5792,7 +5781,7 @@ function createDefaultFormatters(cache) {
5792
5781
  for (var _i = 0; _i < arguments.length; _i++) {
5793
5782
  args[_i] = arguments[_i];
5794
5783
  }
5795
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5784
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5796
5785
  }, {
5797
5786
  cache: createFastMemoizeCache$1(cache.number),
5798
5787
  strategy: strategies.variadic,
@@ -5803,7 +5792,7 @@ function createDefaultFormatters(cache) {
5803
5792
  for (var _i = 0; _i < arguments.length; _i++) {
5804
5793
  args[_i] = arguments[_i];
5805
5794
  }
5806
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5795
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5807
5796
  }, {
5808
5797
  cache: createFastMemoizeCache$1(cache.dateTime),
5809
5798
  strategy: strategies.variadic,
@@ -5814,7 +5803,7 @@ function createDefaultFormatters(cache) {
5814
5803
  for (var _i = 0; _i < arguments.length; _i++) {
5815
5804
  args[_i] = arguments[_i];
5816
5805
  }
5817
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
5806
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
5818
5807
  }, {
5819
5808
  cache: createFastMemoizeCache$1(cache.pluralRules),
5820
5809
  strategy: strategies.variadic,
@@ -5972,13 +5961,7 @@ var IntlErrorCode;
5972
5961
  var IntlError = /** @class */ (function (_super) {
5973
5962
  __extends(IntlError, _super);
5974
5963
  function IntlError(code, message, exception) {
5975
- var _this = this;
5976
- var err = exception
5977
- ? exception instanceof Error
5978
- ? exception
5979
- : new Error(String(exception))
5980
- : undefined;
5981
- _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
5964
+ var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
5982
5965
  _this.code = code;
5983
5966
  // @ts-ignore just so we don't need to declare dep on @types/node
5984
5967
  if (typeof Error.captureStackTrace === 'function') {
@@ -6010,26 +5993,19 @@ var MissingDataError = /** @class */ (function (_super) {
6010
5993
  }
6011
5994
  return MissingDataError;
6012
5995
  }(IntlError));
6013
- var IntlFormatError = /** @class */ (function (_super) {
6014
- __extends(IntlFormatError, _super);
6015
- function IntlFormatError(message, locale, exception) {
6016
- return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
6017
- }
6018
- return IntlFormatError;
6019
- }(IntlError));
6020
5996
  var MessageFormatError = /** @class */ (function (_super) {
6021
5997
  __extends(MessageFormatError, _super);
6022
5998
  function MessageFormatError(message, locale, descriptor, exception) {
6023
- 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;
5999
+ 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;
6024
6000
  _this.descriptor = descriptor;
6025
6001
  return _this;
6026
6002
  }
6027
6003
  return MessageFormatError;
6028
- }(IntlFormatError));
6004
+ }(IntlError));
6029
6005
  var MissingTranslationError = /** @class */ (function (_super) {
6030
6006
  __extends(MissingTranslationError, _super);
6031
6007
  function MissingTranslationError(descriptor, locale) {
6032
- 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;
6008
+ var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"" + descriptor.id + "\" for locale \"" + locale + "\", using " + (descriptor.defaultMessage ? 'default message' : 'id') + " as fallback.") || this;
6033
6009
  _this.descriptor = descriptor;
6034
6010
  return _this;
6035
6011
  }
@@ -6056,7 +6032,6 @@ var DEFAULT_INTL_CONFIG = {
6056
6032
  timeZone: undefined,
6057
6033
  defaultLocale: 'en',
6058
6034
  defaultFormats: {},
6059
- fallbackOnEmptyString: true,
6060
6035
  onError: defaultErrorHandler,
6061
6036
  };
6062
6037
  function createIntlCache() {
@@ -6099,7 +6074,7 @@ function createFormatters(cache) {
6099
6074
  for (var _i = 0; _i < arguments.length; _i++) {
6100
6075
  args[_i] = arguments[_i];
6101
6076
  }
6102
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6077
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6103
6078
  }, {
6104
6079
  cache: createFastMemoizeCache(cache.dateTime),
6105
6080
  strategy: strategies.variadic,
@@ -6110,7 +6085,7 @@ function createFormatters(cache) {
6110
6085
  for (var _i = 0; _i < arguments.length; _i++) {
6111
6086
  args[_i] = arguments[_i];
6112
6087
  }
6113
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6088
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6114
6089
  }, {
6115
6090
  cache: createFastMemoizeCache(cache.number),
6116
6091
  strategy: strategies.variadic,
@@ -6121,7 +6096,7 @@ function createFormatters(cache) {
6121
6096
  for (var _i = 0; _i < arguments.length; _i++) {
6122
6097
  args[_i] = arguments[_i];
6123
6098
  }
6124
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
6099
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
6125
6100
  }, {
6126
6101
  cache: createFastMemoizeCache(cache.pluralRules),
6127
6102
  strategy: strategies.variadic,
@@ -6144,7 +6119,7 @@ function createFormatters(cache) {
6144
6119
  for (var _i = 0; _i < arguments.length; _i++) {
6145
6120
  args[_i] = arguments[_i];
6146
6121
  }
6147
- return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
6122
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
6148
6123
  }, {
6149
6124
  cache: createFastMemoizeCache(cache.relativeTime),
6150
6125
  strategy: strategies.variadic,
@@ -6155,7 +6130,7 @@ function createFormatters(cache) {
6155
6130
  for (var _i = 0; _i < arguments.length; _i++) {
6156
6131
  args[_i] = arguments[_i];
6157
6132
  }
6158
- return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
6133
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
6159
6134
  }, {
6160
6135
  cache: createFastMemoizeCache(cache.list),
6161
6136
  strategy: strategies.variadic,
@@ -6165,7 +6140,7 @@ function createFormatters(cache) {
6165
6140
  for (var _i = 0; _i < arguments.length; _i++) {
6166
6141
  args[_i] = arguments[_i];
6167
6142
  }
6168
- return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
6143
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
6169
6144
  }, {
6170
6145
  cache: createFastMemoizeCache(cache.displayNames),
6171
6146
  strategy: strategies.variadic,
@@ -6181,7 +6156,7 @@ function getNamedFormat(formats, type, name, onError) {
6181
6156
  if (format) {
6182
6157
  return format;
6183
6158
  }
6184
- onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
6159
+ onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
6185
6160
  }
6186
6161
 
6187
6162
  /**
@@ -6216,7 +6191,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
6216
6191
  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)) });
6217
6192
  }
6218
6193
  function formatMessage(_a, state, messageDescriptor, values, opts) {
6219
- 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;
6194
+ 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;
6220
6195
  if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
6221
6196
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
6222
6197
  // `id` is a required field of a Message Descriptor.
@@ -6246,9 +6221,6 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6246
6221
  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
6247
6222
  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
6248
6223
  if (!message) {
6249
- if (fallbackOnEmptyString === false && message === '') {
6250
- return message;
6251
- }
6252
6224
  if (!defaultMessage ||
6253
6225
  (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
6254
6226
  // This prevents warnings from littering the console in development
@@ -6262,7 +6234,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6262
6234
  return formatter.format(values);
6263
6235
  }
6264
6236
  catch (e) {
6265
- onError(new MessageFormatError("Error formatting default message for: \"".concat(id, "\", rendering default message verbatim"), locale, messageDescriptor, e));
6237
+ onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
6266
6238
  return typeof defaultMessage === 'string' ? defaultMessage : id;
6267
6239
  }
6268
6240
  }
@@ -6274,7 +6246,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6274
6246
  return formatter.format(values);
6275
6247
  }
6276
6248
  catch (e) {
6277
- onError(new MessageFormatError("Error formatting message: \"".concat(id, "\", using ").concat(defaultMessage ? 'default message' : 'id', " as fallback."), locale, messageDescriptor, e));
6249
+ onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
6278
6250
  }
6279
6251
  if (defaultMessage) {
6280
6252
  try {
@@ -6282,7 +6254,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6282
6254
  return formatter.format(values);
6283
6255
  }
6284
6256
  catch (e) {
6285
- onError(new MessageFormatError("Error formatting the default message for: \"".concat(id, "\", rendering message verbatim"), locale, messageDescriptor, e));
6257
+ onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
6286
6258
  }
6287
6259
  }
6288
6260
  if (typeof message === 'string') {
@@ -6320,7 +6292,9 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
6320
6292
  if (options === void 0) { options = {}; }
6321
6293
  var format = options.format;
6322
6294
  var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
6323
- var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
6295
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
6296
+ // @ts-expect-error es2020 has a lot stuff from es2021 bleed in
6297
+ defaults);
6324
6298
  if (type === 'time' &&
6325
6299
  !filteredOptions.hour &&
6326
6300
  !filteredOptions.minute &&
@@ -6437,7 +6411,7 @@ var LIST_FORMAT_OPTIONS = [
6437
6411
  ];
6438
6412
  var now = Date.now();
6439
6413
  function generateToken(i) {
6440
- return "".concat(now, "_").concat(i, "_").concat(now);
6414
+ return now + "_" + i + "_" + now;
6441
6415
  }
6442
6416
  function formatList(opts, getListFormat, values, options) {
6443
6417
  if (options === void 0) { options = {}; }
@@ -6504,7 +6478,7 @@ function formatPlural(_a, getPluralRules, value, options) {
6504
6478
  return getPluralRules(locale, filteredOptions).select(value);
6505
6479
  }
6506
6480
  catch (e) {
6507
- onError(new IntlFormatError('Error formatting plural.', locale, e));
6481
+ onError(new MessageFormatError('Error formatting plural.', e));
6508
6482
  }
6509
6483
  return 'other';
6510
6484
  }
@@ -6531,7 +6505,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
6531
6505
  return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
6532
6506
  }
6533
6507
  catch (e) {
6534
- config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));
6508
+ config.onError(new MessageFormatError('Error formatting relative time.', e));
6535
6509
  }
6536
6510
  return String(value);
6537
6511
  }
@@ -6611,7 +6585,7 @@ function createIntl(config, cache) {
6611
6585
  var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
6612
6586
  if (!locale) {
6613
6587
  if (onError) {
6614
- onError(new InvalidConfigError("\"locale\" was not configured, using \"".concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details")));
6588
+ onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
6615
6589
  }
6616
6590
  // Since there's no registered locale data for `locale`, this will
6617
6591
  // fallback to the `defaultLocale` to make sure things can render.
@@ -6621,458 +6595,481 @@ function createIntl(config, cache) {
6621
6595
  resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
6622
6596
  }
6623
6597
  else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
6624
- 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")));
6598
+ 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"));
6625
6599
  }
6626
6600
  else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
6627
6601
  onError) {
6628
- 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")));
6602
+ 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"));
6629
6603
  }
6630
6604
  verifyConfigMessages(resolvedConfig);
6631
6605
  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) });
6632
6606
  }
6633
6607
 
6634
- const DEFAULT_LANGUAGE = "en";
6635
- function getBrowserLang() {
6636
- const langAttr = document.documentElement.getAttribute("lang");
6637
- if (!!langAttr) {
6638
- return langAttr;
6639
- }
6640
- else if (window.navigator && window.navigator.language) {
6641
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6642
- return lang.slice(0, 2);
6643
- }
6644
- else {
6645
- return DEFAULT_LANGUAGE;
6646
- }
6647
- }
6648
- // prevents memory leak
6649
- const cache = createIntlCache();
6650
- const locale = getBrowserLang();
6651
- const intl = createIntl({
6652
- locale: locale,
6653
- defaultLocale: "en",
6654
- messages: lang[locale] || en,
6655
- }, cache);
6656
- function generateId() {
6657
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
6658
- }
6659
- function debounce(fn, wait) {
6660
- let timeout;
6661
- return function () {
6662
- const context = this;
6663
- const functionCall = () => fn.apply(context, arguments);
6664
- clearTimeout(timeout);
6665
- timeout = setTimeout(functionCall, wait);
6666
- };
6667
- }
6668
- function getTextDir() {
6669
- const dir = document.querySelector("html").getAttribute("dir");
6670
- return dir ? dir.toLowerCase() : "";
6671
- }
6672
- function getPosition(el) {
6673
- const coords = el.getBoundingClientRect();
6674
- let x = coords.x;
6675
- let y = coords.y;
6676
- // Edge doesn't have x and y
6677
- if (!x) {
6678
- if (getTextDir() === "rtl") {
6679
- x = coords.right;
6680
- }
6681
- else {
6682
- x = coords.left;
6683
- }
6684
- y = coords.top;
6685
- }
6686
- return { x, y };
6687
- }
6688
- function findParentWithScrollbar(el) {
6689
- while (!!el) {
6690
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6691
- return el;
6692
- }
6693
- el = el.parentElement;
6694
- }
6695
- }
6696
- function findParentWithHiddenOverflow(el) {
6697
- while (!!el) {
6698
- if (window.getComputedStyle(el).overflowY !== "visible") {
6699
- return el;
6700
- }
6701
- el = el.parentElement;
6702
- }
6703
- }
6704
- function getClosableElementMeasurements(fixedEl, closableEl) {
6705
- const parent = findParentWithHiddenOverflow(fixedEl);
6706
- // if parent is not found, measurements are checked against the viewport
6707
- return {
6708
- closableElHeight: closableEl.clientHeight,
6709
- closableElWidth: closableEl.clientWidth,
6710
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6711
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6712
- spaceAbove: parent
6713
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6714
- : fixedEl.getBoundingClientRect().top,
6715
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6716
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6717
- spaceBelow: parent
6718
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6719
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6720
- spaceLeft: parent
6721
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6722
- : fixedEl.getBoundingClientRect().left,
6723
- spaceRight: parent
6724
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6725
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6726
- };
6727
- }
6728
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6729
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6730
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6731
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6732
- ) {
6733
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6734
- //we want to open up only if there's not enough space below AND there is enough space above
6735
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6736
- return openUp;
6737
- }
6738
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6739
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6740
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6741
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6742
- ) {
6743
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6744
- //we want to open up only if there's not enough space below AND there is enough space above
6745
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6746
- return openDown;
6747
- }
6748
- function shouldShiftRight(fixedEl, closableEl) {
6749
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6750
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6751
- return needsSpaceLeft;
6752
- }
6753
- function shouldShiftLeft(fixedEl, closableEl) {
6754
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6755
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6756
- return needsSpaceRight;
6757
- }
6758
- function adjustTooltipPosition(tPos, el, tooltipEl) {
6759
- // position must be reset before measurements are taken in adjustTooltipPosition
6760
- // otherwise text-wrapping from previous position makes width measurement inconsistent
6761
- tooltipEl.style.top = "";
6762
- tooltipEl.style.left = "";
6763
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6764
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6765
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6766
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
6767
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
6768
- // a tooltip should never be closer than 24px to the edge of a screen
6769
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6770
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6771
- const swapAbove = (position) => {
6772
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6773
- };
6774
- const swapBelow = (position) => {
6775
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6776
- };
6777
- const swapLeft = (position, centeredPosition) => {
6778
- if (!enoughSpaceLeft && enoughSpaceRight) {
6779
- position = position.replace("left", "right");
6780
- }
6781
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
6782
- position = centeredPosition;
6783
- }
6784
- return position;
6785
- };
6786
- const swapRight = (position, centeredPosition) => {
6787
- if (!enoughSpaceRight && enoughSpaceLeft) {
6788
- position = position.replace("right", "left");
6789
- }
6790
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
6791
- position = centeredPosition;
6792
- }
6793
- return position;
6794
- };
6795
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6796
- switch (tPos) {
6797
- case "left":
6798
- tPos = swapLeft(tPos, "bottom");
6799
- case "right":
6800
- tPos = swapRight(tPos, "bottom");
6801
- case "top-left":
6802
- tPos = swapLeft(tPos, "top");
6803
- tPos = swapAbove(tPos);
6804
- case "top-right":
6805
- tPos = swapRight(tPos, "top");
6806
- tPos = swapAbove(tPos);
6807
- case "bottom-left":
6808
- tPos = swapLeft(tPos, "bottom");
6809
- tPos = swapBelow(tPos);
6810
- case "bottom-right":
6811
- tPos = swapRight(tPos, "bottom");
6812
- tPos = swapBelow(tPos);
6813
- case "top":
6814
- tPos = swapAbove(tPos);
6815
- case "bottom":
6816
- tPos = swapBelow(tPos);
6817
- }
6818
- return tPos;
6819
- }
6820
- function hasRoomRight(x, spaceNeeded) {
6821
- let horizOffset = 0;
6822
- // if (getTextDir() === "ltr") {
6823
- if (x.type === "click") {
6824
- // if it's a mouse event, deal with mouse coords
6825
- horizOffset = x.clientX;
6826
- // if it's a focus event, the offset is 0
6827
- }
6828
- else if (x.type === "focus") {
6829
- horizOffset = 0;
6830
- }
6831
- else {
6832
- // otherwise an element was passed, calculate how far it is from the edge of the window
6833
- let el = x; // re-assignment is for clarity
6834
- while (el) {
6835
- if (el.tagName == "BODY") {
6836
- // deal with browser quirks with body/window/document and page scroll
6837
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6838
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6839
- }
6840
- else {
6841
- // for all other non-BODY elements
6842
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6843
- }
6844
- el = el.offsetParent;
6845
- }
6846
- // }
6847
- }
6848
- return window.innerWidth - horizOffset >= spaceNeeded;
6849
- }
6850
- function checkForActiveElInShadow(element) {
6851
- while (element && element.shadowRoot) {
6852
- element = element.shadowRoot.activeElement;
6853
- }
6854
- return element;
6855
- }
6856
- function checkForFocusableElInShadow(element) {
6857
- const selectors = [
6858
- "button",
6859
- "a",
6860
- "input",
6861
- "select",
6862
- "textarea",
6863
- "wm-button",
6864
- "wm-search",
6865
- "wm-select",
6866
- "wm-action-menu",
6867
- "wm-tab-item",
6868
- "wm-datepicker",
6869
- ];
6870
- let focusableEl = element;
6871
- selectors.forEach((selector) => {
6872
- if (focusableEl && focusableEl.shadowRoot) {
6873
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6874
- if (elInShadow) {
6875
- if (selector.startsWith("wm-")) {
6876
- focusableEl = checkForFocusableElInShadow(elInShadow);
6877
- }
6878
- else {
6879
- focusableEl = elInShadow;
6880
- }
6881
- }
6882
- }
6883
- });
6884
- return focusableEl;
6885
- }
6886
- function isFocusable(element) {
6887
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6888
- return true;
6889
- }
6890
- if (element.disabled) {
6891
- return false;
6892
- }
6893
- switch (element.nodeName) {
6894
- case "A":
6895
- return !!element.href && element.rel != "ignore";
6896
- case "INPUT":
6897
- return element.type != "hidden" && element.type != "file";
6898
- case "BUTTON":
6899
- case "SELECT":
6900
- case "TEXTAREA":
6901
- case "WM-BUTTON":
6902
- case "WM-SELECT":
6903
- case "WM-ACTION-MENU":
6904
- case "WM-DATEPICKER":
6905
- case "WM-TIMEPICKER":
6906
- case "WM-INPUT":
6907
- case "WM-TAG-INPUT":
6908
- case "WM-TAB-ITEM":
6909
- case "WM-SEARCH":
6910
- return true;
6911
- default:
6912
- return false;
6913
- }
6914
- }
6915
- function getFirstFocusableDescendant(element) {
6916
- if (isFocusable(element)) {
6917
- return checkForFocusableElInShadow(element);
6918
- }
6919
- else if (element.childNodes.length > 0) {
6920
- element.childNodes.forEach((i) => {
6921
- const childEl = getFirstFocusableDescendant(i);
6922
- return childEl && checkForFocusableElInShadow(childEl);
6923
- });
6924
- }
6925
- }
6926
- function hasValidType(file, types) {
6927
- const acceptedExtensions = types.split(" ");
6928
- const parts = file.name && file.name.split(".");
6929
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
6930
- return ext
6931
- ? acceptedExtensions.includes(ext.toLowerCase())
6932
- : // fallback: if we couldn't obtain an extension,
6933
- // validate based on MIME type...
6934
- !!file.type
6935
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6936
- : // ...and if that failed too, accept the file
6937
- // as it's preferable to accept an invalid file
6938
- // than refusing a valid one (back-end will take care of what slips through)
6939
- true;
6940
- }
6941
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6942
- function getAcceptedMimeTypesList(acceptedExtensions) {
6943
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
6944
- // front end checks are just a convenience to users, independent of security.
6945
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
6946
- const lookupTable = {
6947
- aac: ["audio/aac"],
6948
- abw: ["application/x-abiword"],
6949
- arc: ["application/x-freearc"],
6950
- avi: ["video/x-msvideo"],
6951
- azw: ["application/vnd.amazon.ebook"],
6952
- bin: ["application/octet-stream"],
6953
- bmp: ["image/bmp"],
6954
- bz: ["application/x-bzip"],
6955
- bz2: ["application/x-bzip2"],
6956
- csh: ["application/x-csh"],
6957
- css: ["text/css"],
6958
- csv: ["text/csv"],
6959
- doc: ["application/msword"],
6960
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
6961
- eot: ["application/vnd.ms-fontobject"],
6962
- epub: ["application/epub+zip"],
6963
- gz: ["application/gzip"],
6964
- gif: ["image/gif"],
6965
- htm: ["text/html"],
6966
- html: ["text/html"],
6967
- ico: ["image/vnd.microsoft.icon"],
6968
- ics: ["text/calendar"],
6969
- jar: ["application/java-archive"],
6970
- jpeg: ["image/jpeg"],
6971
- jpg: ["image/jpeg"],
6972
- js: ["text/javascript"],
6973
- json: ["application/json"],
6974
- jsonld: ["application/ld+json"],
6975
- log: ["text/plain"],
6976
- mid: ["audio/x-midi"],
6977
- midi: ["audio/x-midi"],
6978
- mjs: ["text/javascript"],
6979
- mp3: ["audio/mpeg"],
6980
- mpeg: ["video/mpeg"],
6981
- mpkg: ["application/vnd.apple.installer+xml"],
6982
- odp: ["application/vnd.oasis.opendocument.presentation"],
6983
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
6984
- odt: ["application/vnd.oasis.opendocument.text"],
6985
- oga: ["audio/ogg"],
6986
- ogv: ["video/ogg"],
6987
- ogx: ["application/ogg"],
6988
- opus: ["audio/opus"],
6989
- otf: ["font/otf"],
6990
- png: ["image/png"],
6991
- pdf: ["application/pdf"],
6992
- php: ["application/php"],
6993
- ppt: ["application/vnd.ms-powerpoint"],
6994
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
6995
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
6996
- rtf: ["application/rtf"],
6997
- sh: ["application/x-sh"],
6998
- svg: ["image/svg+xml"],
6999
- swf: ["application/x-shockwave-flash"],
7000
- tar: ["application/x-tar"],
7001
- tif: ["image/tiff"],
7002
- tiff: ["image/tiff"],
7003
- ts: ["video/mp2t"],
7004
- ttf: ["font/ttf"],
7005
- txt: ["text/plain"],
7006
- vsd: ["application/vnd.visio"],
7007
- wav: ["audio/wav"],
7008
- weba: ["audio/webm"],
7009
- webm: ["video/webm"],
7010
- webp: ["image/webp"],
7011
- woff: ["font/woff"],
7012
- woff2: ["font/woff2"],
7013
- xhtml: ["application/xhtml+xml"],
7014
- xls: ["application/vnd.ms-excel"],
7015
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7016
- xml: ["application/xml", "text/xml"],
7017
- xul: ["application/vnd.mozilla.xul+xml"],
7018
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7019
- "3gp": ["video/3gpp", "audio/3gpp"],
7020
- "3g2": ["video/3gpp2", "audio/3gpp2"],
7021
- "7z": ["application/x-7z-compressed"],
7022
- };
7023
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7024
- }
7025
- function snakeCaseToCamelCase(str) {
7026
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7027
- if (snakeCaseRegexp.test(str)) {
7028
- let camelCase = "";
7029
- let arr = str.split("_");
7030
- arr.forEach((word, idx) => {
7031
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7032
- });
7033
- return camelCase;
7034
- }
7035
- else {
7036
- return str;
7037
- }
7038
- }
7039
- function getNewIndexToFocus(currentIndex, direction, listLength) {
7040
- let newIndex = currentIndex;
7041
- if (direction === "ArrowDown") {
7042
- newIndex = (currentIndex + 1) % listLength;
7043
- }
7044
- if (direction === "ArrowUp") {
7045
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7046
- }
7047
- return newIndex;
7048
- }
7049
- function isRelatedTarget(ev, id) {
7050
- // used for onBlur events to check the element that has been clicked
7051
- const ids = id.split(" ");
7052
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7053
- }
7054
- /*
7055
- * this is going to be needed to solve the extra tabbing on navigator
7056
- * and for programmatic focus of tabs
7057
- * Here's a draft, not bug proof, see:
7058
- * https://stackoverflow.com/a/10730308/3741713
7059
-
7060
- function getKeyboardFocusableElements(element = document) {
7061
- 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'));
7062
- return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7063
- }
7064
-
7065
- export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7066
- const els = getKeyboardFocusableElements();
7067
- const current = els.indexOf(element);
7068
- return els[current - 1] as HTMLElement;
7069
- }
7070
-
7071
- export function getNextKeyboardFocusableElement(element: HTMLElement) {
7072
- const els = getKeyboardFocusableElements();
7073
- const current = els.indexOf(element);
7074
- return els[current + 1] as HTMLElement;
7075
- }
6608
+ const DEFAULT_LANGUAGE = "en";
6609
+ function getBrowserLang() {
6610
+ const langAttr = document.documentElement.getAttribute("lang");
6611
+ if (!!langAttr) {
6612
+ return langAttr;
6613
+ }
6614
+ else if (window.navigator && window.navigator.language) {
6615
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6616
+ return lang.slice(0, 2);
6617
+ }
6618
+ else {
6619
+ return DEFAULT_LANGUAGE;
6620
+ }
6621
+ }
6622
+ // prevents memory leak
6623
+ const cache = createIntlCache();
6624
+ const locale = getBrowserLang();
6625
+ const intl = createIntl({
6626
+ locale: locale,
6627
+ defaultLocale: "en",
6628
+ messages: lang[locale] || en,
6629
+ }, cache);
6630
+ function generateId() {
6631
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
6632
+ }
6633
+ // limits how many times a function fires
6634
+ // use when the function should run periodically, but not too often (e.g. window resize)
6635
+ function throttle(fn, wait) {
6636
+ let timeout;
6637
+ let shouldWait = false;
6638
+ return function () {
6639
+ const context = this;
6640
+ if (!shouldWait) {
6641
+ fn.apply(context, arguments);
6642
+ shouldWait = true;
6643
+ clearTimeout(timeout);
6644
+ timeout = setTimeout(function () {
6645
+ shouldWait = false;
6646
+ }, wait);
6647
+ }
6648
+ };
6649
+ }
6650
+ // waits until it hasn't been called for [timeout] ms.
6651
+ // use when the function should run only after something (event) is done firing
6652
+ function debounce(fn, wait) {
6653
+ let timeout;
6654
+ return function () {
6655
+ const context = this;
6656
+ const functionCall = () => fn.apply(context, arguments);
6657
+ clearTimeout(timeout);
6658
+ timeout = setTimeout(functionCall, wait);
6659
+ };
6660
+ }
6661
+ function getTextDir() {
6662
+ const dir = document.querySelector("html").getAttribute("dir");
6663
+ return dir ? dir.toLowerCase() : "";
6664
+ }
6665
+ function getPosition(el) {
6666
+ const coords = el.getBoundingClientRect();
6667
+ let x = coords.x;
6668
+ let y = coords.y;
6669
+ // Edge doesn't have x and y
6670
+ if (!x) {
6671
+ if (getTextDir() === "rtl") {
6672
+ x = coords.right;
6673
+ }
6674
+ else {
6675
+ x = coords.left;
6676
+ }
6677
+ y = coords.top;
6678
+ }
6679
+ return { x, y };
6680
+ }
6681
+ function findParentWithScrollbar(el) {
6682
+ while (!!el) {
6683
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6684
+ return el;
6685
+ }
6686
+ el = el.parentElement;
6687
+ }
6688
+ }
6689
+ function findParentWithHiddenOverflow(el) {
6690
+ while (!!el) {
6691
+ if (window.getComputedStyle(el).overflowY !== "visible") {
6692
+ return el;
6693
+ }
6694
+ el = el.parentElement;
6695
+ }
6696
+ }
6697
+ function getClosableElementMeasurements(fixedEl, closableEl) {
6698
+ const parent = findParentWithHiddenOverflow(fixedEl);
6699
+ // if parent is not found, measurements are checked against the viewport
6700
+ return {
6701
+ closableElHeight: closableEl.clientHeight,
6702
+ closableElWidth: closableEl.clientWidth,
6703
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6704
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6705
+ spaceAbove: parent
6706
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6707
+ : fixedEl.getBoundingClientRect().top,
6708
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6709
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6710
+ spaceBelow: parent
6711
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6712
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6713
+ spaceLeft: parent
6714
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6715
+ : fixedEl.getBoundingClientRect().left,
6716
+ spaceRight: parent
6717
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6718
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6719
+ };
6720
+ }
6721
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6722
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6723
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6724
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6725
+ ) {
6726
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6727
+ //we want to open up only if there's not enough space below AND there is enough space above
6728
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6729
+ return openUp;
6730
+ }
6731
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6732
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6733
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6734
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6735
+ ) {
6736
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6737
+ //we want to open up only if there's not enough space below AND there is enough space above
6738
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6739
+ return openDown;
6740
+ }
6741
+ function shouldShiftRight(fixedEl, closableEl) {
6742
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6743
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6744
+ return needsSpaceLeft;
6745
+ }
6746
+ function shouldShiftLeft(fixedEl, closableEl) {
6747
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6748
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6749
+ return needsSpaceRight;
6750
+ }
6751
+ function adjustTooltipPosition(tPos, el, tooltipEl) {
6752
+ // position must be reset before measurements are taken in adjustTooltipPosition
6753
+ // otherwise text-wrapping from previous position makes width measurement inconsistent
6754
+ tooltipEl.style.top = "";
6755
+ tooltipEl.style.left = "";
6756
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6757
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6758
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6759
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
6760
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
6761
+ // a tooltip should never be closer than 24px to the edge of a screen
6762
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6763
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6764
+ const swapAbove = (position) => {
6765
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6766
+ };
6767
+ const swapBelow = (position) => {
6768
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6769
+ };
6770
+ const swapLeft = (position, centeredPosition) => {
6771
+ if (!enoughSpaceLeft && enoughSpaceRight) {
6772
+ position = position.replace("left", "right");
6773
+ }
6774
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
6775
+ position = centeredPosition;
6776
+ }
6777
+ return position;
6778
+ };
6779
+ const swapRight = (position, centeredPosition) => {
6780
+ if (!enoughSpaceRight && enoughSpaceLeft) {
6781
+ position = position.replace("right", "left");
6782
+ }
6783
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
6784
+ position = centeredPosition;
6785
+ }
6786
+ return position;
6787
+ };
6788
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6789
+ switch (tPos) {
6790
+ case "left":
6791
+ tPos = swapLeft(tPos, "bottom");
6792
+ case "right":
6793
+ tPos = swapRight(tPos, "bottom");
6794
+ case "top-left":
6795
+ tPos = swapLeft(tPos, "top");
6796
+ tPos = swapAbove(tPos);
6797
+ case "top-right":
6798
+ tPos = swapRight(tPos, "top");
6799
+ tPos = swapAbove(tPos);
6800
+ case "bottom-left":
6801
+ tPos = swapLeft(tPos, "bottom");
6802
+ tPos = swapBelow(tPos);
6803
+ case "bottom-right":
6804
+ tPos = swapRight(tPos, "bottom");
6805
+ tPos = swapBelow(tPos);
6806
+ case "top":
6807
+ tPos = swapAbove(tPos);
6808
+ case "bottom":
6809
+ tPos = swapBelow(tPos);
6810
+ }
6811
+ return tPos;
6812
+ }
6813
+ function hasRoomRight(x, spaceNeeded) {
6814
+ let horizOffset = 0;
6815
+ // if (getTextDir() === "ltr") {
6816
+ if (x.type === "click") {
6817
+ // if it's a mouse event, deal with mouse coords
6818
+ horizOffset = x.clientX;
6819
+ // if it's a focus event, the offset is 0
6820
+ }
6821
+ else if (x.type === "focus") {
6822
+ horizOffset = 0;
6823
+ }
6824
+ else {
6825
+ // otherwise an element was passed, calculate how far it is from the edge of the window
6826
+ let el = x; // re-assignment is for clarity
6827
+ while (el) {
6828
+ if (el.tagName == "BODY") {
6829
+ // deal with browser quirks with body/window/document and page scroll
6830
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6831
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6832
+ }
6833
+ else {
6834
+ // for all other non-BODY elements
6835
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6836
+ }
6837
+ el = el.offsetParent;
6838
+ }
6839
+ // }
6840
+ }
6841
+ return window.innerWidth - horizOffset >= spaceNeeded;
6842
+ }
6843
+ function checkForActiveElInShadow(element) {
6844
+ while (element && element.shadowRoot) {
6845
+ element = element.shadowRoot.activeElement;
6846
+ }
6847
+ return element;
6848
+ }
6849
+ function checkForFocusableElInShadow(element) {
6850
+ const selectors = [
6851
+ "button",
6852
+ "a",
6853
+ "input",
6854
+ "select",
6855
+ "textarea",
6856
+ "wm-button",
6857
+ "wm-search",
6858
+ "wm-select",
6859
+ "wm-action-menu",
6860
+ "wm-tab-item",
6861
+ "wm-datepicker",
6862
+ ];
6863
+ let focusableEl = element;
6864
+ selectors.forEach((selector) => {
6865
+ if (focusableEl && focusableEl.shadowRoot) {
6866
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6867
+ if (elInShadow) {
6868
+ if (selector.startsWith("wm-")) {
6869
+ focusableEl = checkForFocusableElInShadow(elInShadow);
6870
+ }
6871
+ else {
6872
+ focusableEl = elInShadow;
6873
+ }
6874
+ }
6875
+ }
6876
+ });
6877
+ return focusableEl;
6878
+ }
6879
+ function isFocusable(element) {
6880
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6881
+ return true;
6882
+ }
6883
+ if (element.disabled) {
6884
+ return false;
6885
+ }
6886
+ switch (element.nodeName) {
6887
+ case "A":
6888
+ return !!element.href && element.rel != "ignore";
6889
+ case "INPUT":
6890
+ return element.type != "hidden" && element.type != "file";
6891
+ case "BUTTON":
6892
+ case "SELECT":
6893
+ case "TEXTAREA":
6894
+ case "WM-BUTTON":
6895
+ case "WM-SELECT":
6896
+ case "WM-ACTION-MENU":
6897
+ case "WM-DATEPICKER":
6898
+ case "WM-TIMEPICKER":
6899
+ case "WM-INPUT":
6900
+ case "WM-TAG-INPUT":
6901
+ case "WM-TAB-ITEM":
6902
+ case "WM-SEARCH":
6903
+ return true;
6904
+ default:
6905
+ return false;
6906
+ }
6907
+ }
6908
+ function getFirstFocusableDescendant(element) {
6909
+ if (isFocusable(element)) {
6910
+ return checkForFocusableElInShadow(element);
6911
+ }
6912
+ else if (element.childNodes.length > 0) {
6913
+ element.childNodes.forEach((i) => {
6914
+ const childEl = getFirstFocusableDescendant(i);
6915
+ return childEl && checkForFocusableElInShadow(childEl);
6916
+ });
6917
+ }
6918
+ }
6919
+ function hasValidType(file, types) {
6920
+ const acceptedExtensions = types.split(" ");
6921
+ const parts = file.name && file.name.split(".");
6922
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
6923
+ return ext
6924
+ ? acceptedExtensions.includes(ext.toLowerCase())
6925
+ : // fallback: if we couldn't obtain an extension,
6926
+ // validate based on MIME type...
6927
+ !!file.type
6928
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6929
+ : // ...and if that failed too, accept the file
6930
+ // as it's preferable to accept an invalid file
6931
+ // than refusing a valid one (back-end will take care of what slips through)
6932
+ true;
6933
+ }
6934
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6935
+ function getAcceptedMimeTypesList(acceptedExtensions) {
6936
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
6937
+ // front end checks are just a convenience to users, independent of security.
6938
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
6939
+ const lookupTable = {
6940
+ aac: ["audio/aac"],
6941
+ abw: ["application/x-abiword"],
6942
+ arc: ["application/x-freearc"],
6943
+ avi: ["video/x-msvideo"],
6944
+ azw: ["application/vnd.amazon.ebook"],
6945
+ bin: ["application/octet-stream"],
6946
+ bmp: ["image/bmp"],
6947
+ bz: ["application/x-bzip"],
6948
+ bz2: ["application/x-bzip2"],
6949
+ csh: ["application/x-csh"],
6950
+ css: ["text/css"],
6951
+ csv: ["text/csv"],
6952
+ doc: ["application/msword"],
6953
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
6954
+ eot: ["application/vnd.ms-fontobject"],
6955
+ epub: ["application/epub+zip"],
6956
+ gz: ["application/gzip"],
6957
+ gif: ["image/gif"],
6958
+ htm: ["text/html"],
6959
+ html: ["text/html"],
6960
+ ico: ["image/vnd.microsoft.icon"],
6961
+ ics: ["text/calendar"],
6962
+ jar: ["application/java-archive"],
6963
+ jpeg: ["image/jpeg"],
6964
+ jpg: ["image/jpeg"],
6965
+ js: ["text/javascript"],
6966
+ json: ["application/json"],
6967
+ jsonld: ["application/ld+json"],
6968
+ log: ["text/plain"],
6969
+ mid: ["audio/x-midi"],
6970
+ midi: ["audio/x-midi"],
6971
+ mjs: ["text/javascript"],
6972
+ mp3: ["audio/mpeg"],
6973
+ mpeg: ["video/mpeg"],
6974
+ mpkg: ["application/vnd.apple.installer+xml"],
6975
+ odp: ["application/vnd.oasis.opendocument.presentation"],
6976
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
6977
+ odt: ["application/vnd.oasis.opendocument.text"],
6978
+ oga: ["audio/ogg"],
6979
+ ogv: ["video/ogg"],
6980
+ ogx: ["application/ogg"],
6981
+ opus: ["audio/opus"],
6982
+ otf: ["font/otf"],
6983
+ png: ["image/png"],
6984
+ pdf: ["application/pdf"],
6985
+ php: ["application/php"],
6986
+ ppt: ["application/vnd.ms-powerpoint"],
6987
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
6988
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
6989
+ rtf: ["application/rtf"],
6990
+ sh: ["application/x-sh"],
6991
+ svg: ["image/svg+xml"],
6992
+ swf: ["application/x-shockwave-flash"],
6993
+ tar: ["application/x-tar"],
6994
+ tif: ["image/tiff"],
6995
+ tiff: ["image/tiff"],
6996
+ ts: ["video/mp2t"],
6997
+ ttf: ["font/ttf"],
6998
+ txt: ["text/plain"],
6999
+ vsd: ["application/vnd.visio"],
7000
+ wav: ["audio/wav"],
7001
+ weba: ["audio/webm"],
7002
+ webm: ["video/webm"],
7003
+ webp: ["image/webp"],
7004
+ woff: ["font/woff"],
7005
+ woff2: ["font/woff2"],
7006
+ xhtml: ["application/xhtml+xml"],
7007
+ xls: ["application/vnd.ms-excel"],
7008
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7009
+ xml: ["application/xml", "text/xml"],
7010
+ xul: ["application/vnd.mozilla.xul+xml"],
7011
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7012
+ "3gp": ["video/3gpp", "audio/3gpp"],
7013
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
7014
+ "7z": ["application/x-7z-compressed"],
7015
+ };
7016
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7017
+ }
7018
+ function snakeCaseToCamelCase(str) {
7019
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7020
+ if (snakeCaseRegexp.test(str)) {
7021
+ let camelCase = "";
7022
+ let arr = str.split("_");
7023
+ arr.forEach((word, idx) => {
7024
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7025
+ });
7026
+ return camelCase;
7027
+ }
7028
+ else {
7029
+ return str;
7030
+ }
7031
+ }
7032
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
7033
+ let newIndex = currentIndex;
7034
+ if (direction === "ArrowDown") {
7035
+ newIndex = (currentIndex + 1) % listLength;
7036
+ }
7037
+ if (direction === "ArrowUp") {
7038
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7039
+ }
7040
+ return newIndex;
7041
+ }
7042
+ function isRelatedTarget(ev, id) {
7043
+ // used for onBlur events to check the element that has been clicked
7044
+ const ids = id.split(" ");
7045
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7046
+ }
7047
+ function toBool(val) {
7048
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7049
+ return val == "false" ? false : !!val;
7050
+ }
7051
+ /*
7052
+ * this is going to be needed to solve the extra tabbing on navigator
7053
+ * and for programmatic focus of tabs
7054
+ * Here's a draft, not bug proof, see:
7055
+ * https://stackoverflow.com/a/10730308/3741713
7056
+
7057
+ function getKeyboardFocusableElements(element = document) {
7058
+ 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'));
7059
+ return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7060
+ }
7061
+
7062
+ export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7063
+ const els = getKeyboardFocusableElements();
7064
+ const current = els.indexOf(element);
7065
+ return els[current - 1] as HTMLElement;
7066
+ }
7067
+
7068
+ export function getNextKeyboardFocusableElement(element: HTMLElement) {
7069
+ const els = getKeyboardFocusableElements();
7070
+ const current = els.indexOf(element);
7071
+ return els[current + 1] as HTMLElement;
7072
+ }
7076
7073
  */
7077
7074
 
7078
- export { adjustTooltipPosition as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q, hasRoomRight as r, snakeCaseToCamelCase as s };
7075
+ export { adjustTooltipPosition as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q, throttle as r, snakeCaseToCamelCase as s, toBool as t, hasRoomRight as u };