@watermarkinsights/ripple 3.11.0 → 3.12.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-847c1e8b.js → chartFunctions-44ae2eee.js} +420 -420
  3. package/dist/cjs/{functions-e80fc415.js → functions-1a67b971.js} +477 -1921
  4. package/dist/cjs/{global-8910723e.js → global-d71c13fa.js} +60 -60
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{index-df6a3611.js → index-acad7ab3.js} +1 -4
  7. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  8. package/dist/cjs/loader.cjs.js +4 -4
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -87
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +658 -658
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
  13. package/dist/cjs/ripple.cjs.js +4 -4
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +336 -336
  15. package/dist/cjs/wm-button.cjs.entry.js +230 -227
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
  17. package/dist/cjs/wm-chart.cjs.entry.js +111 -111
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +266 -266
  19. package/dist/cjs/wm-input.cjs.entry.js +135 -135
  20. package/dist/cjs/wm-modal-footer.cjs.entry.js +34 -34
  21. package/dist/cjs/wm-modal-header.cjs.entry.js +37 -37
  22. package/dist/cjs/wm-modal.cjs.entry.js +164 -164
  23. package/dist/cjs/wm-navigation_3.cjs.entry.js +228 -228
  24. package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
  25. package/dist/cjs/wm-network-uploader.cjs.entry.js +453 -453
  26. package/dist/cjs/wm-option_2.cjs.entry.js +485 -485
  27. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  28. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +130 -130
  29. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  30. package/dist/cjs/wm-snackbar.cjs.entry.js +171 -171
  31. package/dist/cjs/wm-tab-item_3.cjs.entry.js +297 -297
  32. package/dist/cjs/wm-tag-input.cjs.entry.js +580 -580
  33. package/dist/cjs/wm-timepicker.cjs.entry.js +384 -384
  34. package/dist/cjs/wm-toggletip.cjs.entry.js +125 -125
  35. package/dist/cjs/wm-uploader.cjs.entry.js +632 -608
  36. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  37. package/dist/collection/collection-manifest.json +1 -1
  38. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  39. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  40. package/dist/collection/components/charts/wm-chart/wm-chart.js +328 -328
  41. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +195 -195
  42. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
  43. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  44. package/dist/collection/components/wm-action-menu/wm-action-menu.js +448 -448
  45. package/dist/collection/components/wm-button/wm-button.js +494 -491
  46. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  47. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  48. package/dist/collection/components/wm-input/wm-input.js +423 -423
  49. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  50. package/dist/collection/components/wm-modal/wm-modal-footer.js +136 -136
  51. package/dist/collection/components/wm-modal/wm-modal-header.js +87 -87
  52. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  53. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  54. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  55. package/dist/collection/components/wm-navigation/wm-navigation.js +218 -218
  56. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  57. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  58. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  59. package/dist/collection/components/wm-option/wm-option.js +414 -414
  60. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  61. package/dist/collection/components/wm-search/wm-search.js +480 -480
  62. package/dist/collection/components/wm-select/wm-select.js +718 -718
  63. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  64. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  65. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  66. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  67. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  68. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  69. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  70. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +785 -785
  71. package/dist/collection/components/wm-uploader/wm-uploader.js +1077 -1051
  72. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  73. package/dist/collection/dev/scripts.js +20 -20
  74. package/dist/collection/global/__mocks__/functions.js +6 -6
  75. package/dist/collection/global/chartFunctions.js +421 -421
  76. package/dist/collection/global/functions.js +468 -468
  77. package/dist/collection/global/global.js +67 -67
  78. package/dist/collection/global/interfaces.js +49 -49
  79. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  80. package/dist/collection/global/services/http-service.js +50 -50
  81. package/dist/collection/lang/lang.js +5 -5
  82. package/dist/collection/lang/missing.js +43 -43
  83. package/dist/collection/lang/piglatin.js +93 -93
  84. package/dist/esm/{chartFunctions-60cabc24.js → chartFunctions-8fa800a6.js} +420 -420
  85. package/dist/esm/{functions-dde318c0.js → functions-61c7bb1f.js} +477 -1921
  86. package/dist/esm/{global-efcb3f02.js → global-0ee18f6e.js} +60 -60
  87. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  88. package/dist/esm/{index-17c79cc6.js → index-7603f98e.js} +1 -4
  89. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  90. package/dist/esm/loader.js +4 -4
  91. package/dist/esm/polyfills/core-js.js +0 -0
  92. package/dist/esm/polyfills/css-shim.js +1 -1
  93. package/dist/esm/polyfills/dom.js +0 -0
  94. package/dist/esm/polyfills/es5-html-element.js +0 -0
  95. package/dist/esm/polyfills/index.js +0 -0
  96. package/dist/esm/polyfills/system.js +0 -0
  97. package/dist/esm/priv-chart-popover.entry.js +87 -87
  98. package/dist/esm/priv-datepicker.entry.js +658 -658
  99. package/dist/esm/priv-navigator-button.entry.js +19 -19
  100. package/dist/esm/priv-navigator-item.entry.js +24 -24
  101. package/dist/esm/ripple.js +4 -4
  102. package/dist/esm/wm-action-menu_2.entry.js +336 -336
  103. package/dist/esm/wm-button.entry.js +230 -227
  104. package/dist/esm/wm-chart-slice.entry.js +14 -14
  105. package/dist/esm/wm-chart.entry.js +111 -111
  106. package/dist/esm/wm-datepicker.entry.js +266 -266
  107. package/dist/esm/wm-input.entry.js +135 -135
  108. package/dist/esm/wm-modal-footer.entry.js +34 -34
  109. package/dist/esm/wm-modal-header.entry.js +37 -37
  110. package/dist/esm/wm-modal.entry.js +164 -164
  111. package/dist/esm/wm-navigation_3.entry.js +228 -228
  112. package/dist/esm/wm-navigator.entry.js +269 -269
  113. package/dist/esm/wm-network-uploader.entry.js +453 -453
  114. package/dist/esm/wm-option_2.entry.js +485 -485
  115. package/dist/esm/wm-pagination.entry.js +168 -168
  116. package/dist/esm/wm-progress-indicator_3.entry.js +130 -130
  117. package/dist/esm/wm-search.entry.js +233 -233
  118. package/dist/esm/wm-snackbar.entry.js +171 -171
  119. package/dist/esm/wm-tab-item_3.entry.js +297 -297
  120. package/dist/esm/wm-tag-input.entry.js +580 -580
  121. package/dist/esm/wm-timepicker.entry.js +384 -384
  122. package/dist/esm/wm-toggletip.entry.js +125 -125
  123. package/dist/esm/wm-uploader.entry.js +632 -608
  124. package/dist/esm/wm-wrapper.entry.js +13 -13
  125. package/dist/esm-es5/{chartFunctions-60cabc24.js → chartFunctions-8fa800a6.js} +1 -1
  126. package/dist/esm-es5/functions-61c7bb1f.js +15 -0
  127. package/dist/esm-es5/global-0ee18f6e.js +1 -0
  128. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +0 -0
  129. package/dist/esm-es5/{index-17c79cc6.js → index-7603f98e.js} +1 -1
  130. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  131. package/dist/esm-es5/loader.js +1 -1
  132. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  133. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  134. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  135. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  136. package/dist/esm-es5/ripple.js +1 -1
  137. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  138. package/dist/esm-es5/wm-button.entry.js +1 -1
  139. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  140. package/dist/esm-es5/wm-chart.entry.js +1 -1
  141. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  142. package/dist/esm-es5/wm-input.entry.js +1 -1
  143. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  144. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  145. package/dist/esm-es5/wm-modal.entry.js +1 -1
  146. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  147. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  148. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  149. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  150. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  151. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  152. package/dist/esm-es5/wm-search.entry.js +1 -1
  153. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  154. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  155. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  156. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  157. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  158. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  159. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  160. package/dist/ripple/p-00fa3d4b.entry.js +1 -0
  161. package/dist/ripple/p-0f33461d.entry.js +1 -0
  162. package/dist/ripple/p-0fbb7809.system.js +1 -0
  163. package/dist/ripple/{p-c62df7fc.system.entry.js → p-1242752c.system.entry.js} +1 -1
  164. package/dist/ripple/p-140ff08b.js +1 -0
  165. package/dist/ripple/p-15b1c11b.js +16 -0
  166. package/dist/ripple/{p-59678b70.system.entry.js → p-1df2adee.system.entry.js} +1 -1
  167. package/dist/ripple/{p-ad60e3ba.system.entry.js → p-212aac05.system.entry.js} +1 -1
  168. package/dist/ripple/{p-c1185f13.system.js → p-28bf6a2e.system.js} +1 -1
  169. package/dist/ripple/p-30745db6.entry.js +1 -0
  170. package/dist/ripple/p-358bde27.entry.js +1 -0
  171. package/dist/ripple/p-35cfcf9f.entry.js +1 -0
  172. package/dist/ripple/p-379b125b.entry.js +1 -0
  173. package/dist/ripple/{p-3d4bf3df.system.entry.js → p-398b2486.system.entry.js} +1 -1
  174. package/dist/ripple/{p-f17076c4.system.entry.js → p-3b3e847c.system.entry.js} +1 -1
  175. package/dist/ripple/{p-bc207b54.system.entry.js → p-3e6498ea.system.entry.js} +1 -1
  176. package/dist/ripple/{p-29425d92.system.entry.js → p-3f1d8211.system.entry.js} +1 -1
  177. package/dist/ripple/{p-8fab569a.system.entry.js → p-42aa51fe.system.entry.js} +1 -1
  178. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  179. package/dist/ripple/{p-bd9e6e7b.system.entry.js → p-44035b02.system.entry.js} +1 -1
  180. package/dist/ripple/{p-b0ba5460.system.entry.js → p-487f7419.system.entry.js} +1 -1
  181. package/dist/ripple/p-4d59fe86.entry.js +1 -0
  182. package/dist/ripple/p-520b0f54.entry.js +1 -0
  183. package/dist/ripple/{p-d1eff01f.system.entry.js → p-5471864e.system.entry.js} +1 -1
  184. package/dist/ripple/p-5e041c35.entry.js +1 -0
  185. package/dist/ripple/{p-158f538a.system.entry.js → p-68155230.system.entry.js} +1 -1
  186. package/dist/ripple/{p-fb4d6afd.system.entry.js → p-72eb5064.system.entry.js} +1 -1
  187. package/dist/ripple/{p-0e605966.system.entry.js → p-73d66b0a.system.entry.js} +1 -1
  188. package/dist/ripple/{p-d934e3bb.system.entry.js → p-75ef731b.system.entry.js} +1 -1
  189. package/dist/ripple/p-76ca7498.system.js +15 -0
  190. package/dist/ripple/p-7fae0cc2.entry.js +1 -0
  191. package/dist/ripple/{p-7cb0b2a5.js → p-8aa9f811.js} +1 -1
  192. package/dist/ripple/p-8caae464.entry.js +1 -0
  193. package/dist/ripple/p-8d347cd5.entry.js +1 -0
  194. package/dist/ripple/{p-27253ed2.system.entry.js → p-90ed3268.system.entry.js} +1 -1
  195. package/dist/ripple/p-92226595.entry.js +1 -0
  196. package/dist/ripple/{p-313b6073.system.js → p-9d02957d.system.js} +0 -0
  197. package/dist/ripple/{p-f2959770.system.entry.js → p-9e671274.system.entry.js} +1 -1
  198. package/dist/ripple/{p-d0369e2f.system.entry.js → p-9f12284b.system.entry.js} +1 -1
  199. package/dist/ripple/p-9fe64cec.entry.js +1 -0
  200. package/dist/ripple/{p-726b9452.system.js → p-a0c3ef16.system.js} +1 -1
  201. package/dist/ripple/p-a82d37d8.entry.js +1 -0
  202. package/dist/ripple/p-a9e0ce88.entry.js +1 -0
  203. package/dist/ripple/{p-c78f0984.system.entry.js → p-ac2485a6.system.entry.js} +1 -1
  204. package/dist/ripple/{p-db44eb6f.system.entry.js → p-ae6cfbca.system.entry.js} +1 -1
  205. package/dist/ripple/p-b3c71506.js +1 -0
  206. package/dist/ripple/p-ba168596.entry.js +1 -0
  207. package/dist/ripple/p-bb7bc75b.entry.js +1 -0
  208. package/dist/ripple/{p-6bfc949d.system.entry.js → p-c873b490.system.entry.js} +1 -1
  209. package/dist/ripple/p-cd4fda75.entry.js +1 -0
  210. package/dist/ripple/p-d3603def.entry.js +1 -0
  211. package/dist/ripple/{p-35f21755.system.entry.js → p-d3ed8b65.system.entry.js} +1 -1
  212. package/dist/ripple/{p-3b77a3f7.system.entry.js → p-d81a4e7c.system.entry.js} +1 -1
  213. package/dist/ripple/{p-72c1052f.system.js → p-db6fddec.system.js} +1 -1
  214. package/dist/ripple/{p-fffdb4fb.system.entry.js → p-e180001c.system.entry.js} +1 -1
  215. package/dist/ripple/p-e49b9a96.entry.js +1 -0
  216. package/dist/ripple/p-e748e22b.entry.js +1 -0
  217. package/dist/ripple/p-e75e75e0.entry.js +1 -0
  218. package/dist/ripple/{p-25696dab.system.entry.js → p-eacd33cc.system.entry.js} +1 -1
  219. package/dist/ripple/p-ed657559.entry.js +1 -0
  220. package/dist/ripple/{p-1eb5cb0d.system.entry.js → p-eee347b4.system.entry.js} +1 -1
  221. package/dist/ripple/p-f0656464.entry.js +1 -0
  222. package/dist/ripple/p-f12a510f.entry.js +1 -0
  223. package/dist/ripple/p-f36b74bf.entry.js +1 -0
  224. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  225. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  226. package/dist/ripple/{p-4f393ce8.system.entry.js → p-fdc4a599.system.entry.js} +1 -1
  227. package/dist/ripple/ripple.esm.js +1 -1
  228. package/dist/ripple/ripple.js +1 -1
  229. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
  230. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  231. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +36 -36
  232. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +27 -27
  233. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  234. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  235. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +47 -47
  236. package/dist/types/components/wm-button/wm-button.d.ts +43 -43
  237. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  238. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  239. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  240. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  241. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  242. package/dist/types/components/wm-modal/wm-modal-header.d.ts +11 -11
  243. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  244. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  245. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  246. package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -28
  247. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  248. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  249. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  250. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  251. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  252. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  253. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  254. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  255. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  256. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  257. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  258. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  259. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  260. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  261. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  262. package/dist/types/components/wm-uploader/wm-uploader.d.ts +118 -115
  263. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  264. package/dist/types/components.d.ts +24 -24
  265. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  266. package/dist/types/global/chartFunctions.d.ts +29 -29
  267. package/dist/types/global/functions.d.ts +42 -42
  268. package/dist/types/global/global.d.ts +1 -1
  269. package/dist/types/global/interfaces.d.ts +44 -44
  270. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  271. package/dist/types/global/services/http-service.d.ts +4 -4
  272. package/dist/types/lang/lang.d.ts +5 -5
  273. package/package.json +47 -47
  274. package/dist/esm-es5/functions-dde318c0.js +0 -1
  275. package/dist/esm-es5/global-efcb3f02.js +0 -1
  276. package/dist/ripple/p-008292f6.system.js +0 -1
  277. package/dist/ripple/p-05757c14.entry.js +0 -1
  278. package/dist/ripple/p-06618a34.entry.js +0 -1
  279. package/dist/ripple/p-068e874b.entry.js +0 -1
  280. package/dist/ripple/p-0f4a6a8f.entry.js +0 -1
  281. package/dist/ripple/p-199f825e.js +0 -1
  282. package/dist/ripple/p-1cee0339.entry.js +0 -1
  283. package/dist/ripple/p-262c75ff.entry.js +0 -1
  284. package/dist/ripple/p-321daa60.entry.js +0 -1
  285. package/dist/ripple/p-416944fd.entry.js +0 -1
  286. package/dist/ripple/p-425ef815.entry.js +0 -1
  287. package/dist/ripple/p-4296b0ba.entry.js +0 -1
  288. package/dist/ripple/p-43b09b72.entry.js +0 -1
  289. package/dist/ripple/p-57c94258.entry.js +0 -1
  290. package/dist/ripple/p-6220c94d.entry.js +0 -1
  291. package/dist/ripple/p-6dbc79be.entry.js +0 -1
  292. package/dist/ripple/p-789e0afa.entry.js +0 -1
  293. package/dist/ripple/p-962f51ff.entry.js +0 -1
  294. package/dist/ripple/p-98c9b376.entry.js +0 -1
  295. package/dist/ripple/p-9d069ec5.entry.js +0 -1
  296. package/dist/ripple/p-9ec9ba5b.entry.js +0 -1
  297. package/dist/ripple/p-aacdaa79.entry.js +0 -1
  298. package/dist/ripple/p-b0536ddb.entry.js +0 -1
  299. package/dist/ripple/p-b1928a70.js +0 -1
  300. package/dist/ripple/p-b9d5b407.entry.js +0 -1
  301. package/dist/ripple/p-c0ab18ce.entry.js +0 -1
  302. package/dist/ripple/p-c2abdcba.js +0 -1
  303. package/dist/ripple/p-d2996c45.entry.js +0 -1
  304. package/dist/ripple/p-d9b98c9d.entry.js +0 -1
  305. package/dist/ripple/p-dee93986.entry.js +0 -1
  306. package/dist/ripple/p-e4e70417.entry.js +0 -1
  307. package/dist/ripple/p-fa8569d2.system.js +0 -1
