@watermarkinsights/ripple 5.13.0-alpha.2 → 5.13.0-alpha.3

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 (450) hide show
  1. package/dist/cjs/app-globals-DztnjEf7.js +92 -0
  2. package/dist/cjs/chartFunctions-CM2Nah_s.js +731 -0
  3. package/dist/cjs/functions-CoXfjC6r.js +10450 -0
  4. package/dist/cjs/index-Cig4P4gJ.js +2082 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/interfaces-C7YbtGnk.js +37 -0
  7. package/dist/cjs/intl-DVt1J717.js +283 -0
  8. package/dist/cjs/loader.cjs.js +13 -0
  9. package/dist/cjs/priv-calendar.cjs.entry.js +568 -0
  10. package/dist/cjs/priv-chart-popover.cjs.entry.js +136 -0
  11. package/dist/cjs/priv-navigator-button_2.cjs.entry.js +54 -0
  12. package/dist/cjs/priv-option-list_2.cjs.entry.js +556 -0
  13. package/dist/cjs/ripple.cjs.js +25 -0
  14. package/dist/cjs/wm-action-menu_4.cjs.entry.js +702 -0
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +20 -0
  16. package/dist/cjs/wm-chart.cjs.entry.js +159 -0
  17. package/dist/cjs/wm-date-range.cjs.entry.js +479 -0
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +249 -0
  19. package/dist/cjs/wm-file-list.cjs.entry.js +20 -0
  20. package/dist/cjs/wm-file.cjs.entry.js +184 -0
  21. package/dist/cjs/wm-input.cjs.entry.js +113 -0
  22. package/dist/cjs/wm-line-chart.cjs.entry.js +451 -0
  23. package/dist/cjs/wm-modal-footer.cjs.entry.js +46 -0
  24. package/dist/cjs/wm-modal-header.cjs.entry.js +38 -0
  25. package/dist/cjs/wm-modal-pss-footer.cjs.entry.js +42 -0
  26. package/dist/cjs/wm-modal-pss-header.cjs.entry.js +41 -0
  27. package/dist/cjs/wm-modal-pss.cjs.entry.js +137 -0
  28. package/dist/cjs/wm-modal.cjs.entry.js +135 -0
  29. package/dist/cjs/wm-navigation-hamburger.cjs.entry.js +50 -0
  30. package/dist/cjs/wm-navigation-item.cjs.entry.js +20 -0
  31. package/dist/cjs/wm-navigation.cjs.entry.js +118 -0
  32. package/dist/cjs/wm-navigator.cjs.entry.js +329 -0
  33. package/dist/cjs/wm-nested-select.cjs.entry.js +310 -0
  34. package/dist/cjs/wm-optgroup.cjs.entry.js +70 -0
  35. package/dist/cjs/wm-pagination.cjs.entry.js +225 -0
  36. package/dist/cjs/wm-progress-indicator.cjs.entry.js +109 -0
  37. package/dist/cjs/wm-progress-monitor.cjs.entry.js +73 -0
  38. package/dist/cjs/wm-progress-slice.cjs.entry.js +15 -0
  39. package/dist/cjs/wm-search.cjs.entry.js +210 -0
  40. package/dist/cjs/wm-select.cjs.entry.js +251 -0
  41. package/dist/cjs/wm-tab-item.cjs.entry.js +65 -0
  42. package/dist/cjs/wm-tab-list.cjs.entry.js +177 -0
  43. package/dist/cjs/wm-tab-panel.cjs.entry.js +34 -0
  44. package/dist/cjs/wm-tag-input.cjs.entry.js +879 -0
  45. package/dist/cjs/wm-tag-option.cjs.entry.js +37 -0
  46. package/dist/cjs/wm-textarea.cjs.entry.js +81 -0
  47. package/dist/cjs/wm-timepicker.cjs.entry.js +302 -0
  48. package/dist/cjs/wm-toggletip.cjs.entry.js +178 -0
  49. package/dist/cjs/wm-uploader.cjs.entry.js +315 -0
  50. package/dist/cjs/wm-wrapper.cjs.entry.js +19 -0
  51. package/dist/collection/collection-manifest.json +58 -0
  52. package/dist/collection/components/charts/chartFunctions.js +665 -0
  53. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +908 -0
  54. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +261 -0
  55. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +128 -0
  56. package/dist/collection/components/charts/wm-chart/wm-chart.css +1274 -0
  57. package/dist/collection/components/charts/wm-chart/wm-chart.js +445 -0
  58. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1067 -0
  59. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +742 -0
  60. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1274 -0
  61. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +271 -0
  62. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +909 -0
  63. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +154 -0
  64. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +124 -0
  65. package/dist/collection/components/datepickers/datepicker.css +1044 -0
  66. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1279 -0
  67. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +849 -0
  68. package/dist/collection/components/datepickers/wm-date-range.js +869 -0
  69. package/dist/collection/components/datepickers/wm-datepicker.js +538 -0
  70. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +918 -0
  71. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +791 -0
  72. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1181 -0
  73. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +644 -0
  74. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +830 -0
  75. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +265 -0
  76. package/dist/collection/components/selects/wm-option/wm-option.css +931 -0
  77. package/dist/collection/components/selects/wm-option/wm-option.js +539 -0
  78. package/dist/collection/components/selects/wm-select/wm-select.css +1104 -0
  79. package/dist/collection/components/selects/wm-select/wm-select.js +606 -0
  80. package/dist/collection/components/wm-action-menu/wm-action-menu.css +891 -0
  81. package/dist/collection/components/wm-action-menu/wm-action-menu.js +444 -0
  82. package/dist/collection/components/wm-button/wm-button.css +1261 -0
  83. package/dist/collection/components/wm-button/wm-button.js +510 -0
  84. package/dist/collection/components/wm-file/wm-file.css +927 -0
  85. package/dist/collection/components/wm-file/wm-file.js +423 -0
  86. package/dist/collection/components/wm-file-list/wm-file-list.css +820 -0
  87. package/dist/collection/components/wm-file-list/wm-file-list.js +47 -0
  88. package/dist/collection/components/wm-input/wm-input.css +993 -0
  89. package/dist/collection/components/wm-input/wm-input.js +498 -0
  90. package/dist/collection/components/wm-menuitem/wm-menuitem.css +891 -0
  91. package/dist/collection/components/wm-menuitem/wm-menuitem.js +425 -0
  92. package/dist/collection/components/wm-modal/wm-modal-footer.css +845 -0
  93. package/dist/collection/components/wm-modal/wm-modal-footer.js +152 -0
  94. package/dist/collection/components/wm-modal/wm-modal-header.css +844 -0
  95. package/dist/collection/components/wm-modal/wm-modal-header.js +83 -0
  96. package/dist/collection/components/wm-modal/wm-modal.css +892 -0
  97. package/dist/collection/components/wm-modal/wm-modal.js +356 -0
  98. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +852 -0
  99. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +148 -0
  100. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +846 -0
  101. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +86 -0
  102. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +928 -0
  103. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +369 -0
  104. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +847 -0
  105. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +120 -0
  106. package/dist/collection/components/wm-navigation/wm-navigation-item.css +856 -0
  107. package/dist/collection/components/wm-navigation/wm-navigation-item.js +99 -0
  108. package/dist/collection/components/wm-navigation/wm-navigation.css +898 -0
  109. package/dist/collection/components/wm-navigation/wm-navigation.js +192 -0
  110. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +850 -0
  111. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +90 -0
  112. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +830 -0
  113. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +130 -0
  114. package/dist/collection/components/wm-navigator/wm-navigator.css +903 -0
  115. package/dist/collection/components/wm-navigator/wm-navigator.js +515 -0
  116. package/dist/collection/components/wm-pagination/wm-pagination.css +971 -0
  117. package/dist/collection/components/wm-pagination/wm-pagination.js +373 -0
  118. package/dist/collection/components/wm-search/wm-search.css +896 -0
  119. package/dist/collection/components/wm-search/wm-search.js +462 -0
  120. package/dist/collection/components/wm-snackbar/wm-snackbar.css +1078 -0
  121. package/dist/collection/components/wm-snackbar/wm-snackbar.js +280 -0
  122. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +869 -0
  123. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +187 -0
  124. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +841 -0
  125. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +276 -0
  126. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +825 -0
  127. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +97 -0
  128. package/dist/collection/components/wm-tag-input/wm-tag-input.css +1276 -0
  129. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1245 -0
  130. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +251 -0
  131. package/dist/collection/components/wm-textarea/wm-textarea.css +980 -0
  132. package/dist/collection/components/wm-textarea/wm-textarea.js +331 -0
  133. package/dist/collection/components/wm-timepicker/wm-timepicker.css +1094 -0
  134. package/dist/collection/components/wm-timepicker/wm-timepicker.js +559 -0
  135. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1152 -0
  136. package/dist/collection/components/wm-toggletip/wm-toggletip.js +295 -0
  137. package/dist/collection/components/wm-uploader/wm-uploader.css +1563 -0
  138. package/dist/collection/components/wm-uploader/wm-uploader.js +618 -0
  139. package/dist/collection/components/wm-wrapper/wm-wrapper.js +28 -0
  140. package/dist/collection/dev/button.js +0 -0
  141. package/dist/collection/dev/chart-small.js +56 -0
  142. package/dist/collection/dev/chart.js +18 -0
  143. package/dist/collection/dev/date-range.js +6 -0
  144. package/dist/collection/dev/datepicker.js +46 -0
  145. package/dist/collection/dev/file-list.js +16 -0
  146. package/dist/collection/dev/file.js +0 -0
  147. package/dist/collection/dev/input.js +6 -0
  148. package/dist/collection/dev/line-chart.js +0 -0
  149. package/dist/collection/dev/modal.js +48 -0
  150. package/dist/collection/dev/navigation.js +13 -0
  151. package/dist/collection/dev/navigator.js +34 -0
  152. package/dist/collection/dev/nested-select.js +36 -0
  153. package/dist/collection/dev/pagination.js +7 -0
  154. package/dist/collection/dev/progress-monitor.js +0 -0
  155. package/dist/collection/dev/pss-modal.js +8 -0
  156. package/dist/collection/dev/scripts.js +49 -0
  157. package/dist/collection/dev/search.js +72 -0
  158. package/dist/collection/dev/select.js +57 -0
  159. package/dist/collection/dev/snackbar.js +60 -0
  160. package/dist/collection/dev/tabs.js +44 -0
  161. package/dist/collection/dev/tag-input.js +32 -0
  162. package/dist/collection/dev/textarea.js +28 -0
  163. package/dist/collection/dev/timepicker.js +32 -0
  164. package/dist/collection/dev/toggletip.js +9 -0
  165. package/dist/collection/dev/uploader.js +139 -0
  166. package/dist/collection/global/__mocks__/functions.js +6 -0
  167. package/dist/collection/global/functions.js +825 -0
  168. package/dist/collection/global/global.js +88 -0
  169. package/dist/collection/global/interfaces.js +51 -0
  170. package/dist/collection/global/intl.js +274 -0
  171. package/dist/collection/global/services/__mocks__/http-service.js +130 -0
  172. package/dist/collection/global/services/http-service.js +50 -0
  173. package/dist/collection/lang/lang.js +5 -0
  174. package/dist/collection/lang/missing.js +43 -0
  175. package/dist/collection/lang/piglatin.js +101 -0
  176. package/dist/components/chartFunctions.js +714 -0
  177. package/dist/components/functions.js +10410 -0
  178. package/dist/components/index.js +91 -0
  179. package/dist/components/interfaces.js +34 -0
  180. package/dist/components/intl.js +277 -0
  181. package/dist/components/priv-calendar.js +6 -0
  182. package/dist/components/priv-calendar2.js +592 -0
  183. package/dist/components/priv-chart-popover.js +6 -0
  184. package/dist/components/priv-chart-popover2.js +154 -0
  185. package/dist/components/priv-navigator-button.js +6 -0
  186. package/dist/components/priv-navigator-button2.js +42 -0
  187. package/dist/components/priv-navigator-item.js +6 -0
  188. package/dist/components/priv-navigator-item2.js +49 -0
  189. package/dist/components/priv-option-list.js +6 -0
  190. package/dist/components/priv-option-list2.js +421 -0
  191. package/dist/components/wm-action-menu.js +6 -0
  192. package/dist/components/wm-action-menu2.js +231 -0
  193. package/dist/components/wm-button.js +6 -0
  194. package/dist/components/wm-button2.js +231 -0
  195. package/dist/components/wm-chart-slice.js +41 -0
  196. package/dist/components/wm-chart.js +197 -0
  197. package/dist/components/wm-date-range.js +522 -0
  198. package/dist/components/wm-datepicker.js +287 -0
  199. package/dist/components/wm-file-list.js +38 -0
  200. package/dist/components/wm-file.js +228 -0
  201. package/dist/components/wm-input.js +152 -0
  202. package/dist/components/wm-line-chart.js +497 -0
  203. package/dist/components/wm-menuitem.js +6 -0
  204. package/dist/components/wm-menuitem2.js +146 -0
  205. package/dist/components/wm-modal-footer.js +73 -0
  206. package/dist/components/wm-modal-header.js +61 -0
  207. package/dist/components/wm-modal-pss-footer.js +69 -0
  208. package/dist/components/wm-modal-pss-header.js +64 -0
  209. package/dist/components/wm-modal-pss.js +162 -0
  210. package/dist/components/wm-modal.js +161 -0
  211. package/dist/components/wm-navigation-hamburger.js +70 -0
  212. package/dist/components/wm-navigation-item.js +40 -0
  213. package/dist/components/wm-navigation.js +144 -0
  214. package/dist/components/wm-navigator.js +369 -0
  215. package/dist/components/wm-nested-select.js +343 -0
  216. package/dist/components/wm-optgroup.js +107 -0
  217. package/dist/components/wm-option.js +6 -0
  218. package/dist/components/wm-option2.js +196 -0
  219. package/dist/components/wm-pagination.js +251 -0
  220. package/dist/components/wm-progress-indicator.js +144 -0
  221. package/dist/components/wm-progress-monitor.js +93 -0
  222. package/dist/components/wm-progress-slice.js +37 -0
  223. package/dist/components/wm-search.js +250 -0
  224. package/dist/components/wm-select.js +6 -0
  225. package/dist/components/wm-select2.js +294 -0
  226. package/dist/components/wm-snackbar.js +210 -0
  227. package/dist/components/wm-tab-item.js +85 -0
  228. package/dist/components/wm-tab-list.js +217 -0
  229. package/dist/components/wm-tab-panel.js +52 -0
  230. package/dist/components/wm-tag-input.js +919 -0
  231. package/dist/components/wm-tag-option.js +63 -0
  232. package/dist/components/wm-textarea.js +113 -0
  233. package/dist/components/wm-timepicker.js +333 -0
  234. package/dist/components/wm-toggletip.js +200 -0
  235. package/dist/components/wm-uploader.js +348 -0
  236. package/dist/components/wm-wrapper.js +34 -0
  237. package/dist/esm/app-globals-9HoPoE5v.js +90 -0
  238. package/dist/esm/chartFunctions-BFCUD5JX.js +714 -0
  239. package/dist/esm/functions-ZDMCMR3o.js +10410 -0
  240. package/dist/esm/index-EopL5zo4.js +2071 -0
  241. package/dist/esm/index.js +1 -0
  242. package/dist/esm/interfaces-CyJHzEjr.js +34 -0
  243. package/dist/esm/intl-DYVRT1s6.js +277 -0
  244. package/dist/esm/loader.js +11 -0
  245. package/dist/esm/polyfills/core-js.js +11 -0
  246. package/dist/esm/polyfills/dom.js +79 -0
  247. package/dist/esm/polyfills/es5-html-element.js +1 -0
  248. package/dist/esm/polyfills/index.js +34 -0
  249. package/dist/esm/polyfills/system.js +6 -0
  250. package/dist/esm/priv-calendar.entry.js +566 -0
  251. package/dist/esm/priv-chart-popover.entry.js +134 -0
  252. package/dist/esm/priv-navigator-button_2.entry.js +51 -0
  253. package/dist/esm/priv-option-list_2.entry.js +553 -0
  254. package/dist/esm/ripple.js +21 -0
  255. package/dist/esm/wm-action-menu_4.entry.js +697 -0
  256. package/dist/esm/wm-chart-slice.entry.js +18 -0
  257. package/dist/esm/wm-chart.entry.js +157 -0
  258. package/dist/esm/wm-date-range.entry.js +477 -0
  259. package/dist/esm/wm-datepicker.entry.js +247 -0
  260. package/dist/esm/wm-file-list.entry.js +18 -0
  261. package/dist/esm/wm-file.entry.js +182 -0
  262. package/dist/esm/wm-input.entry.js +111 -0
  263. package/dist/esm/wm-line-chart.entry.js +449 -0
  264. package/dist/esm/wm-modal-footer.entry.js +44 -0
  265. package/dist/esm/wm-modal-header.entry.js +36 -0
  266. package/dist/esm/wm-modal-pss-footer.entry.js +40 -0
  267. package/dist/esm/wm-modal-pss-header.entry.js +39 -0
  268. package/dist/esm/wm-modal-pss.entry.js +135 -0
  269. package/dist/esm/wm-modal.entry.js +133 -0
  270. package/dist/esm/wm-navigation-hamburger.entry.js +48 -0
  271. package/dist/esm/wm-navigation-item.entry.js +18 -0
  272. package/dist/esm/wm-navigation.entry.js +116 -0
  273. package/dist/esm/wm-navigator.entry.js +327 -0
  274. package/dist/esm/wm-nested-select.entry.js +308 -0
  275. package/dist/esm/wm-optgroup.entry.js +68 -0
  276. package/dist/esm/wm-pagination.entry.js +223 -0
  277. package/dist/esm/wm-progress-indicator.entry.js +107 -0
  278. package/dist/esm/wm-progress-monitor.entry.js +71 -0
  279. package/dist/esm/wm-progress-slice.entry.js +13 -0
  280. package/dist/esm/wm-search.entry.js +208 -0
  281. package/dist/esm/wm-select.entry.js +249 -0
  282. package/dist/esm/wm-tab-item.entry.js +63 -0
  283. package/dist/esm/wm-tab-list.entry.js +175 -0
  284. package/dist/esm/wm-tab-panel.entry.js +32 -0
  285. package/dist/esm/wm-tag-input.entry.js +877 -0
  286. package/dist/esm/wm-tag-option.entry.js +35 -0
  287. package/dist/esm/wm-textarea.entry.js +79 -0
  288. package/dist/esm/wm-timepicker.entry.js +300 -0
  289. package/dist/esm/wm-toggletip.entry.js +176 -0
  290. package/dist/esm/wm-uploader.entry.js +313 -0
  291. package/dist/esm/wm-wrapper.entry.js +17 -0
  292. package/dist/esm-es5/app-globals-9HoPoE5v.js +1 -0
  293. package/dist/esm-es5/chartFunctions-BFCUD5JX.js +1 -0
  294. package/dist/esm-es5/functions-ZDMCMR3o.js +1 -0
  295. package/dist/esm-es5/index-EopL5zo4.js +1 -0
  296. package/dist/esm-es5/index.js +0 -0
  297. package/dist/esm-es5/interfaces-CyJHzEjr.js +1 -0
  298. package/dist/esm-es5/intl-DYVRT1s6.js +1 -0
  299. package/dist/esm-es5/loader.js +1 -0
  300. package/dist/esm-es5/priv-calendar.entry.js +1 -0
  301. package/dist/esm-es5/priv-chart-popover.entry.js +1 -0
  302. package/dist/esm-es5/priv-navigator-button_2.entry.js +1 -0
  303. package/dist/esm-es5/priv-option-list_2.entry.js +1 -0
  304. package/dist/esm-es5/ripple.js +1 -0
  305. package/dist/esm-es5/wm-action-menu_4.entry.js +1 -0
  306. package/dist/esm-es5/wm-chart-slice.entry.js +1 -0
  307. package/dist/esm-es5/wm-chart.entry.js +1 -0
  308. package/dist/esm-es5/wm-date-range.entry.js +1 -0
  309. package/dist/esm-es5/wm-datepicker.entry.js +1 -0
  310. package/dist/esm-es5/wm-file-list.entry.js +1 -0
  311. package/dist/esm-es5/wm-file.entry.js +1 -0
  312. package/dist/esm-es5/wm-input.entry.js +1 -0
  313. package/dist/esm-es5/wm-line-chart.entry.js +1 -0
  314. package/dist/esm-es5/wm-modal-footer.entry.js +1 -0
  315. package/dist/esm-es5/wm-modal-header.entry.js +1 -0
  316. package/dist/esm-es5/wm-modal-pss-footer.entry.js +1 -0
  317. package/dist/esm-es5/wm-modal-pss-header.entry.js +1 -0
  318. package/dist/esm-es5/wm-modal-pss.entry.js +1 -0
  319. package/dist/esm-es5/wm-modal.entry.js +1 -0
  320. package/dist/esm-es5/wm-navigation-hamburger.entry.js +1 -0
  321. package/dist/esm-es5/wm-navigation-item.entry.js +1 -0
  322. package/dist/esm-es5/wm-navigation.entry.js +1 -0
  323. package/dist/esm-es5/wm-navigator.entry.js +1 -0
  324. package/dist/esm-es5/wm-nested-select.entry.js +1 -0
  325. package/dist/esm-es5/wm-optgroup.entry.js +1 -0
  326. package/dist/esm-es5/wm-pagination.entry.js +1 -0
  327. package/dist/esm-es5/wm-progress-indicator.entry.js +1 -0
  328. package/dist/esm-es5/wm-progress-monitor.entry.js +1 -0
  329. package/dist/esm-es5/wm-progress-slice.entry.js +1 -0
  330. package/dist/esm-es5/wm-search.entry.js +1 -0
  331. package/dist/esm-es5/wm-select.entry.js +1 -0
  332. package/dist/esm-es5/wm-tab-item.entry.js +1 -0
  333. package/dist/esm-es5/wm-tab-list.entry.js +1 -0
  334. package/dist/esm-es5/wm-tab-panel.entry.js +1 -0
  335. package/dist/esm-es5/wm-tag-input.entry.js +1 -0
  336. package/dist/esm-es5/wm-tag-option.entry.js +1 -0
  337. package/dist/esm-es5/wm-textarea.entry.js +1 -0
  338. package/dist/esm-es5/wm-timepicker.entry.js +1 -0
  339. package/dist/esm-es5/wm-toggletip.entry.js +1 -0
  340. package/dist/esm-es5/wm-uploader.entry.js +1 -0
  341. package/dist/esm-es5/wm-wrapper.entry.js +1 -0
  342. package/dist/index.cjs.js +1 -0
  343. package/dist/index.js +1 -0
  344. package/dist/loader/cdn.js +2 -0
  345. package/dist/loader/index.cjs.js +2 -0
  346. package/dist/loader/index.d.ts +24 -0
  347. package/dist/loader/index.es2017.js +2 -0
  348. package/dist/loader/index.js +3 -0
  349. package/dist/ripple/index.esm.js +0 -0
  350. package/dist/ripple/p-032f127e.entry.js +1 -0
  351. package/dist/ripple/p-0bd43518.system.entry.js +1 -0
  352. package/dist/ripple/p-0dccd9b4.system.entry.js +1 -0
  353. package/dist/ripple/p-0dffa9ff.system.entry.js +1 -0
  354. package/dist/ripple/p-10d2b86e.entry.js +1 -0
  355. package/dist/ripple/p-1818d7f9.entry.js +1 -0
  356. package/dist/ripple/p-18d22114.system.entry.js +1 -0
  357. package/dist/ripple/p-1a769629.system.entry.js +1 -0
  358. package/dist/ripple/p-271ba485.system.entry.js +1 -0
  359. package/dist/ripple/p-2d41fbed.system.entry.js +1 -0
  360. package/dist/ripple/p-2f26b6ac.entry.js +1 -0
  361. package/dist/ripple/p-3065bbe5.system.entry.js +1 -0
  362. package/dist/ripple/p-306caa10.entry.js +1 -0
  363. package/dist/ripple/p-32f2f3b4.system.entry.js +1 -0
  364. package/dist/ripple/p-340b73a9.system.entry.js +1 -0
  365. package/dist/ripple/p-42f9cd3d.entry.js +1 -0
  366. package/dist/ripple/p-47b525bd.entry.js +1 -0
  367. package/dist/ripple/p-492a8a9f.entry.js +1 -0
  368. package/dist/ripple/p-4c316652.system.entry.js +1 -0
  369. package/dist/ripple/p-54aeadde.entry.js +1 -0
  370. package/dist/ripple/p-568e29d3.entry.js +1 -0
  371. package/dist/ripple/p-588a86ed.system.entry.js +1 -0
  372. package/dist/ripple/p-591fd100.entry.js +1 -0
  373. package/dist/ripple/p-5a6cbc14.system.entry.js +1 -0
  374. package/dist/ripple/p-5abe1171.system.entry.js +1 -0
  375. package/dist/ripple/p-5ae17300.system.entry.js +1 -0
  376. package/dist/ripple/p-5b02ae40.entry.js +1 -0
  377. package/dist/ripple/p-5e438798.system.entry.js +1 -0
  378. package/dist/ripple/p-5ed4177e.entry.js +1 -0
  379. package/dist/ripple/p-6133160d.system.entry.js +1 -0
  380. package/dist/ripple/p-620aff89.entry.js +1 -0
  381. package/dist/ripple/p-65db2c0f.entry.js +1 -0
  382. package/dist/ripple/p-70ed57bf.entry.js +1 -0
  383. package/dist/ripple/p-735d033a.entry.js +1 -0
  384. package/dist/ripple/p-74b1e110.entry.js +1 -0
  385. package/dist/ripple/p-77a8306c.entry.js +1 -0
  386. package/dist/ripple/p-7886fe5e.system.entry.js +1 -0
  387. package/dist/ripple/p-7ce09692.system.entry.js +1 -0
  388. package/dist/ripple/p-7cf1d9eb.system.entry.js +1 -0
  389. package/dist/ripple/p-7e786c28.system.entry.js +1 -0
  390. package/dist/ripple/p-812615ae.entry.js +1 -0
  391. package/dist/ripple/p-8a33538f.entry.js +1 -0
  392. package/dist/ripple/p-8b9c4e3e.entry.js +1 -0
  393. package/dist/ripple/p-90925ea9.entry.js +1 -0
  394. package/dist/ripple/p-959afdcf.entry.js +1 -0
  395. package/dist/ripple/p-997bdd2e.system.entry.js +1 -0
  396. package/dist/ripple/p-9db5f78e.entry.js +1 -0
  397. package/dist/ripple/p-BexWEx3U.system.js +1 -0
  398. package/dist/ripple/p-BgmAsS86.system.js +1 -0
  399. package/dist/ripple/p-Buh1DT2-.js +1 -0
  400. package/dist/ripple/p-CLZytLAw.system.js +1 -0
  401. package/dist/ripple/p-CTau6pR2.system.js +2 -0
  402. package/dist/ripple/p-CwkTkxrj.system.js +1 -0
  403. package/dist/ripple/p-CyJHzEjr.js +1 -0
  404. package/dist/ripple/p-DXsimRMV.js +1 -0
  405. package/dist/ripple/p-EopL5zo4.js +2 -0
  406. package/dist/ripple/p-GXdCI-yj.system.js +1 -0
  407. package/dist/ripple/p-UJrCrAlw.system.js +1 -0
  408. package/dist/ripple/p-YWpyar7R.system.js +1 -0
  409. package/dist/ripple/p-ZDMCMR3o.js +1 -0
  410. package/dist/ripple/p-b0b94ac4.system.entry.js +1 -0
  411. package/dist/ripple/p-b12640bd.entry.js +1 -0
  412. package/dist/ripple/p-b16431b0.system.entry.js +1 -0
  413. package/dist/ripple/p-b43cc69f.entry.js +1 -0
  414. package/dist/ripple/p-b4917824.entry.js +1 -0
  415. package/dist/ripple/p-b55babe1.system.entry.js +1 -0
  416. package/dist/ripple/p-ba48d47a.entry.js +1 -0
  417. package/dist/ripple/p-ba8ca46b.system.entry.js +1 -0
  418. package/dist/ripple/p-bee35fef.entry.js +1 -0
  419. package/dist/ripple/p-c273bb1c.system.entry.js +1 -0
  420. package/dist/ripple/p-cdebe76b.system.entry.js +1 -0
  421. package/dist/ripple/p-ce9634a2.entry.js +1 -0
  422. package/dist/ripple/p-d20ed498.entry.js +1 -0
  423. package/dist/ripple/p-d3e6498c.system.entry.js +1 -0
  424. package/dist/ripple/p-d40b6ef1.system.entry.js +1 -0
  425. package/dist/ripple/p-d4481342.system.entry.js +1 -0
  426. package/dist/ripple/p-d5bcab58.entry.js +1 -0
  427. package/dist/ripple/p-d7660e7d.entry.js +1 -0
  428. package/dist/ripple/p-d85f017a.system.entry.js +1 -0
  429. package/dist/ripple/p-da5ad94c.system.entry.js +1 -0
  430. package/dist/ripple/p-dcca5771.system.entry.js +1 -0
  431. package/dist/ripple/p-dd236f42.system.entry.js +1 -0
  432. package/dist/ripple/p-de33fd67.entry.js +1 -0
  433. package/dist/ripple/p-e0c9798d.system.entry.js +1 -0
  434. package/dist/ripple/p-e3700f4c.entry.js +1 -0
  435. package/dist/ripple/p-e901154b.entry.js +1 -0
  436. package/dist/ripple/p-e9fc862d.entry.js +1 -0
  437. package/dist/ripple/p-ea885cf3.system.entry.js +1 -0
  438. package/dist/ripple/p-f4c4218c.system.entry.js +1 -0
  439. package/dist/ripple/p-f57eb234.system.entry.js +1 -0
  440. package/dist/ripple/p-f858f5f9.system.entry.js +1 -0
  441. package/dist/ripple/p-f8721463.system.entry.js +1 -0
  442. package/dist/ripple/p-f881be15.entry.js +1 -0
  443. package/dist/ripple/p-f98949ad.entry.js +1 -0
  444. package/dist/ripple/p-fdcbcdf5.entry.js +1 -0
  445. package/dist/ripple/p-sXfORL9J.js +1 -0
  446. package/dist/ripple/ripple.css +1 -0
  447. package/dist/ripple/ripple.esm.js +1 -0
  448. package/dist/ripple/ripple.js +127 -0
  449. package/package.json +2 -2
  450. /package/dist/{types/test-setup.d.ts → collection/dev/action-menu.js} +0 -0
