@watermarkinsights/ripple 3.25.0-2 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-9dce0ea3.js → chartFunctions-2f04ab6a.js} +591 -591
  3. package/dist/cjs/chartFunctions-2f04ab6a.js.map +1 -0
  4. package/dist/cjs/{functions-53aff314.js → functions-d2d99997.js} +478 -478
  5. package/dist/cjs/{functions-53aff314.js.map → functions-d2d99997.js.map} +1 -1
  6. package/dist/cjs/{global-c22b1249.js → global-d0584d18.js} +63 -63
  7. package/dist/cjs/global-d0584d18.js.map +1 -0
  8. package/dist/cjs/{http-service-494d81de.js → http-service-9e8c4dd5.js} +50 -50
  9. package/dist/cjs/http-service-9e8c4dd5.js.map +1 -0
  10. package/dist/cjs/{interfaces-a3338581.js → interfaces-30a74c1f.js} +30 -30
  11. package/dist/cjs/interfaces-30a74c1f.js.map +1 -0
  12. package/dist/cjs/intl-a1ccf587.js +140 -0
  13. package/dist/cjs/intl-a1ccf587.js.map +1 -0
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/priv-chart-popover.cjs.entry.js +91 -91
  16. package/dist/cjs/priv-chart-popover.cjs.entry.js.map +1 -1
  17. package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
  18. package/dist/cjs/priv-datepicker.cjs.entry.js.map +1 -1
  19. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  20. package/dist/cjs/priv-navigator-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
  22. package/dist/cjs/priv-navigator-item.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ripple.cjs.js +2 -2
  24. package/dist/cjs/wm-action-menu_2.cjs.entry.js +334 -334
  25. package/dist/cjs/wm-action-menu_2.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wm-button.cjs.entry.js +260 -260
  27. package/dist/cjs/wm-button.cjs.entry.js.map +1 -1
  28. package/dist/cjs/wm-chart-slice.cjs.entry.js +18 -18
  29. package/dist/cjs/wm-chart-slice.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wm-chart.cjs.entry.js +179 -179
  31. package/dist/cjs/wm-chart.cjs.entry.js.map +1 -1
  32. package/dist/cjs/wm-datepicker.cjs.entry.js +264 -264
  33. package/dist/cjs/wm-datepicker.cjs.entry.js.map +1 -1
  34. package/dist/cjs/wm-file-list.cjs.entry.js +35 -35
  35. package/dist/cjs/wm-file-list.cjs.entry.js.map +1 -1
  36. package/dist/cjs/wm-file.cjs.entry.js +201 -201
  37. package/dist/cjs/wm-file.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wm-input.cjs.entry.js +124 -140
  39. package/dist/cjs/wm-input.cjs.entry.js.map +1 -1
  40. package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
  41. package/dist/cjs/wm-modal-footer.cjs.entry.js.map +1 -1
  42. package/dist/cjs/wm-modal-header.cjs.entry.js +32 -32
  43. package/dist/cjs/wm-modal-header.cjs.entry.js.map +1 -1
  44. package/dist/cjs/wm-modal.cjs.entry.js +152 -152
  45. package/dist/cjs/wm-modal.cjs.entry.js.map +1 -1
  46. package/dist/cjs/wm-navigation_3.cjs.entry.js +225 -230
  47. package/dist/cjs/wm-navigation_3.cjs.entry.js.map +1 -1
  48. package/dist/cjs/wm-navigator.cjs.entry.js +264 -264
  49. package/dist/cjs/wm-navigator.cjs.entry.js.map +1 -1
  50. package/dist/cjs/wm-network-uploader.cjs.entry.js +465 -467
  51. package/dist/cjs/wm-network-uploader.cjs.entry.js.map +1 -1
  52. package/dist/cjs/wm-option_2.cjs.entry.js +769 -772
  53. package/dist/cjs/wm-option_2.cjs.entry.js.map +1 -1
  54. package/dist/cjs/wm-pagination.cjs.entry.js +179 -179
  55. package/dist/cjs/wm-pagination.cjs.entry.js.map +1 -1
  56. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +155 -155
  57. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js.map +1 -1
  58. package/dist/cjs/wm-search.cjs.entry.js +185 -192
  59. package/dist/cjs/wm-search.cjs.entry.js.map +1 -1
  60. package/dist/cjs/wm-snackbar.cjs.entry.js +155 -159
  61. package/dist/cjs/wm-snackbar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/wm-tab-item_3.cjs.entry.js +264 -264
  63. package/dist/cjs/wm-tab-item_3.cjs.entry.js.map +1 -1
  64. package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
  65. package/dist/cjs/wm-tag-input-row.cjs.entry.js.map +1 -1
  66. package/dist/cjs/wm-tag-input.cjs.entry.js +912 -924
  67. package/dist/cjs/wm-tag-input.cjs.entry.js.map +1 -1
  68. package/dist/cjs/wm-timepicker.cjs.entry.js +386 -386
  69. package/dist/cjs/wm-timepicker.cjs.entry.js.map +1 -1
  70. package/dist/cjs/wm-toggletip.cjs.entry.js +130 -130
  71. package/dist/cjs/wm-toggletip.cjs.entry.js.map +1 -1
  72. package/dist/cjs/wm-uploader.cjs.entry.js +441 -510
  73. package/dist/cjs/wm-uploader.cjs.entry.js.map +1 -1
  74. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  75. package/dist/cjs/wm-wrapper.cjs.entry.js.map +1 -1
  76. package/dist/collection/components/charts/chartFunctions.js +557 -557
  77. package/dist/collection/components/charts/chartFunctions.js.map +1 -1
  78. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +268 -270
  79. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js.map +1 -1
  80. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +126 -126
  81. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js.map +1 -1
  82. package/dist/collection/components/charts/wm-chart/wm-chart.js +447 -447
  83. package/dist/collection/components/charts/wm-chart/wm-chart.js.map +1 -1
  84. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +208 -208
  85. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js.map +1 -1
  86. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +144 -144
  87. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js.map +1 -1
  88. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +122 -122
  89. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js.map +1 -1
  90. package/dist/collection/components/wm-action-menu/wm-action-menu.js +473 -473
  91. package/dist/collection/components/wm-action-menu/wm-action-menu.js.map +1 -1
  92. package/dist/collection/components/wm-button/wm-button.js +576 -576
  93. package/dist/collection/components/wm-button/wm-button.js.map +1 -1
  94. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +984 -984
  95. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js.map +1 -1
  96. package/dist/collection/components/wm-datepicker/wm-datepicker.css +4 -4
  97. package/dist/collection/components/wm-datepicker/wm-datepicker.js +492 -492
  98. package/dist/collection/components/wm-datepicker/wm-datepicker.js.map +1 -1
  99. package/dist/collection/components/wm-file/wm-file.js +334 -334
  100. package/dist/collection/components/wm-file/wm-file.js.map +1 -1
  101. package/dist/collection/components/wm-file-list/wm-file-list.js +153 -153
  102. package/dist/collection/components/wm-file-list/wm-file-list.js.map +1 -1
  103. package/dist/collection/components/wm-input/wm-input.css +4 -4
  104. package/dist/collection/components/wm-input/wm-input.js +428 -444
  105. package/dist/collection/components/wm-input/wm-input.js.map +1 -1
  106. package/dist/collection/components/wm-menuitem/wm-menuitem.js +455 -455
  107. package/dist/collection/components/wm-menuitem/wm-menuitem.js.map +1 -1
  108. package/dist/collection/components/wm-modal/wm-modal-footer.js +139 -139
  109. package/dist/collection/components/wm-modal/wm-modal-footer.js.map +1 -1
  110. package/dist/collection/components/wm-modal/wm-modal-header.js +83 -83
  111. package/dist/collection/components/wm-modal/wm-modal-header.js.map +1 -1
  112. package/dist/collection/components/wm-modal/wm-modal.js +463 -463
  113. package/dist/collection/components/wm-modal/wm-modal.js.map +1 -1
  114. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +177 -177
  115. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js.map +1 -1
  116. package/dist/collection/components/wm-navigation/wm-navigation-item.js +131 -131
  117. package/dist/collection/components/wm-navigation/wm-navigation-item.js.map +1 -1
  118. package/dist/collection/components/wm-navigation/wm-navigation.js +218 -223
  119. package/dist/collection/components/wm-navigation/wm-navigation.js.map +1 -1
  120. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +107 -107
  121. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js.map +1 -1
  122. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -124
  123. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js.map +1 -1
  124. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  125. package/dist/collection/components/wm-navigator/wm-navigator.js.map +1 -1
  126. package/dist/collection/components/wm-option/wm-option.js +436 -436
  127. package/dist/collection/components/wm-option/wm-option.js.map +1 -1
  128. package/dist/collection/components/wm-pagination/wm-pagination.js +371 -371
  129. package/dist/collection/components/wm-pagination/wm-pagination.js.map +1 -1
  130. package/dist/collection/components/wm-search/wm-search.css +5 -3
  131. package/dist/collection/components/wm-search/wm-search.js +440 -447
  132. package/dist/collection/components/wm-search/wm-search.js.map +1 -1
  133. package/dist/collection/components/wm-select/wm-select.css +4 -4
  134. package/dist/collection/components/wm-select/wm-select.js +1055 -1058
  135. package/dist/collection/components/wm-select/wm-select.js.map +1 -1
  136. package/dist/collection/components/wm-snackbar/wm-snackbar.js +283 -287
  137. package/dist/collection/components/wm-snackbar/wm-snackbar.js.map +1 -1
  138. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +212 -212
  139. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js.map +1 -1
  140. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +328 -328
  141. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js.map +1 -1
  142. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +109 -109
  143. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js.map +1 -1
  144. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +123 -123
  145. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js.map +1 -1
  146. package/dist/collection/components/wm-tag-input/wm-tag-input.css +4 -4
  147. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1267 -1279
  148. package/dist/collection/components/wm-tag-input/wm-tag-input.js.map +1 -1
  149. package/dist/collection/components/wm-timepicker/wm-timepicker.css +4 -4
  150. package/dist/collection/components/wm-timepicker/wm-timepicker.js +606 -606
  151. package/dist/collection/components/wm-timepicker/wm-timepicker.js.map +1 -1
  152. package/dist/collection/components/wm-toggletip/wm-toggletip.js +254 -254
  153. package/dist/collection/components/wm-toggletip/wm-toggletip.js.map +1 -1
  154. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +773 -775
  155. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js.map +1 -1
  156. package/dist/collection/components/wm-uploader/wm-uploader.js +965 -1034
  157. package/dist/collection/components/wm-uploader/wm-uploader.js.map +1 -1
  158. package/dist/collection/components/wm-wrapper/wm-wrapper.js +29 -29
  159. package/dist/collection/components/wm-wrapper/wm-wrapper.js.map +1 -1
  160. package/dist/collection/dev/scripts.js +20 -20
  161. package/dist/collection/global/__mocks__/functions.js +7 -7
  162. package/dist/collection/global/__mocks__/functions.js.map +1 -1
  163. package/dist/collection/global/functions.js +521 -521
  164. package/dist/collection/global/functions.js.map +1 -1
  165. package/dist/collection/global/global.js +70 -70
  166. package/dist/collection/global/global.js.map +1 -1
  167. package/dist/collection/global/interfaces.js +50 -50
  168. package/dist/collection/global/interfaces.js.map +1 -1
  169. package/dist/collection/global/intl.js +133 -7
  170. package/dist/collection/global/intl.js.map +1 -1
  171. package/dist/collection/global/services/__mocks__/http-service.js +131 -131
  172. package/dist/collection/global/services/__mocks__/http-service.js.map +1 -1
  173. package/dist/collection/global/services/http-service.js +51 -51
  174. package/dist/collection/global/services/http-service.js.map +1 -1
  175. package/dist/collection/lang/lang.js +6 -6
  176. package/dist/collection/lang/lang.js.map +1 -1
  177. package/dist/collection/lang/missing.js +43 -43
  178. package/dist/collection/lang/piglatin.js +93 -93
  179. package/dist/esm/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +591 -591
  180. package/dist/esm/chartFunctions-a72f5835.js.map +1 -0
  181. package/dist/esm/{functions-bb1309d0.js → functions-dc9964aa.js} +478 -478
  182. package/dist/esm/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
  183. package/dist/esm/{global-2c5c2727.js → global-3d0ef32b.js} +63 -63
  184. package/dist/esm/global-3d0ef32b.js.map +1 -0
  185. package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +50 -50
  186. package/dist/esm/http-service-5d037e16.js.map +1 -0
  187. package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +30 -30
  188. package/dist/esm/interfaces-61c6305b.js.map +1 -0
  189. package/dist/esm/intl-4d4826dd.js +137 -0
  190. package/dist/esm/intl-4d4826dd.js.map +1 -0
  191. package/dist/esm/loader.js +2 -2
  192. package/dist/esm/polyfills/core-js.js +0 -0
  193. package/dist/esm/polyfills/dom.js +0 -0
  194. package/dist/esm/polyfills/es5-html-element.js +0 -0
  195. package/dist/esm/polyfills/index.js +0 -0
  196. package/dist/esm/polyfills/system.js +0 -0
  197. package/dist/esm/priv-chart-popover.entry.js +91 -91
  198. package/dist/esm/priv-chart-popover.entry.js.map +1 -1
  199. package/dist/esm/priv-datepicker.entry.js +657 -657
  200. package/dist/esm/priv-datepicker.entry.js.map +1 -1
  201. package/dist/esm/priv-navigator-button.entry.js +19 -19
  202. package/dist/esm/priv-navigator-button.entry.js.map +1 -1
  203. package/dist/esm/priv-navigator-item.entry.js +23 -23
  204. package/dist/esm/priv-navigator-item.entry.js.map +1 -1
  205. package/dist/esm/ripple.js +2 -2
  206. package/dist/esm/wm-action-menu_2.entry.js +334 -334
  207. package/dist/esm/wm-action-menu_2.entry.js.map +1 -1
  208. package/dist/esm/wm-button.entry.js +260 -260
  209. package/dist/esm/wm-button.entry.js.map +1 -1
  210. package/dist/esm/wm-chart-slice.entry.js +18 -18
  211. package/dist/esm/wm-chart-slice.entry.js.map +1 -1
  212. package/dist/esm/wm-chart.entry.js +179 -179
  213. package/dist/esm/wm-chart.entry.js.map +1 -1
  214. package/dist/esm/wm-datepicker.entry.js +264 -264
  215. package/dist/esm/wm-datepicker.entry.js.map +1 -1
  216. package/dist/esm/wm-file-list.entry.js +35 -35
  217. package/dist/esm/wm-file-list.entry.js.map +1 -1
  218. package/dist/esm/wm-file.entry.js +201 -201
  219. package/dist/esm/wm-file.entry.js.map +1 -1
  220. package/dist/esm/wm-input.entry.js +124 -140
  221. package/dist/esm/wm-input.entry.js.map +1 -1
  222. package/dist/esm/wm-modal-footer.entry.js +33 -33
  223. package/dist/esm/wm-modal-footer.entry.js.map +1 -1
  224. package/dist/esm/wm-modal-header.entry.js +32 -32
  225. package/dist/esm/wm-modal-header.entry.js.map +1 -1
  226. package/dist/esm/wm-modal.entry.js +152 -152
  227. package/dist/esm/wm-modal.entry.js.map +1 -1
  228. package/dist/esm/wm-navigation_3.entry.js +225 -230
  229. package/dist/esm/wm-navigation_3.entry.js.map +1 -1
  230. package/dist/esm/wm-navigator.entry.js +264 -264
  231. package/dist/esm/wm-navigator.entry.js.map +1 -1
  232. package/dist/esm/wm-network-uploader.entry.js +465 -467
  233. package/dist/esm/wm-network-uploader.entry.js.map +1 -1
  234. package/dist/esm/wm-option_2.entry.js +769 -772
  235. package/dist/esm/wm-option_2.entry.js.map +1 -1
  236. package/dist/esm/wm-pagination.entry.js +179 -179
  237. package/dist/esm/wm-pagination.entry.js.map +1 -1
  238. package/dist/esm/wm-progress-indicator_3.entry.js +155 -155
  239. package/dist/esm/wm-progress-indicator_3.entry.js.map +1 -1
  240. package/dist/esm/wm-search.entry.js +185 -192
  241. package/dist/esm/wm-search.entry.js.map +1 -1
  242. package/dist/esm/wm-snackbar.entry.js +155 -159
  243. package/dist/esm/wm-snackbar.entry.js.map +1 -1
  244. package/dist/esm/wm-tab-item_3.entry.js +264 -264
  245. package/dist/esm/wm-tab-item_3.entry.js.map +1 -1
  246. package/dist/esm/wm-tag-input-row.entry.js +14 -14
  247. package/dist/esm/wm-tag-input-row.entry.js.map +1 -1
  248. package/dist/esm/wm-tag-input.entry.js +912 -924
  249. package/dist/esm/wm-tag-input.entry.js.map +1 -1
  250. package/dist/esm/wm-timepicker.entry.js +386 -386
  251. package/dist/esm/wm-timepicker.entry.js.map +1 -1
  252. package/dist/esm/wm-toggletip.entry.js +130 -130
  253. package/dist/esm/wm-toggletip.entry.js.map +1 -1
  254. package/dist/esm/wm-uploader.entry.js +441 -510
  255. package/dist/esm/wm-uploader.entry.js.map +1 -1
  256. package/dist/esm/wm-wrapper.entry.js +12 -12
  257. package/dist/esm/wm-wrapper.entry.js.map +1 -1
  258. package/dist/esm-es5/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +2 -2
  259. package/dist/esm-es5/chartFunctions-a72f5835.js.map +1 -0
  260. package/dist/esm-es5/{functions-bb1309d0.js → functions-dc9964aa.js} +1 -1
  261. package/dist/esm-es5/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
  262. package/dist/esm-es5/global-3d0ef32b.js +2 -0
  263. package/dist/esm-es5/global-3d0ef32b.js.map +1 -0
  264. package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +1 -1
  265. package/dist/esm-es5/http-service-5d037e16.js.map +1 -0
  266. package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +1 -1
  267. package/dist/esm-es5/interfaces-61c6305b.js.map +1 -0
  268. package/dist/esm-es5/intl-4d4826dd.js +2 -0
  269. package/dist/esm-es5/intl-4d4826dd.js.map +1 -0
  270. package/dist/esm-es5/loader.js +1 -1
  271. package/dist/esm-es5/loader.js.map +1 -1
  272. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  273. package/dist/esm-es5/priv-chart-popover.entry.js.map +1 -1
  274. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  275. package/dist/esm-es5/priv-datepicker.entry.js.map +1 -1
  276. package/dist/esm-es5/priv-navigator-button.entry.js.map +1 -1
  277. package/dist/esm-es5/priv-navigator-item.entry.js.map +1 -1
  278. package/dist/esm-es5/ripple.js +1 -1
  279. package/dist/esm-es5/ripple.js.map +1 -1
  280. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  281. package/dist/esm-es5/wm-action-menu_2.entry.js.map +1 -1
  282. package/dist/esm-es5/wm-button.entry.js +1 -1
  283. package/dist/esm-es5/wm-button.entry.js.map +1 -1
  284. package/dist/esm-es5/wm-chart-slice.entry.js.map +1 -1
  285. package/dist/esm-es5/wm-chart.entry.js +1 -1
  286. package/dist/esm-es5/wm-chart.entry.js.map +1 -1
  287. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  288. package/dist/esm-es5/wm-datepicker.entry.js.map +1 -1
  289. package/dist/esm-es5/wm-file-list.entry.js.map +1 -1
  290. package/dist/esm-es5/wm-file.entry.js +1 -1
  291. package/dist/esm-es5/wm-file.entry.js.map +1 -1
  292. package/dist/esm-es5/wm-input.entry.js +1 -1
  293. package/dist/esm-es5/wm-input.entry.js.map +1 -1
  294. package/dist/esm-es5/wm-modal-footer.entry.js.map +1 -1
  295. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  296. package/dist/esm-es5/wm-modal-header.entry.js.map +1 -1
  297. package/dist/esm-es5/wm-modal.entry.js +1 -1
  298. package/dist/esm-es5/wm-modal.entry.js.map +1 -1
  299. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  300. package/dist/esm-es5/wm-navigation_3.entry.js.map +1 -1
  301. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  302. package/dist/esm-es5/wm-navigator.entry.js.map +1 -1
  303. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  304. package/dist/esm-es5/wm-network-uploader.entry.js.map +1 -1
  305. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  306. package/dist/esm-es5/wm-option_2.entry.js.map +1 -1
  307. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  308. package/dist/esm-es5/wm-pagination.entry.js.map +1 -1
  309. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  310. package/dist/esm-es5/wm-progress-indicator_3.entry.js.map +1 -1
  311. package/dist/esm-es5/wm-search.entry.js +1 -1
  312. package/dist/esm-es5/wm-search.entry.js.map +1 -1
  313. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  314. package/dist/esm-es5/wm-snackbar.entry.js.map +1 -1
  315. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  316. package/dist/esm-es5/wm-tab-item_3.entry.js.map +1 -1
  317. package/dist/esm-es5/wm-tag-input-row.entry.js.map +1 -1
  318. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  319. package/dist/esm-es5/wm-tag-input.entry.js.map +1 -1
  320. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  321. package/dist/esm-es5/wm-timepicker.entry.js.map +1 -1
  322. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  323. package/dist/esm-es5/wm-toggletip.entry.js.map +1 -1
  324. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  325. package/dist/esm-es5/wm-uploader.entry.js.map +1 -1
  326. package/dist/esm-es5/wm-wrapper.entry.js.map +1 -1
  327. package/dist/ripple/{p-3f6c7e6c.entry.js → p-002d067e.entry.js} +2 -2
  328. package/dist/ripple/p-002d067e.entry.js.map +1 -0
  329. package/dist/ripple/p-02a1000a.entry.js +2 -0
  330. package/dist/ripple/p-02a1000a.entry.js.map +1 -0
  331. package/dist/ripple/{p-21bb563a.system.entry.js → p-04ae66fd.system.entry.js} +2 -2
  332. package/dist/ripple/p-04ae66fd.system.entry.js.map +1 -0
  333. package/dist/ripple/{p-c38f6103.system.js → p-0826dc64.system.js} +2 -2
  334. package/dist/ripple/{p-c38f6103.system.js.map → p-0826dc64.system.js.map} +1 -1
  335. package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +1 -1
  336. package/dist/ripple/p-08b7ec08.system.js.map +1 -0
  337. package/dist/ripple/{p-d5b0809e.entry.js → p-0ad3a708.entry.js} +2 -2
  338. package/dist/ripple/p-0ad3a708.entry.js.map +1 -0
  339. package/dist/ripple/p-0cd13c7d.system.entry.js +2 -0
  340. package/dist/ripple/p-0cd13c7d.system.entry.js.map +1 -0
  341. package/dist/ripple/p-0d7bccf7.entry.js.map +1 -1
  342. package/dist/ripple/p-0eb7b1b7.system.entry.js +2 -0
  343. package/dist/ripple/p-0eb7b1b7.system.entry.js.map +1 -0
  344. package/dist/ripple/{p-70768add.entry.js → p-11124a23.entry.js} +2 -2
  345. package/dist/ripple/p-11124a23.entry.js.map +1 -0
  346. package/dist/ripple/p-1808b90a.entry.js +2 -0
  347. package/dist/ripple/p-1808b90a.entry.js.map +1 -0
  348. package/dist/ripple/p-1fd20e05.system.entry.js +2 -0
  349. package/dist/ripple/p-1fd20e05.system.entry.js.map +1 -0
  350. package/dist/ripple/{p-f36b1c58.system.entry.js → p-23fa1ff6.system.entry.js} +2 -2
  351. package/dist/ripple/p-23fa1ff6.system.entry.js.map +1 -0
  352. package/dist/ripple/p-24a4cb11.system.entry.js.map +1 -1
  353. package/dist/ripple/p-2c2a7092.system.entry.js.map +1 -1
  354. package/dist/ripple/{p-9d02957d.system.js → p-313b6073.system.js} +1 -1
  355. package/dist/ripple/p-313b6073.system.js.map +1 -0
  356. package/dist/ripple/p-33558ec4.system.entry.js.map +1 -1
  357. package/dist/ripple/{p-28c12986.system.entry.js → p-33ec18d4.system.entry.js} +2 -2
  358. package/dist/ripple/p-33ec18d4.system.entry.js.map +1 -0
  359. package/dist/ripple/{p-7d0f3abe.entry.js → p-341aa131.entry.js} +2 -2
  360. package/dist/ripple/p-341aa131.entry.js.map +1 -0
  361. package/dist/ripple/p-3759b7af.system.entry.js.map +1 -1
  362. package/dist/ripple/p-38449dff.system.entry.js +2 -0
  363. package/dist/ripple/p-38449dff.system.entry.js.map +1 -0
  364. package/dist/ripple/{p-ee97c3f6.entry.js → p-384c4981.entry.js} +2 -2
  365. package/dist/ripple/p-384c4981.entry.js.map +1 -0
  366. package/dist/ripple/{p-b81ce905.system.entry.js → p-3869a69e.system.entry.js} +2 -2
  367. package/dist/ripple/p-3869a69e.system.entry.js.map +1 -0
  368. package/dist/ripple/p-4391166c.entry.js.map +1 -1
  369. package/dist/ripple/{p-e6e7cb2d.entry.js → p-43be123d.entry.js} +2 -2
  370. package/dist/ripple/p-43be123d.entry.js.map +1 -0
  371. package/dist/ripple/p-4a014591.entry.js.map +1 -1
  372. package/dist/ripple/p-4a06d0a9.system.entry.js +2 -0
  373. package/dist/ripple/p-4a06d0a9.system.entry.js.map +1 -0
  374. package/dist/ripple/p-4e02e2ae.entry.js +2 -0
  375. package/dist/ripple/p-4e02e2ae.entry.js.map +1 -0
  376. package/dist/ripple/p-56cd4d5e.entry.js +2 -0
  377. package/dist/ripple/p-56cd4d5e.entry.js.map +1 -0
  378. package/dist/ripple/p-59654f8e.entry.js.map +1 -1
  379. package/dist/ripple/p-5cc287d2.entry.js +2 -0
  380. package/dist/ripple/p-5cc287d2.entry.js.map +1 -0
  381. package/dist/ripple/{p-8eebf787.entry.js → p-7e0e6b00.entry.js} +2 -2
  382. package/dist/ripple/p-7e0e6b00.entry.js.map +1 -0
  383. package/dist/ripple/{p-0400599e.system.entry.js → p-833c622f.system.entry.js} +2 -2
  384. package/dist/ripple/p-833c622f.system.entry.js.map +1 -0
  385. package/dist/ripple/{p-b00991d9.system.entry.js → p-8613600d.system.entry.js} +2 -2
  386. package/dist/ripple/p-8613600d.system.entry.js.map +1 -0
  387. package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +1 -1
  388. package/dist/ripple/p-888bec42.js.map +1 -0
  389. package/dist/ripple/p-889579fc.entry.js +2 -0
  390. package/dist/ripple/p-889579fc.entry.js.map +1 -0
  391. package/dist/ripple/p-8c51e9f8.system.entry.js.map +1 -1
  392. package/dist/ripple/{p-42158d44.entry.js → p-8db604d2.entry.js} +2 -2
  393. package/dist/ripple/p-8db604d2.entry.js.map +1 -0
  394. package/dist/ripple/{p-24ef6556.system.entry.js → p-91deb45f.system.entry.js} +2 -2
  395. package/dist/ripple/p-91deb45f.system.entry.js.map +1 -0
  396. package/dist/ripple/p-9338011f.system.entry.js +2 -0
  397. package/dist/ripple/p-9338011f.system.entry.js.map +1 -0
  398. package/dist/ripple/p-976b2789.system.entry.js.map +1 -1
  399. package/dist/ripple/{p-1aa16d42.js → p-994303f2.js} +2 -2
  400. package/dist/ripple/p-994303f2.js.map +1 -0
  401. package/dist/ripple/p-9b2dfb54.js +2 -0
  402. package/dist/ripple/p-9b2dfb54.js.map +1 -0
  403. package/dist/ripple/p-9b9eb944.entry.js.map +1 -1
  404. package/dist/ripple/{p-980afed1.system.entry.js → p-a6d64d8a.system.entry.js} +2 -2
  405. package/dist/ripple/p-a6d64d8a.system.entry.js.map +1 -0
  406. package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +1 -1
  407. package/dist/ripple/p-a6d6eae7.js.map +1 -0
  408. package/dist/ripple/{p-219fbe2b.system.entry.js → p-a73cf968.system.entry.js} +2 -2
  409. package/dist/ripple/p-a73cf968.system.entry.js.map +1 -0
  410. package/dist/ripple/{p-76aafb99.system.entry.js → p-aed625c1.system.entry.js} +2 -2
  411. package/dist/ripple/p-aed625c1.system.entry.js.map +1 -0
  412. package/dist/ripple/{p-0d36ceba.system.entry.js → p-b5b521e4.system.entry.js} +2 -2
  413. package/dist/ripple/p-b5b521e4.system.entry.js.map +1 -0
  414. package/dist/ripple/{p-47d223f1.system.entry.js → p-b7451e73.system.entry.js} +2 -2
  415. package/dist/ripple/p-b7451e73.system.entry.js.map +1 -0
  416. package/dist/ripple/p-bafdcb4e.system.entry.js +2 -0
  417. package/dist/ripple/p-bafdcb4e.system.entry.js.map +1 -0
  418. package/dist/ripple/{p-262713b9.entry.js → p-bb45e122.entry.js} +2 -2
  419. package/dist/ripple/p-bb45e122.entry.js.map +1 -0
  420. package/dist/ripple/p-bd84628c.system.entry.js +2 -0
  421. package/dist/ripple/p-bd84628c.system.entry.js.map +1 -0
  422. package/dist/ripple/p-bf569af0.entry.js.map +1 -1
  423. package/dist/ripple/p-c094f6a8.entry.js +2 -0
  424. package/dist/ripple/p-c094f6a8.entry.js.map +1 -0
  425. package/dist/ripple/p-c36002b6.system.js +2 -0
  426. package/dist/ripple/p-c36002b6.system.js.map +1 -0
  427. package/dist/ripple/p-c5bf7db8.entry.js +2 -0
  428. package/dist/ripple/p-c5bf7db8.entry.js.map +1 -0
  429. package/dist/ripple/p-c68b3798.system.js +2 -0
  430. package/dist/ripple/p-c68b3798.system.js.map +1 -0
  431. package/dist/ripple/{p-05e0f901.js → p-c6a0f7e5.js} +1 -1
  432. package/dist/ripple/{p-05e0f901.js.map → p-c6a0f7e5.js.map} +1 -1
  433. package/dist/ripple/{p-bcba3ce8.entry.js → p-d46f5794.entry.js} +2 -2
  434. package/dist/ripple/p-d46f5794.entry.js.map +1 -0
  435. package/dist/ripple/{p-d7ffac2f.entry.js → p-d48313e0.entry.js} +2 -2
  436. package/dist/ripple/p-d48313e0.entry.js.map +1 -0
  437. package/dist/ripple/p-d939cb54.entry.js.map +1 -1
  438. package/dist/ripple/p-dbfd1640.system.entry.js.map +1 -1
  439. package/dist/ripple/{p-d7c55ce1.entry.js → p-e22854c1.entry.js} +2 -2
  440. package/dist/ripple/p-e22854c1.entry.js.map +1 -0
  441. package/dist/ripple/p-e70bb79f.js +2 -0
  442. package/dist/ripple/p-e70bb79f.js.map +1 -0
  443. package/dist/ripple/{p-e99a7f36.entry.js → p-ed82573a.entry.js} +2 -2
  444. package/dist/ripple/p-ed82573a.entry.js.map +1 -0
  445. package/dist/ripple/{p-bc28c815.system.js → p-f0fd8695.system.js} +1 -1
  446. package/dist/ripple/{p-bc28c815.system.js.map → p-f0fd8695.system.js.map} +1 -1
  447. package/dist/ripple/{p-e5f84104.system.entry.js → p-f312d59a.system.entry.js} +2 -2
  448. package/dist/ripple/p-f312d59a.system.entry.js.map +1 -0
  449. package/dist/ripple/{p-c19ddc00.system.entry.js → p-f59a495a.system.entry.js} +2 -2
  450. package/dist/ripple/p-f59a495a.system.entry.js.map +1 -0
  451. package/dist/ripple/{p-cc8ca6bd.system.js → p-f80eb8a5.system.js} +2 -2
  452. package/dist/ripple/p-f80eb8a5.system.js.map +1 -0
  453. package/dist/ripple/{p-1be55579.system.entry.js → p-fb67c39e.system.entry.js} +2 -2
  454. package/dist/ripple/p-fb67c39e.system.entry.js.map +1 -0
  455. package/dist/ripple/{p-20d0d019.entry.js → p-fc08d5e1.entry.js} +2 -2
  456. package/dist/ripple/p-fc08d5e1.entry.js.map +1 -0
  457. package/dist/ripple/{p-d7b946ed.entry.js → p-fe7da854.entry.js} +2 -2
  458. package/dist/ripple/p-fe7da854.entry.js.map +1 -0
  459. package/dist/ripple/ripple.esm.js +1 -1
  460. package/dist/ripple/ripple.esm.js.map +1 -1
  461. package/dist/ripple/ripple.js +1 -1
  462. package/dist/types/components/charts/chartFunctions.d.ts +37 -37
  463. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -0
  464. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  465. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +47 -0
  466. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +29 -0
  467. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +20 -0
  468. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  469. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +49 -0
  470. package/dist/types/components/wm-button/wm-button.d.ts +49 -0
  471. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -0
  472. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -0
  473. package/dist/types/components/wm-file/wm-file.d.ts +42 -0
  474. package/dist/types/components/wm-file-list/wm-file-list.d.ts +16 -0
  475. package/dist/types/components/wm-input/wm-input.d.ts +45 -0
  476. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -0
  477. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  478. package/dist/types/components/wm-modal/wm-modal-header.d.ts +10 -10
  479. package/dist/types/components/wm-modal/wm-modal.d.ts +40 -0
  480. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -0
  481. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -0
  482. package/dist/types/components/wm-navigation/wm-navigation.d.ts +26 -0
  483. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  484. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -0
  485. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -0
  486. package/dist/types/components/wm-option/wm-option.d.ts +34 -0
  487. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  488. package/dist/types/components/wm-search/wm-search.d.ts +77 -0
  489. package/dist/types/components/wm-select/wm-select.d.ts +101 -0
  490. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +31 -32
  491. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +37 -0
  492. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +52 -0
  493. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -0
  494. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +11 -0
  495. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +135 -0
  496. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +62 -0
  497. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +28 -0
  498. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -0
  499. package/dist/types/components/wm-uploader/wm-uploader.d.ts +99 -0
  500. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  501. package/dist/types/components.d.ts +27 -27
  502. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  503. package/dist/types/global/functions.d.ts +48 -48
  504. package/dist/types/global/global.d.ts +1 -1
  505. package/dist/types/global/interfaces.d.ts +74 -74
  506. package/dist/types/global/intl.d.ts +29 -1
  507. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  508. package/dist/types/global/services/http-service.d.ts +4 -4
  509. package/dist/types/lang/lang.d.ts +5 -5
  510. package/package.json +46 -46
  511. package/dist/cjs/chartFunctions-9dce0ea3.js.map +0 -1
  512. package/dist/cjs/global-c22b1249.js.map +0 -1
  513. package/dist/cjs/http-service-494d81de.js.map +0 -1
  514. package/dist/cjs/interfaces-a3338581.js.map +0 -1
  515. package/dist/cjs/intl-e14dc0a1.js +0 -13
  516. package/dist/cjs/intl-e14dc0a1.js.map +0 -1
  517. package/dist/esm/chartFunctions-1df8043a.js.map +0 -1
  518. package/dist/esm/global-2c5c2727.js.map +0 -1
  519. package/dist/esm/http-service-3dc3b3e7.js.map +0 -1
  520. package/dist/esm/interfaces-2b97fab2.js.map +0 -1
  521. package/dist/esm/intl-4153b9ef.js +0 -11
  522. package/dist/esm/intl-4153b9ef.js.map +0 -1
  523. package/dist/esm-es5/chartFunctions-1df8043a.js.map +0 -1
  524. package/dist/esm-es5/global-2c5c2727.js +0 -2
  525. package/dist/esm-es5/global-2c5c2727.js.map +0 -1
  526. package/dist/esm-es5/http-service-3dc3b3e7.js.map +0 -1
  527. package/dist/esm-es5/interfaces-2b97fab2.js.map +0 -1
  528. package/dist/esm-es5/intl-4153b9ef.js +0 -2
  529. package/dist/esm-es5/intl-4153b9ef.js.map +0 -1
  530. package/dist/ripple/p-0400599e.system.entry.js.map +0 -1
  531. package/dist/ripple/p-075607ac.entry.js +0 -2
  532. package/dist/ripple/p-075607ac.entry.js.map +0 -1
  533. package/dist/ripple/p-08d17d5a.entry.js +0 -2
  534. package/dist/ripple/p-08d17d5a.entry.js.map +0 -1
  535. package/dist/ripple/p-0d36ceba.system.entry.js.map +0 -1
  536. package/dist/ripple/p-124da634.entry.js +0 -2
  537. package/dist/ripple/p-124da634.entry.js.map +0 -1
  538. package/dist/ripple/p-1aa16d42.js.map +0 -1
  539. package/dist/ripple/p-1be55579.system.entry.js.map +0 -1
  540. package/dist/ripple/p-20d0d019.entry.js.map +0 -1
  541. package/dist/ripple/p-219fbe2b.system.entry.js.map +0 -1
  542. package/dist/ripple/p-21bb563a.system.entry.js.map +0 -1
  543. package/dist/ripple/p-241d4d41.system.entry.js +0 -2
  544. package/dist/ripple/p-241d4d41.system.entry.js.map +0 -1
  545. package/dist/ripple/p-24ef6556.system.entry.js.map +0 -1
  546. package/dist/ripple/p-262713b9.entry.js.map +0 -1
  547. package/dist/ripple/p-28c12986.system.entry.js.map +0 -1
  548. package/dist/ripple/p-3f6c7e6c.entry.js.map +0 -1
  549. package/dist/ripple/p-42158d44.entry.js.map +0 -1
  550. package/dist/ripple/p-43f1298b.js.map +0 -1
  551. package/dist/ripple/p-47d223f1.system.entry.js.map +0 -1
  552. package/dist/ripple/p-4d30004f.entry.js +0 -2
  553. package/dist/ripple/p-4d30004f.entry.js.map +0 -1
  554. package/dist/ripple/p-58b1415e.system.js +0 -2
  555. package/dist/ripple/p-58b1415e.system.js.map +0 -1
  556. package/dist/ripple/p-5cda4e9c.system.entry.js +0 -2
  557. package/dist/ripple/p-5cda4e9c.system.entry.js.map +0 -1
  558. package/dist/ripple/p-64f15a9e.system.entry.js +0 -2
  559. package/dist/ripple/p-64f15a9e.system.entry.js.map +0 -1
  560. package/dist/ripple/p-6e6b5b2c.system.entry.js +0 -2
  561. package/dist/ripple/p-6e6b5b2c.system.entry.js.map +0 -1
  562. package/dist/ripple/p-70768add.entry.js.map +0 -1
  563. package/dist/ripple/p-76aafb99.system.entry.js.map +0 -1
  564. package/dist/ripple/p-7d0f3abe.entry.js.map +0 -1
  565. package/dist/ripple/p-8aa85021.system.entry.js +0 -2
  566. package/dist/ripple/p-8aa85021.system.entry.js.map +0 -1
  567. package/dist/ripple/p-8eebf787.entry.js.map +0 -1
  568. package/dist/ripple/p-96b0ca93.system.js +0 -2
  569. package/dist/ripple/p-96b0ca93.system.js.map +0 -1
  570. package/dist/ripple/p-980afed1.system.entry.js.map +0 -1
  571. package/dist/ripple/p-9d02957d.system.js.map +0 -1
  572. package/dist/ripple/p-adbeb6a8.system.entry.js +0 -2
  573. package/dist/ripple/p-adbeb6a8.system.entry.js.map +0 -1
  574. package/dist/ripple/p-b00991d9.system.entry.js.map +0 -1
  575. package/dist/ripple/p-b81ce905.system.entry.js.map +0 -1
  576. package/dist/ripple/p-bcba3ce8.entry.js.map +0 -1
  577. package/dist/ripple/p-bf808ec4.entry.js +0 -2
  578. package/dist/ripple/p-bf808ec4.entry.js.map +0 -1
  579. package/dist/ripple/p-c19ddc00.system.entry.js.map +0 -1
  580. package/dist/ripple/p-cc8ca6bd.system.js.map +0 -1
  581. package/dist/ripple/p-ce52357e.js +0 -2
  582. package/dist/ripple/p-ce52357e.js.map +0 -1
  583. package/dist/ripple/p-d0f5773a.entry.js +0 -2
  584. package/dist/ripple/p-d0f5773a.entry.js.map +0 -1
  585. package/dist/ripple/p-d5b0809e.entry.js.map +0 -1
  586. package/dist/ripple/p-d7b946ed.entry.js.map +0 -1
  587. package/dist/ripple/p-d7c55ce1.entry.js.map +0 -1
  588. package/dist/ripple/p-d7ffac2f.entry.js.map +0 -1
  589. package/dist/ripple/p-dbf657c5.js +0 -2
  590. package/dist/ripple/p-dbf657c5.js.map +0 -1
  591. package/dist/ripple/p-e1b812ed.entry.js +0 -2
  592. package/dist/ripple/p-e1b812ed.entry.js.map +0 -1
  593. package/dist/ripple/p-e5f84104.system.entry.js.map +0 -1
  594. package/dist/ripple/p-e6e7cb2d.entry.js.map +0 -1
  595. package/dist/ripple/p-e99a7f36.entry.js.map +0 -1
  596. package/dist/ripple/p-ed14d37c.system.entry.js +0 -2
  597. package/dist/ripple/p-ed14d37c.system.entry.js.map +0 -1
  598. package/dist/ripple/p-ee97c3f6.entry.js.map +0 -1
  599. package/dist/ripple/p-f3130941.entry.js +0 -2
  600. package/dist/ripple/p-f3130941.entry.js.map +0 -1
  601. package/dist/ripple/p-f36b1c58.system.entry.js.map +0 -1
  602. package/dist/ripple/p-f4a622a9.system.entry.js +0 -2
  603. package/dist/ripple/p-f4a622a9.system.entry.js.map +0 -1
  604. package/dist/ripple/p-f5df5903.system.js.map +0 -1
  605. package/dist/ripple/p-fd8070fb.js.map +0 -1
