@watermarkinsights/ripple 3.14.1 → 3.15.0-2

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 (263) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-0ea0888f.js → chartFunctions-08494c24.js} +419 -419
  3. package/dist/cjs/{functions-8d3ceccd.js → functions-e1b590e0.js} +528 -446
  4. package/dist/cjs/{global-12a09ffa.js → global-0a41410c.js} +62 -62
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +86 -86
  9. package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
  10. package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
  11. package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
  12. package/dist/cjs/ripple.cjs.js +2 -2
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +329 -335
  14. package/dist/cjs/wm-button.cjs.entry.js +248 -241
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +13 -13
  16. package/dist/cjs/wm-chart.cjs.entry.js +110 -110
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +265 -265
  18. package/dist/cjs/wm-input.cjs.entry.js +134 -134
  19. package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
  20. package/dist/cjs/wm-modal-header.cjs.entry.js +36 -36
  21. package/dist/cjs/wm-modal.cjs.entry.js +163 -163
  22. package/dist/cjs/wm-navigation_3.cjs.entry.js +227 -227
  23. package/dist/cjs/wm-navigator.cjs.entry.js +268 -268
  24. package/dist/cjs/wm-network-uploader.cjs.entry.js +455 -454
  25. package/dist/cjs/wm-option_2.cjs.entry.js +720 -720
  26. package/dist/cjs/wm-pagination.cjs.entry.js +167 -167
  27. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +129 -129
  28. package/dist/cjs/wm-search.cjs.entry.js +232 -232
  29. package/dist/cjs/wm-snackbar.cjs.entry.js +170 -170
  30. package/dist/cjs/wm-tab-item_3.cjs.entry.js +296 -296
  31. package/dist/cjs/wm-tag-input.cjs.entry.js +579 -579
  32. package/dist/cjs/wm-timepicker.cjs.entry.js +383 -383
  33. package/dist/cjs/wm-toggletip.cjs.entry.js +124 -124
  34. package/dist/cjs/wm-uploader.cjs.entry.js +599 -629
  35. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  36. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  37. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  38. package/dist/collection/components/charts/wm-chart/wm-chart.js +328 -328
  39. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +195 -195
  40. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
  41. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  42. package/dist/collection/components/wm-action-menu/wm-action-menu.js +442 -448
  43. package/dist/collection/components/wm-button/wm-button.js +545 -504
  44. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  45. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  46. package/dist/collection/components/wm-input/wm-input.js +423 -423
  47. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  48. package/dist/collection/components/wm-modal/wm-modal-footer.js +136 -136
  49. package/dist/collection/components/wm-modal/wm-modal-header.js +87 -87
  50. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  51. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  52. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  53. package/dist/collection/components/wm-navigation/wm-navigation.js +218 -218
  54. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  55. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  56. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  57. package/dist/collection/components/wm-option/wm-option.js +428 -428
  58. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  59. package/dist/collection/components/wm-search/wm-search.js +480 -480
  60. package/dist/collection/components/wm-select/wm-select.js +1001 -1001
  61. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  62. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  63. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  64. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  65. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  66. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  67. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  68. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +788 -787
  69. package/dist/collection/components/wm-uploader/wm-uploader.js +1043 -1072
  70. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  71. package/dist/collection/dev/scripts.js +20 -20
  72. package/dist/collection/global/__mocks__/functions.js +6 -6
  73. package/dist/collection/global/chartFunctions.js +421 -421
  74. package/dist/collection/global/functions.js +441 -441
  75. package/dist/collection/global/global.js +69 -69
  76. package/dist/collection/global/interfaces.js +49 -49
  77. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  78. package/dist/collection/global/services/http-service.js +50 -50
  79. package/dist/collection/lang/lang.js +5 -5
  80. package/dist/collection/lang/missing.js +43 -43
  81. package/dist/collection/lang/piglatin.js +93 -93
  82. package/dist/esm/{chartFunctions-6f90586d.js → chartFunctions-a310b9d0.js} +419 -419
  83. package/dist/esm/{functions-11c0c4e2.js → functions-b4b62a23.js} +528 -446
  84. package/dist/esm/{global-5abca73e.js → global-e80a0ec8.js} +62 -62
  85. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  86. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  87. package/dist/esm/loader.js +2 -2
  88. package/dist/esm/polyfills/core-js.js +0 -0
  89. package/dist/esm/polyfills/dom.js +0 -0
  90. package/dist/esm/polyfills/es5-html-element.js +0 -0
  91. package/dist/esm/polyfills/index.js +0 -0
  92. package/dist/esm/polyfills/system.js +0 -0
  93. package/dist/esm/priv-chart-popover.entry.js +86 -86
  94. package/dist/esm/priv-datepicker.entry.js +657 -657
  95. package/dist/esm/priv-navigator-button.entry.js +18 -18
  96. package/dist/esm/priv-navigator-item.entry.js +23 -23
  97. package/dist/esm/ripple.js +2 -2
  98. package/dist/esm/wm-action-menu_2.entry.js +329 -335
  99. package/dist/esm/wm-button.entry.js +248 -241
  100. package/dist/esm/wm-chart-slice.entry.js +13 -13
  101. package/dist/esm/wm-chart.entry.js +110 -110
  102. package/dist/esm/wm-datepicker.entry.js +265 -265
  103. package/dist/esm/wm-input.entry.js +134 -134
  104. package/dist/esm/wm-modal-footer.entry.js +33 -33
  105. package/dist/esm/wm-modal-header.entry.js +36 -36
  106. package/dist/esm/wm-modal.entry.js +163 -163
  107. package/dist/esm/wm-navigation_3.entry.js +227 -227
  108. package/dist/esm/wm-navigator.entry.js +268 -268
  109. package/dist/esm/wm-network-uploader.entry.js +455 -454
  110. package/dist/esm/wm-option_2.entry.js +720 -720
  111. package/dist/esm/wm-pagination.entry.js +167 -167
  112. package/dist/esm/wm-progress-indicator_3.entry.js +129 -129
  113. package/dist/esm/wm-search.entry.js +232 -232
  114. package/dist/esm/wm-snackbar.entry.js +170 -170
  115. package/dist/esm/wm-tab-item_3.entry.js +296 -296
  116. package/dist/esm/wm-tag-input.entry.js +579 -579
  117. package/dist/esm/wm-timepicker.entry.js +383 -383
  118. package/dist/esm/wm-toggletip.entry.js +124 -124
  119. package/dist/esm/wm-uploader.entry.js +599 -629
  120. package/dist/esm/wm-wrapper.entry.js +12 -12
  121. package/dist/esm-es5/{chartFunctions-6f90586d.js → chartFunctions-a310b9d0.js} +1 -1
  122. package/dist/esm-es5/functions-b4b62a23.js +1 -0
  123. package/dist/esm-es5/global-e80a0ec8.js +1 -0
  124. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +0 -0
  125. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  126. package/dist/esm-es5/loader.js +1 -1
  127. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  128. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  129. package/dist/esm-es5/ripple.js +1 -1
  130. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  131. package/dist/esm-es5/wm-button.entry.js +1 -1
  132. package/dist/esm-es5/wm-chart.entry.js +1 -1
  133. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  134. package/dist/esm-es5/wm-input.entry.js +1 -1
  135. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  136. package/dist/esm-es5/wm-modal.entry.js +1 -1
  137. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  138. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  139. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  140. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  141. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  142. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  143. package/dist/esm-es5/wm-search.entry.js +1 -1
  144. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  145. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  146. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  147. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  148. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  149. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  150. package/dist/ripple/{p-07ebdcd4.system.entry.js → p-0f08a806.system.entry.js} +1 -1
  151. package/dist/ripple/{p-b793bc6f.system.entry.js → p-1ba2134b.system.entry.js} +1 -1
  152. package/dist/ripple/{p-626d5017.entry.js → p-1c75615f.entry.js} +1 -1
  153. package/dist/ripple/{p-42dbd978.entry.js → p-1cadcfc1.entry.js} +1 -1
  154. package/dist/ripple/{p-b2a9b5d6.system.entry.js → p-2531b343.system.entry.js} +1 -1
  155. package/dist/ripple/p-32da7cdf.entry.js +1 -0
  156. package/dist/ripple/p-375a850f.system.js +1 -0
  157. package/dist/ripple/p-3a71d9a3.entry.js +1 -0
  158. package/dist/ripple/{p-0e22a3a4.entry.js → p-428b8b24.entry.js} +1 -1
  159. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  160. package/dist/ripple/{p-80a00759.entry.js → p-477688c8.entry.js} +1 -1
  161. package/dist/ripple/{p-d927de70.system.entry.js → p-4be49461.system.entry.js} +1 -1
  162. package/dist/ripple/{p-7cb0035a.system.entry.js → p-51b60241.system.entry.js} +1 -1
  163. package/dist/ripple/p-5754e2b8.system.js +1 -0
  164. package/dist/ripple/{p-b5b7c71f.system.js → p-591fae61.system.js} +1 -1
  165. package/dist/ripple/p-5f589556.entry.js +1 -0
  166. package/dist/ripple/{p-b4837126.system.entry.js → p-617b738b.system.entry.js} +1 -1
  167. package/dist/ripple/{p-06012eb7.system.entry.js → p-61e2a39a.system.entry.js} +1 -1
  168. package/dist/ripple/{p-5018f8ae.entry.js → p-65d5f494.entry.js} +1 -1
  169. package/dist/ripple/{p-4f3f7b2b.entry.js → p-6ac734b7.entry.js} +1 -1
  170. package/dist/ripple/p-6d7a6954.js +1 -0
  171. package/dist/ripple/{p-97683ddc.entry.js → p-6ddfada6.entry.js} +1 -1
  172. package/dist/ripple/{p-57a718f0.system.entry.js → p-719864a5.system.entry.js} +1 -1
  173. package/dist/ripple/{p-caef11cc.entry.js → p-73a66a6c.entry.js} +1 -1
  174. package/dist/ripple/{p-c656fcf1.entry.js → p-75346877.entry.js} +1 -1
  175. package/dist/ripple/{p-dfa80ed1.entry.js → p-7833008a.entry.js} +1 -1
  176. package/dist/ripple/{p-08fc668c.system.entry.js → p-79542ae3.system.entry.js} +1 -1
  177. package/dist/ripple/{p-4073ac6a.entry.js → p-79b8e996.entry.js} +1 -1
  178. package/dist/ripple/{p-8b54c589.system.entry.js → p-7a07096b.system.entry.js} +1 -1
  179. package/dist/ripple/{p-c4c21c82.system.entry.js → p-93321f18.system.entry.js} +1 -1
  180. package/dist/ripple/p-96b47a13.js +1 -0
  181. package/dist/ripple/{p-c49ef079.system.entry.js → p-981788dd.system.entry.js} +1 -1
  182. package/dist/ripple/p-990db03b.system.entry.js +1 -0
  183. package/dist/ripple/p-99791f7a.system.js +1 -0
  184. package/dist/ripple/{p-e012273a.entry.js → p-9ad7db55.entry.js} +1 -1
  185. package/dist/ripple/{p-910b6dd5.system.entry.js → p-9caf189d.system.entry.js} +1 -1
  186. package/dist/ripple/{p-313b6073.system.js → p-9d02957d.system.js} +0 -0
  187. package/dist/ripple/{p-ffc34819.system.entry.js → p-9ef524df.system.entry.js} +1 -1
  188. package/dist/ripple/{p-84d0d2ff.system.entry.js → p-9fd29197.system.entry.js} +1 -1
  189. package/dist/ripple/{p-f0d3ceb1.system.entry.js → p-a2f8608f.system.entry.js} +1 -1
  190. package/dist/ripple/{p-dc7e5609.system.entry.js → p-aa35c9dd.system.entry.js} +1 -1
  191. package/dist/ripple/{p-6ffdab0d.system.entry.js → p-ab7ce269.system.entry.js} +1 -1
  192. package/dist/ripple/{p-410687ea.entry.js → p-b5a6aebc.entry.js} +1 -1
  193. package/dist/ripple/{p-4650a83c.system.entry.js → p-b6c197c7.system.entry.js} +1 -1
  194. package/dist/ripple/{p-9c60325b.entry.js → p-c5a3766f.entry.js} +1 -1
  195. package/dist/ripple/{p-2af0b657.system.entry.js → p-c95317b4.system.entry.js} +1 -1
  196. package/dist/ripple/p-ce696630.entry.js +1 -0
  197. package/dist/ripple/{p-17438cd5.entry.js → p-d3326191.entry.js} +1 -1
  198. package/dist/ripple/{p-fe4c1194.system.entry.js → p-e47b10b1.system.entry.js} +1 -1
  199. package/dist/ripple/{p-490dafa4.js → p-eb308bc7.js} +1 -1
  200. package/dist/ripple/{p-4afa52d4.entry.js → p-f5cec3d1.entry.js} +1 -1
  201. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  202. package/dist/ripple/{p-8a2cabf2.entry.js → p-f7c2b508.entry.js} +1 -1
  203. package/dist/ripple/{p-cb357a84.entry.js → p-fcb81a4e.entry.js} +1 -1
  204. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  205. package/dist/ripple/ripple.esm.js +1 -1
  206. package/dist/ripple/ripple.js +1 -1
  207. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
  208. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  209. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +36 -36
  210. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +27 -27
  211. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  212. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  213. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +47 -47
  214. package/dist/types/components/wm-button/wm-button.d.ts +49 -43
  215. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  216. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  217. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  218. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  219. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  220. package/dist/types/components/wm-modal/wm-modal-header.d.ts +11 -11
  221. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  222. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  223. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  224. package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -28
  225. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  226. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  227. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  228. package/dist/types/components/wm-option/wm-option.d.ts +35 -35
  229. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  230. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  231. package/dist/types/components/wm-select/wm-select.d.ts +94 -94
  232. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  233. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  234. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  235. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  236. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  237. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  238. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  239. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  240. package/dist/types/components/wm-uploader/wm-uploader.d.ts +121 -118
  241. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  242. package/dist/types/components.d.ts +28 -24
  243. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  244. package/dist/types/global/chartFunctions.d.ts +29 -29
  245. package/dist/types/global/functions.d.ts +42 -42
  246. package/dist/types/global/global.d.ts +1 -1
  247. package/dist/types/global/interfaces.d.ts +44 -44
  248. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  249. package/dist/types/global/services/http-service.d.ts +4 -4
  250. package/dist/types/lang/lang.d.ts +5 -5
  251. package/package.json +47 -47
  252. package/dist/esm-es5/functions-11c0c4e2.js +0 -1
  253. package/dist/esm-es5/global-5abca73e.js +0 -1
  254. package/dist/ripple/p-37b0a23c.system.js +0 -1
  255. package/dist/ripple/p-3e875e87.system.entry.js +0 -1
  256. package/dist/ripple/p-42bf2cd4.system.js +0 -1
  257. package/dist/ripple/p-70d0e993.js +0 -1
  258. package/dist/ripple/p-80b62707.entry.js +0 -1
  259. package/dist/ripple/p-d2a11410.entry.js +0 -1
  260. package/dist/ripple/p-db899686.system.js +0 -1
  261. package/dist/ripple/p-e2d5f8bd.js +0 -1
  262. package/dist/ripple/p-e4cb8aad.entry.js +0 -1
  263. package/dist/ripple/p-fa632547.entry.js +0 -1