@@ -0,0 +1,1245 @@
1
+ import { h, forceUpdate } from "@stencil/core";
2
+ import { csvToArray, debounce, hideTooltip, intl, measureText, shouldOpenUp, showTooltip, truncateText, findPrev, findNext, } from "../../global/functions";
3
+ import { globalMessages } from "../../global/intl";
4
+ export class TagInput {
5
+ constructor() {
6
+ this.labelPosition = "top";
7
+ this.requiredField = false;
8
+ this.tagInputType = "dropdown";
9
+ // dropdown variant
10
+ this.addNew = true;
11
+ this.characterLimit = 50;
12
+ this.addNewHelpText = intl.formatMessage({
13
+ id: "tagInput.addNewHelpText",
14
+ defaultMessage: "Press the Enter or Comma key to add a new tag.",
15
+ description: "Instructional text, where tag refers to a tag UI element that can be added to a list. Use imperative",
16
+ });
17
+ this.selectionHelpText = intl.formatMessage({
18
+ id: "tagInput.selectionHelpText",
19
+ defaultMessage: "Search and select a tag.",
20
+ description: "Instructional text, where tag refers to a tag UI element that can be added to a list. Use imperative",
21
+ });
22
+ this.maxTagsReachedMessage = intl.formatMessage({
23
+ id: "tagInput.maxTagsReached",
24
+ defaultMessage: "No more tags can be added because the limit has been reached.",
25
+ description: "Tag refers to a tag UI element that can be added to a list.",
26
+ });
27
+ this.tagAreaInstructions = intl.formatMessage({
28
+ id: "tagInput.tagAreaInstructions",
29
+ defaultMessage: "tag selection. Press Backspace or Delete to remove a tag.",
30
+ description: "Label for a UI element where a user can select from a list of tags.",
31
+ });
32
+ this.tagsAddedMessage = intl.formatMessage({
33
+ id: "tagInput.tagsAdded",
34
+ defaultMessage: "Tags added",
35
+ description: "Tag refers to a tag UI element that can be added to a list. Full message for context: 'Tags added: x/y",
36
+ });
37
+ this.noResultsMessage = intl.formatMessage({
38
+ id: "tagInput.noResults",
39
+ defaultMessage: "No results match your search.",
40
+ });
41
+ this.openUp = false;
42
+ this.inModal = false;
43
+ this.isKeying = false;
44
+ this.isExpanded = false;
45
+ this.liveRegionMessage = "";
46
+ this.focusedColumn = 0;
47
+ this.tagsList = []; // options to render as tags. This needs the be kept in state as tags should be shown in the order they are added
48
+ this.debouncedUpdate = debounce(() => forceUpdate(this.el), 30);
49
+ }
50
+ addNewTagMessage(newTagName) {
51
+ return intl.formatMessage({
52
+ id: "tagInput.addNewTag",
53
+ defaultMessage: "Add {newTagName}",
54
+ description: "Button text to add a new tag to a list of tags",
55
+ }, { newTagName: newTagName });
56
+ }
57
+ toggleKeyingOn() {
58
+ this.isKeying = true;
59
+ }
60
+ toggleKeyingOff() {
61
+ this.isKeying = false;
62
+ }
63
+ get isDropdown() {
64
+ return this.tagInputType === "dropdown";
65
+ }
66
+ get isTable() {
67
+ return this.tagInputType === "table";
68
+ }
69
+ get charCount() {
70
+ return this.inputEl ? this.inputEl.value.length : 0;
71
+ }
72
+ get tooltipVisible() {
73
+ return document.getElementById("wm-tooltip").classList.contains("show");
74
+ }
75
+ get optionEls() {
76
+ return Array.from(this.el.querySelectorAll("wm-tag-option"));
77
+ }
78
+ // list of options matching user query
79
+ get filteredOptionEls() {
80
+ const query = this.inputEl ? this.inputEl.value.toLowerCase() : "";
81
+ const list = Array.from(this.optionEls).filter((o) => {
82
+ let values = "";
83
+ if (this.isDropdown) {
84
+ values = o.textContent.toLowerCase();
85
+ }
86
+ else if (this.isTable) {
87
+ values = [o.col1, o.col2, o.col3, o.col4].join("").toLowerCase();
88
+ }
89
+ return values.includes(query);
90
+ });
91
+ return list;
92
+ }
93
+ // the ones that should be rendered as tags
94
+ get taggedOptions() {
95
+ return this.optionEls.filter((o) => o.selected || o.locked);
96
+ }
97
+ // for visual stuff (measuring, truncating...)
98
+ get _tagEls() {
99
+ return this.tagAreaEl ? Array.from(this.tagAreaEl.querySelectorAll(".tag")) : [];
100
+ }
101
+ get focusedTag() {
102
+ if (this.focusedTagIndex !== undefined && this.focusedTagIndex >= 0) {
103
+ return this._tagEls[this.focusedTagIndex];
104
+ }
105
+ }
106
+ // get the wm-tag-option, given the internal representation (dropdown li or table tr)
107
+ tagOptionFromEl(el) {
108
+ return el.id === "add-new-btn" ? undefined : this.el.querySelector("#" + el.id);
109
+ }
110
+ // get the wm-tag-option, given the internal representation of a tag
111
+ tagOptionFromTag(el) {
112
+ const id = el.id.replace("tag-", "");
113
+ return this.el.querySelector("#" + id);
114
+ }
115
+ // get the internal representation of a wm-tag-option
116
+ elFromTagOption(el) {
117
+ return this.el.shadowRoot.querySelector("#" + el.id);
118
+ }
119
+ // focusedOption state refers to the wm-tag-option. This gets the corresponding element in the shadow DOM, or the "Add New" button.
120
+ get _focusedOption() {
121
+ if (!!this.focusedOption) {
122
+ return this.elFromTagOption(this.focusedOption);
123
+ }
124
+ else if (this.addNewButton && this.addNewButton.classList.contains("focused")) {
125
+ return this.addNewButton;
126
+ }
127
+ }
128
+ get _focusedCell() {
129
+ if (!!this._focusedOption) {
130
+ const allCells = Array.from(this._focusedOption.querySelectorAll("td"));
131
+ const index = this.focusedColumn || 0;
132
+ return allCells[index];
133
+ }
134
+ }
135
+ get inputActiveDescendantId() {
136
+ if (this._focusedOption) {
137
+ if (this.isTable) {
138
+ const cells = Array.from(this._focusedOption.querySelectorAll("td"));
139
+ return cells[this.focusedColumn].id;
140
+ }
141
+ return this._focusedOption.id;
142
+ }
143
+ return null;
144
+ }
145
+ get tagLimitReached() {
146
+ return !!(this.maxTags && this.taggedOptions.length >= this.maxTags);
147
+ }
148
+ get inputMinimumWidth() {
149
+ if (this._tagEls) {
150
+ // 150px is the minimum width of the input field, or the length of the placeholder text
151
+ const inputElStyles = getComputedStyle(this.inputEl);
152
+ const tagElStyles = getComputedStyle(this._tagEls[this._tagEls.length - 1]);
153
+ const inputElBuffer = [
154
+ inputElStyles.paddingLeft,
155
+ inputElStyles.paddingRight,
156
+ inputElStyles.marginLeft,
157
+ inputElStyles.marginRight,
158
+ tagElStyles.marginRight,
159
+ ].reduce((prev, curr) => prev + parseInt(curr.replace("px", "")), 0);
160
+ const minimumWidth = Math.max(150, measureText(this.inputEl, this.placeholder).width + inputElBuffer);
161
+ return minimumWidth;
162
+ }
163
+ else {
164
+ return 150;
165
+ }
166
+ }
167
+ getTagName(o) {
168
+ // when the user is typing and adding a new option, all we can pass is the text typed. so for the dropdown type the tag name is the identifier. It also takes care of duplicates. Table variant requires an id as the tag name is the first column but we want to allow duplicates here (e.g. people with the same name)
169
+ return this.isDropdown ? o.textContent : o.col1;
170
+ }
171
+ isExistingTag(tag) {
172
+ const list = this.optionEls.map((o) => this.getTagName(o).toLowerCase());
173
+ return list.includes(tag.toLowerCase());
174
+ }
175
+ tagAddedMessage(tag) {
176
+ return intl.formatMessage({
177
+ id: "tagInput.tagAdded",
178
+ defaultMessage: "{tagName} added.",
179
+ description: "Confirmation for adding a tag UI element to a list of tags.",
180
+ }, { tagName: tag });
181
+ }
182
+ tagRemovedMessage(tag) {
183
+ return intl.formatMessage({
184
+ id: "tagInput.tagRemoved",
185
+ defaultMessage: "{tagName} removed.",
186
+ description: "Confirmation for removing a tag UI element from a list of tags.",
187
+ }, { tagName: tag });
188
+ }
189
+ tagAlreadyAddedMessage(tag) {
190
+ return intl.formatMessage({
191
+ id: "tagInput.tagAlreadyAdded",
192
+ defaultMessage: "{tagName} has already been added.",
193
+ description: "Alert for adding a tag UI element that is already included in the list.",
194
+ }, { tagName: tag });
195
+ }
196
+ tagLockedMessage(tag) {
197
+ return intl.formatMessage({
198
+ id: "tagInput.tagLocked",
199
+ defaultMessage: "{tagName} is locked and cannot be removed.",
200
+ description: "Alert indicating a tag UI element cannot be removed from its list.",
201
+ }, { tagName: tag });
202
+ }
203
+ isElOrChild(el) {
204
+ return el === this.el || this.el.shadowRoot.contains(el) || this.el.contains(el);
205
+ }
206
+ componentWillLoad() {
207
+ if (!this.placeholder) {
208
+ this.placeholder = this.createPlaceholderDefault(this.addNew, this.optionEls.length > 0);
209
+ }
210
+ if (!this.label) {
211
+ console.error("wm-tag-input must have a label property");
212
+ }
213
+ this.el.focus = () => {
214
+ const firstFocusableTag = this._tagEls[0];
215
+ if (firstFocusableTag) {
216
+ this.tagAreaEl.focus();
217
+ this.focusTag(firstFocusableTag);
218
+ }
219
+ else {
220
+ this.inputEl.focus();
221
+ }
222
+ };
223
+ // on resize of component, trigger componentDidRender -> positionInput
224
+ const resizeObserver = new ResizeObserver(() => this.debouncedUpdate());
225
+ resizeObserver.observe(this.el);
226
+ // if within wm-modal, change max-height to vh unit
227
+ if (this.el.closest("wm-modal")) {
228
+ this.inModal = true;
229
+ }
230
+ const lockedTags = [];
231
+ const regularTags = [];
232
+ this.optionEls.forEach((o) => {
233
+ if (o.locked) {
234
+ lockedTags.push(o);
235
+ }
236
+ else if (o.selected) {
237
+ regularTags.push(o);
238
+ }
239
+ });
240
+ this.tagsList = [...lockedTags, ...regularTags];
241
+ }
242
+ componentDidLoad() {
243
+ // Set up observer to announce changes in selected tags, or removed user-added tags
244
+ const observerAnnouncer = new MutationObserver((optionListMutations) => optionListMutations.forEach((mutationRecord) => this.handleChangeAnnouncement(mutationRecord)));
245
+ observerAnnouncer.observe(this.el, {
246
+ subtree: true,
247
+ attributes: true,
248
+ attributeFilter: ["selected"],
249
+ childList: true,
250
+ });
251
+ // Set up observer that ensures parent reload
252
+ // when children wm-tag-options are removed
253
+ const optionListObserver = new MutationObserver((optionListMutations) => optionListMutations.forEach((mutationRecord) => this.handleOptionListChange(mutationRecord)));
254
+ optionListObserver.observe(this.el, {
255
+ childList: true,
256
+ });
257
+ // Set up the observer that will handle focus
258
+ // when tag list changes
259
+ if (!!this.tagAreaEl) {
260
+ const tagListObserver = new MutationObserver((tagListMutations) => tagListMutations.forEach((mutationRecord) => this.handleTagListChange(mutationRecord)));
261
+ tagListObserver.observe(this.tagAreaEl, {
262
+ childList: true,
263
+ });
264
+ }
265
+ }
266
+ handleChangeAnnouncement(mutationRecord) {
267
+ const tagOptionEl = mutationRecord.target;
268
+ if (mutationRecord.type == "childList" && mutationRecord.removedNodes.length > 0) {
269
+ // announce deselection of user-added tag, whose element removal is picked up
270
+ this.announce(this.tagRemovedMessage(mutationRecord.removedNodes[0].textContent));
271
+ }
272
+ else if (mutationRecord.type == "attributes") {
273
+ const tagName = this.getTagName(tagOptionEl);
274
+ // announce selection or deselection of all kinds of tags
275
+ if (tagOptionEl.selected) {
276
+ let changeAnnouncement = this.tagAddedMessage(tagName);
277
+ if (this.tagLimitReached) {
278
+ changeAnnouncement += ` ${this.maxTagsReachedMessage}`;
279
+ }
280
+ this.announce(changeAnnouncement);
281
+ }
282
+ else {
283
+ this.announce(this.tagRemovedMessage(tagName));
284
+ }
285
+ }
286
+ }
287
+ handleOptionListChange(record) {
288
+ const addedNodes = Array.from(record.addedNodes);
289
+ if (addedNodes.length > 0) {
290
+ addedNodes.forEach((n) => !this.tagsList.includes(n) && this.tagsList.push(n));
291
+ }
292
+ const removedNodes = Array.from(record.removedNodes);
293
+ if (removedNodes.length > 0) {
294
+ this.tagsList = this.tagsList.filter((t) => !removedNodes.includes(t));
295
+ }
296
+ }
297
+ handleTagOptionSelected(ev) {
298
+ const selOption = ev.target;
299
+ this.tagsList = this.tagsList.concat(selOption);
300
+ }
301
+ handleTagOptionDeselected(ev) {
302
+ const deselOption = ev.target;
303
+ this.tagsList = this.tagsList.filter((t) => t != deselOption);
304
+ }
305
+ handleTagListChange(mutationRecord) {
306
+ const addedTags = Array.from(mutationRecord.addedNodes);
307
+ if (!!addedTags) {
308
+ addedTags.forEach((t) => {
309
+ t.classList.add("highlight");
310
+ });
311
+ }
312
+ // there are 2 cases: the option still exists but is no longer selected,
313
+ // or it was removed altogether
314
+ const removedTag = mutationRecord.removedNodes[0];
315
+ if (!!removedTag) {
316
+ removedTag.classList.remove("highlight");
317
+ // this is a trick. focusedTag gets the ref from an index. When an element
318
+ // is removed it will fall back on the new element with that index if it exists
319
+ if (this.focusedTag) {
320
+ this.focusTag(this.focusedTag);
321
+ }
322
+ else if (this._tagEls.length > 0) {
323
+ // Otherwise the last tag was deleted and we reassign to the new last tag.
324
+ const tagToFocus = this._tagEls[this._tagEls.length - 1];
325
+ this.focusTag(tagToFocus);
326
+ }
327
+ else {
328
+ // unless there are no more tags...
329
+ this.inputEl.focus();
330
+ }
331
+ }
332
+ }
333
+ componentDidRender() {
334
+ this.positionInput();
335
+ // check each tag if truncation is needed
336
+ this._tagEls.forEach((tag) => {
337
+ const textEl = tag.querySelector(".tag-text");
338
+ const wrapper = this.el.shadowRoot.querySelector(".tags-and-input-wrapper");
339
+ const leftBound = textEl.getBoundingClientRect().left;
340
+ // the numbers represent spacing values for padding, margin, and delete icon
341
+ const rightBound = wrapper.getBoundingClientRect().right - 10 - 8 - 28;
342
+ const id = tag.id.replace("tag-", "");
343
+ const optionEl = id && this.el.querySelector("#" + id);
344
+ if (optionEl) {
345
+ // tag text for table variant is first column text
346
+ textEl.textContent = truncateText(textEl, this.getTagName(optionEl), rightBound - leftBound, 5);
347
+ }
348
+ });
349
+ }
350
+ createPlaceholderDefault(addNew, hasOptions) {
351
+ const addAndSearchPlaceholder = intl.formatMessage({
352
+ id: "tagInput.placeholderAddAndSearch",
353
+ defaultMessage: "Add or search for a tag",
354
+ description: "Placeholder text. Use imperative",
355
+ });
356
+ const searchPlaceholder = intl.formatMessage({
357
+ id: "tagInput.placeholderSearch",
358
+ defaultMessage: "Search and select a tag",
359
+ description: "Placeholder text. Use imperative",
360
+ });
361
+ const addPlaceholder = intl.formatMessage({
362
+ id: "tagInput.placeholderAdd",
363
+ defaultMessage: "Add a new tag",
364
+ description: "Placeholder text. Use imperative",
365
+ });
366
+ let placeholder = "";
367
+ if (addNew && hasOptions) {
368
+ placeholder = addAndSearchPlaceholder;
369
+ }
370
+ else if (!addNew && hasOptions) {
371
+ placeholder = searchPlaceholder;
372
+ }
373
+ else if (addNew) {
374
+ placeholder = addPlaceholder;
375
+ }
376
+ return placeholder;
377
+ }
378
+ handleClick(ev) {
379
+ const el = ev.target;
380
+ if (this.isDropdown && !this.el.contains(el) && this.isExpanded) {
381
+ this.closeDropdown();
382
+ }
383
+ }
384
+ announceError() {
385
+ if (this.errorMessage) {
386
+ setTimeout(() => this.announce(this.errorMessage), 100);
387
+ }
388
+ }
389
+ handleOptionClick(ev) {
390
+ ev.preventDefault();
391
+ this.resetInput();
392
+ let option;
393
+ if (this.isTable) {
394
+ option = ev.target;
395
+ option = this.tagOptionFromEl(option.closest("tr"));
396
+ }
397
+ else {
398
+ option = this.tagOptionFromEl(ev.target);
399
+ }
400
+ // if someone wants to attach a click event listener on wm-tag-option
401
+ option.click();
402
+ if (option.locked) {
403
+ this.announce(this.tagLockedMessage(this.getTagName(option)));
404
+ }
405
+ else {
406
+ option.selected
407
+ ? this.isTable && option.emitDeselectedEvent() // dropdown doesn't deselect on option click
408
+ : option.emitSelectedEvent();
409
+ }
410
+ }
411
+ // From wm-button
412
+ // we need to listen for scroll events during the capture phase because they do not bubble up
413
+ // there can be layouts where the main content has 100vh and overflows
414
+ // in these cases window will register no scroll events unless we catch on they way down
415
+ dismissTooltip() {
416
+ if (this.tooltipVisible) {
417
+ hideTooltip();
418
+ }
419
+ }
420
+ handleInputKeyDown(ev) {
421
+ if (/^.$/.test(ev.key) && this.charCount >= this.characterLimit) {
422
+ this.announce(this.generateCharacterLimitWarning(this.charCount, this.characterLimit));
423
+ }
424
+ switch (ev.key) {
425
+ case "Enter":
426
+ ev.preventDefault();
427
+ this.handleInputEnter();
428
+ break;
429
+ case "ArrowDown":
430
+ ev.preventDefault();
431
+ this.handleInputArrowDown();
432
+ break;
433
+ case "ArrowUp":
434
+ ev.preventDefault();
435
+ this.handleInputArrowUp();
436
+ break;
437
+ case "ArrowLeft":
438
+ if (this.isTable) {
439
+ ev.preventDefault();
440
+ this.focusPrevCell();
441
+ }
442
+ break;
443
+ case "ArrowRight":
444
+ if (this.isTable) {
445
+ ev.preventDefault();
446
+ this.focusNextCell();
447
+ }
448
+ break;
449
+ case "Escape":
450
+ if (this.isDropdown && this.isExpanded) {
451
+ ev.preventDefault();
452
+ this.closeDropdown();
453
+ }
454
+ break;
455
+ case "ArrowLeft":
456
+ case "Backspace":
457
+ this.handleInputBackspace();
458
+ break;
459
+ }
460
+ }
461
+ handleInputFocus() {
462
+ if (this.isDropdown) {
463
+ this.openDropdown();
464
+ this.clearOptionFocus();
465
+ }
466
+ }
467
+ handleInputChanged(ev) {
468
+ this.clearOptionFocus();
469
+ if (this.isDropdown) {
470
+ if (this.charCount >= this.characterLimit - 5) {
471
+ this.announce(this.generateCharacterLimitWarning(this.charCount, this.characterLimit));
472
+ }
473
+ if (!this.isExpanded) {
474
+ this.openDropdown();
475
+ }
476
+ }
477
+ const val = ev.target.value;
478
+ if (val.includes(",") && this.addNew) {
479
+ this.addTags(val);
480
+ }
481
+ else {
482
+ this.announceExistingOptions();
483
+ }
484
+ }
485
+ handleInputEnter() {
486
+ // user has selected an option in the list
487
+ if (this.focusedOption) {
488
+ if (this.focusedOption.locked) {
489
+ this.announce(this.tagLockedMessage(this.getTagName(this.focusedOption)));
490
+ }
491
+ else {
492
+ this.focusedOption.click();
493
+ this.focusedOption.selected
494
+ ? this.isTable && this.focusedOption.emitDeselectedEvent()
495
+ : this.focusedOption.emitSelectedEvent();
496
+ this.resetInput();
497
+ }
498
+ }
499
+ else if (this.isDropdown) {
500
+ // user is adding a new tag
501
+ const tagName = this.inputEl.value;
502
+ if (!!tagName) {
503
+ this.isExistingTag(tagName) ? this.announce(this.tagAlreadyAddedMessage(tagName)) : this.addTags(tagName);
504
+ this.resetInput();
505
+ }
506
+ }
507
+ }
508
+ handleInputArrowDown() {
509
+ if (this.isDropdown) {
510
+ if (!this.isExpanded) {
511
+ this.openDropdown();
512
+ }
513
+ else {
514
+ let items = [];
515
+ // the id check prevents a bug where the ref is reassigned to the first option causing it to be added twice (after adding a new user option)
516
+ if (this.addNewButton && this.addNewButton.id === "add-new-btn") {
517
+ items.push(this.addNewButton);
518
+ }
519
+ this.filteredOptionEls.forEach((o) => {
520
+ items.push(this.elFromTagOption(o));
521
+ });
522
+ const next = findNext(items, this._focusedOption, true);
523
+ this.focusOption(next);
524
+ }
525
+ }
526
+ else {
527
+ const items = this.filteredOptionEls.map((o) => this.elFromTagOption(o));
528
+ const next = findNext(items, this._focusedOption, true);
529
+ this.focusOption(next);
530
+ }
531
+ }
532
+ handleInputArrowUp() {
533
+ if (this.isDropdown) {
534
+ if (!this.isExpanded) {
535
+ this.openDropdown();
536
+ }
537
+ else {
538
+ let items = [];
539
+ if (this.addNewButton) {
540
+ items.push(this.addNewButton);
541
+ }
542
+ this.filteredOptionEls.forEach((o) => {
543
+ items.push(this.elFromTagOption(o));
544
+ });
545
+ const prev = findPrev(items, this._focusedOption, true);
546
+ this.focusOption(prev);
547
+ }
548
+ }
549
+ else {
550
+ const items = this.filteredOptionEls.map((o) => this.elFromTagOption(o));
551
+ const prev = findPrev(items, this._focusedOption, true);
552
+ this.focusOption(prev);
553
+ }
554
+ }
555
+ handleInputBackspace() {
556
+ if (this.inputEl.value === "" && this._tagEls.length > 0) {
557
+ this.isKeying = true;
558
+ // wait for events to finish firing before redirecting focus
559
+ // prevents double input in input area and tag area
560
+ window.requestAnimationFrame(() => {
561
+ this.tagAreaEl.focus();
562
+ this.focusTag(this._tagEls[this._tagEls.length - 1]);
563
+ });
564
+ }
565
+ }
566
+ handleTagAreaKeyDown(ev) {
567
+ switch (ev.key) {
568
+ case "ArrowLeft":
569
+ case "ArrowUp":
570
+ ev.preventDefault();
571
+ if (this.focusedTag) {
572
+ const prev = findPrev(this._tagEls, this.focusedTag, true);
573
+ this.focusTag(prev);
574
+ }
575
+ break;
576
+ case "ArrowRight":
577
+ case "ArrowDown":
578
+ ev.preventDefault();
579
+ if (this.focusedTag) {
580
+ const next = findNext(this._tagEls, this.focusedTag, true);
581
+ this.focusTag(next);
582
+ }
583
+ break;
584
+ case "Backspace":
585
+ case "Delete":
586
+ if (this.focusedTag) {
587
+ const option = this.tagOptionFromTag(this.focusedTag);
588
+ if (option.locked) {
589
+ this.announce(this.tagLockedMessage(this.getTagName(option)));
590
+ }
591
+ else {
592
+ option.emitDeselectedEvent();
593
+ }
594
+ }
595
+ break;
596
+ }
597
+ }
598
+ handleBlur(ev) {
599
+ this.dismissTooltip();
600
+ this.clearOptionFocus();
601
+ const relTarget = ev.relatedTarget;
602
+ if (!this.isElOrChild(relTarget)) {
603
+ this.fieldWrapperEl.classList.remove("focused");
604
+ if (this.isDropdown) {
605
+ this.closeDropdown();
606
+ }
607
+ }
608
+ }
609
+ handleTagAreaFocus(ev) {
610
+ if (this.isDropdown) {
611
+ this.closeDropdown();
612
+ }
613
+ if (this._tagEls.length > 0) {
614
+ const relTarget = ev.relatedTarget;
615
+ if (relTarget && relTarget.id === "input") {
616
+ const lastFocusableTag = this._tagEls[this._tagEls.length - 1];
617
+ this.focusTag(lastFocusableTag);
618
+ }
619
+ else {
620
+ const firstFocusableTag = this._tagEls[0];
621
+ this.focusTag(firstFocusableTag);
622
+ }
623
+ }
624
+ }
625
+ focusPrevCell() {
626
+ if (this.focusedOption) {
627
+ if (this.focusedColumn > 0) {
628
+ this.focusedColumn -= 1;
629
+ }
630
+ }
631
+ }
632
+ focusNextCell() {
633
+ if (this._focusedOption) {
634
+ const lastCellIdx = this._focusedOption.querySelectorAll("td").length - 1;
635
+ if (this.focusedColumn < lastCellIdx) {
636
+ this.focusedColumn += 1;
637
+ }
638
+ }
639
+ }
640
+ focusOption(optionToFocus) {
641
+ if (optionToFocus) {
642
+ // will be undefined for the "Add New" button
643
+ this.focusedOption = this.tagOptionFromEl(optionToFocus);
644
+ if (optionToFocus === this.addNewButton) {
645
+ this.addNewButton.classList.add("focused");
646
+ }
647
+ else {
648
+ this.addNewButton && this.addNewButton.classList.remove("focused");
649
+ }
650
+ if (this.isTable) {
651
+ // tooltip
652
+ const contentWrapper = this._focusedOption.querySelector(".cell-content-wrapper");
653
+ const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
654
+ this.dismissTooltip();
655
+ if (isTruncated) {
656
+ // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
657
+ showTooltip("bottom", this._focusedOption, this._focusedOption.innerText);
658
+ }
659
+ }
660
+ optionToFocus.scrollIntoView({ block: "nearest" });
661
+ }
662
+ }
663
+ showTooltipIfTruncated(el) {
664
+ const displayedText = el.querySelector(".tag-text").textContent;
665
+ const id = el.id.replace("tag-", "");
666
+ if (id) {
667
+ const tagEl = this.el.querySelector("#" + id);
668
+ const fullText = this.getTagName(tagEl);
669
+ if (displayedText !== fullText && displayedText.includes("...")) {
670
+ showTooltip("bottom", el, fullText);
671
+ }
672
+ }
673
+ }
674
+ focusTag(element) {
675
+ // technically it's the tag area that has focus. This function handles the aria-activedescendant value within that parent
676
+ this.focusedTagIndex = this._tagEls.indexOf(element);
677
+ element.scrollIntoView({ block: "nearest" });
678
+ window.requestAnimationFrame(() => {
679
+ hideTooltip();
680
+ this.showTooltipIfTruncated(element);
681
+ });
682
+ }
683
+ clearOptionFocus() {
684
+ this.focusedOption = undefined;
685
+ this.focusedColumn = 0;
686
+ }
687
+ openDropdown() {
688
+ // offset of -2px to avoid overlapping the focus border
689
+ this.openUp = shouldOpenUp(this.el, this.dropdownEl.clientHeight, this.el.clientHeight, -2);
690
+ this.isExpanded = true;
691
+ }
692
+ closeDropdown() {
693
+ this.clearOptionFocus();
694
+ this.isExpanded = false;
695
+ }
696
+ resetInput() {
697
+ this.inputEl.value = "";
698
+ }
699
+ announce(message) {
700
+ // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
701
+ if (this.liveRegionEl.textContent === message) {
702
+ message += "\u00A0";
703
+ }
704
+ this.liveRegionMessage = message;
705
+ }
706
+ addTags(tagNames) {
707
+ // covers both typing "," and pasting in text that includes ","
708
+ // if tag added without "," (typing enter), split puts the whole string in an array
709
+ const addedTags = tagNames.split(",").filter((t) => t.match(/\S/));
710
+ addedTags.forEach((tag) => {
711
+ this.wmTagInputTagAdded.emit(tag);
712
+ });
713
+ this.announce(this.tagAddedMessage(addedTags.join(", ")));
714
+ this.resetInput();
715
+ }
716
+ announceExistingOptions() {
717
+ // request animation frame to wait for re-rendering of filtered options
718
+ window.requestAnimationFrame(() => {
719
+ const numResults = this.filteredOptionEls.length;
720
+ const existingOptionsMessage = intl.formatMessage({
721
+ id: "tagInput.existingOptions",
722
+ defaultMessage: "{num, plural, one {1 existing option.} other {# existing options.}}",
723
+ }, { num: numResults });
724
+ this.announce(existingOptionsMessage);
725
+ });
726
+ }
727
+ generateCharacterLimitWarning(charCount, charLimit) {
728
+ let message = globalMessages.getCharactersEntered(charCount, charLimit);
729
+ if (charCount >= charLimit) {
730
+ message += ` ${globalMessages.characterLimitReached}`;
731
+ }
732
+ return message;
733
+ }
734
+ positionInput() {
735
+ if (this.tagAreaEl) {
736
+ const lastTag = this._tagEls[this._tagEls.length - 1];
737
+ // default placement to fall back to when no tags are present, or not enough space is available
738
+ this.inputEl.style.position = "static";
739
+ this.inputEl.style.width = "100%";
740
+ this.inputEl.classList.add("extended");
741
+ if (lastTag) {
742
+ const spaceAvailable = this.tagAreaEl.getBoundingClientRect().right - lastTag.getBoundingClientRect().right;
743
+ if (spaceAvailable >= this.inputMinimumWidth) {
744
+ // because the input has right: 0px
745
+ // all thats needed to properly place it is setting position: absolute, top, and width
746
+ this.inputEl.style.position = "absolute";
747
+ this.inputEl.style.top = lastTag.offsetTop.toString() + "px";
748
+ this.inputEl.style.width = (spaceAvailable - 8).toString() + "px";
749
+ this.inputEl.classList.remove("extended");
750
+ }
751
+ }
752
+ }
753
+ }
754
+ handleTagMouseEnter(ev) {
755
+ this.showTooltipIfTruncated(ev.target);
756
+ }
757
+ renderDropdown() {
758
+ return (h("div", { class: `dropdown-wrapper ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("div", { id: "help-text", class: "help-text" }, this.renderHelpText()), h("ul", { class: "dropdown", id: "dropdown", role: "listbox", "aria-multiselectable": "true", "aria-expanded": this.isExpanded ? "true" : "false", "aria-label": this.label, tabindex: -1 }, this.inputEl && this.renderAddNewButton(), this.filteredOptionEls.map((o) => this.renderListItem(o)))));
759
+ }
760
+ renderHelpText() {
761
+ if (this.helpText)
762
+ return this.helpText;
763
+ let helpText = "";
764
+ if (this.optionEls.length > 0) {
765
+ helpText = this.selectionHelpText;
766
+ }
767
+ if (this.addNew) {
768
+ helpText += " " + this.addNewHelpText;
769
+ }
770
+ return helpText;
771
+ }
772
+ renderAddNewButton() {
773
+ const inputValue = this.inputEl.value.trim();
774
+ const hasNonWhiteSpaceCharacters = this.inputEl.value.match(/\S/);
775
+ const optionAlreadyExists = this.isExistingTag(this.inputEl.value.trim());
776
+ return (this.addNew &&
777
+ hasNonWhiteSpaceCharacters &&
778
+ !optionAlreadyExists && (h("li", { ref: (el) => (this.addNewButton = el), id: "add-new-btn", class: "add-new-btn", onClick: () => this.addTags(inputValue) }, this.addNewTagMessage(inputValue))));
779
+ }
780
+ renderTable() {
781
+ return (h("div", { class: "table-wrapper", onScroll: () => this.dismissTooltip() }, h("table", { id: "table", role: "grid", class: `${this.colWidths ? "fixed-widths" : ""}`, "aria-label": this.label, "aria-multiselectable": "true" }, this.renderTableHeaders(), this.filteredOptionEls.length ? (this.filteredOptionEls.map((o) => this.renderTableRow(o))) : (h("div", { class: "no-results" }, this.noResultsMessage)))));
782
+ }
783
+ renderTableHeaders() {
784
+ return (h("tr", { class: "headers", role: "row" }, csvToArray(this.colHeaders).map((header, idx) => {
785
+ let overflowRule = "wrap";
786
+ if (this.colWrap && csvToArray(this.colWrap)[idx]) {
787
+ overflowRule = csvToArray(this.colWrap)[idx];
788
+ }
789
+ return (h("th", { class: `header-cell ${overflowRule}`, role: "columnheader",
790
+ // @ts-ignore
791
+ width: this.colWidths ? csvToArray(this.colWidths)[idx] : "" }, header));
792
+ })));
793
+ }
794
+ renderTag(o) {
795
+ const focused = this.focusedTag && this.focusedTag.id === "tag-" + o.id ? "focused" : "";
796
+ const tagName = this.getTagName(o);
797
+ return (h("li", { id: "tag-" + o.id, role: "option", class: `tag ${focused} ${o.locked ? "locked" : ""}`, "aria-describedby": `tag-${o.id}-description`, onMouseEnter: (ev) => this.handleTagMouseEnter(ev), onMouseLeave: hideTooltip }, h("span", { class: "sr-only" }, tagName), h("div", { class: "description", id: `tag-${o.id}-description` }, o.locked ? "locked" : ""), h("span", { class: "tag-text", "aria-hidden": "true" }, tagName), o.locked ? (h("div", { class: "svg-icon svg-locked" })) : (h("button", { class: "icon remove-btn", tabIndex: -1, onClick: () => o.emitDeselectedEvent() }, h("div", { class: "svg-icon svg-close" })))));
798
+ }
799
+ renderTags() {
800
+ return this.tagsList.map((o) => this.renderTag(o));
801
+ }
802
+ renderTagCounter() {
803
+ if (this.maxTags) {
804
+ return (h("div", { class: "lower-row" }, h("div", { id: "max-tags" }, this.renderMaxTags())));
805
+ }
806
+ }
807
+ renderMaxTags() {
808
+ if (this.helpText) {
809
+ return this.helpText;
810
+ }
811
+ else {
812
+ let msg = `${this.tagsAddedMessage}: ${this.taggedOptions.length}/${this.maxTags}`;
813
+ if (this.tagLimitReached) {
814
+ msg += `- ${this.maxTagsReachedMessage}`;
815
+ }
816
+ return msg;
817
+ }
818
+ }
819
+ handleCellMouseEnter(ev) {
820
+ const cell = ev.target;
821
+ const contentWrapper = cell.querySelector(".cell-content-wrapper");
822
+ const isTruncated = contentWrapper.scrollWidth > contentWrapper.clientWidth;
823
+ if (isTruncated) {
824
+ // innerText is necessary vs textContent, as innerText ignores sr-only / display: none text
825
+ showTooltip("bottom", cell, cell.innerText);
826
+ }
827
+ }
828
+ renderTableCells(o) {
829
+ const colValues = [o.col1, o.col2, o.col3, o.col4].filter((val) => !!val);
830
+ return colValues.map((val, idx) => {
831
+ const cellId = `${o.id}-col${idx + 1}`;
832
+ let overflowRule = "wrap";
833
+ if (this.colWrap && csvToArray(this.colWrap)[idx]) {
834
+ overflowRule = csvToArray(this.colWrap)[idx];
835
+ }
836
+ const classes = {
837
+ focused: !!this._focusedCell && cellId === this._focusedCell.id,
838
+ };
839
+ return (h("td", { id: cellId, class: classes, role: "gridcell", "aria-describedby": `${cellId}-description`, "aria-selected": o.selected ? "true" : "false", "aria-readonly": o.locked ? "true" : null, onMouseEnter: (ev) => this.handleCellMouseEnter(ev), onMouseLeave: () => hideTooltip() }, h("div", { class: `cell-content-wrapper ${overflowRule}` }, o.locked && idx == 0 && h("div", { class: "svg-icon svg-locked" }), val), h("div", { class: "description", id: `${cellId}-description` }, o.locked ? globalMessages.locked : "")));
840
+ });
841
+ }
842
+ renderTableRow(o) {
843
+ const classes = {
844
+ selected: o.selected,
845
+ locked: o.locked,
846
+ focused: this.focusedOption && o === this.focusedOption ? true : false,
847
+ };
848
+ return (h("tr", { id: o.id, class: classes, onClick: (ev) => this.handleOptionClick(ev) }, this.renderTableCells(o)));
849
+ }
850
+ renderListItem(o) {
851
+ if (!!this.inputEl) {
852
+ const isFocused = this.focusedOption && o === this.focusedOption;
853
+ return (h("li", { id: o.id, role: "option", class: `option ${isFocused ? "focused" : ""}`, "aria-selected": o.selected ? "true" : "false", onClick: (ev) => this.handleOptionClick(ev) }, o.textContent));
854
+ }
855
+ }
856
+ render() {
857
+ return (h("div", { key: 'c7c6274b246a075d3dde1a85c48f74a6f81e8488', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'e111c172efb9f67de292ea97c032eb0aceb5dd7b', class: "label-wrapper" }, h("label", { key: '41022ce3f8be12acda982a6b6fddd5703004278d', class: "label", htmlFor: "input" }, this.label, this.requiredField && (h("span", { key: '778554d1db5854adcc3629fa263a2c1b537bcf7f', class: "required", "aria-hidden": "true" }, "*")))), h("div", { key: 'e73b049d34b5de5f7599c7c09b325545a3be0c5e', class: `field-wrapper ${this.el.shadowRoot.activeElement === this.inputEl ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, h("div", { key: 'd192eac4c59464f4002e99f77ad295c5e3917f38', class: "upper-row" }, h("div", { key: 'fde56c948d07ebfe7f0811bf516b8d466b8aaf20', class: "svg-icon svg-search" }), h("div", { key: '9831080c30d69e89aa482dc439a9210c5f6f0246', class: `tags-and-input-wrapper ${this.inModal ? "in-modal" : ""}` }, h("ul", { key: 'd9b2a3749cd06d1ad5ce381b99c04685cff97c62', ref: (el) => (this.tagAreaEl = el), class: `tag-area ${this.taggedOptions.length === 0 && "empty"} ${this.isKeying ? "user-is-keying" : ""}`, role: "listbox", "aria-activedescendant": this.focusedTag ? this.focusedTag.id : null, "aria-orientation": "horizontal", "aria-label": `${this.label} ${this.tagAreaInstructions}`, tabindex: this._tagEls.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: (ev) => this.handleTagAreaFocus(ev), onBlur: (ev) => {
858
+ this.focusedTagIndex = undefined;
859
+ this.handleBlur(ev);
860
+ }, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), h("input", { key: 'cd48d5e5c79157f76e67d89411e3471bd421cb82', id: "input", class: "input", 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 " : ""} max-tags`, "aria-label": `${this.label} ${this.isDropdown ? globalMessages.getCharacterLimit(this.characterLimit) : ""}`, "aria-expanded": this.isDropdown ? this.isExpanded.toString() : null, "aria-activedescendant": this.inputActiveDescendantId, placeholder: this.placeholder, maxLength: this.isDropdown ? this.characterLimit : undefined, onInput: (ev) => this.handleInputChanged(ev), onBlur: (ev) => {
861
+ this.handleBlur(ev);
862
+ }, onFocus: () => this.handleInputFocus(), onKeyDown: (ev) => this.handleInputKeyDown(ev) })), this.isDropdown && (h("div", { key: 'f2bf5d26f43064e12e4a2b51ed3b7a531e30d0f1', class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.isDropdown && this.renderDropdown()), this.info && (h("div", { key: 'aea747efbca0eb714301678e297052c9bcfb745c', id: "info", class: "info-text" }, this.info)), h("div", { key: 'fa5e0b55abbd2f9608bbea1161a9169adeaee627', id: "error" }, this.errorMessage), h("div", { key: '3f484bbc12775a17f5af366deeb0776808b38016', class: "sr-only", "aria-live": "polite", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.isTable && this.renderTable()));
863
+ }
864
+ static get is() { return "wm-tag-input"; }
865
+ static get encapsulation() { return "shadow"; }
866
+ static get delegatesFocus() { return true; }
867
+ static get originalStyleUrls() {
868
+ return {
869
+ "$": ["wm-tag-input.scss"]
870
+ };
871
+ }
872
+ static get styleUrls() {
873
+ return {
874
+ "$": ["wm-tag-input.css"]
875
+ };
876
+ }
877
+ static get properties() {
878
+ return {
879
+ "label": {
880
+ "type": "string",
881
+ "attribute": "label",
882
+ "mutable": false,
883
+ "complexType": {
884
+ "original": "string",
885
+ "resolved": "string",
886
+ "references": {}
887
+ },
888
+ "required": true,
889
+ "optional": false,
890
+ "docs": {
891
+ "tags": [],
892
+ "text": ""
893
+ },
894
+ "getter": false,
895
+ "setter": false,
896
+ "reflect": false
897
+ },
898
+ "errorMessage": {
899
+ "type": "string",
900
+ "attribute": "error-message",
901
+ "mutable": false,
902
+ "complexType": {
903
+ "original": "string",
904
+ "resolved": "string | undefined",
905
+ "references": {}
906
+ },
907
+ "required": false,
908
+ "optional": true,
909
+ "docs": {
910
+ "tags": [],
911
+ "text": ""
912
+ },
913
+ "getter": false,
914
+ "setter": false,
915
+ "reflect": false
916
+ },
917
+ "info": {
918
+ "type": "string",
919
+ "attribute": "info",
920
+ "mutable": false,
921
+ "complexType": {
922
+ "original": "string",
923
+ "resolved": "string | undefined",
924
+ "references": {}
925
+ },
926
+ "required": false,
927
+ "optional": true,
928
+ "docs": {
929
+ "tags": [],
930
+ "text": ""
931
+ },
932
+ "getter": false,
933
+ "setter": false,
934
+ "reflect": false
935
+ },
936
+ "labelPosition": {
937
+ "type": "string",
938
+ "attribute": "label-position",
939
+ "mutable": false,
940
+ "complexType": {
941
+ "original": "\"top\" | \"left\" | \"none\"",
942
+ "resolved": "\"left\" | \"none\" | \"top\"",
943
+ "references": {}
944
+ },
945
+ "required": false,
946
+ "optional": false,
947
+ "docs": {
948
+ "tags": [],
949
+ "text": ""
950
+ },
951
+ "getter": false,
952
+ "setter": false,
953
+ "reflect": false,
954
+ "defaultValue": "\"top\""
955
+ },
956
+ "maxTags": {
957
+ "type": "number",
958
+ "attribute": "max-tags",
959
+ "mutable": false,
960
+ "complexType": {
961
+ "original": "number",
962
+ "resolved": "number | undefined",
963
+ "references": {}
964
+ },
965
+ "required": false,
966
+ "optional": true,
967
+ "docs": {
968
+ "tags": [],
969
+ "text": ""
970
+ },
971
+ "getter": false,
972
+ "setter": false,
973
+ "reflect": false
974
+ },
975
+ "placeholder": {
976
+ "type": "string",
977
+ "attribute": "placeholder",
978
+ "mutable": true,
979
+ "complexType": {
980
+ "original": "string",
981
+ "resolved": "string | undefined",
982
+ "references": {}
983
+ },
984
+ "required": false,
985
+ "optional": true,
986
+ "docs": {
987
+ "tags": [],
988
+ "text": ""
989
+ },
990
+ "getter": false,
991
+ "setter": false,
992
+ "reflect": false
993
+ },
994
+ "requiredField": {
995
+ "type": "boolean",
996
+ "attribute": "required-field",
997
+ "mutable": false,
998
+ "complexType": {
999
+ "original": "boolean",
1000
+ "resolved": "boolean",
1001
+ "references": {}
1002
+ },
1003
+ "required": false,
1004
+ "optional": false,
1005
+ "docs": {
1006
+ "tags": [],
1007
+ "text": ""
1008
+ },
1009
+ "getter": false,
1010
+ "setter": false,
1011
+ "reflect": false,
1012
+ "defaultValue": "false"
1013
+ },
1014
+ "tagInputType": {
1015
+ "type": "string",
1016
+ "attribute": "tag-input-type",
1017
+ "mutable": false,
1018
+ "complexType": {
1019
+ "original": "\"dropdown\" | \"table\"",
1020
+ "resolved": "\"dropdown\" | \"table\"",
1021
+ "references": {}
1022
+ },
1023
+ "required": false,
1024
+ "optional": false,
1025
+ "docs": {
1026
+ "tags": [],
1027
+ "text": ""
1028
+ },
1029
+ "getter": false,
1030
+ "setter": false,
1031
+ "reflect": false,
1032
+ "defaultValue": "\"dropdown\""
1033
+ },
1034
+ "helpText": {
1035
+ "type": "string",
1036
+ "attribute": "help-text",
1037
+ "mutable": false,
1038
+ "complexType": {
1039
+ "original": "string",
1040
+ "resolved": "string | undefined",
1041
+ "references": {}
1042
+ },
1043
+ "required": false,
1044
+ "optional": true,
1045
+ "docs": {
1046
+ "tags": [],
1047
+ "text": ""
1048
+ },
1049
+ "getter": false,
1050
+ "setter": false,
1051
+ "reflect": false
1052
+ },
1053
+ "addNew": {
1054
+ "type": "boolean",
1055
+ "attribute": "add-new",
1056
+ "mutable": false,
1057
+ "complexType": {
1058
+ "original": "boolean",
1059
+ "resolved": "boolean",
1060
+ "references": {}
1061
+ },
1062
+ "required": false,
1063
+ "optional": false,
1064
+ "docs": {
1065
+ "tags": [],
1066
+ "text": ""
1067
+ },
1068
+ "getter": false,
1069
+ "setter": false,
1070
+ "reflect": false,
1071
+ "defaultValue": "true"
1072
+ },
1073
+ "characterLimit": {
1074
+ "type": "number",
1075
+ "attribute": "character-limit",
1076
+ "mutable": false,
1077
+ "complexType": {
1078
+ "original": "number",
1079
+ "resolved": "number",
1080
+ "references": {}
1081
+ },
1082
+ "required": false,
1083
+ "optional": false,
1084
+ "docs": {
1085
+ "tags": [],
1086
+ "text": ""
1087
+ },
1088
+ "getter": false,
1089
+ "setter": false,
1090
+ "reflect": false,
1091
+ "defaultValue": "50"
1092
+ },
1093
+ "colHeaders": {
1094
+ "type": "string",
1095
+ "attribute": "col-headers",
1096
+ "mutable": false,
1097
+ "complexType": {
1098
+ "original": "string",
1099
+ "resolved": "string",
1100
+ "references": {}
1101
+ },
1102
+ "required": true,
1103
+ "optional": false,
1104
+ "docs": {
1105
+ "tags": [],
1106
+ "text": ""
1107
+ },
1108
+ "getter": false,
1109
+ "setter": false,
1110
+ "reflect": false
1111
+ },
1112
+ "colWidths": {
1113
+ "type": "string",
1114
+ "attribute": "col-widths",
1115
+ "mutable": false,
1116
+ "complexType": {
1117
+ "original": "string",
1118
+ "resolved": "string | undefined",
1119
+ "references": {}
1120
+ },
1121
+ "required": false,
1122
+ "optional": true,
1123
+ "docs": {
1124
+ "tags": [],
1125
+ "text": ""
1126
+ },
1127
+ "getter": false,
1128
+ "setter": false,
1129
+ "reflect": false
1130
+ },
1131
+ "colWrap": {
1132
+ "type": "string",
1133
+ "attribute": "col-wrap",
1134
+ "mutable": false,
1135
+ "complexType": {
1136
+ "original": "string",
1137
+ "resolved": "string | undefined",
1138
+ "references": {}
1139
+ },
1140
+ "required": false,
1141
+ "optional": true,
1142
+ "docs": {
1143
+ "tags": [],
1144
+ "text": ""
1145
+ },
1146
+ "getter": false,
1147
+ "setter": false,
1148
+ "reflect": false
1149
+ }
1150
+ };
1151
+ }
1152
+ static get states() {
1153
+ return {
1154
+ "isKeying": {},
1155
+ "isExpanded": {},
1156
+ "liveRegionMessage": {},
1157
+ "focusedOption": {},
1158
+ "focusedColumn": {},
1159
+ "focusedTagIndex": {},
1160
+ "tagsList": {}
1161
+ };
1162
+ }
1163
+ static get events() {
1164
+ return [{
1165
+ "method": "wmTagInputTagAdded",
1166
+ "name": "wmTagInputTagAdded",
1167
+ "bubbles": true,
1168
+ "cancelable": true,
1169
+ "composed": true,
1170
+ "docs": {
1171
+ "tags": [],
1172
+ "text": ""
1173
+ },
1174
+ "complexType": {
1175
+ "original": "any",
1176
+ "resolved": "any",
1177
+ "references": {}
1178
+ }
1179
+ }];
1180
+ }
1181
+ static get elementRef() { return "el"; }
1182
+ static get watchers() {
1183
+ return [{
1184
+ "propName": "errorMessage",
1185
+ "methodName": "announceError"
1186
+ }];
1187
+ }
1188
+ static get listeners() {
1189
+ return [{
1190
+ "name": "wmUserIsKeying",
1191
+ "method": "toggleKeyingOn",
1192
+ "target": "window",
1193
+ "capture": false,
1194
+ "passive": false
1195
+ }, {
1196
+ "name": "wmUserIsTabbing",
1197
+ "method": "toggleKeyingOn",
1198
+ "target": "window",
1199
+ "capture": false,
1200
+ "passive": false
1201
+ }, {
1202
+ "name": "wmUserIsNotKeying",
1203
+ "method": "toggleKeyingOff",
1204
+ "target": "window",
1205
+ "capture": false,
1206
+ "passive": false
1207
+ }, {
1208
+ "name": "wmUserIsNotTabbing",
1209
+ "method": "toggleKeyingOff",
1210
+ "target": "window",
1211
+ "capture": false,
1212
+ "passive": false
1213
+ }, {
1214
+ "name": "privTagOptionSelected",
1215
+ "method": "handleTagOptionSelected",
1216
+ "target": undefined,
1217
+ "capture": false,
1218
+ "passive": false
1219
+ }, {
1220
+ "name": "privTagOptionDeselected",
1221
+ "method": "handleTagOptionDeselected",
1222
+ "target": undefined,
1223
+ "capture": false,
1224
+ "passive": false
1225
+ }, {
1226
+ "name": "click",
1227
+ "method": "handleClick",
1228
+ "target": "document",
1229
+ "capture": false,
1230
+ "passive": false
1231
+ }, {
1232
+ "name": "scroll",
1233
+ "method": "dismissTooltip",
1234
+ "target": "window",
1235
+ "capture": true,
1236
+ "passive": true
1237
+ }, {
1238
+ "name": "blur",
1239
+ "method": "handleBlur",
1240
+ "target": undefined,
1241
+ "capture": false,
1242
+ "passive": false
1243
+ }];
1244
+ }
1245
+ }