primeng 19.0.9 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/autocomplete/autocomplete.d.ts +1 -1
  2. package/button/button.d.ts +6 -2
  3. package/button/button.interface.d.ts +1 -0
  4. package/chips/chips.d.ts +237 -0
  5. package/chips/chips.interface.d.ts +66 -0
  6. package/chips/index.d.ts +5 -0
  7. package/chips/public_api.d.ts +2 -0
  8. package/chips/style/chipsstyle.d.ts +69 -0
  9. package/colorpicker/colorpicker.d.ts +3 -2
  10. package/confirmdialog/confirmdialog.d.ts +7 -1
  11. package/datepicker/datepicker.d.ts +1 -1
  12. package/fesm2022/primeng-accordion.mjs +25 -25
  13. package/fesm2022/primeng-accordion.mjs.map +1 -1
  14. package/fesm2022/primeng-animateonscroll.mjs +7 -7
  15. package/fesm2022/primeng-api.mjs +31 -31
  16. package/fesm2022/primeng-autocomplete.mjs +34 -21
  17. package/fesm2022/primeng-autocomplete.mjs.map +1 -1
  18. package/fesm2022/primeng-autofocus.mjs +7 -7
  19. package/fesm2022/primeng-avatar.mjs +10 -10
  20. package/fesm2022/primeng-avatargroup.mjs +10 -10
  21. package/fesm2022/primeng-badge.mjs +13 -13
  22. package/fesm2022/primeng-base.mjs +7 -3
  23. package/fesm2022/primeng-base.mjs.map +1 -1
  24. package/fesm2022/primeng-basecomponent.mjs +6 -6
  25. package/fesm2022/primeng-blockui.mjs +10 -10
  26. package/fesm2022/primeng-breadcrumb.mjs +10 -10
  27. package/fesm2022/primeng-button.mjs +58 -25
  28. package/fesm2022/primeng-button.mjs.map +1 -1
  29. package/fesm2022/primeng-buttongroup.mjs +10 -10
  30. package/fesm2022/primeng-calendar.mjs +13 -11
  31. package/fesm2022/primeng-calendar.mjs.map +1 -1
  32. package/fesm2022/primeng-card.mjs +10 -10
  33. package/fesm2022/primeng-carousel.mjs +12 -12
  34. package/fesm2022/primeng-carousel.mjs.map +1 -1
  35. package/fesm2022/primeng-cascadeselect.mjs +17 -13
  36. package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
  37. package/fesm2022/primeng-chart.mjs +10 -10
  38. package/fesm2022/primeng-checkbox.mjs +12 -10
  39. package/fesm2022/primeng-checkbox.mjs.map +1 -1
  40. package/fesm2022/primeng-chip.mjs +10 -10
  41. package/fesm2022/primeng-chips.mjs +930 -0
  42. package/fesm2022/primeng-chips.mjs.map +1 -0
  43. package/fesm2022/primeng-colorpicker.mjs +16 -10
  44. package/fesm2022/primeng-colorpicker.mjs.map +1 -1
  45. package/fesm2022/primeng-config.mjs +6 -6
  46. package/fesm2022/primeng-confirmdialog.mjs +30 -16
  47. package/fesm2022/primeng-confirmdialog.mjs.map +1 -1
  48. package/fesm2022/primeng-confirmpopup.mjs +10 -10
  49. package/fesm2022/primeng-contextmenu.mjs +13 -13
  50. package/fesm2022/primeng-dataview.mjs +13 -10
  51. package/fesm2022/primeng-dataview.mjs.map +1 -1
  52. package/fesm2022/primeng-datepicker.mjs +51 -17
  53. package/fesm2022/primeng-datepicker.mjs.map +1 -1
  54. package/fesm2022/primeng-defer.mjs +7 -7
  55. package/fesm2022/primeng-dialog.mjs +15 -12
  56. package/fesm2022/primeng-dialog.mjs.map +1 -1
  57. package/fesm2022/primeng-divider.mjs +10 -10
  58. package/fesm2022/primeng-dock.mjs +10 -10
  59. package/fesm2022/primeng-dragdrop.mjs +10 -10
  60. package/fesm2022/primeng-drawer.mjs +11 -11
  61. package/fesm2022/primeng-drawer.mjs.map +1 -1
  62. package/fesm2022/primeng-dropdown.mjs +13 -13
  63. package/fesm2022/primeng-dynamicdialog.mjs +16 -16
  64. package/fesm2022/primeng-editor.mjs +10 -10
  65. package/fesm2022/primeng-fieldset.mjs +11 -10
  66. package/fesm2022/primeng-fieldset.mjs.map +1 -1
  67. package/fesm2022/primeng-fileupload.mjs +11 -15
  68. package/fesm2022/primeng-fileupload.mjs.map +1 -1
  69. package/fesm2022/primeng-floatlabel.mjs +10 -10
  70. package/fesm2022/primeng-fluid.mjs +10 -10
  71. package/fesm2022/primeng-focustrap.mjs +7 -7
  72. package/fesm2022/primeng-galleria.mjs +22 -22
  73. package/fesm2022/primeng-iconfield.mjs +10 -10
  74. package/fesm2022/primeng-icons-angledoubledown.mjs +3 -3
  75. package/fesm2022/primeng-icons-angledoubleleft.mjs +3 -3
  76. package/fesm2022/primeng-icons-angledoubleright.mjs +3 -3
  77. package/fesm2022/primeng-icons-angledoubleup.mjs +3 -3
  78. package/fesm2022/primeng-icons-angledown.mjs +3 -3
  79. package/fesm2022/primeng-icons-angleleft.mjs +3 -3
  80. package/fesm2022/primeng-icons-angleright.mjs +3 -3
  81. package/fesm2022/primeng-icons-angleup.mjs +3 -3
  82. package/fesm2022/primeng-icons-arrowdown.mjs +3 -3
  83. package/fesm2022/primeng-icons-arrowdownleft.mjs +3 -3
  84. package/fesm2022/primeng-icons-arrowdownright.mjs +3 -3
  85. package/fesm2022/primeng-icons-arrowleft.mjs +3 -3
  86. package/fesm2022/primeng-icons-arrowright.mjs +3 -3
  87. package/fesm2022/primeng-icons-arrowup.mjs +3 -3
  88. package/fesm2022/primeng-icons-ban.mjs +3 -3
  89. package/fesm2022/primeng-icons-bars.mjs +3 -3
  90. package/fesm2022/primeng-icons-baseicon.mjs +6 -6
  91. package/fesm2022/primeng-icons-blank.mjs +3 -3
  92. package/fesm2022/primeng-icons-calendar.mjs +3 -3
  93. package/fesm2022/primeng-icons-caretleft.mjs +3 -3
  94. package/fesm2022/primeng-icons-caretright.mjs +3 -3
  95. package/fesm2022/primeng-icons-check.mjs +3 -3
  96. package/fesm2022/primeng-icons-chevrondown.mjs +3 -3
  97. package/fesm2022/primeng-icons-chevronleft.mjs +3 -3
  98. package/fesm2022/primeng-icons-chevronright.mjs +3 -3
  99. package/fesm2022/primeng-icons-chevronup.mjs +3 -3
  100. package/fesm2022/primeng-icons-exclamationtriangle.mjs +3 -3
  101. package/fesm2022/primeng-icons-eye.mjs +3 -3
  102. package/fesm2022/primeng-icons-eyeslash.mjs +3 -3
  103. package/fesm2022/primeng-icons-filter.mjs +3 -3
  104. package/fesm2022/primeng-icons-filterslash.mjs +3 -3
  105. package/fesm2022/primeng-icons-home.mjs +3 -3
  106. package/fesm2022/primeng-icons-infocircle.mjs +3 -3
  107. package/fesm2022/primeng-icons-minus.mjs +3 -3
  108. package/fesm2022/primeng-icons-pencil.mjs +3 -3
  109. package/fesm2022/primeng-icons-plus.mjs +3 -3
  110. package/fesm2022/primeng-icons-refresh.mjs +3 -3
  111. package/fesm2022/primeng-icons-search.mjs +3 -3
  112. package/fesm2022/primeng-icons-searchminus.mjs +3 -3
  113. package/fesm2022/primeng-icons-searchplus.mjs +3 -3
  114. package/fesm2022/primeng-icons-sortalt.mjs +3 -3
  115. package/fesm2022/primeng-icons-sortamountdown.mjs +3 -3
  116. package/fesm2022/primeng-icons-sortamountupalt.mjs +3 -3
  117. package/fesm2022/primeng-icons-spinner.mjs +3 -3
  118. package/fesm2022/primeng-icons-star.mjs +3 -3
  119. package/fesm2022/primeng-icons-starfill.mjs +3 -3
  120. package/fesm2022/primeng-icons-thlarge.mjs +3 -3
  121. package/fesm2022/primeng-icons-times.mjs +3 -3
  122. package/fesm2022/primeng-icons-timescircle.mjs +3 -3
  123. package/fesm2022/primeng-icons-trash.mjs +3 -3
  124. package/fesm2022/primeng-icons-undo.mjs +3 -3
  125. package/fesm2022/primeng-icons-upload.mjs +3 -3
  126. package/fesm2022/primeng-icons-windowmaximize.mjs +3 -3
  127. package/fesm2022/primeng-icons-windowminimize.mjs +3 -3
  128. package/fesm2022/primeng-iftalabel.mjs +18 -12
  129. package/fesm2022/primeng-iftalabel.mjs.map +1 -1
  130. package/fesm2022/primeng-image.mjs +10 -10
  131. package/fesm2022/primeng-imagecompare.mjs +10 -10
  132. package/fesm2022/primeng-inplace.mjs +16 -16
  133. package/fesm2022/primeng-inputgroup.mjs +10 -10
  134. package/fesm2022/primeng-inputgroupaddon.mjs +10 -10
  135. package/fesm2022/primeng-inputicon.mjs +10 -10
  136. package/fesm2022/primeng-inputmask.mjs +16 -10
  137. package/fesm2022/primeng-inputmask.mjs.map +1 -1
  138. package/fesm2022/primeng-inputnumber.mjs +37 -10
  139. package/fesm2022/primeng-inputnumber.mjs.map +1 -1
  140. package/fesm2022/primeng-inputotp.mjs +10 -10
  141. package/fesm2022/primeng-inputswitch.mjs +10 -10
  142. package/fesm2022/primeng-inputtext.mjs +10 -10
  143. package/fesm2022/primeng-inputtextarea.mjs +10 -10
  144. package/fesm2022/primeng-keyfilter.mjs +7 -7
  145. package/fesm2022/primeng-knob.mjs +10 -10
  146. package/fesm2022/primeng-listbox.mjs +16 -12
  147. package/fesm2022/primeng-listbox.mjs.map +1 -1
  148. package/fesm2022/primeng-megamenu.mjs +13 -17
  149. package/fesm2022/primeng-megamenu.mjs.map +1 -1
  150. package/fesm2022/primeng-menu.mjs +17 -16
  151. package/fesm2022/primeng-menu.mjs.map +1 -1
  152. package/fesm2022/primeng-menubar.mjs +16 -18
  153. package/fesm2022/primeng-menubar.mjs.map +1 -1
  154. package/fesm2022/primeng-message.mjs +10 -10
  155. package/fesm2022/primeng-messages.mjs +10 -10
  156. package/fesm2022/primeng-metergroup.mjs +13 -13
  157. package/fesm2022/primeng-multiselect.mjs +41 -23
  158. package/fesm2022/primeng-multiselect.mjs.map +1 -1
  159. package/fesm2022/primeng-orderlist.mjs +30 -10
  160. package/fesm2022/primeng-orderlist.mjs.map +1 -1
  161. package/fesm2022/primeng-organizationchart.mjs +13 -13
  162. package/fesm2022/primeng-overlay.mjs +23 -19
  163. package/fesm2022/primeng-overlay.mjs.map +1 -1
  164. package/fesm2022/primeng-overlaybadge.mjs +10 -10
  165. package/fesm2022/primeng-overlaypanel.mjs +10 -10
  166. package/fesm2022/primeng-paginator.mjs +11 -11
  167. package/fesm2022/primeng-paginator.mjs.map +1 -1
  168. package/fesm2022/primeng-panel.mjs +10 -10
  169. package/fesm2022/primeng-panelmenu.mjs +16 -16
  170. package/fesm2022/primeng-password.mjs +18 -17
  171. package/fesm2022/primeng-password.mjs.map +1 -1
  172. package/fesm2022/primeng-picklist.mjs +84 -38
  173. package/fesm2022/primeng-picklist.mjs.map +1 -1
  174. package/fesm2022/primeng-popover.mjs +10 -10
  175. package/fesm2022/primeng-progressbar.mjs +10 -10
  176. package/fesm2022/primeng-progressspinner.mjs +14 -14
  177. package/fesm2022/primeng-progressspinner.mjs.map +1 -1
  178. package/fesm2022/primeng-radiobutton.mjs +15 -13
  179. package/fesm2022/primeng-radiobutton.mjs.map +1 -1
  180. package/fesm2022/primeng-rating.mjs +10 -10
  181. package/fesm2022/primeng-ripple.mjs +10 -10
  182. package/fesm2022/primeng-scroller.mjs +18 -11
  183. package/fesm2022/primeng-scroller.mjs.map +1 -1
  184. package/fesm2022/primeng-scrollpanel.mjs +10 -10
  185. package/fesm2022/primeng-scrolltop.mjs +10 -10
  186. package/fesm2022/primeng-select.mjs +20 -17
  187. package/fesm2022/primeng-select.mjs.map +1 -1
  188. package/fesm2022/primeng-selectbutton.mjs +21 -14
  189. package/fesm2022/primeng-selectbutton.mjs.map +1 -1
  190. package/fesm2022/primeng-sidebar.mjs +10 -10
  191. package/fesm2022/primeng-skeleton.mjs +10 -10
  192. package/fesm2022/primeng-slider.mjs +10 -10
  193. package/fesm2022/primeng-speeddial.mjs +10 -10
  194. package/fesm2022/primeng-splitbutton.mjs +10 -10
  195. package/fesm2022/primeng-splitter.mjs +15 -15
  196. package/fesm2022/primeng-splitter.mjs.map +1 -1
  197. package/fesm2022/primeng-stepper.mjs +34 -34
  198. package/fesm2022/primeng-stepper.mjs.map +1 -1
  199. package/fesm2022/primeng-steps.mjs +10 -10
  200. package/fesm2022/primeng-styleclass.mjs +7 -7
  201. package/fesm2022/primeng-table.mjs +113 -111
  202. package/fesm2022/primeng-table.mjs.map +1 -1
  203. package/fesm2022/primeng-tabmenu.mjs +10 -10
  204. package/fesm2022/primeng-tabs.mjs +58 -29
  205. package/fesm2022/primeng-tabs.mjs.map +1 -1
  206. package/fesm2022/primeng-tabview.mjs +13 -13
  207. package/fesm2022/primeng-tag.mjs +10 -10
  208. package/fesm2022/primeng-terminal.mjs +13 -13
  209. package/fesm2022/primeng-textarea.mjs +15 -11
  210. package/fesm2022/primeng-textarea.mjs.map +1 -1
  211. package/fesm2022/primeng-tieredmenu.mjs +34 -56
  212. package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
  213. package/fesm2022/primeng-timeline.mjs +10 -10
  214. package/fesm2022/primeng-toast.mjs +13 -13
  215. package/fesm2022/primeng-togglebutton.mjs +131 -146
  216. package/fesm2022/primeng-togglebutton.mjs.map +1 -1
  217. package/fesm2022/primeng-toggleswitch.mjs +12 -10
  218. package/fesm2022/primeng-toggleswitch.mjs.map +1 -1
  219. package/fesm2022/primeng-toolbar.mjs +10 -10
  220. package/fesm2022/primeng-tooltip.mjs +11 -11
  221. package/fesm2022/primeng-tooltip.mjs.map +1 -1
  222. package/fesm2022/primeng-tree.mjs +51 -21
  223. package/fesm2022/primeng-tree.mjs.map +1 -1
  224. package/fesm2022/primeng-treeselect.mjs +17 -11
  225. package/fesm2022/primeng-treeselect.mjs.map +1 -1
  226. package/fesm2022/primeng-treetable.mjs +68 -64
  227. package/fesm2022/primeng-treetable.mjs.map +1 -1
  228. package/fesm2022/primeng-usestyle.mjs +3 -3
  229. package/inputnumber/inputnumber.d.ts +6 -1
  230. package/listbox/listbox.d.ts +1 -1
  231. package/multiselect/multiselect.d.ts +10 -2
  232. package/multiselect/multiselect.interface.d.ts +1 -1
  233. package/package.json +156 -152
  234. package/picklist/picklist.d.ts +1 -1
  235. package/scroller/scroller.d.ts +1 -0
  236. package/select/select.d.ts +1 -0
  237. package/selectbutton/selectbutton.d.ts +3 -1
  238. package/splitter/splitter.d.ts +2 -2
  239. package/stepper/stepper.d.ts +3 -3
  240. package/table/table.d.ts +12 -12
  241. package/table/table.interface.d.ts +11 -11
  242. package/tabs/tab.d.ts +8 -1
  243. package/togglebutton/togglebutton.d.ts +7 -6
  244. package/tree/tree.d.ts +7 -1
  245. package/treetable/treetable.d.ts +2 -2