@@ -3596,7 +3596,7 @@ const lang = /*#__PURE__*/Object.freeze({
3596
3596
  pig: pig
3597
3597
  });
3598
3598
 
3599
- /******************************************************************************
3599
+ /*! *****************************************************************************
3600
3600
  Copyright (c) Microsoft Corporation.
3601
3601
 
3602
3602
  Permission to use, copy, modify, and/or distribute this software for any
@@ -4216,1429 +4216,6 @@ function parseNumberSkeleton(tokens) {
4216
4216
  return result;
4217
4217
  }
4218
4218
 
4219
- // @generated from time-data-gen.ts
4220
- // prettier-ignore
4221
- var timeData = {
4222
- "AX": [
4223
- "H"
4224
- ],
4225
- "BQ": [
4226
- "H"
4227
- ],
4228
- "CP": [
4229
- "H"
4230
- ],
4231
- "CZ": [
4232
- "H"
4233
- ],
4234
- "DK": [
4235
- "H"
4236
- ],
4237
- "FI": [
4238
- "H"
4239
- ],
4240
- "ID": [
4241
- "H"
4242
- ],
4243
- "IS": [
4244
- "H"
4245
- ],
4246
- "ML": [
4247
- "H"
4248
- ],
4249
- "NE": [
4250
- "H"
4251
- ],
4252
- "RU": [
4253
- "H"
4254
- ],
4255
- "SE": [
4256
- "H"
4257
- ],
4258
- "SJ": [
4259
- "H"
4260
- ],
4261
- "SK": [
4262
- "H"
4263
- ],
4264
- "AS": [
4265
- "h",
4266
- "H"
4267
- ],
4268
- "BT": [
4269
- "h",
4270
- "H"
4271
- ],
4272
- "DJ": [
4273
- "h",
4274
- "H"
4275
- ],
4276
- "ER": [
4277
- "h",
4278
- "H"
4279
- ],
4280
- "GH": [
4281
- "h",
4282
- "H"
4283
- ],
4284
- "IN": [
4285
- "h",
4286
- "H"
4287
- ],
4288
- "LS": [
4289
- "h",
4290
- "H"
4291
- ],
4292
- "PG": [
4293
- "h",
4294
- "H"
4295
- ],
4296
- "PW": [
4297
- "h",
4298
- "H"
4299
- ],
4300
- "SO": [
4301
- "h",
4302
- "H"
4303
- ],
4304
- "TO": [
4305
- "h",
4306
- "H"
4307
- ],
4308
- "VU": [
4309
- "h",
4310
- "H"
4311
- ],
4312
- "WS": [
4313
- "h",
4314
- "H"
4315
- ],
4316
- "001": [
4317
- "H",
4318
- "h"
4319
- ],
4320
- "AL": [
4321
- "h",
4322
- "H",
4323
- "hB"
4324
- ],
4325
- "TD": [
4326
- "h",
4327
- "H",
4328
- "hB"
4329
- ],
4330
- "ca-ES": [
4331
- "H",
4332
- "h",
4333
- "hB"
4334
- ],
4335
- "CF": [
4336
- "H",
4337
- "h",
4338
- "hB"
4339
- ],
4340
- "CM": [
4341
- "H",
4342
- "h",
4343
- "hB"
4344
- ],
4345
- "fr-CA": [
4346
- "H",
4347
- "h",
4348
- "hB"
4349
- ],
4350
- "gl-ES": [
4351
- "H",
4352
- "h",
4353
- "hB"
4354
- ],
4355
- "it-CH": [
4356
- "H",
4357
- "h",
4358
- "hB"
4359
- ],
4360
- "it-IT": [
4361
- "H",
4362
- "h",
4363
- "hB"
4364
- ],
4365
- "LU": [
4366
- "H",
4367
- "h",
4368
- "hB"
4369
- ],
4370
- "NP": [
4371
- "H",
4372
- "h",
4373
- "hB"
4374
- ],
4375
- "PF": [
4376
- "H",
4377
- "h",
4378
- "hB"
4379
- ],
4380
- "SC": [
4381
- "H",
4382
- "h",
4383
- "hB"
4384
- ],
4385
- "SM": [
4386
- "H",
4387
- "h",
4388
- "hB"
4389
- ],
4390
- "SN": [
4391
- "H",
4392
- "h",
4393
- "hB"
4394
- ],
4395
- "TF": [
4396
- "H",
4397
- "h",
4398
- "hB"
4399
- ],
4400
- "VA": [
4401
- "H",
4402
- "h",
4403
- "hB"
4404
- ],
4405
- "CY": [
4406
- "h",
4407
- "H",
4408
- "hb",
4409
- "hB"
4410
- ],
4411
- "GR": [
4412
- "h",
4413
- "H",
4414
- "hb",
4415
- "hB"
4416
- ],
4417
- "CO": [
4418
- "h",
4419
- "H",
4420
- "hB",
4421
- "hb"
4422
- ],
4423
- "DO": [
4424
- "h",
4425
- "H",
4426
- "hB",
4427
- "hb"
4428
- ],
4429
- "KP": [
4430
- "h",
4431
- "H",
4432
- "hB",
4433
- "hb"
4434
- ],
4435
- "KR": [
4436
- "h",
4437
- "H",
4438
- "hB",
4439
- "hb"
4440
- ],
4441
- "NA": [
4442
- "h",
4443
- "H",
4444
- "hB",
4445
- "hb"
4446
- ],
4447
- "PA": [
4448
- "h",
4449
- "H",
4450
- "hB",
4451
- "hb"
4452
- ],
4453
- "PR": [
4454
- "h",
4455
- "H",
4456
- "hB",
4457
- "hb"
4458
- ],
4459
- "VE": [
4460
- "h",
4461
- "H",
4462
- "hB",
4463
- "hb"
4464
- ],
4465
- "AC": [
4466
- "H",
4467
- "h",
4468
- "hb",
4469
- "hB"
4470
- ],
4471
- "AI": [
4472
- "H",
4473
- "h",
4474
- "hb",
4475
- "hB"
4476
- ],
4477
- "BW": [
4478
- "H",
4479
- "h",
4480
- "hb",
4481
- "hB"
4482
- ],
4483
- "BZ": [
4484
- "H",
4485
- "h",
4486
- "hb",
4487
- "hB"
4488
- ],
4489
- "CC": [
4490
- "H",
4491
- "h",
4492
- "hb",
4493
- "hB"
4494
- ],
4495
- "CK": [
4496
- "H",
4497
- "h",
4498
- "hb",
4499
- "hB"
4500
- ],
4501
- "CX": [
4502
- "H",
4503
- "h",
4504
- "hb",
4505
- "hB"
4506
- ],
4507
- "DG": [
4508
- "H",
4509
- "h",
4510
- "hb",
4511
- "hB"
4512
- ],
4513
- "FK": [
4514
- "H",
4515
- "h",
4516
- "hb",
4517
- "hB"
4518
- ],
4519
- "GB": [
4520
- "H",
4521
- "h",
4522
- "hb",
4523
- "hB"
4524
- ],
4525
- "GG": [
4526
- "H",
4527
- "h",
4528
- "hb",
4529
- "hB"
4530
- ],
4531
- "GI": [
4532
- "H",
4533
- "h",
4534
- "hb",
4535
- "hB"
4536
- ],
4537
- "IE": [
4538
- "H",
4539
- "h",
4540
- "hb",
4541
- "hB"
4542
- ],
4543
- "IM": [
4544
- "H",
4545
- "h",
4546
- "hb",
4547
- "hB"
4548
- ],
4549
- "IO": [
4550
- "H",
4551
- "h",
4552
- "hb",
4553
- "hB"
4554
- ],
4555
- "JE": [
4556
- "H",
4557
- "h",
4558
- "hb",
4559
- "hB"
4560
- ],
4561
- "LT": [
4562
- "H",
4563
- "h",
4564
- "hb",
4565
- "hB"
4566
- ],
4567
- "MK": [
4568
- "H",
4569
- "h",
4570
- "hb",
4571
- "hB"
4572
- ],
4573
- "MN": [
4574
- "H",
4575
- "h",
4576
- "hb",
4577
- "hB"
4578
- ],
4579
- "MS": [
4580
- "H",
4581
- "h",
4582
- "hb",
4583
- "hB"
4584
- ],
4585
- "NF": [
4586
- "H",
4587
- "h",
4588
- "hb",
4589
- "hB"
4590
- ],
4591
- "NG": [
4592
- "H",
4593
- "h",
4594
- "hb",
4595
- "hB"
4596
- ],
4597
- "NR": [
4598
- "H",
4599
- "h",
4600
- "hb",
4601
- "hB"
4602
- ],
4603
- "NU": [
4604
- "H",
4605
- "h",
4606
- "hb",
4607
- "hB"
4608
- ],
4609
- "PN": [
4610
- "H",
4611
- "h",
4612
- "hb",
4613
- "hB"
4614
- ],
4615
- "SH": [
4616
- "H",
4617
- "h",
4618
- "hb",
4619
- "hB"
4620
- ],
4621
- "SX": [
4622
- "H",
4623
- "h",
4624
- "hb",
4625
- "hB"
4626
- ],
4627
- "TA": [
4628
- "H",
4629
- "h",
4630
- "hb",
4631
- "hB"
4632
- ],
4633
- "ZA": [
4634
- "H",
4635
- "h",
4636
- "hb",
4637
- "hB"
4638
- ],
4639
- "af-ZA": [
4640
- "H",
4641
- "h",
4642
- "hB",
4643
- "hb"
4644
- ],
4645
- "AR": [
4646
- "H",
4647
- "h",
4648
- "hB",
4649
- "hb"
4650
- ],
4651
- "CL": [
4652
- "H",
4653
- "h",
4654
- "hB",
4655
- "hb"
4656
- ],
4657
- "CR": [
4658
- "H",
4659
- "h",
4660
- "hB",
4661
- "hb"
4662
- ],
4663
- "CU": [
4664
- "H",
4665
- "h",
4666
- "hB",
4667
- "hb"
4668
- ],
4669
- "EA": [
4670
- "H",
4671
- "h",
4672
- "hB",
4673
- "hb"
4674
- ],
4675
- "es-BO": [
4676
- "H",
4677
- "h",
4678
- "hB",
4679
- "hb"
4680
- ],
4681
- "es-BR": [
4682
- "H",
4683
- "h",
4684
- "hB",
4685
- "hb"
4686
- ],
4687
- "es-EC": [
4688
- "H",
4689
- "h",
4690
- "hB",
4691
- "hb"
4692
- ],
4693
- "es-ES": [
4694
- "H",
4695
- "h",
4696
- "hB",
4697
- "hb"
4698
- ],
4699
- "es-GQ": [
4700
- "H",
4701
- "h",
4702
- "hB",
4703
- "hb"
4704
- ],
4705
- "es-PE": [
4706
- "H",
4707
- "h",
4708
- "hB",
4709
- "hb"
4710
- ],
4711
- "GT": [
4712
- "H",
4713
- "h",
4714
- "hB",
4715
- "hb"
4716
- ],
4717
- "HN": [
4718
- "H",
4719
- "h",
4720
- "hB",
4721
- "hb"
4722
- ],
4723
- "IC": [
4724
- "H",
4725
- "h",
4726
- "hB",
4727
- "hb"
4728
- ],
4729
- "KG": [
4730
- "H",
4731
- "h",
4732
- "hB",
4733
- "hb"
4734
- ],
4735
- "KM": [
4736
- "H",
4737
- "h",
4738
- "hB",
4739
- "hb"
4740
- ],
4741
- "LK": [
4742
- "H",
4743
- "h",
4744
- "hB",
4745
- "hb"
4746
- ],
4747
- "MA": [
4748
- "H",
4749
- "h",
4750
- "hB",
4751
- "hb"
4752
- ],
4753
- "MX": [
4754
- "H",
4755
- "h",
4756
- "hB",
4757
- "hb"
4758
- ],
4759
- "NI": [
4760
- "H",
4761
- "h",
4762
- "hB",
4763
- "hb"
4764
- ],
4765
- "PY": [
4766
- "H",
4767
- "h",
4768
- "hB",
4769
- "hb"
4770
- ],
4771
- "SV": [
4772
- "H",
4773
- "h",
4774
- "hB",
4775
- "hb"
4776
- ],
4777
- "UY": [
4778
- "H",
4779
- "h",
4780
- "hB",
4781
- "hb"
4782
- ],
4783
- "JP": [
4784
- "H",
4785
- "h",
4786
- "K"
4787
- ],
4788
- "AD": [
4789
- "H",
4790
- "hB"
4791
- ],
4792
- "AM": [
4793
- "H",
4794
- "hB"
4795
- ],
4796
- "AO": [
4797
- "H",
4798
- "hB"
4799
- ],
4800
- "AT": [
4801
- "H",
4802
- "hB"
4803
- ],
4804
- "AW": [
4805
- "H",
4806
- "hB"
4807
- ],
4808
- "BE": [
4809
- "H",
4810
- "hB"
4811
- ],
4812
- "BF": [
4813
- "H",
4814
- "hB"
4815
- ],
4816
- "BJ": [
4817
- "H",
4818
- "hB"
4819
- ],
4820
- "BL": [
4821
- "H",
4822
- "hB"
4823
- ],
4824
- "BR": [
4825
- "H",
4826
- "hB"
4827
- ],
4828
- "CG": [
4829
- "H",
4830
- "hB"
4831
- ],
4832
- "CI": [
4833
- "H",
4834
- "hB"
4835
- ],
4836
- "CV": [
4837
- "H",
4838
- "hB"
4839
- ],
4840
- "DE": [
4841
- "H",
4842
- "hB"
4843
- ],
4844
- "EE": [
4845
- "H",
4846
- "hB"
4847
- ],
4848
- "FR": [
4849
- "H",
4850
- "hB"
4851
- ],
4852
- "GA": [
4853
- "H",
4854
- "hB"
4855
- ],
4856
- "GF": [
4857
- "H",
4858
- "hB"
4859
- ],
4860
- "GN": [
4861
- "H",
4862
- "hB"
4863
- ],
4864
- "GP": [
4865
- "H",
4866
- "hB"
4867
- ],
4868
- "GW": [
4869
- "H",
4870
- "hB"
4871
- ],
4872
- "HR": [
4873
- "H",
4874
- "hB"
4875
- ],
4876
- "IL": [
4877
- "H",
4878
- "hB"
4879
- ],
4880
- "IT": [
4881
- "H",
4882
- "hB"
4883
- ],
4884
- "KZ": [
4885
- "H",
4886
- "hB"
4887
- ],
4888
- "MC": [
4889
- "H",
4890
- "hB"
4891
- ],
4892
- "MD": [
4893
- "H",
4894
- "hB"
4895
- ],
4896
- "MF": [
4897
- "H",
4898
- "hB"
4899
- ],
4900
- "MQ": [
4901
- "H",
4902
- "hB"
4903
- ],
4904
- "MZ": [
4905
- "H",
4906
- "hB"
4907
- ],
4908
- "NC": [
4909
- "H",
4910
- "hB"
4911
- ],
4912
- "NL": [
4913
- "H",
4914
- "hB"
4915
- ],
4916
- "PM": [
4917
- "H",
4918
- "hB"
4919
- ],
4920
- "PT": [
4921
- "H",
4922
- "hB"
4923
- ],
4924
- "RE": [
4925
- "H",
4926
- "hB"
4927
- ],
4928
- "RO": [
4929
- "H",
4930
- "hB"
4931
- ],
4932
- "SI": [
4933
- "H",
4934
- "hB"
4935
- ],
4936
- "SR": [
4937
- "H",
4938
- "hB"
4939
- ],
4940
- "ST": [
4941
- "H",
4942
- "hB"
4943
- ],
4944
- "TG": [
4945
- "H",
4946
- "hB"
4947
- ],
4948
- "TR": [
4949
- "H",
4950
- "hB"
4951
- ],
4952
- "WF": [
4953
- "H",
4954
- "hB"
4955
- ],
4956
- "YT": [
4957
- "H",
4958
- "hB"
4959
- ],
4960
- "BD": [
4961
- "h",
4962
- "hB",
4963
- "H"
4964
- ],
4965
- "PK": [
4966
- "h",
4967
- "hB",
4968
- "H"
4969
- ],
4970
- "AZ": [
4971
- "H",
4972
- "hB",
4973
- "h"
4974
- ],
4975
- "BA": [
4976
- "H",
4977
- "hB",
4978
- "h"
4979
- ],
4980
- "BG": [
4981
- "H",
4982
- "hB",
4983
- "h"
4984
- ],
4985
- "CH": [
4986
- "H",
4987
- "hB",
4988
- "h"
4989
- ],
4990
- "GE": [
4991
- "H",
4992
- "hB",
4993
- "h"
4994
- ],
4995
- "LI": [
4996
- "H",
4997
- "hB",
4998
- "h"
4999
- ],
5000
- "ME": [
5001
- "H",
5002
- "hB",
5003
- "h"
5004
- ],
5005
- "RS": [
5006
- "H",
5007
- "hB",
5008
- "h"
5009
- ],
5010
- "UA": [
5011
- "H",
5012
- "hB",
5013
- "h"
5014
- ],
5015
- "UZ": [
5016
- "H",
5017
- "hB",
5018
- "h"
5019
- ],
5020
- "XK": [
5021
- "H",
5022
- "hB",
5023
- "h"
5024
- ],
5025
- "AG": [
5026
- "h",
5027
- "hb",
5028
- "H",
5029
- "hB"
5030
- ],
5031
- "AU": [
5032
- "h",
5033
- "hb",
5034
- "H",
5035
- "hB"
5036
- ],
5037
- "BB": [
5038
- "h",
5039
- "hb",
5040
- "H",
5041
- "hB"
5042
- ],
5043
- "BM": [
5044
- "h",
5045
- "hb",
5046
- "H",
5047
- "hB"
5048
- ],
5049
- "BS": [
5050
- "h",
5051
- "hb",
5052
- "H",
5053
- "hB"
5054
- ],
5055
- "CA": [
5056
- "h",
5057
- "hb",
5058
- "H",
5059
- "hB"
5060
- ],
5061
- "DM": [
5062
- "h",
5063
- "hb",
5064
- "H",
5065
- "hB"
5066
- ],
5067
- "en-001": [
5068
- "h",
5069
- "hb",
5070
- "H",
5071
- "hB"
5072
- ],
5073
- "FJ": [
5074
- "h",
5075
- "hb",
5076
- "H",
5077
- "hB"
5078
- ],
5079
- "FM": [
5080
- "h",
5081
- "hb",
5082
- "H",
5083
- "hB"
5084
- ],
5085
- "GD": [
5086
- "h",
5087
- "hb",
5088
- "H",
5089
- "hB"
5090
- ],
5091
- "GM": [
5092
- "h",
5093
- "hb",
5094
- "H",
5095
- "hB"
5096
- ],
5097
- "GU": [
5098
- "h",
5099
- "hb",
5100
- "H",
5101
- "hB"
5102
- ],
5103
- "GY": [
5104
- "h",
5105
- "hb",
5106
- "H",
5107
- "hB"
5108
- ],
5109
- "JM": [
5110
- "h",
5111
- "hb",
5112
- "H",
5113
- "hB"
5114
- ],
5115
- "KI": [
5116
- "h",
5117
- "hb",
5118
- "H",
5119
- "hB"
5120
- ],
5121
- "KN": [
5122
- "h",
5123
- "hb",
5124
- "H",
5125
- "hB"
5126
- ],
5127
- "KY": [
5128
- "h",
5129
- "hb",
5130
- "H",
5131
- "hB"
5132
- ],
5133
- "LC": [
5134
- "h",
5135
- "hb",
5136
- "H",
5137
- "hB"
5138
- ],
5139
- "LR": [
5140
- "h",
5141
- "hb",
5142
- "H",
5143
- "hB"
5144
- ],
5145
- "MH": [
5146
- "h",
5147
- "hb",
5148
- "H",
5149
- "hB"
5150
- ],
5151
- "MP": [
5152
- "h",
5153
- "hb",
5154
- "H",
5155
- "hB"
5156
- ],
5157
- "MW": [
5158
- "h",
5159
- "hb",
5160
- "H",
5161
- "hB"
5162
- ],
5163
- "NZ": [
5164
- "h",
5165
- "hb",
5166
- "H",
5167
- "hB"
5168
- ],
5169
- "SB": [
5170
- "h",
5171
- "hb",
5172
- "H",
5173
- "hB"
5174
- ],
5175
- "SG": [
5176
- "h",
5177
- "hb",
5178
- "H",
5179
- "hB"
5180
- ],
5181
- "SL": [
5182
- "h",
5183
- "hb",
5184
- "H",
5185
- "hB"
5186
- ],
5187
- "SS": [
5188
- "h",
5189
- "hb",
5190
- "H",
5191
- "hB"
5192
- ],
5193
- "SZ": [
5194
- "h",
5195
- "hb",
5196
- "H",
5197
- "hB"
5198
- ],
5199
- "TC": [
5200
- "h",
5201
- "hb",
5202
- "H",
5203
- "hB"
5204
- ],
5205
- "TT": [
5206
- "h",
5207
- "hb",
5208
- "H",
5209
- "hB"
5210
- ],
5211
- "UM": [
5212
- "h",
5213
- "hb",
5214
- "H",
5215
- "hB"
5216
- ],
5217
- "US": [
5218
- "h",
5219
- "hb",
5220
- "H",
5221
- "hB"
5222
- ],
5223
- "VC": [
5224
- "h",
5225
- "hb",
5226
- "H",
5227
- "hB"
5228
- ],
5229
- "VG": [
5230
- "h",
5231
- "hb",
5232
- "H",
5233
- "hB"
5234
- ],
5235
- "VI": [
5236
- "h",
5237
- "hb",
5238
- "H",
5239
- "hB"
5240
- ],
5241
- "ZM": [
5242
- "h",
5243
- "hb",
5244
- "H",
5245
- "hB"
5246
- ],
5247
- "BO": [
5248
- "H",
5249
- "hB",
5250
- "h",
5251
- "hb"
5252
- ],
5253
- "EC": [
5254
- "H",
5255
- "hB",
5256
- "h",
5257
- "hb"
5258
- ],
5259
- "ES": [
5260
- "H",
5261
- "hB",
5262
- "h",
5263
- "hb"
5264
- ],
5265
- "GQ": [
5266
- "H",
5267
- "hB",
5268
- "h",
5269
- "hb"
5270
- ],
5271
- "PE": [
5272
- "H",
5273
- "hB",
5274
- "h",
5275
- "hb"
5276
- ],
5277
- "AE": [
5278
- "h",
5279
- "hB",
5280
- "hb",
5281
- "H"
5282
- ],
5283
- "ar-001": [
5284
- "h",
5285
- "hB",
5286
- "hb",
5287
- "H"
5288
- ],
5289
- "BH": [
5290
- "h",
5291
- "hB",
5292
- "hb",
5293
- "H"
5294
- ],
5295
- "DZ": [
5296
- "h",
5297
- "hB",
5298
- "hb",
5299
- "H"
5300
- ],
5301
- "EG": [
5302
- "h",
5303
- "hB",
5304
- "hb",
5305
- "H"
5306
- ],
5307
- "EH": [
5308
- "h",
5309
- "hB",
5310
- "hb",
5311
- "H"
5312
- ],
5313
- "HK": [
5314
- "h",
5315
- "hB",
5316
- "hb",
5317
- "H"
5318
- ],
5319
- "IQ": [
5320
- "h",
5321
- "hB",
5322
- "hb",
5323
- "H"
5324
- ],
5325
- "JO": [
5326
- "h",
5327
- "hB",
5328
- "hb",
5329
- "H"
5330
- ],
5331
- "KW": [
5332
- "h",
5333
- "hB",
5334
- "hb",
5335
- "H"
5336
- ],
5337
- "LB": [
5338
- "h",
5339
- "hB",
5340
- "hb",
5341
- "H"
5342
- ],
5343
- "LY": [
5344
- "h",
5345
- "hB",
5346
- "hb",
5347
- "H"
5348
- ],
5349
- "MO": [
5350
- "h",
5351
- "hB",
5352
- "hb",
5353
- "H"
5354
- ],
5355
- "MR": [
5356
- "h",
5357
- "hB",
5358
- "hb",
5359
- "H"
5360
- ],
5361
- "OM": [
5362
- "h",
5363
- "hB",
5364
- "hb",
5365
- "H"
5366
- ],
5367
- "PH": [
5368
- "h",
5369
- "hB",
5370
- "hb",
5371
- "H"
5372
- ],
5373
- "PS": [
5374
- "h",
5375
- "hB",
5376
- "hb",
5377
- "H"
5378
- ],
5379
- "QA": [
5380
- "h",
5381
- "hB",
5382
- "hb",
5383
- "H"
5384
- ],
5385
- "SA": [
5386
- "h",
5387
- "hB",
5388
- "hb",
5389
- "H"
5390
- ],
5391
- "SD": [
5392
- "h",
5393
- "hB",
5394
- "hb",
5395
- "H"
5396
- ],
5397
- "SY": [
5398
- "h",
5399
- "hB",
5400
- "hb",
5401
- "H"
5402
- ],
5403
- "TN": [
5404
- "h",
5405
- "hB",
5406
- "hb",
5407
- "H"
5408
- ],
5409
- "YE": [
5410
- "h",
5411
- "hB",
5412
- "hb",
5413
- "H"
5414
- ],
5415
- "AF": [
5416
- "H",
5417
- "hb",
5418
- "hB",
5419
- "h"
5420
- ],
5421
- "LA": [
5422
- "H",
5423
- "hb",
5424
- "hB",
5425
- "h"
5426
- ],
5427
- "CN": [
5428
- "H",
5429
- "hB",
5430
- "hb",
5431
- "h"
5432
- ],
5433
- "LV": [
5434
- "H",
5435
- "hB",
5436
- "hb",
5437
- "h"
5438
- ],
5439
- "TL": [
5440
- "H",
5441
- "hB",
5442
- "hb",
5443
- "h"
5444
- ],
5445
- "zu-ZA": [
5446
- "H",
5447
- "hB",
5448
- "hb",
5449
- "h"
5450
- ],
5451
- "CD": [
5452
- "hB",
5453
- "H"
5454
- ],
5455
- "IR": [
5456
- "hB",
5457
- "H"
5458
- ],
5459
- "hi-IN": [
5460
- "hB",
5461
- "h",
5462
- "H"
5463
- ],
5464
- "kn-IN": [
5465
- "hB",
5466
- "h",
5467
- "H"
5468
- ],
5469
- "ml-IN": [
5470
- "hB",
5471
- "h",
5472
- "H"
5473
- ],
5474
- "te-IN": [
5475
- "hB",
5476
- "h",
5477
- "H"
5478
- ],
5479
- "KH": [
5480
- "hB",
5481
- "h",
5482
- "H",
5483
- "hb"
5484
- ],
5485
- "ta-IN": [
5486
- "hB",
5487
- "h",
5488
- "hb",
5489
- "H"
5490
- ],
5491
- "BN": [
5492
- "hb",
5493
- "hB",
5494
- "h",
5495
- "H"
5496
- ],
5497
- "MY": [
5498
- "hb",
5499
- "hB",
5500
- "h",
5501
- "H"
5502
- ],
5503
- "ET": [
5504
- "hB",
5505
- "hb",
5506
- "h",
5507
- "H"
5508
- ],
5509
- "gu-IN": [
5510
- "hB",
5511
- "hb",
5512
- "h",
5513
- "H"
5514
- ],
5515
- "mr-IN": [
5516
- "hB",
5517
- "hb",
5518
- "h",
5519
- "H"
5520
- ],
5521
- "pa-IN": [
5522
- "hB",
5523
- "hb",
5524
- "h",
5525
- "H"
5526
- ],
5527
- "TW": [
5528
- "hB",
5529
- "hb",
5530
- "h",
5531
- "H"
5532
- ],
5533
- "KE": [
5534
- "hB",
5535
- "hb",
5536
- "H",
5537
- "h"
5538
- ],
5539
- "MM": [
5540
- "hB",
5541
- "hb",
5542
- "H",
5543
- "h"
5544
- ],
5545
- "TZ": [
5546
- "hB",
5547
- "hb",
5548
- "H",
5549
- "h"
5550
- ],
5551
- "UG": [
5552
- "hB",
5553
- "hb",
5554
- "H",
5555
- "h"
5556
- ]
5557
- };
5558
-
5559
- /**
5560
- * Returns the best matching date time pattern if a date time skeleton
5561
- * pattern is provided with a locale. Follows the Unicode specification:
5562
- * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
5563
- * @param skeleton date time skeleton pattern that possibly includes j, J or C
5564
- * @param locale
5565
- */
5566
- function getBestPattern(skeleton, locale) {
5567
- var skeletonCopy = '';
5568
- for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
5569
- var patternChar = skeleton.charAt(patternPos);
5570
- if (patternChar === 'j') {
5571
- var extraLength = 0;
5572
- while (patternPos + 1 < skeleton.length &&
5573
- skeleton.charAt(patternPos + 1) === patternChar) {
5574
- extraLength++;
5575
- patternPos++;
5576
- }
5577
- var hourLen = 1 + (extraLength & 1);
5578
- var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
5579
- var dayPeriodChar = 'a';
5580
- var hourChar = getDefaultHourSymbolFromLocale(locale);
5581
- if (hourChar == 'H' || hourChar == 'k') {
5582
- dayPeriodLen = 0;
5583
- }
5584
- while (dayPeriodLen-- > 0) {
5585
- skeletonCopy += dayPeriodChar;
5586
- }
5587
- while (hourLen-- > 0) {
5588
- skeletonCopy = hourChar + skeletonCopy;
5589
- }
5590
- }
5591
- else if (patternChar === 'J') {
5592
- skeletonCopy += 'H';
5593
- }
5594
- else {
5595
- skeletonCopy += patternChar;
5596
- }
5597
- }
5598
- return skeletonCopy;
5599
- }
5600
- /**
5601
- * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
5602
- * of the given `locale` to the corresponding time pattern.
5603
- * @param locale
5604
- */
5605
- function getDefaultHourSymbolFromLocale(locale) {
5606
- var hourCycle = locale.hourCycle;
5607
- if (hourCycle === undefined &&
5608
- // @ts-ignore hourCycle(s) is not identified yet
5609
- locale.hourCycles &&
5610
- // @ts-ignore
5611
- locale.hourCycles.length) {
5612
- // @ts-ignore
5613
- hourCycle = locale.hourCycles[0];
5614
- }
5615
- if (hourCycle) {
5616
- switch (hourCycle) {
5617
- case 'h24':
5618
- return 'k';
5619
- case 'h23':
5620
- return 'H';
5621
- case 'h12':
5622
- return 'h';
5623
- case 'h11':
5624
- return 'K';
5625
- default:
5626
- throw new Error('Invalid hourCycle');
5627
- }
5628
- }
5629
- // TODO: Once hourCycle is fully supported remove the following with data generation
5630
- var languageTag = locale.language;
5631
- var regionTag;
5632
- if (languageTag !== 'root') {
5633
- regionTag = locale.maximize().region;
5634
- }
5635
- var hourCycles = timeData[regionTag || ''] ||
5636
- timeData[languageTag || ''] ||
5637
- timeData["".concat(languageTag, "-001")] ||
5638
- timeData['001'];
5639
- return hourCycles[0];
5640
- }
5641
-
5642
4219
  var _a;
