@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
@@ -3880,17 +3880,11 @@ function icuUnitToEcma(unit) {
3880
3880
  return unit.replace(/^(.*?)-/, '');
3881
3881
  }
3882
3882
  var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
3883
- var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
3883
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
3884
3884
  var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
3885
3885
  var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
3886
3886
  function parseSignificantPrecision(str) {
3887
3887
  var result = {};
3888
- if (str[str.length - 1] === 'r') {
3889
- result.roundingPriority = 'morePrecision';
3890
- }
3891
- else if (str[str.length - 1] === 's') {
3892
- result.roundingPriority = 'lessPrecision';
3893
- }
3894
3888
  str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
3895
3889
  // @@@ case
3896
3890
  if (typeof g2 !== 'string') {
@@ -4117,13 +4111,8 @@ function parseNumberSkeleton(tokens) {
4117
4111
  }
4118
4112
  return '';
4119
4113
  });
4120
- var opt = token.options[0];
4121
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
4122
- if (opt === 'w') {
4123
- result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
4124
- }
4125
- else if (opt) {
4126
- result = __assign(__assign({}, result), parseSignificantPrecision(opt));
4114
+ if (token.options.length) {
4115
+ result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
4127
4116
  }
4128
4117
  continue;
4129
4118
  }
@@ -4145,8 +4134,8 @@ function parseNumberSkeleton(tokens) {
4145
4134
  }
4146
4135
 
4147
4136
  var _a;
4148
- var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
4149
- var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
4137
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
4138
+ var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
4150
4139
  function createLocation(start, end) {
4151
4140
  return { start: start, end: end };
4152
4141
  }
