@ptsecurity/mosaic 12.1.0 → 13.0.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 (731) hide show
  1. package/_theming.scss +113 -66
  2. package/_visual.scss +11 -9
  3. package/autocomplete/README.md +0 -0
  4. package/autocomplete/package.json +5 -5
  5. package/button/README.md +0 -0
  6. package/button/button.component.d.ts +17 -14
  7. package/button/button.module.d.ts +1 -1
  8. package/button/package.json +5 -5
  9. package/button-toggle/README.md +0 -0
  10. package/button-toggle/package.json +5 -5
  11. package/card/README.md +0 -0
  12. package/card/package.json +5 -5
  13. package/checkbox/README.md +1 -0
  14. package/checkbox/package.json +5 -5
  15. package/core/formatters/date/formatter.d.ts +4 -4
  16. package/core/formatters/date/templates/en-US.d.ts +8 -8
  17. package/core/formatters/date/templates/ru-RU.d.ts +8 -8
  18. package/core/package.json +5 -5
  19. package/core/pop-up/pop-up-trigger.d.ts +9 -12
  20. package/datepicker/README.md +0 -0
  21. package/datepicker/package.json +5 -5
  22. package/design-tokens/package.json +5 -5
  23. package/design-tokens/style-dictionary/build.js +6 -0
  24. package/design-tokens/style-dictionary/configs/index.js +2 -1
  25. package/design-tokens/tokens/components/navbar.json5 +12 -9
  26. package/design-tokens/tokens.d.ts +11 -9
  27. package/divider/README.md +0 -0
  28. package/divider/package.json +5 -5
  29. package/dropdown/dropdown-item.component.d.ts +1 -0
  30. package/dropdown/package.json +5 -5
  31. package/{esm2015/autocomplete/autocomplete-origin.directive.js → esm2020/autocomplete/autocomplete-origin.directive.mjs} +4 -4
  32. package/{esm2015/autocomplete/autocomplete-trigger.directive.js → esm2020/autocomplete/autocomplete-trigger.directive.mjs} +4 -4
  33. package/esm2020/autocomplete/autocomplete.component.mjs +154 -0
  34. package/{esm2015/autocomplete/autocomplete.module.js → esm2020/autocomplete/autocomplete.module.mjs} +5 -5
  35. package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
  36. package/{esm2015/autocomplete/ptsecurity-mosaic-autocomplete.js → esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs} +0 -0
  37. package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
  38. package/esm2020/button/button.component.mjs +129 -0
  39. package/esm2020/button/button.module.mjs +38 -0
  40. package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
  41. package/{esm2015/button/ptsecurity-mosaic-button.js → esm2020/button/ptsecurity-mosaic-button.mjs} +0 -0
  42. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  43. package/esm2020/button-toggle/button-toggle.component.mjs +362 -0
  44. package/{esm2015/button-toggle/button-toggle.module.js → esm2020/button-toggle/button-toggle.module.mjs} +5 -5
  45. package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
  46. package/{esm2015/button-toggle/ptsecurity-mosaic-button-toggle.js → esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs} +0 -0
  47. package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
  48. package/esm2020/card/card.component.mjs +80 -0
  49. package/{esm2015/card/card.module.js → esm2020/card/card.module.mjs} +5 -5
  50. package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
  51. package/{esm2015/card/ptsecurity-mosaic-card.js → esm2020/card/ptsecurity-mosaic-card.mjs} +0 -0
  52. package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
  53. package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
  54. package/{esm2015/checkbox/checkbox-module.js → esm2020/checkbox/checkbox-module.mjs} +5 -5
  55. package/{esm2015/checkbox/checkbox-required-validator.js → esm2020/checkbox/checkbox-required-validator.mjs} +4 -4
  56. package/esm2020/checkbox/checkbox.mjs +315 -0
  57. package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
  58. package/{esm2015/checkbox/ptsecurity-mosaic-checkbox.js → esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs} +0 -0
  59. package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
  60. package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
  61. package/{esm2015/core/animation/fade-animations.js → esm2020/core/animation/fade-animations.mjs} +0 -0
  62. package/{esm2015/core/animation/index.js → esm2020/core/animation/index.mjs} +0 -0
  63. package/{esm2015/core/animation/select-animations.js → esm2020/core/animation/select-animations.mjs} +0 -0
  64. package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
  65. package/{esm2015/core/common-behaviors/common-module.js → esm2020/core/common-behaviors/common-module.mjs} +5 -5
  66. package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
  67. package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
  68. package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
  69. package/{esm2015/core/common-behaviors/index.js → esm2020/core/common-behaviors/index.mjs} +0 -0
  70. package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
  71. package/{esm2015/core/error/error-options.js → esm2020/core/error/error-options.mjs} +7 -7
  72. package/esm2020/core/formatters/date/formatter.mjs +314 -0
  73. package/esm2020/core/formatters/date/templates/en-US.mjs +280 -0
  74. package/esm2020/core/formatters/date/templates/ru-RU.mjs +280 -0
  75. package/{esm2015/core/formatters/index.js → esm2020/core/formatters/index.mjs} +5 -5
  76. package/esm2020/core/formatters/number/formatter.mjs +105 -0
  77. package/{esm2015/core/forms/forms-module.js → esm2020/core/forms/forms-module.mjs} +5 -5
  78. package/{esm2015/core/forms/forms.directive.js → esm2020/core/forms/forms.directive.mjs} +7 -7
  79. package/{esm2015/core/forms/index.js → esm2020/core/forms/index.mjs} +0 -0
  80. package/{esm2015/core/highlight/highlight.pipe.js → esm2020/core/highlight/highlight.pipe.mjs} +4 -4
  81. package/{esm2015/core/highlight/index.js → esm2020/core/highlight/index.mjs} +5 -5
  82. package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
  83. package/{esm2015/core/label/label-options.js → esm2020/core/label/label-options.mjs} +0 -0
  84. package/{esm2015/core/line/line.js → esm2020/core/line/line.mjs} +8 -8
  85. package/esm2020/core/option/action.mjs +121 -0
  86. package/{esm2015/core/option/index.js → esm2020/core/option/index.mjs} +0 -0
  87. package/esm2020/core/option/optgroup.mjs +31 -0
  88. package/{esm2015/core/option/option-module.js → esm2020/core/option/option-module.mjs} +5 -5
  89. package/esm2020/core/option/option.mjs +254 -0
  90. package/{esm2015/core/overlay/overlay-position-map.js → esm2020/core/overlay/overlay-position-map.mjs} +0 -0
  91. package/{esm2015/core/pop-up/constants.js → esm2020/core/pop-up/constants.mjs} +0 -0
  92. package/{esm2015/core/pop-up/index.js → esm2020/core/pop-up/index.mjs} +0 -0
  93. package/esm2020/core/pop-up/pop-up-trigger.mjs +246 -0
  94. package/esm2020/core/pop-up/pop-up.mjs +91 -0
  95. package/{esm2015/core/ptsecurity-mosaic-core.js → esm2020/core/ptsecurity-mosaic-core.mjs} +0 -0
  96. package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +0 -0
  97. package/{esm2015/core/select/constants.js → esm2020/core/select/constants.mjs} +0 -0
  98. package/{esm2015/core/select/errors.js → esm2020/core/select/errors.mjs} +0 -0
  99. package/{esm2015/core/select/events.js → esm2020/core/select/events.mjs} +0 -0
  100. package/{esm2015/core/select/index.js → esm2020/core/select/index.mjs} +0 -0
  101. package/{esm2015/core/selection/constants.js → esm2020/core/selection/constants.mjs} +0 -0
  102. package/{esm2015/core/selection/index.js → esm2020/core/selection/index.mjs} +0 -0
  103. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +37 -0
  104. package/{esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js → esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs} +5 -5
  105. package/{esm2015/core/services/measure-scrollbar.service.js → esm2020/core/services/measure-scrollbar.service.mjs} +4 -4
  106. package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
  107. package/{esm2015/core/utils/public-api.js → esm2020/core/utils/public-api.mjs} +0 -0
  108. package/{esm2015/core/utils/utils.js → esm2020/core/utils/utils.mjs} +0 -0
  109. package/{esm2015/core/validation/index.js → esm2020/core/validation/index.mjs} +0 -0
  110. package/{esm2015/core/validation/validation.js → esm2020/core/validation/validation.mjs} +0 -0
  111. package/esm2020/datepicker/calendar-body.component.mjs +106 -0
  112. package/esm2020/datepicker/calendar.component.mjs +362 -0
  113. package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
  114. package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
  115. package/esm2020/datepicker/datepicker-input.directive.mjs +900 -0
  116. package/{esm2015/datepicker/datepicker-intl.js → esm2020/datepicker/datepicker-intl.mjs} +4 -4
  117. package/{esm2015/datepicker/datepicker-module.js → esm2020/datepicker/datepicker-module.mjs} +5 -5
  118. package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -0
  119. package/esm2020/datepicker/datepicker.component.mjs +408 -0
  120. package/{esm2015/datepicker/index.js → esm2020/datepicker/index.mjs} +0 -0
  121. package/{esm2015/datepicker/month-view.component.js → esm2020/datepicker/month-view.component.mjs} +5 -11
  122. package/{esm2015/datepicker/multi-year-view.component.js → esm2020/datepicker/multi-year-view.component.mjs} +5 -11
  123. package/{esm2015/datepicker/ptsecurity-mosaic-datepicker.js → esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs} +0 -0
  124. package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
  125. package/{esm2015/datepicker/year-view.component.js → esm2020/datepicker/year-view.component.mjs} +5 -11
  126. package/{esm2015/design-tokens/index.js → esm2020/design-tokens/index.mjs} +0 -0
  127. package/{esm2015/design-tokens/ptsecurity-mosaic-design-tokens.js → esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs} +0 -0
  128. package/{esm2015/design-tokens/public-api.js → esm2020/design-tokens/public-api.mjs} +0 -0
  129. package/{esm2015/design-tokens/tokens.js → esm2020/design-tokens/tokens.mjs} +12 -10
  130. package/{esm2015/divider/divider.component.js → esm2020/divider/divider.component.mjs} +6 -13
  131. package/{esm2015/divider/divider.module.js → esm2020/divider/divider.module.mjs} +5 -5
  132. package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
  133. package/{esm2015/divider/ptsecurity-mosaic-divider.js → esm2020/divider/ptsecurity-mosaic-divider.mjs} +0 -0
  134. package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
  135. package/{esm2015/dropdown/dropdown-animations.js → esm2020/dropdown/dropdown-animations.mjs} +0 -0
  136. package/{esm2015/dropdown/dropdown-content.directive.js → esm2020/dropdown/dropdown-content.directive.mjs} +6 -8
  137. package/{esm2015/dropdown/dropdown-errors.js → esm2020/dropdown/dropdown-errors.mjs} +0 -0
  138. package/esm2020/dropdown/dropdown-item.component.mjs +139 -0
  139. package/esm2020/dropdown/dropdown-trigger.directive.mjs +485 -0
  140. package/esm2020/dropdown/dropdown.component.mjs +292 -0
  141. package/{esm2015/dropdown/dropdown.module.js → esm2020/dropdown/dropdown.module.mjs} +5 -5
  142. package/{esm2015/dropdown/dropdown.types.js → esm2020/dropdown/dropdown.types.mjs} +0 -0
  143. package/{esm2015/dropdown/index.js → esm2020/dropdown/index.mjs} +0 -0
  144. package/{esm2015/dropdown/ptsecurity-mosaic-dropdown.js → esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs} +0 -0
  145. package/{esm2015/dropdown/public-api.js → esm2020/dropdown/public-api.mjs} +0 -0
  146. package/esm2020/form-field/cleaner.mjs +23 -0
  147. package/{esm2015/form-field/form-field-control.js → esm2020/form-field/form-field-control.mjs} +0 -0
  148. package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
  149. package/esm2020/form-field/form-field.mjs +205 -0
  150. package/{esm2015/form-field/form-field.module.js → esm2020/form-field/form-field.module.mjs} +5 -5
  151. package/{esm2015/form-field/hint.js → esm2020/form-field/hint.mjs} +4 -4
  152. package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
  153. package/{esm2015/form-field/prefix.js → esm2020/form-field/prefix.mjs} +4 -4
  154. package/{esm2015/form-field/ptsecurity-mosaic-form-field.js → esm2020/form-field/ptsecurity-mosaic-form-field.mjs} +0 -0
  155. package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
  156. package/{esm2015/form-field/stepper.js → esm2020/form-field/stepper.mjs} +4 -4
  157. package/{esm2015/form-field/suffix.js → esm2020/form-field/suffix.mjs} +4 -4
  158. package/esm2020/icon/icon.component.mjs +44 -0
  159. package/{esm2015/icon/icon.module.js → esm2020/icon/icon.module.mjs} +5 -5
  160. package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
  161. package/{esm2015/icon/ptsecurity-mosaic-icon.js → esm2020/icon/ptsecurity-mosaic-icon.mjs} +0 -0
  162. package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
  163. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  164. package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
  165. package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
  166. package/esm2020/input/input-number-validators.mjs +92 -0
  167. package/{esm2015/input/input-number.js → esm2020/input/input-number.mjs} +4 -4
  168. package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
  169. package/{esm2015/input/input.js → esm2020/input/input.mjs} +7 -7
  170. package/{esm2015/input/input.module.js → esm2020/input/input.module.mjs} +5 -5
  171. package/{esm2015/input/ptsecurity-mosaic-input.js → esm2020/input/ptsecurity-mosaic-input.mjs} +0 -0
  172. package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
  173. package/{esm2015/link/index.js → esm2020/link/index.mjs} +0 -0
  174. package/esm2020/link/link.component.mjs +107 -0
  175. package/{esm2015/link/link.module.js → esm2020/link/link.module.mjs} +5 -5
  176. package/{esm2015/link/ptsecurity-mosaic-link.js → esm2020/link/ptsecurity-mosaic-link.mjs} +0 -0
  177. package/{esm2015/link/public-api.js → esm2020/link/public-api.mjs} +0 -0
  178. package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
  179. package/esm2020/list/list-selection.component.mjs +693 -0
  180. package/esm2020/list/list.component.mjs +44 -0
  181. package/{esm2015/list/list.module.js → esm2020/list/list.module.mjs} +5 -5
  182. package/{esm2015/list/ptsecurity-mosaic-list.js → esm2020/list/ptsecurity-mosaic-list.mjs} +0 -0
  183. package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
  184. package/{esm2015/modal/css-unit.pipe.js → esm2020/modal/css-unit.pipe.mjs} +4 -4
  185. package/{esm2015/modal/index.js → esm2020/modal/index.mjs} +0 -0
  186. package/{esm2015/modal/modal-control.service.js → esm2020/modal/modal-control.service.mjs} +4 -4
  187. package/{esm2015/modal/modal-ref.class.js → esm2020/modal/modal-ref.class.mjs} +0 -0
  188. package/{esm2015/modal/modal-util.js → esm2020/modal/modal-util.mjs} +0 -0
  189. package/esm2020/modal/modal.component.mjs +501 -0
  190. package/{esm2015/modal/modal.directive.js → esm2020/modal/modal.directive.mjs} +13 -13
  191. package/esm2020/modal/modal.module.mjs +72 -0
  192. package/esm2020/modal/modal.service.mjs +124 -0
  193. package/{esm2015/modal/modal.type.js → esm2020/modal/modal.type.mjs} +0 -0
  194. package/{esm2015/modal/ptsecurity-mosaic-modal.js → esm2020/modal/ptsecurity-mosaic-modal.mjs} +0 -0
  195. package/{esm2015/modal/public-api.js → esm2020/modal/public-api.mjs} +0 -0
  196. package/{esm2015/navbar/index.js → esm2020/navbar/index.mjs} +0 -0
  197. package/esm2020/navbar/navbar-item.component.mjs +577 -0
  198. package/esm2020/navbar/navbar.component.mjs +237 -0
  199. package/esm2020/navbar/navbar.module.mjs +92 -0
  200. package/{esm2015/navbar/ptsecurity-mosaic-navbar.js → esm2020/navbar/ptsecurity-mosaic-navbar.mjs} +0 -0
  201. package/{esm2015/navbar/public-api.js → esm2020/navbar/public-api.mjs} +0 -0
  202. package/{esm2015/navbar/vertical-navbar.animation.js → esm2020/navbar/vertical-navbar.animation.mjs} +2 -2
  203. package/esm2020/navbar/vertical-navbar.component.mjs +114 -0
  204. package/{esm2015/popover/index.js → esm2020/popover/index.mjs} +0 -0
  205. package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
  206. package/esm2020/popover/popover-confirm.component.mjs +108 -0
  207. package/esm2020/popover/popover.component.mjs +253 -0
  208. package/esm2020/popover/popover.module.mjs +24 -0
  209. package/{esm2015/popover/ptsecurity-mosaic-popover.js → esm2020/popover/ptsecurity-mosaic-popover.mjs} +0 -0
  210. package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +2 -1
  211. package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
  212. package/esm2020/progress-bar/progress-bar.component.mjs +42 -0
  213. package/{esm2015/progress-bar/progress-bar.module.js → esm2020/progress-bar/progress-bar.module.mjs} +5 -5
  214. package/{esm2015/progress-bar/ptsecurity-mosaic-progress-bar.js → esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs} +0 -0
  215. package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
  216. package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
  217. package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -0
  218. package/{esm2015/progress-spinner/progress-spinner.module.js → esm2020/progress-spinner/progress-spinner.module.mjs} +5 -5
  219. package/{esm2015/progress-spinner/ptsecurity-mosaic-progress-spinner.js → esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs} +0 -0
  220. package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
  221. package/{esm2015/ptsecurity-mosaic.js → esm2020/ptsecurity-mosaic.mjs} +0 -0
  222. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  223. package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
  224. package/{esm2015/radio/ptsecurity-mosaic-radio.js → esm2020/radio/ptsecurity-mosaic-radio.mjs} +0 -0
  225. package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
  226. package/esm2020/radio/radio.component.mjs +458 -0
  227. package/{esm2015/radio/radio.module.js → esm2020/radio/radio.module.mjs} +5 -5
  228. package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
  229. package/{esm2015/select/ptsecurity-mosaic-select.js → esm2020/select/ptsecurity-mosaic-select.mjs} +0 -0
  230. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  231. package/esm2020/select/select.component.mjs +1110 -0
  232. package/{esm2015/select/select.module.js → esm2020/select/select.module.mjs} +5 -5
  233. package/{esm2015/sidebar/index.js → esm2020/sidebar/index.mjs} +0 -0
  234. package/{esm2015/sidebar/ptsecurity-mosaic-sidebar.js → esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs} +0 -0
  235. package/{esm2015/sidebar/public-api.js → esm2020/sidebar/public-api.mjs} +0 -0
  236. package/{esm2015/sidebar/sidebar-animations.js → esm2020/sidebar/sidebar-animations.mjs} +0 -0
  237. package/esm2020/sidebar/sidebar.component.mjs +146 -0
  238. package/{esm2015/sidebar/sidebar.module.js → esm2020/sidebar/sidebar.module.mjs} +5 -5
  239. package/{esm2015/sidepanel/index.js → esm2020/sidepanel/index.mjs} +0 -0
  240. package/{esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js → esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs} +0 -0
  241. package/{esm2015/sidepanel/public-api.js → esm2020/sidepanel/public-api.mjs} +0 -0
  242. package/{esm2015/sidepanel/sidepanel-animations.js → esm2020/sidepanel/sidepanel-animations.mjs} +0 -0
  243. package/{esm2015/sidepanel/sidepanel-config.js → esm2020/sidepanel/sidepanel-config.mjs} +0 -0
  244. package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -0
  245. package/esm2020/sidepanel/sidepanel-directives.mjs +159 -0
  246. package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
  247. package/esm2020/sidepanel/sidepanel.module.mjs +74 -0
  248. package/esm2020/sidepanel/sidepanel.service.mjs +167 -0
  249. package/{esm2015/splitter/index.js → esm2020/splitter/index.mjs} +0 -0
  250. package/{esm2015/splitter/ptsecurity-mosaic-splitter.js → esm2020/splitter/ptsecurity-mosaic-splitter.mjs} +0 -0
  251. package/{esm2015/splitter/public-api.js → esm2020/splitter/public-api.mjs} +0 -0
  252. package/esm2020/splitter/splitter.component.mjs +480 -0
  253. package/esm2020/splitter/splitter.module.mjs +40 -0
  254. package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  255. package/{esm2015/table/ptsecurity-mosaic-table.js → esm2020/table/ptsecurity-mosaic-table.mjs} +0 -0
  256. package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
  257. package/{esm2015/table/table.component.js → esm2020/table/table.component.mjs} +4 -4
  258. package/{esm2015/table/table.module.js → esm2020/table/table.module.mjs} +5 -5
  259. package/{esm2015/tabs/index.js → esm2020/tabs/index.mjs} +0 -0
  260. package/esm2020/tabs/paginated-tab-header.mjs +479 -0
  261. package/{esm2015/tabs/ptsecurity-mosaic-tabs.js → esm2020/tabs/ptsecurity-mosaic-tabs.mjs} +0 -0
  262. package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
  263. package/esm2020/tabs/tab-body.component.mjs +178 -0
  264. package/{esm2015/tabs/tab-content.directive.js → esm2020/tabs/tab-content.directive.mjs} +4 -4
  265. package/esm2020/tabs/tab-group.component.mjs +350 -0
  266. package/esm2020/tabs/tab-header.component.mjs +67 -0
  267. package/{esm2015/tabs/tab-label-wrapper.directive.js → esm2020/tabs/tab-label-wrapper.directive.mjs} +4 -4
  268. package/{esm2015/tabs/tab-label.directive.js → esm2020/tabs/tab-label.directive.mjs} +4 -4
  269. package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
  270. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -0
  271. package/{esm2015/tabs/tab.component.js → esm2020/tabs/tab.component.mjs} +4 -4
  272. package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
  273. package/{esm2015/tabs/tabs.module.js → esm2020/tabs/tabs.module.mjs} +5 -5
  274. package/{esm2015/tags/index.js → esm2020/tags/index.mjs} +0 -0
  275. package/{esm2015/tags/ptsecurity-mosaic-tags.js → esm2020/tags/ptsecurity-mosaic-tags.mjs} +0 -0
  276. package/{esm2015/tags/public-api.js → esm2020/tags/public-api.mjs} +0 -0
  277. package/{esm2015/tags/tag-default-options.js → esm2020/tags/tag-default-options.mjs} +0 -0
  278. package/{esm2015/tags/tag-input.js → esm2020/tags/tag-input.mjs} +4 -4
  279. package/esm2020/tags/tag-list.component.mjs +722 -0
  280. package/{esm2015/tags/tag-text-control.js → esm2020/tags/tag-text-control.mjs} +0 -0
  281. package/esm2020/tags/tag.component.mjs +374 -0
  282. package/{esm2015/tags/tag.module.js → esm2020/tags/tag.module.mjs} +5 -5
  283. package/{esm2015/textarea/index.js → esm2020/textarea/index.mjs} +0 -0
  284. package/{esm2015/textarea/ptsecurity-mosaic-textarea.js → esm2020/textarea/ptsecurity-mosaic-textarea.mjs} +0 -0
  285. package/{esm2015/textarea/public-api.js → esm2020/textarea/public-api.mjs} +0 -0
  286. package/{esm2015/textarea/textarea.component.js → esm2020/textarea/textarea.component.mjs} +4 -4
  287. package/{esm2015/textarea/textarea.module.js → esm2020/textarea/textarea.module.mjs} +5 -5
  288. package/{esm2015/timepicker/index.js → esm2020/timepicker/index.mjs} +0 -0
  289. package/{esm2015/timepicker/ptsecurity-mosaic-timepicker.js → esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs} +0 -0
  290. package/{esm2015/timepicker/public-api.js → esm2020/timepicker/public-api.mjs} +0 -0
  291. package/{esm2015/timepicker/timepicker.constants.js → esm2020/timepicker/timepicker.constants.mjs} +0 -0
  292. package/esm2020/timepicker/timepicker.directive.mjs +653 -0
  293. package/{esm2015/timepicker/timepicker.module.js → esm2020/timepicker/timepicker.module.mjs} +5 -5
  294. package/{esm2015/toggle/index.js → esm2020/toggle/index.mjs} +0 -0
  295. package/{esm2015/toggle/ptsecurity-mosaic-toggle.js → esm2020/toggle/ptsecurity-mosaic-toggle.mjs} +0 -0
  296. package/{esm2015/toggle/public-api.js → esm2020/toggle/public-api.mjs} +0 -0
  297. package/esm2020/toggle/toggle.component.mjs +158 -0
  298. package/{esm2015/toggle/toggle.module.js → esm2020/toggle/toggle.module.mjs} +5 -5
  299. package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
  300. package/{esm2015/tooltip/ptsecurity-mosaic-tooltip.js → esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs} +0 -0
  301. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  302. package/{esm2015/tooltip/tooltip.animations.js → esm2020/tooltip/tooltip.animations.mjs} +0 -0
  303. package/esm2020/tooltip/tooltip.component.mjs +291 -0
  304. package/{esm2015/tooltip/tooltip.module.js → esm2020/tooltip/tooltip.module.mjs} +5 -5
  305. package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +0 -0
  306. package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +0 -0
  307. package/{esm2015/tree/control/nested-tree-control.js → esm2020/tree/control/nested-tree-control.mjs} +0 -0
  308. package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
  309. package/{esm2015/tree/data-source/flat-data-source.js → esm2020/tree/data-source/flat-data-source.mjs} +0 -0
  310. package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
  311. package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
  312. package/{esm2015/tree/node.js → esm2020/tree/node.mjs} +4 -4
  313. package/{esm2015/tree/outlet.js → esm2020/tree/outlet.mjs} +4 -4
  314. package/esm2020/tree/padding.directive.mjs +110 -0
  315. package/{esm2015/tree/ptsecurity-mosaic-tree.js → esm2020/tree/ptsecurity-mosaic-tree.mjs} +0 -0
  316. package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
  317. package/esm2020/tree/toggle.mjs +80 -0
  318. package/{esm2015/tree/tree-base.js → esm2020/tree/tree-base.mjs} +7 -7
  319. package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
  320. package/esm2020/tree/tree-option.component.mjs +226 -0
  321. package/esm2020/tree/tree-selection.component.mjs +530 -0
  322. package/esm2020/tree/tree.mjs +15 -0
  323. package/esm2020/tree/tree.module.mjs +53 -0
  324. package/{esm2015/tree-select/index.js → esm2020/tree-select/index.mjs} +0 -0
  325. package/{esm2015/tree-select/ptsecurity-mosaic-tree-select.js → esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs} +0 -0
  326. package/{esm2015/tree-select/public-api.js → esm2020/tree-select/public-api.mjs} +0 -0
  327. package/esm2020/tree-select/tree-select.component.mjs +889 -0
  328. package/{esm2015/tree-select/tree-select.module.js → esm2020/tree-select/tree-select.module.mjs} +5 -5
  329. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +756 -0
  330. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  331. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +385 -0
  332. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  333. package/fesm2015/ptsecurity-mosaic-button.mjs +170 -0
  334. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -0
  335. package/fesm2015/{ptsecurity-mosaic-card.js → ptsecurity-mosaic-card.mjs} +10 -18
  336. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -0
  337. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +366 -0
  338. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  339. package/fesm2015/{ptsecurity-mosaic-core.js → ptsecurity-mosaic-core.mjs} +186 -241
  340. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -0
  341. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2700 -0
  342. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  343. package/fesm2015/{ptsecurity-mosaic-design-tokens.js → ptsecurity-mosaic-design-tokens.mjs} +13 -11
  344. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  345. package/fesm2015/ptsecurity-mosaic-divider.mjs +61 -0
  346. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -0
  347. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1106 -0
  348. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  349. package/fesm2015/ptsecurity-mosaic-form-field.mjs +378 -0
  350. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -0
  351. package/fesm2015/ptsecurity-mosaic-icon.mjs +88 -0
  352. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -0
  353. package/fesm2015/ptsecurity-mosaic-input.mjs +609 -0
  354. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -0
  355. package/fesm2015/{ptsecurity-mosaic-link.js → ptsecurity-mosaic-link.mjs} +8 -8
  356. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -0
  357. package/fesm2015/ptsecurity-mosaic-list.mjs +796 -0
  358. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -0
  359. package/fesm2015/ptsecurity-mosaic-modal.mjs +842 -0
  360. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -0
  361. package/fesm2015/ptsecurity-mosaic-navbar.mjs +1025 -0
  362. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -0
  363. package/fesm2015/ptsecurity-mosaic-popover.mjs +393 -0
  364. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -0
  365. package/fesm2015/{ptsecurity-mosaic-progress-bar.js → ptsecurity-mosaic-progress-bar.mjs} +10 -18
  366. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  367. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  368. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  369. package/fesm2015/ptsecurity-mosaic-radio.mjs +481 -0
  370. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -0
  371. package/fesm2015/ptsecurity-mosaic-select.mjs +1175 -0
  372. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -0
  373. package/fesm2015/{ptsecurity-mosaic-sidebar.js → ptsecurity-mosaic-sidebar.mjs} +16 -25
  374. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  375. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +592 -0
  376. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  377. package/fesm2015/ptsecurity-mosaic-splitter.mjs +524 -0
  378. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -0
  379. package/fesm2015/{ptsecurity-mosaic-table.js → ptsecurity-mosaic-table.mjs} +8 -8
  380. package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -0
  381. package/fesm2015/ptsecurity-mosaic-tabs.mjs +1511 -0
  382. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -0
  383. package/fesm2015/ptsecurity-mosaic-tags.mjs +1372 -0
  384. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -0
  385. package/fesm2015/ptsecurity-mosaic-textarea.mjs +293 -0
  386. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -0
  387. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +715 -0
  388. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  389. package/fesm2015/{ptsecurity-mosaic-toggle.js → ptsecurity-mosaic-toggle.mjs} +12 -23
  390. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -0
  391. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +362 -0
  392. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  393. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +932 -0
  394. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  395. package/fesm2015/ptsecurity-mosaic-tree.mjs +1707 -0
  396. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -0
  397. package/fesm2015/{ptsecurity-mosaic.js → ptsecurity-mosaic.mjs} +1 -1
  398. package/fesm2015/ptsecurity-mosaic.mjs.map +1 -0
  399. package/{fesm2015/ptsecurity-mosaic-autocomplete.js → fesm2020/ptsecurity-mosaic-autocomplete.mjs} +17 -26
  400. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  401. package/{fesm2015/ptsecurity-mosaic-button-toggle.js → fesm2020/ptsecurity-mosaic-button-toggle.mjs} +15 -23
  402. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  403. package/fesm2020/ptsecurity-mosaic-button.mjs +170 -0
  404. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -0
  405. package/fesm2020/ptsecurity-mosaic-card.mjs +113 -0
  406. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -0
  407. package/{fesm2015/ptsecurity-mosaic-checkbox.js → fesm2020/ptsecurity-mosaic-checkbox.mjs} +13 -23
  408. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  409. package/fesm2020/ptsecurity-mosaic-core.mjs +2688 -0
  410. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -0
  411. package/{fesm2015/ptsecurity-mosaic-datepicker.js → fesm2020/ptsecurity-mosaic-datepicker.mjs} +77 -121
  412. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  413. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +939 -0
  414. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  415. package/fesm2020/ptsecurity-mosaic-divider.mjs +61 -0
  416. package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -0
  417. package/{fesm2015/ptsecurity-mosaic-dropdown.js → fesm2020/ptsecurity-mosaic-dropdown.mjs} +45 -53
  418. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  419. package/fesm2020/ptsecurity-mosaic-form-field.mjs +377 -0
  420. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -0
  421. package/fesm2020/ptsecurity-mosaic-icon.mjs +86 -0
  422. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -0
  423. package/{fesm2015/ptsecurity-mosaic-input.js → fesm2020/ptsecurity-mosaic-input.mjs} +41 -27
  424. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -0
  425. package/fesm2020/ptsecurity-mosaic-link.mjs +136 -0
  426. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -0
  427. package/{fesm2015/ptsecurity-mosaic-list.js → fesm2020/ptsecurity-mosaic-list.mjs} +41 -70
  428. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
  429. package/{fesm2015/ptsecurity-mosaic-modal.js → fesm2020/ptsecurity-mosaic-modal.mjs} +63 -59
  430. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -0
  431. package/fesm2020/ptsecurity-mosaic-navbar.mjs +1009 -0
  432. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -0
  433. package/fesm2020/ptsecurity-mosaic-popover.mjs +389 -0
  434. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -0
  435. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +76 -0
  436. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  437. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  438. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  439. package/{fesm2015/ptsecurity-mosaic-radio.js → fesm2020/ptsecurity-mosaic-radio.mjs} +13 -22
  440. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -0
  441. package/{fesm2015/ptsecurity-mosaic-select.js → fesm2020/ptsecurity-mosaic-select.mjs} +23 -35
  442. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -0
  443. package/fesm2020/ptsecurity-mosaic-sidebar.mjs +202 -0
  444. package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  445. package/{fesm2015/ptsecurity-mosaic-sidepanel.js → fesm2020/ptsecurity-mosaic-sidepanel.mjs} +57 -53
  446. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  447. package/fesm2020/ptsecurity-mosaic-splitter.mjs +524 -0
  448. package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -0
  449. package/fesm2020/ptsecurity-mosaic-table.mjs +50 -0
  450. package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -0
  451. package/{fesm2015/ptsecurity-mosaic-tabs.js → fesm2020/ptsecurity-mosaic-tabs.mjs} +65 -102
  452. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -0
  453. package/{fesm2015/ptsecurity-mosaic-tags.js → fesm2020/ptsecurity-mosaic-tags.mjs} +29 -47
  454. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -0
  455. package/{fesm2015/ptsecurity-mosaic-textarea.js → fesm2020/ptsecurity-mosaic-textarea.mjs} +8 -8
  456. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -0
  457. package/{fesm2015/ptsecurity-mosaic-timepicker.js → fesm2020/ptsecurity-mosaic-timepicker.mjs} +16 -15
  458. package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  459. package/fesm2020/ptsecurity-mosaic-toggle.mjs +180 -0
  460. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -0
  461. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +354 -0
  462. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  463. package/{fesm2015/ptsecurity-mosaic-tree-select.js → fesm2020/ptsecurity-mosaic-tree-select.mjs} +16 -27
  464. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  465. package/{fesm2015/ptsecurity-mosaic-tree.js → fesm2020/ptsecurity-mosaic-tree.mjs} +61 -108
  466. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -0
  467. package/fesm2020/ptsecurity-mosaic.mjs +4 -0
  468. package/fesm2020/ptsecurity-mosaic.mjs.map +1 -0
  469. package/form-field/README.md +0 -0
  470. package/form-field/cleaner.d.ts +2 -0
  471. package/form-field/package.json +5 -5
  472. package/icon/README.md +0 -0
  473. package/icon/package.json +5 -5
  474. package/input/input-number-validators.d.ts +2 -2
  475. package/input/package.json +5 -5
  476. package/link/README.md +0 -0
  477. package/link/package.json +5 -5
  478. package/list/README.md +0 -0
  479. package/list/package.json +5 -5
  480. package/modal/README.md +34 -0
  481. package/modal/modal.component.d.ts +2 -0
  482. package/modal/modal.module.d.ts +1 -1
  483. package/modal/package.json +5 -5
  484. package/navbar/README.md +41 -0
  485. package/navbar/navbar-item.component.d.ts +122 -34
  486. package/navbar/navbar.component.d.ts +37 -9
  487. package/navbar/navbar.module.d.ts +2 -1
  488. package/navbar/package.json +5 -5
  489. package/navbar/vertical-navbar.component.d.ts +15 -26
  490. package/package.json +299 -14
  491. package/popover/README.md +32 -0
  492. package/popover/package.json +5 -5
  493. package/popover/popover-confirm.component.d.ts +33 -0
  494. package/popover/popover.component.d.ts +14 -4
  495. package/popover/popover.module.d.ts +6 -3
  496. package/popover/public-api.d.ts +1 -0
  497. package/prebuilt-themes/dark-theme.css +1 -1
  498. package/prebuilt-themes/default-theme.css +1 -1
  499. package/prebuilt-visual/default-visual.css +1 -1
  500. package/progress-bar/README.md +0 -0
  501. package/progress-bar/package.json +5 -5
  502. package/progress-spinner/README.md +0 -0
  503. package/progress-spinner/package.json +5 -5
  504. package/radio/package.json +5 -5
  505. package/schematics/README.md +35 -0
  506. package/schematics/ng-update/data/index.d.ts +1 -0
  507. package/schematics/ng-update/data/index.js +10 -9
  508. package/schematics/ng-update/data/index.js.map +1 -1
  509. package/schematics/ng-update/data/symbol-removal.d.ts +2 -0
  510. package/schematics/ng-update/data/symbol-removal.js +5 -0
  511. package/schematics/ng-update/data/symbol-removal.js.map +1 -0
  512. package/schematics/ng-update/index.js +3 -3
  513. package/schematics/ng-update/index.js.map +1 -1
  514. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +1 -2
  515. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
  516. package/schematics/ng-update/upgrade-data.js +2 -1
  517. package/schematics/ng-update/upgrade-data.js.map +1 -1
  518. package/schematics/tsconfig.lib.json +2 -2
  519. package/select/README.md +0 -0
  520. package/select/package.json +5 -5
  521. package/select/select.component.d.ts +2 -7
  522. package/sidebar/package.json +5 -5
  523. package/sidepanel/package.json +5 -5
  524. package/sidepanel/sidepanel-directives.d.ts +2 -0
  525. package/sidepanel/sidepanel.module.d.ts +2 -1
  526. package/splitter/package.json +5 -5
  527. package/splitter/splitter.component.d.ts +46 -5
  528. package/splitter/splitter.module.d.ts +1 -1
  529. package/table/README.md +0 -0
  530. package/table/package.json +5 -5
  531. package/tabs/README.md +0 -0
  532. package/tabs/package.json +5 -5
  533. package/tags/README.md +0 -0
  534. package/tags/package.json +5 -5
  535. package/textarea/README.md +0 -0
  536. package/textarea/package.json +5 -5
  537. package/timepicker/README.md +0 -0
  538. package/timepicker/package.json +5 -5
  539. package/toggle/package.json +5 -5
  540. package/tooltip/package.json +5 -5
  541. package/tooltip/tooltip.component.d.ts +12 -3
  542. package/tree/package.json +5 -5
  543. package/tree/padding.directive.d.ts +1 -1
  544. package/tree/tree-option.component.d.ts +1 -1
  545. package/tree/tree-selection.component.d.ts +2 -2
  546. package/tree/tree.module.d.ts +1 -1
  547. package/tree-select/README.md +0 -0
  548. package/tree-select/package.json +5 -5
  549. package/tree-select/tree-select.component.d.ts +2 -7
  550. package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1162
  551. package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
  552. package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -757
  553. package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
  554. package/bundles/ptsecurity-mosaic-button.umd.js +0 -535
  555. package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
  556. package/bundles/ptsecurity-mosaic-card.umd.js +0 -481
  557. package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
  558. package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -764
  559. package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
  560. package/bundles/ptsecurity-mosaic-core.umd.js +0 -2887
  561. package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
  562. package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3357
  563. package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
  564. package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1872
  565. package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
  566. package/bundles/ptsecurity-mosaic-divider.umd.js +0 -108
  567. package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
  568. package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1519
  569. package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
  570. package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -789
  571. package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
  572. package/bundles/ptsecurity-mosaic-icon.umd.js +0 -452
  573. package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
  574. package/bundles/ptsecurity-mosaic-input.umd.js +0 -996
  575. package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
  576. package/bundles/ptsecurity-mosaic-link.umd.js +0 -517
  577. package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
  578. package/bundles/ptsecurity-mosaic-list.umd.js +0 -1250
  579. package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
  580. package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1304
  581. package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
  582. package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -932
  583. package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
  584. package/bundles/ptsecurity-mosaic-popover.umd.js +0 -655
  585. package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
  586. package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -442
  587. package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
  588. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -450
  589. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
  590. package/bundles/ptsecurity-mosaic-radio.umd.js +0 -903
  591. package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
  592. package/bundles/ptsecurity-mosaic-select.umd.js +0 -1608
  593. package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
  594. package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -256
  595. package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
  596. package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -950
  597. package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
  598. package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -438
  599. package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
  600. package/bundles/ptsecurity-mosaic-table.umd.js +0 -83
  601. package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
  602. package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2015
  603. package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
  604. package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1913
  605. package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
  606. package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -666
  607. package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
  608. package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -822
  609. package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
  610. package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -559
  611. package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
  612. package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -728
  613. package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
  614. package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1370
  615. package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
  616. package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2309
  617. package/bundles/ptsecurity-mosaic-tree.umd.js.map +0 -1
  618. package/bundles/ptsecurity-mosaic.umd.js +0 -11
  619. package/bundles/ptsecurity-mosaic.umd.js.map +0 -1
  620. package/esm2015/autocomplete/autocomplete.component.js +0 -163
  621. package/esm2015/button/button.component.js +0 -129
  622. package/esm2015/button/button.module.js +0 -42
  623. package/esm2015/button-toggle/button-toggle.component.js +0 -370
  624. package/esm2015/card/card.component.js +0 -88
  625. package/esm2015/checkbox/checkbox.js +0 -325
  626. package/esm2015/core/formatters/date/formatter.js +0 -287
  627. package/esm2015/core/formatters/date/templates/en-US.js +0 -280
  628. package/esm2015/core/formatters/date/templates/ru-RU.js +0 -280
  629. package/esm2015/core/formatters/number/formatter.js +0 -99
  630. package/esm2015/core/option/action.js +0 -131
  631. package/esm2015/core/option/optgroup.js +0 -40
  632. package/esm2015/core/option/option.js +0 -262
  633. package/esm2015/core/pop-up/pop-up-trigger.js +0 -273
  634. package/esm2015/core/pop-up/pop-up.js +0 -87
  635. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -45
  636. package/esm2015/datepicker/calendar-body.component.js +0 -114
  637. package/esm2015/datepicker/calendar.component.js +0 -377
  638. package/esm2015/datepicker/datepicker-input.directive.js +0 -885
  639. package/esm2015/datepicker/datepicker-toggle.component.js +0 -94
  640. package/esm2015/datepicker/datepicker.component.js +0 -418
  641. package/esm2015/dropdown/dropdown-item.component.js +0 -142
  642. package/esm2015/dropdown/dropdown-trigger.directive.js +0 -478
  643. package/esm2015/dropdown/dropdown.component.js +0 -302
  644. package/esm2015/form-field/cleaner.js +0 -19
  645. package/esm2015/form-field/form-field.js +0 -224
  646. package/esm2015/icon/icon.component.js +0 -51
  647. package/esm2015/input/input-number-validators.js +0 -78
  648. package/esm2015/link/link.component.js +0 -108
  649. package/esm2015/list/list-selection.component.js +0 -708
  650. package/esm2015/list/list.component.js +0 -58
  651. package/esm2015/modal/modal.component.js +0 -506
  652. package/esm2015/modal/modal.module.js +0 -70
  653. package/esm2015/modal/modal.service.js +0 -117
  654. package/esm2015/navbar/navbar-item.component.js +0 -209
  655. package/esm2015/navbar/navbar.component.js +0 -118
  656. package/esm2015/navbar/navbar.module.js +0 -76
  657. package/esm2015/navbar/vertical-navbar.component.js +0 -140
  658. package/esm2015/popover/popover.component.js +0 -219
  659. package/esm2015/popover/popover.module.js +0 -21
  660. package/esm2015/progress-bar/progress-bar.component.js +0 -50
  661. package/esm2015/progress-spinner/progress-spinner.component.js +0 -54
  662. package/esm2015/radio/radio.component.js +0 -467
  663. package/esm2015/select/select.component.js +0 -1122
  664. package/esm2015/sidebar/sidebar.component.js +0 -155
  665. package/esm2015/sidepanel/sidepanel-container.component.js +0 -113
  666. package/esm2015/sidepanel/sidepanel-directives.js +0 -155
  667. package/esm2015/sidepanel/sidepanel.module.js +0 -70
  668. package/esm2015/sidepanel/sidepanel.service.js +0 -163
  669. package/esm2015/splitter/splitter.component.js +0 -331
  670. package/esm2015/splitter/splitter.module.js +0 -38
  671. package/esm2015/tabs/paginated-tab-header.js +0 -482
  672. package/esm2015/tabs/tab-body.component.js +0 -186
  673. package/esm2015/tabs/tab-group.component.js +0 -359
  674. package/esm2015/tabs/tab-header.component.js +0 -76
  675. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -118
  676. package/esm2015/tags/tag-list.component.js +0 -732
  677. package/esm2015/tags/tag.component.js +0 -382
  678. package/esm2015/timepicker/timepicker.directive.js +0 -652
  679. package/esm2015/toggle/toggle.component.js +0 -169
  680. package/esm2015/tooltip/tooltip.component.js +0 -260
  681. package/esm2015/tree/padding.directive.js +0 -114
  682. package/esm2015/tree/toggle.js +0 -89
  683. package/esm2015/tree/tree-option.component.js +0 -238
  684. package/esm2015/tree/tree-selection.component.js +0 -541
  685. package/esm2015/tree/tree.js +0 -23
  686. package/esm2015/tree/tree.module.js +0 -56
  687. package/esm2015/tree-select/tree-select.component.js +0 -900
  688. package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +0 -1
  689. package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +0 -1
  690. package/fesm2015/ptsecurity-mosaic-button.js +0 -174
  691. package/fesm2015/ptsecurity-mosaic-button.js.map +0 -1
  692. package/fesm2015/ptsecurity-mosaic-card.js.map +0 -1
  693. package/fesm2015/ptsecurity-mosaic-checkbox.js.map +0 -1
  694. package/fesm2015/ptsecurity-mosaic-core.js.map +0 -1
  695. package/fesm2015/ptsecurity-mosaic-datepicker.js.map +0 -1
  696. package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +0 -1
  697. package/fesm2015/ptsecurity-mosaic-divider.js +0 -68
  698. package/fesm2015/ptsecurity-mosaic-divider.js.map +0 -1
  699. package/fesm2015/ptsecurity-mosaic-dropdown.js.map +0 -1
  700. package/fesm2015/ptsecurity-mosaic-form-field.js +0 -393
  701. package/fesm2015/ptsecurity-mosaic-form-field.js.map +0 -1
  702. package/fesm2015/ptsecurity-mosaic-icon.js +0 -93
  703. package/fesm2015/ptsecurity-mosaic-icon.js.map +0 -1
  704. package/fesm2015/ptsecurity-mosaic-input.js.map +0 -1
  705. package/fesm2015/ptsecurity-mosaic-link.js.map +0 -1
  706. package/fesm2015/ptsecurity-mosaic-list.js.map +0 -1
  707. package/fesm2015/ptsecurity-mosaic-modal.js.map +0 -1
  708. package/fesm2015/ptsecurity-mosaic-navbar.js +0 -539
  709. package/fesm2015/ptsecurity-mosaic-navbar.js.map +0 -1
  710. package/fesm2015/ptsecurity-mosaic-popover.js +0 -257
  711. package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
  712. package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +0 -1
  713. package/fesm2015/ptsecurity-mosaic-progress-spinner.js +0 -88
  714. package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +0 -1
  715. package/fesm2015/ptsecurity-mosaic-radio.js.map +0 -1
  716. package/fesm2015/ptsecurity-mosaic-select.js.map +0 -1
  717. package/fesm2015/ptsecurity-mosaic-sidebar.js.map +0 -1
  718. package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +0 -1
  719. package/fesm2015/ptsecurity-mosaic-splitter.js +0 -373
  720. package/fesm2015/ptsecurity-mosaic-splitter.js.map +0 -1
  721. package/fesm2015/ptsecurity-mosaic-table.js.map +0 -1
  722. package/fesm2015/ptsecurity-mosaic-tabs.js.map +0 -1
  723. package/fesm2015/ptsecurity-mosaic-tags.js.map +0 -1
  724. package/fesm2015/ptsecurity-mosaic-textarea.js.map +0 -1
  725. package/fesm2015/ptsecurity-mosaic-timepicker.js.map +0 -1
  726. package/fesm2015/ptsecurity-mosaic-toggle.js.map +0 -1
  727. package/fesm2015/ptsecurity-mosaic-tooltip.js +0 -323
  728. package/fesm2015/ptsecurity-mosaic-tooltip.js.map +0 -1
  729. package/fesm2015/ptsecurity-mosaic-tree-select.js.map +0 -1
  730. package/fesm2015/ptsecurity-mosaic-tree.js.map +0 -1
  731. package/fesm2015/ptsecurity-mosaic.js.map +0 -1