@@ -0,0 +1,930 @@
1
+ import * as i2 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, forwardRef, EventEmitter, inject, booleanAttribute, numberAttribute, ContentChildren, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
6
+ import { SharedModule, PrimeTemplate } from 'primeng/api';
7
+ import * as i3 from 'primeng/autofocus';
8
+ import { AutoFocusModule } from 'primeng/autofocus';
9
+ import { TimesIcon } from 'primeng/icons/times';
10
+ import { TimesCircleIcon } from 'primeng/icons/timescircle';
11
+ import { InputTextModule } from 'primeng/inputtext';
12
+ import { UniqueComponentId } from 'primeng/utils';
13
+ import { BaseStyle } from 'primeng/base';
14
+ import { BaseComponent } from 'primeng/basecomponent';
15
+ import * as i4 from 'primeng/chip';
16
+ import { ChipModule } from 'primeng/chip';
17
+ import * as i1 from 'primeng/config';
18
+
19
+ const theme = ({ dt }) => `
20
+ .p-inputchips {
21
+ display: inline-flex;
22
+ }
23
+
24
+ .p-inputchips-input {
25
+ margin: 0;
26
+ list-style-type: none;
27
+ cursor: text;
28
+ overflow: hidden;
29
+ display: flex;
30
+ position: relative;
31
+ align-items: center;
32
+ flex-wrap: wrap;
33
+ padding: calc(${dt('inputchips.padding.y')} / 2) ${dt('inputchips.padding.x')};
34
+ gap: calc(${dt('inputchips.padding.y')} / 2);
35
+ color: ${dt('inputchips.color')};
36
+ background: ${dt('inputchips.background')};
37
+ border: 1px solid ${dt('inputchips.border.color')};
38
+ border-radius: ${dt('inputchips.border.radius')};
39
+ width: 100%;
40
+ transition: background ${dt('inputchips.transition.duration')}, color ${dt('inputchips.transition.duration')}, border-color ${dt('inputchips.transition.duration')}, outline-color ${dt('inputchips.transition.duration')}, box-shadow ${dt('inputchips.transition.duration')};
41
+ outline-color: transparent;
42
+ box-shadow: ${dt('inputchips.shadow')};
43
+ }
44
+
45
+ .p-inputchips:not(.p-disabled):hover .p-inputchips-input {
46
+ border-color: ${dt('inputchips.hover.border.color')};
47
+ }
48
+
49
+ .p-inputchips:not(.p-disabled).p-focus .p-inputchips-input {
50
+ border-color: ${dt('inputchips.focus.border.color')};
51
+ box-shadow: ${dt('inputchips.focus.ring.shadow')};
52
+ outline: ${dt('inputchips.focus.ring.width')} ${dt('inputchips.focus.ring.style')} ${dt('inputchips.focus.ring.color')};
53
+ outline-offset: ${dt('inputchips.focus.ring.offset')};
54
+ }
55
+
56
+ .p-inputchips.p-invalid .p-inputchips-input {
57
+ border-color: ${dt('inputchips.invalid.border.color')};
58
+ }
59
+
60
+ .p-variant-filled.p-inputchips-input {
61
+ background: ${dt('inputchips.filled.background')};
62
+ }
63
+
64
+ .p-inputchips:not(.p-disabled).p-focus .p-variant-filled.p-inputchips-input {
65
+ background: ${dt('inputchips.filled.focus.background')};
66
+ }
67
+
68
+ .p-inputchips.p-disabled .p-inputchips-input {
69
+ opacity: 1;
70
+ background: ${dt('inputchips.disabled.background')};
71
+ color: ${dt('inputchips.disabled.color')};
72
+ }
73
+
74
+ .p-inputchips-chip.p-chip {
75
+ padding-top: calc(${dt('inputchips.padding.y')} / 2);
76
+ padding-bottom: calc(${dt('inputchips.padding.y')} / 2);
77
+ border-radius: ${dt('inputchips.chip.border.radius')};
78
+ transition: background ${dt('inputchips.transition.duration')}, color ${dt('inputchips.transition.duration')};
79
+ }
80
+
81
+ .p-inputchips-chip-item.p-focus .p-inputchips-chip {
82
+ background: ${dt('inputchips.chip.focus.background')};
83
+ color: ${dt('inputchips.chip.focus.color')};
84
+ }
85
+
86
+ .p-inputchips-input:has(.p-inputchips-chip) {
87
+ padding-left: calc(${dt('inputchips.padding.y')} / 2);
88
+ padding-right: calc(${dt('inputchips.padding.y')} / 2);
89
+ }
90
+
91
+ .p-inputchips-input-item {
92
+ flex: 1 1 auto;
93
+ display: inline-flex;
94
+ padding-top: calc(${dt('inputchips.padding.y')} / 2);
95
+ padding-bottom: calc(${dt('inputchips.padding.y')} / 2);
96
+ }
97
+
98
+ .p-inputchips-input-item input {
99
+ border: 0 none;
100
+ outline: 0 none;
101
+ background: transparent;
102
+ margin: 0;
103
+ padding: 0;
104
+ box-shadow: none;
105
+ border-radius: 0;
106
+ width: 100%;
107
+ font-family: inherit;
108
+ font-feature-settings: inherit;
109
+ font-size: 1rem;
110
+ color: inherit;
111
+ }
112
+
113
+ .p-inputchips-input-item input::placeholder {
114
+ color: ${dt('inputchips.placeholder.color')};
115
+ }
116
+
117
+ /* For PrimeNG */
118
+
119
+ .p-chips-clear-icon {
120
+ position: absolute;
121
+ top: 50%;
122
+ margin-top: -0.5rem;
123
+ cursor: pointer;
124
+ right: ${dt('inputchips.padding.x')};
125
+ }
126
+ `;
127
+ const classes = {
128
+ root: ({ instance, props }) => [
129
+ 'p-inputchips p-component p-inputwrapper',
130
+ {
131
+ 'p-disabled': props.disabled,
132
+ 'p-invalid': props.invalid,
133
+ 'p-focus': instance.focused,
134
+ 'p-inputwrapper-filled': (props.modelValue && props.modelValue.length) || (instance.inputValue && instance.inputValue.length),
135
+ 'p-inputwrapper-focus': instance.focused
136
+ }
137
+ ],
138
+ input: ({ props, instance }) => [
139
+ 'p-inputchips-input',
140
+ {
141
+ 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.config.inputStyle === 'filled' || instance.config.inputVariant === 'filled'
142
+ }
143
+ ],
144
+ chipItem: ({ state, index }) => ['p-inputchips-chip-item', { 'p-focus': state.focusedIndex === index }],
145
+ pcChip: 'p-inputchips-chip',
146
+ chipIcon: 'p-inputchips-chip-icon',
147
+ inputItem: 'p-inputchips-input-item'
148
+ };
149
+ class ChipsStyle extends BaseStyle {
150
+ name = 'inputchips';
151
+ theme = theme;
152
+ classes = classes;
153
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChipsStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
154
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChipsStyle });
155
+ }
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChipsStyle, decorators: [{
157
+ type: Injectable
158
+ }] });
159
+ /**
160
+ *
161
+ * Chips is used to enter multiple values on an input field.
162
+ *
163
+ *
164
+ * @module chipsstyle
165
+ *
166
+ */
167
+ var ChipsClasses;
168
+ (function (ChipsClasses) {
169
+ /**
170
+ * Class name of the root element
171
+ */
172
+ ChipsClasses["root"] = "p-chip";
173
+ /**
174
+ * Class name of the image element
175
+ */
176
+ ChipsClasses["image"] = "p-chip-image";
177
+ /**
178
+ * Class name of the icon element
179
+ */
180
+ ChipsClasses["icon"] = "p-chip-icon";
181
+ /**
182
+ * Class name of the label element
183
+ */
184
+ ChipsClasses["label"] = "p-chip-label";
185
+ /**
186
+ * Class name of the remove icon element
187
+ */
188
+ ChipsClasses["removeIcon"] = "p-chip-remove-icon";
189
+ })(ChipsClasses || (ChipsClasses = {}));
190
+
191
+ const CHIPS_VALUE_ACCESSOR = {
192
+ provide: NG_VALUE_ACCESSOR,
193
+ useExisting: forwardRef(() => Chips),
194
+ multi: true
195
+ };
196
+ /**
197
+ * Chips groups a collection of contents in tabs.
198
+ * @group Components
199
+ */
200
+ class Chips extends BaseComponent {
201
+ el;
202
+ cd;
203
+ config;
204
+ /**
205
+ * Inline style of the element.
206
+ * @group Props
207
+ */
208
+ style;
209
+ /**
210
+ * Style class of the element.
211
+ * @group Props
212
+ */
213
+ styleClass;
214
+ /**
215
+ * When present, it specifies that the element should be disabled.
216
+ * @group Props
217
+ */
218
+ disabled;
219
+ /**
220
+ * Name of the property to display on a chip.
221
+ * @group Props
222
+ */
223
+ field;
224
+ /**
225
+ * Advisory information to display on input.
226
+ * @group Props
227
+ */
228
+ placeholder;
229
+ /**
230
+ * Maximum number of entries allowed.
231
+ * @group Props
232
+ */
233
+ max;
234
+ /**
235
+ * Maximum length of a chip.
236
+ * @group Props
237
+ */
238
+ maxLength;
239
+ /**
240
+ * Defines a string that labels the input for accessibility.
241
+ * @group Props
242
+ */
243
+ ariaLabel;
244
+ /**
245
+ * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
246
+ * @group Props
247
+ */
248
+ ariaLabelledBy;
249
+ /**
250
+ * Index of the element in tabbing order.
251
+ * @group Props
252
+ */
253
+ tabindex;
254
+ /**
255
+ * Identifier of the focus input to match a label defined for the component.
256
+ * @group Props
257
+ */
258
+ inputId;
259
+ /**
260
+ * Whether to allow duplicate values or not.
261
+ * @group Props
262
+ */
263
+ allowDuplicate = true;
264
+ /**
265
+ * Defines whether duplication check should be case-sensitive
266
+ * @group Props
267
+ */
268
+ caseSensitiveDuplication = true;
269
+ /**
270
+ * Inline style of the input field.
271
+ * @group Props
272
+ */
273
+ inputStyle;
274
+ /**
275
+ * Style class of the input field.
276
+ * @group Props
277
+ */
278
+ inputStyleClass;
279
+ /**
280
+ * Icon to display in chip remove action..
281
+ * @group Props
282
+ */
283
+ chipIcon;
284
+ /**
285
+ * Whether to add an item on tab key press.
286
+ * @group Props
287
+ */
288
+ addOnTab;
289
+ /**
290
+ * Whether to add an item when the input loses focus.
291
+ * @group Props
292
+ */
293
+ addOnBlur;
294
+ /**
295
+ * Separator char to add an item when pressed in addition to the enter key.
296
+ * @group Props
297
+ */
298
+ separator;
299
+ /**
300
+ * When enabled, a clear icon is displayed to clear the value.
301
+ * @group Props
302
+ */
303
+ showClear = false;
304
+ /**
305
+ * When present, it specifies that the component should automatically get focus on load.
306
+ * @group Props
307
+ */
308
+ autofocus;
309
+ /**
310
+ * Specifies the input variant of the component.
311
+ * @group Props
312
+ */
313
+ variant = 'outlined';
314
+ /**
315
+ * Callback to invoke on chip add.
316
+ * @param {ChipsAddEvent} event - Custom chip add event.
317
+ * @group Emits
318
+ */
319
+ onAdd = new EventEmitter();
320
+ /**
321
+ * Callback to invoke on chip remove.
322
+ * @param {ChipsRemoveEvent} event - Custom chip remove event.
323
+ * @group Emits
324
+ */
325
+ onRemove = new EventEmitter();
326
+ /**
327
+ * Callback to invoke on focus of input field.
328
+ * @param {Event} event - Browser event.
329
+ * @group Emits
330
+ */
331
+ onFocus = new EventEmitter();
332
+ /**
333
+ * Callback to invoke on blur of input field.
334
+ * @param {Event} event - Browser event.
335
+ * @group Emits
336
+ */
337
+ onBlur = new EventEmitter();
338
+ /**
339
+ * Callback to invoke on chip clicked.
340
+ * @param {ChipsClickEvent} event - Custom chip click event.
341
+ * @group Emits
342
+ */
343
+ onChipClick = new EventEmitter();
344
+ /**
345
+ * Callback to invoke on chip contextmenu.
346
+ * @param {ChipsClickEvent} event - Custom chip contextmenu event.
347
+ * @group Emits
348
+ */
349
+ onChipContextMenu = new EventEmitter();
350
+ /**
351
+ * Callback to invoke on clear token clicked.
352
+ * @group Emits
353
+ */
354
+ onClear = new EventEmitter();
355
+ inputViewChild;
356
+ containerViewChild;
357
+ templates;
358
+ itemTemplate;
359
+ removeTokenIconTemplate;
360
+ clearIconTemplate;
361
+ value;
362
+ onModelChange = () => { };
363
+ onModelTouched = () => { };
364
+ valueChanged;
365
+ id = UniqueComponentId();
366
+ focused;
367
+ focusedIndex;
368
+ filled;
369
+ _componentStyle = inject(ChipsStyle);
370
+ get focusedOptionId() {
371
+ return this.focusedIndex !== null ? `${this.id}_chips_item_${this.focusedIndex}` : null;
372
+ }
373
+ get isMaxedOut() {
374
+ return this.max && this.value && this.max === this.value.length;
375
+ }
376
+ constructor(el, cd, config) {
377
+ super();
378
+ this.el = el;
379
+ this.cd = cd;
380
+ this.config = config;
381
+ console.log('Deprecated since v18. Use AutoComplete component instead with its typeahead property.');
382
+ }
383
+ ngAfterContentInit() {
384
+ this.templates.forEach((item) => {
385
+ switch (item.getType()) {
386
+ case 'item':
387
+ this.itemTemplate = item.template;
388
+ break;
389
+ case 'removetokenicon':
390
+ this.removeTokenIconTemplate = item.template;
391
+ break;
392
+ case 'clearicon':
393
+ this.clearIconTemplate = item.template;
394
+ break;
395
+ default:
396
+ this.itemTemplate = item.template;
397
+ break;
398
+ }
399
+ });
400
+ this.updateFilledState();
401
+ }
402
+ onWrapperClick() {
403
+ this.inputViewChild?.nativeElement.focus();
404
+ }
405
+ onContainerFocus() {
406
+ this.focused = true;
407
+ }
408
+ onContainerBlur() {
409
+ this.focusedIndex = -1;
410
+ this.focused = false;
411
+ }
412
+ onContainerKeyDown(event) {
413
+ switch (event.code) {
414
+ case 'ArrowLeft':
415
+ this.onArrowLeftKeyOn();
416
+ break;
417
+ case 'ArrowRight':
418
+ this.onArrowRightKeyOn();
419
+ break;
420
+ case 'Backspace':
421
+ this.onBackspaceKeyOn(event);
422
+ break;
423
+ case 'Space':
424
+ if (this.focusedIndex !== null && this.value && this.value.length > 0) {
425
+ this.onItemClick(event, this.value[this.focusedIndex]);
426
+ }
427
+ break;
428
+ default:
429
+ break;
430
+ }
431
+ }
432
+ onArrowLeftKeyOn() {
433
+ if (this.inputViewChild.nativeElement.value.length === 0 && this.value && this.value.length > 0) {
434
+ this.focusedIndex = this.focusedIndex === null ? this.value.length - 1 : this.focusedIndex - 1;
435
+ if (this.focusedIndex < 0)
436
+ this.focusedIndex = 0;
437
+ }
438
+ }
439
+ onArrowRightKeyOn() {
440
+ if (this.inputViewChild.nativeElement.value.length === 0 && this.value && this.value.length > 0) {
441
+ if (this.focusedIndex === this.value.length - 1) {
442
+ this.focusedIndex = null;
443
+ this.inputViewChild?.nativeElement.focus();
444
+ }
445
+ else {
446
+ this.focusedIndex++;
447
+ }
448
+ }
449
+ }
450
+ onBackspaceKeyOn(event) {
451
+ if (this.focusedIndex !== null) {
452
+ this.removeItem(event, this.focusedIndex);
453
+ }
454
+ }
455
+ onInput() {
456
+ this.updateFilledState();
457
+ this.focusedIndex = null;
458
+ }
459
+ onPaste(event) {
460
+ if (!this.disabled) {
461
+ if (this.separator) {
462
+ const pastedData = (event.clipboardData || this.document.defaultView['clipboardData']).getData('Text');
463
+ pastedData.split(this.separator).forEach((val) => {
464
+ this.addItem(event, val, true);
465
+ });
466
+ this.inputViewChild.nativeElement.value = '';
467
+ }
468
+ this.updateFilledState();
469
+ }
470
+ }
471
+ updateFilledState() {
472
+ if (!this.value || this.value.length === 0) {
473
+ this.filled = this.inputViewChild && this.inputViewChild.nativeElement && this.inputViewChild.nativeElement.value != '';
474
+ }
475
+ else {
476
+ this.filled = true;
477
+ }
478
+ }
479
+ onItemClick(event, item) {
480
+ this.onChipClick.emit({
481
+ originalEvent: event,
482
+ value: item
483
+ });
484
+ }
485
+ onItemContextMenu(event, item) {
486
+ this.onChipContextMenu.emit({
487
+ originalEvent: event,
488
+ value: item
489
+ });
490
+ }
491
+ writeValue(value) {
492
+ this.value = value;
493
+ this.updateMaxedOut();
494
+ this.updateFilledState();
495
+ this.cd.markForCheck();
496
+ }
497
+ registerOnChange(fn) {
498
+ this.onModelChange = fn;
499
+ }
500
+ registerOnTouched(fn) {
501
+ this.onModelTouched = fn;
502
+ }
503
+ setDisabledState(val) {
504
+ this.disabled = val;
505
+ this.cd.markForCheck();
506
+ }
507
+ resolveFieldData(data, field) {
508
+ if (data && field) {
509
+ if (field.indexOf('.') == -1) {
510
+ return data[field];
511
+ }
512
+ else {
513
+ let fields = field.split('.');
514
+ let value = data;
515
+ for (var i = 0, len = fields.length; i < len; ++i) {
516
+ value = value[fields[i]];
517
+ }
518
+ return value;
519
+ }
520
+ }
521
+ else {
522
+ return null;
523
+ }
524
+ }
525
+ onInputFocus(event) {
526
+ this.focused = true;
527
+ this.focusedIndex = null;
528
+ this.onFocus.emit(event);
529
+ }
530
+ onInputBlur(event) {
531
+ this.focused = false;
532
+ this.focusedIndex = null;
533
+ if (this.addOnBlur && this.inputViewChild.nativeElement.value) {
534
+ this.addItem(event, this.inputViewChild.nativeElement.value, false);
535
+ }
536
+ this.onModelTouched();
537
+ this.onBlur.emit(event);
538
+ }
539
+ removeItem(event, index) {
540
+ if (this.disabled) {
541
+ return;
542
+ }
543
+ let removedItem = this.value[index];
544
+ this.value = this.value.filter((val, i) => i != index);
545
+ this.focusedIndex = null;
546
+ this.inputViewChild.nativeElement.focus();
547
+ this.onModelChange(this.value);
548
+ this.onRemove.emit({
549
+ originalEvent: event,
550
+ value: removedItem
551
+ });
552
+ this.updateFilledState();
553
+ this.updateMaxedOut();
554
+ }
555
+ addItem(event, item, preventDefault) {
556
+ this.value = this.value || [];
557
+ if (item && item.trim().length) {
558
+ const newItemIsDuplicate = this.caseSensitiveDuplication ? this.value.includes(item) : this.value.some((val) => val.toLowerCase() === item.toLowerCase());
559
+ if ((this.allowDuplicate || !newItemIsDuplicate) && !this.isMaxedOut) {
560
+ this.value = [...this.value, item];
561
+ this.onModelChange(this.value);
562
+ this.onAdd.emit({
563
+ originalEvent: event,
564
+ value: item
565
+ });
566
+ }
567
+ }
568
+ this.updateFilledState();
569
+ this.updateMaxedOut();
570
+ this.inputViewChild.nativeElement.value = '';
571
+ if (preventDefault) {
572
+ event.preventDefault();
573
+ }
574
+ }
575
+ /**
576
+ * Callback to invoke on filter reset.
577
+ * @group Method
578
+ */
579
+ clear() {
580
+ this.value = null;
581
+ this.updateFilledState();
582
+ this.onModelChange(this.value);
583
+ this.updateMaxedOut();
584
+ this.onClear.emit();
585
+ }
586
+ onKeyDown(event) {
587
+ const inputValue = event.target.value;
588
+ switch (event.code) {
589
+ case 'Backspace':
590
+ if (inputValue.length === 0 && this.value && this.value.length > 0) {
591
+ if (this.focusedIndex !== null) {
592
+ this.removeItem(event, this.focusedIndex);
593
+ }
594
+ else
595
+ this.removeItem(event, this.value.length - 1);
596
+ }
597
+ break;
598
+ case 'Enter':
599
+ case 'NumpadEnter':
600
+ if (inputValue && inputValue.trim().length && !this.isMaxedOut) {
601
+ this.addItem(event, inputValue, true);
602
+ }
603
+ break;
604
+ case 'Tab':
605
+ if (this.addOnTab && inputValue && inputValue.trim().length && !this.isMaxedOut) {
606
+ this.addItem(event, inputValue, true);
607
+ event.preventDefault();
608
+ }
609
+ break;
610
+ case 'ArrowLeft':
611
+ if (inputValue.length === 0 && this.value && this.value.length > 0) {
612
+ this.containerViewChild?.nativeElement.focus();
613
+ }
614
+ break;
615
+ case 'ArrowRight':
616
+ event.stopPropagation();
617
+ break;
618
+ default:
619
+ if (this.separator) {
620
+ if (this.separator === event.key || event.key.match(this.separator)) {
621
+ this.addItem(event, inputValue, true);
622
+ }
623
+ }
624
+ break;
625
+ }
626
+ }
627
+ updateMaxedOut() {
628
+ if (this.inputViewChild && this.inputViewChild.nativeElement) {
629
+ if (this.isMaxedOut) {
630
+ // Calling `blur` is necessary because firefox does not call `onfocus` events
631
+ // for disabled inputs, unlike chromium browsers.
632
+ this.inputViewChild.nativeElement.blur();
633
+ this.inputViewChild.nativeElement.disabled = true;
634
+ }
635
+ else {
636
+ if (this.disabled) {
637
+ this.inputViewChild.nativeElement.blur();
638
+ }
639
+ this.inputViewChild.nativeElement.disabled = this.disabled || false;
640
+ }
641
+ }
642
+ }
643
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: Chips, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.PrimeNG }], target: i0.ɵɵFactoryTarget.Component });
644
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.5", type: Chips, isStandalone: true, selector: "p-chips", inputs: { style: "style", styleClass: "styleClass", disabled: ["disabled", "disabled", booleanAttribute], field: "field", placeholder: "placeholder", max: ["max", "max", numberAttribute], maxLength: "maxLength", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", tabindex: ["tabindex", "tabindex", numberAttribute], inputId: "inputId", allowDuplicate: ["allowDuplicate", "allowDuplicate", booleanAttribute], caseSensitiveDuplication: ["caseSensitiveDuplication", "caseSensitiveDuplication", booleanAttribute], inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", chipIcon: "chipIcon", addOnTab: ["addOnTab", "addOnTab", booleanAttribute], addOnBlur: ["addOnBlur", "addOnBlur", booleanAttribute], separator: "separator", showClear: ["showClear", "showClear", booleanAttribute], autofocus: ["autofocus", "autofocus", booleanAttribute], variant: "variant" }, outputs: { onAdd: "onAdd", onRemove: "onRemove", onFocus: "onFocus", onBlur: "onBlur", onChipClick: "onChipClick", onChipContextMenu: "onChipContextMenu", onClear: "onClear" }, host: { properties: { "class.p-inputwrapper-filled": "filled", "class.p-inputwrapper-focus": "focused", "class.p-chips-clearable": "showClear" }, classAttribute: "p-element p-inputwrapper" }, providers: [CHIPS_VALUE_ACCESSOR, ChipsStyle], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "inputViewChild", first: true, predicate: ["inputtext"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
645
+ <div
646
+ [ngClass]="{
647
+ 'p-inputchips p-component p-input-wrapper': true,
648
+ 'p-disabled': disabled,
649
+ 'p-focus': focused,
650
+ 'p-inputwrapper-filled': (value && value.length) || (this.inputViewChild?.nativeElement.value && this.inputViewChild?.nativeElement.value.length),
651
+ 'p-inputwrapper-focus': focused
652
+ }"
653
+ [ngStyle]="style"
654
+ [class]="styleClass"
655
+ [attr.data-pc-name]="'chips'"
656
+ [attr.data-pc-section]="'root'"
657
+ >
658
+ <ul
659
+ #container
660
+ class="p-inputchips-input"
661
+ tabindex="-1"
662
+ role="listbox"
663
+ [attr.aria-labelledby]="ariaLabelledBy"
664
+ [attr.aria-label]="ariaLabel"
665
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
666
+ [attr.aria-orientation]="'horizontal'"
667
+ (click)="onWrapperClick()"
668
+ (focus)="onContainerFocus()"
669
+ (blur)="onContainerBlur()"
670
+ (keydown)="onContainerKeyDown($event)"
671
+ [attr.data-pc-section]="'container'"
672
+ >
673
+ <li
674
+ #token
675
+ *ngFor="let item of value; let i = index"
676
+ [attr.id]="id + '_chips_item_' + i"
677
+ role="option"
678
+ [attr.ariaLabel]="item"
679
+ [attr.aria-selected]="true"
680
+ [attr.aria-setsize]="value.length"
681
+ [attr.aria-posinset]="i + 1"
682
+ [attr.data-p-focused]="focusedIndex === i"
683
+ [ngClass]="{ 'p-inputchips-chip-item': true, 'p-focus': focusedIndex === i }"
684
+ (click)="onItemClick($event, item)"
685
+ (contextmenu)="onItemContextMenu($event, item)"
686
+ [attr.data-pc-section]="'token'"
687
+ >
688
+ <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-container>
689
+ <p-chip *ngIf="!itemTemplate" class="p-inputchips-chip" [label]="field ? resolveFieldData(item, field) : item" [removeIcon]="chipIcon" removable (onRemove)="removeItem($event, i)">
690
+ <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-container>
691
+ <ng-template #removeicon>
692
+ <ng-container *ngIf="!disabled">
693
+ <TimesCircleIcon [styleClass]="'p-chips-token-icon'" *ngIf="!removeTokenIconTemplate" (click)="removeItem($event, i)" [attr.data-pc-section]="'removeTokenIcon'" [attr.aria-hidden]="true" />
694
+ <span *ngIf="removeTokenIconTemplate" class="p-chips-token-icon" (click)="removeItem($event, i)" [attr.data-pc-section]="'removeTokenIcon'" [attr.aria-hidden]="true">
695
+ <ng-template *ngTemplateOutlet="removeTokenIconTemplate; context: { removeItem: removeItem.bind(this) }"></ng-template>
696
+ </span>
697
+ </ng-container>
698
+ </ng-template>
699
+ </p-chip>
700
+ </li>
701
+ <li class="p-inputchips-input-item" [ngClass]="{ 'p-chips-clearable': showClear && !disabled }" [attr.data-pc-section]="'inputToken'" role="option">
702
+ <input
703
+ #inputtext
704
+ type="text"
705
+ [attr.id]="inputId"
706
+ [attr.maxlength]="maxLength"
707
+ [attr.placeholder]="value && value.length ? null : placeholder"
708
+ [attr.tabindex]="tabindex"
709
+ (keydown)="onKeyDown($event)"
710
+ (input)="onInput()"
711
+ (paste)="onPaste($event)"
712
+ (focus)="onInputFocus($event)"
713
+ (blur)="onInputBlur($event)"
714
+ [disabled]="disabled || isMaxedOut"
715
+ [ngStyle]="inputStyle"
716
+ [class]="inputStyleClass"
717
+ pAutoFocus
718
+ [autofocus]="autofocus"
719
+ class="test"
720
+ />
721
+ </li>
722
+ <li *ngIf="value != null && filled && !disabled && showClear">
723
+ <TimesIcon *ngIf="!clearIconTemplate" [styleClass]="'p-chips-clear-icon'" (click)="clear()" />
724
+ <span *ngIf="clearIconTemplate" class="p-chips-clear-icon" (click)="clear()">
725
+ <ng-template *ngTemplateOutlet="clearIconTemplate"></ng-template>
726
+ </span>
727
+ </li>
728
+ </ul>
729
+ </div>
730
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: AutoFocusModule }, { kind: "directive", type: i3.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus", "pAutoFocus"] }, { kind: "component", type: TimesCircleIcon, selector: "TimesCircleIcon" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i4.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "style", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
731
+ }
732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: Chips, decorators: [{
733
+ type: Component,
734
+ args: [{
735
+ selector: 'p-chips',
736
+ standalone: true,
737
+ imports: [CommonModule, InputTextModule, SharedModule, AutoFocusModule, TimesCircleIcon, TimesIcon, ChipModule],
738
+ template: `
739
+ <div
740
+ [ngClass]="{
741
+ 'p-inputchips p-component p-input-wrapper': true,
742
+ 'p-disabled': disabled,
743
+ 'p-focus': focused,
744
+ 'p-inputwrapper-filled': (value && value.length) || (this.inputViewChild?.nativeElement.value && this.inputViewChild?.nativeElement.value.length),
745
+ 'p-inputwrapper-focus': focused
746
+ }"
747
+ [ngStyle]="style"
748
+ [class]="styleClass"
749
+ [attr.data-pc-name]="'chips'"
750
+ [attr.data-pc-section]="'root'"
751
+ >
752
+ <ul
753
+ #container
754
+ class="p-inputchips-input"
755
+ tabindex="-1"
756
+ role="listbox"
757
+ [attr.aria-labelledby]="ariaLabelledBy"
758
+ [attr.aria-label]="ariaLabel"
759
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
760
+ [attr.aria-orientation]="'horizontal'"
761
+ (click)="onWrapperClick()"
762
+ (focus)="onContainerFocus()"
763
+ (blur)="onContainerBlur()"
764
+ (keydown)="onContainerKeyDown($event)"
765
+ [attr.data-pc-section]="'container'"
766
+ >
767
+ <li
768
+ #token
769
+ *ngFor="let item of value; let i = index"
770
+ [attr.id]="id + '_chips_item_' + i"
771
+ role="option"
772
+ [attr.ariaLabel]="item"
773
+ [attr.aria-selected]="true"
774
+ [attr.aria-setsize]="value.length"
775
+ [attr.aria-posinset]="i + 1"
776
+ [attr.data-p-focused]="focusedIndex === i"
777
+ [ngClass]="{ 'p-inputchips-chip-item': true, 'p-focus': focusedIndex === i }"
778
+ (click)="onItemClick($event, item)"
779
+ (contextmenu)="onItemContextMenu($event, item)"
780
+ [attr.data-pc-section]="'token'"
781
+ >
782
+ <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-container>
783
+ <p-chip *ngIf="!itemTemplate" class="p-inputchips-chip" [label]="field ? resolveFieldData(item, field) : item" [removeIcon]="chipIcon" removable (onRemove)="removeItem($event, i)">
784
+ <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-container>
785
+ <ng-template #removeicon>
786
+ <ng-container *ngIf="!disabled">
787
+ <TimesCircleIcon [styleClass]="'p-chips-token-icon'" *ngIf="!removeTokenIconTemplate" (click)="removeItem($event, i)" [attr.data-pc-section]="'removeTokenIcon'" [attr.aria-hidden]="true" />
788
+ <span *ngIf="removeTokenIconTemplate" class="p-chips-token-icon" (click)="removeItem($event, i)" [attr.data-pc-section]="'removeTokenIcon'" [attr.aria-hidden]="true">
789
+ <ng-template *ngTemplateOutlet="removeTokenIconTemplate; context: { removeItem: removeItem.bind(this) }"></ng-template>
790
+ </span>
791
+ </ng-container>
792
+ </ng-template>
793
+ </p-chip>
794
+ </li>
795
+ <li class="p-inputchips-input-item" [ngClass]="{ 'p-chips-clearable': showClear && !disabled }" [attr.data-pc-section]="'inputToken'" role="option">
796
+ <input
797
+ #inputtext
798
+ type="text"
799
+ [attr.id]="inputId"
800
+ [attr.maxlength]="maxLength"
801
+ [attr.placeholder]="value && value.length ? null : placeholder"
802
+ [attr.tabindex]="tabindex"
803
+ (keydown)="onKeyDown($event)"
804
+ (input)="onInput()"
805
+ (paste)="onPaste($event)"
806
+ (focus)="onInputFocus($event)"
807
+ (blur)="onInputBlur($event)"
808
+ [disabled]="disabled || isMaxedOut"
809
+ [ngStyle]="inputStyle"
810
+ [class]="inputStyleClass"
811
+ pAutoFocus
812
+ [autofocus]="autofocus"
813
+ class="test"
814
+ />
815
+ </li>
816
+ <li *ngIf="value != null && filled && !disabled && showClear">
817
+ <TimesIcon *ngIf="!clearIconTemplate" [styleClass]="'p-chips-clear-icon'" (click)="clear()" />
818
+ <span *ngIf="clearIconTemplate" class="p-chips-clear-icon" (click)="clear()">
819
+ <ng-template *ngTemplateOutlet="clearIconTemplate"></ng-template>
820
+ </span>
821
+ </li>
822
+ </ul>
823
+ </div>
824
+ `,
825
+ host: {
826
+ class: 'p-element p-inputwrapper',
827
+ '[class.p-inputwrapper-filled]': 'filled',
828
+ '[class.p-inputwrapper-focus]': 'focused',
829
+ '[class.p-chips-clearable]': 'showClear'
830
+ },
831
+ providers: [CHIPS_VALUE_ACCESSOR, ChipsStyle],
832
+ changeDetection: ChangeDetectionStrategy.OnPush,
833
+ encapsulation: ViewEncapsulation.None
834
+ }]
835
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.PrimeNG }], propDecorators: { style: [{
836
+ type: Input
837
+ }], styleClass: [{
838
+ type: Input
839
+ }], disabled: [{
840
+ type: Input,
841
+ args: [{ transform: booleanAttribute }]
842
+ }], field: [{
843
+ type: Input
844
+ }], placeholder: [{
845
+ type: Input
846
+ }], max: [{
847
+ type: Input,
848
+ args: [{ transform: numberAttribute }]
849
+ }], maxLength: [{
850
+ type: Input
851
+ }], ariaLabel: [{
852
+ type: Input
853
+ }], ariaLabelledBy: [{
854
+ type: Input
855
+ }], tabindex: [{
856
+ type: Input,
857
+ args: [{ transform: numberAttribute }]
858
+ }], inputId: [{
859
+ type: Input
860
+ }], allowDuplicate: [{
861
+ type: Input,
862
+ args: [{ transform: booleanAttribute }]
863
+ }], caseSensitiveDuplication: [{
864
+ type: Input,
865
+ args: [{ transform: booleanAttribute }]
866
+ }], inputStyle: [{
867
+ type: Input
868
+ }], inputStyleClass: [{
869
+ type: Input
870
+ }], chipIcon: [{
871
+ type: Input
872
+ }], addOnTab: [{
873
+ type: Input,
874
+ args: [{ transform: booleanAttribute }]
875
+ }], addOnBlur: [{
876
+ type: Input,
877
+ args: [{ transform: booleanAttribute }]
878
+ }], separator: [{
879
+ type: Input
880
+ }], showClear: [{
881
+ type: Input,
882
+ args: [{ transform: booleanAttribute }]
883
+ }], autofocus: [{
884
+ type: Input,
885
+ args: [{ transform: booleanAttribute }]
886
+ }], variant: [{
887
+ type: Input
888
+ }], onAdd: [{
889
+ type: Output
890
+ }], onRemove: [{
891
+ type: Output
892
+ }], onFocus: [{
893
+ type: Output
894
+ }], onBlur: [{
895
+ type: Output
896
+ }], onChipClick: [{
897
+ type: Output
898
+ }], onChipContextMenu: [{
899
+ type: Output
900
+ }], onClear: [{
901
+ type: Output
902
+ }], inputViewChild: [{
903
+ type: ViewChild,
904
+ args: ['inputtext']
905
+ }], containerViewChild: [{
906
+ type: ViewChild,
907
+ args: ['container']
908
+ }], templates: [{
909
+ type: ContentChildren,
910
+ args: [PrimeTemplate]
911
+ }] } });
912
+ class ChipsModule {
913
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChipsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
914
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: ChipsModule, imports: [Chips, SharedModule], exports: [Chips, SharedModule] });
915
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChipsModule, imports: [Chips, SharedModule, SharedModule] });
916
+ }
917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ChipsModule, decorators: [{
918
+ type: NgModule,
919
+ args: [{
920
+ imports: [Chips, SharedModule],
921
+ exports: [Chips, SharedModule]
922
+ }]
923
+ }] });
924
+
925
+ /**
926
+ * Generated bundle index. Do not edit.
927
+ */
928
+
929
+ export { CHIPS_VALUE_ACCESSOR, Chips, ChipsModule };
930
+ //# sourceMappingURL=primeng-chips.mjs.map