@@ -4393,7 +4382,7 @@ var Parser = /** @class */ (function () {
4393
4382
  return {
4394
4383
  val: {
4395
4384
  type: TYPE.literal,
4396
- value: "<".concat(tagName, "/>"),
4385
+ value: "<" + tagName + "/>",
4397
4386
  location: createLocation(startPosition, this.clonePosition()),
4398
4387
  },
4399
4388
  err: null,
@@ -4998,7 +4987,7 @@ var Parser = /** @class */ (function () {
4998
4987
  }
4999
4988
  var code = codePointAt(this.message, offset);
5000
4989
  if (code === undefined) {
5001
- throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
4990
+ throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
5002
4991
  }
5003
4992
  return code;
5004
4993
  };
@@ -5066,7 +5055,7 @@ var Parser = /** @class */ (function () {
5066
5055
  */
5067
5056
  Parser.prototype.bumpTo = function (targetOffset) {
5068
5057
  if (this.offset() > targetOffset) {
5069
- throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
5058
+ throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
5070
5059
  }
5071
5060
  targetOffset = Math.min(targetOffset, this.message.length);
5072
5061
  while (true) {
@@ -5075,7 +5064,7 @@ var Parser = /** @class */ (function () {
5075
5064
  break;
5076
5065
  }
5077
5066
  if (offset > targetOffset) {
5078
- throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
5067
+ throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
5079
5068
  }
5080
5069
  this.bump();
5081
5070
  if (this.isEOF()) {
@@ -5541,28 +5530,28 @@ var FormatError = /** @class */ (function (_super) {
5541
5530
  return _this;
5542
5531
  }
5543
5532
  FormatError.prototype.toString = function () {
5544
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
5533
+ return "[formatjs Error: " + this.code + "] " + this.message;
5545
5534
  };
5546
5535
  return FormatError;
5547
5536
  }(Error));
5548
5537
  var InvalidValueError = /** @class */ (function (_super) {
5549
5538
  __extends(InvalidValueError, _super);
5550
5539
  function InvalidValueError(variableId, value, options, originalMessage) {
5551
- return _super.call(this, "Invalid values for \"".concat(variableId, "\": \"").concat(value, "\". Options are \"").concat(Object.keys(options).join('", "'), "\""), ErrorCode.INVALID_VALUE, originalMessage) || this;
5540
+ return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
5552
5541
  }
5553
5542
  return InvalidValueError;
5554
5543
  }(FormatError));
5555
5544
  var InvalidValueTypeError = /** @class */ (function (_super) {
5556
5545
  __extends(InvalidValueTypeError, _super);
5557
5546
  function InvalidValueTypeError(value, type, originalMessage) {
5558
- return _super.call(this, "Value for \"".concat(value, "\" must be of type ").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;
5547
+ return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
5559
5548
  }
5560
5549
  return InvalidValueTypeError;
5561
5550
  }(FormatError));
5562
5551
  var MissingValueError = /** @class */ (function (_super) {
5563
5552
  __extends(MissingValueError, _super);
5564
5553
  function MissingValueError(variableId, originalMessage) {
5565
- return _super.call(this, "The intl string context variable \"".concat(variableId, "\" was not provided to the string \"").concat(originalMessage, "\""), ErrorCode.MISSING_VALUE, originalMessage) || this;
5554
+ return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
5566
5555
  }
5567
5556
  return MissingValueError;
5568
5557
  }(FormatError));
@@ -5723,7 +5712,7 @@ originalMessage) {
5723
5712
  continue;
5724
5713
  }
5725
5714
  if (isPluralElement(el)) {
5726
- var opt = el.options["=".concat(value)];
5715
+ var opt = el.options["=" + value];
5727
5716
  if (!opt) {
5728
5717
  if (!Intl.PluralRules) {
5729
5718
  throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
@@ -5794,7 +5783,7 @@ function createDefaultFormatters(cache) {
5794
5783
  for (var _i = 0; _i < arguments.length; _i++) {
5795
5784
  args[_i] = arguments[_i];
5796
5785
  }
5797
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5786
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5798
5787
  }, {
5799
5788
  cache: createFastMemoizeCache$1(cache.number),
5800
5789
  strategy: strategies.variadic,
@@ -5805,7 +5794,7 @@ function createDefaultFormatters(cache) {
5805
5794
  for (var _i = 0; _i < arguments.length; _i++) {
5806
5795
  args[_i] = arguments[_i];
5807
5796
  }
5808
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
5797
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
5809
5798
  }, {
5810
5799
  cache: createFastMemoizeCache$1(cache.dateTime),
5811
5800
  strategy: strategies.variadic,
@@ -5816,7 +5805,7 @@ function createDefaultFormatters(cache) {
5816
5805
  for (var _i = 0; _i < arguments.length; _i++) {
5817
5806
  args[_i] = arguments[_i];
5818
5807
  }
5819
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
5808
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
5820
5809
  }, {
5821
5810
  cache: createFastMemoizeCache$1(cache.pluralRules),
5822
5811
  strategy: strategies.variadic,
@@ -5974,13 +5963,7 @@ var IntlErrorCode;
5974
5963
  var IntlError = /** @class */ (function (_super) {
5975
5964
  __extends(IntlError, _super);
5976
5965
  function IntlError(code, message, exception) {
5977
- var _this = this;
5978
- var err = exception
5979
- ? exception instanceof Error
5980
- ? exception
5981
- : new Error(String(exception))
5982
- : undefined;
5983
- _this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
5966
+ var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
5984
5967
  _this.code = code;
5985
5968
  // @ts-ignore just so we don't need to declare dep on @types/node
5986
5969
  if (typeof Error.captureStackTrace === 'function') {
@@ -6012,26 +5995,19 @@ var MissingDataError = /** @class */ (function (_super) {
6012
5995
  }
6013
5996
  return MissingDataError;
6014
5997
  }(IntlError));
6015
- var IntlFormatError = /** @class */ (function (_super) {
6016
- __extends(IntlFormatError, _super);
6017
- function IntlFormatError(message, locale, exception) {
6018
- return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
6019
- }
6020
- return IntlFormatError;
6021
- }(IntlError));
6022
5998
  var MessageFormatError = /** @class */ (function (_super) {
6023
5999
  __extends(MessageFormatError, _super);
6024
6000
  function MessageFormatError(message, locale, descriptor, exception) {
6025
- 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;
6001
+ 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;
6026
6002
  _this.descriptor = descriptor;
6027
6003
  return _this;
6028
6004
  }
6029
6005
  return MessageFormatError;
6030
- }(IntlFormatError));
6006
+ }(IntlError));
6031
6007
  var MissingTranslationError = /** @class */ (function (_super) {
6032
6008
  __extends(MissingTranslationError, _super);
6033
6009
  function MissingTranslationError(descriptor, locale) {
6034
- 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;
6010
+ var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"" + descriptor.id + "\" for locale \"" + locale + "\", using " + (descriptor.defaultMessage ? 'default message' : 'id') + " as fallback.") || this;
6035
6011
  _this.descriptor = descriptor;
6036
6012
  return _this;
6037
6013
  }
@@ -6058,7 +6034,6 @@ var DEFAULT_INTL_CONFIG = {
6058
6034
  timeZone: undefined,
6059
6035
  defaultLocale: 'en',
6060
6036
  defaultFormats: {},
6061
- fallbackOnEmptyString: true,
6062
6037
  onError: defaultErrorHandler,
6063
6038
  };
6064
6039
  function createIntlCache() {
@@ -6101,7 +6076,7 @@ function createFormatters(cache) {
6101
6076
  for (var _i = 0; _i < arguments.length; _i++) {
6102
6077
  args[_i] = arguments[_i];
6103
6078
  }
6104
- return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6079
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6105
6080
  }, {
6106
6081
  cache: createFastMemoizeCache(cache.dateTime),
6107
6082
  strategy: strategies.variadic,
@@ -6112,7 +6087,7 @@ function createFormatters(cache) {
6112
6087
  for (var _i = 0; _i < arguments.length; _i++) {
6113
6088
  args[_i] = arguments[_i];
6114
6089
  }
6115
- return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
6090
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
6116
6091
  }, {
6117
6092
  cache: createFastMemoizeCache(cache.number),
6118
6093
  strategy: strategies.variadic,
@@ -6123,7 +6098,7 @@ function createFormatters(cache) {
6123
6098
  for (var _i = 0; _i < arguments.length; _i++) {
6124
6099
  args[_i] = arguments[_i];
6125
6100
  }
6126
- return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
6101
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
6127
6102
  }, {
6128
6103
  cache: createFastMemoizeCache(cache.pluralRules),
6129
6104
  strategy: strategies.variadic,
@@ -6146,7 +6121,7 @@ function createFormatters(cache) {
6146
6121
  for (var _i = 0; _i < arguments.length; _i++) {
6147
6122
  args[_i] = arguments[_i];
6148
6123
  }
6149
- return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();
6124
+ return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
6150
6125
  }, {
6151
6126
  cache: createFastMemoizeCache(cache.relativeTime),
6152
6127
  strategy: strategies.variadic,
@@ -6157,7 +6132,7 @@ function createFormatters(cache) {
6157
6132
  for (var _i = 0; _i < arguments.length; _i++) {
6158
6133
  args[_i] = arguments[_i];
6159
6134
  }
6160
- return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();
6135
+ return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
6161
6136
  }, {
6162
6137
  cache: createFastMemoizeCache(cache.list),
6163
6138
  strategy: strategies.variadic,
@@ -6167,7 +6142,7 @@ function createFormatters(cache) {
6167
6142
  for (var _i = 0; _i < arguments.length; _i++) {
6168
6143
  args[_i] = arguments[_i];
6169
6144
  }
6170
- return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();
6145
+ return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
6171
6146
  }, {
6172
6147
  cache: createFastMemoizeCache(cache.displayNames),
6173
6148
  strategy: strategies.variadic,
@@ -6183,7 +6158,7 @@ function getNamedFormat(formats, type, name, onError) {
6183
6158
  if (format) {
6184
6159
  return format;
6185
6160
  }
6186
- onError(new UnsupportedFormatterError("No ".concat(type, " format named: ").concat(name)));
6161
+ onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
6187
6162
  }
6188
6163
 
6189
6164
  /**
@@ -6218,7 +6193,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
6218
6193
  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)) });
6219
6194
  }
6220
6195
  function formatMessage(_a, state, messageDescriptor, values, opts) {
6221
- 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;
6196
+ 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;
6222
6197
  if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
6223
6198
  var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
6224
6199
  // `id` is a required field of a Message Descriptor.
@@ -6248,9 +6223,6 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6248
6223
  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
6249
6224
  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
6250
6225
  if (!message) {
6251
- if (fallbackOnEmptyString === false && message === '') {
6252
- return message;
6253
- }
6254
6226
  if (!defaultMessage ||
6255
6227
  (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
6256
6228
  // This prevents warnings from littering the console in development
@@ -6264,7 +6236,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6264
6236
  return formatter.format(values);
6265
6237
  }
6266
6238
  catch (e) {
6267
- onError(new MessageFormatError("Error formatting default message for: \"".concat(id, "\", rendering default message verbatim"), locale, messageDescriptor, e));
6239
+ onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
6268
6240
  return typeof defaultMessage === 'string' ? defaultMessage : id;
6269
6241
  }
6270
6242
  }
@@ -6276,7 +6248,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6276
6248
  return formatter.format(values);
6277
6249
  }
6278
6250
  catch (e) {
6279
- onError(new MessageFormatError("Error formatting message: \"".concat(id, "\", using ").concat(defaultMessage ? 'default message' : 'id', " as fallback."), locale, messageDescriptor, e));
6251
+ onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
6280
6252
  }
6281
6253
  if (defaultMessage) {
6282
6254
  try {
@@ -6284,7 +6256,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
6284
6256
  return formatter.format(values);
6285
6257
  }
6286
6258
  catch (e) {
6287
- onError(new MessageFormatError("Error formatting the default message for: \"".concat(id, "\", rendering message verbatim"), locale, messageDescriptor, e));
6259
+ onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
6288
6260
  }
6289
6261
  }
6290
6262
  if (typeof message === 'string') {
@@ -6322,7 +6294,9 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
6322
6294
  if (options === void 0) { options = {}; }
6323
6295
  var format = options.format;
6324
6296
  var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
6325
- var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
6297
+ var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
6298
+ // @ts-expect-error es2020 has a lot stuff from es2021 bleed in
6299
+ defaults);
6326
6300
  if (type === 'time' &&
6327
6301
  !filteredOptions.hour &&
6328
6302
  !filteredOptions.minute &&
@@ -6439,7 +6413,7 @@ var LIST_FORMAT_OPTIONS = [
6439
6413
  ];
6440
6414
  var now = Date.now();
6441
6415
  function generateToken(i) {
6442
- return "".concat(now, "_").concat(i, "_").concat(now);
6416
+ return now + "_" + i + "_" + now;
6443
6417
  }
6444
6418
  function formatList(opts, getListFormat, values, options) {
6445
6419
  if (options === void 0) { options = {}; }
@@ -6506,7 +6480,7 @@ function formatPlural(_a, getPluralRules, value, options) {
6506
6480
  return getPluralRules(locale, filteredOptions).select(value);
6507
6481
  }
6508
6482
  catch (e) {
6509
- onError(new IntlFormatError('Error formatting plural.', locale, e));
6483
+ onError(new MessageFormatError('Error formatting plural.', e));
6510
6484
  }
6511
6485
  return 'other';
6512
6486
  }
@@ -6533,7 +6507,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
6533
6507
  return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
6534
6508
  }
6535
6509
  catch (e) {
6536
- config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));
6510
+ config.onError(new MessageFormatError('Error formatting relative time.', e));
6537
6511
  }
6538
6512
  return String(value);
6539
6513
  }
@@ -6613,7 +6587,7 @@ function createIntl(config, cache) {
6613
6587
  var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
6614
6588
  if (!locale) {
6615
6589
  if (onError) {
6616
- onError(new InvalidConfigError("\"locale\" was not configured, using \"".concat(defaultLocale, "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details")));
6590
+ onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
6617
6591
  }
6618
6592
  // Since there's no registered locale data for `locale`, this will
6619
6593
  // fallback to the `defaultLocale` to make sure things can render.
@@ -6623,458 +6597,481 @@ function createIntl(config, cache) {
6623
6597
  resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
6624
6598
  }
6625
6599
  else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
6626
- 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")));
6600
+ 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"));
6627
6601
  }
6628
6602
  else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
6629
6603
  onError) {
6630
- 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")));
6604
+ 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"));
6631
6605
  }
6632
6606
  verifyConfigMessages(resolvedConfig);
6633
6607
  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) });
6634
6608
  }
6635
6609
 
6636
- const DEFAULT_LANGUAGE = "en";
6637
- function getBrowserLang() {
6638
- const langAttr = document.documentElement.getAttribute("lang");
6639
- if (!!langAttr) {
6640
- return langAttr;
6641
- }
6642
- else if (window.navigator && window.navigator.language) {
6643
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6644
- return lang.slice(0, 2);
6645
- }
6646
- else {
6647
- return DEFAULT_LANGUAGE;
6648
- }
6649
- }
6650
- // prevents memory leak
6651
- const cache = createIntlCache();
6652
- const locale = getBrowserLang();
6653
- const intl = createIntl({
6654
- locale: locale,
6655
- defaultLocale: "en",
6656
- messages: lang[locale] || en,
6657
- }, cache);
6658
- function generateId() {
6659
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
6660
- }
6661
- function debounce(fn, wait) {
6662
- let timeout;
6663
- return function () {
6664
- const context = this;
6665
- const functionCall = () => fn.apply(context, arguments);
6666
- clearTimeout(timeout);
6667
- timeout = setTimeout(functionCall, wait);
6668
- };
6669
- }
6670
- function getTextDir() {
6671
- const dir = document.querySelector("html").getAttribute("dir");
6672
- return dir ? dir.toLowerCase() : "";
6673
- }
6674
- function getPosition(el) {
6675
- const coords = el.getBoundingClientRect();
6676
- let x = coords.x;
6677
- let y = coords.y;
6678
- // Edge doesn't have x and y
6679
- if (!x) {
6680
- if (getTextDir() === "rtl") {
6681
- x = coords.right;
6682
- }
6683
- else {
6684
- x = coords.left;
6685
- }
6686
- y = coords.top;
6687
- }
6688
- return { x, y };
6689
- }
6690
- function findParentWithScrollbar(el) {
6691
- while (!!el) {
6692
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6693
- return el;
6694
- }
6695
- el = el.parentElement;
6696
- }
6697
- }
6698
- function findParentWithHiddenOverflow(el) {
6699
- while (!!el) {
6700
- if (window.getComputedStyle(el).overflowY !== "visible") {
6701
- return el;
6702
- }
6703
- el = el.parentElement;
6704
- }
6705
- }
6706
- function getClosableElementMeasurements(fixedEl, closableEl) {
6707
- const parent = findParentWithHiddenOverflow(fixedEl);
6708
- // if parent is not found, measurements are checked against the viewport
6709
- return {
6710
- closableElHeight: closableEl.clientHeight,
6711
- closableElWidth: closableEl.clientWidth,
6712
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6713
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6714
- spaceAbove: parent
6715
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6716
- : fixedEl.getBoundingClientRect().top,
6717
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6718
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
6719
- spaceBelow: parent
6720
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6721
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6722
- spaceLeft: parent
6723
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6724
- : fixedEl.getBoundingClientRect().left,
6725
- spaceRight: parent
6726
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6727
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6728
- };
6729
- }
6730
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6731
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6732
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6733
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6734
- ) {
6735
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6736
- //we want to open up only if there's not enough space below AND there is enough space above
6737
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6738
- return openUp;
6739
- }
6740
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6741
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6742
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6743
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6744
- ) {
6745
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6746
- //we want to open up only if there's not enough space below AND there is enough space above
6747
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6748
- return openDown;
6749
- }
6750
- function shouldShiftRight(fixedEl, closableEl) {
6751
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6752
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6753
- return needsSpaceLeft;
6754
- }
6755
- function shouldShiftLeft(fixedEl, closableEl) {
6756
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6757
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6758
- return needsSpaceRight;
6759
- }
6760
- function adjustTooltipPosition(tPos, el, tooltipEl) {
6761
- // position must be reset before measurements are taken in adjustTooltipPosition
6762
- // otherwise text-wrapping from previous position makes width measurement inconsistent
6763
- tooltipEl.style.top = "";
6764
- tooltipEl.style.left = "";
6765
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6766
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6767
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6768
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
6769
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
6770
- // a tooltip should never be closer than 24px to the edge of a screen
6771
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6772
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6773
- const swapAbove = (position) => {
6774
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6775
- };
6776
- const swapBelow = (position) => {
6777
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6778
- };
6779
- const swapLeft = (position, centeredPosition) => {
6780
- if (!enoughSpaceLeft && enoughSpaceRight) {
6781
- position = position.replace("left", "right");
6782
- }
6783
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
6784
- position = centeredPosition;
6785
- }
6786
- return position;
6787
- };
6788
- const swapRight = (position, centeredPosition) => {
6789
- if (!enoughSpaceRight && enoughSpaceLeft) {
6790
- position = position.replace("right", "left");
6791
- }
6792
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
6793
- position = centeredPosition;
6794
- }
6795
- return position;
6796
- };
6797
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6798
- switch (tPos) {
6799
- case "left":
6800
- tPos = swapLeft(tPos, "bottom");
6801
- case "right":
6802
- tPos = swapRight(tPos, "bottom");
6803
- case "top-left":
6804
- tPos = swapLeft(tPos, "top");
6805
- tPos = swapAbove(tPos);
6806
- case "top-right":
6807
- tPos = swapRight(tPos, "top");
6808
- tPos = swapAbove(tPos);
6809
- case "bottom-left":
6810
- tPos = swapLeft(tPos, "bottom");
6811
- tPos = swapBelow(tPos);
6812
- case "bottom-right":
6813
- tPos = swapRight(tPos, "bottom");
6814
- tPos = swapBelow(tPos);
6815
- case "top":
6816
- tPos = swapAbove(tPos);
6817
- case "bottom":
6818
- tPos = swapBelow(tPos);
6819
- }
6820
- return tPos;
6821
- }
6822
- function hasRoomRight(x, spaceNeeded) {
6823
- let horizOffset = 0;
6824
- // if (getTextDir() === "ltr") {
6825
- if (x.type === "click") {
6826
- // if it's a mouse event, deal with mouse coords
6827
- horizOffset = x.clientX;
6828
- // if it's a focus event, the offset is 0
6829
- }
6830
- else if (x.type === "focus") {
6831
- horizOffset = 0;
6832
- }
6833
- else {
6834
- // otherwise an element was passed, calculate how far it is from the edge of the window
6835
- let el = x; // re-assignment is for clarity
6836
- while (el) {
6837
- if (el.tagName == "BODY") {
6838
- // deal with browser quirks with body/window/document and page scroll
6839
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6840
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6841
- }
6842
- else {
6843
- // for all other non-BODY elements
6844
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6845
- }
6846
- el = el.offsetParent;
6847
- }
6848
- // }
6849
- }
6850
- return window.innerWidth - horizOffset >= spaceNeeded;
6851
- }
6852
- function checkForActiveElInShadow(element) {
6853
- while (element && element.shadowRoot) {
6854
- element = element.shadowRoot.activeElement;
6855
- }
6856
- return element;
6857
- }
6858
- function checkForFocusableElInShadow(element) {
6859
- const selectors = [
6860
- "button",
6861
- "a",
6862
- "input",
6863
- "select",
6864
- "textarea",
6865
- "wm-button",
6866
- "wm-search",
6867
- "wm-select",
6868
- "wm-action-menu",
6869
- "wm-tab-item",
6870
- "wm-datepicker",
6871
- ];
6872
- let focusableEl = element;
6873
- selectors.forEach((selector) => {
6874
- if (focusableEl && focusableEl.shadowRoot) {
6875
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6876
- if (elInShadow) {
6877
- if (selector.startsWith("wm-")) {
6878
- focusableEl = checkForFocusableElInShadow(elInShadow);
6879
- }
6880
- else {
6881
- focusableEl = elInShadow;
6882
- }
6883
- }
6884
- }
6885
- });
6886
- return focusableEl;
6887
- }
6888
- function isFocusable(element) {
6889
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6890
- return true;
6891
- }
6892
- if (element.disabled) {
6893
- return false;
6894
- }
6895
- switch (element.nodeName) {
6896
- case "A":
6897
- return !!element.href && element.rel != "ignore";
6898
- case "INPUT":
6899
- return element.type != "hidden" && element.type != "file";
6900
- case "BUTTON":
6901
- case "SELECT":
6902
- case "TEXTAREA":
6903
- case "WM-BUTTON":
6904
- case "WM-SELECT":
6905
- case "WM-ACTION-MENU":
6906
- case "WM-DATEPICKER":
6907
- case "WM-TIMEPICKER":
6908
- case "WM-INPUT":
6909
- case "WM-TAG-INPUT":
6910
- case "WM-TAB-ITEM":
6911
- case "WM-SEARCH":
6912
- return true;
6913
- default:
6914
- return false;
6915
- }
6916
- }
6917
- function getFirstFocusableDescendant(element) {
6918
- if (isFocusable(element)) {
6919
- return checkForFocusableElInShadow(element);
6920
- }
6921
- else if (element.childNodes.length > 0) {
6922
- element.childNodes.forEach((i) => {
6923
- const childEl = getFirstFocusableDescendant(i);
6924
- return childEl && checkForFocusableElInShadow(childEl);
6925
- });
6926
- }
6927
- }
6928
- function hasValidType(file, types) {
6929
- const acceptedExtensions = types.split(" ");
6930
- const parts = file.name && file.name.split(".");
6931
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
6932
- return ext
6933
- ? acceptedExtensions.includes(ext.toLowerCase())
6934
- : // fallback: if we couldn't obtain an extension,
6935
- // validate based on MIME type...
6936
- !!file.type
6937
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6938
- : // ...and if that failed too, accept the file
6939
- // as it's preferable to accept an invalid file
6940
- // than refusing a valid one (back-end will take care of what slips through)
6941
- true;
6942
- }
6943
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6944
- function getAcceptedMimeTypesList(acceptedExtensions) {
6945
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
6946
- // front end checks are just a convenience to users, independent of security.
6947
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
6948
- const lookupTable = {
6949
- aac: ["audio/aac"],
6950
- abw: ["application/x-abiword"],
6951
- arc: ["application/x-freearc"],
6952
- avi: ["video/x-msvideo"],
6953
- azw: ["application/vnd.amazon.ebook"],
6954
- bin: ["application/octet-stream"],
6955
- bmp: ["image/bmp"],
6956
- bz: ["application/x-bzip"],
6957
- bz2: ["application/x-bzip2"],
6958
- csh: ["application/x-csh"],
6959
- css: ["text/css"],
6960
- csv: ["text/csv"],
6961
- doc: ["application/msword"],
6962
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
6963
- eot: ["application/vnd.ms-fontobject"],
6964
- epub: ["application/epub+zip"],
6965
- gz: ["application/gzip"],
6966
- gif: ["image/gif"],
6967
- htm: ["text/html"],
6968
- html: ["text/html"],
6969
- ico: ["image/vnd.microsoft.icon"],
6970
- ics: ["text/calendar"],
6971
- jar: ["application/java-archive"],
6972
- jpeg: ["image/jpeg"],
6973
- jpg: ["image/jpeg"],
6974
- js: ["text/javascript"],
6975
- json: ["application/json"],
6976
- jsonld: ["application/ld+json"],
6977
- log: ["text/plain"],
6978
- mid: ["audio/x-midi"],
6979
- midi: ["audio/x-midi"],
6980
- mjs: ["text/javascript"],
6981
- mp3: ["audio/mpeg"],
6982
- mpeg: ["video/mpeg"],
6983
- mpkg: ["application/vnd.apple.installer+xml"],
6984
- odp: ["application/vnd.oasis.opendocument.presentation"],
6985
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
6986
- odt: ["application/vnd.oasis.opendocument.text"],
6987
- oga: ["audio/ogg"],
6988
- ogv: ["video/ogg"],
6989
- ogx: ["application/ogg"],
6990
- opus: ["audio/opus"],
6991
- otf: ["font/otf"],
6992
- png: ["image/png"],
6993
- pdf: ["application/pdf"],
6994
- php: ["application/php"],
6995
- ppt: ["application/vnd.ms-powerpoint"],
6996
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
6997
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
6998
- rtf: ["application/rtf"],
6999
- sh: ["application/x-sh"],
7000
- svg: ["image/svg+xml"],
7001
- swf: ["application/x-shockwave-flash"],
7002
- tar: ["application/x-tar"],
7003
- tif: ["image/tiff"],
7004
- tiff: ["image/tiff"],
7005
- ts: ["video/mp2t"],
7006
- ttf: ["font/ttf"],
7007
- txt: ["text/plain"],
7008
- vsd: ["application/vnd.visio"],
7009
- wav: ["audio/wav"],
7010
- weba: ["audio/webm"],
7011
- webm: ["video/webm"],
7012
- webp: ["image/webp"],
7013
- woff: ["font/woff"],
7014
- woff2: ["font/woff2"],
7015
- xhtml: ["application/xhtml+xml"],
7016
- xls: ["application/vnd.ms-excel"],
7017
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7018
- xml: ["application/xml", "text/xml"],
7019
- xul: ["application/vnd.mozilla.xul+xml"],
7020
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7021
- "3gp": ["video/3gpp", "audio/3gpp"],
7022
- "3g2": ["video/3gpp2", "audio/3gpp2"],
7023
- "7z": ["application/x-7z-compressed"],
7024
- };
7025
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7026
- }
7027
- function snakeCaseToCamelCase(str) {
7028
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7029
- if (snakeCaseRegexp.test(str)) {
7030
- let camelCase = "";
7031
- let arr = str.split("_");
7032
- arr.forEach((word, idx) => {
7033
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7034
- });
7035
- return camelCase;
7036
- }
7037
- else {
7038
- return str;
7039
- }
7040
- }
7041
- function getNewIndexToFocus(currentIndex, direction, listLength) {
7042
- let newIndex = currentIndex;
7043
- if (direction === "ArrowDown") {
7044
- newIndex = (currentIndex + 1) % listLength;
7045
- }
7046
- if (direction === "ArrowUp") {
7047
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7048
- }
7049
- return newIndex;
7050
- }
7051
- function isRelatedTarget(ev, id) {
7052
- // used for onBlur events to check the element that has been clicked
7053
- const ids = id.split(" ");
7054
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7055
- }
7056
- /*
7057
- * this is going to be needed to solve the extra tabbing on navigator
7058
- * and for programmatic focus of tabs
7059
- * Here's a draft, not bug proof, see:
7060
- * https://stackoverflow.com/a/10730308/3741713
7061
-
7062
- function getKeyboardFocusableElements(element = document) {
7063
- 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'));
7064
- return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7065
- }
7066
-
7067
- export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7068
- const els = getKeyboardFocusableElements();
7069
- const current = els.indexOf(element);
7070
- return els[current - 1] as HTMLElement;
7071
- }
7072
-
7073
- export function getNextKeyboardFocusableElement(element: HTMLElement) {
7074
- const els = getKeyboardFocusableElements();
7075
- const current = els.indexOf(element);
7076
- return els[current + 1] as HTMLElement;
7077
- }
6610
+ const DEFAULT_LANGUAGE = "en";
6611
+ function getBrowserLang() {
6612
+ const langAttr = document.documentElement.getAttribute("lang");
6613
+ if (!!langAttr) {
6614
+ return langAttr;
6615
+ }
6616
+ else if (window.navigator && window.navigator.language) {
6617
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6618
+ return lang.slice(0, 2);
6619
+ }
6620
+ else {
6621
+ return DEFAULT_LANGUAGE;
6622
+ }
6623
+ }
6624
+ // prevents memory leak
6625
+ const cache = createIntlCache();
6626
+ const locale = getBrowserLang();
6627
+ const intl = createIntl({
6628
+ locale: locale,
6629
+ defaultLocale: "en",
6630
+ messages: lang[locale] || en,
6631
+ }, cache);
6632
+ function generateId() {
6633
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
6634
+ }
6635
+ // limits how many times a function fires
6636
+ // use when the function should run periodically, but not too often (e.g. window resize)
6637
+ function throttle(fn, wait) {
6638
+ let timeout;
6639
+ let shouldWait = false;
6640
+ return function () {
6641
+ const context = this;
6642
+ if (!shouldWait) {
6643
+ fn.apply(context, arguments);
6644
+ shouldWait = true;
6645
+ clearTimeout(timeout);
6646
+ timeout = setTimeout(function () {
6647
+ shouldWait = false;
6648
+ }, wait);
6649
+ }
6650
+ };
6651
+ }
6652
+ // waits until it hasn't been called for [timeout] ms.
6653
+ // use when the function should run only after something (event) is done firing
6654
+ function debounce(fn, wait) {
6655
+ let timeout;
6656
+ return function () {
6657
+ const context = this;
6658
+ const functionCall = () => fn.apply(context, arguments);
6659
+ clearTimeout(timeout);
6660
+ timeout = setTimeout(functionCall, wait);
6661
+ };
6662
+ }
6663
+ function getTextDir() {
6664
+ const dir = document.querySelector("html").getAttribute("dir");
6665
+ return dir ? dir.toLowerCase() : "";
6666
+ }
6667
+ function getPosition(el) {
6668
+ const coords = el.getBoundingClientRect();
6669
+ let x = coords.x;
6670
+ let y = coords.y;
6671
+ // Edge doesn't have x and y
6672
+ if (!x) {
6673
+ if (getTextDir() === "rtl") {
6674
+ x = coords.right;
6675
+ }
6676
+ else {
6677
+ x = coords.left;
6678
+ }
6679
+ y = coords.top;
6680
+ }
6681
+ return { x, y };
6682
+ }
6683
+ function findParentWithScrollbar(el) {
6684
+ while (!!el) {
6685
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6686
+ return el;
6687
+ }
6688
+ el = el.parentElement;
6689
+ }
6690
+ }
6691
+ function findParentWithHiddenOverflow(el) {
6692
+ while (!!el) {
6693
+ if (window.getComputedStyle(el).overflowY !== "visible") {
6694
+ return el;
6695
+ }
6696
+ el = el.parentElement;
6697
+ }
6698
+ }
6699
+ function getClosableElementMeasurements(fixedEl, closableEl) {
6700
+ const parent = findParentWithHiddenOverflow(fixedEl);
6701
+ // if parent is not found, measurements are checked against the viewport
6702
+ return {
6703
+ closableElHeight: closableEl.clientHeight,
6704
+ closableElWidth: closableEl.clientWidth,
6705
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6706
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6707
+ spaceAbove: parent
6708
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6709
+ : fixedEl.getBoundingClientRect().top,
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
+ spaceBelow: parent
6713
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6714
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6715
+ spaceLeft: parent
6716
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6717
+ : fixedEl.getBoundingClientRect().left,
6718
+ spaceRight: parent
6719
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6720
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6721
+ };
6722
+ }
6723
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6724
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6725
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6726
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6727
+ ) {
6728
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6729
+ //we want to open up only if there's not enough space below AND there is enough space above
6730
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6731
+ return openUp;
6732
+ }
6733
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6734
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6735
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6736
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6737
+ ) {
6738
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6739
+ //we want to open up only if there's not enough space below AND there is enough space above
6740
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6741
+ return openDown;
6742
+ }
6743
+ function shouldShiftRight(fixedEl, closableEl) {
6744
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6745
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6746
+ return needsSpaceLeft;
6747
+ }
6748
+ function shouldShiftLeft(fixedEl, closableEl) {
6749
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6750
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6751
+ return needsSpaceRight;
6752
+ }
6753
+ function adjustTooltipPosition(tPos, el, tooltipEl) {
6754
+ // position must be reset before measurements are taken in adjustTooltipPosition
6755
+ // otherwise text-wrapping from previous position makes width measurement inconsistent
6756
+ tooltipEl.style.top = "";
6757
+ tooltipEl.style.left = "";
6758
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6759
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6760
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6761
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
6762
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
6763
+ // a tooltip should never be closer than 24px to the edge of a screen
6764
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6765
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6766
+ const swapAbove = (position) => {
6767
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6768
+ };
6769
+ const swapBelow = (position) => {
6770
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6771
+ };
6772
+ const swapLeft = (position, centeredPosition) => {
6773
+ if (!enoughSpaceLeft && enoughSpaceRight) {
6774
+ position = position.replace("left", "right");
6775
+ }
6776
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
6777
+ position = centeredPosition;
6778
+ }
6779
+ return position;
6780
+ };
6781
+ const swapRight = (position, centeredPosition) => {
6782
+ if (!enoughSpaceRight && enoughSpaceLeft) {
6783
+ position = position.replace("right", "left");
6784
+ }
6785
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
6786
+ position = centeredPosition;
6787
+ }
6788
+ return position;
6789
+ };
6790
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6791
+ switch (tPos) {
6792
+ case "left":
6793
+ tPos = swapLeft(tPos, "bottom");
6794
+ case "right":
6795
+ tPos = swapRight(tPos, "bottom");
6796
+ case "top-left":
6797
+ tPos = swapLeft(tPos, "top");
6798
+ tPos = swapAbove(tPos);
6799
+ case "top-right":
6800
+ tPos = swapRight(tPos, "top");
6801
+ tPos = swapAbove(tPos);
6802
+ case "bottom-left":
6803
+ tPos = swapLeft(tPos, "bottom");
6804
+ tPos = swapBelow(tPos);
6805
+ case "bottom-right":
6806
+ tPos = swapRight(tPos, "bottom");
6807
+ tPos = swapBelow(tPos);
6808
+ case "top":
6809
+ tPos = swapAbove(tPos);
6810
+ case "bottom":
6811
+ tPos = swapBelow(tPos);
6812
+ }
6813
+ return tPos;
6814
+ }
6815
+ function hasRoomRight(x, spaceNeeded) {
6816
+ let horizOffset = 0;
6817
+ // if (getTextDir() === "ltr") {
6818
+ if (x.type === "click") {
6819
+ // if it's a mouse event, deal with mouse coords
6820
+ horizOffset = x.clientX;
6821
+ // if it's a focus event, the offset is 0
6822
+ }
6823
+ else if (x.type === "focus") {
6824
+ horizOffset = 0;
6825
+ }
6826
+ else {
6827
+ // otherwise an element was passed, calculate how far it is from the edge of the window
6828
+ let el = x; // re-assignment is for clarity
6829
+ while (el) {
6830
+ if (el.tagName == "BODY") {
6831
+ // deal with browser quirks with body/window/document and page scroll
6832
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6833
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6834
+ }
6835
+ else {
6836
+ // for all other non-BODY elements
6837
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6838
+ }
6839
+ el = el.offsetParent;
6840
+ }
6841
+ // }
6842
+ }
6843
+ return window.innerWidth - horizOffset >= spaceNeeded;
6844
+ }
6845
+ function checkForActiveElInShadow(element) {
6846
+ while (element && element.shadowRoot) {
6847
+ element = element.shadowRoot.activeElement;
6848
+ }
6849
+ return element;
6850
+ }
6851
+ function checkForFocusableElInShadow(element) {
6852
+ const selectors = [
6853
+ "button",
6854
+ "a",
6855
+ "input",
6856
+ "select",
6857
+ "textarea",
6858
+ "wm-button",
6859
+ "wm-search",
6860
+ "wm-select",
6861
+ "wm-action-menu",
6862
+ "wm-tab-item",
6863
+ "wm-datepicker",
6864
+ ];
6865
+ let focusableEl = element;
6866
+ selectors.forEach((selector) => {
6867
+ if (focusableEl && focusableEl.shadowRoot) {
6868
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6869
+ if (elInShadow) {
6870
+ if (selector.startsWith("wm-")) {
6871
+ focusableEl = checkForFocusableElInShadow(elInShadow);
6872
+ }
6873
+ else {
6874
+ focusableEl = elInShadow;
6875
+ }
6876
+ }
6877
+ }
6878
+ });
6879
+ return focusableEl;
6880
+ }
6881
+ function isFocusable(element) {
6882
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6883
+ return true;
6884
+ }
6885
+ if (element.disabled) {
6886
+ return false;
6887
+ }
6888
+ switch (element.nodeName) {
6889
+ case "A":
6890
+ return !!element.href && element.rel != "ignore";
6891
+ case "INPUT":
6892
+ return element.type != "hidden" && element.type != "file";
6893
+ case "BUTTON":
6894
+ case "SELECT":
6895
+ case "TEXTAREA":
6896
+ case "WM-BUTTON":
6897
+ case "WM-SELECT":
6898
+ case "WM-ACTION-MENU":
6899
+ case "WM-DATEPICKER":
6900
+ case "WM-TIMEPICKER":
6901
+ case "WM-INPUT":
6902
+ case "WM-TAG-INPUT":
6903
+ case "WM-TAB-ITEM":
6904
+ case "WM-SEARCH":
6905
+ return true;
6906
+ default:
6907
+ return false;
6908
+ }
6909
+ }
6910
+ function getFirstFocusableDescendant(element) {
6911
+ if (isFocusable(element)) {
6912
+ return checkForFocusableElInShadow(element);
6913
+ }
6914
+ else if (element.childNodes.length > 0) {
6915
+ element.childNodes.forEach((i) => {
6916
+ const childEl = getFirstFocusableDescendant(i);
6917
+ return childEl && checkForFocusableElInShadow(childEl);
6918
+ });
6919
+ }
6920
+ }
6921
+ function hasValidType(file, types) {
6922
+ const acceptedExtensions = types.split(" ");
6923
+ const parts = file.name && file.name.split(".");
6924
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
6925
+ return ext
6926
+ ? acceptedExtensions.includes(ext.toLowerCase())
6927
+ : // fallback: if we couldn't obtain an extension,
6928
+ // validate based on MIME type...
6929
+ !!file.type
6930
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
6931
+ : // ...and if that failed too, accept the file
6932
+ // as it's preferable to accept an invalid file
6933
+ // than refusing a valid one (back-end will take care of what slips through)
6934
+ true;
6935
+ }
6936
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
6937
+ function getAcceptedMimeTypesList(acceptedExtensions) {
6938
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
6939
+ // front end checks are just a convenience to users, independent of security.
6940
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
6941
+ const lookupTable = {
6942
+ aac: ["audio/aac"],
6943
+ abw: ["application/x-abiword"],
6944
+ arc: ["application/x-freearc"],
6945
+ avi: ["video/x-msvideo"],
6946
+ azw: ["application/vnd.amazon.ebook"],
6947
+ bin: ["application/octet-stream"],
6948
+ bmp: ["image/bmp"],
6949
+ bz: ["application/x-bzip"],
6950
+ bz2: ["application/x-bzip2"],
6951
+ csh: ["application/x-csh"],
6952
+ css: ["text/css"],
6953
+ csv: ["text/csv"],
6954
+ doc: ["application/msword"],
6955
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
6956
+ eot: ["application/vnd.ms-fontobject"],
6957
+ epub: ["application/epub+zip"],
6958
+ gz: ["application/gzip"],
6959
+ gif: ["image/gif"],
6960
+ htm: ["text/html"],
6961
+ html: ["text/html"],
6962
+ ico: ["image/vnd.microsoft.icon"],
6963
+ ics: ["text/calendar"],
6964
+ jar: ["application/java-archive"],
6965
+ jpeg: ["image/jpeg"],
6966
+ jpg: ["image/jpeg"],
6967
+ js: ["text/javascript"],
6968
+ json: ["application/json"],
6969
+ jsonld: ["application/ld+json"],
6970
+ log: ["text/plain"],
6971
+ mid: ["audio/x-midi"],
6972
+ midi: ["audio/x-midi"],
6973
+ mjs: ["text/javascript"],
6974
+ mp3: ["audio/mpeg"],
6975
+ mpeg: ["video/mpeg"],
6976
+ mpkg: ["application/vnd.apple.installer+xml"],
6977
+ odp: ["application/vnd.oasis.opendocument.presentation"],
6978
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
6979
+ odt: ["application/vnd.oasis.opendocument.text"],
6980
+ oga: ["audio/ogg"],
6981
+ ogv: ["video/ogg"],
6982
+ ogx: ["application/ogg"],
6983
+ opus: ["audio/opus"],
6984
+ otf: ["font/otf"],
6985
+ png: ["image/png"],
6986
+ pdf: ["application/pdf"],
6987
+ php: ["application/php"],
6988
+ ppt: ["application/vnd.ms-powerpoint"],
6989
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
6990
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
6991
+ rtf: ["application/rtf"],
6992
+ sh: ["application/x-sh"],
6993
+ svg: ["image/svg+xml"],
6994
+ swf: ["application/x-shockwave-flash"],
6995
+ tar: ["application/x-tar"],
6996
+ tif: ["image/tiff"],
6997
+ tiff: ["image/tiff"],
6998
+ ts: ["video/mp2t"],
6999
+ ttf: ["font/ttf"],
7000
+ txt: ["text/plain"],
7001
+ vsd: ["application/vnd.visio"],
7002
+ wav: ["audio/wav"],
7003
+ weba: ["audio/webm"],
7004
+ webm: ["video/webm"],
7005
+ webp: ["image/webp"],
7006
+ woff: ["font/woff"],
7007
+ woff2: ["font/woff2"],
7008
+ xhtml: ["application/xhtml+xml"],
7009
+ xls: ["application/vnd.ms-excel"],
7010
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7011
+ xml: ["application/xml", "text/xml"],
7012
+ xul: ["application/vnd.mozilla.xul+xml"],
7013
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7014
+ "3gp": ["video/3gpp", "audio/3gpp"],
7015
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
7016
+ "7z": ["application/x-7z-compressed"],
7017
+ };
7018
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7019
+ }
7020
+ function snakeCaseToCamelCase(str) {
7021
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7022
+ if (snakeCaseRegexp.test(str)) {
7023
+ let camelCase = "";
7024
+ let arr = str.split("_");
7025
+ arr.forEach((word, idx) => {
7026
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7027
+ });
7028
+ return camelCase;
7029
+ }
7030
+ else {
7031
+ return str;
7032
+ }
7033
+ }
7034
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
7035
+ let newIndex = currentIndex;
7036
+ if (direction === "ArrowDown") {
7037
+ newIndex = (currentIndex + 1) % listLength;
7038
+ }
7039
+ if (direction === "ArrowUp") {
7040
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7041
+ }
7042
+ return newIndex;
7043
+ }
7044
+ function isRelatedTarget(ev, id) {
7045
+ // used for onBlur events to check the element that has been clicked
7046
+ const ids = id.split(" ");
7047
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7048
+ }
7049
+ function toBool(val) {
7050
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7051
+ return val == "false" ? false : !!val;
7052
+ }
7053
+ /*
7054
+ * this is going to be needed to solve the extra tabbing on navigator
7055
+ * and for programmatic focus of tabs
7056
+ * Here's a draft, not bug proof, see:
7057
+ * https://stackoverflow.com/a/10730308/3741713
7058
+
7059
+ function getKeyboardFocusableElements(element = document) {
7060
+ 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'));
7061
+ return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7062
+ }
7063
+
7064
+ export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7065
+ const els = getKeyboardFocusableElements();
7066
+ const current = els.indexOf(element);
7067
+ return els[current - 1] as HTMLElement;
7068
+ }
7069
+
7070
+ export function getNextKeyboardFocusableElement(element: HTMLElement) {
7071
+ const els = getKeyboardFocusableElements();
7072
+ const current = els.indexOf(element);
7073
+ return els[current + 1] as HTMLElement;
7074
+ }
7078
7075
  */
7079
7076
 
7080
7077
  exports.adjustTooltipPosition = adjustTooltipPosition;
@@ -7096,3 +7093,5 @@ exports.shouldOpenUp = shouldOpenUp;
7096
7093
  exports.shouldShiftLeft = shouldShiftLeft;
7097
7094
  exports.shouldShiftRight = shouldShiftRight;
7098
7095
  exports.snakeCaseToCamelCase = snakeCaseToCamelCase;
7096
+ exports.throttle = throttle;
7097
+ exports.toBool = toBool;