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