@@ -0,0 +1,1372 @@
1
+ import { PlatformModule } from '@angular/cdk/platform';
2
+ import * as i4 from '@angular/common';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { InjectionToken, EventEmitter, Directive, Inject, Optional, Self, Input, Output, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, ContentChild, forwardRef, NgModule } from '@angular/core';
6
+ import { ENTER, TAB, SPACE, COMMA, hasModifierKey, BACKSPACE, DELETE, HOME, END } from '@ptsecurity/cdk/keycodes';
7
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
8
+ import * as i3 from '@angular/forms';
9
+ import { NG_VALIDATORS } from '@angular/forms';
10
+ import { SelectionModel } from '@angular/cdk/collections';
11
+ import { FocusKeyManager } from '@ptsecurity/cdk/a11y';
12
+ import * as i1 from '@ptsecurity/mosaic/core';
13
+ import { mixinColor, mixinDisabled, mixinErrorState, setMosaicValidation, MC_VALIDATION } from '@ptsecurity/mosaic/core';
14
+ import { McFormFieldControl } from '@ptsecurity/mosaic/form-field';
15
+ import { Subject, merge } from 'rxjs';
16
+ import { take, takeUntil, startWith } from 'rxjs/operators';
17
+ import { McIcon } from '@ptsecurity/mosaic/icon';
18
+ import * as i2 from '@angular/cdk/bidi';
19
+
20
+ /** Injection token to be used to override the default options for the chips module. */
21
+ const MC_TAGS_DEFAULT_OPTIONS = new InjectionToken('mc-tags-default-options');
22
+
23
+ // Increasing integer for generating unique ids.
24
+ let nextUniqueId$1 = 0;
25
+ /**
26
+ * Directive that adds tag-specific behaviors to an input element inside `<mc-form-field>`.
27
+ * May be placed inside or outside of an `<mc-tag-list>`.
28
+ */
29
+ class McTagInput {
30
+ constructor(elementRef, renderer, defaultOptions, ngControl) {
31
+ this.elementRef = elementRef;
32
+ this.renderer = renderer;
33
+ this.defaultOptions = defaultOptions;
34
+ this.ngControl = ngControl;
35
+ /** Whether the control is focused. */
36
+ this.focused = false;
37
+ /**
38
+ * The list of key codes that will trigger a tagEnd event.
39
+ *
40
+ * Defaults to `[ENTER]`.
41
+ */
42
+ this.separatorKeyCodes = this.defaultOptions.separatorKeyCodes;
43
+ /** Emitted when a tag is to be added. */
44
+ this.tagEnd = new EventEmitter();
45
+ /** The input's placeholder text. */
46
+ this.placeholder = '';
47
+ /** Unique id for the input. */
48
+ this.id = `mc-tag-list-input-${nextUniqueId$1++}`;
49
+ this._addOnBlur = true;
50
+ this._disabled = false;
51
+ this.countOfSymbolsForUpdateWidth = 3;
52
+ // tslint:disable-next-line: no-unnecessary-type-assertion
53
+ this.inputElement = this.elementRef.nativeElement;
54
+ this.setDefaultInputWidth();
55
+ }
56
+ /** Register input for tag list */
57
+ set tagList(value) {
58
+ if (value) {
59
+ this._tagList = value;
60
+ this._tagList.registerInput(this);
61
+ }
62
+ }
63
+ /**
64
+ * Whether or not the tagEnd event will be emitted when the input is blurred.
65
+ */
66
+ get addOnBlur() {
67
+ return this._addOnBlur;
68
+ }
69
+ set addOnBlur(value) {
70
+ this._addOnBlur = coerceBooleanProperty(value);
71
+ }
72
+ /** Whether the input is disabled. */
73
+ get disabled() {
74
+ return this._disabled || (this._tagList && this._tagList.disabled);
75
+ }
76
+ set disabled(value) {
77
+ this._disabled = coerceBooleanProperty(value);
78
+ }
79
+ /** Whether the input is empty. */
80
+ get empty() {
81
+ return !this.inputElement.value;
82
+ }
83
+ ngOnChanges() {
84
+ this._tagList.stateChanges.next();
85
+ }
86
+ onKeydown(event) {
87
+ if (!this.inputElement.value) {
88
+ this._tagList.keydown(event);
89
+ }
90
+ if (this.isSeparatorKey(event)) {
91
+ this.emitTagEnd();
92
+ event.preventDefault();
93
+ }
94
+ }
95
+ /** Checks to see if the blur should emit the (tagEnd) event. */
96
+ blur() {
97
+ this.focused = false;
98
+ // Blur the tag list if it is not focused
99
+ if (!this._tagList.focused) {
100
+ this.triggerValidation();
101
+ this._tagList.blur();
102
+ }
103
+ // tslint:disable-next-line: no-unnecessary-type-assertion
104
+ if (this.addOnBlur) {
105
+ this.emitTagEnd();
106
+ }
107
+ this._tagList.stateChanges.next();
108
+ }
109
+ triggerValidation() {
110
+ if (!this.hasControl()) {
111
+ return;
112
+ }
113
+ this.ngControl.statusChanges.emit(this.ngControl.status);
114
+ }
115
+ /** Checks to see if the (tagEnd) event needs to be emitted. */
116
+ emitTagEnd() {
117
+ if (!this.hasControl() || (this.hasControl() && !this.ngControl.invalid)) {
118
+ this.tagEnd.emit({ input: this.inputElement, value: this.inputElement.value });
119
+ this.updateInputWidth();
120
+ }
121
+ }
122
+ onInput() {
123
+ this.updateInputWidth();
124
+ // Let tag list know whenever the value changes.
125
+ this._tagList.stateChanges.next();
126
+ }
127
+ onPaste($event) {
128
+ if (!$event.clipboardData) {
129
+ return;
130
+ }
131
+ const data = $event.clipboardData.getData('text');
132
+ if (data && data.length === 0) {
133
+ return;
134
+ }
135
+ const items = [];
136
+ for (const key of this.separatorKeyCodes) {
137
+ const separator = this.separatorKeyToSymbol(key);
138
+ if (data.search(separator) > -1) {
139
+ items.push(...data.split(separator));
140
+ break;
141
+ }
142
+ }
143
+ if (items.length === 0) {
144
+ items.push(data);
145
+ }
146
+ items.forEach((item) => this.tagEnd.emit({ input: this.inputElement, value: item }));
147
+ this.updateInputWidth();
148
+ $event.preventDefault();
149
+ $event.stopPropagation();
150
+ }
151
+ updateInputWidth() {
152
+ const length = this.inputElement.value.length;
153
+ this.renderer.setStyle(this.inputElement, 'max-width', 0);
154
+ this.oneSymbolWidth = this.inputElement.scrollWidth / length;
155
+ this.renderer.setStyle(this.inputElement, 'max-width', '');
156
+ if (length > this.countOfSymbolsForUpdateWidth) {
157
+ this.renderer.setStyle(this.inputElement, 'width', `${length * this.oneSymbolWidth}px`);
158
+ }
159
+ else {
160
+ this.setDefaultInputWidth();
161
+ }
162
+ }
163
+ onFocus() {
164
+ this.focused = true;
165
+ this._tagList.stateChanges.next();
166
+ }
167
+ /** Focuses the input. */
168
+ focus() {
169
+ this.inputElement.focus();
170
+ }
171
+ separatorKeyToSymbol(k) {
172
+ const sep = {
173
+ [ENTER]: /\r?\n/,
174
+ [TAB]: /\t/,
175
+ [SPACE]: / /,
176
+ [COMMA]: /,/
177
+ }[k];
178
+ if (sep) {
179
+ return sep;
180
+ }
181
+ return k;
182
+ }
183
+ hasControl() {
184
+ return !!this.ngControl;
185
+ }
186
+ setDefaultInputWidth() {
187
+ this.renderer.setStyle(this.inputElement, 'width', '30px');
188
+ }
189
+ /** Checks whether a keycode is one of the configured separators. */
190
+ isSeparatorKey(event) {
191
+ if (hasModifierKey(event)) {
192
+ return false;
193
+ }
194
+ // tslint:disable-next-line: deprecation
195
+ return this.separatorKeyCodes.indexOf(event.keyCode) > -1;
196
+ }
197
+ }
198
+ /** @nocollapse */ /** @nocollapse */ McTagInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagInput, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: MC_TAGS_DEFAULT_OPTIONS }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
199
+ /** @nocollapse */ /** @nocollapse */ McTagInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTagInput, selector: "input[mcTagInputFor]", inputs: { separatorKeyCodes: ["mcTagInputSeparatorKeyCodes", "separatorKeyCodes"], placeholder: "placeholder", id: "id", tagList: ["mcTagInputFor", "tagList"], addOnBlur: ["mcTagInputAddOnBlur", "addOnBlur"], disabled: "disabled" }, outputs: { tagEnd: "mcTagInputTokenEnd" }, host: { listeners: { "keydown": "onKeydown($event)", "blur": "blur()", "focus": "onFocus()", "input": "onInput()", "paste": "onPaste($event)" }, properties: { "id": "id", "attr.disabled": "disabled || null", "attr.placeholder": "placeholder || null" }, classAttribute: "mc-tag-input" }, exportAs: ["mcTagInput", "mcTagInputFor"], usesOnChanges: true, ngImport: i0 });
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagInput, decorators: [{
201
+ type: Directive,
202
+ args: [{
203
+ selector: 'input[mcTagInputFor]',
204
+ exportAs: 'mcTagInput, mcTagInputFor',
205
+ host: {
206
+ class: 'mc-tag-input',
207
+ '[id]': 'id',
208
+ '[attr.disabled]': 'disabled || null',
209
+ '[attr.placeholder]': 'placeholder || null',
210
+ '(keydown)': 'onKeydown($event)',
211
+ '(blur)': 'blur()',
212
+ '(focus)': 'onFocus()',
213
+ '(input)': 'onInput()',
214
+ '(paste)': 'onPaste($event)'
215
+ }
216
+ }]
217
+ }], ctorParameters: function () {
218
+ return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
219
+ type: Inject,
220
+ args: [MC_TAGS_DEFAULT_OPTIONS]
221
+ }] }, { type: i3.NgControl, decorators: [{
222
+ type: Optional
223
+ }, {
224
+ type: Self
225
+ }] }];
226
+ }, propDecorators: { separatorKeyCodes: [{
227
+ type: Input,
228
+ args: ['mcTagInputSeparatorKeyCodes']
229
+ }], tagEnd: [{
230
+ type: Output,
231
+ args: ['mcTagInputTokenEnd']
232
+ }], placeholder: [{
233
+ type: Input
234
+ }], id: [{
235
+ type: Input
236
+ }], tagList: [{
237
+ type: Input,
238
+ args: ['mcTagInputFor']
239
+ }], addOnBlur: [{
240
+ type: Input,
241
+ args: ['mcTagInputAddOnBlur']
242
+ }], disabled: [{
243
+ type: Input
244
+ }] } });
245
+
246
+ /** Event object emitted by McTag when selected or deselected. */
247
+ class McTagSelectionChange {
248
+ constructor(source, selected, isUserInput = false) {
249
+ this.source = source;
250
+ this.selected = selected;
251
+ this.isUserInput = isUserInput;
252
+ }
253
+ }
254
+ const TAG_ATTRIBUTE_NAMES = ['mc-basic-tag'];
255
+ /**
256
+ * Dummy directive to add CSS class to tag avatar.
257
+ * @docs-private
258
+ */
259
+ class McTagAvatar {
260
+ }
261
+ /** @nocollapse */ /** @nocollapse */ McTagAvatar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagAvatar, deps: [], target: i0.ɵɵFactoryTarget.Directive });
262
+ /** @nocollapse */ /** @nocollapse */ McTagAvatar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTagAvatar, selector: "mc-tag-avatar, [mcTagAvatar]", host: { classAttribute: "mc-tag-avatar" }, ngImport: i0 });
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagAvatar, decorators: [{
264
+ type: Directive,
265
+ args: [{
266
+ selector: 'mc-tag-avatar, [mcTagAvatar]',
267
+ host: { class: 'mc-tag-avatar' }
268
+ }]
269
+ }] });
270
+ /**
271
+ * Dummy directive to add CSS class to tag trailing icon.
272
+ * @docs-private
273
+ */
274
+ class McTagTrailingIcon {
275
+ }
276
+ /** @nocollapse */ /** @nocollapse */ McTagTrailingIcon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagTrailingIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
277
+ /** @nocollapse */ /** @nocollapse */ McTagTrailingIcon.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTagTrailingIcon, selector: "mc-tag-trailing-icon, [mcTagTrailingIcon]", host: { classAttribute: "mc-tag-trailing-icon" }, ngImport: i0 });
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagTrailingIcon, decorators: [{
279
+ type: Directive,
280
+ args: [{
281
+ selector: 'mc-tag-trailing-icon, [mcTagTrailingIcon]',
282
+ host: { class: 'mc-tag-trailing-icon' }
283
+ }]
284
+ }] });
285
+ class McTagBase {
286
+ // tslint:disable-next-line:naming-convention
287
+ constructor(_elementRef) {
288
+ this._elementRef = _elementRef;
289
+ }
290
+ }
291
+ // tslint:disable-next-line:naming-convention
292
+ const McTagMixinBase = mixinColor(mixinDisabled(McTagBase));
293
+ class McTag extends McTagMixinBase {
294
+ constructor(elementRef, changeDetectorRef, _ngZone) {
295
+ super(elementRef);
296
+ this.elementRef = elementRef;
297
+ this.changeDetectorRef = changeDetectorRef;
298
+ this._ngZone = _ngZone;
299
+ /** Emits when the tag is focused. */
300
+ this.onFocus = new Subject();
301
+ /** Emits when the tag is blured. */
302
+ this.onBlur = new Subject();
303
+ /** Whether the tag has focus. */
304
+ this.hasFocus = false;
305
+ /** Whether the tag list is selectable */
306
+ this.tagListSelectable = true;
307
+ /** Emitted when the tag is selected or deselected. */
308
+ this.selectionChange = new EventEmitter();
309
+ /** Emitted when the tag is destroyed. */
310
+ this.destroyed = new EventEmitter();
311
+ /** Emitted when a tag is to be removed. */
312
+ this.removed = new EventEmitter();
313
+ this._selected = false;
314
+ this._selectable = true;
315
+ this._removable = true;
316
+ this._disabled = false;
317
+ this.addHostClassName();
318
+ this.nativeElement = elementRef.nativeElement;
319
+ }
320
+ /** Whether the tag is selected. */
321
+ get selected() {
322
+ return this._selected;
323
+ }
324
+ set selected(value) {
325
+ const coercedValue = coerceBooleanProperty(value);
326
+ if (coercedValue !== this._selected) {
327
+ this._selected = coercedValue;
328
+ this.dispatchSelectionChange();
329
+ }
330
+ }
331
+ /** The value of the tag. Defaults to the content inside `<mc-tag>` tags. */
332
+ get value() {
333
+ return this._value !== undefined
334
+ ? this._value
335
+ : this.elementRef.nativeElement.textContent;
336
+ }
337
+ set value(value) {
338
+ this._value = value;
339
+ }
340
+ /**
341
+ * Whether or not the tag is selectable. When a tag is not selectable,
342
+ * changes to its selected state are always ignored. By default a tag is
343
+ * selectable, and it becomes non-selectable if its parent tag list is
344
+ * not selectable.
345
+ */
346
+ get selectable() {
347
+ return this._selectable && this.tagListSelectable;
348
+ }
349
+ set selectable(value) {
350
+ this._selectable = coerceBooleanProperty(value);
351
+ }
352
+ /**
353
+ * Determines whether or not the tag displays the remove styling and emits (removed) events.
354
+ */
355
+ get removable() {
356
+ return this._removable;
357
+ }
358
+ set removable(value) {
359
+ this._removable = coerceBooleanProperty(value);
360
+ }
361
+ get tabindex() {
362
+ if (!this.selectable) {
363
+ return null;
364
+ }
365
+ return this.disabled ? null : -1;
366
+ }
367
+ get disabled() {
368
+ return this._disabled;
369
+ }
370
+ set disabled(value) {
371
+ if (value !== this.disabled) {
372
+ this._disabled = value;
373
+ }
374
+ }
375
+ ngAfterContentInit() {
376
+ this.addClassModificatorForIcons();
377
+ }
378
+ addClassModificatorForIcons() {
379
+ const icons = this.contentChildren.map((item) => item._elementRef.nativeElement);
380
+ if (icons.length === 1) {
381
+ const iconElement = icons[0];
382
+ if (!iconElement.previousElementSibling && !iconElement.nextElementSibling) {
383
+ if (iconElement.nextSibling) {
384
+ iconElement.classList.add('mc-icon_left');
385
+ this.nativeElement.classList.add('mc-left-icon');
386
+ }
387
+ if (iconElement.previousSibling) {
388
+ iconElement.classList.add('mc-icon_right');
389
+ this.nativeElement.classList.add('mc-right-icon');
390
+ }
391
+ }
392
+ }
393
+ else if (icons.length > 1) {
394
+ const firstIconElement = icons[0];
395
+ const secondIconElement = icons[1];
396
+ firstIconElement.classList.add('mc-icon_left');
397
+ secondIconElement.classList.add('mc-icon_right');
398
+ }
399
+ }
400
+ addHostClassName() {
401
+ // Add class for the different tags
402
+ for (const attr of TAG_ATTRIBUTE_NAMES) {
403
+ if (this.elementRef.nativeElement.hasAttribute(attr) ||
404
+ this.elementRef.nativeElement.tagName.toLowerCase() === attr) {
405
+ this.elementRef.nativeElement.classList.add(attr);
406
+ return;
407
+ }
408
+ }
409
+ this.elementRef.nativeElement.classList.add('mc-standard-tag');
410
+ }
411
+ ngOnDestroy() {
412
+ this.destroyed.emit({ tag: this });
413
+ }
414
+ select() {
415
+ if (!this._selected) {
416
+ this._selected = true;
417
+ this.dispatchSelectionChange();
418
+ }
419
+ }
420
+ deselect() {
421
+ if (this._selected) {
422
+ this._selected = false;
423
+ this.dispatchSelectionChange();
424
+ }
425
+ }
426
+ selectViaInteraction() {
427
+ if (!this._selected) {
428
+ this._selected = true;
429
+ this.dispatchSelectionChange(true);
430
+ }
431
+ }
432
+ toggleSelected(isUserInput = false) {
433
+ this._selected = !this.selected;
434
+ this.dispatchSelectionChange(isUserInput);
435
+ return this.selected;
436
+ }
437
+ /** Allows for programmatic focusing of the tag. */
438
+ focus() {
439
+ if (!this.selectable) {
440
+ return;
441
+ }
442
+ if (!this.hasFocus) {
443
+ this.elementRef.nativeElement.focus();
444
+ this.onFocus.next({ tag: this });
445
+ Promise.resolve().then(() => {
446
+ this.hasFocus = true;
447
+ this.changeDetectorRef.markForCheck();
448
+ });
449
+ }
450
+ }
451
+ /**
452
+ * Allows for programmatic removal of the tag. Called by the McTagList when the DELETE or
453
+ * BACKSPACE keys are pressed.
454
+ *
455
+ * Informs any listeners of the removal request. Does not remove the tag from the DOM.
456
+ */
457
+ remove() {
458
+ if (this.removable) {
459
+ this.removed.emit({ tag: this });
460
+ }
461
+ }
462
+ handleClick(event) {
463
+ if (this.disabled) {
464
+ event.preventDefault();
465
+ }
466
+ else {
467
+ event.stopPropagation();
468
+ }
469
+ }
470
+ handleKeydown(event) {
471
+ if (this.disabled) {
472
+ return;
473
+ }
474
+ // tslint:disable-next-line: deprecation
475
+ switch (event.keyCode) {
476
+ case DELETE:
477
+ case BACKSPACE:
478
+ // If we are removable, remove the focused tag
479
+ this.remove();
480
+ // Always prevent so page navigation does not occur
481
+ event.preventDefault();
482
+ break;
483
+ case SPACE:
484
+ // If we are selectable, toggle the focused tag
485
+ if (this.selectable) {
486
+ this.toggleSelected(true);
487
+ }
488
+ // Always prevent space from scrolling the page since the list has focus
489
+ event.preventDefault();
490
+ break;
491
+ default:
492
+ }
493
+ }
494
+ blur() {
495
+ // When animations are enabled, Angular may end up removing the tag from the DOM a little
496
+ // earlier than usual, causing it to be blurred and throwing off the logic in the tag list
497
+ // that moves focus not the next item. To work around the issue, we defer marking the tag
498
+ // as not focused until the next time the zone stabilizes.
499
+ this._ngZone.onStable
500
+ .asObservable()
501
+ .pipe(take(1))
502
+ .subscribe(() => {
503
+ this._ngZone.run(() => {
504
+ this.hasFocus = false;
505
+ this.onBlur.next({ tag: this });
506
+ });
507
+ });
508
+ }
509
+ dispatchSelectionChange(isUserInput = false) {
510
+ this.selectionChange.emit({
511
+ source: this,
512
+ isUserInput,
513
+ selected: this._selected
514
+ });
515
+ }
516
+ }
517
+ /** @nocollapse */ /** @nocollapse */ McTag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTag, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
518
+ /** @nocollapse */ /** @nocollapse */ McTag.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTag, selector: "mc-tag, [mc-tag], mc-basic-tag, [mc-basic-tag]", inputs: { color: "color", selected: "selected", value: "value", selectable: "selectable", removable: "removable", disabled: "disabled" }, outputs: { selectionChange: "selectionChange", destroyed: "destroyed", removed: "removed" }, host: { listeners: { "click": "handleClick($event)", "keydown": "handleKeydown($event)", "focus": "focus()", "blur": "blur()" }, properties: { "attr.tabindex": "tabindex", "attr.disabled": "disabled || null", "class.mc-selected": "selected", "class.mc-focused": "hasFocus", "class.mc-tag-with-avatar": "avatar", "class.mc-tag-with-icon": "contentChildren", "class.mc-tag-with-trailing-icon": "trailingIcon || removeIcon", "class.mc-disabled": "disabled" }, classAttribute: "mc-tag" }, queries: [{ propertyName: "avatar", first: true, predicate: McTagAvatar, descendants: true }, { propertyName: "trailingIcon", first: true, predicate: McTagTrailingIcon, descendants: true }, { propertyName: "removeIcon", first: true, predicate: i0.forwardRef(function () { return McTagRemove; }), descendants: true }, { propertyName: "contentChildren", predicate: McIcon }], exportAs: ["mcTag"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-tag__wrapper\">\n <span class=\"mc-tag__text\"><ng-content></ng-content></span>\n <ng-content select=\"[mc-icon]\"></ng-content>\n <div class=\"mc-tag-overlay\"></div>\n</div>\n", styles: [".mc-tag{position:relative;display:inline-block;overflow:hidden;margin:2px;margin:var(--mc-tags-size-margin, 2px);height:24px;height:var(--mc-tags-size-height, 24px);border-width:1px;border-width:var(--mc-tags-size-border-width, 1px);border-style:solid;border-radius:4px;border-radius:var(--mc-tags-size-border-radius, 4px);cursor:default;outline:none;box-sizing:border-box}.mc-tag.mc-left-icon{padding-left:3px;padding-left:var(--mc-tags-size-icon-padding, 3px)}.mc-tag.mc-right-icon{padding-right:3px;padding-right:var(--mc-tags-size-icon-padding, 3px)}.mc-tag .mc-tag__text{margin-left:7px;margin-left:calc(var(--mc-tags-size-text-margin, 8px) - var(--mc-tags-size-border-width, 1px));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mc-tag:not(.mc-tag-with-icon) .mc-tag__text{margin-right:7px;margin-right:calc(var(--mc-tags-size-text-margin, 8px) - var(--mc-tags-size-border-width, 1px))}.mc-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}.mc-tag__wrapper .mc-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;width:var(--mc-tags-size-height, 24px);height:24px;height:var(--mc-tags-size-height, 24px)}.mc-tag__wrapper .mc-icon_left{margin-right:3px;margin-right:var(--mc-tags-size-icon-padding, 3px)}.mc-tag__wrapper .mc-icon_right{margin-left:3px;margin-left:var(--mc-tags-size-icon-padding, 3px)}.mc-tag-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;pointer-events:none;border-radius:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTag, decorators: [{
520
+ type: Component,
521
+ args: [{ selector: 'mc-tag, [mc-tag], mc-basic-tag, [mc-basic-tag]', exportAs: 'mcTag', inputs: ['color'], host: {
522
+ class: 'mc-tag',
523
+ '[attr.tabindex]': 'tabindex',
524
+ '[attr.disabled]': 'disabled || null',
525
+ '[class.mc-selected]': 'selected',
526
+ '[class.mc-focused]': 'hasFocus',
527
+ '[class.mc-tag-with-avatar]': 'avatar',
528
+ '[class.mc-tag-with-icon]': 'contentChildren',
529
+ '[class.mc-tag-with-trailing-icon]': 'trailingIcon || removeIcon',
530
+ '[class.mc-disabled]': 'disabled',
531
+ '(click)': 'handleClick($event)',
532
+ '(keydown)': 'handleKeydown($event)',
533
+ '(focus)': 'focus()',
534
+ '(blur)': 'blur()'
535
+ }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"mc-tag__wrapper\">\n <span class=\"mc-tag__text\"><ng-content></ng-content></span>\n <ng-content select=\"[mc-icon]\"></ng-content>\n <div class=\"mc-tag-overlay\"></div>\n</div>\n", styles: [".mc-tag{position:relative;display:inline-block;overflow:hidden;margin:2px;margin:var(--mc-tags-size-margin, 2px);height:24px;height:var(--mc-tags-size-height, 24px);border-width:1px;border-width:var(--mc-tags-size-border-width, 1px);border-style:solid;border-radius:4px;border-radius:var(--mc-tags-size-border-radius, 4px);cursor:default;outline:none;box-sizing:border-box}.mc-tag.mc-left-icon{padding-left:3px;padding-left:var(--mc-tags-size-icon-padding, 3px)}.mc-tag.mc-right-icon{padding-right:3px;padding-right:var(--mc-tags-size-icon-padding, 3px)}.mc-tag .mc-tag__text{margin-left:7px;margin-left:calc(var(--mc-tags-size-text-margin, 8px) - var(--mc-tags-size-border-width, 1px));text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mc-tag:not(.mc-tag-with-icon) .mc-tag__text{margin-right:7px;margin-right:calc(var(--mc-tags-size-text-margin, 8px) - var(--mc-tags-size-border-width, 1px))}.mc-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}.mc-tag__wrapper .mc-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;width:var(--mc-tags-size-height, 24px);height:24px;height:var(--mc-tags-size-height, 24px)}.mc-tag__wrapper .mc-icon_left{margin-right:3px;margin-right:var(--mc-tags-size-icon-padding, 3px)}.mc-tag__wrapper .mc-icon_right{margin-left:3px;margin-left:var(--mc-tags-size-icon-padding, 3px)}.mc-tag-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;pointer-events:none;border-radius:inherit}\n"] }]
536
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { contentChildren: [{
537
+ type: ContentChildren,
538
+ args: [McIcon]
539
+ }], avatar: [{
540
+ type: ContentChild,
541
+ args: [McTagAvatar, { static: false }]
542
+ }], trailingIcon: [{
543
+ type: ContentChild,
544
+ args: [McTagTrailingIcon, { static: false }]
545
+ }], removeIcon: [{
546
+ type: ContentChild,
547
+ args: [forwardRef(() => McTagRemove), { static: false }]
548
+ }], selectionChange: [{
549
+ type: Output
550
+ }], destroyed: [{
551
+ type: Output
552
+ }], removed: [{
553
+ type: Output
554
+ }], selected: [{
555
+ type: Input
556
+ }], value: [{
557
+ type: Input
558
+ }], selectable: [{
559
+ type: Input
560
+ }], removable: [{
561
+ type: Input
562
+ }], disabled: [{
563
+ type: Input
564
+ }] } });
565
+ /**
566
+ *
567
+ * Example:
568
+ *
569
+ * `<mc-tag>
570
+ * <mc-icon mcTagRemove>cancel</mc-icon>
571
+ * </mc-tag>`
572
+ *
573
+ * You *may* use a custom icon, but you may need to override the `mc-tag-remove` positioning
574
+ * styles to properly center the icon within the tag.
575
+ */
576
+ class McTagRemove {
577
+ constructor(parentTag) {
578
+ this.parentTag = parentTag;
579
+ }
580
+ focus($event) {
581
+ $event.stopPropagation();
582
+ }
583
+ /** Calls the parent tag's public `remove()` method if applicable. */
584
+ handleClick(event) {
585
+ if (this.parentTag.removable) {
586
+ this.parentTag.hasFocus = true;
587
+ this.parentTag.remove();
588
+ }
589
+ // We need to stop event propagation because otherwise the event will bubble up to the
590
+ // form field and cause the `onContainerClick` method to be invoked. This method would then
591
+ // reset the focused tag that has been focused after tag removal. Usually the parent
592
+ // the parent click listener of the `McTag` would prevent propagation, but it can happen
593
+ // that the tag is being removed before the event bubbles up.
594
+ event.stopPropagation();
595
+ }
596
+ }
597
+ /** @nocollapse */ /** @nocollapse */ McTagRemove.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagRemove, deps: [{ token: McTag }], target: i0.ɵɵFactoryTarget.Directive });
598
+ /** @nocollapse */ /** @nocollapse */ McTagRemove.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McTagRemove, selector: "[mcTagRemove]", host: { listeners: { "click": "handleClick($event)", "focus": "focus($event)" }, properties: { "attr.tabindex": "-1" }, classAttribute: "mc-tag-remove mc-tag-trailing-icon" }, ngImport: i0 });
599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagRemove, decorators: [{
600
+ type: Directive,
601
+ args: [{
602
+ selector: '[mcTagRemove]',
603
+ host: {
604
+ class: 'mc-tag-remove mc-tag-trailing-icon',
605
+ '[attr.tabindex]': '-1',
606
+ '(click)': 'handleClick($event)',
607
+ '(focus)': 'focus($event)'
608
+ }
609
+ }]
610
+ }], ctorParameters: function () { return [{ type: McTag }]; } });
611
+
612
+ class McTagListBase {
613
+ constructor(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl) {
614
+ this.defaultErrorStateMatcher = defaultErrorStateMatcher;
615
+ this.parentForm = parentForm;
616
+ this.parentFormGroup = parentFormGroup;
617
+ this.ngControl = ngControl;
618
+ }
619
+ }
620
+ // tslint:disable-next-line:naming-convention
621
+ const McTagListMixinBase = mixinErrorState(McTagListBase);
622
+ // Increasing integer for generating unique ids for tag-list components.
623
+ let nextUniqueId = 0;
624
+ /** Change event object that is emitted when the tag list value has changed. */
625
+ class McTagListChange {
626
+ constructor(source, value) {
627
+ this.source = source;
628
+ this.value = value;
629
+ }
630
+ }
631
+ class McTagList extends McTagListMixinBase {
632
+ constructor(elementRef, changeDetectorRef, defaultErrorStateMatcher, rawValidators, mcValidation, dir, parentForm, parentFormGroup, ngControl, ngModel, formControlName) {
633
+ super(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
634
+ this.elementRef = elementRef;
635
+ this.changeDetectorRef = changeDetectorRef;
636
+ this.rawValidators = rawValidators;
637
+ this.mcValidation = mcValidation;
638
+ this.dir = dir;
639
+ this.ngModel = ngModel;
640
+ this.formControlName = formControlName;
641
+ this.controlType = 'tag-list';
642
+ this._tabIndex = 0;
643
+ /**
644
+ * Event that emits whenever the raw value of the tag-list changes. This is here primarily
645
+ * to facilitate the two-way binding for the `value` input.
646
+ * @docs-private
647
+ */
648
+ this.valueChange = new EventEmitter();
649
+ this.uid = `mc-tag-list-${nextUniqueId++}`;
650
+ /**
651
+ * User defined tab index.
652
+ * When it is not null, use user defined tab index. Otherwise use tabIndex
653
+ */
654
+ this.userTabIndex = null;
655
+ this.tagChanges = new EventEmitter();
656
+ /** Orientation of the tag list. */
657
+ this.orientation = 'horizontal';
658
+ /** Event emitted when the selected tag list value has been changed by the user. */
659
+ this.change = new EventEmitter();
660
+ this._required = false;
661
+ this._disabled = false;
662
+ this._selectable = true;
663
+ this._multiple = false;
664
+ /**
665
+ * When a tag is destroyed, we store the index of the destroyed tag until the tags
666
+ * query list notifies about the update. This is necessary because we cannot determine an
667
+ * appropriate tag that should receive focus until the array of tags updated completely.
668
+ */
669
+ this.lastDestroyedTagIndex = null;
670
+ /** Subject that emits when the component has been destroyed. */
671
+ this.destroyed = new Subject();
672
+ // tslint:disable-next-line:no-empty
673
+ this.onTouched = () => { };
674
+ // tslint:disable-next-line:no-empty
675
+ this.onChange = () => { };
676
+ this._compareWith = (o1, o2) => o1 === o2;
677
+ if (this.ngControl) {
678
+ this.ngControl.valueAccessor = this;
679
+ }
680
+ }
681
+ /** Combined stream of all of the child tags' selection change events. */
682
+ get tagSelectionChanges() {
683
+ return merge(...this.tags.map((tag) => tag.selectionChange));
684
+ }
685
+ /** Combined stream of all of the child tags' focus change events. */
686
+ get tagFocusChanges() {
687
+ return merge(...this.tags.map((tag) => tag.onFocus));
688
+ }
689
+ /** Combined stream of all of the child tags' blur change events. */
690
+ get tagBlurChanges() {
691
+ return merge(...this.tags.map((tag) => tag.onBlur));
692
+ }
693
+ /** Combined stream of all of the child tags' remove change events. */
694
+ get tagRemoveChanges() {
695
+ return merge(...this.tags.map((tag) => tag.destroyed));
696
+ }
697
+ /** The array of selected tags inside tag list. */
698
+ get selected() {
699
+ return this.multiple ? this.selectionModel.selected : this.selectionModel.selected[0];
700
+ }
701
+ get canShowCleaner() {
702
+ return this.cleaner && this.tags.length > 0;
703
+ }
704
+ /** Whether the user should be allowed to select multiple tags. */
705
+ get multiple() {
706
+ return this._multiple;
707
+ }
708
+ set multiple(value) {
709
+ this._multiple = coerceBooleanProperty(value);
710
+ }
711
+ /**
712
+ * A function to compare the option values with the selected values. The first argument
713
+ * is a value from an option. The second is a value from the selection. A boolean
714
+ * should be returned.
715
+ */
716
+ get compareWith() {
717
+ return this._compareWith;
718
+ }
719
+ set compareWith(fn) {
720
+ this._compareWith = fn;
721
+ if (this.selectionModel) {
722
+ // A different comparator means the selection could change.
723
+ this.initializeSelection();
724
+ }
725
+ }
726
+ /**
727
+ * Implemented as part of McFormFieldControl.
728
+ * @docs-private
729
+ */
730
+ get value() {
731
+ return this._value;
732
+ }
733
+ set value(value) {
734
+ this.writeValue(value);
735
+ this._value = value;
736
+ }
737
+ /**
738
+ * Implemented as part of McFormFieldControl.
739
+ * @docs-private
740
+ */
741
+ get id() {
742
+ return this.tagInput ? this.tagInput.id : this.uid;
743
+ }
744
+ /**
745
+ * Implemented as part of McFormFieldControl.
746
+ * @docs-private
747
+ */
748
+ get required() {
749
+ return this._required;
750
+ }
751
+ set required(value) {
752
+ this._required = coerceBooleanProperty(value);
753
+ this.stateChanges.next();
754
+ }
755
+ /**
756
+ * Implemented as part of McFormFieldControl.
757
+ * @docs-private
758
+ */
759
+ get placeholder() {
760
+ return this.tagInput ? this.tagInput.placeholder : this._placeholder;
761
+ }
762
+ set placeholder(value) {
763
+ this._placeholder = value;
764
+ this.stateChanges.next();
765
+ }
766
+ /** Whether any tags or the mcTagInput inside of this tag-list has focus. */
767
+ get focused() {
768
+ return (this.tagInput && this.tagInput.focused) || this.hasFocusedTag();
769
+ }
770
+ /**
771
+ * Implemented as part of McFormFieldControl.
772
+ * @docs-private
773
+ */
774
+ get empty() {
775
+ return (!this.tagInput || this.tagInput.empty) && this.tags.length === 0;
776
+ }
777
+ /**
778
+ * Implemented as part of McFormFieldControl.
779
+ * @docs-private
780
+ */
781
+ get shouldLabelFloat() {
782
+ return !this.empty || this.focused;
783
+ }
784
+ /**
785
+ * Implemented as part of McFormFieldControl.
786
+ * @docs-private
787
+ */
788
+ get disabled() {
789
+ return this.ngControl ? !!this.ngControl.disabled : this._disabled;
790
+ }
791
+ set disabled(value) {
792
+ this._disabled = coerceBooleanProperty(value);
793
+ this.syncTagsDisabledState();
794
+ }
795
+ /**
796
+ * Whether or not this tag list is selectable. When a tag list is not selectable,
797
+ * the selected states for all the tags inside the tag list are always ignored.
798
+ */
799
+ get selectable() {
800
+ return this._selectable;
801
+ }
802
+ set selectable(value) {
803
+ this._selectable = coerceBooleanProperty(value);
804
+ if (this.tags) {
805
+ this.tags.forEach((tag) => tag.tagListSelectable = this._selectable);
806
+ }
807
+ }
808
+ get tabIndex() {
809
+ return this._tabIndex;
810
+ }
811
+ set tabIndex(value) {
812
+ this.userTabIndex = value;
813
+ this._tabIndex = value;
814
+ }
815
+ ngAfterContentInit() {
816
+ if (this.mcValidation.useValidation) {
817
+ setMosaicValidation(this);
818
+ }
819
+ this.keyManager = new FocusKeyManager(this.tags)
820
+ .withVerticalOrientation()
821
+ .withHorizontalOrientation(this.dir ? this.dir.value : 'ltr');
822
+ if (this.dir) {
823
+ this.dir.change
824
+ .pipe(takeUntil(this.destroyed))
825
+ .subscribe((dir) => this.keyManager.withHorizontalOrientation(dir));
826
+ }
827
+ // Prevents the tag list from capturing focus and redirecting
828
+ // it back to the first tag when the user tabs out.
829
+ this.keyManager.tabOut
830
+ .pipe(takeUntil(this.destroyed))
831
+ .subscribe(() => {
832
+ this._tabIndex = -1;
833
+ setTimeout(() => {
834
+ this._tabIndex = this.userTabIndex || 0;
835
+ this.changeDetectorRef.markForCheck();
836
+ });
837
+ });
838
+ // When the list changes, re-subscribe
839
+ this.tags.changes
840
+ .pipe(startWith(null), takeUntil(this.destroyed))
841
+ .subscribe(() => {
842
+ if (this.disabled) {
843
+ // Since this happens after the content has been
844
+ // checked, we need to defer it to the next tick.
845
+ Promise.resolve().then(() => { this.syncTagsDisabledState(); });
846
+ }
847
+ this.resetTags();
848
+ // Reset tags selected/deselected status
849
+ this.initializeSelection();
850
+ // Check to see if we need to update our tab index
851
+ this.updateTabIndex();
852
+ // Check to see if we have a destroyed tag and need to refocus
853
+ this.updateFocusForDestroyedTags();
854
+ // Defer setting the value in order to avoid the "Expression
855
+ // has changed after it was checked" errors from Angular.
856
+ Promise.resolve().then(() => {
857
+ this.tagChanges.emit(this.tags.toArray());
858
+ this.stateChanges.next();
859
+ this.propagateTagsChanges();
860
+ });
861
+ });
862
+ }
863
+ ngOnInit() {
864
+ this.selectionModel = new SelectionModel(this.multiple, undefined, false);
865
+ this.stateChanges.next();
866
+ }
867
+ ngDoCheck() {
868
+ if (this.ngControl) {
869
+ // We need to re-evaluate this on every change detection cycle, because there are some
870
+ // error triggers that we can't subscribe to (e.g. parent form submissions). This means
871
+ // that whatever logic is in here has to be super lean or we risk destroying the performance.
872
+ this.updateErrorState();
873
+ }
874
+ }
875
+ ngOnDestroy() {
876
+ this.destroyed.next();
877
+ this.destroyed.complete();
878
+ this.stateChanges.complete();
879
+ this.dropSubscriptions();
880
+ }
881
+ /** Associates an HTML input element with this tag list. */
882
+ registerInput(inputElement) {
883
+ var _a;
884
+ this.tagInput = inputElement;
885
+ // todo need rethink about it
886
+ if (this.ngControl && ((_a = inputElement.ngControl) === null || _a === void 0 ? void 0 : _a.statusChanges)) {
887
+ inputElement.ngControl.statusChanges
888
+ .subscribe(() => this.ngControl.control.setErrors(inputElement.ngControl.errors));
889
+ }
890
+ }
891
+ // Implemented as part of ControlValueAccessor.
892
+ writeValue(value) {
893
+ if (this.tags) {
894
+ this.setSelectionByValue(value, false);
895
+ }
896
+ }
897
+ // Implemented as part of ControlValueAccessor.
898
+ registerOnChange(fn) {
899
+ this.onChange = fn;
900
+ }
901
+ // Implemented as part of ControlValueAccessor.
902
+ registerOnTouched(fn) {
903
+ this.onTouched = fn;
904
+ }
905
+ // Implemented as part of ControlValueAccessor.
906
+ setDisabledState(isDisabled) {
907
+ this.disabled = isDisabled;
908
+ this.stateChanges.next();
909
+ }
910
+ /**
911
+ * Implemented as part of McFormFieldControl.
912
+ * @docs-private
913
+ */
914
+ onContainerClick(event) {
915
+ if (!this.originatesFromTag(event)) {
916
+ this.focus();
917
+ }
918
+ }
919
+ /**
920
+ * Focuses the first non-disabled tag in this tag list, or the associated input when there
921
+ * are no eligible tags.
922
+ */
923
+ focus() {
924
+ if (this.disabled) {
925
+ return;
926
+ }
927
+ // TODO: ARIA says this should focus the first `selected` tag if any are selected.
928
+ // Focus on first element if there's no tagInput inside tag-list
929
+ if (this.tagInput && this.tagInput.focused) {
930
+ // do nothing
931
+ }
932
+ else if (this.tags.length > 0) {
933
+ this.keyManager.setFirstItemActive();
934
+ this.stateChanges.next();
935
+ }
936
+ else {
937
+ this.focusInput();
938
+ this.stateChanges.next();
939
+ }
940
+ }
941
+ /** Attempt to focus an input if we have one. */
942
+ focusInput() {
943
+ if (this.tagInput) {
944
+ this.tagInput.focus();
945
+ }
946
+ }
947
+ /**
948
+ * Pass events to the keyboard manager. Available here for tests.
949
+ */
950
+ keydown(event) {
951
+ const target = event.target;
952
+ // If they are on an empty input and hit backspace, focus the last tag
953
+ // tslint:disable-next-line: deprecation
954
+ if (event.keyCode === BACKSPACE && this.isInputEmpty(target)) {
955
+ this.keyManager.setLastItemActive();
956
+ event.preventDefault();
957
+ }
958
+ else if (target && target.classList.contains('mc-tag')) {
959
+ // tslint:disable-next-line: deprecation
960
+ if (event.keyCode === HOME) {
961
+ this.keyManager.setFirstItemActive();
962
+ event.preventDefault();
963
+ // tslint:disable-next-line: deprecation
964
+ }
965
+ else if (event.keyCode === END) {
966
+ this.keyManager.setLastItemActive();
967
+ event.preventDefault();
968
+ }
969
+ else {
970
+ this.keyManager.onKeydown(event);
971
+ }
972
+ this.stateChanges.next();
973
+ }
974
+ }
975
+ setSelectionByValue(value, isUserInput = true) {
976
+ this.clearSelection();
977
+ this.tags.forEach((tag) => tag.deselect());
978
+ if (Array.isArray(value)) {
979
+ value.forEach((currentValue) => this.selectValue(currentValue, isUserInput));
980
+ this.sortValues();
981
+ }
982
+ else {
983
+ const correspondingTag = this.selectValue(value, isUserInput);
984
+ // Shift focus to the active item. Note that we shouldn't do this in multiple
985
+ // mode, because we don't know what tag the user interacted with last.
986
+ if (correspondingTag && isUserInput) {
987
+ this.keyManager.setActiveItem(correspondingTag);
988
+ }
989
+ }
990
+ }
991
+ /** When blurred, mark the field as touched when focus moved outside the tag list. */
992
+ blur() {
993
+ if (!this.hasFocusedTag()) {
994
+ this.keyManager.setActiveItem(-1);
995
+ }
996
+ if (!this.disabled) {
997
+ if (this.tagInput) {
998
+ // If there's a tag input, we should check whether the focus moved to tag input.
999
+ // If the focus is not moved to tag input, mark the field as touched. If the focus moved
1000
+ // to tag input, do nothing.
1001
+ // Timeout is needed to wait for the focus() event trigger on tag input.
1002
+ setTimeout(() => {
1003
+ if (!this.focused) {
1004
+ this.markAsTouched();
1005
+ }
1006
+ });
1007
+ }
1008
+ else {
1009
+ // If there's no tag input, then mark the field as touched.
1010
+ this.markAsTouched();
1011
+ }
1012
+ }
1013
+ }
1014
+ /** Mark the field as touched */
1015
+ markAsTouched() {
1016
+ this.onTouched();
1017
+ this.changeDetectorRef.markForCheck();
1018
+ this.stateChanges.next();
1019
+ }
1020
+ /**
1021
+ * Check the tab index as you should not be allowed to focus an empty list.
1022
+ */
1023
+ updateTabIndex() {
1024
+ // If we have 0 tags, we should not allow keyboard focus
1025
+ this._tabIndex = this.userTabIndex || (this.tags.length === 0 ? -1 : 0);
1026
+ }
1027
+ /**
1028
+ * If the amount of tags changed, we need to update the
1029
+ * key manager state and focus the next closest tag.
1030
+ */
1031
+ updateFocusForDestroyedTags() {
1032
+ if (this.lastDestroyedTagIndex != null) {
1033
+ if (this.tags.length) {
1034
+ const newTagIndex = Math.min(this.lastDestroyedTagIndex, this.tags.length - 1);
1035
+ this.keyManager.setActiveItem(newTagIndex);
1036
+ }
1037
+ else {
1038
+ this.focusInput();
1039
+ }
1040
+ }
1041
+ this.lastDestroyedTagIndex = null;
1042
+ }
1043
+ /**
1044
+ * Utility to ensure all indexes are valid.
1045
+ *
1046
+ * @param index The index to be checked.
1047
+ * @returns True if the index is valid for our list of tags.
1048
+ */
1049
+ isValidIndex(index) {
1050
+ return index >= 0 && index < this.tags.length;
1051
+ }
1052
+ isInputEmpty(element) {
1053
+ if (element && element.nodeName.toLowerCase() === 'input') {
1054
+ const input = element;
1055
+ return !input.value;
1056
+ }
1057
+ return false;
1058
+ }
1059
+ /**
1060
+ * Finds and selects the tag based on its value.
1061
+ * @returns Tag that has the corresponding value.
1062
+ */
1063
+ selectValue(value, isUserInput = true) {
1064
+ const correspondingTag = this.tags.find((tag) => {
1065
+ return tag.value != null && this._compareWith(tag.value, value);
1066
+ });
1067
+ if (correspondingTag) {
1068
+ if (isUserInput) {
1069
+ correspondingTag.selectViaInteraction();
1070
+ }
1071
+ else {
1072
+ correspondingTag.select();
1073
+ }
1074
+ this.selectionModel.select(correspondingTag);
1075
+ }
1076
+ return correspondingTag;
1077
+ }
1078
+ initializeSelection() {
1079
+ // Defer setting the value in order to avoid the "Expression
1080
+ // has changed after it was checked" errors from Angular.
1081
+ Promise.resolve().then(() => {
1082
+ if (this.ngControl || this._value) {
1083
+ this.setSelectionByValue(this.ngControl ? this.ngControl.value : this._value, false);
1084
+ this.stateChanges.next();
1085
+ }
1086
+ });
1087
+ }
1088
+ /**
1089
+ * Deselects every tag in the list.
1090
+ * @param skip Tag that should not be deselected.
1091
+ */
1092
+ clearSelection(skip) {
1093
+ this.selectionModel.clear();
1094
+ this.tags.forEach((tag) => {
1095
+ if (tag !== skip) {
1096
+ tag.deselect();
1097
+ }
1098
+ });
1099
+ this.stateChanges.next();
1100
+ }
1101
+ /**
1102
+ * Sorts the model values, ensuring that they keep the same
1103
+ * order that they have in the panel.
1104
+ */
1105
+ sortValues() {
1106
+ if (this._multiple) {
1107
+ this.selectionModel.clear();
1108
+ this.tags.forEach((tag) => {
1109
+ if (tag.selected) {
1110
+ this.selectionModel.select(tag);
1111
+ }
1112
+ });
1113
+ this.stateChanges.next();
1114
+ }
1115
+ }
1116
+ /** Emits change event to set the model value. */
1117
+ // todo need rethink this method and selection logic
1118
+ propagateChanges(fallbackValue) {
1119
+ let valueToEmit = null;
1120
+ if (Array.isArray(this.selected)) {
1121
+ valueToEmit = this.selected.map((tag) => tag.value);
1122
+ }
1123
+ else {
1124
+ valueToEmit = this.selected ? this.selected.value : fallbackValue;
1125
+ }
1126
+ this._value = valueToEmit;
1127
+ this.change.emit(new McTagListChange(this, valueToEmit));
1128
+ this.valueChange.emit(valueToEmit);
1129
+ this.onChange(valueToEmit);
1130
+ this.changeDetectorRef.markForCheck();
1131
+ }
1132
+ propagateTagsChanges() {
1133
+ const valueToEmit = this.tags.map((tag) => tag.value);
1134
+ this._value = valueToEmit;
1135
+ this.change.emit(new McTagListChange(this, valueToEmit));
1136
+ this.valueChange.emit(valueToEmit);
1137
+ this.onChange(valueToEmit);
1138
+ this.changeDetectorRef.markForCheck();
1139
+ }
1140
+ resetTags() {
1141
+ this.dropSubscriptions();
1142
+ this.listenToTagsFocus();
1143
+ this.listenToTagsSelection();
1144
+ this.listenToTagsRemoved();
1145
+ }
1146
+ dropSubscriptions() {
1147
+ if (this.tagFocusSubscription) {
1148
+ this.tagFocusSubscription.unsubscribe();
1149
+ this.tagFocusSubscription = null;
1150
+ }
1151
+ if (this.tagBlurSubscription) {
1152
+ this.tagBlurSubscription.unsubscribe();
1153
+ this.tagBlurSubscription = null;
1154
+ }
1155
+ if (this.tagSelectionSubscription) {
1156
+ this.tagSelectionSubscription.unsubscribe();
1157
+ this.tagSelectionSubscription = null;
1158
+ }
1159
+ if (this.tagRemoveSubscription) {
1160
+ this.tagRemoveSubscription.unsubscribe();
1161
+ this.tagRemoveSubscription = null;
1162
+ }
1163
+ }
1164
+ /** Listens to user-generated selection events on each tag. */
1165
+ listenToTagsSelection() {
1166
+ this.tagSelectionSubscription = this.tagSelectionChanges.subscribe((event) => {
1167
+ if (event.source.selected) {
1168
+ this.selectionModel.select(event.source);
1169
+ }
1170
+ else {
1171
+ this.selectionModel.deselect(event.source);
1172
+ }
1173
+ // For single selection tag list, make sure the deselected value is unselected.
1174
+ if (!this.multiple) {
1175
+ this.tags.forEach((tag) => {
1176
+ if (!this.selectionModel.isSelected(tag) && tag.selected) {
1177
+ tag.deselect();
1178
+ }
1179
+ });
1180
+ }
1181
+ if (event.isUserInput) {
1182
+ this.propagateChanges();
1183
+ }
1184
+ });
1185
+ }
1186
+ /** Listens to user-generated selection events on each tag. */
1187
+ listenToTagsFocus() {
1188
+ this.tagFocusSubscription = this.tagFocusChanges
1189
+ .subscribe((event) => {
1190
+ const tagIndex = this.tags.toArray().indexOf(event.tag);
1191
+ if (this.isValidIndex(tagIndex)) {
1192
+ this.keyManager.updateActiveItem(tagIndex);
1193
+ }
1194
+ this.stateChanges.next();
1195
+ });
1196
+ this.tagBlurSubscription = this.tagBlurChanges
1197
+ .subscribe(() => {
1198
+ this.blur();
1199
+ this.stateChanges.next();
1200
+ });
1201
+ }
1202
+ listenToTagsRemoved() {
1203
+ this.tagRemoveSubscription = this.tagRemoveChanges
1204
+ .subscribe((event) => {
1205
+ const tag = event.tag;
1206
+ const tagIndex = this.tags.toArray().indexOf(event.tag);
1207
+ // In case the tag that will be removed is currently focused, we temporarily store
1208
+ // the index in order to be able to determine an appropriate sibling tag that will
1209
+ // receive focus.
1210
+ if (this.isValidIndex(tagIndex) && tag.hasFocus) {
1211
+ this.lastDestroyedTagIndex = tagIndex;
1212
+ }
1213
+ });
1214
+ }
1215
+ /** Checks whether an event comes from inside a tag element. */
1216
+ originatesFromTag(event) {
1217
+ let currentElement = event.target;
1218
+ while (currentElement && currentElement !== this.elementRef.nativeElement) {
1219
+ if (currentElement.classList.contains('mc-tag')) {
1220
+ return true;
1221
+ }
1222
+ currentElement = currentElement.parentElement;
1223
+ }
1224
+ return false;
1225
+ }
1226
+ /** Checks whether any of the tags is focused. */
1227
+ hasFocusedTag() {
1228
+ return this.tags.some((tag) => tag.hasFocus);
1229
+ }
1230
+ /** Syncs the list's disabled state with the individual tags. */
1231
+ syncTagsDisabledState() {
1232
+ if (this.tags) {
1233
+ this.tags.forEach((tag) => {
1234
+ tag.disabled = this._disabled;
1235
+ });
1236
+ }
1237
+ }
1238
+ }
1239
+ /** @nocollapse */ /** @nocollapse */ McTagList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagList, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ErrorStateMatcher }, { token: NG_VALIDATORS, optional: true }, { token: MC_VALIDATION, optional: true }, { token: i2.Directionality, optional: true }, { token: i3.NgForm, optional: true }, { token: i3.FormGroupDirective, optional: true }, { token: i3.NgControl, optional: true, self: true }, { token: i3.NgModel, optional: true, self: true }, { token: i3.FormControlName, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1240
+ /** @nocollapse */ /** @nocollapse */ McTagList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McTagList, selector: "mc-tag-list", inputs: { multiple: "multiple", compareWith: "compareWith", value: "value", required: "required", placeholder: "placeholder", disabled: "disabled", selectable: "selectable", tabIndex: "tabIndex", errorStateMatcher: "errorStateMatcher", orientation: "orientation" }, outputs: { valueChange: "valueChange", change: "change" }, host: { listeners: { "focus": "focus()", "blur": "blur()", "keydown": "keydown($event)" }, properties: { "class.mc-disabled": "disabled", "class.mc-invalid": "errorState", "attr.tabindex": "disabled ? null : tabIndex", "id": "uid" }, classAttribute: "mc-tag-list" }, providers: [{ provide: McFormFieldControl, useExisting: McTagList }], queries: [{ propertyName: "cleaner", first: true, predicate: ["mcTagListCleaner"], descendants: true, static: true }, { propertyName: "tags", predicate: McTag, descendants: true }], exportAs: ["mcTagList"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-tags-list__list-container\">\n <ng-content></ng-content>\n</div>\n\n<div class=\"mc-tags-list__cleaner\"\n *ngIf=\"canShowCleaner\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n</div>\n", styles: [".mc-tag-list{display:flex;flex-direction:row;box-sizing:border-box}.mc-tag-input{border:none;outline:none;background:transparent}.mc-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;min-height:30px;min-height:var(--mc-tag-list-size-min-height, 30px);padding:1px 6px;padding:var(--mc-tag-list-size-padding, 1px 6px)}.mc-tags-list__list-container .mc-tag-input{max-width:100%;flex:1 1 auto;height:22px;height:var(--mc-tag-input-size-height, 22px);margin:2px 4px;margin:var(--mc-tag-input-size-margin, 2px 4px)}.mc-tags-list__cleaner .mc-cleaner{height:30px}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagList, decorators: [{
1242
+ type: Component,
1243
+ args: [{ selector: 'mc-tag-list', exportAs: 'mcTagList', host: {
1244
+ class: 'mc-tag-list',
1245
+ '[class.mc-disabled]': 'disabled',
1246
+ '[class.mc-invalid]': 'errorState',
1247
+ '[attr.tabindex]': 'disabled ? null : tabIndex',
1248
+ '[id]': 'uid',
1249
+ '(focus)': 'focus()',
1250
+ '(blur)': 'blur()',
1251
+ '(keydown)': 'keydown($event)'
1252
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: McFormFieldControl, useExisting: McTagList }], template: "<div class=\"mc-tags-list__list-container\">\n <ng-content></ng-content>\n</div>\n\n<div class=\"mc-tags-list__cleaner\"\n *ngIf=\"canShowCleaner\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n</div>\n", styles: [".mc-tag-list{display:flex;flex-direction:row;box-sizing:border-box}.mc-tag-input{border:none;outline:none;background:transparent}.mc-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;min-height:30px;min-height:var(--mc-tag-list-size-min-height, 30px);padding:1px 6px;padding:var(--mc-tag-list-size-padding, 1px 6px)}.mc-tags-list__list-container .mc-tag-input{max-width:100%;flex:1 1 auto;height:22px;height:var(--mc-tag-input-size-height, 22px);margin:2px 4px;margin:var(--mc-tag-input-size-margin, 2px 4px)}.mc-tags-list__cleaner .mc-cleaner{height:30px}\n"] }]
1253
+ }], ctorParameters: function () {
1254
+ return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ErrorStateMatcher }, { type: undefined, decorators: [{
1255
+ type: Optional
1256
+ }, {
1257
+ type: Inject,
1258
+ args: [NG_VALIDATORS]
1259
+ }] }, { type: undefined, decorators: [{
1260
+ type: Optional
1261
+ }, {
1262
+ type: Inject,
1263
+ args: [MC_VALIDATION]
1264
+ }] }, { type: i2.Directionality, decorators: [{
1265
+ type: Optional
1266
+ }] }, { type: i3.NgForm, decorators: [{
1267
+ type: Optional
1268
+ }] }, { type: i3.FormGroupDirective, decorators: [{
1269
+ type: Optional
1270
+ }] }, { type: i3.NgControl, decorators: [{
1271
+ type: Optional
1272
+ }, {
1273
+ type: Self
1274
+ }] }, { type: i3.NgModel, decorators: [{
1275
+ type: Optional
1276
+ }, {
1277
+ type: Self
1278
+ }] }, { type: i3.FormControlName, decorators: [{
1279
+ type: Optional
1280
+ }, {
1281
+ type: Self
1282
+ }] }];
1283
+ }, propDecorators: { multiple: [{
1284
+ type: Input
1285
+ }], compareWith: [{
1286
+ type: Input
1287
+ }], value: [{
1288
+ type: Input
1289
+ }], required: [{
1290
+ type: Input
1291
+ }], placeholder: [{
1292
+ type: Input
1293
+ }], disabled: [{
1294
+ type: Input
1295
+ }], selectable: [{
1296
+ type: Input
1297
+ }], tabIndex: [{
1298
+ type: Input
1299
+ }], valueChange: [{
1300
+ type: Output
1301
+ }], errorStateMatcher: [{
1302
+ type: Input
1303
+ }], orientation: [{
1304
+ type: Input,
1305
+ args: ['orientation']
1306
+ }], change: [{
1307
+ type: Output
1308
+ }], cleaner: [{
1309
+ type: ContentChild,
1310
+ args: ['mcTagListCleaner', { static: true }]
1311
+ }], tags: [{
1312
+ type: ContentChildren,
1313
+ args: [McTag, {
1314
+ // Need to use `descendants: true`,
1315
+ // Ivy will no longer match indirect descendants if it's left as false.
1316
+ descendants: true
1317
+ }]
1318
+ }] } });
1319
+
1320
+ class McTagsModule {
1321
+ }
1322
+ /** @nocollapse */ /** @nocollapse */ McTagsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1323
+ /** @nocollapse */ /** @nocollapse */ McTagsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagsModule, declarations: [McTagList,
1324
+ McTag,
1325
+ McTagInput,
1326
+ McTagTrailingIcon,
1327
+ McTagAvatar,
1328
+ McTagRemove], imports: [CommonModule, PlatformModule], exports: [McTagList,
1329
+ McTag,
1330
+ McTagInput,
1331
+ McTagTrailingIcon,
1332
+ McTagAvatar,
1333
+ McTagRemove] });
1334
+ /** @nocollapse */ /** @nocollapse */ McTagsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagsModule, providers: [{
1335
+ provide: MC_TAGS_DEFAULT_OPTIONS,
1336
+ // tslint:disable-next-line: no-object-literal-type-assertion
1337
+ useValue: { separatorKeyCodes: [ENTER] }
1338
+ }], imports: [[CommonModule, PlatformModule]] });
1339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McTagsModule, decorators: [{
1340
+ type: NgModule,
1341
+ args: [{
1342
+ imports: [CommonModule, PlatformModule],
1343
+ exports: [
1344
+ McTagList,
1345
+ McTag,
1346
+ McTagInput,
1347
+ McTagTrailingIcon,
1348
+ McTagAvatar,
1349
+ McTagRemove
1350
+ ],
1351
+ declarations: [
1352
+ McTagList,
1353
+ McTag,
1354
+ McTagInput,
1355
+ McTagTrailingIcon,
1356
+ McTagAvatar,
1357
+ McTagRemove
1358
+ ],
1359
+ providers: [{
1360
+ provide: MC_TAGS_DEFAULT_OPTIONS,
1361
+ // tslint:disable-next-line: no-object-literal-type-assertion
1362
+ useValue: { separatorKeyCodes: [ENTER] }
1363
+ }]
1364
+ }]
1365
+ }] });
1366
+
1367
+ /**
1368
+ * Generated bundle index. Do not edit.
1369
+ */
1370
+
1371
+ export { MC_TAGS_DEFAULT_OPTIONS, McTag, McTagAvatar, McTagBase, McTagInput, McTagList, McTagListBase, McTagListChange, McTagListMixinBase, McTagMixinBase, McTagRemove, McTagSelectionChange, McTagTrailingIcon, McTagsModule };
1372
+ //# sourceMappingURL=ptsecurity-mosaic-tags.mjs.map