@@ -1,930 +1,918 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-84a6ae22.js';
2
- import { g as generateId, d as debounce, q as csvToArray, i as intl, r as safeParseJSON, u as measureText, j as hideTooltip, s as showTooltip, m as shouldOpenUp } from './functions-bb1309d0.js';
2
+ import { g as generateId, d as debounce, q as csvToArray, i as intl, r as safeParseJSON, u as measureText, j as hideTooltip, s as showTooltip, m as shouldOpenUp } from './functions-dc9964aa.js';
3
+ import { g as globalMessages } from './intl-4d4826dd.js';
3
4
 
4
- const wmTagInputCss = ":host,wm-tag-input{font-family:inherit;width:100%;display:block}:host *,wm-tag-input *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper,wm-tag-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-tag-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-tag-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-tag-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-tag-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-tag-input .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-tag-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-tag-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-tag-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f026\";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-tag-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-tag-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper,wm-tag-input .wrapper{width:100%;height:100%;position:relative}:host .field-wrapper,wm-tag-input .field-wrapper{position:relative;width:100%;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused,wm-tag-input .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .field-wrapper.invalid,wm-tag-input .field-wrapper.invalid{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .character-count,wm-tag-input .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper,wm-tag-input .tags-and-input-wrapper{position:relative;width:100%;padding:0.5rem 0.25rem 0.5rem 0;margin-bottom:-0.5rem}:host .upper-row,wm-tag-input .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between}:host .upper-row:before,wm-tag-input .upper-row:before{-ms-flex-item-align:start;align-self:flex-start;display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f349\";color:#b5b5b5;padding:0.75rem 0.5rem 0.75rem 0.75rem}:host .lower-row,wm-tag-input .lower-row{width:100%;min-height:1.875rem}:host #max-tags,wm-tag-input #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:1.875rem;background-color:#e6e6e6;padding:0.5rem 1rem;color:#4a4a4a;font-size:0.875rem;border-top:1px solid rgba(35, 35, 35, 0.6);border-radius:0 0 3px 3px}:host .tag-area,wm-tag-input .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}:host .tag-area:focus,wm-tag-input .tag-area:focus{outline:none}:host .tag-area [role=option],wm-tag-input .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:#4a4a4a;background-color:rgba(3, 0, 0, 0.1);padding:0.5rem 0.625rem;margin-bottom:0.5rem;margin-right:0.25rem;margin-left:0.25rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight,wm-tag-input .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}@keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}:host .tag-area [role=option].focused,wm-tag-input .tag-area [role=option].focused{background-color:#d1d1d1}:host .tag-area [role=option].locked,wm-tag-input .tag-area [role=option].locked{background-color:#6b6b6b;color:white}:host .tag-area [role=option] .icon,wm-tag-input .tag-area [role=option] .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;padding:0;margin-left:0.5rem}:host .tag-area [role=option] .icon.remove-btn,wm-tag-input .tag-area [role=option] .icon.remove-btn{border:1px solid #575195;color:#575195;border-radius:50%;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .icon.remove-btn:hover,wm-tag-input .tag-area [role=option] .icon.remove-btn:hover{color:white;background-color:#575195}:host .tag-area [role=option] .icon.remove-btn:before,wm-tag-input .tag-area [role=option] .icon.remove-btn:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f156\"}:host .tag-area [role=option] .icon.lock,wm-tag-input .tag-area [role=option] .icon.lock{color:white}:host .tag-area [role=option] .icon.lock:before,wm-tag-input .tag-area [role=option] .icon.lock:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f341\"}:host input,wm-tag-input input{font-family:inherit;border:none;height:1.75rem;padding:0;margin-bottom:0.5rem;margin-right:0.25rem;padding-left:0.5rem;right:0px}:host input.hidden,wm-tag-input input.hidden{display:none}:host input:focus,wm-tag-input input:focus{outline:none}:host .dropdown-wrapper,wm-tag-input .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown,wm-tag-input .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open,wm-tag-input .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards,wm-tag-input .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div,wm-tag-input .dropdown-wrapper li,wm-tag-input .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:#fff;list-style:none;height:2.6875rem;white-space:pre}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn,wm-tag-input .dropdown-wrapper li[role=option],wm-tag-input .dropdown-wrapper li.add-new-btn,wm-tag-input .dropdown-wrapper div[role=option],wm-tag-input .dropdown-wrapper div.add-new-btn{cursor:pointer;color:#575195;font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper li[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper li.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper div[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:#6b6b6b;font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused,wm-tag-input .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li[role=option].focused,wm-tag-input .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li.add-new-btn.focused,wm-tag-input .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div[role=option].focused,wm-tag-input .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div.add-new-btn.focused{outline:none;background:#f4f4f4}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text,wm-tag-input .dropdown-wrapper li.help-text,wm-tag-input .dropdown-wrapper div.help-text{color:#4a4a4a;height:auto;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem;white-space:normal}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child),wm-tag-input .dropdown-wrapper li:not(:last-child),wm-tag-input .dropdown-wrapper div:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .info-text,wm-tag-input .info-text{font-style:italic;margin-top:0.25rem}:host .table-wrapper,wm-tag-input .table-wrapper{min-height:10rem;overflow:auto;margin-top:1.5rem}:host .table-wrapper #table,wm-tag-input .table-wrapper #table{width:100%;border-spacing:0px}:host .table-wrapper #table.fixed-widths,wm-tag-input .table-wrapper #table.fixed-widths{table-layout:fixed}:host .table-wrapper #table .headers,wm-tag-input .table-wrapper #table .headers{height:2.5rem;background-color:#eeedf4}:host .table-wrapper #table .headers th,wm-tag-input .table-wrapper #table .headers th{text-align:left;font-size:0.75rem;font-weight:700;text-transform:uppercase;padding:0 1.5rem}:host .table-wrapper tr:nth-child(even),wm-tag-input .table-wrapper tr:nth-child(even){background-color:#fafafa}:host .table-wrapper tr.selected,wm-tag-input .table-wrapper tr.selected{background-color:rgba(25, 161, 169, 0.2);-webkit-box-shadow:inset 0 0 0 1px #19a1a9;box-shadow:inset 0 0 0 1px #19a1a9;font-weight:500}:host .table-wrapper tr.focused:not(.locked),:host .table-wrapper tr:hover:not(.locked),wm-tag-input .table-wrapper tr.focused:not(.locked),wm-tag-input .table-wrapper tr:hover:not(.locked){background-color:#e9e7ec;-webkit-box-shadow:none;box-shadow:none}:host .table-wrapper tr.locked td,wm-tag-input .table-wrapper tr.locked td{cursor:auto}:host .table-wrapper tr.locked td:first-child .cell-content-wrapper:before,wm-tag-input .table-wrapper tr.locked td:first-child .cell-content-wrapper:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f33e\";margin-right:0.5rem;color:#4a4a4a}:host .table-wrapper td,wm-tag-input .table-wrapper td{height:3.75rem;vertical-align:middle;padding:0 1.5rem;cursor:pointer}:host .table-wrapper td.focused,wm-tag-input .table-wrapper td.focused{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e;box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e}:host .table-wrapper td .cell-content-wrapper.trunc,wm-tag-input .table-wrapper td .cell-content-wrapper.trunc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .table-wrapper td .description,wm-tag-input .table-wrapper td .description{display:none}:host .no-results,wm-tag-input .no-results{padding:1.25rem 1.5rem}:host .sr-only,wm-tag-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host #error,wm-tag-input #error{display:block;font-style:italic;color:#c0392b;font-size:0.875rem;margin-top:0.25rem}";
5
+ const wmTagInputCss = ":host,wm-tag-input{font-family:inherit;width:100%;display:block}:host *,wm-tag-input *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper,wm-tag-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-tag-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-tag-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-tag-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-tag-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-tag-input .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-tag-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-tag-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-tag-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f026\";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-tag-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-tag-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper,wm-tag-input .wrapper{width:100%;height:100%;position:relative}:host .field-wrapper,wm-tag-input .field-wrapper{position:relative;width:100%;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused,wm-tag-input .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px #19a1a9;-moz-box-shadow:0 0 0 1px #19a1a9;box-shadow:0 0 0 1px #19a1a9;outline:none;border-color:#19a1a9}:host .field-wrapper.invalid,wm-tag-input .field-wrapper.invalid{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .character-count,wm-tag-input .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper,wm-tag-input .tags-and-input-wrapper{position:relative;width:100%;padding:0.5rem 0.25rem 0.5rem 0;margin-bottom:-0.5rem}:host .upper-row,wm-tag-input .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between}:host .upper-row:before,wm-tag-input .upper-row:before{-ms-flex-item-align:start;align-self:flex-start;display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f349\";color:#b5b5b5;padding:0.75rem 0.5rem 0.75rem 0.75rem}:host .lower-row,wm-tag-input .lower-row{width:100%;min-height:1.875rem}:host #max-tags,wm-tag-input #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:1.875rem;background-color:#e6e6e6;padding:0.5rem 1rem;color:#4a4a4a;font-size:0.875rem;border-top:1px solid rgba(35, 35, 35, 0.6);border-radius:0 0 3px 3px}:host .tag-area,wm-tag-input .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}:host .tag-area:focus,wm-tag-input .tag-area:focus{outline:none}:host .tag-area [role=option],wm-tag-input .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:#4a4a4a;background-color:rgba(3, 0, 0, 0.1);padding:0.5rem 0.625rem;margin-bottom:0.5rem;margin-right:0.25rem;margin-left:0.25rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight,wm-tag-input .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}@keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}:host .tag-area [role=option].focused,wm-tag-input .tag-area [role=option].focused{background-color:#d1d1d1}:host .tag-area [role=option].locked,wm-tag-input .tag-area [role=option].locked{background-color:#6b6b6b;color:white}:host .tag-area [role=option] .icon,wm-tag-input .tag-area [role=option] .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;padding:0;margin-left:0.5rem}:host .tag-area [role=option] .icon.remove-btn,wm-tag-input .tag-area [role=option] .icon.remove-btn{border:1px solid #575195;color:#575195;border-radius:50%;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .icon.remove-btn:hover,wm-tag-input .tag-area [role=option] .icon.remove-btn:hover{color:white;background-color:#575195}:host .tag-area [role=option] .icon.remove-btn:before,wm-tag-input .tag-area [role=option] .icon.remove-btn:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f156\"}:host .tag-area [role=option] .icon.lock,wm-tag-input .tag-area [role=option] .icon.lock{color:white}:host .tag-area [role=option] .icon.lock:before,wm-tag-input .tag-area [role=option] .icon.lock:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f341\"}:host input,wm-tag-input input{font-family:inherit;border:none;height:1.75rem;padding:0;margin-bottom:0.5rem;margin-right:0.25rem;padding-left:0.5rem;right:0px}:host input.hidden,wm-tag-input input.hidden{display:none}:host input:focus,wm-tag-input input:focus{outline:none}:host .dropdown-wrapper,wm-tag-input .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown,wm-tag-input .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open,wm-tag-input .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards,wm-tag-input .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div,wm-tag-input .dropdown-wrapper li,wm-tag-input .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:#fff;list-style:none;height:2.6875rem;white-space:pre}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn,wm-tag-input .dropdown-wrapper li[role=option],wm-tag-input .dropdown-wrapper li.add-new-btn,wm-tag-input .dropdown-wrapper div[role=option],wm-tag-input .dropdown-wrapper div.add-new-btn{cursor:pointer;color:#575195;font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper li[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper li.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper div[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:#6b6b6b;font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused,wm-tag-input .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li[role=option].focused,wm-tag-input .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li.add-new-btn.focused,wm-tag-input .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div[role=option].focused,wm-tag-input .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div.add-new-btn.focused{outline:none;background:#f4f4f4}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text,wm-tag-input .dropdown-wrapper li.help-text,wm-tag-input .dropdown-wrapper div.help-text{color:#4a4a4a;height:auto;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem;white-space:normal}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child),wm-tag-input .dropdown-wrapper li:not(:last-child),wm-tag-input .dropdown-wrapper div:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .info-text,wm-tag-input .info-text{font-style:italic;margin-top:0.25rem}:host .table-wrapper,wm-tag-input .table-wrapper{min-height:10rem;overflow:auto;margin-top:1.5rem}:host .table-wrapper #table,wm-tag-input .table-wrapper #table{width:100%;border-spacing:0px}:host .table-wrapper #table.fixed-widths,wm-tag-input .table-wrapper #table.fixed-widths{table-layout:fixed}:host .table-wrapper #table .headers,wm-tag-input .table-wrapper #table .headers{height:2.5rem;background-color:#eeedf4}:host .table-wrapper #table .headers th,wm-tag-input .table-wrapper #table .headers th{text-align:left;font-size:0.75rem;font-weight:700;text-transform:uppercase;padding:0 1.5rem}:host .table-wrapper tr:nth-child(even),wm-tag-input .table-wrapper tr:nth-child(even){background-color:#fafafa}:host .table-wrapper tr.selected,wm-tag-input .table-wrapper tr.selected{background-color:rgba(25, 161, 169, 0.2);-webkit-box-shadow:inset 0 0 0 1px #19a1a9;box-shadow:inset 0 0 0 1px #19a1a9;font-weight:500}:host .table-wrapper tr.focused:not(.locked),:host .table-wrapper tr:hover:not(.locked),wm-tag-input .table-wrapper tr.focused:not(.locked),wm-tag-input .table-wrapper tr:hover:not(.locked){background-color:#e9e7ec;-webkit-box-shadow:none;box-shadow:none}:host .table-wrapper tr.locked td,wm-tag-input .table-wrapper tr.locked td{cursor:auto}:host .table-wrapper tr.locked td:first-child .cell-content-wrapper:before,wm-tag-input .table-wrapper tr.locked td:first-child .cell-content-wrapper:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f33e\";margin-right:0.5rem;color:#4a4a4a}:host .table-wrapper td,wm-tag-input .table-wrapper td{height:3.75rem;vertical-align:middle;padding:0 1.5rem;cursor:pointer}:host .table-wrapper td.focused,wm-tag-input .table-wrapper td.focused{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e;box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e}:host .table-wrapper td .cell-content-wrapper.trunc,wm-tag-input .table-wrapper td .cell-content-wrapper.trunc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .table-wrapper td .description,wm-tag-input .table-wrapper td .description{display:none}:host .no-results,wm-tag-input .no-results{padding:1.25rem 1.5rem}:host .sr-only,wm-tag-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host #error,wm-tag-input #error{display:block;font-style:italic;color:#c0392b;font-size:0.875rem;margin-top:0.25rem}";
5
6
 
