@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
@@ -3,932 +3,920 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1f84c034.js');
6
- const functions = require('./functions-53aff314.js');
6
+ const functions = require('./functions-d2d99997.js');
7
+ const intl = require('./intl-a1ccf587.js');
7
8
 
8
- 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}";
9
+ 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}";
9
10
 
10
- const TagInput = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.wmTagInputChanged = index.createEvent(this, "wmTagInputChanged", 7);
14
- this.uid = this.el.id ? this.el.id : functions.generateId();
15
- this.openUp = false;
16
- this.tooltipVisible = false;
17
- this.debouncedUpdate = functions.debounce(() => index.forceUpdate(this.el), 30);
18
- this.label = undefined;
19
- this.labelPosition = "top";
20
- this.options = "";
21
- this.selectedTags = "";
22
- this.info = undefined;
23
- this.errorMessage = undefined;
24
- this.addNew = true;
25
- this.placeholder = undefined;
26
- this.requiredField = false;
27
- this.characterLimit = 50;
28
- this.maxTags = undefined;
29
- this.tagInputType = "dropdown";
30
- this.colHeaders = undefined;
31
- this.colWidths = undefined;
32
- this.colWrap = undefined;
33
- this.messageConfig = "";
34
- this.focusedListItem = undefined;
35
- this.focusedTag = null;
36
- this.tablePosition = { row: 0, column: 1 };
37
- this.isExpanded = false;
38
- this.tagsList = functions.csvToArray(this.selectedTags);
39
- this.optionsList = functions.csvToArray(this.options);
40
- this.charCount = 0;
41
- this.liveRegionMessage = "";
42
- }
43
- get focusedElement() {
44
- return this.el.shadowRoot.activeElement;
45
- }
46
- get listItemEls() {
47
- return Array.from(this.dropdownEl.querySelectorAll("li"));
48
- }
49
- get tagEls() {
50
- return this.tagAreaEl ? Array.from(this.tagAreaEl.querySelectorAll(".tag")) : [];
51
- }
52
- get nonLockedTagEls() {
53
- return this.tagEls.filter((tag) => !tag.classList.contains("locked"));
54
- }
55
- get optionEls() {
56
- return Array.from(this.dropdownEl.querySelectorAll(".option"));
57
- }
58
- get wmRowEls() {
59
- return Array.from(this.el.querySelectorAll("wm-tag-input-row"));
60
- }
61
- get localRowEls() {
62
- return Array.from(this.el.shadowRoot.querySelectorAll("tr"));
63
- }
64
- get filteredRows() {
65
- return this.wmRowEls.filter((row) => {
66
- const colValues = [row.col1, row.col2, row.col3, row.col4].join("").toLowerCase();
67
- return this.inputEl && this.inputEl.value ? colValues.includes(this.inputEl.value.toLowerCase()) : true;
68
- });
69
- }
70
- get nonLockedTagsList() {
71
- let list = [];
72
- if (this.tagInputType === "table") {
73
- this.tagsList.forEach((id) => {
74
- const correspondingRowEl = this.wmRowEls.filter((row) => id === row.id)[0];
75
- if (!correspondingRowEl.locked) {
76
- list.push(id);
77
- }
78
- });
79
- }
80
- else if (this.tagInputType === "dropdown") {
81
- list = this.tagsList;
82
- }
83
- return list;
84
- }
85
- get tagLimitReached() {
86
- return !!(this.maxTags && this.tagsList.length >= this.maxTags);
87
- }
88
- get noResultsMessage() {
89
- return functions.intl.formatMessage({
90
- id: "tagInput.noResults",
91
- defaultMessage: "No results match your search.",
92
- description: "Message displayed when a user's search returns empty.",
93
- });
94
- }
95
- get componentMessages() {
96
- const addNewHelpText = functions.intl.formatMessage({
97
- id: "tagInput.addNewHelpText",
98
- defaultMessage: "Press the Enter or Comma key to add a new tag.",
99
- description: "Help text appearing in a dropdown. Use imperative",
100
- });
101
- const selectionHelpText = functions.intl.formatMessage({
102
- id: "tagInput.selectionHelpText",
103
- defaultMessage: "Search and select a tag.",
104
- description: "Help text appearing in a dropdown. Use imperative",
105
- });
106
- const maxTagsReachedMessage = functions.intl.formatMessage({
107
- id: "tagInput.maxTagsReached",
108
- defaultMessage: "No more tags can be added because the limit has been reached.",
109
- });
110
- const tagAreaInstructions = functions.intl.formatMessage({
111
- id: "tagInput.tagAreaInstructions",
112
- defaultMessage: "tag selection. Press Backspace or Delete to remove a tag.",
113
- });
114
- const tagsAddedMessage = functions.intl.formatMessage({
115
- id: "tagInput.tagsAdded",
116
- defaultMessage: "Tags added",
117
- description: "For the user to understand how close they are to the tag limit, followed by x/y count",
118
- });
119
- const defaultConfig = {
120
- addNewHelpText: addNewHelpText,
121
- selectionHelpText: selectionHelpText,
122
- maxTagsReached: maxTagsReachedMessage,
123
- tagAreaInstructions: tagAreaInstructions,
124
- tagsAdded: tagsAddedMessage,
125
- };
126
- const userProvidedConfig = functions.safeParseJSON(this.messageConfig);
127
- return userProvidedConfig ? Object.assign(Object.assign({}, defaultConfig), userProvidedConfig) : defaultConfig;
128
- }
129
- get inputMinimumWidth() {
130
- // 150px is the minimum width of the input field, or the length of the placeholder text
131
- const inputElStyles = getComputedStyle(this.inputEl);
132
- const tagElStyles = getComputedStyle(this.tagEls[this.tagEls.length - 1]);
133
- const inputElBuffer = [
134
- inputElStyles.paddingLeft,
135
- inputElStyles.paddingRight,
136
- inputElStyles.marginLeft,
137
- inputElStyles.marginRight,
138
- tagElStyles.marginRight,
139
- ].reduce((prev, curr) => prev + parseInt(curr.replace("px", "")), 0);
140
- const minimumWidth = Math.max(150, functions.measureText(this.inputEl, this.placeholder).width + inputElBuffer);
141
- return minimumWidth;
142
- }
143
- generateTagAddedMessage(tag) {
144
- return functions.intl.formatMessage({
145
- id: "tagInput.tagAdded",
146
- defaultMessage: "{tagName} added.",
147
- description: "A confirmation for adding a tag.",
148
- }, { tagName: tag });
149
- }
150
- generateTagAlreadyAddedMessage(tag) {
151
- return functions.intl.formatMessage({
152
- id: "tagInput.tagAlreadyAdded",
153
- defaultMessage: "{tagName} has already been added.",
154
- description: "An alert for adding a tag that is already present.",
155
- }, { tagName: tag });
156
- }
157
- generateCharacterLimitLabel(characterLimit) {
158
- return functions.intl.formatMessage({
159
- id: "global.characterLimit",
160
- defaultMessage: "{limit, number} characters allowed.",
161
- description: "for screen readers",
162
- }, { limit: characterLimit });
163
- }
164
- componentWillLoad() {
165
- if (!this.placeholder) {
166
- this.placeholder = this.createPlaceholderDefault(this.addNew, !!this.options);
167
- }
168
- if (!this.label) {
169
- console.error("wm-tag-input must have a label property");
170
- }
171
- this.consolidateSelectedTags();
172
- this.el.focus = () => {
173
- const firstFocusableTag = this.nonLockedTagEls[0];
174
- if (firstFocusableTag) {
175
- this.tagAreaEl.focus();
176
- this.focusTag(firstFocusableTag);
177
- }
178
- else {
179
- this.inputEl.focus();
180
- }
181
- };
182
- // on resize of component, trigger componentDidRender -> positionInput
183
- const resizeObserver = new ResizeObserver(() => this.debouncedUpdate());
184
- resizeObserver.observe(this.el);
185
- }
186
- componentDidLoad() {
187
- // prevent highlighting of pre-selected tags
188
- this.tagEls.forEach((el) => el.classList.remove("highlight"));
189
- }
190
- componentDidRender() {
191
- this.positionInput();
192
- }
193
- consolidateSelectedTags() {
194
- this.tagsList.forEach((tag) => {
195
- if (!this.includesCaseInsensitive(this.optionsList, tag)) {
196
- this.options += `${this.options.length > 0 ? "," : ""}${tag}`;
197
- }
198
- });
199
- this.optionsList = functions.csvToArray(this.options);
200
- }
201
- createPlaceholderDefault(addNew, hasOptions) {
202
- const addAndSearchPlaceholder = functions.intl.formatMessage({
203
- id: "tagInput.placeholderAddAndSearch",
204
- defaultMessage: "Add or search for a tag",
205
- description: "Placeholder text. Use imperative",
206
- });
207
- const searchPlaceholder = functions.intl.formatMessage({
208
- id: "tagInput.placeholderSearch",
209
- defaultMessage: "Search and select a tag",
210
- description: "Placeholder text. Use imperative",
211
- });
212
- const addPlaceholder = functions.intl.formatMessage({
213
- id: "tagInput.placeholderAdd",
214
- defaultMessage: "Add a new tag",
215
- description: "Placeholder text. Use imperative",
216
- });
217
- let placeholder = "";
218
- if (addNew && hasOptions) {
219
- placeholder = addAndSearchPlaceholder;
220
- }
221
- else if (!addNew && hasOptions) {
222
- placeholder = searchPlaceholder;
223
- }
224
- else if (addNew) {
225
- placeholder = addPlaceholder;
226
- }
227
- return placeholder;
228
- }
229
- reflectSelectedTags(newValue, oldValue) {
230
- const isAddition = newValue.length > oldValue.length;
231
- let changedTag = "";
232
- let selectedTags = this.tagsList;
233
- if (isAddition) {
234
- changedTag = newValue.filter((val) => !oldValue.includes(val))[0];
235
- }
236
- else {
237
- changedTag = oldValue.filter((val) => !newValue.includes(val))[0];
238
- }
239
- // event emitted by type table uses element references instead of strings
240
- if (this.tagInputType === "table") {
241
- changedTag = this.wmRowEls.filter((row) => row.id === changedTag)[0];
242
- selectedTags = this.tagsList.map((id) => this.el.querySelector(`#${id}`));
243
- }
244
- this.selectedTags = this.listToCSV(this.tagsList);
245
- let detail = { value: selectedTags, tagChanged: changedTag };
246
- this.wmTagInputChanged.emit(detail);
247
- }
248
- handleErrorMessageChange() {
249
- if (this.errorMessage) {
250
- this.announce(this.errorMessage);
251
- }
252
- }
253
- handleRowUpdate() {
254
- index.forceUpdate(this.el);
255
- }
256
- closeIfNotElOrChild(ev) {
257
- const isntElOrChild = ev.target !== this.el && !this.el.shadowRoot.contains(ev.target);
258
- if (this.tagInputType === "dropdown" && isntElOrChild && this.isExpanded) {
259
- this.closeDropdown();
260
- }
261
- }
262
- // From wm-button
263
- // we need to listen for scroll events during the capture phase because they do not bubble up
264
- // there can be layouts where the main content has 100vh and overflows
265
- // in these cases window will register no scroll events unless we catch on they way down
266
- dismissTooltip() {
267
- if (this.tooltipVisible) {
268
- functions.hideTooltip();
269
- this.tooltipVisible = false;
270
- }
271
- }
272
- handleInputKeyDown(ev) {
273
- if (/^.$/.test(ev.key) && this.inputEl.value.length >= this.characterLimit) {
274
- this.announceCharacterLimitWarning(this.inputEl.value.length, this.characterLimit);
275
- }
276
- // prevent keydown triggering on tag area
277
- ev.stopPropagation();
278
- switch (ev.key) {
279
- case "Enter":
280
- case ",":
281
- ev.preventDefault();
282
- this.handleInputEnter();
283
- break;
284
- case "ArrowDown":
285
- ev.preventDefault();
286
- this.handleInputArrowDown();
287
- break;
288
- case "ArrowUp":
289
- ev.preventDefault();
290
- this.handleInputArrowUp();
291
- break;
292
- case "ArrowLeft":
293
- ev.preventDefault();
294
- if (this.tagInputType === "table" && this.tablePosition.row) {
295
- this.moveLeftCell();
296
- }
297
- break;
298
- case "ArrowRight":
299
- ev.preventDefault();
300
- if (this.tagInputType === "table" && this.tablePosition.row) {
301
- this.moveRightCell();
302
- }
303
- break;
304
- case "Escape":
305
- if (this.tagInputType === "dropdown" && this.isExpanded) {
306
- this.closeDropdown();
307
- }
308
- break;
309
- case "ArrowLeft":
310
- case "Backspace":
311
- this.handleInputBackspace();
312
- break;
313
- }
314
- }
315
- handleInputFocus() {
316
- if (this.tagInputType === "dropdown") {
317
- this.openDropdown();
318
- this.clearListItemFocus();
319
- }
320
- // force update needed to apply styled state of field-wrapper el
321
- index.forceUpdate(this.el);
322
- }
323
- handleInputChanged(value) {
324
- this.charCount = value.length;
325
- if (this.tagInputType === "dropdown") {
326
- this.clearListItemFocus();
327
- if (this.charCount >= this.characterLimit - 5) {
328
- this.announceCharacterLimitWarning(this.charCount, this.characterLimit);
329
- }
330
- if (!this.isExpanded) {
331
- this.openDropdown();
332
- }
333
- }
334
- else if (this.tagInputType === "table") {
335
- this.clearCellFocus();
336
- }
337
- this.announceExistingOptions();
338
- }
339
- handleInputEnter() {
340
- if (this.tagInputType === "dropdown") {
341
- if (this.focusedListItem) {
342
- this.handleListItemClick(this.focusedListItem);
343
- }
344
- else {
345
- this.submitInput(this.addNew, this.inputEl.value.trim());
346
- }
347
- }
348
- else if (this.tagInputType === "table" && this.tablePosition.row > 0) {
349
- this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id);
350
- }
351
- }
352
- submitInput(canAddNew, value) {
353
- const hasNonWhiteSpaceCharacters = value.match(/\S/);
354
- if (canAddNew && hasNonWhiteSpaceCharacters) {
355
- this.addTag(value);
356
- this.optionsList = this.addOption(value);
357
- this.resetInput();
358
- }
359
- }
360
- handleInputArrowDown() {
361
- if (this.tagInputType === "table") {
362
- this.moveDownRow();
363
- }
364
- else if (this.tagInputType === "dropdown" && this.isExpanded) {
365
- this.moveDownListItem();
366
- }
367
- else if (this.tagInputType === "dropdown") {
368
- this.openDropdown();
369
- }
370
- }
371
- handleInputArrowUp() {
372
- if (this.tagInputType === "table") {
373
- this.moveUpRow();
374
- }
375
- else if (this.tagInputType === "dropdown" && this.isExpanded) {
376
- this.moveUpListItem();
377
- }
378
- else if (this.tagInputType === "dropdown") {
379
- this.openDropdown();
380
- }
381
- }
382
- handleInputBackspace() {
383
- if (this.inputEl.value === "" && this.tagsList.length > 0) {
384
- // wait for events to finish firing before redirecting focus
385
- // prevents double input in input area and tag area
386
- window.requestAnimationFrame(() => {
387
- if (this.nonLockedTagsList.length > 0) {
388
- this.tagAreaEl.focus();
389
- this.focusTag(this.tagEls[this.tagEls.length - 1]);
390
- }
391
- });
392
- }
393
- }
394
- handleListItemKeyDown(ev) {
395
- const typedEvTarget = ev.target;
396
- switch (ev.key) {
397
- case "Enter":
398
- case " ":
399
- ev.preventDefault();
400
- typedEvTarget.click();
401
- break;
402
- case "ArrowDown":
403
- ev.preventDefault();
404
- this.moveDownListItem();
405
- break;
406
- case "ArrowUp":
407
- ev.preventDefault();
408
- this.moveUpListItem();
409
- break;
410
- case "Escape":
411
- if (this.focusedElement !== this.inputEl) {
412
- this.inputEl.focus();
413
- }
414
- else if (this.tagInputType === "dropdown") {
415
- this.closeDropdown();
416
- }
417
- break;
418
- }
419
- }
420
- handleListItemClick(item) {
421
- const tag = item.dataset.option.trim() || "";
422
- if (this.includesCaseInsensitive(this.tagsList, tag)) {
423
- this.announce(this.generateTagAlreadyAddedMessage(tag));
424
- }
425
- else {
426
- this.resetInput();
427
- this.addTag(tag);
428
- this.optionsList = this.addOption(tag);
429
- this.focusedListItem = null;
430
- }
431
- }
432
- handleTableRowClick(rowId) {
433
- const referencedRow = this.el.querySelector(`#${rowId}`);
434
- const isLocked = referencedRow.locked;
435
- if (!isLocked) {
436
- if (this.includesCaseInsensitive(this.tagsList, rowId)) {
437
- this.removeTag(rowId);
438
- }
439
- else if (!this.tagLimitReached) {
440
- this.addTag(rowId);
441
- this.resetInput();
442
- }
443
- }
444
- }
445
- handleTagAreaKeyDown(ev) {
446
- switch (ev.key) {
447
- case "ArrowLeft":
448
- case "ArrowUp":
449
- ev.preventDefault();
450
- this.moveLeftTag();
451
- break;
452
- case "ArrowRight":
453
- case "ArrowDown":
454
- ev.preventDefault();
455
- this.moveRightTag();
456
- break;
457
- case "Backspace":
458
- case "Delete":
459
- this.handleTagAreaDelete();
460
- break;
461
- }
462
- }
463
- handleTagAreaDelete() {
464
- const isLocked = this.focusedTag && this.focusedTag.classList.contains("locked");
465
- if (this.focusedTag && this.focusedTag.dataset.tag && !isLocked) {
466
- this.removeTag(this.focusedTag.dataset.tag);
467
- if (this.nonLockedTagsList.length === 0) {
468
- // focus input if no tags are left
469
- this.inputEl.focus();
470
- }
471
- else if (this.focusedTag === this.tagEls[this.tagEls.length - 1]) {
472
- // reassign focus if removing the last tag but there are still tags remaining
473
- this.focusedTag = this.tagEls[this.tagEls.length - 2];
474
- this.focusTag(this.focusedTag);
475
- }
476
- }
477
- }
478
- handleBlur(ev, component) {
479
- const isntElOrChild = ev.relatedTarget !== component && !this.el.shadowRoot.contains(ev.relatedTarget);
480
- this.dismissTooltip();
481
- this.clearCellFocus();
482
- if (isntElOrChild) {
483
- this.fieldWrapperEl.classList.remove("focused");
484
- if (this.tagInputType === "dropdown") {
485
- this.closeDropdown();
486
- }
487
- }
488
- }
489
- handleCellMouseEnter(ev) {
490
- const cell = ev.target;
491
- const contentWrapper = cell.querySelector(".cell-content-wrapper");
492
- const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
493
- if (isTruncated) {
494
- // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
495
- functions.showTooltip("bottom", cell, cell.innerText);
496
- this.tooltipVisible = true;
497
- }
498
- }
499
- handleTagAreaFocus() {
500
- if (this.tagInputType === "dropdown") {
501
- this.closeDropdown();
502
- }
503
- const firstFocusableTag = this.nonLockedTagEls[0];
504
- firstFocusableTag && this.focusTag(firstFocusableTag);
505
- }
506
- handleRemoveButtonClick(tag) {
507
- this.moveLeftTag();
508
- this.removeTag(tag);
509
- }
510
- moveDownListItem() {
511
- if (this.listItemEls.length > 0) {
512
- const firstListItem = this.listItemEls[0];
513
- if (!this.focusedListItem) {
514
- this.focusListItem(firstListItem);
515
- }
516
- else if (this.focusedListItem.nextElementSibling) {
517
- this.focusListItem(this.focusedListItem.nextElementSibling);
518
- }
519
- else {
520
- this.focusListItem(firstListItem);
521
- }
522
- }
523
- }
524
- moveUpListItem() {
525
- if (this.listItemEls.length > 0) {
526
- const lastListItem = this.listItemEls[this.listItemEls.length - 1];
527
- if (!this.focusedListItem) {
528
- this.focusListItem(lastListItem);
529
- }
530
- else if (this.focusedListItem.previousElementSibling) {
531
- this.focusListItem(this.focusedListItem.previousElementSibling);
532
- }
533
- else {
534
- this.clearListItemFocus();
535
- }
536
- }
537
- }
538
- moveDownRow() {
539
- if (this.filteredRows.length > 0) {
540
- if (this.tablePosition.row === 0) {
541
- this.tablePosition.row = 1;
542
- }
543
- else if (this.tablePosition.row === this.filteredRows.length) {
544
- this.tablePosition.row = 1;
545
- }
546
- else {
547
- this.tablePosition.row++;
548
- }
549
- // skip locked rows
550
- const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
551
- if (rowToFocus.locked) {
552
- this.moveDownRow();
553
- }
554
- else {
555
- this.focusCell(this.tablePosition);
556
- }
557
- }
558
- }
559
- moveUpRow() {
560
- if (this.filteredRows.length > 0) {
561
- if (this.tablePosition.row === 0) {
562
- this.tablePosition.row = this.filteredRows.length;
563
- }
564
- else if (this.tablePosition.row === 1) {
565
- this.tablePosition.row = 0;
566
- }
567
- else {
568
- this.tablePosition.row--;
569
- }
570
- // skip locked rows
571
- const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
572
- if (rowToFocus && rowToFocus.locked) {
573
- this.moveUpRow();
574
- }
575
- else if (rowToFocus) {
576
- this.focusCell(this.tablePosition);
577
- }
578
- else {
579
- this.clearCellFocus();
580
- }
581
- }
582
- }
583
- moveLeftCell() {
584
- if (this.tablePosition.column != 1) {
585
- this.tablePosition.column--;
586
- this.focusCell(this.tablePosition);
587
- }
588
- }
589
- moveRightCell() {
590
- const numCols = functions.csvToArray(this.colHeaders).length;
591
- if (this.tablePosition.column < numCols) {
592
- this.tablePosition.column++;
593
- this.focusCell(this.tablePosition);
594
- }
595
- }
596
- moveLeftTag() {
597
- const lastTag = this.tagEls[this.tagEls.length - 1];
598
- if (this.focusedTag && this.tagEls.includes(this.focusedTag.previousElementSibling)) {
599
- this.focusedTag = this.focusedTag.previousElementSibling;
600
- }
601
- else {
602
- this.focusedTag = lastTag;
603
- }
604
- // skip locked tags
605
- if (this.focusedTag.classList.contains("locked") && this.nonLockedTagEls.length > 0) {
606
- this.moveLeftTag();
607
- }
608
- else {
609
- this.focusTag(this.focusedTag);
610
- }
611
- }
612
- moveRightTag() {
613
- const firstTag = this.tagEls[0];
614
- if (this.focusedTag && this.tagEls.includes(this.focusedTag.nextElementSibling)) {
615
- this.focusedTag = this.focusedTag.nextElementSibling;
616
- }
617
- else {
618
- this.focusedTag = firstTag;
619
- }
620
- // skip locked tags
621
- if (this.focusedTag.classList.contains("locked")) {
622
- this.moveRightTag();
623
- }
624
- else {
625
- this.focusTag(this.focusedTag);
626
- }
627
- }
628
- addOption(option) {
629
- let newOptionsList = this.optionsList;
630
- const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, option);
631
- if (!optionAlreadyExists) {
632
- newOptionsList = newOptionsList.concat(option);
633
- }
634
- return newOptionsList;
635
- }
636
- removeOption(option) {
637
- this.optionsList = this.filterCaseInsensitive(this.optionsList, option);
638
- }
639
- addTag(tag) {
640
- let newTagsList = this.tagsList;
641
- const tagAlreadyAdded = this.includesCaseInsensitive(this.tagsList, tag);
642
- const tagExistsAsOption = this.optionsList.filter((x) => x.toLowerCase() === tag.toLowerCase())[0];
643
- if (!tagAlreadyAdded) {
644
- let textToAnnounce = tag;
645
- if (this.tagInputType === "table") {
646
- const referencedRow = this.el.querySelector(`#${tag}`);
647
- textToAnnounce = referencedRow.col1;
648
- }
649
- this.announce(this.generateTagAddedMessage(textToAnnounce));
650
- this.tagsList = newTagsList.concat(tagExistsAsOption || tag);
651
- // if maxTags has been reached, focus should go to the tagArea
652
- if (this.tagLimitReached) {
653
- this.tagAreaEl.focus();
654
- }
655
- }
656
- }
657
- removeTag(tag) {
658
- let textToAnnounce = tag;
659
- if (this.tagInputType === "table") {
660
- const referencedRow = this.el.querySelector(`#${tag}`);
661
- textToAnnounce = referencedRow.col1;
662
- }
663
- const tagRemovedMessage = functions.intl.formatMessage({ id: "tagInput.tagRemoved", defaultMessage: "{tag} removed" }, { tag: textToAnnounce });
664
- this.announce(tagRemovedMessage);
665
- this.tagsList = this.filterCaseInsensitive(this.tagsList, tag);
666
- if (this.tagInputType === "dropdown") {
667
- // if a tag was introduced by the user, also remove it from the dropdown options
668
- const devOptionsList = functions.csvToArray(this.options);
669
- if (this.includesCaseInsensitive(this.optionsList, tag) && !this.includesCaseInsensitive(devOptionsList, tag)) {
670
- this.removeOption(tag);
671
- }
672
- }
673
- }
674
- focusListItem(item) {
675
- this.focusedListItem = item;
676
- this.inputEl.setAttribute("aria-activedescendant", this.focusedListItem.id);
677
- item.scrollIntoView({ block: "nearest" });
678
- }
679
- focusTag(element) {
680
- if (element.classList.contains("locked")) {
681
- this.focusedTag = null;
682
- this.tagAreaEl.setAttribute("aria-activedescendant", "");
683
- }
684
- else {
685
- this.focusedTag = element;
686
- this.tagAreaEl.setAttribute("aria-activedescendant", this.focusedTag.id);
687
- }
688
- }
689
- focusCell(position) {
690
- this.clearCellFocus(false);
691
- if (position.row) {
692
- const rowToFocus = this.localRowEls[position.row];
693
- const rowCells = rowToFocus.querySelectorAll("td");
694
- const cellToFocus = rowCells[position.column - 1];
695
- const contentWrapper = cellToFocus.querySelector(".cell-content-wrapper");
696
- const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
697
- rowToFocus.classList.add("focused");
698
- cellToFocus.classList.add("focused");
699
- cellToFocus.scrollIntoView({ block: "nearest" });
700
- this.inputEl.setAttribute("aria-activedescendant", cellToFocus.id);
701
- this.dismissTooltip();
702
- if (isTruncated) {
703
- // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
704
- functions.showTooltip("bottom", cellToFocus, cellToFocus.innerText);
705
- this.tooltipVisible = true;
706
- }
707
- }
708
- }
709
- clearTagFocus() {
710
- this.tagAreaEl.setAttribute("aria-activedescendant", "");
711
- this.focusedTag = null;
712
- }
713
- clearCellFocus(resetPosition = true) {
714
- this.inputEl.setAttribute("aria-activedescendant", "");
715
- if (resetPosition) {
716
- this.tablePosition = { row: 0, column: 1 };
717
- }
718
- this.localRowEls.forEach((row) => {
719
- row.classList.remove("focused");
720
- row.querySelectorAll("td").forEach((cell) => {
721
- cell.classList.remove("focused");
722
- });
723
- });
724
- }
725
- openDropdown() {
726
- // given an offset of -2px because the dropdown is transformed downwards to avoid overlapping the focus border
727
- this.openUp = functions.shouldOpenUp(this.el, this.dropdownEl, this.el.clientHeight, -2);
728
- this.isExpanded = true;
729
- }
730
- closeDropdown() {
731
- this.clearListItemFocus();
732
- this.isExpanded = false;
733
- }
734
- clearListItemFocus() {
735
- this.focusedListItem = null;
736
- this.inputEl.setAttribute("aria-activedescendant", "");
737
- this.listItemEls.forEach((el) => {
738
- el.classList.remove("focused");
739
- });
740
- }
741
- resetInput() {
742
- this.charCount = 0;
743
- this.inputEl.value = "";
744
- }
745
- announce(message) {
746
- // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
747
- if (this.liveRegionEl.textContent === message) {
748
- message += "\u00A0";
749
- }
750
- this.liveRegionMessage = message;
751
- }
752
- announceExistingOptions() {
753
- // request animation frame to wait for re-rendering of filtered options
754
- window.requestAnimationFrame(() => {
755
- let numResults = 0;
756
- if (this.tagInputType === "dropdown") {
757
- numResults = this.optionEls.length;
758
- }
759
- else if (this.tagInputType === "table") {
760
- numResults = this.filteredRows.length;
761
- }
762
- const existingOptionsMessage = functions.intl.formatMessage({
763
- id: "tagInput.existingOptions",
764
- defaultMessage: "{num, plural, one {1 existing option.} other {# existing options.}}",
765
- }, { num: numResults });
766
- this.announce(existingOptionsMessage);
767
- });
768
- }
769
- announceCharacterLimitWarning(charCount, charLimit) {
770
- const charactersEnteredMessage = functions.intl.formatMessage({
771
- id: "global.charactersEntered",
772
- defaultMessage: "{x, number} of {y, number} characters entered.",
773
- description: "for screen readers",
774
- }, { x: charCount, y: charLimit });
775
- const characterLimitReachedMessage = functions.intl.formatMessage({
776
- id: "global.characterLimitReached",
777
- defaultMessage: "No additional characters will be entered.",
778
- description: "for screen readers",
779
- });
780
- this.announce(`${charactersEnteredMessage}${charCount >= charLimit ? " " + characterLimitReachedMessage : ""}`);
781
- }
782
- positionInput() {
783
- const lastTag = this.tagEls[this.tagEls.length - 1];
784
- // default placement to fall back to when no tags are present, or not enough space is available
785
- this.inputEl.style.position = "static";
786
- this.inputEl.style.width = "100%";
787
- if (lastTag) {
788
- const spaceAvailable = this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right;
789
- if (spaceAvailable >= this.inputMinimumWidth) {
790
- // because the input has right: 0px
791
- // all thats needed to properly place it is setting position: absolute, top, and width
792
- this.inputEl.style.position = "absolute";
793
- this.inputEl.style.top = lastTag.offsetTop.toString() + "px";
794
- this.inputEl.style.width =
795
- (this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right - 8).toString() + "px";
796
- }
797
- }
798
- }
799
- /// Helpers
800
- listToCSV(list) {
801
- return list.join(",");
802
- }
803
- includesCaseInsensitive(list, element) {
804
- const lowercaseList = list.map((str) => str.toLowerCase());
805
- return lowercaseList.includes(element.toLowerCase());
806
- }
807
- filterCaseInsensitive(list, element) {
808
- return list.filter((x) => x.toLowerCase() !== element.toLowerCase());
809
- }
810
- sortCaseInsensitive(list) {
811
- // The vanilla .sort method places words that start with capital letters above others (ASCII order)
812
- // so we need to pass in our own compare function to sort case-insensitive
813
- return list.sort((a, b) => {
814
- a = a.toLowerCase();
815
- b = b.toLowerCase();
816
- return a > b ? 1 : a < b ? -1 : 0;
817
- });
818
- }
819
- /// Renders
820
- renderTags() {
821
- let lockedTags = [];
822
- let unlockedTags = [];
823
- this.tagsList.forEach((tag, idx) => {
824
- const id = `tag${idx + 1}`;
825
- let tagText = "";
826
- let isLocked = false;
827
- if (this.tagInputType === "dropdown") {
828
- tagText = tag;
829
- }
830
- else if (this.tagInputType === "table") {
831
- // display table tags using col1 of the row with the same id
832
- // if one can't be found, display as empty
833
- const referencedRow = this.el.querySelector(`#${tag}`);
834
- tagText = referencedRow ? referencedRow.col1 : "";
835
- isLocked = referencedRow ? referencedRow.locked : false;
836
- }
837
- // make sure locked tags always appear in front of list
838
- const targetList = isLocked ? lockedTags : unlockedTags;
839
- targetList.push(index.h("li", { id: id, class: `tag highlight ${this.focusedTag && this.focusedTag.id === id ? "focused" : ""} ${isLocked ? "locked" : ""}`, "data-tag": tag, role: "option" }, tagText, isLocked ? (index.h("div", { class: "icon lock" })) : (index.h("button", { class: "icon remove-btn", tabIndex: -1, onClick: () => this.handleRemoveButtonClick(tag) }))));
840
- });
841
- return [...lockedTags, ...unlockedTags];
842
- }
843
- renderDropdown() {
844
- return (index.h("div", { class: `dropdown-wrapper ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, index.h("div", { id: "help-text", class: "help-text" }, this.renderHelpText()), index.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))));
845
- }
846
- renderListItems(optionsList) {
847
- optionsList = this.sortCaseInsensitive(optionsList);
848
- // filter by input
849
- if (this.inputEl && this.inputEl.value) {
850
- optionsList = this.optionsList.filter((option) => option.toLowerCase().includes(this.inputEl.value.toLowerCase()));
851
- }
852
- return optionsList.map((option, idx) => {
853
- const id = `option${idx + 1}`;
854
- const isFocused = this.focusedListItem && this.focusedListItem.id === id;
855
- const isSelected = this.includesCaseInsensitive(this.tagsList, option);
856
- return (index.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));
857
- });
858
- }
859
- renderAddNewButton() {
860
- const hasNonWhiteSpaceCharacters = this.inputEl.value.match(/\S/);
861
- const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, this.inputEl.value.trim());
862
- if (this.addNew && hasNonWhiteSpaceCharacters && !optionAlreadyExists) {
863
- const id = `add-new-btn`;
864
- const isFocused = this.focusedListItem && this.focusedListItem.id === id;
865
- return (index.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()}"`));
866
- }
867
- else
868
- return "";
869
- }
870
- renderHelpText() {
871
- let helpText = "";
872
- if (this.optionsList.length > 0) {
873
- helpText += this.componentMessages.selectionHelpText;
874
- }
875
- if (this.addNew) {
876
- helpText += " " + this.componentMessages.addNewHelpText;
877
- }
878
- return helpText;
879
- }
880
- renderTagCounter() {
881
- if (this.maxTags) {
882
- return (index.h("div", { class: "lower-row" }, index.h("div", { id: "max-tags" }, `${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`, this.tagLimitReached && ` - ${this.componentMessages.maxTagsReached}`)));
883
- }
884
- }
885
- renderTable() {
886
- return (index.h("div", { class: "table-wrapper", onScroll: () => this.dismissTooltip() }, index.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() : index.h("div", { class: "no-results" }, this.noResultsMessage))));
887
- }
888
- renderTableHeaders() {
889
- return (index.h("tr", { class: "headers", role: "row" }, functions.csvToArray(this.colHeaders).map((header, idx) => {
890
- let overflowRule = "wrap";
891
- if (this.colWrap && functions.csvToArray(this.colWrap)[idx]) {
892
- overflowRule = functions.csvToArray(this.colWrap)[idx];
893
- }
894
- return (index.h("th", { class: `header-cell ${overflowRule}`, role: "columnheader",
895
- // @ts-ignore
896
- width: this.colWidths ? functions.csvToArray(this.colWidths)[idx] : "" }, header));
897
- })));
898
- }
899
- renderTableRows() {
900
- return this.filteredRows.map((row) => {
901
- const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
902
- return (index.h("tr", { id: row.id, class: `${row.locked ? "locked" : ""} ${isSelected ? "selected" : ""}`, role: "row", onClick: () => this.handleTableRowClick(row.id) }, this.renderTableCells(row)));
903
- });
904
- }
905
- renderTableCells(row) {
906
- const colValues = [row.col1, row.col2, row.col3, row.col4].filter((val) => !!val);
907
- const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
908
- return colValues.map((val, idx) => {
909
- const localId = `${row.id}-col${idx + 1}`;
910
- let overflowRule = "wrap";
911
- if (this.colWrap && functions.csvToArray(this.colWrap)[idx]) {
912
- overflowRule = functions.csvToArray(this.colWrap)[idx];
913
- }
914
- return (index.h("td", { id: localId, role: "gridcell", "aria-describedby": `${localId}-description`, "aria-selected": isSelected.toString(), onMouseEnter: (ev) => this.handleCellMouseEnter(ev), onMouseLeave: () => this.dismissTooltip() }, index.h("div", { class: `cell-content-wrapper ${overflowRule}` }, val), index.h("div", { class: "description", id: `${localId}-description` }, row.locked ? "locked" : "")));
915
- });
916
- }
917
- render() {
918
- return (index.h(index.Host, { id: this.uid }, index.h("div", { class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { class: "label-wrapper" }, index.h("label", { class: "label", htmlFor: `input${this.uid}` }, this.label, this.requiredField && (index.h("span", { class: "required", "aria-hidden": "true" }, "*")))), index.h("div", { class: `field-wrapper ${this.focusedElement ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, index.h("div", { class: "upper-row" }, index.h("div", { class: "tags-and-input-wrapper" }, this.tagsList.length > 0 && (index.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) => {
919
- this.clearTagFocus();
920
- this.handleBlur(ev, this.el);
921
- }, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags())), index.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) => {
922
- this.handleBlur(ev, this.el);
923
- }, onFocus: () => this.handleInputFocus(), onKeyDown: (ev) => this.handleInputKeyDown(ev) })), this.tagInputType === "dropdown" && (index.h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.tagInputType === "dropdown" && this.renderDropdown()), this.info && (index.h("div", { id: "info", class: "info-text" }, this.info)), this.errorMessage && index.h("div", { id: "error" }, this.errorMessage), index.h("div", { class: "sr-only", "aria-live": "assertive", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.tagInputType === "table" && this.renderTable())));
924
- }
925
- static get delegatesFocus() { return true; }
926
- get el() { return index.getElement(this); }
927
- static get watchers() { return {
928
- "tagsList": ["reflectSelectedTags"],
929
- "errorMessage": ["handleErrorMessageChange"]
930
- }; }
931
- };
11
+ const TagInput = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.wmTagInputChanged = index.createEvent(this, "wmTagInputChanged", 7);
15
+ this.uid = this.el.id ? this.el.id : functions.generateId();
16
+ this.openUp = false;
17
+ this.tooltipVisible = false;
18
+ this.debouncedUpdate = functions.debounce(() => index.forceUpdate(this.el), 30);
19
+ this.label = undefined;
20
+ this.labelPosition = "top";
21
+ this.options = "";
22
+ this.selectedTags = "";
23
+ this.info = undefined;
24
+ this.errorMessage = undefined;
25
+ this.addNew = true;
26
+ this.placeholder = undefined;
27
+ this.requiredField = false;
28
+ this.characterLimit = 50;
29
+ this.maxTags = undefined;
30
+ this.tagInputType = "dropdown";
31
+ this.colHeaders = undefined;
32
+ this.colWidths = undefined;
33
+ this.colWrap = undefined;
34
+ this.messageConfig = "";
35
+ this.focusedListItem = undefined;
36
+ this.focusedTag = null;
37
+ this.tablePosition = { row: 0, column: 1 };
38
+ this.isExpanded = false;
39
+ this.tagsList = functions.csvToArray(this.selectedTags);
40
+ this.optionsList = functions.csvToArray(this.options);
41
+ this.charCount = 0;
42
+ this.liveRegionMessage = "";
43
+ }
44
+ get focusedElement() {
45
+ return this.el.shadowRoot.activeElement;
46
+ }
47
+ get listItemEls() {
48
+ return Array.from(this.dropdownEl.querySelectorAll("li"));
49
+ }
50
+ get tagEls() {
51
+ return this.tagAreaEl ? Array.from(this.tagAreaEl.querySelectorAll(".tag")) : [];
52
+ }
53
+ get nonLockedTagEls() {
54
+ return this.tagEls.filter((tag) => !tag.classList.contains("locked"));
55
+ }
56
+ get optionEls() {
57
+ return Array.from(this.dropdownEl.querySelectorAll(".option"));
58
+ }
59
+ get wmRowEls() {
60
+ return Array.from(this.el.querySelectorAll("wm-tag-input-row"));
61
+ }
62
+ get localRowEls() {
63
+ return Array.from(this.el.shadowRoot.querySelectorAll("tr"));
64
+ }
65
+ get filteredRows() {
66
+ return this.wmRowEls.filter((row) => {
67
+ const colValues = [row.col1, row.col2, row.col3, row.col4].join("").toLowerCase();
68
+ return this.inputEl && this.inputEl.value ? colValues.includes(this.inputEl.value.toLowerCase()) : true;
69
+ });
70
+ }
71
+ get nonLockedTagsList() {
72
+ let list = [];
73
+ if (this.tagInputType === "table") {
74
+ this.tagsList.forEach((id) => {
75
+ const correspondingRowEl = this.wmRowEls.filter((row) => id === row.id)[0];
76
+ if (!correspondingRowEl.locked) {
77
+ list.push(id);
78
+ }
79
+ });
80
+ }
81
+ else if (this.tagInputType === "dropdown") {
82
+ list = this.tagsList;
83
+ }
84
+ return list;
85
+ }
86
+ get tagLimitReached() {
87
+ return !!(this.maxTags && this.tagsList.length >= this.maxTags);
88
+ }
89
+ get noResultsMessage() {
90
+ return functions.intl.formatMessage({
91
+ id: "tagInput.noResults",
92
+ defaultMessage: "No results match your search.",
93
+ description: "Message displayed when a user's search returns empty.",
94
+ });
95
+ }
96
+ get componentMessages() {
97
+ const addNewHelpText = functions.intl.formatMessage({
98
+ id: "tagInput.addNewHelpText",
99
+ defaultMessage: "Press the Enter or Comma key to add a new tag.",
100
+ description: "Help text appearing in a dropdown. Use imperative",
101
+ });
102
+ const selectionHelpText = functions.intl.formatMessage({
103
+ id: "tagInput.selectionHelpText",
104
+ defaultMessage: "Search and select a tag.",
105
+ description: "Help text appearing in a dropdown. Use imperative",
106
+ });
107
+ const maxTagsReachedMessage = functions.intl.formatMessage({
108
+ id: "tagInput.maxTagsReached",
109
+ defaultMessage: "No more tags can be added because the limit has been reached.",
110
+ });
111
+ const tagAreaInstructions = functions.intl.formatMessage({
112
+ id: "tagInput.tagAreaInstructions",
113
+ defaultMessage: "tag selection. Press Backspace or Delete to remove a tag.",
114
+ });
115
+ const tagsAddedMessage = functions.intl.formatMessage({
116
+ id: "tagInput.tagsAdded",
117
+ defaultMessage: "Tags added",
118
+ description: "For the user to understand how close they are to the tag limit, followed by x/y count",
119
+ });
120
+ const defaultConfig = {
121
+ addNewHelpText: addNewHelpText,
122
+ selectionHelpText: selectionHelpText,
123
+ maxTagsReached: maxTagsReachedMessage,
124
+ tagAreaInstructions: tagAreaInstructions,
125
+ tagsAdded: tagsAddedMessage,
126
+ };
127
+ const userProvidedConfig = functions.safeParseJSON(this.messageConfig);
128
+ return userProvidedConfig ? Object.assign(Object.assign({}, defaultConfig), userProvidedConfig) : defaultConfig;
129
+ }
130
+ get inputMinimumWidth() {
131
+ // 150px is the minimum width of the input field, or the length of the placeholder text
132
+ const inputElStyles = getComputedStyle(this.inputEl);
133
+ const tagElStyles = getComputedStyle(this.tagEls[this.tagEls.length - 1]);
134
+ const inputElBuffer = [
135
+ inputElStyles.paddingLeft,
136
+ inputElStyles.paddingRight,
137
+ inputElStyles.marginLeft,
138
+ inputElStyles.marginRight,
139
+ tagElStyles.marginRight,
140
+ ].reduce((prev, curr) => prev + parseInt(curr.replace("px", "")), 0);
141
+ const minimumWidth = Math.max(150, functions.measureText(this.inputEl, this.placeholder).width + inputElBuffer);
142
+ return minimumWidth;
143
+ }
144
+ generateTagAddedMessage(tag) {
145
+ return functions.intl.formatMessage({
146
+ id: "tagInput.tagAdded",
147
+ defaultMessage: "{tagName} added.",
148
+ description: "A confirmation for adding a tag.",
149
+ }, { tagName: tag });
150
+ }
151
+ generateTagAlreadyAddedMessage(tag) {
152
+ return functions.intl.formatMessage({
153
+ id: "tagInput.tagAlreadyAdded",
154
+ defaultMessage: "{tagName} has already been added.",
155
+ description: "An alert for adding a tag that is already present.",
156
+ }, { tagName: tag });
157
+ }
158
+ componentWillLoad() {
159
+ if (!this.placeholder) {
160
+ this.placeholder = this.createPlaceholderDefault(this.addNew, !!this.options);
161
+ }
162
+ if (!this.label) {
163
+ console.error("wm-tag-input must have a label property");
164
+ }
165
+ this.consolidateSelectedTags();
166
+ this.el.focus = () => {
167
+ const firstFocusableTag = this.nonLockedTagEls[0];
168
+ if (firstFocusableTag) {
169
+ this.tagAreaEl.focus();
170
+ this.focusTag(firstFocusableTag);
171
+ }
172
+ else {
173
+ this.inputEl.focus();
174
+ }
175
+ };
176
+ // on resize of component, trigger componentDidRender -> positionInput
177
+ const resizeObserver = new ResizeObserver(() => this.debouncedUpdate());
178
+ resizeObserver.observe(this.el);
179
+ }
180
+ componentDidLoad() {
181
+ // prevent highlighting of pre-selected tags
182
+ this.tagEls.forEach((el) => el.classList.remove("highlight"));
183
+ }
184
+ componentDidRender() {
185
+ this.positionInput();
186
+ }
187
+ consolidateSelectedTags() {
188
+ this.tagsList.forEach((tag) => {
189
+ if (!this.includesCaseInsensitive(this.optionsList, tag)) {
190
+ this.options += `${this.options.length > 0 ? "," : ""}${tag}`;
191
+ }
192
+ });
193
+ this.optionsList = functions.csvToArray(this.options);
194
+ }
195
+ createPlaceholderDefault(addNew, hasOptions) {
196
+ const addAndSearchPlaceholder = functions.intl.formatMessage({
197
+ id: "tagInput.placeholderAddAndSearch",
198
+ defaultMessage: "Add or search for a tag",
199
+ description: "Placeholder text. Use imperative",
200
+ });
201
+ const searchPlaceholder = functions.intl.formatMessage({
202
+ id: "tagInput.placeholderSearch",
203
+ defaultMessage: "Search and select a tag",
204
+ description: "Placeholder text. Use imperative",
205
+ });
206
+ const addPlaceholder = functions.intl.formatMessage({
207
+ id: "tagInput.placeholderAdd",
208
+ defaultMessage: "Add a new tag",
209
+ description: "Placeholder text. Use imperative",
210
+ });
211
+ let placeholder = "";
212
+ if (addNew && hasOptions) {
213
+ placeholder = addAndSearchPlaceholder;
214
+ }
215
+ else if (!addNew && hasOptions) {
216
+ placeholder = searchPlaceholder;
217
+ }
218
+ else if (addNew) {
219
+ placeholder = addPlaceholder;
220
+ }
221
+ return placeholder;
222
+ }
223
+ reflectSelectedTags(newValue, oldValue) {
224
+ const isAddition = newValue.length > oldValue.length;
225
+ let changedTag = "";
226
+ let selectedTags = this.tagsList;
227
+ if (isAddition) {
228
+ changedTag = newValue.filter((val) => !oldValue.includes(val))[0];
229
+ }
230
+ else {
231
+ changedTag = oldValue.filter((val) => !newValue.includes(val))[0];
232
+ }
233
+ // event emitted by type table uses element references instead of strings
234
+ if (this.tagInputType === "table") {
235
+ changedTag = this.wmRowEls.filter((row) => row.id === changedTag)[0];
236
+ selectedTags = this.tagsList.map((id) => this.el.querySelector(`#${id}`));
237
+ }
238
+ this.selectedTags = this.listToCSV(this.tagsList);
239
+ let detail = { value: selectedTags, tagChanged: changedTag };
240
+ this.wmTagInputChanged.emit(detail);
241
+ }
242
+ handleErrorMessageChange() {
243
+ if (this.errorMessage) {
244
+ this.announce(this.errorMessage);
245
+ }
246
+ }
247
+ handleRowUpdate() {
248
+ index.forceUpdate(this.el);
249
+ }
250
+ closeIfNotElOrChild(ev) {
251
+ const isntElOrChild = ev.target !== this.el && !this.el.shadowRoot.contains(ev.target);
252
+ if (this.tagInputType === "dropdown" && isntElOrChild && this.isExpanded) {
253
+ this.closeDropdown();
254
+ }
255
+ }
256
+ // From wm-button
257
+ // we need to listen for scroll events during the capture phase because they do not bubble up
258
+ // there can be layouts where the main content has 100vh and overflows
259
+ // in these cases window will register no scroll events unless we catch on they way down
260
+ dismissTooltip() {
261
+ if (this.tooltipVisible) {
262
+ functions.hideTooltip();
263
+ this.tooltipVisible = false;
264
+ }
265
+ }
266
+ handleInputKeyDown(ev) {
267
+ if (/^.$/.test(ev.key) && this.inputEl.value.length >= this.characterLimit) {
268
+ this.announce(this.generateCharacterLimitWarning(this.inputEl.value.length, this.characterLimit));
269
+ }
270
+ // prevent keydown triggering on tag area
271
+ ev.stopPropagation();
272
+ switch (ev.key) {
273
+ case "Enter":
274
+ case ",":
275
+ ev.preventDefault();
276
+ this.handleInputEnter();
277
+ break;
278
+ case "ArrowDown":
279
+ ev.preventDefault();
280
+ this.handleInputArrowDown();
281
+ break;
282
+ case "ArrowUp":
283
+ ev.preventDefault();
284
+ this.handleInputArrowUp();
285
+ break;
286
+ case "ArrowLeft":
287
+ ev.preventDefault();
288
+ if (this.tagInputType === "table" && this.tablePosition.row) {
289
+ this.moveLeftCell();
290
+ }
291
+ break;
292
+ case "ArrowRight":
293
+ ev.preventDefault();
294
+ if (this.tagInputType === "table" && this.tablePosition.row) {
295
+ this.moveRightCell();
296
+ }
297
+ break;
298
+ case "Escape":
299
+ if (this.tagInputType === "dropdown" && this.isExpanded) {
300
+ this.closeDropdown();
301
+ }
302
+ break;
303
+ case "ArrowLeft":
304
+ case "Backspace":
305
+ this.handleInputBackspace();
306
+ break;
307
+ }
308
+ }
309
+ handleInputFocus() {
310
+ if (this.tagInputType === "dropdown") {
311
+ this.openDropdown();
312
+ this.clearListItemFocus();
313
+ }
314
+ // force update needed to apply styled state of field-wrapper el
315
+ index.forceUpdate(this.el);
316
+ }
317
+ handleInputChanged(value) {
318
+ this.charCount = value.length;
319
+ if (this.tagInputType === "dropdown") {
320
+ this.clearListItemFocus();
321
+ if (this.charCount >= this.characterLimit - 5) {
322
+ this.announce(this.generateCharacterLimitWarning(this.charCount, this.characterLimit));
323
+ }
324
+ if (!this.isExpanded) {
325
+ this.openDropdown();
326
+ }
327
+ }
328
+ else if (this.tagInputType === "table") {
329
+ this.clearCellFocus();
330
+ }
331
+ this.announceExistingOptions();
332
+ }
333
+ handleInputEnter() {
334
+ if (this.tagInputType === "dropdown") {
335
+ if (this.focusedListItem) {
336
+ this.handleListItemClick(this.focusedListItem);
337
+ }
338
+ else {
339
+ this.submitInput(this.addNew, this.inputEl.value.trim());
340
+ }
341
+ }
342
+ else if (this.tagInputType === "table" && this.tablePosition.row > 0) {
343
+ this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id);
344
+ }
345
+ }
346
+ submitInput(canAddNew, value) {
347
+ const hasNonWhiteSpaceCharacters = value.match(/\S/);
348
+ if (canAddNew && hasNonWhiteSpaceCharacters) {
349
+ this.addTag(value);
350
+ this.optionsList = this.addOption(value);
351
+ this.resetInput();
352
+ }
353
+ }
354
+ handleInputArrowDown() {
355
+ if (this.tagInputType === "table") {
356
+ this.moveDownRow();
357
+ }
358
+ else if (this.tagInputType === "dropdown" && this.isExpanded) {
359
+ this.moveDownListItem();
360
+ }
361
+ else if (this.tagInputType === "dropdown") {
362
+ this.openDropdown();
363
+ }
364
+ }
365
+ handleInputArrowUp() {
366
+ if (this.tagInputType === "table") {
367
+ this.moveUpRow();
368
+ }
369
+ else if (this.tagInputType === "dropdown" && this.isExpanded) {
370
+ this.moveUpListItem();
371
+ }
372
+ else if (this.tagInputType === "dropdown") {
373
+ this.openDropdown();
374
+ }
375
+ }
376
+ handleInputBackspace() {
377
+ if (this.inputEl.value === "" && this.tagsList.length > 0) {
378
+ // wait for events to finish firing before redirecting focus
379
+ // prevents double input in input area and tag area
380
+ window.requestAnimationFrame(() => {
381
+ if (this.nonLockedTagsList.length > 0) {
382
+ this.tagAreaEl.focus();
383
+ this.focusTag(this.tagEls[this.tagEls.length - 1]);
384
+ }
385
+ });
386
+ }
387
+ }
388
+ handleListItemKeyDown(ev) {
389
+ const typedEvTarget = ev.target;
390
+ switch (ev.key) {
391
+ case "Enter":
392
+ case " ":
393
+ ev.preventDefault();
394
+ typedEvTarget.click();
395
+ break;
396
+ case "ArrowDown":
397
+ ev.preventDefault();
398
+ this.moveDownListItem();
399
+ break;
400
+ case "ArrowUp":
401
+ ev.preventDefault();
402
+ this.moveUpListItem();
403
+ break;
404
+ case "Escape":
405
+ if (this.focusedElement !== this.inputEl) {
406
+ this.inputEl.focus();
407
+ }
408
+ else if (this.tagInputType === "dropdown") {
409
+ this.closeDropdown();
410
+ }
411
+ break;
412
+ }
413
+ }
414
+ handleListItemClick(item) {
415
+ const tag = item.dataset.option.trim() || "";
416
+ if (this.includesCaseInsensitive(this.tagsList, tag)) {
417
+ this.announce(this.generateTagAlreadyAddedMessage(tag));
418
+ }
419
+ else {
420
+ this.resetInput();
421
+ this.addTag(tag);
422
+ this.optionsList = this.addOption(tag);
423
+ this.focusedListItem = null;
424
+ }
425
+ }
426
+ handleTableRowClick(rowId) {
427
+ const referencedRow = this.el.querySelector(`#${rowId}`);
428
+ const isLocked = referencedRow.locked;
429
+ if (!isLocked) {
430
+ if (this.includesCaseInsensitive(this.tagsList, rowId)) {
431
+ this.removeTag(rowId);
432
+ }
433
+ else if (!this.tagLimitReached) {
434
+ this.addTag(rowId);
435
+ this.resetInput();
436
+ }
437
+ }
438
+ }
439
+ handleTagAreaKeyDown(ev) {
440
+ switch (ev.key) {
441
+ case "ArrowLeft":
442
+ case "ArrowUp":
443
+ ev.preventDefault();
444
+ this.moveLeftTag();
445
+ break;
446
+ case "ArrowRight":
447
+ case "ArrowDown":
448
+ ev.preventDefault();
449
+ this.moveRightTag();
450
+ break;
451
+ case "Backspace":
452
+ case "Delete":
453
+ this.handleTagAreaDelete();
454
+ break;
455
+ }
456
+ }
457
+ handleTagAreaDelete() {
458
+ const isLocked = this.focusedTag && this.focusedTag.classList.contains("locked");
459
+ if (this.focusedTag && this.focusedTag.dataset.tag && !isLocked) {
460
+ this.removeTag(this.focusedTag.dataset.tag);
461
+ if (this.nonLockedTagsList.length === 0) {
462
+ // focus input if no tags are left
463
+ this.inputEl.focus();
464
+ }
465
+ else if (this.focusedTag === this.tagEls[this.tagEls.length - 1]) {
466
+ // reassign focus if removing the last tag but there are still tags remaining
467
+ this.focusedTag = this.tagEls[this.tagEls.length - 2];
468
+ this.focusTag(this.focusedTag);
469
+ }
470
+ }
471
+ }
472
+ handleBlur(ev, component) {
473
+ const isntElOrChild = ev.relatedTarget !== component && !this.el.shadowRoot.contains(ev.relatedTarget);
474
+ this.dismissTooltip();
475
+ this.clearCellFocus();
476
+ if (isntElOrChild) {
477
+ this.fieldWrapperEl.classList.remove("focused");
478
+ if (this.tagInputType === "dropdown") {
479
+ this.closeDropdown();
480
+ }
481
+ }
482
+ }
483
+ handleCellMouseEnter(ev) {
484
+ const cell = ev.target;
485
+ const contentWrapper = cell.querySelector(".cell-content-wrapper");
486
+ const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
487
+ if (isTruncated) {
488
+ // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
489
+ functions.showTooltip("bottom", cell, cell.innerText);
490
+ this.tooltipVisible = true;
491
+ }
492
+ }
493
+ handleTagAreaFocus() {
494
+ if (this.tagInputType === "dropdown") {
495
+ this.closeDropdown();
496
+ }
497
+ const firstFocusableTag = this.nonLockedTagEls[0];
498
+ firstFocusableTag && this.focusTag(firstFocusableTag);
499
+ }
500
+ handleRemoveButtonClick(tag) {
501
+ this.moveLeftTag();
502
+ this.removeTag(tag);
503
+ }
504
+ moveDownListItem() {
505
+ if (this.listItemEls.length > 0) {
506
+ const firstListItem = this.listItemEls[0];
507
+ if (!this.focusedListItem) {
508
+ this.focusListItem(firstListItem);
509
+ }
510
+ else if (this.focusedListItem.nextElementSibling) {
511
+ this.focusListItem(this.focusedListItem.nextElementSibling);
512
+ }
513
+ else {
514
+ this.focusListItem(firstListItem);
515
+ }
516
+ }
517
+ }
518
+ moveUpListItem() {
519
+ if (this.listItemEls.length > 0) {
520
+ const lastListItem = this.listItemEls[this.listItemEls.length - 1];
521
+ if (!this.focusedListItem) {
522
+ this.focusListItem(lastListItem);
523
+ }
524
+ else if (this.focusedListItem.previousElementSibling) {
525
+ this.focusListItem(this.focusedListItem.previousElementSibling);
526
+ }
527
+ else {
528
+ this.clearListItemFocus();
529
+ }
530
+ }
531
+ }
532
+ moveDownRow() {
533
+ if (this.filteredRows.length > 0) {
534
+ if (this.tablePosition.row === 0) {
535
+ this.tablePosition.row = 1;
536
+ }
537
+ else if (this.tablePosition.row === this.filteredRows.length) {
538
+ this.tablePosition.row = 1;
539
+ }
540
+ else {
541
+ this.tablePosition.row++;
542
+ }
543
+ // skip locked rows
544
+ const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
545
+ if (rowToFocus.locked) {
546
+ this.moveDownRow();
547
+ }
548
+ else {
549
+ this.focusCell(this.tablePosition);
550
+ }
551
+ }
552
+ }
553
+ moveUpRow() {
554
+ if (this.filteredRows.length > 0) {
555
+ if (this.tablePosition.row === 0) {
556
+ this.tablePosition.row = this.filteredRows.length;
557
+ }
558
+ else if (this.tablePosition.row === 1) {
559
+ this.tablePosition.row = 0;
560
+ }
561
+ else {
562
+ this.tablePosition.row--;
563
+ }
564
+ // skip locked rows
565
+ const rowToFocus = this.wmRowEls[this.tablePosition.row - 1];
566
+ if (rowToFocus && rowToFocus.locked) {
567
+ this.moveUpRow();
568
+ }
569
+ else if (rowToFocus) {
570
+ this.focusCell(this.tablePosition);
571
+ }
572
+ else {
573
+ this.clearCellFocus();
574
+ }
575
+ }
576
+ }
577
+ moveLeftCell() {
578
+ if (this.tablePosition.column != 1) {
579
+ this.tablePosition.column--;
580
+ this.focusCell(this.tablePosition);
581
+ }
582
+ }
583
+ moveRightCell() {
584
+ const numCols = functions.csvToArray(this.colHeaders).length;
585
+ if (this.tablePosition.column < numCols) {
586
+ this.tablePosition.column++;
587
+ this.focusCell(this.tablePosition);
588
+ }
589
+ }
590
+ moveLeftTag() {
591
+ const lastTag = this.tagEls[this.tagEls.length - 1];
592
+ if (this.focusedTag && this.tagEls.includes(this.focusedTag.previousElementSibling)) {
593
+ this.focusedTag = this.focusedTag.previousElementSibling;
594
+ }
595
+ else {
596
+ this.focusedTag = lastTag;
597
+ }
598
+ // skip locked tags
599
+ if (this.focusedTag.classList.contains("locked") && this.nonLockedTagEls.length > 0) {
600
+ this.moveLeftTag();
601
+ }
602
+ else {
603
+ this.focusTag(this.focusedTag);
604
+ }
605
+ }
606
+ moveRightTag() {
607
+ const firstTag = this.tagEls[0];
608
+ if (this.focusedTag && this.tagEls.includes(this.focusedTag.nextElementSibling)) {
609
+ this.focusedTag = this.focusedTag.nextElementSibling;
610
+ }
611
+ else {
612
+ this.focusedTag = firstTag;
613
+ }
614
+ // skip locked tags
615
+ if (this.focusedTag.classList.contains("locked")) {
616
+ this.moveRightTag();
617
+ }
618
+ else {
619
+ this.focusTag(this.focusedTag);
620
+ }
621
+ }
622
+ addOption(option) {
623
+ let newOptionsList = this.optionsList;
624
+ const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, option);
625
+ if (!optionAlreadyExists) {
626
+ newOptionsList = newOptionsList.concat(option);
627
+ }
628
+ return newOptionsList;
629
+ }
630
+ removeOption(option) {
631
+ this.optionsList = this.filterCaseInsensitive(this.optionsList, option);
632
+ }
633
+ addTag(tag) {
634
+ let newTagsList = this.tagsList;
635
+ const tagAlreadyAdded = this.includesCaseInsensitive(this.tagsList, tag);
636
+ const tagExistsAsOption = this.optionsList.filter((x) => x.toLowerCase() === tag.toLowerCase())[0];
637
+ if (!tagAlreadyAdded) {
638
+ let textToAnnounce = tag;
639
+ if (this.tagInputType === "table") {
640
+ const referencedRow = this.el.querySelector(`#${tag}`);
641
+ textToAnnounce = referencedRow.col1;
642
+ }
643
+ this.announce(this.generateTagAddedMessage(textToAnnounce));
644
+ this.tagsList = newTagsList.concat(tagExistsAsOption || tag);
645
+ // if maxTags has been reached, focus should go to the tagArea
646
+ if (this.tagLimitReached) {
647
+ this.tagAreaEl.focus();
648
+ }
649
+ }
650
+ }
651
+ removeTag(tag) {
652
+ let textToAnnounce = tag;
653
+ if (this.tagInputType === "table") {
654
+ const referencedRow = this.el.querySelector(`#${tag}`);
655
+ textToAnnounce = referencedRow.col1;
656
+ }
657
+ const tagRemovedMessage = functions.intl.formatMessage({ id: "tagInput.tagRemoved", defaultMessage: "{tag} removed" }, { tag: textToAnnounce });
658
+ this.announce(tagRemovedMessage);
659
+ this.tagsList = this.filterCaseInsensitive(this.tagsList, tag);
660
+ if (this.tagInputType === "dropdown") {
661
+ // if a tag was introduced by the user, also remove it from the dropdown options
662
+ const devOptionsList = functions.csvToArray(this.options);
663
+ if (this.includesCaseInsensitive(this.optionsList, tag) && !this.includesCaseInsensitive(devOptionsList, tag)) {
664
+ this.removeOption(tag);
665
+ }
666
+ }
667
+ }
668
+ focusListItem(item) {
669
+ this.focusedListItem = item;
670
+ this.inputEl.setAttribute("aria-activedescendant", this.focusedListItem.id);
671
+ item.scrollIntoView({ block: "nearest" });
672
+ }
673
+ focusTag(element) {
674
+ if (element.classList.contains("locked")) {
675
+ this.focusedTag = null;
676
+ this.tagAreaEl.setAttribute("aria-activedescendant", "");
677
+ }
678
+ else {
679
+ this.focusedTag = element;
680
+ this.tagAreaEl.setAttribute("aria-activedescendant", this.focusedTag.id);
681
+ }
682
+ }
683
+ focusCell(position) {
684
+ this.clearCellFocus(false);
685
+ if (position.row) {
686
+ const rowToFocus = this.localRowEls[position.row];
687
+ const rowCells = rowToFocus.querySelectorAll("td");
688
+ const cellToFocus = rowCells[position.column - 1];
689
+ const contentWrapper = cellToFocus.querySelector(".cell-content-wrapper");
690
+ const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
691
+ rowToFocus.classList.add("focused");
692
+ cellToFocus.classList.add("focused");
693
+ cellToFocus.scrollIntoView({ block: "nearest" });
694
+ this.inputEl.setAttribute("aria-activedescendant", cellToFocus.id);
695
+ this.dismissTooltip();
696
+ if (isTruncated) {
697
+ // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
698
+ functions.showTooltip("bottom", cellToFocus, cellToFocus.innerText);
699
+ this.tooltipVisible = true;
700
+ }
701
+ }
702
+ }
703
+ clearTagFocus() {
704
+ this.tagAreaEl.setAttribute("aria-activedescendant", "");
705
+ this.focusedTag = null;
706
+ }
707
+ clearCellFocus(resetPosition = true) {
708
+ this.inputEl.setAttribute("aria-activedescendant", "");
709
+ if (resetPosition) {
710
+ this.tablePosition = { row: 0, column: 1 };
711
+ }
712
+ this.localRowEls.forEach((row) => {
713
+ row.classList.remove("focused");
714
+ row.querySelectorAll("td").forEach((cell) => {
715
+ cell.classList.remove("focused");
716
+ });
717
+ });
718
+ }
719
+ openDropdown() {
720
+ // given an offset of -2px because the dropdown is transformed downwards to avoid overlapping the focus border
721
+ this.openUp = functions.shouldOpenUp(this.el, this.dropdownEl, this.el.clientHeight, -2);
722
+ this.isExpanded = true;
723
+ }
724
+ closeDropdown() {
725
+ this.clearListItemFocus();
726
+ this.isExpanded = false;
727
+ }
728
+ clearListItemFocus() {
729
+ this.focusedListItem = null;
730
+ this.inputEl.setAttribute("aria-activedescendant", "");
731
+ this.listItemEls.forEach((el) => {
732
+ el.classList.remove("focused");
733
+ });
734
+ }
735
+ resetInput() {
736
+ this.charCount = 0;
737
+ this.inputEl.value = "";
738
+ }
739
+ announce(message) {
740
+ // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
741
+ if (this.liveRegionEl.textContent === message) {
742
+ message += "\u00A0";
743
+ }
744
+ this.liveRegionMessage = message;
745
+ }
746
+ announceExistingOptions() {
747
+ // request animation frame to wait for re-rendering of filtered options
748
+ window.requestAnimationFrame(() => {
749
+ let numResults = 0;
750
+ if (this.tagInputType === "dropdown") {
751
+ numResults = this.optionEls.length;
752
+ }
753
+ else if (this.tagInputType === "table") {
754
+ numResults = this.filteredRows.length;
755
+ }
756
+ const existingOptionsMessage = functions.intl.formatMessage({
757
+ id: "tagInput.existingOptions",
758
+ defaultMessage: "{num, plural, one {1 existing option.} other {# existing options.}}",
759
+ }, { num: numResults });
760
+ this.announce(existingOptionsMessage);
761
+ });
762
+ }
763
+ generateCharacterLimitWarning(charCount, charLimit) {
764
+ let message = intl.globalMessages.getCharactersEntered(charCount, charLimit);
765
+ if (charCount >= charLimit) {
766
+ message += ` ${intl.globalMessages.characterLimitReached}`;
767
+ }
768
+ return message;
769
+ }
770
+ positionInput() {
771
+ const lastTag = this.tagEls[this.tagEls.length - 1];
772
+ // default placement to fall back to when no tags are present, or not enough space is available
773
+ this.inputEl.style.position = "static";
774
+ this.inputEl.style.width = "100%";
775
+ if (lastTag) {
776
+ const spaceAvailable = this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right;
777
+ if (spaceAvailable >= this.inputMinimumWidth) {
778
+ // because the input has right: 0px
779
+ // all thats needed to properly place it is setting position: absolute, top, and width
780
+ this.inputEl.style.position = "absolute";
781
+ this.inputEl.style.top = lastTag.offsetTop.toString() + "px";
782
+ this.inputEl.style.width =
783
+ (this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right - 8).toString() + "px";
784
+ }
785
+ }
786
+ }
787
+ /// Helpers
788
+ listToCSV(list) {
789
+ return list.join(",");
790
+ }
791
+ includesCaseInsensitive(list, element) {
792
+ const lowercaseList = list.map((str) => str.toLowerCase());
793
+ return lowercaseList.includes(element.toLowerCase());
794
+ }
795
+ filterCaseInsensitive(list, element) {
796
+ return list.filter((x) => x.toLowerCase() !== element.toLowerCase());
797
+ }
798
+ sortCaseInsensitive(list) {
799
+ // The vanilla .sort method places words that start with capital letters above others (ASCII order)
800
+ // so we need to pass in our own compare function to sort case-insensitive
801
+ return list.sort((a, b) => {
802
+ a = a.toLowerCase();
803
+ b = b.toLowerCase();
804
+ return a > b ? 1 : a < b ? -1 : 0;
805
+ });
806
+ }
807
+ /// Renders
808
+ renderTags() {
809
+ let lockedTags = [];
810
+ let unlockedTags = [];
811
+ this.tagsList.forEach((tag, idx) => {
812
+ const id = `tag${idx + 1}`;
813
+ let tagText = "";
814
+ let isLocked = false;
815
+ if (this.tagInputType === "dropdown") {
816
+ tagText = tag;
817
+ }
818
+ else if (this.tagInputType === "table") {
819
+ // display table tags using col1 of the row with the same id
820
+ // if one can't be found, display as empty
821
+ const referencedRow = this.el.querySelector(`#${tag}`);
822
+ tagText = referencedRow ? referencedRow.col1 : "";
823
+ isLocked = referencedRow ? referencedRow.locked : false;
824
+ }
825
+ // make sure locked tags always appear in front of list
826
+ const targetList = isLocked ? lockedTags : unlockedTags;
827
+ targetList.push(index.h("li", { id: id, class: `tag highlight ${this.focusedTag && this.focusedTag.id === id ? "focused" : ""} ${isLocked ? "locked" : ""}`, "data-tag": tag, role: "option" }, tagText, isLocked ? (index.h("div", { class: "icon lock" })) : (index.h("button", { class: "icon remove-btn", tabIndex: -1, onClick: () => this.handleRemoveButtonClick(tag) }))));
828
+ });
829
+ return [...lockedTags, ...unlockedTags];
830
+ }
831
+ renderDropdown() {
832
+ return (index.h("div", { class: `dropdown-wrapper ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, index.h("div", { id: "help-text", class: "help-text" }, this.renderHelpText()), index.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))));
833
+ }
834
+ renderListItems(optionsList) {
835
+ optionsList = this.sortCaseInsensitive(optionsList);
836
+ // filter by input
837
+ if (this.inputEl && this.inputEl.value) {
838
+ optionsList = this.optionsList.filter((option) => option.toLowerCase().includes(this.inputEl.value.toLowerCase()));
839
+ }
840
+ return optionsList.map((option, idx) => {
841
+ const id = `option${idx + 1}`;
842
+ const isFocused = this.focusedListItem && this.focusedListItem.id === id;
843
+ const isSelected = this.includesCaseInsensitive(this.tagsList, option);
844
+ return (index.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));
845
+ });
846
+ }
847
+ renderAddNewButton() {
848
+ const hasNonWhiteSpaceCharacters = this.inputEl.value.match(/\S/);
849
+ const optionAlreadyExists = this.includesCaseInsensitive(this.optionsList, this.inputEl.value.trim());
850
+ if (this.addNew && hasNonWhiteSpaceCharacters && !optionAlreadyExists) {
851
+ const id = `add-new-btn`;
852
+ const isFocused = this.focusedListItem && this.focusedListItem.id === id;
853
+ return (index.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()}"`));
854
+ }
855
+ else
856
+ return "";
857
+ }
858
+ renderHelpText() {
859
+ let helpText = "";
860
+ if (this.optionsList.length > 0) {
861
+ helpText += this.componentMessages.selectionHelpText;
862
+ }
863
+ if (this.addNew) {
864
+ helpText += " " + this.componentMessages.addNewHelpText;
865
+ }
866
+ return helpText;
867
+ }
868
+ renderTagCounter() {
869
+ if (this.maxTags) {
870
+ return (index.h("div", { class: "lower-row" }, index.h("div", { id: "max-tags" }, `${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`, this.tagLimitReached && ` - ${this.componentMessages.maxTagsReached}`)));
871
+ }
872
+ }
873
+ renderTable() {
874
+ return (index.h("div", { class: "table-wrapper", onScroll: () => this.dismissTooltip() }, index.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() : index.h("div", { class: "no-results" }, this.noResultsMessage))));
875
+ }
876
+ renderTableHeaders() {
877
+ return (index.h("tr", { class: "headers", role: "row" }, functions.csvToArray(this.colHeaders).map((header, idx) => {
878
+ let overflowRule = "wrap";
879
+ if (this.colWrap && functions.csvToArray(this.colWrap)[idx]) {
880
+ overflowRule = functions.csvToArray(this.colWrap)[idx];
881
+ }
882
+ return (index.h("th", { class: `header-cell ${overflowRule}`, role: "columnheader",
883
+ // @ts-ignore
884
+ width: this.colWidths ? functions.csvToArray(this.colWidths)[idx] : "" }, header));
885
+ })));
886
+ }
887
+ renderTableRows() {
888
+ return this.filteredRows.map((row) => {
889
+ const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
890
+ return (index.h("tr", { id: row.id, class: `${row.locked ? "locked" : ""} ${isSelected ? "selected" : ""}`, role: "row", onClick: () => this.handleTableRowClick(row.id) }, this.renderTableCells(row)));
891
+ });
892
+ }
893
+ renderTableCells(row) {
894
+ const colValues = [row.col1, row.col2, row.col3, row.col4].filter((val) => !!val);
895
+ const isSelected = this.includesCaseInsensitive(this.tagsList, row.id);
896
+ return colValues.map((val, idx) => {
897
+ const localId = `${row.id}-col${idx + 1}`;
898
+ let overflowRule = "wrap";
899
+ if (this.colWrap && functions.csvToArray(this.colWrap)[idx]) {
900
+ overflowRule = functions.csvToArray(this.colWrap)[idx];
901
+ }
902
+ return (index.h("td", { id: localId, role: "gridcell", "aria-describedby": `${localId}-description`, "aria-selected": isSelected.toString(), onMouseEnter: (ev) => this.handleCellMouseEnter(ev), onMouseLeave: () => this.dismissTooltip() }, index.h("div", { class: `cell-content-wrapper ${overflowRule}` }, val), index.h("div", { class: "description", id: `${localId}-description` }, row.locked ? "locked" : "")));
903
+ });
904
+ }
905
+ render() {
906
+ return (index.h(index.Host, { id: this.uid }, index.h("div", { class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { class: "label-wrapper" }, index.h("label", { class: "label", htmlFor: `input${this.uid}` }, this.label, this.requiredField && (index.h("span", { class: "required", "aria-hidden": "true" }, "*")))), index.h("div", { class: `field-wrapper ${this.focusedElement ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, index.h("div", { class: "upper-row" }, index.h("div", { class: "tags-and-input-wrapper" }, this.tagsList.length > 0 && (index.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) => {
907
+ this.clearTagFocus();
908
+ this.handleBlur(ev, this.el);
909
+ }, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags())), index.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" ? intl.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) => {
910
+ this.handleBlur(ev, this.el);
911
+ }, onFocus: () => this.handleInputFocus(), onKeyDown: (ev) => this.handleInputKeyDown(ev) })), this.tagInputType === "dropdown" && (index.h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.tagInputType === "dropdown" && this.renderDropdown()), this.info && (index.h("div", { id: "info", class: "info-text" }, this.info)), this.errorMessage && index.h("div", { id: "error" }, this.errorMessage), index.h("div", { class: "sr-only", "aria-live": "assertive", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.tagInputType === "table" && this.renderTable())));
912
+ }
913
+ static get delegatesFocus() { return true; }
914
+ get el() { return index.getElement(this); }
915
+ static get watchers() { return {
916
+ "tagsList": ["reflectSelectedTags"],
917
+ "errorMessage": ["handleErrorMessageChange"]
918
+ }; }
919
+ };
932
920
  TagInput.style = wmTagInputCss;
933
921
 
934
922
  exports.wm_tag_input = TagInput;