@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
@@ -602,6 +602,47 @@ const en = {
602
602
  type: 0,
603
603
  value: "Make a selection"
604
604
  }
605
+ ],
606
+ "select.noSearchResults": [
607
+ {
608
+ type: 0,
609
+ value: "No results found. Please try your search again."
610
+ }
611
+ ],
612
+ "select.searchPlaceholder": [
613
+ {
614
+ type: 0,
615
+ value: "Search"
616
+ }
617
+ ],
618
+ "select.searchResultsFound": [
619
+ {
620
+ offset: 0,
621
+ options: {
622
+ one: {
623
+ value: [
624
+ {
625
+ type: 0,
626
+ value: "1 option found"
627
+ }
628
+ ]
629
+ },
630
+ other: {
631
+ value: [
632
+ {
633
+ type: 7
634
+ },
635
+ {
636
+ type: 0,
637
+ value: " options found"
638
+ }
639
+ ]
640
+ }
641
+ },
642
+ pluralType: "cardinal",
643
+ type: 6,
644
+ value: "numResults"
645
+ }
605
646
  ],
606
647
  "tagInput.existingOptions": [
607
648
  {
@@ -888,16 +929,16 @@ const en = {
888
929
  value: "Mb"
889
930
  }
890
931
  ],
891
- "uploader.fileUploadExceeded": [
932
+ "uploader.fileUploadLimitExceeded": [
892
933
  {
893
934
  type: 0,
894
- value: "The number of selected files exceeds the limit."
935
+ value: "Upload unsuccessful because file selection would exceed the maximum number of files"
895
936
  }
896
937
  ],
897
- "uploader.fileUploadLimit": [
938
+ "uploader.fileUploadLimitReached": [
898
939
  {
899
940
  type: 0,
900
- value: "Upload unsuccessful because file selection would exceed the maximum number of files"
941
+ value: "The maximum number of files has been reached"
901
942
  }
902
943
  ],
903
944
  "uploader.filesAdded": [
@@ -3408,6 +3449,47 @@ const pig = {
3408
3449
  type: 0,
3409
3450
  value: "Akemay ayay electionsay"
3410
3451
  }
3452
+ ],
3453
+ "select.noSearchResults": [
3454
+ {
3455
+ type: 0,
3456
+ value: "Onay esultsray oundfay. Easeplay tryay ouryay earchsay againyay."
3457
+ }
3458
+ ],
3459
+ "select.searchPlaceholder": [
3460
+ {
3461
+ type: 0,
3462
+ value: "Earchsay"
3463
+ }
3464
+ ],
3465
+ "select.searchResultsFound": [
3466
+ {
3467
+ offset: 0,
3468
+ options: {
3469
+ one: {
3470
+ value: [
3471
+ {
3472
+ type: 0,
3473
+ value: "1 optionyay oundfay"
3474
+ }
3475
+ ]
3476
+ },
3477
+ other: {
3478
+ value: [
3479
+ {
3480
+ type: 7
3481
+ },
3482
+ {
3483
+ type: 0,
3484
+ value: " optionsyay oundfay"
3485
+ }
3486
+ ]
3487
+ }
3488
+ },
3489
+ pluralType: "cardinal",
3490
+ type: 6,
3491
+ value: "numResults"
3492
+ }
3411
3493
  ],
3412
3494
  "tagInput.existingOptions": [
3413
3495
  {
@@ -3694,16 +3776,16 @@ const pig = {
3694
3776
  value: "Mbay"
3695
3777
  }
3696
3778
  ],
3697
- "uploader.fileUploadExceeded": [
3779
+ "uploader.fileUploadLimitExceeded": [
3698
3780
  {
3699
3781
  type: 0,
3700
- value: "Ethay umbernay ofyay electedsay ilesfay exceedsyay ethay imitlay."
3782
+ value: "Uploadyay unsuccessfulyay ecausebay ilefay electionsay ouldway exceedyay ethay aximummay umbernay ofyay ilesfay"
3701
3783
  }
3702
3784
  ],
3703
- "uploader.fileUploadLimit": [
3785
+ "uploader.fileUploadLimitReached": [
3704
3786
  {
3705
3787
  type: 0,
3706
- value: "Uploadyay unsuccessfulyay ecausebay ilefay electionsay ouldway exceedyay ethay aximummay umbernay ofyay ilesfay"
3788
+ value: "Ethay aximummay umbernay ofyay ilesfay ashay eenbay eachedray"
3707
3789
  }
3708
3790
  ],
3709
3791
  "uploader.filesAdded": [
@@ -8389,444 +8471,444 @@ function createIntl(config, cache) {
8389
8471
  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) });
8390
8472
  }
8391
8473
 
8392
- const DEFAULT_LANGUAGE = "en";
8393
- function getBrowserLang() {
8394
- const langAttr = document.documentElement.getAttribute("lang");
8395
- if (!!langAttr) {
8396
- return langAttr;
8397
- }
8398
- else if (window.navigator && window.navigator.language) {
8399
- const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
8400
- return lang.slice(0, 2);
8401
- }
8402
- else {
8403
- return DEFAULT_LANGUAGE;
8404
- }
8405
- }
8406
- // prevents memory leak
8407
- const cache = createIntlCache();
8408
- const locale = getBrowserLang();
8409
- const intl = createIntl({
8410
- locale: locale,
8411
- defaultLocale: "en",
8412
- messages: lang[locale] || en,
8413
- }, cache);
8414
- function generateId() {
8415
- return "wmcl-" + Math.random().toString(36).substr(2, 10);
8416
- }
8417
- // limits how many times a function fires
8418
- // use when the function should run periodically, but not too often (e.g. window resize)
8419
- function throttle(fn, wait) {
8420
- let timeout;
8421
- let shouldWait = false;
8422
- return function () {
8423
- const context = this;
8424
- if (!shouldWait) {
8425
- fn.apply(context, arguments);
8426
- shouldWait = true;
8427
- clearTimeout(timeout);
8428
- timeout = setTimeout(function () {
8429
- shouldWait = false;
8430
- }, wait);
8431
- }
8432
- };
8433
- }
8434
- // waits until it hasn't been called for [timeout] ms.
8435
- // use when the function should run only after something (event) is done firing
8436
- function debounce(fn, wait) {
8437
- let timeout;
8438
- return function () {
8439
- const context = this;
8440
- const functionCall = () => fn.apply(context, arguments);
8441
- clearTimeout(timeout);
8442
- timeout = setTimeout(functionCall, wait);
8443
- };
8444
- }
8445
- function getTextDir() {
8446
- const dir = document.querySelector("html").getAttribute("dir");
8447
- return dir ? dir.toLowerCase() : "";
8448
- }
8449
- function getPosition(el) {
8450
- const coords = el.getBoundingClientRect();
8451
- let x = coords.x;
8452
- let y = coords.y;
8453
- // Edge doesn't have x and y
8454
- if (!x) {
8455
- if (getTextDir() === "rtl") {
8456
- x = coords.right;
8457
- }
8458
- else {
8459
- x = coords.left;
8460
- }
8461
- y = coords.top;
8462
- }
8463
- return { x, y };
8464
- }
8465
- function findParentWithScrollbar(el) {
8466
- while (!!el) {
8467
- if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
8468
- return el;
8469
- }
8470
- el = el.parentElement;
8471
- }
8472
- }
8473
- function findParentWithHiddenOverflow(el) {
8474
- while (!!el) {
8475
- if (window.getComputedStyle(el).overflowY !== "visible") {
8476
- return el;
8477
- }
8478
- el = el.parentElement;
8479
- }
8480
- }
8481
- function getClosableElementMeasurements(fixedEl, closableEl) {
8482
- const parent = findParentWithHiddenOverflow(fixedEl);
8483
- // if parent is not found, measurements are checked against the viewport
8484
- return {
8485
- closableElHeight: closableEl.clientHeight,
8486
- closableElWidth: closableEl.clientWidth,
8487
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8488
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8489
- spaceAbove: parent
8490
- ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
8491
- : fixedEl.getBoundingClientRect().top,
8492
- // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8493
- // to get space below the el -> height of viewport minus boundingClientRect.bottom
8494
- spaceBelow: parent
8495
- ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
8496
- : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
8497
- spaceLeft: parent
8498
- ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
8499
- : fixedEl.getBoundingClientRect().left,
8500
- spaceRight: parent
8501
- ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
8502
- : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
8503
- };
8504
- }
8505
- function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
8506
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8507
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8508
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8509
- ) {
8510
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8511
- //we want to open up only if there's not enough space below AND there is enough space above
8512
- const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
8513
- return openUp;
8514
- }
8515
- function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
8516
- closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8517
- offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8518
- offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8519
- ) {
8520
- const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8521
- //we want to open up only if there's not enough space below AND there is enough space above
8522
- const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
8523
- return openDown;
8524
- }
8525
- function shouldShiftRight(fixedEl, closableEl) {
8526
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8527
- const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
8528
- return needsSpaceLeft;
8529
- }
8530
- function shouldShiftLeft(fixedEl, closableEl) {
8531
- const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8532
- const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
8533
- return needsSpaceRight;
8534
- }
8535
- function adjustTooltipPlacement(tPos, el, tooltipEl) {
8536
- const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
8537
- const tooltipWidth = tooltipEl.getBoundingClientRect().width;
8538
- const tooltipHeight = tooltipEl.getBoundingClientRect().height;
8539
- const enoughSpaceAbove = spaceAbove > tooltipHeight;
8540
- const enoughSpaceBelow = spaceBelow > tooltipHeight;
8541
- // a tooltip should never be closer than 24px to the edge of a screen
8542
- const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
8543
- const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
8544
- const swapAbove = (position) => {
8545
- return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
8546
- };
8547
- const swapBelow = (position) => {
8548
- return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
8549
- };
8550
- const swapLeft = (position, centeredPosition) => {
8551
- if (!enoughSpaceLeft && enoughSpaceRight) {
8552
- position = position.replace("left", "right");
8553
- }
8554
- else if (!enoughSpaceLeft && !enoughSpaceRight) {
8555
- position = centeredPosition;
8556
- }
8557
- return position;
8558
- };
8559
- const swapRight = (position, centeredPosition) => {
8560
- if (!enoughSpaceRight && enoughSpaceLeft) {
8561
- position = position.replace("right", "left");
8562
- }
8563
- else if (!enoughSpaceRight && !enoughSpaceLeft) {
8564
- position = centeredPosition;
8565
- }
8566
- return position;
8567
- };
8568
- // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
8569
- switch (tPos) {
8570
- case "left":
8571
- tPos = swapLeft(tPos, "bottom");
8572
- case "right":
8573
- tPos = swapRight(tPos, "bottom");
8574
- case "top-left":
8575
- tPos = swapLeft(tPos, "top");
8576
- tPos = swapAbove(tPos);
8577
- case "top-right":
8578
- tPos = swapRight(tPos, "top");
8579
- tPos = swapAbove(tPos);
8580
- case "bottom-left":
8581
- tPos = swapLeft(tPos, "bottom");
8582
- tPos = swapBelow(tPos);
8583
- case "bottom-right":
8584
- tPos = swapRight(tPos, "bottom");
8585
- tPos = swapBelow(tPos);
8586
- case "top":
8587
- tPos = swapAbove(tPos);
8588
- case "bottom":
8589
- tPos = swapBelow(tPos);
8590
- }
8591
- return tPos;
8592
- }
8593
- function hasRoomRight(x, spaceNeeded) {
8594
- let horizOffset = 0;
8595
- // if (getTextDir() === "ltr") {
8596
- if (x.type === "click") {
8597
- // if it's a mouse event, deal with mouse coords
8598
- horizOffset = x.clientX;
8599
- // if it's a focus event, the offset is 0
8600
- }
8601
- else if (x.type === "focus") {
8602
- horizOffset = 0;
8603
- }
8604
- else {
8605
- // otherwise an element was passed, calculate how far it is from the edge of the window
8606
- let el = x; // re-assignment is for clarity
8607
- while (el) {
8608
- if (el.tagName == "BODY") {
8609
- // deal with browser quirks with body/window/document and page scroll
8610
- var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
8611
- horizOffset += el.offsetLeft - xScroll + el.clientLeft;
8612
- }
8613
- else {
8614
- // for all other non-BODY elements
8615
- horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
8616
- }
8617
- el = el.offsetParent;
8618
- }
8619
- // }
8620
- }
8621
- return window.innerWidth - horizOffset >= spaceNeeded;
8622
- }
8623
- function checkForActiveElInShadow(element) {
8624
- while (element && element.shadowRoot) {
8625
- element = element.shadowRoot.activeElement;
8626
- }
8627
- return element;
8628
- }
8629
- function checkForFocusableElInShadow(element) {
8630
- const selectors = [
8631
- "button",
8632
- "a",
8633
- "input",
8634
- "select",
8635
- "textarea",
8636
- "wm-button",
8637
- "wm-search",
8638
- "wm-select",
8639
- "wm-action-menu",
8640
- "wm-tab-item",
8641
- "wm-datepicker",
8642
- ];
8643
- let focusableEl = element;
8644
- selectors.forEach((selector) => {
8645
- if (focusableEl && focusableEl.shadowRoot) {
8646
- let elInShadow = focusableEl.shadowRoot.querySelector(selector);
8647
- if (elInShadow) {
8648
- if (selector.startsWith("wm-")) {
8649
- focusableEl = checkForFocusableElInShadow(elInShadow);
8650
- }
8651
- else {
8652
- focusableEl = elInShadow;
8653
- }
8654
- }
8655
- }
8656
- });
8657
- return focusableEl;
8658
- }
8659
- function isFocusable(element) {
8660
- if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
8661
- return true;
8662
- }
8663
- if (element.disabled) {
8664
- return false;
8665
- }
8666
- switch (element.nodeName) {
8667
- case "A":
8668
- return !!element.href && element.rel != "ignore";
8669
- case "INPUT":
8670
- return element.type != "hidden" && element.type != "file";
8671
- case "BUTTON":
8672
- case "SELECT":
8673
- case "TEXTAREA":
8674
- case "WM-BUTTON":
8675
- case "WM-SELECT":
8676
- case "WM-ACTION-MENU":
8677
- case "WM-DATEPICKER":
8678
- case "WM-TIMEPICKER":
8679
- case "WM-INPUT":
8680
- case "WM-TAG-INPUT":
8681
- case "WM-TAB-ITEM":
8682
- case "WM-SEARCH":
8683
- return true;
8684
- default:
8685
- return false;
8686
- }
8687
- }
8688
- function getFirstFocusableDescendant(element) {
8689
- if (isFocusable(element)) {
8690
- return checkForFocusableElInShadow(element);
8691
- }
8692
- else if (element.childNodes.length > 0) {
8693
- element.childNodes.forEach((i) => {
8694
- const childEl = getFirstFocusableDescendant(i);
8695
- return childEl && checkForFocusableElInShadow(childEl);
8696
- });
8697
- }
8698
- }
8699
- function hasValidType(file, types) {
8700
- const acceptedExtensions = types.split(" ");
8701
- const parts = file.name && file.name.split(".");
8702
- const ext = parts && parts.length > 1 && parts[parts.length - 1];
8703
- return ext
8704
- ? acceptedExtensions.includes(ext.toLowerCase())
8705
- : // fallback: if we couldn't obtain an extension,
8706
- // validate based on MIME type...
8707
- !!file.type
8708
- ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
8709
- : // ...and if that failed too, accept the file
8710
- // as it's preferable to accept an invalid file
8711
- // than refusing a valid one (back-end will take care of what slips through)
8712
- true;
8713
- }
8714
- // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
8715
- function getAcceptedMimeTypesList(acceptedExtensions) {
8716
- // this is just a list of common file types (regardless of whether they are/can be valid or not)
8717
- // front end checks are just a convenience to users, independent of security.
8718
- // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
8719
- const lookupTable = {
8720
- aac: ["audio/aac"],
8721
- abw: ["application/x-abiword"],
8722
- arc: ["application/x-freearc"],
8723
- avi: ["video/x-msvideo"],
8724
- azw: ["application/vnd.amazon.ebook"],
8725
- bin: ["application/octet-stream"],
8726
- bmp: ["image/bmp"],
8727
- bz: ["application/x-bzip"],
8728
- bz2: ["application/x-bzip2"],
8729
- csh: ["application/x-csh"],
8730
- css: ["text/css"],
8731
- csv: ["text/csv"],
8732
- doc: ["application/msword"],
8733
- docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
8734
- eot: ["application/vnd.ms-fontobject"],
8735
- epub: ["application/epub+zip"],
8736
- gz: ["application/gzip"],
8737
- gif: ["image/gif"],
8738
- htm: ["text/html"],
8739
- html: ["text/html"],
8740
- ico: ["image/vnd.microsoft.icon"],
8741
- ics: ["text/calendar"],
8742
- jar: ["application/java-archive"],
8743
- jpeg: ["image/jpeg"],
8744
- jpg: ["image/jpeg"],
8745
- js: ["text/javascript"],
8746
- json: ["application/json"],
8747
- jsonld: ["application/ld+json"],
8748
- log: ["text/plain"],
8749
- mid: ["audio/x-midi"],
8750
- midi: ["audio/x-midi"],
8751
- mjs: ["text/javascript"],
8752
- mp3: ["audio/mpeg"],
8753
- mpeg: ["video/mpeg"],
8754
- mpkg: ["application/vnd.apple.installer+xml"],
8755
- odp: ["application/vnd.oasis.opendocument.presentation"],
8756
- ods: ["application/vnd.oasis.opendocument.spreadsheet"],
8757
- odt: ["application/vnd.oasis.opendocument.text"],
8758
- oga: ["audio/ogg"],
8759
- ogv: ["video/ogg"],
8760
- ogx: ["application/ogg"],
8761
- opus: ["audio/opus"],
8762
- otf: ["font/otf"],
8763
- png: ["image/png"],
8764
- pdf: ["application/pdf"],
8765
- php: ["application/php"],
8766
- ppt: ["application/vnd.ms-powerpoint"],
8767
- pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
8768
- rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
8769
- rtf: ["application/rtf"],
8770
- sh: ["application/x-sh"],
8771
- svg: ["image/svg+xml"],
8772
- swf: ["application/x-shockwave-flash"],
8773
- tar: ["application/x-tar"],
8774
- tif: ["image/tiff"],
8775
- tiff: ["image/tiff"],
8776
- ts: ["video/mp2t"],
8777
- ttf: ["font/ttf"],
8778
- txt: ["text/plain"],
8779
- vsd: ["application/vnd.visio"],
8780
- wav: ["audio/wav"],
8781
- weba: ["audio/webm"],
8782
- webm: ["video/webm"],
8783
- webp: ["image/webp"],
8784
- woff: ["font/woff"],
8785
- woff2: ["font/woff2"],
8786
- xhtml: ["application/xhtml+xml"],
8787
- xls: ["application/vnd.ms-excel"],
8788
- xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
8789
- xml: ["application/xml", "text/xml"],
8790
- xul: ["application/vnd.mozilla.xul+xml"],
8791
- zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
8792
- "3gp": ["video/3gpp", "audio/3gpp"],
8793
- "3g2": ["video/3gpp2", "audio/3gpp2"],
8794
- "7z": ["application/x-7z-compressed"],
8795
- };
8796
- return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
8797
- }
8798
- function snakeCaseToCamelCase(str) {
8799
- const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
8800
- if (snakeCaseRegexp.test(str)) {
8801
- let camelCase = "";
8802
- let arr = str.split("_");
8803
- arr.forEach((word, idx) => {
8804
- camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
8805
- });
8806
- return camelCase;
8807
- }
8808
- else {
8809
- return str;
8810
- }
8811
- }
8812
- function getNewIndexToFocus(currentIndex, direction, listLength) {
8813
- let newIndex = currentIndex;
8814
- if (direction === "ArrowDown") {
8815
- newIndex = (currentIndex + 1) % listLength;
8816
- }
8817
- if (direction === "ArrowUp") {
8818
- newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
8819
- }
8820
- return newIndex;
8821
- }
8822
- function isRelatedTarget(ev, id) {
8823
- // used for onBlur events to check the element that has been clicked
8824
- const ids = id.split(" ");
8825
- return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
8826
- }
8827
- function toBool(val) {
8828
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
8829
- return val == "false" ? false : !!val;
8474
+ const DEFAULT_LANGUAGE = "en";
8475
+ function getBrowserLang() {
8476
+ const langAttr = document.documentElement.getAttribute("lang");
8477
+ if (!!langAttr) {
8478
+ return langAttr;
8479
+ }
8480
+ else if (window.navigator && window.navigator.language) {
8481
+ const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
8482
+ return lang.slice(0, 2);
8483
+ }
8484
+ else {
8485
+ return DEFAULT_LANGUAGE;
8486
+ }
8487
+ }
8488
+ // prevents memory leak
8489
+ const cache = createIntlCache();
8490
+ const locale = getBrowserLang();
8491
+ const intl = createIntl({
8492
+ locale: locale,
8493
+ defaultLocale: "en",
8494
+ messages: lang[locale] || en,
8495
+ }, cache);
8496
+ function generateId() {
8497
+ return "wmcl-" + Math.random().toString(36).substr(2, 10);
8498
+ }
8499
+ // limits how many times a function fires
8500
+ // use when the function should run periodically, but not too often (e.g. window resize)
8501
+ function throttle(fn, wait) {
8502
+ let timeout;
8503
+ let shouldWait = false;
8504
+ return function () {
8505
+ const context = this;
8506
+ if (!shouldWait) {
8507
+ fn.apply(context, arguments);
8508
+ shouldWait = true;
8509
+ clearTimeout(timeout);
8510
+ timeout = setTimeout(function () {
8511
+ shouldWait = false;
8512
+ }, wait);
8513
+ }
8514
+ };
8515
+ }
8516
+ // waits until it hasn't been called for [timeout] ms.
8517
+ // use when the function should run only after something (event) is done firing
8518
+ function debounce(fn, wait) {
8519
+ let timeout;
8520
+ return function () {
8521
+ const context = this;
8522
+ const functionCall = () => fn.apply(context, arguments);
8523
+ clearTimeout(timeout);
8524
+ timeout = setTimeout(functionCall, wait);
8525
+ };
8526
+ }
8527
+ function getTextDir() {
8528
+ const dir = document.querySelector("html").getAttribute("dir");
8529
+ return dir ? dir.toLowerCase() : "";
8530
+ }
8531
+ function getPosition(el) {
8532
+ const coords = el.getBoundingClientRect();
8533
+ let x = coords.x;
8534
+ let y = coords.y;
8535
+ // Edge doesn't have x and y
8536
+ if (!x) {
8537
+ if (getTextDir() === "rtl") {
8538
+ x = coords.right;
8539
+ }
8540
+ else {
8541
+ x = coords.left;
8542
+ }
8543
+ y = coords.top;
8544
+ }
8545
+ return { x, y };
8546
+ }
8547
+ function findParentWithScrollbar(el) {
8548
+ while (!!el) {
8549
+ if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
8550
+ return el;
8551
+ }
8552
+ el = el.parentElement;
8553
+ }
8554
+ }
8555
+ function findParentWithHiddenOverflow(el) {
8556
+ while (!!el) {
8557
+ if (window.getComputedStyle(el).overflowY !== "visible") {
8558
+ return el;
8559
+ }
8560
+ el = el.parentElement;
8561
+ }
8562
+ }
8563
+ function getClosableElementMeasurements(fixedEl, closableEl) {
8564
+ const parent = findParentWithHiddenOverflow(fixedEl);
8565
+ // if parent is not found, measurements are checked against the viewport
8566
+ return {
8567
+ closableElHeight: closableEl.clientHeight,
8568
+ closableElWidth: closableEl.clientWidth,
8569
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8570
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
8571
+ spaceAbove: parent
8572
+ ? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
8573
+ : fixedEl.getBoundingClientRect().top,
8574
+ // NB boundingClientRect.bottom is space from top of viewport to bottom of el
8575
+ // to get space below the el -> height of viewport minus boundingClientRect.bottom
8576
+ spaceBelow: parent
8577
+ ? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
8578
+ : document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
8579
+ spaceLeft: parent
8580
+ ? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
8581
+ : fixedEl.getBoundingClientRect().left,
8582
+ spaceRight: parent
8583
+ ? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
8584
+ : document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
8585
+ };
8586
+ }
8587
+ function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
8588
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8589
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8590
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8591
+ ) {
8592
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8593
+ //we want to open up only if there's not enough space below AND there is enough space above
8594
+ const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
8595
+ return openUp;
8596
+ }
8597
+ function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
8598
+ closableEl, //the dropdown/popup/etc that becomes visible when the component is open
8599
+ offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
8600
+ offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
8601
+ ) {
8602
+ const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
8603
+ //we want to open up only if there's not enough space below AND there is enough space above
8604
+ const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
8605
+ return openDown;
8606
+ }
8607
+ function shouldShiftRight(fixedEl, closableEl) {
8608
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8609
+ const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
8610
+ return needsSpaceLeft;
8611
+ }
8612
+ function shouldShiftLeft(fixedEl, closableEl) {
8613
+ const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
8614
+ const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
8615
+ return needsSpaceRight;
8616
+ }
8617
+ function adjustTooltipPlacement(tPos, el, tooltipEl) {
8618
+ const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
8619
+ const tooltipWidth = tooltipEl.getBoundingClientRect().width;
8620
+ const tooltipHeight = tooltipEl.getBoundingClientRect().height;
8621
+ const enoughSpaceAbove = spaceAbove > tooltipHeight;
8622
+ const enoughSpaceBelow = spaceBelow > tooltipHeight;
8623
+ // a tooltip should never be closer than 24px to the edge of a screen
8624
+ const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
8625
+ const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
8626
+ const swapAbove = (position) => {
8627
+ return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
8628
+ };
8629
+ const swapBelow = (position) => {
8630
+ return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
8631
+ };
8632
+ const swapLeft = (position, centeredPosition) => {
8633
+ if (!enoughSpaceLeft && enoughSpaceRight) {
8634
+ position = position.replace("left", "right");
8635
+ }
8636
+ else if (!enoughSpaceLeft && !enoughSpaceRight) {
8637
+ position = centeredPosition;
8638
+ }
8639
+ return position;
8640
+ };
8641
+ const swapRight = (position, centeredPosition) => {
8642
+ if (!enoughSpaceRight && enoughSpaceLeft) {
8643
+ position = position.replace("right", "left");
8644
+ }
8645
+ else if (!enoughSpaceRight && !enoughSpaceLeft) {
8646
+ position = centeredPosition;
8647
+ }
8648
+ return position;
8649
+ };
8650
+ // horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
8651
+ switch (tPos) {
8652
+ case "left":
8653
+ tPos = swapLeft(tPos, "bottom");
8654
+ case "right":
8655
+ tPos = swapRight(tPos, "bottom");
8656
+ case "top-left":
8657
+ tPos = swapLeft(tPos, "top");
8658
+ tPos = swapAbove(tPos);
8659
+ case "top-right":
8660
+ tPos = swapRight(tPos, "top");
8661
+ tPos = swapAbove(tPos);
8662
+ case "bottom-left":
8663
+ tPos = swapLeft(tPos, "bottom");
8664
+ tPos = swapBelow(tPos);
8665
+ case "bottom-right":
8666
+ tPos = swapRight(tPos, "bottom");
8667
+ tPos = swapBelow(tPos);
8668
+ case "top":
8669
+ tPos = swapAbove(tPos);
8670
+ case "bottom":
8671
+ tPos = swapBelow(tPos);
8672
+ }
8673
+ return tPos;
8674
+ }
8675
+ function hasRoomRight(x, spaceNeeded) {
8676
+ let horizOffset = 0;
8677
+ // if (getTextDir() === "ltr") {
8678
+ if (x.type === "click") {
8679
+ // if it's a mouse event, deal with mouse coords
8680
+ horizOffset = x.clientX;
8681
+ // if it's a focus event, the offset is 0
8682
+ }
8683
+ else if (x.type === "focus") {
8684
+ horizOffset = 0;
8685
+ }
8686
+ else {
8687
+ // otherwise an element was passed, calculate how far it is from the edge of the window
8688
+ let el = x; // re-assignment is for clarity
8689
+ while (el) {
8690
+ if (el.tagName == "BODY") {
8691
+ // deal with browser quirks with body/window/document and page scroll
8692
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
8693
+ horizOffset += el.offsetLeft - xScroll + el.clientLeft;
8694
+ }
8695
+ else {
8696
+ // for all other non-BODY elements
8697
+ horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
8698
+ }
8699
+ el = el.offsetParent;
8700
+ }
8701
+ // }
8702
+ }
8703
+ return window.innerWidth - horizOffset >= spaceNeeded;
8704
+ }
8705
+ function checkForActiveElInShadow(element) {
8706
+ while (element && element.shadowRoot) {
8707
+ element = element.shadowRoot.activeElement;
8708
+ }
8709
+ return element;
8710
+ }
8711
+ function checkForFocusableElInShadow(element) {
8712
+ const selectors = [
8713
+ "button",
8714
+ "a",
8715
+ "input",
8716
+ "select",
8717
+ "textarea",
8718
+ "wm-button",
8719
+ "wm-search",
8720
+ "wm-select",
8721
+ "wm-action-menu",
8722
+ "wm-tab-item",
8723
+ "wm-datepicker",
8724
+ ];
8725
+ let focusableEl = element;
8726
+ selectors.forEach((selector) => {
8727
+ if (focusableEl && focusableEl.shadowRoot) {
8728
+ let elInShadow = focusableEl.shadowRoot.querySelector(selector);
8729
+ if (elInShadow) {
8730
+ if (selector.startsWith("wm-")) {
8731
+ focusableEl = checkForFocusableElInShadow(elInShadow);
8732
+ }
8733
+ else {
8734
+ focusableEl = elInShadow;
8735
+ }
8736
+ }
8737
+ }
8738
+ });
8739
+ return focusableEl;
8740
+ }
8741
+ function isFocusable(element) {
8742
+ if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
8743
+ return true;
8744
+ }
8745
+ if (element.disabled) {
8746
+ return false;
8747
+ }
8748
+ switch (element.nodeName) {
8749
+ case "A":
8750
+ return !!element.href && element.rel != "ignore";
8751
+ case "INPUT":
8752
+ return element.type != "hidden" && element.type != "file";
8753
+ case "BUTTON":
8754
+ case "SELECT":
8755
+ case "TEXTAREA":
8756
+ case "WM-BUTTON":
8757
+ case "WM-SELECT":
8758
+ case "WM-ACTION-MENU":
8759
+ case "WM-DATEPICKER":
8760
+ case "WM-TIMEPICKER":
8761
+ case "WM-INPUT":
8762
+ case "WM-TAG-INPUT":
8763
+ case "WM-TAB-ITEM":
8764
+ case "WM-SEARCH":
8765
+ return true;
8766
+ default:
8767
+ return false;
8768
+ }
8769
+ }
8770
+ function getFirstFocusableDescendant(element) {
8771
+ if (isFocusable(element)) {
8772
+ return checkForFocusableElInShadow(element);
8773
+ }
8774
+ else if (element.childNodes.length > 0) {
8775
+ element.childNodes.forEach((i) => {
8776
+ const childEl = getFirstFocusableDescendant(i);
8777
+ return childEl && checkForFocusableElInShadow(childEl);
8778
+ });
8779
+ }
8780
+ }
8781
+ function hasValidType(file, types) {
8782
+ const acceptedExtensions = types.split(" ");
8783
+ const parts = file.name && file.name.split(".");
8784
+ const ext = parts && parts.length > 1 && parts[parts.length - 1];
8785
+ return ext
8786
+ ? acceptedExtensions.includes(ext.toLowerCase())
8787
+ : // fallback: if we couldn't obtain an extension,
8788
+ // validate based on MIME type...
8789
+ !!file.type
8790
+ ? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
8791
+ : // ...and if that failed too, accept the file
8792
+ // as it's preferable to accept an invalid file
8793
+ // than refusing a valid one (back-end will take care of what slips through)
8794
+ true;
8795
+ }
8796
+ // takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
8797
+ function getAcceptedMimeTypesList(acceptedExtensions) {
8798
+ // this is just a list of common file types (regardless of whether they are/can be valid or not)
8799
+ // front end checks are just a convenience to users, independent of security.
8800
+ // it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
8801
+ const lookupTable = {
8802
+ aac: ["audio/aac"],
8803
+ abw: ["application/x-abiword"],
8804
+ arc: ["application/x-freearc"],
8805
+ avi: ["video/x-msvideo"],
8806
+ azw: ["application/vnd.amazon.ebook"],
8807
+ bin: ["application/octet-stream"],
8808
+ bmp: ["image/bmp"],
8809
+ bz: ["application/x-bzip"],
8810
+ bz2: ["application/x-bzip2"],
8811
+ csh: ["application/x-csh"],
8812
+ css: ["text/css"],
8813
+ csv: ["text/csv"],
8814
+ doc: ["application/msword"],
8815
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
8816
+ eot: ["application/vnd.ms-fontobject"],
8817
+ epub: ["application/epub+zip"],
8818
+ gz: ["application/gzip"],
8819
+ gif: ["image/gif"],
8820
+ htm: ["text/html"],
8821
+ html: ["text/html"],
8822
+ ico: ["image/vnd.microsoft.icon"],
8823
+ ics: ["text/calendar"],
8824
+ jar: ["application/java-archive"],
8825
+ jpeg: ["image/jpeg"],
8826
+ jpg: ["image/jpeg"],
8827
+ js: ["text/javascript"],
8828
+ json: ["application/json"],
8829
+ jsonld: ["application/ld+json"],
8830
+ log: ["text/plain"],
8831
+ mid: ["audio/x-midi"],
8832
+ midi: ["audio/x-midi"],
8833
+ mjs: ["text/javascript"],
8834
+ mp3: ["audio/mpeg"],
8835
+ mpeg: ["video/mpeg"],
8836
+ mpkg: ["application/vnd.apple.installer+xml"],
8837
+ odp: ["application/vnd.oasis.opendocument.presentation"],
8838
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
8839
+ odt: ["application/vnd.oasis.opendocument.text"],
8840
+ oga: ["audio/ogg"],
8841
+ ogv: ["video/ogg"],
8842
+ ogx: ["application/ogg"],
8843
+ opus: ["audio/opus"],
8844
+ otf: ["font/otf"],
8845
+ png: ["image/png"],
8846
+ pdf: ["application/pdf"],
8847
+ php: ["application/php"],
8848
+ ppt: ["application/vnd.ms-powerpoint"],
8849
+ pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
8850
+ rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
8851
+ rtf: ["application/rtf"],
8852
+ sh: ["application/x-sh"],
8853
+ svg: ["image/svg+xml"],
8854
+ swf: ["application/x-shockwave-flash"],
8855
+ tar: ["application/x-tar"],
8856
+ tif: ["image/tiff"],
8857
+ tiff: ["image/tiff"],
8858
+ ts: ["video/mp2t"],
8859
+ ttf: ["font/ttf"],
8860
+ txt: ["text/plain"],
8861
+ vsd: ["application/vnd.visio"],
8862
+ wav: ["audio/wav"],
8863
+ weba: ["audio/webm"],
8864
+ webm: ["video/webm"],
8865
+ webp: ["image/webp"],
8866
+ woff: ["font/woff"],
8867
+ woff2: ["font/woff2"],
8868
+ xhtml: ["application/xhtml+xml"],
8869
+ xls: ["application/vnd.ms-excel"],
8870
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
8871
+ xml: ["application/xml", "text/xml"],
8872
+ xul: ["application/vnd.mozilla.xul+xml"],
8873
+ zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
8874
+ "3gp": ["video/3gpp", "audio/3gpp"],
8875
+ "3g2": ["video/3gpp2", "audio/3gpp2"],
8876
+ "7z": ["application/x-7z-compressed"],
8877
+ };
8878
+ return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
8879
+ }
8880
+ function snakeCaseToCamelCase(str) {
8881
+ const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
8882
+ if (snakeCaseRegexp.test(str)) {
8883
+ let camelCase = "";
8884
+ let arr = str.split("_");
8885
+ arr.forEach((word, idx) => {
8886
+ camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
8887
+ });
8888
+ return camelCase;
8889
+ }
8890
+ else {
8891
+ return str;
8892
+ }
8893
+ }
8894
+ function getNewIndexToFocus(currentIndex, direction, listLength) {
8895
+ let newIndex = currentIndex;
8896
+ if (direction === "ArrowDown") {
8897
+ newIndex = (currentIndex + 1) % listLength;
8898
+ }
8899
+ if (direction === "ArrowUp") {
8900
+ newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
8901
+ }
8902
+ return newIndex;
8903
+ }
8904
+ function isRelatedTarget(ev, id) {
8905
+ // used for onBlur events to check the element that has been clicked
8906
+ const ids = id.split(" ");
8907
+ return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
8908
+ }
8909
+ function toBool(val) {
8910
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
8911
+ return val == "false" ? false : !!val;
8830
8912
  }
8831
8913
 
8832
8914
  exports.adjustTooltipPlacement = adjustTooltipPlacement;