@@ -600,6 +600,47 @@ const en = {
600
600
  type: 0,
601
601
  value: "Make a selection"
602
602
  }
603
+ ],
604
+ "select.noSearchResults": [
605
+ {
606
+ type: 0,
607
+ value: "No results found. Please try your search again."
608
+ }
609
+ ],
610
+ "select.searchPlaceholder": [
611
+ {
612
+ type: 0,
613
+ value: "Search"
614
+ }
615
+ ],
616
+ "select.searchResultsFound": [
617
+ {
618
+ offset: 0,
619
+ options: {
620
+ one: {
621
+ value: [
622
+ {
623
+ type: 0,
624
+ value: "1 option found"
625
+ }
626
+ ]
627
+ },
628
+ other: {
629
+ value: [
630
+ {
631
+ type: 7
632
+ },
633
+ {
634
+ type: 0,
635
+ value: " options found"
636
+ }
637
+ ]
638
+ }
639
+ },
640
+ pluralType: "cardinal",
641
+ type: 6,
642
+ value: "numResults"
643
+ }
603
644
  ],
604
645
  "tagInput.existingOptions": [
605
646
  {
@@ -886,16 +927,16 @@ const en = {
886
927
  value: "Mb"
887
928
  }
888
929
  ],
889
- "uploader.fileUploadExceeded": [
930
+ "uploader.fileUploadLimitExceeded": [
890
931
  {
891
932
  type: 0,
892
- value: "The number of selected files exceeds the limit."
933
+ value: "Upload unsuccessful because file selection would exceed the maximum number of files"
893
934
  }
894
935
  ],
895
- "uploader.fileUploadLimit": [
936
+ "uploader.fileUploadLimitReached": [
896
937
  {
897
938
  type: 0,
898
- value: "Upload unsuccessful because file selection would exceed the maximum number of files"
939
+ value: "The maximum number of files has been reached"
899
940
  }
900
941
  ],
901
942
  "uploader.filesAdded": [
@@ -3406,6 +3447,47 @@ const pig = {
3406
3447
  type: 0,
3407
3448
  value: "Akemay ayay electionsay"
3408
3449
  }
3450
+ ],
3451
+ "select.noSearchResults": [
3452
+ {
3453
+ type: 0,
3454
+ value: "Onay esultsray oundfay. Easeplay tryay ouryay earchsay againyay."
3455
+ }
3456
+ ],
3457
+ "select.searchPlaceholder": [
3458
+ {
3459
+ type: 0,
3460
+ value: "Earchsay"
3461
+ }
3462
+ ],
3463
+ "select.searchResultsFound": [
3464
+ {
3465
+ offset: 0,
3466
+ options: {
3467
+ one: {
3468
+ value: [
3469
+ {
3470
+ type: 0,
3471
+ value: "1 optionyay oundfay"
3472
+ }
3473
+ ]
3474
+ },
3475
+ other: {
3476
+ value: [
3477
+ {
3478
+ type: 7
3479
+ },
3480
+ {
3481
+ type: 0,
3482
+ value: " optionsyay oundfay"
3483
+ }
3484
+ ]
3485
+ }
3486
+ },
3487
+ pluralType: "cardinal",
3488
+ type: 6,
3489
+ value: "numResults"
3490
+ }
3409
3491
  ],
3410
3492
  "tagInput.existingOptions": [
3411
3493
  {
@@ -3692,16 +3774,16 @@ const pig = {
3692
3774
  value: "Mbay"
3693
3775
  }
3694
3776
  ],
3695
- "uploader.fileUploadExceeded": [
3777
+ "uploader.fileUploadLimitExceeded": [
3696
3778
  {
3697
3779
  type: 0,
3698
- value: "Ethay umbernay ofyay electedsay ilesfay exceedsyay ethay imitlay."
3780
+ value: "Uploadyay unsuccessfulyay ecausebay ilefay electionsay ouldway exceedyay ethay aximummay umbernay ofyay ilesfay"
3699
3781
  }
3700
3782
  ],
3701
- "uploader.fileUploadLimit": [
3783
+ "uploader.fileUploadLimitReached": [
3702
3784
  {
3703
3785
  type: 0,
3704
- value: "Uploadyay unsuccessfulyay ecausebay ilefay electionsay ouldway exceedyay ethay aximummay umbernay ofyay ilesfay"
3786
+ value: "Ethay aximummay umbernay ofyay ilesfay ashay eenbay eachedray"
3705
3787
  }
3706
3788
  ],
3707
3789
  "uploader.filesAdded": [
@@ -8387,444 +8469,444 @@ function createIntl(config, cache) {
8387
8469
  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) });
8388
8470
  }
8389
8471
 
8390
- const DEFAULT_LANGUAGE = "en";
8391
- function getBrowserLang() {
8392
- const langAttr = document.documentElement.getAttribute("lang");
8393
- if (!!langAttr) {
8394
- return langAttr;
8395
- }
8396
- else if (window.navigator && window.navigator.language) {
8397
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
8398
- return lang.slice(0, 2);
8399
- }
8400
- else {
8401
- return DEFAULT_LANGUAGE;
8402
- }
8403
- }
8404
- // prevents memory leak
8405
- const cache = createIntlCache();
8406
- const locale = getBrowserLang();
8407
- const intl = createIntl({
8408
- locale: locale,
8409
- defaultLocale: "en",
8410
- messages: lang[locale] || en,
8411
- }, cache);
8412
- function generateId() {
8413
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
8414
- }
8415
- // limits how many times a function fires
8416
- // use when the function should run periodically, but not too often (e.g. window resize)
8417
- function throttle(fn, wait) {
8418
- let timeout;
8419
- let shouldWait = false;
8420
- return function () {
8421
- const context = this;
8422
- if (!shouldWait) {
8423
- fn.apply(context, arguments);
8424
- shouldWait = true;
8425
- clearTimeout(timeout);
8426
- timeout = setTimeout(function () {
8427
- shouldWait = false;
8428
- }, wait);
8429
- }
8430
- };
8431
- }
8432
- // waits until it hasn't been called for [timeout] ms.
8433
- // use when the function should run only after something (event) is done firing
8434
- function debounce(fn, wait) {
8435
- let timeout;
8436
- return function () {
8437
- const context = this;
8438
- const functionCall = () => fn.apply(context, arguments);
8439
- clearTimeout(timeout);
8440
- timeout = setTimeout(functionCall, wait);
8441
- };
8442
- }
8443
- function getTextDir() {
8444
- const dir = document.querySelector("html").getAttribute("dir");
8445
- return dir ? dir.toLowerCase() : "";
8446
- }
8447
- function getPosition(el) {
8448
- const coords = el.getBoundingClientRect();
8449
- let x = coords.x;
8450
- let y = coords.y;
8451
- // Edge doesn't have x and y
8452
- if (!x) {
8453
- if (getTextDir() === "rtl") {
8454
- x = coords.right;
8455
- }
8456
- else {
8457
- x = coords.left;
8458
- }
8459
- y = coords.top;
8460
- }
8461
- return { x, y };
8462
- }
8463
- function findParentWithScrollbar(el) {
8464
- while (!!el) {
8465
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
8466
- return el;
8467
- }
8468
- el = el.parentElement;
8469
- }
8470
- }
8471
- function findParentWithHiddenOverflow(el) {
8472
- while (!!el) {
8473
- if (window.getComputedStyle(el).overflowY !== "visible") {
8474
- return el;
8475
- }
8476
- el = el.parentElement;
8477
- }
8478
- }
8479
- function getClosableElementMeasurements(fixedEl, closableEl) {
8480
- const parent = findParentWithHiddenOverflow(fixedEl);
8481
- // if parent is not found, measurements are checked against the viewport
8482
- return {
8483
- closableElHeight: closableEl.clientHeight,
8484
- closableElWidth: closableEl.clientWidth,
8485
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8486
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8487
- spaceAbove: parent
8488
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
8489
- : fixedEl.getBoundingClientRect().top,
8490
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8491
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8492
- spaceBelow: parent
8493
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
8494
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
8495
- spaceLeft: parent
8496
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
8497
- : fixedEl.getBoundingClientRect().left,
8498
- spaceRight: parent
8499
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
8500
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
8501
- };
8502
- }
8503
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
8504
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8505
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8506
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8507
- ) {
8508
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8509
- //we want to open up only if there's not enough space below AND there is enough space above
8510
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
8511
- return openUp;
8512
- }
8513
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
8514
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8515
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8516
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8517
- ) {
8518
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8519
- //we want to open up only if there's not enough space below AND there is enough space above
8520
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
8521
- return openDown;
8522
- }
8523
- function shouldShiftRight(fixedEl, closableEl) {
8524
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8525
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
8526
- return needsSpaceLeft;
8527
- }
8528
- function shouldShiftLeft(fixedEl, closableEl) {
8529
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8530
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
8531
- return needsSpaceRight;
8532
- }
8533
- function adjustTooltipPlacement(tPos, el, tooltipEl) {
8534
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
8535
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
8536
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
8537
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
8538
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
8539
- // a tooltip should never be closer than 24px to the edge of a screen
8540
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
8541
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
8542
- const swapAbove = (position) => {
8543
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
8544
- };
8545
- const swapBelow = (position) => {
8546
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
8547
- };
8548
- const swapLeft = (position, centeredPosition) => {
8549
- if (!enoughSpaceLeft && enoughSpaceRight) {
8550
- position = position.replace("left", "right");
8551
- }
8552
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
8553
- position = centeredPosition;
8554
- }
8555
- return position;
8556
- };
8557
- const swapRight = (position, centeredPosition) => {
8558
- if (!enoughSpaceRight && enoughSpaceLeft) {
8559
- position = position.replace("right", "left");
8560
- }
8561
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
8562
- position = centeredPosition;
8563
- }
8564
- return position;
8565
- };
8566
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
8567
- switch (tPos) {
8568
- case "left":
8569
- tPos = swapLeft(tPos, "bottom");
8570
- case "right":
8571
- tPos = swapRight(tPos, "bottom");
8572
- case "top-left":
8573
- tPos = swapLeft(tPos, "top");
8574
- tPos = swapAbove(tPos);
8575
- case "top-right":
8576
- tPos = swapRight(tPos, "top");
8577
- tPos = swapAbove(tPos);
8578
- case "bottom-left":
8579
- tPos = swapLeft(tPos, "bottom");
8580
- tPos = swapBelow(tPos);
8581
- case "bottom-right":
8582
- tPos = swapRight(tPos, "bottom");
8583
- tPos = swapBelow(tPos);
8584
- case "top":
8585
- tPos = swapAbove(tPos);
8586
- case "bottom":
8587
- tPos = swapBelow(tPos);
8588
- }
8589
- return tPos;
8590
- }
8591
- function hasRoomRight(x, spaceNeeded) {
8592
- let horizOffset = 0;
8593
- // if (getTextDir() === "ltr") {
8594
- if (x.type === "click") {
8595
- // if it's a mouse event, deal with mouse coords
8596
- horizOffset = x.clientX;
8597
- // if it's a focus event, the offset is 0
8598
- }
8599
- else if (x.type === "focus") {
8600
- horizOffset = 0;
8601
- }
8602
- else {
8603
- // otherwise an element was passed, calculate how far it is from the edge of the window
8604
- let el = x; // re-assignment is for clarity
8605
- while (el) {
8606
- if (el.tagName == "BODY") {
8607
- // deal with browser quirks with body/window/document and page scroll
8608
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
8609
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
8610
- }
8611
- else {
8612
- // for all other non-BODY elements
8613
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
8614
- }
8615
- el = el.offsetParent;
8616
- }
8617
- // }
8618
- }
8619
- return window.innerWidth - horizOffset >= spaceNeeded;
8620
- }
8621
- function checkForActiveElInShadow(element) {
8622
- while (element && element.shadowRoot) {
8623
- element = element.shadowRoot.activeElement;
8624
- }
8625
- return element;
8626
- }
8627
- function checkForFocusableElInShadow(element) {
8628
- const selectors = [
8629
- "button",
8630
- "a",
8631
- "input",
8632
- "select",
8633
- "textarea",
8634
- "wm-button",
8635
- "wm-search",
8636
- "wm-select",
8637
- "wm-action-menu",
8638
- "wm-tab-item",
8639
- "wm-datepicker",
8640
- ];
8641
- let focusableEl = element;
8642
- selectors.forEach((selector) => {
8643
- if (focusableEl && focusableEl.shadowRoot) {
8644
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
8645
- if (elInShadow) {
8646
- if (selector.startsWith("wm-")) {
8647
- focusableEl = checkForFocusableElInShadow(elInShadow);
8648
- }
8649
- else {
8650
- focusableEl = elInShadow;
8651
- }
8652
- }
8653
- }
8654
- });
8655
- return focusableEl;
8656
- }
8657
- function isFocusable(element) {
8658
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
8659
- return true;
8660
- }
8661
- if (element.disabled) {
8662
- return false;
8663
- }
8664
- switch (element.nodeName) {
8665
- case "A":
8666
- return !!element.href && element.rel != "ignore";
8667
- case "INPUT":
8668
- return element.type != "hidden" && element.type != "file";
8669
- case "BUTTON":
8670
- case "SELECT":
8671
- case "TEXTAREA":
8672
- case "WM-BUTTON":
8673
- case "WM-SELECT":
8674
- case "WM-ACTION-MENU":
8675
- case "WM-DATEPICKER":
8676
- case "WM-TIMEPICKER":
8677
- case "WM-INPUT":
8678
- case "WM-TAG-INPUT":
8679
- case "WM-TAB-ITEM":
8680
- case "WM-SEARCH":
8681
- return true;
8682
- default:
8683
- return false;
8684
- }
8685
- }
8686
- function getFirstFocusableDescendant(element) {
8687
- if (isFocusable(element)) {
8688
- return checkForFocusableElInShadow(element);
8689
- }
8690
- else if (element.childNodes.length > 0) {
8691
- element.childNodes.forEach((i) => {
8692
- const childEl = getFirstFocusableDescendant(i);
8693
- return childEl && checkForFocusableElInShadow(childEl);
8694
- });
8695
- }
8696
- }
8697
- function hasValidType(file, types) {
8698
- const acceptedExtensions = types.split(" ");
8699
- const parts = file.name && file.name.split(".");
8700
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
8701
- return ext
8702
- ? acceptedExtensions.includes(ext.toLowerCase())
8703
- : // fallback: if we couldn't obtain an extension,
8704
- // validate based on MIME type...
8705
- !!file.type
8706
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
8707
- : // ...and if that failed too, accept the file
8708
- // as it's preferable to accept an invalid file
8709
- // than refusing a valid one (back-end will take care of what slips through)
8710
- true;
8711
- }
8712
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
8713
- function getAcceptedMimeTypesList(acceptedExtensions) {
8714
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
8715
- // front end checks are just a convenience to users, independent of security.
8716
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
8717
- const lookupTable = {
8718
- aac: ["audio/aac"],
8719
- abw: ["application/x-abiword"],
8720
- arc: ["application/x-freearc"],
8721
- avi: ["video/x-msvideo"],
8722
- azw: ["application/vnd.amazon.ebook"],
8723
- bin: ["application/octet-stream"],
8724
- bmp: ["image/bmp"],
8725
- bz: ["application/x-bzip"],
8726
- bz2: ["application/x-bzip2"],
8727
- csh: ["application/x-csh"],
8728
- css: ["text/css"],
8729
- csv: ["text/csv"],
8730
- doc: ["application/msword"],
8731
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
8732
- eot: ["application/vnd.ms-fontobject"],
8733
- epub: ["application/epub+zip"],
8734
- gz: ["application/gzip"],
8735
- gif: ["image/gif"],
8736
- htm: ["text/html"],
8737
- html: ["text/html"],
8738
- ico: ["image/vnd.microsoft.icon"],
8739
- ics: ["text/calendar"],
8740
- jar: ["application/java-archive"],
8741
- jpeg: ["image/jpeg"],
8742
- jpg: ["image/jpeg"],
8743
- js: ["text/javascript"],
8744
- json: ["application/json"],
8745
- jsonld: ["application/ld+json"],
8746
- log: ["text/plain"],
8747
- mid: ["audio/x-midi"],
8748
- midi: ["audio/x-midi"],
8749
- mjs: ["text/javascript"],
8750
- mp3: ["audio/mpeg"],
8751
- mpeg: ["video/mpeg"],
8752
- mpkg: ["application/vnd.apple.installer+xml"],
8753
- odp: ["application/vnd.oasis.opendocument.presentation"],
8754
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
8755
- odt: ["application/vnd.oasis.opendocument.text"],
8756
- oga: ["audio/ogg"],
8757
- ogv: ["video/ogg"],
8758
- ogx: ["application/ogg"],
8759
- opus: ["audio/opus"],
8760
- otf: ["font/otf"],
8761
- png: ["image/png"],
8762
- pdf: ["application/pdf"],
8763
- php: ["application/php"],
8764
- ppt: ["application/vnd.ms-powerpoint"],
8765
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
8766
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
8767
- rtf: ["application/rtf"],
8768
- sh: ["application/x-sh"],
8769
- svg: ["image/svg+xml"],
8770
- swf: ["application/x-shockwave-flash"],
8771
- tar: ["application/x-tar"],
8772
- tif: ["image/tiff"],
8773
- tiff: ["image/tiff"],
8774
- ts: ["video/mp2t"],
8775
- ttf: ["font/ttf"],
8776
- txt: ["text/plain"],
8777
- vsd: ["application/vnd.visio"],
8778
- wav: ["audio/wav"],
8779
- weba: ["audio/webm"],
8780
- webm: ["video/webm"],
8781
- webp: ["image/webp"],
8782
- woff: ["font/woff"],
8783
- woff2: ["font/woff2"],
8784
- xhtml: ["application/xhtml+xml"],
8785
- xls: ["application/vnd.ms-excel"],
8786
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
8787
- xml: ["application/xml", "text/xml"],
8788
- xul: ["application/vnd.mozilla.xul+xml"],
8789
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
8790
- "3gp": ["video/3gpp", "audio/3gpp"],
8791
- "3g2": ["video/3gpp2", "audio/3gpp2"],
8792
- "7z": ["application/x-7z-compressed"],
8793
- };
8794
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
8795
- }
8796
- function snakeCaseToCamelCase(str) {
8797
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
8798
- if (snakeCaseRegexp.test(str)) {
8799
- let camelCase = "";
8800
- let arr = str.split("_");
8801
- arr.forEach((word, idx) => {
8802
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
8803
- });
8804
- return camelCase;
8805
- }
8806
- else {
8807
- return str;
8808
- }
8809
- }
8810
- function getNewIndexToFocus(currentIndex, direction, listLength) {
8811
- let newIndex = currentIndex;
8812
- if (direction === "ArrowDown") {
8813
- newIndex = (currentIndex + 1) % listLength;
8814
- }
8815
- if (direction === "ArrowUp") {
8816
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
8817
- }
8818
- return newIndex;
8819
- }
8820
- function isRelatedTarget(ev, id) {
8821
- // used for onBlur events to check the element that has been clicked
8822
- const ids = id.split(" ");
8823
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
8824
- }
8825
- function toBool(val) {
8826
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
8827
- return val == "false" ? false : !!val;
8472
+ const DEFAULT_LANGUAGE = "en";
8473
+ function getBrowserLang() {
8474
+ const langAttr = document.documentElement.getAttribute("lang");
8475
+ if (!!langAttr) {
8476
+ return langAttr;
8477
+ }
8478
+ else if (window.navigator && window.navigator.language) {
8479
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
8480
+ return lang.slice(0, 2);
8481
+ }
8482
+ else {
8483
+ return DEFAULT_LANGUAGE;
8484
+ }
8485
+ }
8486
+ // prevents memory leak
8487
+ const cache = createIntlCache();
8488
+ const locale = getBrowserLang();
8489
+ const intl = createIntl({
8490
+ locale: locale,
8491
+ defaultLocale: "en",
8492
+ messages: lang[locale] || en,
8493
+ }, cache);
8494
+ function generateId() {
8495
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
8496
+ }
8497
+ // limits how many times a function fires
8498
+ // use when the function should run periodically, but not too often (e.g. window resize)
8499
+ function throttle(fn, wait) {
8500
+ let timeout;
8501
+ let shouldWait = false;
8502
+ return function () {
8503
+ const context = this;
8504
+ if (!shouldWait) {
8505
+ fn.apply(context, arguments);
8506
+ shouldWait = true;
8507
+ clearTimeout(timeout);
8508
+ timeout = setTimeout(function () {
8509
+ shouldWait = false;
8510
+ }, wait);
8511
+ }
8512
+ };
8513
+ }
8514
+ // waits until it hasn't been called for [timeout] ms.
8515
+ // use when the function should run only after something (event) is done firing
8516
+ function debounce(fn, wait) {
8517
+ let timeout;
8518
+ return function () {
8519
+ const context = this;
8520
+ const functionCall = () => fn.apply(context, arguments);
8521
+ clearTimeout(timeout);
8522
+ timeout = setTimeout(functionCall, wait);
8523
+ };
8524
+ }
8525
+ function getTextDir() {
8526
+ const dir = document.querySelector("html").getAttribute("dir");
8527
+ return dir ? dir.toLowerCase() : "";
8528
+ }
8529
+ function getPosition(el) {
8530
+ const coords = el.getBoundingClientRect();
8531
+ let x = coords.x;
8532
+ let y = coords.y;
8533
+ // Edge doesn't have x and y
8534
+ if (!x) {
8535
+ if (getTextDir() === "rtl") {
8536
+ x = coords.right;
8537
+ }
8538
+ else {
8539
+ x = coords.left;
8540
+ }
8541
+ y = coords.top;
8542
+ }
8543
+ return { x, y };
8544
+ }
8545
+ function findParentWithScrollbar(el) {
8546
+ while (!!el) {
8547
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
8548
+ return el;
8549
+ }
8550
+ el = el.parentElement;
8551
+ }
8552
+ }
8553
+ function findParentWithHiddenOverflow(el) {
8554
+ while (!!el) {
8555
+ if (window.getComputedStyle(el).overflowY !== "visible") {
8556
+ return el;
8557
+ }
8558
+ el = el.parentElement;
8559
+ }
8560
+ }
8561
+ function getClosableElementMeasurements(fixedEl, closableEl) {
8562
+ const parent = findParentWithHiddenOverflow(fixedEl);
8563
+ // if parent is not found, measurements are checked against the viewport
8564
+ return {
8565
+ closableElHeight: closableEl.clientHeight,
8566
+ closableElWidth: closableEl.clientWidth,
8567
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8568
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
8569
+ spaceAbove: parent
8570
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
8571
+ : fixedEl.getBoundingClientRect().top,
8572
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8573
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
8574
+ spaceBelow: parent
8575
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
8576
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
8577
+ spaceLeft: parent
8578
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
8579
+ : fixedEl.getBoundingClientRect().left,
8580
+ spaceRight: parent
8581
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
8582
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
8583
+ };
8584
+ }
8585
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
8586
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8587
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8588
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8589
+ ) {
8590
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8591
+ //we want to open up only if there's not enough space below AND there is enough space above
8592
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
8593
+ return openUp;
8594
+ }
8595
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
8596
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8597
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8598
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8599
+ ) {
8600
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8601
+ //we want to open up only if there's not enough space below AND there is enough space above
8602
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
8603
+ return openDown;
8604
+ }
8605
+ function shouldShiftRight(fixedEl, closableEl) {
8606
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8607
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
8608
+ return needsSpaceLeft;
8609
+ }
8610
+ function shouldShiftLeft(fixedEl, closableEl) {
8611
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8612
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
8613
+ return needsSpaceRight;
8614
+ }
8615
+ function adjustTooltipPlacement(tPos, el, tooltipEl) {
8616
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
8617
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
8618
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
8619
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
8620
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
8621
+ // a tooltip should never be closer than 24px to the edge of a screen
8622
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
8623
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
8624
+ const swapAbove = (position) => {
8625
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
8626
+ };
8627
+ const swapBelow = (position) => {
8628
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
8629
+ };
8630
+ const swapLeft = (position, centeredPosition) => {
8631
+ if (!enoughSpaceLeft && enoughSpaceRight) {
8632
+ position = position.replace("left", "right");
8633
+ }
8634
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
8635
+ position = centeredPosition;
8636
+ }
8637
+ return position;
8638
+ };
8639
+ const swapRight = (position, centeredPosition) => {
8640
+ if (!enoughSpaceRight && enoughSpaceLeft) {
8641
+ position = position.replace("right", "left");
8642
+ }
8643
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
8644
+ position = centeredPosition;
8645
+ }
8646
+ return position;
8647
+ };
8648
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
8649
+ switch (tPos) {
8650
+ case "left":
8651
+ tPos = swapLeft(tPos, "bottom");
8652
+ case "right":
8653
+ tPos = swapRight(tPos, "bottom");
8654
+ case "top-left":
8655
+ tPos = swapLeft(tPos, "top");
8656
+ tPos = swapAbove(tPos);
8657
+ case "top-right":
8658
+ tPos = swapRight(tPos, "top");
8659
+ tPos = swapAbove(tPos);
8660
+ case "bottom-left":
8661
+ tPos = swapLeft(tPos, "bottom");
8662
+ tPos = swapBelow(tPos);
8663
+ case "bottom-right":
8664
+ tPos = swapRight(tPos, "bottom");
8665
+ tPos = swapBelow(tPos);
8666
+ case "top":
8667
+ tPos = swapAbove(tPos);
8668
+ case "bottom":
8669
+ tPos = swapBelow(tPos);
8670
+ }
8671
+ return tPos;
8672
+ }
8673
+ function hasRoomRight(x, spaceNeeded) {
8674
+ let horizOffset = 0;
8675
+ // if (getTextDir() === "ltr") {
8676
+ if (x.type === "click") {
8677
+ // if it's a mouse event, deal with mouse coords
8678
+ horizOffset = x.clientX;
8679
+ // if it's a focus event, the offset is 0
8680
+ }
8681
+ else if (x.type === "focus") {
8682
+ horizOffset = 0;
8683
+ }
8684
+ else {
8685
+ // otherwise an element was passed, calculate how far it is from the edge of the window
8686
+ let el = x; // re-assignment is for clarity
8687
+ while (el) {
8688
+ if (el.tagName == "BODY") {
8689
+ // deal with browser quirks with body/window/document and page scroll
8690
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
8691
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
8692
+ }
8693
+ else {
8694
+ // for all other non-BODY elements
8695
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
8696
+ }
8697
+ el = el.offsetParent;
8698
+ }
8699
+ // }
8700
+ }
8701
+ return window.innerWidth - horizOffset >= spaceNeeded;
8702
+ }
8703
+ function checkForActiveElInShadow(element) {
8704
+ while (element && element.shadowRoot) {
8705
+ element = element.shadowRoot.activeElement;
8706
+ }
8707
+ return element;
8708
+ }
8709
+ function checkForFocusableElInShadow(element) {
8710
+ const selectors = [
8711
+ "button",
8712
+ "a",
8713
+ "input",
8714
+ "select",
8715
+ "textarea",
8716
+ "wm-button",
8717
+ "wm-search",
8718
+ "wm-select",
8719
+ "wm-action-menu",
8720
+ "wm-tab-item",
8721
+ "wm-datepicker",
8722
+ ];
8723
+ let focusableEl = element;
8724
+ selectors.forEach((selector) => {
8725
+ if (focusableEl && focusableEl.shadowRoot) {
8726
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
8727
+ if (elInShadow) {
8728
+ if (selector.startsWith("wm-")) {
8729
+ focusableEl = checkForFocusableElInShadow(elInShadow);
8730
+ }
8731
+ else {
8732
+ focusableEl = elInShadow;
8733
+ }
8734
+ }
8735
+ }
8736
+ });
8737
+ return focusableEl;
8738
+ }
8739
+ function isFocusable(element) {
8740
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
8741
+ return true;
8742
+ }
8743
+ if (element.disabled) {
8744
+ return false;
8745
+ }
8746
+ switch (element.nodeName) {
8747
+ case "A":
8748
+ return !!element.href && element.rel != "ignore";
8749
+ case "INPUT":
8750
+ return element.type != "hidden" && element.type != "file";
8751
+ case "BUTTON":
8752
+ case "SELECT":
8753
+ case "TEXTAREA":
8754
+ case "WM-BUTTON":
8755
+ case "WM-SELECT":
8756
+ case "WM-ACTION-MENU":
8757
+ case "WM-DATEPICKER":
8758
+ case "WM-TIMEPICKER":
8759
+ case "WM-INPUT":
8760
+ case "WM-TAG-INPUT":
8761
+ case "WM-TAB-ITEM":
8762
+ case "WM-SEARCH":
8763
+ return true;
8764
+ default:
8765
+ return false;
8766
+ }
8767
+ }
8768
+ function getFirstFocusableDescendant(element) {
8769
+ if (isFocusable(element)) {
8770
+ return checkForFocusableElInShadow(element);
8771
+ }
8772
+ else if (element.childNodes.length > 0) {
8773
+ element.childNodes.forEach((i) => {
8774
+ const childEl = getFirstFocusableDescendant(i);
8775
+ return childEl && checkForFocusableElInShadow(childEl);
8776
+ });
8777
+ }
8778
+ }
8779
+ function hasValidType(file, types) {
8780
+ const acceptedExtensions = types.split(" ");
8781
+ const parts = file.name && file.name.split(".");
8782
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
8783
+ return ext
8784
+ ? acceptedExtensions.includes(ext.toLowerCase())
8785
+ : // fallback: if we couldn't obtain an extension,
8786
+ // validate based on MIME type...
8787
+ !!file.type
8788
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
8789
+ : // ...and if that failed too, accept the file
8790
+ // as it's preferable to accept an invalid file
8791
+ // than refusing a valid one (back-end will take care of what slips through)
8792
+ true;
8793
+ }
8794
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
8795
+ function getAcceptedMimeTypesList(acceptedExtensions) {
8796
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
8797
+ // front end checks are just a convenience to users, independent of security.
8798
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
8799
+ const lookupTable = {
8800
+ aac: ["audio/aac"],
8801
+ abw: ["application/x-abiword"],
8802
+ arc: ["application/x-freearc"],
8803
+ avi: ["video/x-msvideo"],
8804
+ azw: ["application/vnd.amazon.ebook"],
8805
+ bin: ["application/octet-stream"],
8806
+ bmp: ["image/bmp"],
8807
+ bz: ["application/x-bzip"],
8808
+ bz2: ["application/x-bzip2"],
8809
+ csh: ["application/x-csh"],
8810
+ css: ["text/css"],
8811
+ csv: ["text/csv"],
8812
+ doc: ["application/msword"],
8813
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
8814
+ eot: ["application/vnd.ms-fontobject"],
8815
+ epub: ["application/epub+zip"],
8816
+ gz: ["application/gzip"],
8817
+ gif: ["image/gif"],
8818
+ htm: ["text/html"],
8819
+ html: ["text/html"],
8820
+ ico: ["image/vnd.microsoft.icon"],
8821
+ ics: ["text/calendar"],
8822
+ jar: ["application/java-archive"],
8823
+ jpeg: ["image/jpeg"],
8824
+ jpg: ["image/jpeg"],
8825
+ js: ["text/javascript"],
8826
+ json: ["application/json"],
8827
+ jsonld: ["application/ld+json"],
8828
+ log: ["text/plain"],
8829
+ mid: ["audio/x-midi"],
8830
+ midi: ["audio/x-midi"],
8831
+ mjs: ["text/javascript"],
8832
+ mp3: ["audio/mpeg"],
8833
+ mpeg: ["video/mpeg"],
8834
+ mpkg: ["application/vnd.apple.installer+xml"],
8835
+ odp: ["application/vnd.oasis.opendocument.presentation"],
8836
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
8837
+ odt: ["application/vnd.oasis.opendocument.text"],
8838
+ oga: ["audio/ogg"],
8839
+ ogv: ["video/ogg"],
8840
+ ogx: ["application/ogg"],
8841
+ opus: ["audio/opus"],
8842
+ otf: ["font/otf"],
8843
+ png: ["image/png"],
8844
+ pdf: ["application/pdf"],
8845
+ php: ["application/php"],
8846
+ ppt: ["application/vnd.ms-powerpoint"],
8847
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
8848
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
8849
+ rtf: ["application/rtf"],
8850
+ sh: ["application/x-sh"],
8851
+ svg: ["image/svg+xml"],
8852
+ swf: ["application/x-shockwave-flash"],
8853
+ tar: ["application/x-tar"],
8854
+ tif: ["image/tiff"],
8855
+ tiff: ["image/tiff"],
8856
+ ts: ["video/mp2t"],
8857
+ ttf: ["font/ttf"],
8858
+ txt: ["text/plain"],
8859
+ vsd: ["application/vnd.visio"],
8860
+ wav: ["audio/wav"],
8861
+ weba: ["audio/webm"],
8862
+ webm: ["video/webm"],
8863
+ webp: ["image/webp"],
8864
+ woff: ["font/woff"],
8865
+ woff2: ["font/woff2"],
8866
+ xhtml: ["application/xhtml+xml"],
8867
+ xls: ["application/vnd.ms-excel"],
8868
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
8869
+ xml: ["application/xml", "text/xml"],
8870
+ xul: ["application/vnd.mozilla.xul+xml"],
8871
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
8872
+ "3gp": ["video/3gpp", "audio/3gpp"],
8873
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
8874
+ "7z": ["application/x-7z-compressed"],
8875
+ };
8876
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
8877
+ }
8878
+ function snakeCaseToCamelCase(str) {
8879
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
8880
+ if (snakeCaseRegexp.test(str)) {
8881
+ let camelCase = "";
8882
+ let arr = str.split("_");
8883
+ arr.forEach((word, idx) => {
8884
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
8885
+ });
8886
+ return camelCase;
8887
+ }
8888
+ else {
8889
+ return str;
8890
+ }
8891
+ }
8892
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
8893
+ let newIndex = currentIndex;
8894
+ if (direction === "ArrowDown") {
8895
+ newIndex = (currentIndex + 1) % listLength;
8896
+ }
8897
+ if (direction === "ArrowUp") {
8898
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
8899
+ }
8900
+ return newIndex;
8901
+ }
8902
+ function isRelatedTarget(ev, id) {
8903
+ // used for onBlur events to check the element that has been clicked
8904
+ const ids = id.split(" ");
8905
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
8906
+ }
8907
+ function toBool(val) {
8908
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
8909
+ return val == "false" ? false : !!val;
8828
8910
  }
8829
8911
 
8830
8912
  export { adjustTooltipPlacement as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q, throttle as r, snakeCaseToCamelCase as s, toBool as t, hasRoomRight as u };