6
- const TagInput = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.wmTagInputChanged = createEvent(this, "wmTagInputChanged", 7);
10
- this.uid = this.el.id ? this.el.id : generateId();
11
- this.openUp = false;
12
- this.tooltipVisible = false;
13
- this.debouncedUpdate = debounce(() => forceUpdate(this.el), 30);
14
- this.label = undefined;
15
- this.labelPosition = "top";
16
- this.options = "";
17
- this.selectedTags = "";
18
- this.info = undefined;
19
- this.errorMessage = undefined;
20
- this.addNew = true;
21
- this.placeholder = undefined;
22
- this.requiredField = false;
23
- this.characterLimit = 50;
24
- this.maxTags = undefined;
25
- this.tagInputType = "dropdown";
26
- this.colHeaders = undefined;
27
- this.colWidths = undefined;
28
- this.colWrap = undefined;
29
- this.messageConfig = "";
30
- this.focusedListItem = undefined;
31
- this.focusedTag = null;
32
- this.tablePosition = { row: 0, column: 1 };
33
- this.isExpanded = false;
34
- this.tagsList = csvToArray(this.selectedTags);
35
- this.optionsList = csvToArray(this.options);
36
- this.charCount = 0;
37
- this.liveRegionMessage = "";
38
- }
39
- get focusedElement() {
40
- return this.el.shadowRoot.activeElement;
41
- }
42
- get listItemEls() {
43
- return Array.from(this.dropdownEl.querySelectorAll("li"));
44
- }
45
- get tagEls() {
46
- return this.tagAreaEl ? Array.from(this.tagAreaEl.querySelectorAll(".tag")) : [];
47
- }
48
- get nonLockedTagEls() {
49
- return this.tagEls.filter((tag) => !tag.classList.contains("locked"));
50
- }
51
- get optionEls() {
52
- return Array.from(this.dropdownEl.querySelectorAll(".option"));
53
- }
54
- get wmRowEls() {
55
- return Array.from(this.el.querySelectorAll("wm-tag-input-row"));
56
- }
57
- get localRowEls() {
58
- return Array.from(this.el.shadowRoot.querySelectorAll("tr"));
59
- }
60
- get filteredRows() {
61
- return this.wmRowEls.filter((row) => {
62
- const colValues = [row.col1, row.col2, row.col3, row.col4].join("").toLowerCase();
63
- return this.inputEl && this.inputEl.value ? colValues.includes(this.inputEl.value.toLowerCase()) : true;
64
- });
65
- }
66
- get nonLockedTagsList() {
67
- let list = [];
68
- if (this.tagInputType === "table") {
69
- this.tagsList.forEach((id) => {
70
- const correspondingRowEl = this.wmRowEls.filter((row) => id === row.id)[0];
71
- if (!correspondingRowEl.locked) {
72
- list.push(id);
73
- }
74
- });
75
- }
76
- else if (this.tagInputType === "dropdown") {
77
- list = this.tagsList;
78
- }
79
- return list;
80
- }
81
- get tagLimitReached() {
82
- return !!(this.maxTags && this.tagsList.length >= this.maxTags);
83
- }
84
- get noResultsMessage() {
85
- return intl.formatMessage({
86
- id: "tagInput.noResults",
87
- defaultMessage: "No results match your search.",
88
- description: "Message displayed when a user's search returns empty.",
89
- });
90
- }
91
- get componentMessages() {
92
- const addNewHelpText = intl.formatMessage({
93
- id: "tagInput.addNewHelpText",
94
- defaultMessage: "Press the Enter or Comma key to add a new tag.",
95
- description: "Help text appearing in a dropdown. Use imperative",
96
- });
97
- const selectionHelpText = intl.formatMessage({
98
- id: "tagInput.selectionHelpText",
99
- defaultMessage: "Search and select a tag.",
100
- description: "Help text appearing in a dropdown. Use imperative",
101
- });
102
- const maxTagsReachedMessage = intl.formatMessage({
103
- id: "tagInput.maxTagsReached",
104
- defaultMessage: "No more tags can be added because the limit has been reached.",
105
- });
106
- const tagAreaInstructions = intl.formatMessage({
107
- id: "tagInput.tagAreaInstructions",
108
- defaultMessage: "tag selection. Press Backspace or Delete to remove a tag.",
109
- });
110
- const tagsAddedMessage = intl.formatMessage({
111
- id: "tagInput.tagsAdded",
112
- defaultMessage: "Tags added",
113
- description: "For the user to understand how close they are to the tag limit, followed by x/y count",
114
- });
115
- const defaultConfig = {
116
- addNewHelpText: addNewHelpText,
117
- selectionHelpText: selectionHelpText,
118
- maxTagsReached: maxTagsReachedMessage,
119
- tagAreaInstructions: tagAreaInstructions,
120
- tagsAdded: tagsAddedMessage,
121
- };
122
- const userProvidedConfig = safeParseJSON(this.messageConfig);
123
- return userProvidedConfig ? Object.assign(Object.assign({}, defaultConfig), userProvidedConfig) : defaultConfig;
124
- }
125
- get inputMinimumWidth() {
126
- // 150px is the minimum width of the input field, or the length of the placeholder text
127
- const inputElStyles = getComputedStyle(this.inputEl);
128
- const tagElStyles = getComputedStyle(this.tagEls[this.tagEls.length - 1]);
129
- const inputElBuffer = [
130
- inputElStyles.paddingLeft,
131
- inputElStyles.paddingRight,
132
- inputElStyles.marginLeft,
133
- inputElStyles.marginRight,
134
- tagElStyles.marginRight,
135
- ].reduce((prev, curr) => prev + parseInt(curr.replace("px", "")), 0);
136
- const minimumWidth = Math.max(150, measureText(this.inputEl, this.placeholder).width + inputElBuffer);
137
- return minimumWidth;
138
- }
139
- generateTagAddedMessage(tag) {
140
- return intl.formatMessage({
141
- id: "tagInput.tagAdded",
142
- defaultMessage: "{tagName} added.",
143
- description: "A confirmation for adding a tag.",
144
- }, { tagName: tag });
145
- }
146
- generateTagAlreadyAddedMessage(tag) {
147
- return intl.formatMessage({
148
- id: "tagInput.tagAlreadyAdded",
149
- defaultMessage: "{tagName} has already been added.",
150
- description: "An alert for adding a tag that is already present.",
151
- }, { tagName: tag });
152
- }
153
- generateCharacterLimitLabel(characterLimit) {
154
- return intl.formatMessage({
155
- id: "global.characterLimit",
156
- defaultMessage: "{limit, number} characters allowed.",
157
- description: "for screen readers",
158
- }, { limit: characterLimit });
159
- }
160
- componentWillLoad() {
161
- if (!this.placeholder) {
162
- this.placeholder = this.createPlaceholderDefault(this.addNew, !!this.options);
163
- }
164
- if (!this.label) {
165
- console.error("wm-tag-input must have a label property");
166
- }
167
- this.consolidateSelectedTags();
168
- this.el.focus = () => {
169
- const firstFocusableTag = this.nonLockedTagEls[0];
170
- if (firstFocusableTag) {
171
- this.tagAreaEl.focus();
172
- this.focusTag(firstFocusableTag);
173
- }
174
- else {
175
- this.inputEl.focus();
176
- }
177
- };
178
- // on resize of component, trigger componentDidRender -> positionInput
179
- const resizeObserver = new ResizeObserver(() => this.debouncedUpdate());
180
- resizeObserver.observe(this.el);
181
- }
182
- componentDidLoad() {
183
- // prevent highlighting of pre-selected tags
184
- this.tagEls.forEach((el) => el.classList.remove("highlight"));
185
- }
186
- componentDidRender() {
187
- this.positionInput();
188
- }
189
- consolidateSelectedTags() {
190
- this.tagsList.forEach((tag) => {
191
- if (!this.includesCaseInsensitive(this.optionsList, tag)) {
192
- this.options += `${this.options.length > 0 ? "," : ""}${tag}`;
193
- }
194
- });
195
- this.optionsList = csvToArray(this.options);
196
- }
197
- createPlaceholderDefault(addNew, hasOptions) {
198
- const addAndSearchPlaceholder = intl.formatMessage({
199
- id: "tagInput.placeholderAddAndSearch",
200
- defaultMessage: "Add or search for a tag",
201
- description: "Placeholder text. Use imperative",
202
- });
203
- const searchPlaceholder = intl.formatMessage({
204
- id: "tagInput.placeholderSearch",
205
- defaultMessage: "Search and select a tag",
206
- description: "Placeholder text. Use imperative",
207
- });
208
- const addPlaceholder = intl.formatMessage({
209
- id: "tagInput.placeholderAdd",
210
- defaultMessage: "Add a new tag",
211
- description: "Placeholder text. Use imperative",
212
- });
213
- let placeholder = "";
214
- if (addNew && hasOptions) {
215
- placeholder = addAndSearchPlaceholder;
216
- }
217
- else if (!addNew && hasOptions) {
218
- placeholder = searchPlaceholder;
219
- }
220
- else if (addNew) {
221
- placeholder = addPlaceholder;
222
- }
223
- return placeholder;
224
- }
225
- reflectSelectedTags(newValue, oldValue) {
226
- const isAddition = newValue.length > oldValue.length;
227
- let changedTag = "";
228
- let selectedTags = this.tagsList;
229
- if (isAddition) {
230
- changedTag = newValue.filter((val) => !oldValue.includes(val))[0];
231
- }
232
- else {
233
- changedTag = oldValue.filter((val) => !newValue.includes(val))[0];
234
- }
235
- // event emitted by type table uses element references instead of strings
236
- if (this.tagInputType === "table") {
237
- changedTag = this.wmRowEls.filter((row) => row.id === changedTag)[0];
238
- selectedTags = this.tagsList.map((id) => this.el.querySelector(`#${id}`));
239
- }
240
- this.selectedTags = this.listToCSV(this.tagsList);
241
- let detail = { value: selectedTags, tagChanged: changedTag };
242
- this.wmTagInputChanged.emit(detail);
243
- }
244
- handleErrorMessageChange() {
245
- if (this.errorMessage) {
246
- this.announce(this.errorMessage);
247
- }
248
- }
249
- handleRowUpdate() {
250
- forceUpdate(this.el);
251
- }
252
- closeIfNotElOrChild(ev) {
253
- const isntElOrChild = ev.target !== this.el && !this.el.shadowRoot.contains(ev.target);
254
- if (this.tagInputType === "dropdown" && isntElOrChild && this.isExpanded) {
255
- this.closeDropdown();
256
- }
257
- }
258
- // From wm-button
259
- // we need to listen for scroll events during the capture phase because they do not bubble up
260
- // there can be layouts where the main content has 100vh and overflows
261
- // in these cases window will register no scroll events unless we catch on they way down
262
- dismissTooltip() {
263
- if (this.tooltipVisible) {
264
- hideTooltip();
265
- this.tooltipVisible = false;
266
- }
267
- }
268
- handleInputKeyDown(ev) {
269
- if (/^.$/.test(ev.key) && this.inputEl.value.length >= this.characterLimit) {
270
- this.announceCharacterLimitWarning(this.inputEl.value.length, this.characterLimit);
271
- }
272
- // prevent keydown triggering on tag area
273
- ev.stopPropagation();
274
- switch (ev.key) {
275
- case "Enter":
276
- case ",":
277
- ev.preventDefault();
278
- this.handleInputEnter();
279
- break;
280
- case "ArrowDown":
281
- ev.preventDefault();
282
- this.handleInputArrowDown();
283
- break;
284
- case "ArrowUp":
285
- ev.preventDefault();
286
- this.handleInputArrowUp();
287
- break;
288
- case "ArrowLeft":
289
- ev.preventDefault();
290
- if (this.tagInputType === "table" && this.tablePosition.row) {
291
- this.moveLeftCell();
292
- }
293
- break;
294
- case "ArrowRight":
295
- ev.preventDefault();
296
- if (this.tagInputType === "table" && this.tablePosition.row) {
297
- this.moveRightCell();
298
- }
299
- break;
300
- case "Escape":
301
- if (this.tagInputType === "dropdown" && this.isExpanded) {
302
- this.closeDropdown();
303
- }
304
- break;
305
- case "ArrowLeft":
306
- case "Backspace":
307
- this.handleInputBackspace();
308
- break;
309
- }
310
- }
311
- handleInputFocus() {
312
- if (this.tagInputType === "dropdown") {
313
- this.openDropdown();
314
- this.clearListItemFocus();
315
- }
316
- // force update needed to apply styled state of field-wrapper el
317
- forceUpdate(this.el);
318
- }
319
- handleInputChanged(value) {
320
- this.charCount = value.length;
321
- if (this.tagInputType === "dropdown") {
322
- this.clearListItemFocus();
323
- if (this.charCount >= this.characterLimit - 5) {
324
- this.announceCharacterLimitWarning(this.charCount, this.characterLimit);
325
- }
326
- if (!this.isExpanded) {
327
- this.openDropdown();
328
- }
329
- }
330
- else if (this.tagInputType === "table") {
331
- this.clearCellFocus();
332
- }
333
- this.announceExistingOptions();
334
- }
335
- handleInputEnter() {
336
- if (this.tagInputType === "dropdown") {
337
- if (this.focusedListItem) {
338
- this.handleListItemClick(this.focusedListItem);
339
- }
340
- else {
341
- this.submitInput(this.addNew, this.inputEl.value.trim());
342
- }
343
- }
344
- else if (this.tagInputType === "table" && this.tablePosition.row > 0) {
345
- this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id);
346
- }
347
- }
348
- submitInput(canAddNew, value) {
349
- const hasNonWhiteSpaceCharacters = value.match(/\S/);
350
- if (canAddNew && hasNonWhiteSpaceCharacters) {
351
- this.addTag(value);
352
- this.optionsList = this.addOption(value);
353
- this.resetInput();
354
- }
355
- }
356
- handleInputArrowDown() {
357
- if (this.tagInputType === "table") {
358
- this.moveDownRow();
359
- }
360
- else if (this.tagInputType === "dropdown" && this.isExpanded) {
361
- this.moveDownListItem();
362
- }
363
- else if (this.tagInputType === "dropdown") {
364
- this.openDropdown();
365
- }
366
- }
367
- handleInputArrowUp() {
368
- if (this.tagInputType === "table") {
369
- this.moveUpRow();
370
- }
371
- else if (this.tagInputType === "dropdown" && this.isExpanded) {
372
- this.moveUpListItem();
373
- }
374
- else if (this.tagInputType === "dropdown") {
375
- this.openDropdown();
376
- }
377
- }
378
- handleInputBackspace() {
379
- if (this.inputEl.value === "" && this.tagsList.length > 0) {
380
- // wait for events to finish firing before redirecting focus
381
- // prevents double input in input area and tag area
382
- window.requestAnimationFrame(() => {
383
- if (this.nonLockedTagsList.length > 0) {
384
- this.tagAreaEl.focus();
385
- this.focusTag(this.tagEls[this.tagEls.length - 1]);
386
- }
387
- });
388
- }
389
- }
390
- handleListItemKeyDown(ev) {
391
- const typedEvTarget = ev.target;
392
- switch (ev.key) {
393
- case "Enter":
394
- case " ":
395
- ev.preventDefault();
396
- typedEvTarget.click();
397
- break;
398
- case "ArrowDown":
399
- ev.preventDefault();
400
- this.moveDownListItem();
401
- break;
402
- case "ArrowUp":
403
- ev.preventDefault();
404
- this.moveUpListItem();
405
- break;
406
- case "Escape":
407
- if (this.focusedElement !== this.inputEl) {
408
- this.inputEl.focus();
409
- }
410
- else if (this.tagInputType === "dropdown") {
411
- this.closeDropdown();
412
- }
413
- break;
414
- }
415
- }
416
- handleListItemClick(item) {
417
- const tag = item.dataset.option.trim() || "";
418
- if (this.includesCaseInsensitive(this.tagsList, tag)) {
419
- this.announce(this.generateTagAlreadyAddedMessage(tag));
420
- }
421
- else {
422
- this.resetInput();
423
- this.addTag(tag);
424
- this.optionsList = this.addOption(tag);
425
- this.focusedListItem = null;
426
- }
427
- }
428
- handleTableRowClick(rowId) {
429
- const referencedRow = this.el.querySelector(`#${rowId}`);
430
- const isLocked = referencedRow.locked;
431
- if (!isLocked) {
432
- if (this.includesCaseInsensitive(this.tagsList, rowId)) {
433
- this.removeTag(rowId);
434
- }
435
- else if (!this.tagLimitReached) {
436
- this.addTag(rowId);
437
- this.resetInput();
438
- }
439
- }
440
- }
441
- handleTagAreaKeyDown(ev) {
442
- switch (ev.key) {
443
- case "ArrowLeft":
444
- case "ArrowUp":
445
- ev.preventDefault();
446
- this.moveLeftTag();
447
- break;
448
- case "ArrowRight":
449
- case "ArrowDown":
450
- ev.preventDefault();
451
- this.moveRightTag();
452
- break;
453
- case "Backspace":
454
- case "Delete":
455
- this.handleTagAreaDelete();
456
- break;
457
- }
458
- }
459
- handleTagAreaDelete() {
460
- const isLocked = this.focusedTag && this.focusedTag.classList.contains("locked");
461
- if (this.focusedTag && this.focusedTag.dataset.tag && !isLocked) {
462
- this.removeTag(this.focusedTag.dataset.tag);
463
- if (this.nonLockedTagsList.length === 0) {
464
- // focus input if no tags are left
465
- this.inputEl.focus();
466
- }
467
- else if (this.focusedTag === this.tagEls[this.tagEls.length - 1]) {
468
- // reassign focus if removing the last tag but there are still tags remaining
469
- this.focusedTag = this.tagEls[this.tagEls.length - 2];
470
- this.focusTag(this.focusedTag);
471
- }
472
- }
473
- }
474
- handleBlur(ev, component) {
475
- const isntElOrChild = ev.relatedTarget !== component && !this.el.shadowRoot.contains(ev.relatedTarget);
476
- this.dismissTooltip();
477
- this.clearCellFocus();
478
- if (isntElOrChild) {
479
- this.fieldWrapperEl.classList.remove("focused");
480
- if (this.tagInputType === "dropdown") {
481
- this.closeDropdown();
482
- }
483
- }
484
- }
485
- handleCellMouseEnter(ev) {
486
- const cell = ev.target;
487
- const contentWrapper = cell.querySelector(".cell-content-wrapper");
488
- const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
489
- if (isTruncated) {
490
- // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
491
- showTooltip("bottom", cell, cell.innerText);
492
- this.tooltipVisible = true;
493
- }
494
- }
495
- handleTagAreaFocus() {
496
- if (this.tagInputType === "dropdown") {
497
- this.closeDropdown();
498
- }
499
- const firstFocusableTag = this.nonLockedTagEls[0];
500
- firstFocusableTag && this.focusTag(firstFocusableTag);
501
- }
502
- handleRemoveButtonClick(tag) {
503
- this.moveLeftTag();
504
- this.removeTag(tag);
505
- }
506
- moveDownListItem() {
507
- if (this.listItemEls.length > 0) {
508
- const firstListItem = this.listItemEls[0];
509
- if (!this.focusedListItem) {
510
- this.focusListItem(firstListItem);
511
- }
512
- else if (this.focusedListItem.nextElementSibling) {
513
- this.focusListItem(this.focusedListItem.nextElementSibling);
514
- }
515
- else {
516
- this.focusListItem(firstListItem);
517
- }
518
- }
519
- }
520
- moveUpListItem() {
521
- if (this.listItemEls.length > 0) {
522
- const lastListItem = this.listItemEls[this.listItemEls.length - 1];
523
- if (!this.focusedListItem) {
524
- this.focusListItem(lastListItem);
525
- }
526
- else if (this.focusedListItem.previousElementSibling) {
527
- this.focusListItem(this.focusedListItem.previousElementSibling);
528
- }
529
- else {
530
- this.clearListItemFocus();
531
- }
532
- }
533
- }
534
- moveDownRow() {
535
- if (this.filteredRows.length > 0) {
536
- if (this.tablePosition.row === 0) {
537
- this.tablePosition.row = 1;
538
- }
539
- else if (this.tablePosition.row === this.filteredRows.length) {
540
- this.tablePosition.row = 1;
541
- }
542
- else {
543
- this.tablePosition.row++;
544
- }
545
- // skip locked rows
546
- const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
547
- if (rowToFocus.locked) {
548
- this.moveDownRow();
549
- }
550
- else {
551
- this.focusCell(this.tablePosition);
552
- }
553
- }
554
- }
555
- moveUpRow() {
556
- if (this.filteredRows.length > 0) {
557
- if (this.tablePosition.row === 0) {
558
- this.tablePosition.row = this.filteredRows.length;
559
- }
560
- else if (this.tablePosition.row === 1) {
561
- this.tablePosition.row = 0;
562
- }
563
- else {
564
- this.tablePosition.row--;
565
- }
566
- // skip locked rows
567
- const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
568
- if (rowToFocus && rowToFocus.locked) {
569
- this.moveUpRow();
570
- }
571
- else if (rowToFocus) {
572
- this.focusCell(this.tablePosition);
573
- }
574
- else {
575
- this.clearCellFocus();
576
- }
577
- }
578
- }
579
- moveLeftCell() {
580
- if (this.tablePosition.column != 1) {
581
- this.tablePosition.column--;
582
- this.focusCell(this.tablePosition);
583
- }
584
- }
585
- moveRightCell() {
586
- const numCols = csvToArray(this.colHeaders).length;
587
- if (this.tablePosition.column < numCols) {
588
- this.tablePosition.column++;
589
- this.focusCell(this.tablePosition);
590
- }
591
- }
592
- moveLeftTag() {
593
- const lastTag = this.tagEls[this.tagEls.length - 1];
594
- if (this.focusedTag && this.tagEls.includes(this.focusedTag.previousElementSibling)) {
595
- this.focusedTag = this.focusedTag.previousElementSibling;
596
- }
597
- else {
598
- this.focusedTag = lastTag;
599
- }
600
- // skip locked tags
601
- if (this.focusedTag.classList.contains("locked") && this.nonLockedTagEls.length > 0) {
602
- this.moveLeftTag();
603
- }
604
- else {
605
- this.focusTag(this.focusedTag);
606
- }
607
- }
608
- moveRightTag() {
609
- const firstTag = this.tagEls[0];
610
- if (this.focusedTag && this.tagEls.includes(this.focusedTag.nextElementSibling)) {
611
- this.focusedTag = this.focusedTag.nextElementSibling;
612
- }
613
- else {
614
- this.focusedTag = firstTag;
615
- }
616
- // skip locked tags
617
- if (this.focusedTag.classList.contains("locked")) {
618
- this.moveRightTag();
619
- }
620
- else {
621
- this.focusTag(this.focusedTag);
622
- }
623
- }
624
- addOption(option) {
625
- let newOptionsList = this.optionsList;
626
- const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, option);
627
- if (!optionAlreadyExists) {
628
- newOptionsList = newOptionsList.concat(option);
629
- }
630
- return newOptionsList;
631
- }
632
- removeOption(option) {
633
- this.optionsList = this.filterCaseInsensitive(this.optionsList, option);
634
- }
635
- addTag(tag) {
636
- let newTagsList = this.tagsList;
637
- const tagAlreadyAdded = this.includesCaseInsensitive(this.tagsList, tag);
638
- const tagExistsAsOption = this.optionsList.filter((x) => x.toLowerCase() === tag.toLowerCase())[0];
639
- if (!tagAlreadyAdded) {
640
- let textToAnnounce = tag;
641
- if (this.tagInputType === "table") {
642
- const referencedRow = this.el.querySelector(`#${tag}`);
643
- textToAnnounce = referencedRow.col1;
644
- }
645
- this.announce(this.generateTagAddedMessage(textToAnnounce));
646
- this.tagsList = newTagsList.concat(tagExistsAsOption || tag);
647
- // if maxTags has been reached, focus should go to the tagArea
648
- if (this.tagLimitReached) {
649
- this.tagAreaEl.focus();
650
- }
651
- }
652
- }
653
- removeTag(tag) {
654
- let textToAnnounce = tag;
655
- if (this.tagInputType === "table") {
656
- const referencedRow = this.el.querySelector(`#${tag}`);
657
- textToAnnounce = referencedRow.col1;
658
- }
659
- const tagRemovedMessage = intl.formatMessage({ id: "tagInput.tagRemoved", defaultMessage: "{tag} removed" }, { tag: textToAnnounce });
660
- this.announce(tagRemovedMessage);
661
- this.tagsList = this.filterCaseInsensitive(this.tagsList, tag);
662
- if (this.tagInputType === "dropdown") {
663
- // if a tag was introduced by the user, also remove it from the dropdown options
664
- const devOptionsList = csvToArray(this.options);
665
- if (this.includesCaseInsensitive(this.optionsList, tag) && !this.includesCaseInsensitive(devOptionsList, tag)) {
666
- this.removeOption(tag);
667
- }
668
- }
669
- }
670
- focusListItem(item) {
671
- this.focusedListItem = item;
672
- this.inputEl.setAttribute("aria-activedescendant", this.focusedListItem.id);
673
- item.scrollIntoView({ block: "nearest" });
674
- }
675
- focusTag(element) {
676
- if (element.classList.contains("locked")) {
677
- this.focusedTag = null;
678
- this.tagAreaEl.setAttribute("aria-activedescendant", "");
679
- }
680
- else {
681
- this.focusedTag = element;
682
- this.tagAreaEl.setAttribute("aria-activedescendant", this.focusedTag.id);
683
- }
684
- }
685
- focusCell(position) {
686
- this.clearCellFocus(false);
687
- if (position.row) {
688
- const rowToFocus = this.localRowEls[position.row];
689
- const rowCells = rowToFocus.querySelectorAll("td");
690
- const cellToFocus = rowCells[position.column - 1];
691
- const contentWrapper = cellToFocus.querySelector(".cell-content-wrapper");
692
- const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
693
- rowToFocus.classList.add("focused");
694
- cellToFocus.classList.add("focused");
695
- cellToFocus.scrollIntoView({ block: "nearest" });
696
- this.inputEl.setAttribute("aria-activedescendant", cellToFocus.id);
697
- this.dismissTooltip();
698
- if (isTruncated) {
699
- // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
700
- showTooltip("bottom", cellToFocus, cellToFocus.innerText);
701
- this.tooltipVisible = true;
702
- }
703
- }
704
- }
705
- clearTagFocus() {
706
- this.tagAreaEl.setAttribute("aria-activedescendant", "");
707
- this.focusedTag = null;
708
- }
709
- clearCellFocus(resetPosition = true) {
710
- this.inputEl.setAttribute("aria-activedescendant", "");
711
- if (resetPosition) {
712
- this.tablePosition = { row: 0, column: 1 };
713
- }
714
- this.localRowEls.forEach((row) => {
715
- row.classList.remove("focused");
716
- row.querySelectorAll("td").forEach((cell) => {
717
- cell.classList.remove("focused");
718
- });
719
- });
720
- }
721
- openDropdown() {
722
- // given an offset of -2px because the dropdown is transformed downwards to avoid overlapping the focus border
723
- this.openUp = shouldOpenUp(this.el, this.dropdownEl, this.el.clientHeight, -2);
724
- this.isExpanded = true;
725
- }
726
- closeDropdown() {
727
- this.clearListItemFocus();
728
- this.isExpanded = false;
729
- }
730
- clearListItemFocus() {
731
- this.focusedListItem = null;
732
- this.inputEl.setAttribute("aria-activedescendant", "");
733
- this.listItemEls.forEach((el) => {
734
- el.classList.remove("focused");
735
- });
736
- }
737
- resetInput() {
738
- this.charCount = 0;
739
- this.inputEl.value = "";
740
- }
741
- announce(message) {
742
- // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
743
- if (this.liveRegionEl.textContent === message) {
744
- message += "\u00A0";
745
- }
746
- this.liveRegionMessage = message;
747
- }
748
- announceExistingOptions() {
749
- // request animation frame to wait for re-rendering of filtered options
750
- window.requestAnimationFrame(() => {
751
- let numResults = 0;
752
- if (this.tagInputType === "dropdown") {
753
- numResults = this.optionEls.length;
754
- }
755
- else if (this.tagInputType === "table") {
756
- numResults = this.filteredRows.length;
757
- }
758
- const existingOptionsMessage = intl.formatMessage({
759
- id: "tagInput.existingOptions",
760
- defaultMessage: "{num, plural, one {1 existing option.} other {# existing options.}}",
761
- }, { num: numResults });
762
- this.announce(existingOptionsMessage);
763
- });
764
- }
765
- announceCharacterLimitWarning(charCount, charLimit) {
766
- const charactersEnteredMessage = intl.formatMessage({
767
- id: "global.charactersEntered",
768
- defaultMessage: "{x, number} of {y, number} characters entered.",
769
- description: "for screen readers",
770
- }, { x: charCount, y: charLimit });
771
- const characterLimitReachedMessage = intl.formatMessage({
772
- id: "global.characterLimitReached",
773
- defaultMessage: "No additional characters will be entered.",
774
- description: "for screen readers",
775
- });
776
- this.announce(`${charactersEnteredMessage}${charCount >= charLimit ? " " + characterLimitReachedMessage : ""}`);
777
- }
778
- positionInput() {
779
- const lastTag = this.tagEls[this.tagEls.length - 1];
780
- // default placement to fall back to when no tags are present, or not enough space is available
781
- this.inputEl.style.position = "static";
782
- this.inputEl.style.width = "100%";
783
- if (lastTag) {
784
- const spaceAvailable = this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right;
785
- if (spaceAvailable >= this.inputMinimumWidth) {
786
- // because the input has right: 0px
787
- // all thats needed to properly place it is setting position: absolute, top, and width
788
- this.inputEl.style.position = "absolute";
789
- this.inputEl.style.top = lastTag.offsetTop.toString() + "px";
790
- this.inputEl.style.width =
791
- (this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right - 8).toString() + "px";
792
- }
793
- }
794
- }
795
- /// Helpers
796
- listToCSV(list) {
797
- return list.join(",");
798
- }
799
- includesCaseInsensitive(list, element) {
800
- const lowercaseList = list.map((str) => str.toLowerCase());
801
- return lowercaseList.includes(element.toLowerCase());
802
- }
803
- filterCaseInsensitive(list, element) {
804
- return list.filter((x) => x.toLowerCase() !== element.toLowerCase());
805
- }
806
- sortCaseInsensitive(list) {
807
- // The vanilla .sort method places words that start with capital letters above others (ASCII order)
808
- // so we need to pass in our own compare function to sort case-insensitive
809
- return list.sort((a, b) => {
810
- a = a.toLowerCase();
811
- b = b.toLowerCase();
812
- return a > b ? 1 : a < b ? -1 : 0;
813
- });
814
- }
815
- /// Renders
816
- renderTags() {
817
- let lockedTags = [];
818
- let unlockedTags = [];
819
- this.tagsList.forEach((tag, idx) => {
820
- const id = `tag${idx + 1}`;
821
- let tagText = "";
822
- let isLocked = false;
823
- if (this.tagInputType === "dropdown") {
824
- tagText = tag;
825
- }
826
- else if (this.tagInputType === "table") {
827
- // display table tags using col1 of the row with the same id
828
- // if one can't be found, display as empty
829
- const referencedRow = this.el.querySelector(`#${tag}`);
830
- tagText = referencedRow ? referencedRow.col1 : "";
831
- isLocked = referencedRow ? referencedRow.locked : false;
832
- }
833
- // make sure locked tags always appear in front of list
834
- const targetList = isLocked ? lockedTags : unlockedTags;
835
- targetList.push(h("li", { id: id, class: `tag highlight ${this.focusedTag && this.focusedTag.id === id ? "focused" : ""} ${isLocked ? "locked" : ""}`, "data-tag": tag, role: "option" }, tagText, isLocked ? (h("div", { class: "icon lock" })) : (h("button", { class: "icon remove-btn", tabIndex: -1, onClick: () => this.handleRemoveButtonClick(tag) }))));
836
- });
837
- return [...lockedTags, ...unlockedTags];
838
- }
839
- renderDropdown() {
840
- return (h("div", { class: `dropdown-wrapper ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("div", { id: "help-text", class: "help-text" }, this.renderHelpText()), h("ul", { class: "dropdown", id: "dropdown", role: "listbox", "aria-multiselectable": "true", "aria-expanded": this.isExpanded ? "true" : false, "aria-label": this.label, tabindex: -1 }, this.inputEl && this.renderAddNewButton(), this.renderListItems(this.optionsList))));
841
- }
842
- renderListItems(optionsList) {
843
- optionsList = this.sortCaseInsensitive(optionsList);
844
- // filter by input
845
- if (this.inputEl && this.inputEl.value) {
846
- optionsList = this.optionsList.filter((option) => option.toLowerCase().includes(this.inputEl.value.toLowerCase()));
847
- }
848
- return optionsList.map((option, idx) => {
849
- const id = `option${idx + 1}`;
850
- const isFocused = this.focusedListItem && this.focusedListItem.id === id;
851
- const isSelected = this.includesCaseInsensitive(this.tagsList, option);
852
- return (h("li", { class: `option ${isFocused ? "focused" : ""}`, role: "option", id: id, "data-option": option, "aria-selected": isSelected ? "true" : "false", "aria-disabled": isSelected ? "true" : "false", onKeyDown: (ev) => this.handleListItemKeyDown(ev), onBlur: (ev) => this.handleBlur(ev, this.el), onClick: (ev) => this.handleListItemClick(ev.target) }, option));
853
- });
854
- }
855
- renderAddNewButton() {
856
- const hasNonWhiteSpaceCharacters = this.inputEl.value.match(/\S/);
857
- const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, this.inputEl.value.trim());
858
- if (this.addNew && hasNonWhiteSpaceCharacters && !optionAlreadyExists) {
859
- const id = `add-new-btn`;
860
- const isFocused = this.focusedListItem && this.focusedListItem.id === id;
861
- return (h("li", { role: "option", class: `add-new-btn ${isFocused ? "focused" : ""}`, id: id, "data-option": this.inputEl.value, onKeyDown: (ev) => this.handleListItemKeyDown(ev), onBlur: (ev) => this.handleBlur(ev, this.el), onClick: (ev) => this.handleListItemClick(ev.target), tabIndex: isFocused ? 0 : -1 }, `Add "${this.inputEl.value.trim()}"`));
862
- }
863
- else
864
- return "";
865
- }
866
- renderHelpText() {
867
- let helpText = "";
868
- if (this.optionsList.length > 0) {
869
- helpText += this.componentMessages.selectionHelpText;
870
- }
871
- if (this.addNew) {
872
- helpText += " " + this.componentMessages.addNewHelpText;
873
- }
874
- return helpText;
875
- }
876
- renderTagCounter() {
877
- if (this.maxTags) {
878
- return (h("div", { class: "lower-row" }, h("div", { id: "max-tags" }, `${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`, this.tagLimitReached && ` - ${this.componentMessages.maxTagsReached}`)));
879
- }
880
- }
881
- renderTable() {
882
- return (h("div", { class: "table-wrapper", onScroll: () => this.dismissTooltip() }, h("table", { id: "table", role: "grid", class: `${this.colWidths ? "fixed-widths" : ""}`, "aria-label": this.label, "aria-multiselectable": "true" }, this.renderTableHeaders(), this.filteredRows.length ? this.renderTableRows() : h("div", { class: "no-results" }, this.noResultsMessage))));
883
- }
884
- renderTableHeaders() {
885
- return (h("tr", { class: "headers", role: "row" }, csvToArray(this.colHeaders).map((header, idx) => {
886
- let overflowRule = "wrap";
887
- if (this.colWrap && csvToArray(this.colWrap)[idx]) {
888
- overflowRule = csvToArray(this.colWrap)[idx];
889
- }
890
- return (h("th", { class: `header-cell ${overflowRule}`, role: "columnheader",
891
- // @ts-ignore
892
- width: this.colWidths ? csvToArray(this.colWidths)[idx] : "" }, header));
893
- })));
894
- }
895
- renderTableRows() {
896
- return this.filteredRows.map((row) => {
897
- const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
898
- return (h("tr", { id: row.id, class: `${row.locked ? "locked" : ""} ${isSelected ? "selected" : ""}`, role: "row", onClick: () => this.handleTableRowClick(row.id) }, this.renderTableCells(row)));
899
- });
900
- }
901
- renderTableCells(row) {
902
- const colValues = [row.col1, row.col2, row.col3, row.col4].filter((val) => !!val);
903
- const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
904
- return colValues.map((val, idx) => {
905
- const localId = `${row.id}-col${idx + 1}`;
906
- let overflowRule = "wrap";
907
- if (this.colWrap && csvToArray(this.colWrap)[idx]) {
908
- overflowRule = csvToArray(this.colWrap)[idx];
909
- }
910
- return (h("td", { id: localId, role: "gridcell", "aria-describedby": `${localId}-description`, "aria-selected": isSelected.toString(), onMouseEnter: (ev) => this.handleCellMouseEnter(ev), onMouseLeave: () => this.dismissTooltip() }, h("div", { class: `cell-content-wrapper ${overflowRule}` }, val), h("div", { class: "description", id: `${localId}-description` }, row.locked ? "locked" : "")));
911
- });
912
- }
913
- render() {
914
- return (h(Host, { id: this.uid }, h("div", { class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", htmlFor: `input${this.uid}` }, this.label, this.requiredField && (h("span", { class: "required", "aria-hidden": "true" }, "*")))), h("div", { class: `field-wrapper ${this.focusedElement ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, h("div", { class: "upper-row" }, h("div", { class: "tags-and-input-wrapper" }, this.tagsList.length > 0 && (h("ul", { ref: (el) => (this.tagAreaEl = el), class: "tag-area", role: "listbox", "aria-activedescendant": "", "aria-orientation": "horizontal", "aria-label": `${this.label} ${this.tagsList.length > 0 ? this.componentMessages.tagAreaInstructions : ""}`, tabindex: this.nonLockedTagsList.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: () => this.handleTagAreaFocus(), onBlur: (ev) => {
915
- this.clearTagFocus();
916
- this.handleBlur(ev, this.el);
917
- }, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags())), h("input", { id: `input${this.uid}`, class: this.tagLimitReached ? "hidden" : "", role: "combobox", ref: (el) => (this.inputEl = el), autocomplete: "off", "aria-required": this.requiredField ? "true" : null, "aria-controls": this.tagInputType, "aria-describedby": `help-text${this.errorMessage ? " error " : ""}`, "aria-label": `${this.label} ${this.tagInputType === "dropdown" ? this.generateCharacterLimitLabel(this.characterLimit) : ""}`, "aria-expanded": this.tagInputType === "dropdown" ? this.isExpanded.toString() : null, placeholder: this.placeholder, maxLength: this.tagInputType === "dropdown" ? this.characterLimit : undefined, onInput: () => this.handleInputChanged(this.inputEl.value), onBlur: (ev) => {
918
- this.handleBlur(ev, this.el);
919
- }, onFocus: () => this.handleInputFocus(), onKeyDown: (ev) => this.handleInputKeyDown(ev) })), this.tagInputType === "dropdown" && (h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.tagInputType === "dropdown" && this.renderDropdown()), this.info && (h("div", { id: "info", class: "info-text" }, this.info)), this.errorMessage && h("div", { id: "error" }, this.errorMessage), h("div", { class: "sr-only", "aria-live": "assertive", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.tagInputType === "table" && this.renderTable())));
920
- }
921
- static get delegatesFocus() { return true; }
922
- get el() { return getElement(this); }
923
- static get watchers() { return {
924
- "tagsList": ["reflectSelectedTags"],
925
- "errorMessage": ["handleErrorMessageChange"]
926
- }; }
927
- };
7
+ const TagInput = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.wmTagInputChanged = createEvent(this, "wmTagInputChanged", 7);
11
+ this.uid = this.el.id ? this.el.id : generateId();
12
+ this.openUp = false;
13
+ this.tooltipVisible = false;
14
+ this.debouncedUpdate = debounce(() => forceUpdate(this.el), 30);
15
+ this.label = undefined;
16
+ this.labelPosition = "top";
17
+ this.options = "";
18
+ this.selectedTags = "";
19
+ this.info = undefined;
20
+ this.errorMessage = undefined;
21
+ this.addNew = true;
22
+ this.placeholder = undefined;
23
+ this.requiredField = false;
24
+ this.characterLimit = 50;
25
+ this.maxTags = undefined;
26
+ this.tagInputType = "dropdown";
27
+ this.colHeaders = undefined;
28
+ this.colWidths = undefined;
29
+ this.colWrap = undefined;
30
+ this.messageConfig = "";
31
+ this.focusedListItem = undefined;
32
+ this.focusedTag = null;
33
+ this.tablePosition = { row: 0, column: 1 };
34
+ this.isExpanded = false;
35
+ this.tagsList = csvToArray(this.selectedTags);
36
+ this.optionsList = csvToArray(this.options);
37
+ this.charCount = 0;
38
+ this.liveRegionMessage = "";
39
+ }
40
+ get focusedElement() {
41
+ return this.el.shadowRoot.activeElement;
42
+ }
43
+ get listItemEls() {
44
+ return Array.from(this.dropdownEl.querySelectorAll("li"));
45
+ }
46
+ get tagEls() {
47
+ return this.tagAreaEl ? Array.from(this.tagAreaEl.querySelectorAll(".tag")) : [];
48
+ }
49
+ get nonLockedTagEls() {
50
+ return this.tagEls.filter((tag) => !tag.classList.contains("locked"));
51
+ }
52
+ get optionEls() {
53
+ return Array.from(this.dropdownEl.querySelectorAll(".option"));
54
+ }
55
+ get wmRowEls() {
56
+ return Array.from(this.el.querySelectorAll("wm-tag-input-row"));
57
+ }
58
+ get localRowEls() {
59
+ return Array.from(this.el.shadowRoot.querySelectorAll("tr"));
60
+ }
61
+ get filteredRows() {
62
+ return this.wmRowEls.filter((row) => {
63
+ const colValues = [row.col1, row.col2, row.col3, row.col4].join("").toLowerCase();
64
+ return this.inputEl && this.inputEl.value ? colValues.includes(this.inputEl.value.toLowerCase()) : true;
65
+ });
66
+ }
67
+ get nonLockedTagsList() {
68
+ let list = [];
69
+ if (this.tagInputType === "table") {
70
+ this.tagsList.forEach((id) => {
71
+ const correspondingRowEl = this.wmRowEls.filter((row) => id === row.id)[0];
72
+ if (!correspondingRowEl.locked) {
73
+ list.push(id);
74
+ }
75
+ });
76
+ }
77
+ else if (this.tagInputType === "dropdown") {
78
+ list = this.tagsList;
79
+ }
80
+ return list;
81
+ }
82
+ get tagLimitReached() {
83
+ return !!(this.maxTags && this.tagsList.length >= this.maxTags);
84
+ }
85
+ get noResultsMessage() {
86
+ return intl.formatMessage({
87
+ id: "tagInput.noResults",
88
+ defaultMessage: "No results match your search.",
89
+ description: "Message displayed when a user's search returns empty.",
90
+ });
91
+ }
92
+ get componentMessages() {
93
+ const addNewHelpText = intl.formatMessage({
94
+ id: "tagInput.addNewHelpText",
95
+ defaultMessage: "Press the Enter or Comma key to add a new tag.",
96
+ description: "Help text appearing in a dropdown. Use imperative",
97
+ });
98
+ const selectionHelpText = intl.formatMessage({
99
+ id: "tagInput.selectionHelpText",
100
+ defaultMessage: "Search and select a tag.",
101
+ description: "Help text appearing in a dropdown. Use imperative",
102
+ });
103
+ const maxTagsReachedMessage = intl.formatMessage({
104
+ id: "tagInput.maxTagsReached",
105
+ defaultMessage: "No more tags can be added because the limit has been reached.",
106
+ });
107
+ const tagAreaInstructions = intl.formatMessage({
108
+ id: "tagInput.tagAreaInstructions",
109
+ defaultMessage: "tag selection. Press Backspace or Delete to remove a tag.",
110
+ });
111
+ const tagsAddedMessage = intl.formatMessage({
112
+ id: "tagInput.tagsAdded",
113
+ defaultMessage: "Tags added",
114
+ description: "For the user to understand how close they are to the tag limit, followed by x/y count",
115
+ });
116
+ const defaultConfig = {
117
+ addNewHelpText: addNewHelpText,
118
+ selectionHelpText: selectionHelpText,
119
+ maxTagsReached: maxTagsReachedMessage,
120
+ tagAreaInstructions: tagAreaInstructions,
121
+ tagsAdded: tagsAddedMessage,
122
+ };
123
+ const userProvidedConfig = safeParseJSON(this.messageConfig);
124
+ return userProvidedConfig ? Object.assign(Object.assign({}, defaultConfig), userProvidedConfig) : defaultConfig;
125
+ }
126
+ get inputMinimumWidth() {
127
+ // 150px is the minimum width of the input field, or the length of the placeholder text
128
+ const inputElStyles = getComputedStyle(this.inputEl);
129
+ const tagElStyles = getComputedStyle(this.tagEls[this.tagEls.length - 1]);
130
+ const inputElBuffer = [
131
+ inputElStyles.paddingLeft,
132
+ inputElStyles.paddingRight,
133
+ inputElStyles.marginLeft,
134
+ inputElStyles.marginRight,
135
+ tagElStyles.marginRight,
136
+ ].reduce((prev, curr) => prev + parseInt(curr.replace("px", "")), 0);
137
+ const minimumWidth = Math.max(150, measureText(this.inputEl, this.placeholder).width + inputElBuffer);
138
+ return minimumWidth;
139
+ }
140
+ generateTagAddedMessage(tag) {
141
+ return intl.formatMessage({
142
+ id: "tagInput.tagAdded",
143
+ defaultMessage: "{tagName} added.",
144
+ description: "A confirmation for adding a tag.",
145
+ }, { tagName: tag });
146
+ }
147
+ generateTagAlreadyAddedMessage(tag) {
148
+ return intl.formatMessage({
149
+ id: "tagInput.tagAlreadyAdded",
150
+ defaultMessage: "{tagName} has already been added.",
151
+ description: "An alert for adding a tag that is already present.",
152
+ }, { tagName: tag });
153
+ }
154
+ componentWillLoad() {
155
+ if (!this.placeholder) {
156
+ this.placeholder = this.createPlaceholderDefault(this.addNew, !!this.options);
157
+ }
158
+ if (!this.label) {
159
+ console.error("wm-tag-input must have a label property");
160
+ }
161
+ this.consolidateSelectedTags();
162
+ this.el.focus = () => {
163
+ const firstFocusableTag = this.nonLockedTagEls[0];
164
+ if (firstFocusableTag) {
165
+ this.tagAreaEl.focus();
166
+ this.focusTag(firstFocusableTag);
167
+ }
168
+ else {
169
+ this.inputEl.focus();
170
+ }
171
+ };
172
+ // on resize of component, trigger componentDidRender -> positionInput
173
+ const resizeObserver = new ResizeObserver(() => this.debouncedUpdate());
174
+ resizeObserver.observe(this.el);
175
+ }
176
+ componentDidLoad() {
177
+ // prevent highlighting of pre-selected tags
178
+ this.tagEls.forEach((el) => el.classList.remove("highlight"));
179
+ }
180
+ componentDidRender() {
181
+ this.positionInput();
182
+ }
183
+ consolidateSelectedTags() {
184
+ this.tagsList.forEach((tag) => {
185
+ if (!this.includesCaseInsensitive(this.optionsList, tag)) {
186
+ this.options += `${this.options.length > 0 ? "," : ""}${tag}`;
187
+ }
188
+ });
189
+ this.optionsList = csvToArray(this.options);
190
+ }
191
+ createPlaceholderDefault(addNew, hasOptions) {
192
+ const addAndSearchPlaceholder = intl.formatMessage({
193
+ id: "tagInput.placeholderAddAndSearch",
194
+ defaultMessage: "Add or search for a tag",
195
+ description: "Placeholder text. Use imperative",
196
+ });
197
+ const searchPlaceholder = intl.formatMessage({
198
+ id: "tagInput.placeholderSearch",
199
+ defaultMessage: "Search and select a tag",
200
+ description: "Placeholder text. Use imperative",
201
+ });
202
+ const addPlaceholder = intl.formatMessage({
203
+ id: "tagInput.placeholderAdd",
204
+ defaultMessage: "Add a new tag",
205
+ description: "Placeholder text. Use imperative",
206
+ });
207
+ let placeholder = "";
208
+ if (addNew && hasOptions) {
209
+ placeholder = addAndSearchPlaceholder;
210
+ }
211
+ else if (!addNew && hasOptions) {
212
+ placeholder = searchPlaceholder;
213
+ }
214
+ else if (addNew) {
215
+ placeholder = addPlaceholder;
216
+ }
217
+ return placeholder;
218
+ }
219
+ reflectSelectedTags(newValue, oldValue) {
220
+ const isAddition = newValue.length > oldValue.length;
221
+ let changedTag = "";
222
+ let selectedTags = this.tagsList;
223
+ if (isAddition) {
224
+ changedTag = newValue.filter((val) => !oldValue.includes(val))[0];
225
+ }
226
+ else {
227
+ changedTag = oldValue.filter((val) => !newValue.includes(val))[0];
228
+ }
229
+ // event emitted by type table uses element references instead of strings
230
+ if (this.tagInputType === "table") {
231
+ changedTag = this.wmRowEls.filter((row) => row.id === changedTag)[0];
232
+ selectedTags = this.tagsList.map((id) => this.el.querySelector(`#${id}`));
233
+ }
234
+ this.selectedTags = this.listToCSV(this.tagsList);
235
+ let detail = { value: selectedTags, tagChanged: changedTag };
236
+ this.wmTagInputChanged.emit(detail);
237
+ }
238
+ handleErrorMessageChange() {
239
+ if (this.errorMessage) {
240
+ this.announce(this.errorMessage);
241
+ }
242
+ }
243
+ handleRowUpdate() {
244
+ forceUpdate(this.el);
245
+ }
246
+ closeIfNotElOrChild(ev) {
247
+ const isntElOrChild = ev.target !== this.el && !this.el.shadowRoot.contains(ev.target);
248
+ if (this.tagInputType === "dropdown" && isntElOrChild && this.isExpanded) {
249
+ this.closeDropdown();
250
+ }
251
+ }
252
+ // From wm-button
253
+ // we need to listen for scroll events during the capture phase because they do not bubble up
254
+ // there can be layouts where the main content has 100vh and overflows
255
+ // in these cases window will register no scroll events unless we catch on they way down
256
+ dismissTooltip() {
257
+ if (this.tooltipVisible) {
258
+ hideTooltip();
259
+ this.tooltipVisible = false;
260
+ }
261
+ }
262
+ handleInputKeyDown(ev) {
263
+ if (/^.$/.test(ev.key) && this.inputEl.value.length >= this.characterLimit) {
264
+ this.announce(this.generateCharacterLimitWarning(this.inputEl.value.length, this.characterLimit));
265
+ }
266
+ // prevent keydown triggering on tag area
267
+ ev.stopPropagation();
268
+ switch (ev.key) {
269
+ case "Enter":
270
+ case ",":
271
+ ev.preventDefault();
272
+ this.handleInputEnter();
273
+ break;
274
+ case "ArrowDown":
275
+ ev.preventDefault();
276
+ this.handleInputArrowDown();
277
+ break;
278
+ case "ArrowUp":
279
+ ev.preventDefault();
280
+ this.handleInputArrowUp();
281
+ break;
282
+ case "ArrowLeft":
283
+ ev.preventDefault();
284
+ if (this.tagInputType === "table" && this.tablePosition.row) {
285
+ this.moveLeftCell();
286
+ }
287
+ break;
288
+ case "ArrowRight":
289
+ ev.preventDefault();
290
+ if (this.tagInputType === "table" && this.tablePosition.row) {
291
+ this.moveRightCell();
292
+ }
293
+ break;
294
+ case "Escape":
295
+ if (this.tagInputType === "dropdown" && this.isExpanded) {
296
+ this.closeDropdown();
297
+ }
298
+ break;
299
+ case "ArrowLeft":
300
+ case "Backspace":
301
+ this.handleInputBackspace();
302
+ break;
303
+ }
304
+ }
305
+ handleInputFocus() {
306
+ if (this.tagInputType === "dropdown") {
307
+ this.openDropdown();
308
+ this.clearListItemFocus();
309
+ }
310
+ // force update needed to apply styled state of field-wrapper el
311
+ forceUpdate(this.el);
312
+ }
313
+ handleInputChanged(value) {
314
+ this.charCount = value.length;
315
+ if (this.tagInputType === "dropdown") {
316
+ this.clearListItemFocus();
317
+ if (this.charCount >= this.characterLimit - 5) {
318
+ this.announce(this.generateCharacterLimitWarning(this.charCount, this.characterLimit));
319
+ }
320
+ if (!this.isExpanded) {
321
+ this.openDropdown();
322
+ }
323
+ }
324
+ else if (this.tagInputType === "table") {
325
+ this.clearCellFocus();
326
+ }
327
+ this.announceExistingOptions();
328
+ }
329
+ handleInputEnter() {
330
+ if (this.tagInputType === "dropdown") {
331
+ if (this.focusedListItem) {
332
+ this.handleListItemClick(this.focusedListItem);
333
+ }
334
+ else {
335
+ this.submitInput(this.addNew, this.inputEl.value.trim());
336
+ }
337
+ }
338
+ else if (this.tagInputType === "table" && this.tablePosition.row > 0) {
339
+ this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id);
340
+ }
341
+ }
342
+ submitInput(canAddNew, value) {
343
+ const hasNonWhiteSpaceCharacters = value.match(/\S/);
344
+ if (canAddNew && hasNonWhiteSpaceCharacters) {
345
+ this.addTag(value);
346
+ this.optionsList = this.addOption(value);
347
+ this.resetInput();
348
+ }
349
+ }
350
+ handleInputArrowDown() {
351
+ if (this.tagInputType === "table") {
352
+ this.moveDownRow();
353
+ }
354
+ else if (this.tagInputType === "dropdown" && this.isExpanded) {
355
+ this.moveDownListItem();
356
+ }
357
+ else if (this.tagInputType === "dropdown") {
358
+ this.openDropdown();
359
+ }
360
+ }
361
+ handleInputArrowUp() {
362
+ if (this.tagInputType === "table") {
363
+ this.moveUpRow();
364
+ }
365
+ else if (this.tagInputType === "dropdown" && this.isExpanded) {
366
+ this.moveUpListItem();
367
+ }
368
+ else if (this.tagInputType === "dropdown") {
369
+ this.openDropdown();
370
+ }
371
+ }
372
+ handleInputBackspace() {
373
+ if (this.inputEl.value === "" && this.tagsList.length > 0) {
374
+ // wait for events to finish firing before redirecting focus
375
+ // prevents double input in input area and tag area
376
+ window.requestAnimationFrame(() => {
377
+ if (this.nonLockedTagsList.length > 0) {
378
+ this.tagAreaEl.focus();
379
+ this.focusTag(this.tagEls[this.tagEls.length - 1]);
380
+ }
381
+ });
382
+ }
383
+ }
384
+ handleListItemKeyDown(ev) {
385
+ const typedEvTarget = ev.target;
386
+ switch (ev.key) {
387
+ case "Enter":
388
+ case " ":
389
+ ev.preventDefault();
390
+ typedEvTarget.click();
391
+ break;
392
+ case "ArrowDown":
393
+ ev.preventDefault();
394
+ this.moveDownListItem();
395
+ break;
396
+ case "ArrowUp":
397
+ ev.preventDefault();
398
+ this.moveUpListItem();
399
+ break;
400
+ case "Escape":
401
+ if (this.focusedElement !== this.inputEl) {
402
+ this.inputEl.focus();
403
+ }
404
+ else if (this.tagInputType === "dropdown") {
405
+ this.closeDropdown();
406
+ }
407
+ break;
408
+ }
409
+ }
410
+ handleListItemClick(item) {
411
+ const tag = item.dataset.option.trim() || "";
412
+ if (this.includesCaseInsensitive(this.tagsList, tag)) {
413
+ this.announce(this.generateTagAlreadyAddedMessage(tag));
414
+ }
415
+ else {
416
+ this.resetInput();
417
+ this.addTag(tag);
418
+ this.optionsList = this.addOption(tag);
419
+ this.focusedListItem = null;
420
+ }
421
+ }
422
+ handleTableRowClick(rowId) {
423
+ const referencedRow = this.el.querySelector(`#${rowId}`);
424
+ const isLocked = referencedRow.locked;
425
+ if (!isLocked) {
426
+ if (this.includesCaseInsensitive(this.tagsList, rowId)) {
427
+ this.removeTag(rowId);
428
+ }
429
+ else if (!this.tagLimitReached) {
430
+ this.addTag(rowId);
431
+ this.resetInput();
432
+ }
433
+ }
434
+ }
435
+ handleTagAreaKeyDown(ev) {
436
+ switch (ev.key) {
437
+ case "ArrowLeft":
438
+ case "ArrowUp":
439
+ ev.preventDefault();
440
+ this.moveLeftTag();
441
+ break;
442
+ case "ArrowRight":
443
+ case "ArrowDown":
444
+ ev.preventDefault();
445
+ this.moveRightTag();
446
+ break;
447
+ case "Backspace":
448
+ case "Delete":
449
+ this.handleTagAreaDelete();
450
+ break;
451
+ }
452
+ }
453
+ handleTagAreaDelete() {
454
+ const isLocked = this.focusedTag && this.focusedTag.classList.contains("locked");
455
+ if (this.focusedTag && this.focusedTag.dataset.tag && !isLocked) {
456
+ this.removeTag(this.focusedTag.dataset.tag);
457
+ if (this.nonLockedTagsList.length === 0) {
458
+ // focus input if no tags are left
459
+ this.inputEl.focus();
460
+ }
461
+ else if (this.focusedTag === this.tagEls[this.tagEls.length - 1]) {
462
+ // reassign focus if removing the last tag but there are still tags remaining
463
+ this.focusedTag = this.tagEls[this.tagEls.length - 2];
464
+ this.focusTag(this.focusedTag);
465
+ }
466
+ }
467
+ }
468
+ handleBlur(ev, component) {
469
+ const isntElOrChild = ev.relatedTarget !== component && !this.el.shadowRoot.contains(ev.relatedTarget);
470
+ this.dismissTooltip();
471
+ this.clearCellFocus();
472
+ if (isntElOrChild) {
473
+ this.fieldWrapperEl.classList.remove("focused");
474
+ if (this.tagInputType === "dropdown") {
475
+ this.closeDropdown();
476
+ }
477
+ }
478
+ }
479
+ handleCellMouseEnter(ev) {
480
+ const cell = ev.target;
481
+ const contentWrapper = cell.querySelector(".cell-content-wrapper");
482
+ const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
483
+ if (isTruncated) {
484
+ // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
485
+ showTooltip("bottom", cell, cell.innerText);
486
+ this.tooltipVisible = true;
487
+ }
488
+ }
489
+ handleTagAreaFocus() {
490
+ if (this.tagInputType === "dropdown") {
491
+ this.closeDropdown();
492
+ }
493
+ const firstFocusableTag = this.nonLockedTagEls[0];
494
+ firstFocusableTag && this.focusTag(firstFocusableTag);
495
+ }
496
+ handleRemoveButtonClick(tag) {
497
+ this.moveLeftTag();
498
+ this.removeTag(tag);
499
+ }
500
+ moveDownListItem() {
501
+ if (this.listItemEls.length > 0) {
502
+ const firstListItem = this.listItemEls[0];
503
+ if (!this.focusedListItem) {
504
+ this.focusListItem(firstListItem);
505
+ }
506
+ else if (this.focusedListItem.nextElementSibling) {
507
+ this.focusListItem(this.focusedListItem.nextElementSibling);
508
+ }
509
+ else {
510
+ this.focusListItem(firstListItem);
511
+ }
512
+ }
513
+ }
514
+ moveUpListItem() {
515
+ if (this.listItemEls.length > 0) {
516
+ const lastListItem = this.listItemEls[this.listItemEls.length - 1];
517
+ if (!this.focusedListItem) {
518
+ this.focusListItem(lastListItem);
519
+ }
520
+ else if (this.focusedListItem.previousElementSibling) {
521
+ this.focusListItem(this.focusedListItem.previousElementSibling);
522
+ }
523
+ else {
524
+ this.clearListItemFocus();
525
+ }
526
+ }
527
+ }
528
+ moveDownRow() {
529
+ if (this.filteredRows.length > 0) {
530
+ if (this.tablePosition.row === 0) {
531
+ this.tablePosition.row = 1;
532
+ }
533
+ else if (this.tablePosition.row === this.filteredRows.length) {
534
+ this.tablePosition.row = 1;
535
+ }
536
+ else {
537
+ this.tablePosition.row++;
538
+ }
539
+ // skip locked rows
540
+ const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
541
+ if (rowToFocus.locked) {
542
+ this.moveDownRow();
543
+ }
544
+ else {
545
+ this.focusCell(this.tablePosition);
546
+ }
547
+ }
548
+ }
549
+ moveUpRow() {
550
+ if (this.filteredRows.length > 0) {
551
+ if (this.tablePosition.row === 0) {
552
+ this.tablePosition.row = this.filteredRows.length;
553
+ }
554
+ else if (this.tablePosition.row === 1) {
555
+ this.tablePosition.row = 0;
556
+ }
557
+ else {
558
+ this.tablePosition.row--;
559
+ }
560
+ // skip locked rows
561
+ const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
562
+ if (rowToFocus && rowToFocus.locked) {
563
+ this.moveUpRow();
564
+ }
565
+ else if (rowToFocus) {
566
+ this.focusCell(this.tablePosition);
567
+ }
568
+ else {
569
+ this.clearCellFocus();
570
+ }
571
+ }
572
+ }
573
+ moveLeftCell() {
574
+ if (this.tablePosition.column != 1) {
575
+ this.tablePosition.column--;
576
+ this.focusCell(this.tablePosition);
577
+ }
578
+ }
579
+ moveRightCell() {
580
+ const numCols = csvToArray(this.colHeaders).length;
581
+ if (this.tablePosition.column < numCols) {
582
+ this.tablePosition.column++;
583
+ this.focusCell(this.tablePosition);
584
+ }
585
+ }
586
+ moveLeftTag() {
587
+ const lastTag = this.tagEls[this.tagEls.length - 1];
588
+ if (this.focusedTag && this.tagEls.includes(this.focusedTag.previousElementSibling)) {
589
+ this.focusedTag = this.focusedTag.previousElementSibling;
590
+ }
591
+ else {
592
+ this.focusedTag = lastTag;
593
+ }
594
+ // skip locked tags
595
+ if (this.focusedTag.classList.contains("locked") && this.nonLockedTagEls.length > 0) {
596
+ this.moveLeftTag();
597
+ }
598
+ else {
599
+ this.focusTag(this.focusedTag);
600
+ }
601
+ }
602
+ moveRightTag() {
603
+ const firstTag = this.tagEls[0];
604
+ if (this.focusedTag && this.tagEls.includes(this.focusedTag.nextElementSibling)) {
605
+ this.focusedTag = this.focusedTag.nextElementSibling;
606
+ }
607
+ else {
608
+ this.focusedTag = firstTag;
609
+ }
610
+ // skip locked tags
611
+ if (this.focusedTag.classList.contains("locked")) {
612
+ this.moveRightTag();
613
+ }
614
+ else {
615
+ this.focusTag(this.focusedTag);
616
+ }
617
+ }
618
+ addOption(option) {
619
+ let newOptionsList = this.optionsList;
620
+ const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, option);
621
+ if (!optionAlreadyExists) {
622
+ newOptionsList = newOptionsList.concat(option);
623
+ }
624
+ return newOptionsList;
625
+ }
626
+ removeOption(option) {
627
+ this.optionsList = this.filterCaseInsensitive(this.optionsList, option);
628
+ }
629
+ addTag(tag) {
630
+ let newTagsList = this.tagsList;
631
+ const tagAlreadyAdded = this.includesCaseInsensitive(this.tagsList, tag);
632
+ const tagExistsAsOption = this.optionsList.filter((x) => x.toLowerCase() === tag.toLowerCase())[0];
633
+ if (!tagAlreadyAdded) {
634
+ let textToAnnounce = tag;
635
+ if (this.tagInputType === "table") {
636
+ const referencedRow = this.el.querySelector(`#${tag}`);
637
+ textToAnnounce = referencedRow.col1;
638
+ }
639
+ this.announce(this.generateTagAddedMessage(textToAnnounce));
640
+ this.tagsList = newTagsList.concat(tagExistsAsOption || tag);
641
+ // if maxTags has been reached, focus should go to the tagArea
642
+ if (this.tagLimitReached) {
643
+ this.tagAreaEl.focus();
644
+ }
645
+ }
646
+ }
647
+ removeTag(tag) {
648
+ let textToAnnounce = tag;
649
+ if (this.tagInputType === "table") {
650
+ const referencedRow = this.el.querySelector(`#${tag}`);
651
+ textToAnnounce = referencedRow.col1;
652
+ }
653
+ const tagRemovedMessage = intl.formatMessage({ id: "tagInput.tagRemoved", defaultMessage: "{tag} removed" }, { tag: textToAnnounce });
654
+ this.announce(tagRemovedMessage);
655
+ this.tagsList = this.filterCaseInsensitive(this.tagsList, tag);
656
+ if (this.tagInputType === "dropdown") {
657
+ // if a tag was introduced by the user, also remove it from the dropdown options
658
+ const devOptionsList = csvToArray(this.options);
659
+ if (this.includesCaseInsensitive(this.optionsList, tag) && !this.includesCaseInsensitive(devOptionsList, tag)) {
660
+ this.removeOption(tag);
661
+ }
662
+ }
663
+ }
664
+ focusListItem(item) {
665
+ this.focusedListItem = item;
666
+ this.inputEl.setAttribute("aria-activedescendant", this.focusedListItem.id);
667
+ item.scrollIntoView({ block: "nearest" });
668
+ }
669
+ focusTag(element) {
670
+ if (element.classList.contains("locked")) {
671
+ this.focusedTag = null;
672
+ this.tagAreaEl.setAttribute("aria-activedescendant", "");
673
+ }
674
+ else {
675
+ this.focusedTag = element;
676
+ this.tagAreaEl.setAttribute("aria-activedescendant", this.focusedTag.id);
677
+ }
678
+ }
679
+ focusCell(position) {
680
+ this.clearCellFocus(false);
681
+ if (position.row) {
682
+ const rowToFocus = this.localRowEls[position.row];
683
+ const rowCells = rowToFocus.querySelectorAll("td");
684
+ const cellToFocus = rowCells[position.column - 1];
685
+ const contentWrapper = cellToFocus.querySelector(".cell-content-wrapper");
686
+ const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
687
+ rowToFocus.classList.add("focused");
688
+ cellToFocus.classList.add("focused");
689
+ cellToFocus.scrollIntoView({ block: "nearest" });
690
+ this.inputEl.setAttribute("aria-activedescendant", cellToFocus.id);
691
+ this.dismissTooltip();
692
+ if (isTruncated) {
693
+ // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
694
+ showTooltip("bottom", cellToFocus, cellToFocus.innerText);
695
+ this.tooltipVisible = true;
696
+ }
697
+ }
698
+ }
699
+ clearTagFocus() {
700
+ this.tagAreaEl.setAttribute("aria-activedescendant", "");
701
+ this.focusedTag = null;
702
+ }
703
+ clearCellFocus(resetPosition = true) {
704
+ this.inputEl.setAttribute("aria-activedescendant", "");
705
+ if (resetPosition) {
706
+ this.tablePosition = { row: 0, column: 1 };
707
+ }
708
+ this.localRowEls.forEach((row) => {
709
+ row.classList.remove("focused");
710
+ row.querySelectorAll("td").forEach((cell) => {
711
+ cell.classList.remove("focused");
712
+ });
713
+ });
714
+ }
715
+ openDropdown() {
716
+ // given an offset of -2px because the dropdown is transformed downwards to avoid overlapping the focus border
717
+ this.openUp = shouldOpenUp(this.el, this.dropdownEl, this.el.clientHeight, -2);
718
+ this.isExpanded = true;
719
+ }
720
+ closeDropdown() {
721
+ this.clearListItemFocus();
722
+ this.isExpanded = false;
723
+ }
724
+ clearListItemFocus() {
725
+ this.focusedListItem = null;
726
+ this.inputEl.setAttribute("aria-activedescendant", "");
727
+ this.listItemEls.forEach((el) => {
728
+ el.classList.remove("focused");
729
+ });
730
+ }
731
+ resetInput() {
732
+ this.charCount = 0;
733
+ this.inputEl.value = "";
734
+ }
735
+ announce(message) {
736
+ // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
737
+ if (this.liveRegionEl.textContent === message) {
738
+ message += "\u00A0";
739
+ }
740
+ this.liveRegionMessage = message;
741
+ }
742
+ announceExistingOptions() {
743
+ // request animation frame to wait for re-rendering of filtered options
744
+ window.requestAnimationFrame(() => {
745
+ let numResults = 0;
746
+ if (this.tagInputType === "dropdown") {
747
+ numResults = this.optionEls.length;
748
+ }
749
+ else if (this.tagInputType === "table") {
750
+ numResults = this.filteredRows.length;
751
+ }
752
+ const existingOptionsMessage = intl.formatMessage({
753
+ id: "tagInput.existingOptions",
754
+ defaultMessage: "{num, plural, one {1 existing option.} other {# existing options.}}",
755
+ }, { num: numResults });
756
+ this.announce(existingOptionsMessage);
757
+ });
758
+ }
759
+ generateCharacterLimitWarning(charCount, charLimit) {
760
+ let message = globalMessages.getCharactersEntered(charCount, charLimit);
761
+ if (charCount >= charLimit) {
762
+ message += ` ${globalMessages.characterLimitReached}`;
763
+ }
764
+ return message;
765
+ }
766
+ positionInput() {
767
+ const lastTag = this.tagEls[this.tagEls.length - 1];
768
+ // default placement to fall back to when no tags are present, or not enough space is available
769
+ this.inputEl.style.position = "static";
770
+ this.inputEl.style.width = "100%";
771
+ if (lastTag) {
772
+ const spaceAvailable = this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right;
773
+ if (spaceAvailable >= this.inputMinimumWidth) {
774
+ // because the input has right: 0px
775
+ // all thats needed to properly place it is setting position: absolute, top, and width
776
+ this.inputEl.style.position = "absolute";
777
+ this.inputEl.style.top = lastTag.offsetTop.toString() + "px";
778
+ this.inputEl.style.width =
779
+ (this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right - 8).toString() + "px";
780
+ }
781
+ }
782
+ }
783
+ /// Helpers
784
+ listToCSV(list) {
785
+ return list.join(",");
786
+ }
787
+ includesCaseInsensitive(list, element) {
788
+ const lowercaseList = list.map((str) => str.toLowerCase());
789
+ return lowercaseList.includes(element.toLowerCase());
790
+ }
791
+ filterCaseInsensitive(list, element) {
792
+ return list.filter((x) => x.toLowerCase() !== element.toLowerCase());
793
+ }
794
+ sortCaseInsensitive(list) {
795
+ // The vanilla .sort method places words that start with capital letters above others (ASCII order)
796
+ // so we need to pass in our own compare function to sort case-insensitive
797
+ return list.sort((a, b) => {
798
+ a = a.toLowerCase();
799
+ b = b.toLowerCase();
800
+ return a > b ? 1 : a < b ? -1 : 0;
801
+ });
802
+ }
803
+ /// Renders
804
+ renderTags() {
805
+ let lockedTags = [];
806
+ let unlockedTags = [];
807
+ this.tagsList.forEach((tag, idx) => {
808
+ const id = `tag${idx + 1}`;
809
+ let tagText = "";
810
+ let isLocked = false;
811
+ if (this.tagInputType === "dropdown") {
812
+ tagText = tag;
813
+ }
814
+ else if (this.tagInputType === "table") {
815
+ // display table tags using col1 of the row with the same id
816
+ // if one can't be found, display as empty
817
+ const referencedRow = this.el.querySelector(`#${tag}`);
818
+ tagText = referencedRow ? referencedRow.col1 : "";
819
+ isLocked = referencedRow ? referencedRow.locked : false;
820
+ }
821
+ // make sure locked tags always appear in front of list
822
+ const targetList = isLocked ? lockedTags : unlockedTags;
823
+ targetList.push(h("li", { id: id, class: `tag highlight ${this.focusedTag && this.focusedTag.id === id ? "focused" : ""} ${isLocked ? "locked" : ""}`, "data-tag": tag, role: "option" }, tagText, isLocked ? (h("div", { class: "icon lock" })) : (h("button", { class: "icon remove-btn", tabIndex: -1, onClick: () => this.handleRemoveButtonClick(tag) }))));
824
+ });
825
+ return [...lockedTags, ...unlockedTags];
826
+ }
827
+ renderDropdown() {
828
+ return (h("div", { class: `dropdown-wrapper ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("div", { id: "help-text", class: "help-text" }, this.renderHelpText()), h("ul", { class: "dropdown", id: "dropdown", role: "listbox", "aria-multiselectable": "true", "aria-expanded": this.isExpanded ? "true" : false, "aria-label": this.label, tabindex: -1 }, this.inputEl && this.renderAddNewButton(), this.renderListItems(this.optionsList))));
829
+ }
830
+ renderListItems(optionsList) {
831
+ optionsList = this.sortCaseInsensitive(optionsList);
832
+ // filter by input
833
+ if (this.inputEl && this.inputEl.value) {
834
+ optionsList = this.optionsList.filter((option) => option.toLowerCase().includes(this.inputEl.value.toLowerCase()));
835
+ }
836
+ return optionsList.map((option, idx) => {
837
+ const id = `option${idx + 1}`;
838
+ const isFocused = this.focusedListItem && this.focusedListItem.id === id;
839
+ const isSelected = this.includesCaseInsensitive(this.tagsList, option);
840
+ return (h("li", { class: `option ${isFocused ? "focused" : ""}`, role: "option", id: id, "data-option": option, "aria-selected": isSelected ? "true" : "false", "aria-disabled": isSelected ? "true" : "false", onKeyDown: (ev) => this.handleListItemKeyDown(ev), onBlur: (ev) => this.handleBlur(ev, this.el), onClick: (ev) => this.handleListItemClick(ev.target) }, option));
841
+ });
842
+ }
843
+ renderAddNewButton() {
844
+ const hasNonWhiteSpaceCharacters = this.inputEl.value.match(/\S/);
845
+ const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, this.inputEl.value.trim());
846
+ if (this.addNew && hasNonWhiteSpaceCharacters && !optionAlreadyExists) {
847
+ const id = `add-new-btn`;
848
+ const isFocused = this.focusedListItem && this.focusedListItem.id === id;
849
+ return (h("li", { role: "option", class: `add-new-btn ${isFocused ? "focused" : ""}`, id: id, "data-option": this.inputEl.value, onKeyDown: (ev) => this.handleListItemKeyDown(ev), onBlur: (ev) => this.handleBlur(ev, this.el), onClick: (ev) => this.handleListItemClick(ev.target), tabIndex: isFocused ? 0 : -1 }, `Add "${this.inputEl.value.trim()}"`));
850
+ }
851
+ else
852
+ return "";
853
+ }
854
+ renderHelpText() {
855
+ let helpText = "";
856
+ if (this.optionsList.length > 0) {
857
+ helpText += this.componentMessages.selectionHelpText;
858
+ }
859
+ if (this.addNew) {
860
+ helpText += " " + this.componentMessages.addNewHelpText;
861
+ }
862
+ return helpText;
863
+ }
864
+ renderTagCounter() {
865
+ if (this.maxTags) {
866
+ return (h("div", { class: "lower-row" }, h("div", { id: "max-tags" }, `${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`, this.tagLimitReached && ` - ${this.componentMessages.maxTagsReached}`)));
867
+ }
868
+ }
869
+ renderTable() {
870
+ return (h("div", { class: "table-wrapper", onScroll: () => this.dismissTooltip() }, h("table", { id: "table", role: "grid", class: `${this.colWidths ? "fixed-widths" : ""}`, "aria-label": this.label, "aria-multiselectable": "true" }, this.renderTableHeaders(), this.filteredRows.length ? this.renderTableRows() : h("div", { class: "no-results" }, this.noResultsMessage))));
871
+ }
872
+ renderTableHeaders() {
873
+ return (h("tr", { class: "headers", role: "row" }, csvToArray(this.colHeaders).map((header, idx) => {
874
+ let overflowRule = "wrap";
875
+ if (this.colWrap && csvToArray(this.colWrap)[idx]) {
876
+ overflowRule = csvToArray(this.colWrap)[idx];
877
+ }
878
+ return (h("th", { class: `header-cell ${overflowRule}`, role: "columnheader",
879
+ // @ts-ignore
880
+ width: this.colWidths ? csvToArray(this.colWidths)[idx] : "" }, header));
881
+ })));
882
+ }
883
+ renderTableRows() {
884
+ return this.filteredRows.map((row) => {
885
+ const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
886
+ return (h("tr", { id: row.id, class: `${row.locked ? "locked" : ""} ${isSelected ? "selected" : ""}`, role: "row", onClick: () => this.handleTableRowClick(row.id) }, this.renderTableCells(row)));
887
+ });
888
+ }
889
+ renderTableCells(row) {
890
+ const colValues = [row.col1, row.col2, row.col3, row.col4].filter((val) => !!val);
891
+ const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
892
+ return colValues.map((val, idx) => {
893
+ const localId = `${row.id}-col${idx + 1}`;
894
+ let overflowRule = "wrap";
895
+ if (this.colWrap && csvToArray(this.colWrap)[idx]) {
896
+ overflowRule = csvToArray(this.colWrap)[idx];
897
+ }
898
+ return (h("td", { id: localId, role: "gridcell", "aria-describedby": `${localId}-description`, "aria-selected": isSelected.toString(), onMouseEnter: (ev) => this.handleCellMouseEnter(ev), onMouseLeave: () => this.dismissTooltip() }, h("div", { class: `cell-content-wrapper ${overflowRule}` }, val), h("div", { class: "description", id: `${localId}-description` }, row.locked ? "locked" : "")));
899
+ });
900
+ }
901
+ render() {
902
+ return (h(Host, { id: this.uid }, h("div", { class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", htmlFor: `input${this.uid}` }, this.label, this.requiredField && (h("span", { class: "required", "aria-hidden": "true" }, "*")))), h("div", { class: `field-wrapper ${this.focusedElement ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, h("div", { class: "upper-row" }, h("div", { class: "tags-and-input-wrapper" }, this.tagsList.length > 0 && (h("ul", { ref: (el) => (this.tagAreaEl = el), class: "tag-area", role: "listbox", "aria-activedescendant": "", "aria-orientation": "horizontal", "aria-label": `${this.label} ${this.tagsList.length > 0 ? this.componentMessages.tagAreaInstructions : ""}`, tabindex: this.nonLockedTagsList.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: () => this.handleTagAreaFocus(), onBlur: (ev) => {
903
+ this.clearTagFocus();
904
+ this.handleBlur(ev, this.el);
905
+ }, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags())), h("input", { id: `input${this.uid}`, class: this.tagLimitReached ? "hidden" : "", role: "combobox", ref: (el) => (this.inputEl = el), autocomplete: "off", "aria-required": this.requiredField ? "true" : null, "aria-controls": this.tagInputType, "aria-describedby": `help-text${this.errorMessage ? " error " : ""}`, "aria-label": `${this.label} ${this.tagInputType === "dropdown" ? globalMessages.getCharacterLimit(this.characterLimit) : ""}`, "aria-expanded": this.tagInputType === "dropdown" ? this.isExpanded.toString() : null, placeholder: this.placeholder, maxLength: this.tagInputType === "dropdown" ? this.characterLimit : undefined, onInput: () => this.handleInputChanged(this.inputEl.value), onBlur: (ev) => {
906
+ this.handleBlur(ev, this.el);
907
+ }, onFocus: () => this.handleInputFocus(), onKeyDown: (ev) => this.handleInputKeyDown(ev) })), this.tagInputType === "dropdown" && (h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.tagInputType === "dropdown" && this.renderDropdown()), this.info && (h("div", { id: "info", class: "info-text" }, this.info)), this.errorMessage && h("div", { id: "error" }, this.errorMessage), h("div", { class: "sr-only", "aria-live": "assertive", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.tagInputType === "table" && this.renderTable())));
908
+ }
909
+ static get delegatesFocus() { return true; }
910
+ get el() { return getElement(this); }
911
+ static get watchers() { return {
912
+ "tagsList": ["reflectSelectedTags"],
913
+ "errorMessage": ["handleErrorMessageChange"]
914
+ }; }
915
+ };
928
916
  TagInput.style = wmTagInputCss;
929
917
 
930
918
  export { TagInput as wm_tag_input };