5643
4220
  var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
5644
4221
  var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
@@ -5798,7 +4375,6 @@ var Parser = /** @class */ (function () {
5798
4375
  this.message = message;
5799
4376
  this.position = { offset: 0, line: 1, column: 1 };
5800
4377
  this.ignoreTag = !!options.ignoreTag;
5801
- this.locale = options.locale;
5802
4378
  this.requiresOtherClause = !!options.requiresOtherClause;
5803
4379
  this.shouldParseSkeletons = !!options.shouldParseSkeletons;
5804
4380
  }
@@ -6174,19 +4750,12 @@ var Parser = /** @class */ (function () {
6174
4750
  if (skeleton.length === 0) {
6175
4751
  return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
6176
4752
  }
6177
- var dateTimePattern = skeleton;
6178
- // Get "best match" pattern only if locale is passed, if not, let it
6179
- // pass as-is where `parseDateTimeSkeleton()` will throw an error
6180
- // for unsupported patterns.
6181
- if (this.locale) {
6182
- dateTimePattern = getBestPattern(skeleton, this.locale);
6183
- }
6184
4753
  var style = {
6185
4754
  type: SKELETON_TYPE.dateTime,
6186
- pattern: dateTimePattern,
4755
+ pattern: skeleton,
6187
4756
  location: styleAndLocation.styleLocation,
6188
4757
  parsedOptions: this.shouldParseSkeletons
6189
- ? parseDateTimeSkeleton(dateTimePattern)
4758
+ ? parseDateTimeSkeleton(skeleton)
6190
4759
  : {},
6191
4760
  };
6192
4761
  var type = argType === 'date' ? TYPE.date : TYPE.time;
@@ -7171,7 +5740,7 @@ originalMessage) {
7171
5740
  ? formats.time[el.style]
7172
5741
  : isDateTimeSkeleton(el.style)
7173
5742
  ? el.style.parsedOptions
7174
- : formats.time.medium;
5743
+ : undefined;
7175
5744
  result.push({
7176
5745
  type: PART_TYPE.literal,
7177
5746
  value: formatters
@@ -7361,12 +5930,9 @@ var IntlMessageFormat = /** @class */ (function () {
7361
5930
  return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);
7362
5931
  };
7363
5932
  this.resolvedOptions = function () { return ({
7364
- locale: _this.resolvedLocale.toString(),
5933
+ locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
7365
5934
  }); };
7366
5935
  this.getAst = function () { return _this.ast; };
7367
- // Defined first because it's used to build the format pattern.
7368
- this.locales = locales;
7369
- this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);
7370
5936
  if (typeof message === 'string') {
7371
5937
  this.message = message;
7372
5938
  if (!IntlMessageFormat.__parse) {
@@ -7375,7 +5941,6 @@ var IntlMessageFormat = /** @class */ (function () {
7375
5941
  // Parse string messages into an AST.
7376
5942
  this.ast = IntlMessageFormat.__parse(message, {
7377
5943
  ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,
7378
- locale: this.resolvedLocale,
7379
5944
  });
7380
5945
  }
7381
5946
  else {
@@ -7387,6 +5952,8 @@ var IntlMessageFormat = /** @class */ (function () {
7387
5952
  // Creates a new object with the specified `formats` merged with the default
7388
5953
  // formats.
7389
5954
  this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
5955
+ // Defined first because it's used to build the format pattern.
5956
+ this.locales = locales;
7390
5957
  this.formatters =
7391
5958
  (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);
7392
5959
  }
@@ -7402,13 +5969,6 @@ var IntlMessageFormat = /** @class */ (function () {
7402
5969
  configurable: true
7403
5970
  });
7404
5971
  IntlMessageFormat.memoizedDefaultLocale = null;
7405
- IntlMessageFormat.resolveLocale = function (locales) {
7406
- var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
7407
- if (supportedLocales.length > 0) {
7408
- return new Intl.Locale(supportedLocales[0]);
7409
- }
7410
- return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);
7411
- };
7412
5972
  IntlMessageFormat.__parse = parse;
7413
5973
  // Default format options used as the prototype of the `formats` provided to the
7414
5974
  // constructor. These are used when constructing the internal Intl.NumberFormat
@@ -7550,9 +6110,9 @@ var MissingTranslationError = /** @class */ (function (_super) {
7550
6110
  return MissingTranslationError;
7551
6111
  }(IntlError));
7552
6112
 
7553
- function filterProps(props, allowlist, defaults) {
6113
+ function filterProps(props, whitelist, defaults) {
7554
6114
  if (defaults === void 0) { defaults = {}; }
7555
- return allowlist.reduce(function (filtered, name) {
6115
+ return whitelist.reduce(function (filtered, name) {
7556
6116
  if (name in props) {
7557
6117
  filtered[name] = props[name];
7558
6118
  }
@@ -7564,8 +6124,6 @@ function filterProps(props, allowlist, defaults) {
7564
6124
  }
7565
6125
  var defaultErrorHandler = function (error) {
7566
6126
  };
7567
- var defaultWarnHandler = function (warning) {
7568
- };
7569
6127
  var DEFAULT_INTL_CONFIG = {
7570
6128
  formats: {},
7571
6129
  messages: {},
@@ -7574,7 +6132,6 @@ var DEFAULT_INTL_CONFIG = {
7574
6132
  defaultFormats: {},
7575
6133
  fallbackOnEmptyString: true,
7576
6134
  onError: defaultErrorHandler,
7577
- onWarn: defaultWarnHandler,
7578
6135
  };
7579
6136
  function createIntlCache() {
7580
6137
  return {
@@ -8112,10 +6669,9 @@ function messagesContainString(messages) {
8112
6669
  return typeof firstMessage === 'string';
8113
6670
  }
8114
6671
  function verifyConfigMessages(config) {
8115
- if (config.onWarn &&
8116
- config.defaultRichTextElements &&
6672
+ if (config.defaultRichTextElements &&
8117
6673
  messagesContainString(config.messages || {})) {
8118
- config.onWarn("[@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution");
6674
+ console.warn("[@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution");
8119
6675
  }
8120
6676
  }
8121
6677
  /**
@@ -8146,474 +6702,474 @@ function createIntl(config, cache) {
8146
6702
  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")));
8147
6703
  }
8148
6704
  verifyConfigMessages(resolvedConfig);
8149
- 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), $t: 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) });
8150
- }
8151
-
8152
- const DEFAULT_LANGUAGE = "en";
8153
- function getBrowserLang() {
8154
- const langAttr = document.documentElement.getAttribute("lang");
8155
- if (!!langAttr) {
8156
- return langAttr;
8157
- }
8158
- else if (window.navigator && window.navigator.language) {
8159
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
8160
- return lang.slice(0, 2);
8161
- }
8162
- else {
8163
- return DEFAULT_LANGUAGE;
8164
- }
8165
- }
8166
- // prevents memory leak
8167
- const cache = createIntlCache();
8168
- const locale = getBrowserLang();
8169
- const intl = createIntl({
8170
- locale: locale,
8171
- defaultLocale: "en",
8172
- messages: lang[locale] || en,
8173
- }, cache);
8174
- function generateId() {
8175
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
8176
- }
8177
- // limits how many times a function fires
8178
- // use when the function should run periodically, but not too often (e.g. window resize)
8179
- function throttle(fn, wait) {
8180
- let timeout;
8181
- let shouldWait = false;
8182
- return function () {
8183
- const context = this;
8184
- if (!shouldWait) {
8185
- fn.apply(context, arguments);
8186
- shouldWait = true;
8187
- clearTimeout(timeout);
8188
- timeout = setTimeout(function () {
8189
- shouldWait = false;
8190
- }, wait);
8191
- }
8192
- };
8193
- }
8194
- // waits until it hasn't been called for [timeout] ms.
8195
- // use when the function should run only after something (event) is done firing
8196
- function debounce(fn, wait) {
8197
- let timeout;
8198
- return function () {
8199
- const context = this;
8200
- const functionCall = () => fn.apply(context, arguments);
8201
- clearTimeout(timeout);
8202
- timeout = setTimeout(functionCall, wait);
8203
- };
8204
- }
8205
- function getTextDir() {
8206
- const dir = document.querySelector("html").getAttribute("dir");
8207
- return dir ? dir.toLowerCase() : "";
8208
- }
8209
- function getPosition(el) {
8210
- const coords = el.getBoundingClientRect();
8211
- let x = coords.x;
8212
- let y = coords.y;
8213
- // Edge doesn't have x and y
8214
- if (!x) {
8215
- if (getTextDir() === "rtl") {
8216
- x = coords.right;
8217
- }
8218
- else {
8219
- x = coords.left;
8220
- }
8221
- y = coords.top;
8222
- }
8223
- return { x, y };
8224
- }
8225
- function findParentWithScrollbar(el) {
8226
- while (!!el) {
8227
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
8228
- return el;
8229
- }
8230
- el = el.parentElement;
8231
- }
8232
- }
8233
- function findParentWithHiddenOverflow(el) {
8234
- while (!!el) {
8235
- if (window.getComputedStyle(el).overflowY !== "visible") {
8236
- return el;
8237
- }
8238
- el = el.parentElement;
8239
- }
8240
- }
8241
- function getClosableElementMeasurements(fixedEl, closableEl) {
8242
- const parent = findParentWithHiddenOverflow(fixedEl);
8243
- // if parent is not found, measurements are checked against the viewport
8244
- return {
8245
- closableElHeight: closableEl.clientHeight,
8246
- closableElWidth: closableEl.clientWidth,
8247
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8248
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8249
- spaceAbove: parent
8250
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
8251
- : fixedEl.getBoundingClientRect().top,
8252
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8253
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8254
- spaceBelow: parent
8255
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
8256
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
8257
- spaceLeft: parent
8258
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
8259
- : fixedEl.getBoundingClientRect().left,
8260
- spaceRight: parent
8261
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
8262
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
8263
- };
8264
- }
8265
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
8266
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8267
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8268
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8269
- ) {
8270
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8271
- //we want to open up only if there's not enough space below AND there is enough space above
8272
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
8273
- return openUp;
8274
- }
8275
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
8276
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8277
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8278
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8279
- ) {
8280
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8281
- //we want to open up only if there's not enough space below AND there is enough space above
8282
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
8283
- return openDown;
8284
- }
8285
- function shouldShiftRight(fixedEl, closableEl) {
8286
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8287
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
8288
- return needsSpaceLeft;
8289
- }
8290
- function shouldShiftLeft(fixedEl, closableEl) {
8291
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8292
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
8293
- return needsSpaceRight;
8294
- }
8295
- function adjustTooltipPosition(tPos, el, tooltipEl) {
8296
- // position must be reset before measurements are taken in adjustTooltipPosition
8297
- // otherwise text-wrapping from previous position makes width measurement inconsistent
8298
- tooltipEl.style.top = "";
8299
- tooltipEl.style.left = "";
8300
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
8301
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
8302
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
8303
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
8304
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
8305
- // a tooltip should never be closer than 24px to the edge of a screen
8306
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
8307
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
8308
- const swapAbove = (position) => {
8309
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
8310
- };
8311
- const swapBelow = (position) => {
8312
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
8313
- };
8314
- const swapLeft = (position, centeredPosition) => {
8315
- if (!enoughSpaceLeft && enoughSpaceRight) {
8316
- position = position.replace("left", "right");
8317
- }
8318
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
8319
- position = centeredPosition;
8320
- }
8321
- return position;
8322
- };
8323
- const swapRight = (position, centeredPosition) => {
8324
- if (!enoughSpaceRight && enoughSpaceLeft) {
8325
- position = position.replace("right", "left");
8326
- }
8327
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
8328
- position = centeredPosition;
8329
- }
8330
- return position;
8331
- };
8332
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
8333
- switch (tPos) {
8334
- case "left":
8335
- tPos = swapLeft(tPos, "bottom");
8336
- case "right":
8337
- tPos = swapRight(tPos, "bottom");
8338
- case "top-left":
8339
- tPos = swapLeft(tPos, "top");
8340
- tPos = swapAbove(tPos);
8341
- case "top-right":
8342
- tPos = swapRight(tPos, "top");
8343
- tPos = swapAbove(tPos);
8344
- case "bottom-left":
8345
- tPos = swapLeft(tPos, "bottom");
8346
- tPos = swapBelow(tPos);
8347
- case "bottom-right":
8348
- tPos = swapRight(tPos, "bottom");
8349
- tPos = swapBelow(tPos);
8350
- case "top":
8351
- tPos = swapAbove(tPos);
8352
- case "bottom":
8353
- tPos = swapBelow(tPos);
8354
- }
8355
- return tPos;
8356
- }
8357
- function hasRoomRight(x, spaceNeeded) {
8358
- let horizOffset = 0;
8359
- // if (getTextDir() === "ltr") {
8360
- if (x.type === "click") {
8361
- // if it's a mouse event, deal with mouse coords
8362
- horizOffset = x.clientX;
8363
- // if it's a focus event, the offset is 0
8364
- }
8365
- else if (x.type === "focus") {
8366
- horizOffset = 0;
8367
- }
8368
- else {
8369
- // otherwise an element was passed, calculate how far it is from the edge of the window
8370
- let el = x; // re-assignment is for clarity
8371
- while (el) {
8372
- if (el.tagName == "BODY") {
8373
- // deal with browser quirks with body/window/document and page scroll
8374
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
8375
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
8376
- }
8377
- else {
8378
- // for all other non-BODY elements
8379
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
8380
- }
8381
- el = el.offsetParent;
8382
- }
8383
- // }
8384
- }
8385
- return window.innerWidth - horizOffset >= spaceNeeded;
8386
- }
8387
- function checkForActiveElInShadow(element) {
8388
- while (element && element.shadowRoot) {
8389
- element = element.shadowRoot.activeElement;
8390
- }
8391
- return element;
8392
- }
8393
- function checkForFocusableElInShadow(element) {
8394
- const selectors = [
8395
- "button",
8396
- "a",
8397
- "input",
8398
- "select",
8399
- "textarea",
8400
- "wm-button",
8401
- "wm-search",
8402
- "wm-select",
8403
- "wm-action-menu",
8404
- "wm-tab-item",
8405
- "wm-datepicker",
8406
- ];
8407
- let focusableEl = element;
8408
- selectors.forEach((selector) => {
8409
- if (focusableEl && focusableEl.shadowRoot) {
8410
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
8411
- if (elInShadow) {
8412
- if (selector.startsWith("wm-")) {
8413
- focusableEl = checkForFocusableElInShadow(elInShadow);
8414
- }
8415
- else {
8416
- focusableEl = elInShadow;
8417
- }
8418
- }
8419
- }
8420
- });
8421
- return focusableEl;
8422
- }
8423
- function isFocusable(element) {
8424
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
8425
- return true;
8426
- }
8427
- if (element.disabled) {
8428
- return false;
8429
- }
8430
- switch (element.nodeName) {
8431
- case "A":
8432
- return !!element.href && element.rel != "ignore";
8433
- case "INPUT":
8434
- return element.type != "hidden" && element.type != "file";
8435
- case "BUTTON":
8436
- case "SELECT":
8437
- case "TEXTAREA":
8438
- case "WM-BUTTON":
8439
- case "WM-SELECT":
8440
- case "WM-ACTION-MENU":
8441
- case "WM-DATEPICKER":
8442
- case "WM-TIMEPICKER":
8443
- case "WM-INPUT":
8444
- case "WM-TAG-INPUT":
8445
- case "WM-TAB-ITEM":
8446
- case "WM-SEARCH":
8447
- return true;
8448
- default:
8449
- return false;
8450
- }
8451
- }
8452
- function getFirstFocusableDescendant(element) {
8453
- if (isFocusable(element)) {
8454
- return checkForFocusableElInShadow(element);
8455
- }
8456
- else if (element.childNodes.length > 0) {
8457
- element.childNodes.forEach((i) => {
8458
- const childEl = getFirstFocusableDescendant(i);
8459
- return childEl && checkForFocusableElInShadow(childEl);
8460
- });
8461
- }
8462
- }
8463
- function hasValidType(file, types) {
8464
- const acceptedExtensions = types.split(" ");
8465
- const parts = file.name && file.name.split(".");
8466
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
8467
- return ext
8468
- ? acceptedExtensions.includes(ext.toLowerCase())
8469
- : // fallback: if we couldn't obtain an extension,
8470
- // validate based on MIME type...
8471
- !!file.type
8472
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
8473
- : // ...and if that failed too, accept the file
8474
- // as it's preferable to accept an invalid file
8475
- // than refusing a valid one (back-end will take care of what slips through)
8476
- true;
8477
- }
8478
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
8479
- function getAcceptedMimeTypesList(acceptedExtensions) {
8480
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
8481
- // front end checks are just a convenience to users, independent of security.
8482
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
8483
- const lookupTable = {
8484
- aac: ["audio/aac"],
8485
- abw: ["application/x-abiword"],
8486
- arc: ["application/x-freearc"],
8487
- avi: ["video/x-msvideo"],
8488
- azw: ["application/vnd.amazon.ebook"],
8489
- bin: ["application/octet-stream"],
8490
- bmp: ["image/bmp"],
8491
- bz: ["application/x-bzip"],
8492
- bz2: ["application/x-bzip2"],
8493
- csh: ["application/x-csh"],
8494
- css: ["text/css"],
8495
- csv: ["text/csv"],
8496
- doc: ["application/msword"],
8497
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
8498
- eot: ["application/vnd.ms-fontobject"],
8499
- epub: ["application/epub+zip"],
8500
- gz: ["application/gzip"],
8501
- gif: ["image/gif"],
8502
- htm: ["text/html"],
8503
- html: ["text/html"],
8504
- ico: ["image/vnd.microsoft.icon"],
8505
- ics: ["text/calendar"],
8506
- jar: ["application/java-archive"],
8507
- jpeg: ["image/jpeg"],
8508
- jpg: ["image/jpeg"],
8509
- js: ["text/javascript"],
8510
- json: ["application/json"],
8511
- jsonld: ["application/ld+json"],
8512
- log: ["text/plain"],
8513
- mid: ["audio/x-midi"],
8514
- midi: ["audio/x-midi"],
8515
- mjs: ["text/javascript"],
8516
- mp3: ["audio/mpeg"],
8517
- mpeg: ["video/mpeg"],
8518
- mpkg: ["application/vnd.apple.installer+xml"],
8519
- odp: ["application/vnd.oasis.opendocument.presentation"],
8520
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
8521
- odt: ["application/vnd.oasis.opendocument.text"],
8522
- oga: ["audio/ogg"],
8523
- ogv: ["video/ogg"],
8524
- ogx: ["application/ogg"],
8525
- opus: ["audio/opus"],
8526
- otf: ["font/otf"],
8527
- png: ["image/png"],
8528
- pdf: ["application/pdf"],
8529
- php: ["application/php"],
8530
- ppt: ["application/vnd.ms-powerpoint"],
8531
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
8532
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
8533
- rtf: ["application/rtf"],
8534
- sh: ["application/x-sh"],
8535
- svg: ["image/svg+xml"],
8536
- swf: ["application/x-shockwave-flash"],
8537
- tar: ["application/x-tar"],
8538
- tif: ["image/tiff"],
8539
- tiff: ["image/tiff"],
8540
- ts: ["video/mp2t"],
8541
- ttf: ["font/ttf"],
8542
- txt: ["text/plain"],
8543
- vsd: ["application/vnd.visio"],
8544
- wav: ["audio/wav"],
8545
- weba: ["audio/webm"],
8546
- webm: ["video/webm"],
8547
- webp: ["image/webp"],
8548
- woff: ["font/woff"],
8549
- woff2: ["font/woff2"],
8550
- xhtml: ["application/xhtml+xml"],
8551
- xls: ["application/vnd.ms-excel"],
8552
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
8553
- xml: ["application/xml", "text/xml"],
8554
- xul: ["application/vnd.mozilla.xul+xml"],
8555
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
8556
- "3gp": ["video/3gpp", "audio/3gpp"],
8557
- "3g2": ["video/3gpp2", "audio/3gpp2"],
8558
- "7z": ["application/x-7z-compressed"],
8559
- };
8560
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
8561
- }
8562
- function snakeCaseToCamelCase(str) {
8563
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
8564
- if (snakeCaseRegexp.test(str)) {
8565
- let camelCase = "";
8566
- let arr = str.split("_");
8567
- arr.forEach((word, idx) => {
8568
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
8569
- });
8570
- return camelCase;
8571
- }
8572
- else {
8573
- return str;
8574
- }
8575
- }
8576
- function getNewIndexToFocus(currentIndex, direction, listLength) {
8577
- let newIndex = currentIndex;
8578
- if (direction === "ArrowDown") {
8579
- newIndex = (currentIndex + 1) % listLength;
8580
- }
8581
- if (direction === "ArrowUp") {
8582
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
8583
- }
8584
- return newIndex;
8585
- }
8586
- function isRelatedTarget(ev, id) {
8587
- // used for onBlur events to check the element that has been clicked
8588
- const ids = id.split(" ");
8589
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
8590
- }
8591
- function toBool(val) {
8592
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
8593
- return val == "false" ? false : !!val;
8594
- }
8595
- /*
8596
- * this is going to be needed to solve the extra tabbing on navigator
8597
- * and for programmatic focus of tabs
8598
- * Here's a draft, not bug proof, see:
8599
- * https://stackoverflow.com/a/10730308/3741713
8600
-
8601
- function getKeyboardFocusableElements(element = document) {
8602
- 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'));
8603
- return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
6705
+ 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) });
8604
6706
  }
8605
6707
 
8606
- export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
8607
- const els = getKeyboardFocusableElements();
8608
- const current = els.indexOf(element);
8609
- return els[current - 1] as HTMLElement;
8610
- }
8611
-
8612
- export function getNextKeyboardFocusableElement(element: HTMLElement) {
8613
- const els = getKeyboardFocusableElements();
8614
- const current = els.indexOf(element);
8615
- return els[current + 1] as HTMLElement;
8616
- }
6708
+ const DEFAULT_LANGUAGE = "en";
6709
+ function getBrowserLang() {
6710
+ const langAttr = document.documentElement.getAttribute("lang");
6711
+ if (!!langAttr) {
6712
+ return langAttr;
6713
+ }
6714
+ else if (window.navigator && window.navigator.language) {
6715
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
6716
+ return lang.slice(0, 2);
6717
+ }
6718
+ else {
6719
+ return DEFAULT_LANGUAGE;
6720
+ }
6721
+ }
6722
+ // prevents memory leak
6723
+ const cache = createIntlCache();
6724
+ const locale = getBrowserLang();
6725
+ const intl = createIntl({
6726
+ locale: locale,
6727
+ defaultLocale: "en",
6728
+ messages: lang[locale] || en,
6729
+ }, cache);
6730
+ function generateId() {
6731
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
6732
+ }
6733
+ // limits how many times a function fires
6734
+ // use when the function should run periodically, but not too often (e.g. window resize)
6735
+ function throttle(fn, wait) {
6736
+ let timeout;
6737
+ let shouldWait = false;
6738
+ return function () {
6739
+ const context = this;
6740
+ if (!shouldWait) {
6741
+ fn.apply(context, arguments);
6742
+ shouldWait = true;
6743
+ clearTimeout(timeout);
6744
+ timeout = setTimeout(function () {
6745
+ shouldWait = false;
6746
+ }, wait);
6747
+ }
6748
+ };
6749
+ }
6750
+ // waits until it hasn't been called for [timeout] ms.
6751
+ // use when the function should run only after something (event) is done firing
6752
+ function debounce(fn, wait) {
6753
+ let timeout;
6754
+ return function () {
6755
+ const context = this;
6756
+ const functionCall = () => fn.apply(context, arguments);
6757
+ clearTimeout(timeout);
6758
+ timeout = setTimeout(functionCall, wait);
6759
+ };
6760
+ }
6761
+ function getTextDir() {
6762
+ const dir = document.querySelector("html").getAttribute("dir");
6763
+ return dir ? dir.toLowerCase() : "";
6764
+ }
6765
+ function getPosition(el) {
6766
+ const coords = el.getBoundingClientRect();
6767
+ let x = coords.x;
6768
+ let y = coords.y;
6769
+ // Edge doesn't have x and y
6770
+ if (!x) {
6771
+ if (getTextDir() === "rtl") {
6772
+ x = coords.right;
6773
+ }
6774
+ else {
6775
+ x = coords.left;
6776
+ }
6777
+ y = coords.top;
6778
+ }
6779
+ return { x, y };
6780
+ }
6781
+ function findParentWithScrollbar(el) {
6782
+ while (!!el) {
6783
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
6784
+ return el;
6785
+ }
6786
+ el = el.parentElement;
6787
+ }
6788
+ }
6789
+ function findParentWithHiddenOverflow(el) {
6790
+ while (!!el) {
6791
+ if (window.getComputedStyle(el).overflowY !== "visible") {
6792
+ return el;
6793
+ }
6794
+ el = el.parentElement;
6795
+ }
6796
+ }
6797
+ function getClosableElementMeasurements(fixedEl, closableEl) {
6798
+ const parent = findParentWithHiddenOverflow(fixedEl);
6799
+ // if parent is not found, measurements are checked against the viewport
6800
+ return {
6801
+ closableElHeight: closableEl.clientHeight,
6802
+ closableElWidth: closableEl.clientWidth,
6803
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6804
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6805
+ spaceAbove: parent
6806
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
6807
+ : fixedEl.getBoundingClientRect().top,
6808
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
6809
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
6810
+ spaceBelow: parent
6811
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
6812
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
6813
+ spaceLeft: parent
6814
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
6815
+ : fixedEl.getBoundingClientRect().left,
6816
+ spaceRight: parent
6817
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
6818
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
6819
+ };
6820
+ }
6821
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
6822
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6823
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6824
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6825
+ ) {
6826
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6827
+ //we want to open up only if there's not enough space below AND there is enough space above
6828
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
6829
+ return openUp;
6830
+ }
6831
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
6832
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
6833
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
6834
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
6835
+ ) {
6836
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
6837
+ //we want to open up only if there's not enough space below AND there is enough space above
6838
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
6839
+ return openDown;
6840
+ }
6841
+ function shouldShiftRight(fixedEl, closableEl) {
6842
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6843
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
6844
+ return needsSpaceLeft;
6845
+ }
6846
+ function shouldShiftLeft(fixedEl, closableEl) {
6847
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
6848
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
6849
+ return needsSpaceRight;
6850
+ }
6851
+ function adjustTooltipPosition(tPos, el, tooltipEl) {
6852
+ // position must be reset before measurements are taken in adjustTooltipPosition
6853
+ // otherwise text-wrapping from previous position makes width measurement inconsistent
6854
+ tooltipEl.style.top = "";
6855
+ tooltipEl.style.left = "";
6856
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
6857
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
6858
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
6859
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
6860
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
6861
+ // a tooltip should never be closer than 24px to the edge of a screen
6862
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
6863
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
6864
+ const swapAbove = (position) => {
6865
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
6866
+ };
6867
+ const swapBelow = (position) => {
6868
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
6869
+ };
6870
+ const swapLeft = (position, centeredPosition) => {
6871
+ if (!enoughSpaceLeft && enoughSpaceRight) {
6872
+ position = position.replace("left", "right");
6873
+ }
6874
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
6875
+ position = centeredPosition;
6876
+ }
6877
+ return position;
6878
+ };
6879
+ const swapRight = (position, centeredPosition) => {
6880
+ if (!enoughSpaceRight && enoughSpaceLeft) {
6881
+ position = position.replace("right", "left");
6882
+ }
6883
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
6884
+ position = centeredPosition;
6885
+ }
6886
+ return position;
6887
+ };
6888
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
6889
+ switch (tPos) {
6890
+ case "left":
6891
+ tPos = swapLeft(tPos, "bottom");
6892
+ case "right":
6893
+ tPos = swapRight(tPos, "bottom");
6894
+ case "top-left":
6895
+ tPos = swapLeft(tPos, "top");
6896
+ tPos = swapAbove(tPos);
6897
+ case "top-right":
6898
+ tPos = swapRight(tPos, "top");
6899
+ tPos = swapAbove(tPos);
6900
+ case "bottom-left":
6901
+ tPos = swapLeft(tPos, "bottom");
6902
+ tPos = swapBelow(tPos);
6903
+ case "bottom-right":
6904
+ tPos = swapRight(tPos, "bottom");
6905
+ tPos = swapBelow(tPos);
6906
+ case "top":
6907
+ tPos = swapAbove(tPos);
6908
+ case "bottom":
6909
+ tPos = swapBelow(tPos);
6910
+ }
6911
+ return tPos;
6912
+ }
6913
+ function hasRoomRight(x, spaceNeeded) {
6914
+ let horizOffset = 0;
6915
+ // if (getTextDir() === "ltr") {
6916
+ if (x.type === "click") {
6917
+ // if it's a mouse event, deal with mouse coords
6918
+ horizOffset = x.clientX;
6919
+ // if it's a focus event, the offset is 0
6920
+ }
6921
+ else if (x.type === "focus") {
6922
+ horizOffset = 0;
6923
+ }
6924
+ else {
6925
+ // otherwise an element was passed, calculate how far it is from the edge of the window
6926
+ let el = x; // re-assignment is for clarity
6927
+ while (el) {
6928
+ if (el.tagName == "BODY") {
6929
+ // deal with browser quirks with body/window/document and page scroll
6930
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6931
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
6932
+ }
6933
+ else {
6934
+ // for all other non-BODY elements
6935
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
6936
+ }
6937
+ el = el.offsetParent;
6938
+ }
6939
+ // }
6940
+ }
6941
+ return window.innerWidth - horizOffset >= spaceNeeded;
6942
+ }
6943
+ function checkForActiveElInShadow(element) {
6944
+ while (element && element.shadowRoot) {
6945
+ element = element.shadowRoot.activeElement;
6946
+ }
6947
+ return element;
6948
+ }
6949
+ function checkForFocusableElInShadow(element) {
6950
+ const selectors = [
6951
+ "button",
6952
+ "a",
6953
+ "input",
6954
+ "select",
6955
+ "textarea",
6956
+ "wm-button",
6957
+ "wm-search",
6958
+ "wm-select",
6959
+ "wm-action-menu",
6960
+ "wm-tab-item",
6961
+ "wm-datepicker",
6962
+ ];
6963
+ let focusableEl = element;
6964
+ selectors.forEach((selector) => {
6965
+ if (focusableEl && focusableEl.shadowRoot) {
6966
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
6967
+ if (elInShadow) {
6968
+ if (selector.startsWith("wm-")) {
6969
+ focusableEl = checkForFocusableElInShadow(elInShadow);
6970
+ }
6971
+ else {
6972
+ focusableEl = elInShadow;
6973
+ }
6974
+ }
6975
+ }
6976
+ });
6977
+ return focusableEl;
6978
+ }
6979
+ function isFocusable(element) {
6980
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
6981
+ return true;
6982
+ }
6983
+ if (element.disabled) {
6984
+ return false;
6985
+ }
6986
+ switch (element.nodeName) {
6987
+ case "A":
6988
+ return !!element.href && element.rel != "ignore";
6989
+ case "INPUT":
6990
+ return element.type != "hidden" && element.type != "file";
6991
+ case "BUTTON":
6992
+ case "SELECT":
6993
+ case "TEXTAREA":
6994
+ case "WM-BUTTON":
6995
+ case "WM-SELECT":
6996
+ case "WM-ACTION-MENU":
6997
+ case "WM-DATEPICKER":
6998
+ case "WM-TIMEPICKER":
6999
+ case "WM-INPUT":
7000
+ case "WM-TAG-INPUT":
7001
+ case "WM-TAB-ITEM":
7002
+ case "WM-SEARCH":
7003
+ return true;
7004
+ default:
7005
+ return false;
7006
+ }
7007
+ }
7008
+ function getFirstFocusableDescendant(element) {
7009
+ if (isFocusable(element)) {
7010
+ return checkForFocusableElInShadow(element);
7011
+ }
7012
+ else if (element.childNodes.length > 0) {
7013
+ element.childNodes.forEach((i) => {
7014
+ const childEl = getFirstFocusableDescendant(i);
7015
+ return childEl && checkForFocusableElInShadow(childEl);
7016
+ });
7017
+ }
7018
+ }
7019
+ function hasValidType(file, types) {
7020
+ const acceptedExtensions = types.split(" ");
7021
+ const parts = file.name && file.name.split(".");
7022
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
7023
+ return ext
7024
+ ? acceptedExtensions.includes(ext.toLowerCase())
7025
+ : // fallback: if we couldn't obtain an extension,
7026
+ // validate based on MIME type...
7027
+ !!file.type
7028
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
7029
+ : // ...and if that failed too, accept the file
7030
+ // as it's preferable to accept an invalid file
7031
+ // than refusing a valid one (back-end will take care of what slips through)
7032
+ true;
7033
+ }
7034
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
7035
+ function getAcceptedMimeTypesList(acceptedExtensions) {
7036
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
7037
+ // front end checks are just a convenience to users, independent of security.
7038
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
7039
+ const lookupTable = {
7040
+ aac: ["audio/aac"],
7041
+ abw: ["application/x-abiword"],
7042
+ arc: ["application/x-freearc"],
7043
+ avi: ["video/x-msvideo"],
7044
+ azw: ["application/vnd.amazon.ebook"],
7045
+ bin: ["application/octet-stream"],
7046
+ bmp: ["image/bmp"],
7047
+ bz: ["application/x-bzip"],
7048
+ bz2: ["application/x-bzip2"],
7049
+ csh: ["application/x-csh"],
7050
+ css: ["text/css"],
7051
+ csv: ["text/csv"],
7052
+ doc: ["application/msword"],
7053
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7054
+ eot: ["application/vnd.ms-fontobject"],
7055
+ epub: ["application/epub+zip"],
7056
+ gz: ["application/gzip"],
7057
+ gif: ["image/gif"],
7058
+ htm: ["text/html"],
7059
+ html: ["text/html"],
7060
+ ico: ["image/vnd.microsoft.icon"],
7061
+ ics: ["text/calendar"],
7062
+ jar: ["application/java-archive"],
7063
+ jpeg: ["image/jpeg"],
7064
+ jpg: ["image/jpeg"],
7065
+ js: ["text/javascript"],
7066
+ json: ["application/json"],
7067
+ jsonld: ["application/ld+json"],
7068
+ log: ["text/plain"],
7069
+ mid: ["audio/x-midi"],
7070
+ midi: ["audio/x-midi"],
7071
+ mjs: ["text/javascript"],
7072
+ mp3: ["audio/mpeg"],
7073
+ mpeg: ["video/mpeg"],
7074
+ mpkg: ["application/vnd.apple.installer+xml"],
7075
+ odp: ["application/vnd.oasis.opendocument.presentation"],
7076
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
7077
+ odt: ["application/vnd.oasis.opendocument.text"],
7078
+ oga: ["audio/ogg"],
7079
+ ogv: ["video/ogg"],
7080
+ ogx: ["application/ogg"],
7081
+ opus: ["audio/opus"],
7082
+ otf: ["font/otf"],
7083
+ png: ["image/png"],
7084
+ pdf: ["application/pdf"],
7085
+ php: ["application/php"],
7086
+ ppt: ["application/vnd.ms-powerpoint"],
7087
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7088
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
7089
+ rtf: ["application/rtf"],
7090
+ sh: ["application/x-sh"],
7091
+ svg: ["image/svg+xml"],
7092
+ swf: ["application/x-shockwave-flash"],
7093
+ tar: ["application/x-tar"],
7094
+ tif: ["image/tiff"],
7095
+ tiff: ["image/tiff"],
7096
+ ts: ["video/mp2t"],
7097
+ ttf: ["font/ttf"],
7098
+ txt: ["text/plain"],
7099
+ vsd: ["application/vnd.visio"],
7100
+ wav: ["audio/wav"],
7101
+ weba: ["audio/webm"],
7102
+ webm: ["video/webm"],
7103
+ webp: ["image/webp"],
7104
+ woff: ["font/woff"],
7105
+ woff2: ["font/woff2"],
7106
+ xhtml: ["application/xhtml+xml"],
7107
+ xls: ["application/vnd.ms-excel"],
7108
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7109
+ xml: ["application/xml", "text/xml"],
7110
+ xul: ["application/vnd.mozilla.xul+xml"],
7111
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
7112
+ "3gp": ["video/3gpp", "audio/3gpp"],
7113
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
7114
+ "7z": ["application/x-7z-compressed"],
7115
+ };
7116
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
7117
+ }
7118
+ function snakeCaseToCamelCase(str) {
7119
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
7120
+ if (snakeCaseRegexp.test(str)) {
7121
+ let camelCase = "";
7122
+ let arr = str.split("_");
7123
+ arr.forEach((word, idx) => {
7124
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
7125
+ });
7126
+ return camelCase;
7127
+ }
7128
+ else {
7129
+ return str;
7130
+ }
7131
+ }
7132
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
7133
+ let newIndex = currentIndex;
7134
+ if (direction === "ArrowDown") {
7135
+ newIndex = (currentIndex + 1) % listLength;
7136
+ }
7137
+ if (direction === "ArrowUp") {
7138
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
7139
+ }
7140
+ return newIndex;
7141
+ }
7142
+ function isRelatedTarget(ev, id) {
7143
+ // used for onBlur events to check the element that has been clicked
7144
+ const ids = id.split(" ");
7145
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
7146
+ }
7147
+ function toBool(val) {
7148
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
7149
+ return val == "false" ? false : !!val;
7150
+ }
7151
+ /*
7152
+ * this is going to be needed to solve the extra tabbing on navigator
7153
+ * and for programmatic focus of tabs
7154
+ * Here's a draft, not bug proof, see:
7155
+ * https://stackoverflow.com/a/10730308/3741713
7156
+
7157
+ function getKeyboardFocusableElements(element = document) {
7158
+ 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'));
7159
+ return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
7160
+ }
7161
+
7162
+ export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
7163
+ const els = getKeyboardFocusableElements();
7164
+ const current = els.indexOf(element);
7165
+ return els[current - 1] as HTMLElement;
7166
+ }
7167
+
7168
+ export function getNextKeyboardFocusableElement(element: HTMLElement) {
7169
+ const els = getKeyboardFocusableElements();
7170
+ const current = els.indexOf(element);
7171
+ return els[current + 1] as HTMLElement;
7172
+ }
8617
7173
  */
8618
7174
 
8619
7175
  exports.adjustTooltipPosition = adjustTooltipPosition;