primeng 0.0.0-watch

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 (507) hide show
  1. package/LICENSE.md +77 -0
  2. package/README.md +11 -0
  3. package/accordion/index.d.ts +255 -0
  4. package/animateonscroll/index.d.ts +71 -0
  5. package/api/index.d.ts +1820 -0
  6. package/autocomplete/index.d.ts +925 -0
  7. package/autofocus/index.d.ts +31 -0
  8. package/avatar/index.d.ts +115 -0
  9. package/avatargroup/index.d.ts +60 -0
  10. package/badge/index.d.ts +156 -0
  11. package/base/index.d.ts +63 -0
  12. package/basecomponent/index.d.ts +54 -0
  13. package/baseeditableholder/index.d.ts +45 -0
  14. package/baseinput/index.d.ts +73 -0
  15. package/basemodelholder/index.d.ts +12 -0
  16. package/blockui/index.d.ts +114 -0
  17. package/breadcrumb/index.d.ts +179 -0
  18. package/button/index.d.ts +478 -0
  19. package/buttongroup/index.d.ts +43 -0
  20. package/card/index.d.ts +154 -0
  21. package/carousel/index.d.ts +443 -0
  22. package/cascadeselect/index.d.ts +729 -0
  23. package/chart/index.d.ts +128 -0
  24. package/checkbox/index.d.ts +248 -0
  25. package/chip/index.d.ts +165 -0
  26. package/colorpicker/index.d.ts +329 -0
  27. package/config/index.d.ts +89 -0
  28. package/confirmdialog/index.d.ts +358 -0
  29. package/confirmpopup/index.d.ts +218 -0
  30. package/contextmenu/index.d.ts +356 -0
  31. package/dataview/index.d.ts +539 -0
  32. package/datepicker/index.d.ts +1191 -0
  33. package/dialog/index.d.ts +531 -0
  34. package/divider/index.d.ts +114 -0
  35. package/dock/index.d.ts +201 -0
  36. package/dom/index.d.ts +109 -0
  37. package/dragdrop/index.d.ts +121 -0
  38. package/drawer/index.d.ts +309 -0
  39. package/dynamicdialog/index.d.ts +544 -0
  40. package/editor/index.d.ts +306 -0
  41. package/fesm2022/primeng-accordion.mjs +593 -0
  42. package/fesm2022/primeng-accordion.mjs.map +1 -0
  43. package/fesm2022/primeng-animateonscroll.mjs +178 -0
  44. package/fesm2022/primeng-animateonscroll.mjs.map +1 -0
  45. package/fesm2022/primeng-api.mjs +836 -0
  46. package/fesm2022/primeng-api.mjs.map +1 -0
  47. package/fesm2022/primeng-autocomplete.mjs +2073 -0
  48. package/fesm2022/primeng-autocomplete.mjs.map +1 -0
  49. package/fesm2022/primeng-autofocus.mjs +83 -0
  50. package/fesm2022/primeng-autofocus.mjs.map +1 -0
  51. package/fesm2022/primeng-avatar.mjs +181 -0
  52. package/fesm2022/primeng-avatar.mjs.map +1 -0
  53. package/fesm2022/primeng-avatargroup.mjs +103 -0
  54. package/fesm2022/primeng-avatargroup.mjs.map +1 -0
  55. package/fesm2022/primeng-badge.mjs +366 -0
  56. package/fesm2022/primeng-badge.mjs.map +1 -0
  57. package/fesm2022/primeng-base.mjs +127 -0
  58. package/fesm2022/primeng-base.mjs.map +1 -0
  59. package/fesm2022/primeng-basecomponent.mjs +173 -0
  60. package/fesm2022/primeng-basecomponent.mjs.map +1 -0
  61. package/fesm2022/primeng-baseeditableholder.mjs +67 -0
  62. package/fesm2022/primeng-baseeditableholder.mjs.map +1 -0
  63. package/fesm2022/primeng-baseinput.mjs +85 -0
  64. package/fesm2022/primeng-baseinput.mjs.map +1 -0
  65. package/fesm2022/primeng-basemodelholder.mjs +25 -0
  66. package/fesm2022/primeng-basemodelholder.mjs.map +1 -0
  67. package/fesm2022/primeng-blockui.mjs +237 -0
  68. package/fesm2022/primeng-blockui.mjs.map +1 -0
  69. package/fesm2022/primeng-breadcrumb.mjs +457 -0
  70. package/fesm2022/primeng-breadcrumb.mjs.map +1 -0
  71. package/fesm2022/primeng-button.mjs +864 -0
  72. package/fesm2022/primeng-button.mjs.map +1 -0
  73. package/fesm2022/primeng-buttongroup.mjs +109 -0
  74. package/fesm2022/primeng-buttongroup.mjs.map +1 -0
  75. package/fesm2022/primeng-card.mjs +271 -0
  76. package/fesm2022/primeng-card.mjs.map +1 -0
  77. package/fesm2022/primeng-carousel.mjs +1101 -0
  78. package/fesm2022/primeng-carousel.mjs.map +1 -0
  79. package/fesm2022/primeng-cascadeselect.mjs +1778 -0
  80. package/fesm2022/primeng-cascadeselect.mjs.map +1 -0
  81. package/fesm2022/primeng-chart.mjs +246 -0
  82. package/fesm2022/primeng-chart.mjs.map +1 -0
  83. package/fesm2022/primeng-checkbox.mjs +441 -0
  84. package/fesm2022/primeng-checkbox.mjs.map +1 -0
  85. package/fesm2022/primeng-chip.mjs +323 -0
  86. package/fesm2022/primeng-chip.mjs.map +1 -0
  87. package/fesm2022/primeng-colorpicker.mjs +865 -0
  88. package/fesm2022/primeng-colorpicker.mjs.map +1 -0
  89. package/fesm2022/primeng-config.mjs +289 -0
  90. package/fesm2022/primeng-config.mjs.map +1 -0
  91. package/fesm2022/primeng-confirmdialog.mjs +823 -0
  92. package/fesm2022/primeng-confirmdialog.mjs.map +1 -0
  93. package/fesm2022/primeng-confirmpopup.mjs +630 -0
  94. package/fesm2022/primeng-confirmpopup.mjs.map +1 -0
  95. package/fesm2022/primeng-contextmenu.mjs +1410 -0
  96. package/fesm2022/primeng-contextmenu.mjs.map +1 -0
  97. package/fesm2022/primeng-dataview.mjs +812 -0
  98. package/fesm2022/primeng-dataview.mjs.map +1 -0
  99. package/fesm2022/primeng-datepicker.mjs +4373 -0
  100. package/fesm2022/primeng-datepicker.mjs.map +1 -0
  101. package/fesm2022/primeng-dialog.mjs +1278 -0
  102. package/fesm2022/primeng-dialog.mjs.map +1 -0
  103. package/fesm2022/primeng-divider.mjs +145 -0
  104. package/fesm2022/primeng-divider.mjs.map +1 -0
  105. package/fesm2022/primeng-dock.mjs +540 -0
  106. package/fesm2022/primeng-dock.mjs.map +1 -0
  107. package/fesm2022/primeng-dom.mjs +775 -0
  108. package/fesm2022/primeng-dom.mjs.map +1 -0
  109. package/fesm2022/primeng-dragdrop.mjs +336 -0
  110. package/fesm2022/primeng-dragdrop.mjs.map +1 -0
  111. package/fesm2022/primeng-drawer.mjs +738 -0
  112. package/fesm2022/primeng-drawer.mjs.map +1 -0
  113. package/fesm2022/primeng-dynamicdialog.mjs +1242 -0
  114. package/fesm2022/primeng-dynamicdialog.mjs.map +1 -0
  115. package/fesm2022/primeng-editor.mjs +511 -0
  116. package/fesm2022/primeng-editor.mjs.map +1 -0
  117. package/fesm2022/primeng-fieldset.mjs +417 -0
  118. package/fesm2022/primeng-fieldset.mjs.map +1 -0
  119. package/fesm2022/primeng-fileupload.mjs +1561 -0
  120. package/fesm2022/primeng-fileupload.mjs.map +1 -0
  121. package/fesm2022/primeng-floatlabel.mjs +103 -0
  122. package/fesm2022/primeng-floatlabel.mjs.map +1 -0
  123. package/fesm2022/primeng-fluid.mjs +80 -0
  124. package/fesm2022/primeng-fluid.mjs.map +1 -0
  125. package/fesm2022/primeng-focustrap.mjs +110 -0
  126. package/fesm2022/primeng-focustrap.mjs.map +1 -0
  127. package/fesm2022/primeng-galleria.mjs +1874 -0
  128. package/fesm2022/primeng-galleria.mjs.map +1 -0
  129. package/fesm2022/primeng-iconfield.mjs +101 -0
  130. package/fesm2022/primeng-iconfield.mjs.map +1 -0
  131. package/fesm2022/primeng-icons-angledoubledown.mjs +37 -0
  132. package/fesm2022/primeng-icons-angledoubledown.mjs.map +1 -0
  133. package/fesm2022/primeng-icons-angledoubleleft.mjs +37 -0
  134. package/fesm2022/primeng-icons-angledoubleleft.mjs.map +1 -0
  135. package/fesm2022/primeng-icons-angledoubleright.mjs +37 -0
  136. package/fesm2022/primeng-icons-angledoubleright.mjs.map +1 -0
  137. package/fesm2022/primeng-icons-angledoubleup.mjs +37 -0
  138. package/fesm2022/primeng-icons-angledoubleup.mjs.map +1 -0
  139. package/fesm2022/primeng-icons-angledown.mjs +33 -0
  140. package/fesm2022/primeng-icons-angledown.mjs.map +1 -0
  141. package/fesm2022/primeng-icons-angleleft.mjs +33 -0
  142. package/fesm2022/primeng-icons-angleleft.mjs.map +1 -0
  143. package/fesm2022/primeng-icons-angleright.mjs +33 -0
  144. package/fesm2022/primeng-icons-angleright.mjs.map +1 -0
  145. package/fesm2022/primeng-icons-angleup.mjs +33 -0
  146. package/fesm2022/primeng-icons-angleup.mjs.map +1 -0
  147. package/fesm2022/primeng-icons-arrowdown.mjs +57 -0
  148. package/fesm2022/primeng-icons-arrowdown.mjs.map +1 -0
  149. package/fesm2022/primeng-icons-arrowdownleft.mjs +33 -0
  150. package/fesm2022/primeng-icons-arrowdownleft.mjs.map +1 -0
  151. package/fesm2022/primeng-icons-arrowdownright.mjs +33 -0
  152. package/fesm2022/primeng-icons-arrowdownright.mjs.map +1 -0
  153. package/fesm2022/primeng-icons-arrowleft.mjs +57 -0
  154. package/fesm2022/primeng-icons-arrowleft.mjs.map +1 -0
  155. package/fesm2022/primeng-icons-arrowright.mjs +37 -0
  156. package/fesm2022/primeng-icons-arrowright.mjs.map +1 -0
  157. package/fesm2022/primeng-icons-arrowup.mjs +57 -0
  158. package/fesm2022/primeng-icons-arrowup.mjs.map +1 -0
  159. package/fesm2022/primeng-icons-ban.mjs +53 -0
  160. package/fesm2022/primeng-icons-ban.mjs.map +1 -0
  161. package/fesm2022/primeng-icons-bars.mjs +37 -0
  162. package/fesm2022/primeng-icons-bars.mjs.map +1 -0
  163. package/fesm2022/primeng-icons-baseicon.mjs +102 -0
  164. package/fesm2022/primeng-icons-baseicon.mjs.map +1 -0
  165. package/fesm2022/primeng-icons-blank.mjs +23 -0
  166. package/fesm2022/primeng-icons-blank.mjs.map +1 -0
  167. package/fesm2022/primeng-icons-calendar.mjs +33 -0
  168. package/fesm2022/primeng-icons-calendar.mjs.map +1 -0
  169. package/fesm2022/primeng-icons-caretleft.mjs +33 -0
  170. package/fesm2022/primeng-icons-caretleft.mjs.map +1 -0
  171. package/fesm2022/primeng-icons-caretright.mjs +33 -0
  172. package/fesm2022/primeng-icons-caretright.mjs.map +1 -0
  173. package/fesm2022/primeng-icons-check.mjs +33 -0
  174. package/fesm2022/primeng-icons-check.mjs.map +1 -0
  175. package/fesm2022/primeng-icons-chevrondown.mjs +33 -0
  176. package/fesm2022/primeng-icons-chevrondown.mjs.map +1 -0
  177. package/fesm2022/primeng-icons-chevronleft.mjs +33 -0
  178. package/fesm2022/primeng-icons-chevronleft.mjs.map +1 -0
  179. package/fesm2022/primeng-icons-chevronright.mjs +33 -0
  180. package/fesm2022/primeng-icons-chevronright.mjs.map +1 -0
  181. package/fesm2022/primeng-icons-chevronup.mjs +33 -0
  182. package/fesm2022/primeng-icons-chevronup.mjs.map +1 -0
  183. package/fesm2022/primeng-icons-exclamationtriangle.mjs +69 -0
  184. package/fesm2022/primeng-icons-exclamationtriangle.mjs.map +1 -0
  185. package/fesm2022/primeng-icons-eye.mjs +37 -0
  186. package/fesm2022/primeng-icons-eye.mjs.map +1 -0
  187. package/fesm2022/primeng-icons-eyeslash.mjs +57 -0
  188. package/fesm2022/primeng-icons-eyeslash.mjs.map +1 -0
  189. package/fesm2022/primeng-icons-filter.mjs +53 -0
  190. package/fesm2022/primeng-icons-filter.mjs.map +1 -0
  191. package/fesm2022/primeng-icons-filterfill.mjs +33 -0
  192. package/fesm2022/primeng-icons-filterfill.mjs.map +1 -0
  193. package/fesm2022/primeng-icons-filterslash.mjs +57 -0
  194. package/fesm2022/primeng-icons-filterslash.mjs.map +1 -0
  195. package/fesm2022/primeng-icons-home.mjs +57 -0
  196. package/fesm2022/primeng-icons-home.mjs.map +1 -0
  197. package/fesm2022/primeng-icons-infocircle.mjs +57 -0
  198. package/fesm2022/primeng-icons-infocircle.mjs.map +1 -0
  199. package/fesm2022/primeng-icons-minus.mjs +33 -0
  200. package/fesm2022/primeng-icons-minus.mjs.map +1 -0
  201. package/fesm2022/primeng-icons-pencil.mjs +53 -0
  202. package/fesm2022/primeng-icons-pencil.mjs.map +1 -0
  203. package/fesm2022/primeng-icons-plus.mjs +53 -0
  204. package/fesm2022/primeng-icons-plus.mjs.map +1 -0
  205. package/fesm2022/primeng-icons-refresh.mjs +57 -0
  206. package/fesm2022/primeng-icons-refresh.mjs.map +1 -0
  207. package/fesm2022/primeng-icons-search.mjs +57 -0
  208. package/fesm2022/primeng-icons-search.mjs.map +1 -0
  209. package/fesm2022/primeng-icons-searchminus.mjs +57 -0
  210. package/fesm2022/primeng-icons-searchminus.mjs.map +1 -0
  211. package/fesm2022/primeng-icons-searchplus.mjs +57 -0
  212. package/fesm2022/primeng-icons-searchplus.mjs.map +1 -0
  213. package/fesm2022/primeng-icons-sortalt.mjs +65 -0
  214. package/fesm2022/primeng-icons-sortalt.mjs.map +1 -0
  215. package/fesm2022/primeng-icons-sortamountdown.mjs +53 -0
  216. package/fesm2022/primeng-icons-sortamountdown.mjs.map +1 -0
  217. package/fesm2022/primeng-icons-sortamountupalt.mjs +53 -0
  218. package/fesm2022/primeng-icons-sortamountupalt.mjs.map +1 -0
  219. package/fesm2022/primeng-icons-spinner.mjs +53 -0
  220. package/fesm2022/primeng-icons-spinner.mjs.map +1 -0
  221. package/fesm2022/primeng-icons-star.mjs +53 -0
  222. package/fesm2022/primeng-icons-star.mjs.map +1 -0
  223. package/fesm2022/primeng-icons-starfill.mjs +53 -0
  224. package/fesm2022/primeng-icons-starfill.mjs.map +1 -0
  225. package/fesm2022/primeng-icons-thlarge.mjs +57 -0
  226. package/fesm2022/primeng-icons-thlarge.mjs.map +1 -0
  227. package/fesm2022/primeng-icons-times.mjs +33 -0
  228. package/fesm2022/primeng-icons-times.mjs.map +1 -0
  229. package/fesm2022/primeng-icons-timescircle.mjs +57 -0
  230. package/fesm2022/primeng-icons-timescircle.mjs.map +1 -0
  231. package/fesm2022/primeng-icons-trash.mjs +57 -0
  232. package/fesm2022/primeng-icons-trash.mjs.map +1 -0
  233. package/fesm2022/primeng-icons-undo.mjs +57 -0
  234. package/fesm2022/primeng-icons-undo.mjs.map +1 -0
  235. package/fesm2022/primeng-icons-upload.mjs +57 -0
  236. package/fesm2022/primeng-icons-upload.mjs.map +1 -0
  237. package/fesm2022/primeng-icons-windowmaximize.mjs +57 -0
  238. package/fesm2022/primeng-icons-windowmaximize.mjs.map +1 -0
  239. package/fesm2022/primeng-icons-windowminimize.mjs +57 -0
  240. package/fesm2022/primeng-icons-windowminimize.mjs.map +1 -0
  241. package/fesm2022/primeng-icons.mjs +63 -0
  242. package/fesm2022/primeng-icons.mjs.map +1 -0
  243. package/fesm2022/primeng-iftalabel.mjs +89 -0
  244. package/fesm2022/primeng-iftalabel.mjs.map +1 -0
  245. package/fesm2022/primeng-image.mjs +705 -0
  246. package/fesm2022/primeng-image.mjs.map +1 -0
  247. package/fesm2022/primeng-imagecompare.mjs +192 -0
  248. package/fesm2022/primeng-imagecompare.mjs.map +1 -0
  249. package/fesm2022/primeng-inplace.mjs +319 -0
  250. package/fesm2022/primeng-inplace.mjs.map +1 -0
  251. package/fesm2022/primeng-inputgroup.mjs +128 -0
  252. package/fesm2022/primeng-inputgroup.mjs.map +1 -0
  253. package/fesm2022/primeng-inputgroupaddon.mjs +83 -0
  254. package/fesm2022/primeng-inputgroupaddon.mjs.map +1 -0
  255. package/fesm2022/primeng-inputicon.mjs +71 -0
  256. package/fesm2022/primeng-inputicon.mjs.map +1 -0
  257. package/fesm2022/primeng-inputmask.mjs +926 -0
  258. package/fesm2022/primeng-inputmask.mjs.map +1 -0
  259. package/fesm2022/primeng-inputnumber.mjs +1621 -0
  260. package/fesm2022/primeng-inputnumber.mjs.map +1 -0
  261. package/fesm2022/primeng-inputotp.mjs +443 -0
  262. package/fesm2022/primeng-inputotp.mjs.map +1 -0
  263. package/fesm2022/primeng-inputtext.mjs +145 -0
  264. package/fesm2022/primeng-inputtext.mjs.map +1 -0
  265. package/fesm2022/primeng-keyfilter.mjs +267 -0
  266. package/fesm2022/primeng-keyfilter.mjs.map +1 -0
  267. package/fesm2022/primeng-knob.mjs +491 -0
  268. package/fesm2022/primeng-knob.mjs.map +1 -0
  269. package/fesm2022/primeng-listbox.mjs +1925 -0
  270. package/fesm2022/primeng-listbox.mjs.map +1 -0
  271. package/fesm2022/primeng-megamenu.mjs +1493 -0
  272. package/fesm2022/primeng-megamenu.mjs.map +1 -0
  273. package/fesm2022/primeng-menu.mjs +1069 -0
  274. package/fesm2022/primeng-menu.mjs.map +1 -0
  275. package/fesm2022/primeng-menubar.mjs +1391 -0
  276. package/fesm2022/primeng-menubar.mjs.map +1 -0
  277. package/fesm2022/primeng-message.mjs +420 -0
  278. package/fesm2022/primeng-message.mjs.map +1 -0
  279. package/fesm2022/primeng-metergroup.mjs +393 -0
  280. package/fesm2022/primeng-metergroup.mjs.map +1 -0
  281. package/fesm2022/primeng-multiselect.mjs +2519 -0
  282. package/fesm2022/primeng-multiselect.mjs.map +1 -0
  283. package/fesm2022/primeng-orderlist.mjs +890 -0
  284. package/fesm2022/primeng-orderlist.mjs.map +1 -0
  285. package/fesm2022/primeng-organizationchart.mjs +520 -0
  286. package/fesm2022/primeng-organizationchart.mjs.map +1 -0
  287. package/fesm2022/primeng-overlay.mjs +776 -0
  288. package/fesm2022/primeng-overlay.mjs.map +1 -0
  289. package/fesm2022/primeng-overlaybadge.mjs +151 -0
  290. package/fesm2022/primeng-overlaybadge.mjs.map +1 -0
  291. package/fesm2022/primeng-paginator.mjs +802 -0
  292. package/fesm2022/primeng-paginator.mjs.map +1 -0
  293. package/fesm2022/primeng-panel.mjs +595 -0
  294. package/fesm2022/primeng-panel.mjs.map +1 -0
  295. package/fesm2022/primeng-panelmenu.mjs +1442 -0
  296. package/fesm2022/primeng-panelmenu.mjs.map +1 -0
  297. package/fesm2022/primeng-password.mjs +1156 -0
  298. package/fesm2022/primeng-password.mjs.map +1 -0
  299. package/fesm2022/primeng-picklist.mjs +2057 -0
  300. package/fesm2022/primeng-picklist.mjs.map +1 -0
  301. package/fesm2022/primeng-popover.mjs +611 -0
  302. package/fesm2022/primeng-popover.mjs.map +1 -0
  303. package/fesm2022/primeng-progressbar.mjs +196 -0
  304. package/fesm2022/primeng-progressbar.mjs.map +1 -0
  305. package/fesm2022/primeng-progressspinner.mjs +140 -0
  306. package/fesm2022/primeng-progressspinner.mjs.map +1 -0
  307. package/fesm2022/primeng-radiobutton.mjs +358 -0
  308. package/fesm2022/primeng-radiobutton.mjs.map +1 -0
  309. package/fesm2022/primeng-rating.mjs +388 -0
  310. package/fesm2022/primeng-rating.mjs.map +1 -0
  311. package/fesm2022/primeng-ripple.mjs +190 -0
  312. package/fesm2022/primeng-ripple.mjs.map +1 -0
  313. package/fesm2022/primeng-scroller.mjs +1306 -0
  314. package/fesm2022/primeng-scroller.mjs.map +1 -0
  315. package/fesm2022/primeng-scrollpanel.mjs +560 -0
  316. package/fesm2022/primeng-scrollpanel.mjs.map +1 -0
  317. package/fesm2022/primeng-scrolltop.mjs +339 -0
  318. package/fesm2022/primeng-scrolltop.mjs.map +1 -0
  319. package/fesm2022/primeng-select.mjs +2250 -0
  320. package/fesm2022/primeng-select.mjs.map +1 -0
  321. package/fesm2022/primeng-selectbutton.mjs +413 -0
  322. package/fesm2022/primeng-selectbutton.mjs.map +1 -0
  323. package/fesm2022/primeng-skeleton.mjs +154 -0
  324. package/fesm2022/primeng-skeleton.mjs.map +1 -0
  325. package/fesm2022/primeng-slider.mjs +843 -0
  326. package/fesm2022/primeng-slider.mjs.map +1 -0
  327. package/fesm2022/primeng-speeddial.mjs +901 -0
  328. package/fesm2022/primeng-speeddial.mjs.map +1 -0
  329. package/fesm2022/primeng-splitbutton.mjs +598 -0
  330. package/fesm2022/primeng-splitbutton.mjs.map +1 -0
  331. package/fesm2022/primeng-splitter.mjs +587 -0
  332. package/fesm2022/primeng-splitter.mjs.map +1 -0
  333. package/fesm2022/primeng-stepper.mjs +683 -0
  334. package/fesm2022/primeng-stepper.mjs.map +1 -0
  335. package/fesm2022/primeng-steps.mjs +424 -0
  336. package/fesm2022/primeng-steps.mjs.map +1 -0
  337. package/fesm2022/primeng-styleclass.mjs +354 -0
  338. package/fesm2022/primeng-styleclass.mjs.map +1 -0
  339. package/fesm2022/primeng-table.mjs +7540 -0
  340. package/fesm2022/primeng-table.mjs.map +1 -0
  341. package/fesm2022/primeng-tabs.mjs +794 -0
  342. package/fesm2022/primeng-tabs.mjs.map +1 -0
  343. package/fesm2022/primeng-tag.mjs +176 -0
  344. package/fesm2022/primeng-tag.mjs.map +1 -0
  345. package/fesm2022/primeng-terminal.mjs +254 -0
  346. package/fesm2022/primeng-terminal.mjs.map +1 -0
  347. package/fesm2022/primeng-textarea.mjs +197 -0
  348. package/fesm2022/primeng-textarea.mjs.map +1 -0
  349. package/fesm2022/primeng-tieredmenu.mjs +1457 -0
  350. package/fesm2022/primeng-tieredmenu.mjs.map +1 -0
  351. package/fesm2022/primeng-timeline.mjs +228 -0
  352. package/fesm2022/primeng-timeline.mjs.map +1 -0
  353. package/fesm2022/primeng-toast.mjs +751 -0
  354. package/fesm2022/primeng-toast.mjs.map +1 -0
  355. package/fesm2022/primeng-togglebutton.mjs +361 -0
  356. package/fesm2022/primeng-togglebutton.mjs.map +1 -0
  357. package/fesm2022/primeng-toggleswitch.mjs +330 -0
  358. package/fesm2022/primeng-toggleswitch.mjs.map +1 -0
  359. package/fesm2022/primeng-toolbar.mjs +189 -0
  360. package/fesm2022/primeng-toolbar.mjs.map +1 -0
  361. package/fesm2022/primeng-tooltip.mjs +757 -0
  362. package/fesm2022/primeng-tooltip.mjs.map +1 -0
  363. package/fesm2022/primeng-tree.mjs +2188 -0
  364. package/fesm2022/primeng-tree.mjs.map +1 -0
  365. package/fesm2022/primeng-treeselect.mjs +1328 -0
  366. package/fesm2022/primeng-treeselect.mjs.map +1 -0
  367. package/fesm2022/primeng-treetable.mjs +5080 -0
  368. package/fesm2022/primeng-treetable.mjs.map +1 -0
  369. package/fesm2022/primeng-ts-helpers.mjs +4 -0
  370. package/fesm2022/primeng-ts-helpers.mjs.map +1 -0
  371. package/fesm2022/primeng-usestyle.mjs +52 -0
  372. package/fesm2022/primeng-usestyle.mjs.map +1 -0
  373. package/fesm2022/primeng-utils.mjs +332 -0
  374. package/fesm2022/primeng-utils.mjs.map +1 -0
  375. package/fesm2022/primeng.mjs +6 -0
  376. package/fesm2022/primeng.mjs.map +1 -0
  377. package/fieldset/index.d.ts +217 -0
  378. package/fileupload/index.d.ts +786 -0
  379. package/floatlabel/index.d.ts +59 -0
  380. package/fluid/index.d.ts +48 -0
  381. package/focustrap/index.d.ts +36 -0
  382. package/galleria/index.d.ts +710 -0
  383. package/iconfield/index.d.ts +64 -0
  384. package/icons/angledoubledown/index.d.ts +9 -0
  385. package/icons/angledoubleleft/index.d.ts +9 -0
  386. package/icons/angledoubleright/index.d.ts +9 -0
  387. package/icons/angledoubleup/index.d.ts +9 -0
  388. package/icons/angledown/index.d.ts +9 -0
  389. package/icons/angleleft/index.d.ts +9 -0
  390. package/icons/angleright/index.d.ts +9 -0
  391. package/icons/angleup/index.d.ts +9 -0
  392. package/icons/arrowdown/index.d.ts +12 -0
  393. package/icons/arrowdownleft/index.d.ts +9 -0
  394. package/icons/arrowdownright/index.d.ts +9 -0
  395. package/icons/arrowleft/index.d.ts +11 -0
  396. package/icons/arrowright/index.d.ts +9 -0
  397. package/icons/arrowup/index.d.ts +11 -0
  398. package/icons/ban/index.d.ts +11 -0
  399. package/icons/bars/index.d.ts +9 -0
  400. package/icons/baseicon/index.d.ts +33 -0
  401. package/icons/blank/index.d.ts +9 -0
  402. package/icons/calendar/index.d.ts +9 -0
  403. package/icons/caretleft/index.d.ts +9 -0
  404. package/icons/caretright/index.d.ts +9 -0
  405. package/icons/check/index.d.ts +9 -0
  406. package/icons/chevrondown/index.d.ts +9 -0
  407. package/icons/chevronleft/index.d.ts +9 -0
  408. package/icons/chevronright/index.d.ts +9 -0
  409. package/icons/chevronup/index.d.ts +9 -0
  410. package/icons/exclamationtriangle/index.d.ts +12 -0
  411. package/icons/eye/index.d.ts +9 -0
  412. package/icons/eyeslash/index.d.ts +11 -0
  413. package/icons/filter/index.d.ts +11 -0
  414. package/icons/filterfill/index.d.ts +9 -0
  415. package/icons/filterslash/index.d.ts +11 -0
  416. package/icons/home/index.d.ts +11 -0
  417. package/icons/index.d.ts +53 -0
  418. package/icons/infocircle/index.d.ts +11 -0
  419. package/icons/minus/index.d.ts +9 -0
  420. package/icons/pencil/index.d.ts +11 -0
  421. package/icons/plus/index.d.ts +11 -0
  422. package/icons/refresh/index.d.ts +11 -0
  423. package/icons/search/index.d.ts +11 -0
  424. package/icons/searchminus/index.d.ts +11 -0
  425. package/icons/searchplus/index.d.ts +11 -0
  426. package/icons/sortalt/index.d.ts +11 -0
  427. package/icons/sortamountdown/index.d.ts +11 -0
  428. package/icons/sortamountupalt/index.d.ts +11 -0
  429. package/icons/spinner/index.d.ts +11 -0
  430. package/icons/star/index.d.ts +11 -0
  431. package/icons/starfill/index.d.ts +11 -0
  432. package/icons/thlarge/index.d.ts +11 -0
  433. package/icons/times/index.d.ts +9 -0
  434. package/icons/timescircle/index.d.ts +11 -0
  435. package/icons/trash/index.d.ts +11 -0
  436. package/icons/undo/index.d.ts +11 -0
  437. package/icons/upload/index.d.ts +11 -0
  438. package/icons/windowmaximize/index.d.ts +11 -0
  439. package/icons/windowminimize/index.d.ts +11 -0
  440. package/iftalabel/index.d.ts +50 -0
  441. package/image/index.d.ts +376 -0
  442. package/imagecompare/index.d.ts +93 -0
  443. package/index.d.ts +2 -0
  444. package/inplace/index.d.ts +183 -0
  445. package/inputgroup/index.d.ts +58 -0
  446. package/inputgroupaddon/index.d.ts +45 -0
  447. package/inputicon/index.d.ts +36 -0
  448. package/inputmask/index.d.ts +282 -0
  449. package/inputnumber/index.d.ts +466 -0
  450. package/inputotp/index.d.ts +209 -0
  451. package/inputtext/index.d.ts +89 -0
  452. package/keyfilter/index.d.ts +66 -0
  453. package/knob/index.d.ts +206 -0
  454. package/listbox/index.d.ts +802 -0
  455. package/megamenu/index.d.ts +408 -0
  456. package/menu/index.d.ts +341 -0
  457. package/menubar/index.d.ts +418 -0
  458. package/message/index.d.ts +195 -0
  459. package/metergroup/index.d.ts +291 -0
  460. package/multiselect/index.d.ts +1060 -0
  461. package/orderlist/index.d.ts +464 -0
  462. package/organizationchart/index.d.ts +285 -0
  463. package/overlay/index.d.ts +255 -0
  464. package/overlaybadge/index.d.ts +73 -0
  465. package/package.json +725 -0
  466. package/paginator/index.d.ts +393 -0
  467. package/panel/index.d.ts +266 -0
  468. package/panelmenu/index.d.ts +380 -0
  469. package/password/index.d.ts +436 -0
  470. package/picklist/index.d.ts +906 -0
  471. package/popover/index.d.ts +176 -0
  472. package/progressbar/index.d.ts +112 -0
  473. package/progressspinner/index.d.ts +85 -0
  474. package/radiobutton/index.d.ts +201 -0
  475. package/rating/index.d.ts +218 -0
  476. package/ripple/index.d.ts +62 -0
  477. package/scroller/index.d.ts +614 -0
  478. package/scrollpanel/index.d.ts +161 -0
  479. package/scrolltop/index.d.ts +158 -0
  480. package/select/index.d.ts +923 -0
  481. package/selectbutton/index.d.ts +221 -0
  482. package/skeleton/index.d.ts +96 -0
  483. package/slider/index.d.ts +255 -0
  484. package/speeddial/index.d.ts +454 -0
  485. package/splitbutton/index.d.ts +306 -0
  486. package/splitter/index.d.ts +239 -0
  487. package/stepper/index.d.ts +297 -0
  488. package/steps/index.d.ts +152 -0
  489. package/styleclass/index.d.ts +115 -0
  490. package/table/index.d.ts +2700 -0
  491. package/tabs/index.d.ts +321 -0
  492. package/tag/index.d.ts +114 -0
  493. package/terminal/index.d.ts +134 -0
  494. package/textarea/index.d.ts +108 -0
  495. package/tieredmenu/index.d.ts +430 -0
  496. package/timeline/index.d.ts +170 -0
  497. package/toast/index.d.ts +320 -0
  498. package/togglebutton/index.d.ts +243 -0
  499. package/toggleswitch/index.d.ts +188 -0
  500. package/toolbar/index.d.ts +118 -0
  501. package/tooltip/index.d.ts +247 -0
  502. package/tree/index.d.ts +847 -0
  503. package/treeselect/index.d.ts +655 -0
  504. package/treetable/index.d.ts +1727 -0
  505. package/ts-helpers/index.d.ts +6 -0
  506. package/usestyle/index.d.ts +15 -0
  507. package/utils/index.d.ts +43 -0
@@ -0,0 +1,2519 @@
1
+ import * as i1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, forwardRef, EventEmitter, inject, booleanAttribute, numberAttribute, Output, Input, ViewEncapsulation, Component, input, signal, computed, effect, ContentChildren, ContentChild, ViewChild, ChangeDetectionStrategy, NgModule } from '@angular/core';
5
+ import * as i2 from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
+ import { deepEquals, isNotEmpty, isArray, uuid, equals, focus, findLastIndex, resolveFieldData, isPrintableCharacter, getFirstFocusableElement, getLastFocusableElement, findSingle, getFocusableElements } from '@primeuix/utils';
8
+ import * as i3 from 'primeng/api';
9
+ import { SharedModule, TranslationKeys, Footer, Header, PrimeTemplate } from 'primeng/api';
10
+ import { AutoFocus } from 'primeng/autofocus';
11
+ import { BaseComponent } from 'primeng/basecomponent';
12
+ import { BaseEditableHolder } from 'primeng/baseeditableholder';
13
+ import { Checkbox } from 'primeng/checkbox';
14
+ import { Chip } from 'primeng/chip';
15
+ import { DomHandler, unblockBodyScroll } from 'primeng/dom';
16
+ import { Fluid } from 'primeng/fluid';
17
+ import { IconField } from 'primeng/iconfield';
18
+ import { CheckIcon, SearchIcon, TimesIcon, ChevronDownIcon } from 'primeng/icons';
19
+ import { InputIcon } from 'primeng/inputicon';
20
+ import { InputText } from 'primeng/inputtext';
21
+ import { Overlay } from 'primeng/overlay';
22
+ import { Ripple } from 'primeng/ripple';
23
+ import { Scroller } from 'primeng/scroller';
24
+ import { Tooltip } from 'primeng/tooltip';
25
+ import { ObjectUtils } from 'primeng/utils';
26
+ import { style } from '@primeuix/styles/multiselect';
27
+ import { BaseStyle } from 'primeng/base';
28
+
29
+ const theme = /*css*/ `
30
+ ${style}
31
+
32
+ /* For PrimeNG */
33
+ .p-multiselect.ng-invalid.ng-dirty {
34
+ border-color: dt('multiselect.invalid.border.color');
35
+ }
36
+ p-multiSelect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder,
37
+ p-multi-select.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder,
38
+ p-multiselect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder {
39
+ color: dt('multiselect.invalid.placeholder.color');
40
+ }
41
+ `;
42
+ const inlineStyles = {
43
+ root: ({ instance }) => ({ position: instance.$appendTo() === 'self' ? 'relative' : undefined })
44
+ };
45
+ const classes = {
46
+ root: ({ instance }) => [
47
+ 'p-multiselect p-component p-inputwrapper',
48
+ {
49
+ 'p-multiselect p-component p-inputwrapper': true,
50
+ 'p-multiselect-display-chip': instance.display === 'chip',
51
+ 'p-disabled': instance.$disabled(),
52
+ 'p-invalid': instance.invalid(),
53
+ 'p-variant-filled': instance.$variant(),
54
+ 'p-focus': instance.focused,
55
+ 'p-inputwrapper-filled': instance.$filled(),
56
+ 'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
57
+ 'p-multiselect-open': instance.overlayVisible,
58
+ 'p-multiselect-fluid': instance.hasFluid,
59
+ 'p-multiselect-sm p-inputfield-sm': instance.size() === 'small',
60
+ 'p-multiselect-lg p-inputfield-lg': instance.size() === 'large'
61
+ }
62
+ ],
63
+ labelContainer: 'p-multiselect-label-container',
64
+ label: ({ instance }) => ({
65
+ 'p-multiselect-label': true,
66
+ 'p-placeholder': instance.label() === instance.placeholder(),
67
+ 'p-multiselect-label-empty': !instance.placeholder() && !instance.defaultLabel && (!instance.modelValue() || instance.modelValue().length === 0)
68
+ }),
69
+ chipItem: 'p-multiselect-chip-item',
70
+ pcChip: 'p-multiselect-chip',
71
+ chipIcon: 'p-multiselect-chip-icon',
72
+ dropdown: 'p-multiselect-dropdown',
73
+ loadingIcon: 'p-multiselect-loading-icon',
74
+ dropdownIcon: 'p-multiselect-dropdown-icon',
75
+ overlay: 'p-multiselect-overlay p-component-overlay p-component',
76
+ header: 'p-multiselect-header',
77
+ pcFilterContainer: 'p-multiselect-filter-container',
78
+ pcFilter: 'p-multiselect-filter',
79
+ listContainer: 'p-multiselect-list-container',
80
+ list: 'p-multiselect-list',
81
+ optionGroup: 'p-multiselect-option-group',
82
+ option: ({ instance }) => ({
83
+ 'p-multiselect-option': true,
84
+ 'p-multiselect-option-selected': instance.selected && instance.highlightOnSelect,
85
+ 'p-disabled': instance.disabled,
86
+ 'p-focus': instance.focused
87
+ }),
88
+ emptyMessage: 'p-multiselect-empty-message',
89
+ clearIcon: 'p-multiselect-clear-icon'
90
+ };
91
+ class MultiSelectStyle extends BaseStyle {
92
+ name = 'multiselect';
93
+ theme = theme;
94
+ classes = classes;
95
+ inlineStyles = inlineStyles;
96
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
97
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectStyle });
98
+ }
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectStyle, decorators: [{
100
+ type: Injectable
101
+ }] });
102
+ /**
103
+ *
104
+ * MultiSelect is used to select multiple items from a collection.
105
+ *
106
+ * [Live Demo](https://www.primeng.org/multiselect/)
107
+ *
108
+ * @module multiselectstyle
109
+ *
110
+ */
111
+ var MultiSelectClasses;
112
+ (function (MultiSelectClasses) {
113
+ /**
114
+ * Class name of the root element
115
+ */
116
+ MultiSelectClasses["root"] = "p-multiselect";
117
+ /**
118
+ * Class name of the label container element
119
+ */
120
+ MultiSelectClasses["labelContainer"] = "p-multiselect-label-container";
121
+ /**
122
+ * Class name of the label element
123
+ */
124
+ MultiSelectClasses["label"] = "p-multiselect-label";
125
+ /**
126
+ * Class name of the chip item element
127
+ */
128
+ MultiSelectClasses["chipItem"] = "p-multiselect-chip-item";
129
+ /**
130
+ * Class name of the chip element
131
+ */
132
+ MultiSelectClasses["pcChip"] = "p-multiselect-chip";
133
+ /**
134
+ * Class name of the chip icon element
135
+ */
136
+ MultiSelectClasses["chipIcon"] = "p-multiselect-chip-icon";
137
+ /**
138
+ * Class name of the dropdown element
139
+ */
140
+ MultiSelectClasses["dropdown"] = "p-multiselect-dropdown";
141
+ /**
142
+ * Class name of the loading icon element
143
+ */
144
+ MultiSelectClasses["loadingIcon"] = "p-multiselect-loading-icon";
145
+ /**
146
+ * Class name of the dropdown icon element
147
+ */
148
+ MultiSelectClasses["dropdownIcon"] = "p-multiselect-dropdown-icon";
149
+ /**
150
+ * Class name of the overlay element
151
+ */
152
+ MultiSelectClasses["overlay"] = "p-multiselect-overlay";
153
+ /**
154
+ * Class name of the header element
155
+ */
156
+ MultiSelectClasses["header"] = "p-multiselect-header";
157
+ /**
158
+ * Class name of the filter container element
159
+ */
160
+ MultiSelectClasses["pcFilterContainer"] = "p-multiselect-filter-container";
161
+ /**
162
+ * Class name of the filter element
163
+ */
164
+ MultiSelectClasses["pcFilter"] = "p-multiselect-filter";
165
+ /**
166
+ * Class name of the list container element
167
+ */
168
+ MultiSelectClasses["listContainer"] = "p-multiselect-list-container";
169
+ /**
170
+ * Class name of the list element
171
+ */
172
+ MultiSelectClasses["list"] = "p-multiselect-list";
173
+ /**
174
+ * Class name of the option group element
175
+ */
176
+ MultiSelectClasses["optionGroup"] = "p-multiselect-option-group";
177
+ /**
178
+ * Class name of the option element
179
+ */
180
+ MultiSelectClasses["option"] = "p-multiselect-option";
181
+ /**
182
+ * Class name of the empty message element
183
+ */
184
+ MultiSelectClasses["emptyMessage"] = "p-multiselect-empty-message";
185
+ /**
186
+ * Class name of the clear icon
187
+ */
188
+ MultiSelectClasses["clearIcon"] = "p-autocomplete-clear-icon";
189
+ })(MultiSelectClasses || (MultiSelectClasses = {}));
190
+
191
+ const MULTISELECT_VALUE_ACCESSOR = {
192
+ provide: NG_VALUE_ACCESSOR,
193
+ useExisting: forwardRef(() => MultiSelect),
194
+ multi: true
195
+ };
196
+ class MultiSelectItem extends BaseComponent {
197
+ id;
198
+ option;
199
+ selected;
200
+ label;
201
+ disabled;
202
+ itemSize;
203
+ focused;
204
+ ariaPosInset;
205
+ ariaSetSize;
206
+ variant;
207
+ template;
208
+ checkIconTemplate;
209
+ itemCheckboxIconTemplate;
210
+ highlightOnSelect;
211
+ onClick = new EventEmitter();
212
+ onMouseEnter = new EventEmitter();
213
+ _componentStyle = inject(MultiSelectStyle);
214
+ onOptionClick(event) {
215
+ this.onClick.emit({
216
+ originalEvent: event,
217
+ option: this.option,
218
+ selected: this.selected
219
+ });
220
+ event.stopPropagation();
221
+ event.preventDefault();
222
+ }
223
+ onOptionMouseEnter(event) {
224
+ this.onMouseEnter.emit({
225
+ originalEvent: event,
226
+ option: this.option,
227
+ selected: this.selected
228
+ });
229
+ }
230
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectItem, deps: null, target: i0.ɵɵFactoryTarget.Component });
231
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.4", type: MultiSelectItem, isStandalone: true, selector: "p-multiSelectItem, p-multiselect-item", inputs: { id: "id", option: "option", selected: ["selected", "selected", booleanAttribute], label: "label", disabled: ["disabled", "disabled", booleanAttribute], itemSize: ["itemSize", "itemSize", numberAttribute], focused: ["focused", "focused", booleanAttribute], ariaPosInset: "ariaPosInset", ariaSetSize: "ariaSetSize", variant: "variant", template: "template", checkIconTemplate: "checkIconTemplate", itemCheckboxIconTemplate: "itemCheckboxIconTemplate", highlightOnSelect: ["highlightOnSelect", "highlightOnSelect", booleanAttribute] }, outputs: { onClick: "onClick", onMouseEnter: "onMouseEnter" }, providers: [MultiSelectStyle], usesInheritance: true, ngImport: i0, template: `
232
+ <li
233
+ pRipple
234
+ [class]="cx('option')"
235
+ role="option"
236
+ [ngStyle]="{ height: itemSize + 'px' }"
237
+ [id]="id"
238
+ [attr.aria-label]="label"
239
+ [attr.aria-setsize]="ariaSetSize"
240
+ [attr.aria-posinset]="ariaPosInset"
241
+ [attr.aria-selected]="selected"
242
+ [attr.data-p-focused]="focused"
243
+ [attr.data-p-highlight]="selected"
244
+ [attr.data-p-disabled]="disabled"
245
+ [attr.aria-checked]="selected"
246
+ (click)="onOptionClick($event)"
247
+ (mouseenter)="onOptionMouseEnter($event)"
248
+ >
249
+ <p-checkbox [ngModel]="selected" [binary]="true" [tabindex]="-1" [variant]="variant" [ariaLabel]="label">
250
+ <ng-container *ngIf="itemCheckboxIconTemplate">
251
+ <ng-template #icon let-klass="class">
252
+ <ng-template *ngTemplateOutlet="itemCheckboxIconTemplate; context: { checked: selected, class: klass }"></ng-template>
253
+ </ng-template>
254
+ </ng-container>
255
+ </p-checkbox>
256
+ <span *ngIf="!template">{{ label ?? 'empty' }}</span>
257
+ <ng-container *ngTemplateOutlet="template; context: { $implicit: option }"></ng-container>
258
+ </li>
259
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: SharedModule }], encapsulation: i0.ViewEncapsulation.None });
260
+ }
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectItem, decorators: [{
262
+ type: Component,
263
+ args: [{
264
+ selector: 'p-multiSelectItem, p-multiselect-item',
265
+ standalone: true,
266
+ imports: [CommonModule, Checkbox, FormsModule, Ripple, SharedModule],
267
+ template: `
268
+ <li
269
+ pRipple
270
+ [class]="cx('option')"
271
+ role="option"
272
+ [ngStyle]="{ height: itemSize + 'px' }"
273
+ [id]="id"
274
+ [attr.aria-label]="label"
275
+ [attr.aria-setsize]="ariaSetSize"
276
+ [attr.aria-posinset]="ariaPosInset"
277
+ [attr.aria-selected]="selected"
278
+ [attr.data-p-focused]="focused"
279
+ [attr.data-p-highlight]="selected"
280
+ [attr.data-p-disabled]="disabled"
281
+ [attr.aria-checked]="selected"
282
+ (click)="onOptionClick($event)"
283
+ (mouseenter)="onOptionMouseEnter($event)"
284
+ >
285
+ <p-checkbox [ngModel]="selected" [binary]="true" [tabindex]="-1" [variant]="variant" [ariaLabel]="label">
286
+ <ng-container *ngIf="itemCheckboxIconTemplate">
287
+ <ng-template #icon let-klass="class">
288
+ <ng-template *ngTemplateOutlet="itemCheckboxIconTemplate; context: { checked: selected, class: klass }"></ng-template>
289
+ </ng-template>
290
+ </ng-container>
291
+ </p-checkbox>
292
+ <span *ngIf="!template">{{ label ?? 'empty' }}</span>
293
+ <ng-container *ngTemplateOutlet="template; context: { $implicit: option }"></ng-container>
294
+ </li>
295
+ `,
296
+ encapsulation: ViewEncapsulation.None,
297
+ providers: [MultiSelectStyle]
298
+ }]
299
+ }], propDecorators: { id: [{
300
+ type: Input
301
+ }], option: [{
302
+ type: Input
303
+ }], selected: [{
304
+ type: Input,
305
+ args: [{ transform: booleanAttribute }]
306
+ }], label: [{
307
+ type: Input
308
+ }], disabled: [{
309
+ type: Input,
310
+ args: [{ transform: booleanAttribute }]
311
+ }], itemSize: [{
312
+ type: Input,
313
+ args: [{ transform: numberAttribute }]
314
+ }], focused: [{
315
+ type: Input,
316
+ args: [{ transform: booleanAttribute }]
317
+ }], ariaPosInset: [{
318
+ type: Input
319
+ }], ariaSetSize: [{
320
+ type: Input
321
+ }], variant: [{
322
+ type: Input
323
+ }], template: [{
324
+ type: Input
325
+ }], checkIconTemplate: [{
326
+ type: Input
327
+ }], itemCheckboxIconTemplate: [{
328
+ type: Input
329
+ }], highlightOnSelect: [{
330
+ type: Input,
331
+ args: [{ transform: booleanAttribute }]
332
+ }], onClick: [{
333
+ type: Output
334
+ }], onMouseEnter: [{
335
+ type: Output
336
+ }] } });
337
+ /**
338
+ * MultiSelect is used to select multiple items from a collection.
339
+ * @group Components
340
+ */
341
+ class MultiSelect extends BaseEditableHolder {
342
+ zone;
343
+ filterService;
344
+ overlayService;
345
+ /**
346
+ * Unique identifier of the component
347
+ * @group Props
348
+ */
349
+ id;
350
+ /**
351
+ * Defines a string that labels the input for accessibility.
352
+ * @group Props
353
+ */
354
+ ariaLabel;
355
+ /**
356
+ * Style class of the element.
357
+ * @deprecated since v20.0.0, use `class` instead.
358
+ * @group Props
359
+ */
360
+ styleClass;
361
+ /**
362
+ * Inline style of the overlay panel.
363
+ * @group Props
364
+ */
365
+ panelStyle;
366
+ /**
367
+ * Style class of the overlay panel element.
368
+ * @group Props
369
+ */
370
+ panelStyleClass;
371
+ /**
372
+ * Identifier of the focus input to match a label defined for the component.
373
+ * @group Props
374
+ */
375
+ inputId;
376
+ /**
377
+ * When present, it specifies that the component cannot be edited.
378
+ * @group Props
379
+ */
380
+ readonly;
381
+ /**
382
+ * Whether to display options as grouped when nested options are provided.
383
+ * @group Props
384
+ */
385
+ group;
386
+ /**
387
+ * When specified, displays an input field to filter the items on keyup.
388
+ * @group Props
389
+ */
390
+ filter = true;
391
+ /**
392
+ * Defines placeholder of the filter input.
393
+ * @group Props
394
+ */
395
+ filterPlaceHolder;
396
+ /**
397
+ * Locale to use in filtering. The default locale is the host environment's current locale.
398
+ * @group Props
399
+ */
400
+ filterLocale;
401
+ /**
402
+ * Specifies the visibility of the options panel.
403
+ * @group Props
404
+ */
405
+ overlayVisible;
406
+ /**
407
+ * Index of the element in tabbing order.
408
+ * @group Props
409
+ */
410
+ tabindex = 0;
411
+ /**
412
+ * A property to uniquely identify a value in options.
413
+ * @group Props
414
+ */
415
+ dataKey;
416
+ /**
417
+ * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
418
+ * @group Props
419
+ */
420
+ ariaLabelledBy;
421
+ /**
422
+ * Whether to show labels of selected item labels or use default label.
423
+ * @group Props
424
+ * @defaultValue true
425
+ */
426
+ set displaySelectedLabel(val) {
427
+ this._displaySelectedLabel = val;
428
+ }
429
+ get displaySelectedLabel() {
430
+ return this._displaySelectedLabel;
431
+ }
432
+ /**
433
+ * Decides how many selected item labels to show at most.
434
+ * @group Props
435
+ * @defaultValue 3
436
+ */
437
+ set maxSelectedLabels(val) {
438
+ this._maxSelectedLabels = val;
439
+ }
440
+ get maxSelectedLabels() {
441
+ return this._maxSelectedLabels;
442
+ }
443
+ /**
444
+ * Maximum number of selectable items.
445
+ * @group Props
446
+ */
447
+ selectionLimit;
448
+ /**
449
+ * Label to display after exceeding max selected labels e.g. ({0} items selected), defaults "ellipsis" keyword to indicate a text-overflow.
450
+ * @group Props
451
+ */
452
+ selectedItemsLabel;
453
+ /**
454
+ * Whether to show the checkbox at header to toggle all items at once.
455
+ * @group Props
456
+ */
457
+ showToggleAll = true;
458
+ /**
459
+ * Text to display when filtering does not return any results.
460
+ * @group Props
461
+ */
462
+ emptyFilterMessage = '';
463
+ /**
464
+ * Text to display when there is no data. Defaults to global value in i18n translation configuration.
465
+ * @group Props
466
+ */
467
+ emptyMessage = '';
468
+ /**
469
+ * Clears the filter value when hiding the dropdown.
470
+ * @group Props
471
+ */
472
+ resetFilterOnHide = false;
473
+ /**
474
+ * Icon class of the dropdown icon.
475
+ * @group Props
476
+ */
477
+ dropdownIcon;
478
+ /**
479
+ * Icon class of the chip icon.
480
+ * @group Props
481
+ */
482
+ chipIcon;
483
+ /**
484
+ * Name of the label field of an option.
485
+ * @group Props
486
+ */
487
+ optionLabel;
488
+ /**
489
+ * Name of the value field of an option.
490
+ * @group Props
491
+ */
492
+ optionValue;
493
+ /**
494
+ * Name of the disabled field of an option.
495
+ * @group Props
496
+ */
497
+ optionDisabled;
498
+ /**
499
+ * Name of the label field of an option group.
500
+ * @group Props
501
+ */
502
+ optionGroupLabel = 'label';
503
+ /**
504
+ * Name of the options field of an option group.
505
+ * @group Props
506
+ */
507
+ optionGroupChildren = 'items';
508
+ /**
509
+ * Whether to show the header.
510
+ * @group Props
511
+ */
512
+ showHeader = true;
513
+ /**
514
+ * When filtering is enabled, filterBy decides which field or fields (comma separated) to search against.
515
+ * @group Props
516
+ */
517
+ filterBy;
518
+ /**
519
+ * Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
520
+ * @group Props
521
+ */
522
+ scrollHeight = '200px';
523
+ /**
524
+ * Defines if data is loaded and interacted with in lazy manner.
525
+ * @group Props
526
+ */
527
+ lazy = false;
528
+ /**
529
+ * Whether the data should be loaded on demand during scroll.
530
+ * @group Props
531
+ */
532
+ virtualScroll;
533
+ /**
534
+ * Whether the multiselect is in loading state.
535
+ * @group Props
536
+ */
537
+ loading = false;
538
+ /**
539
+ * Height of an item in the list for VirtualScrolling.
540
+ * @group Props
541
+ */
542
+ virtualScrollItemSize;
543
+ /**
544
+ * Icon to display in loading state.
545
+ * @group Props
546
+ */
547
+ loadingIcon;
548
+ /**
549
+ * Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
550
+ * @group Props
551
+ */
552
+ virtualScrollOptions;
553
+ /**
554
+ * Whether to use overlay API feature. The properties of overlay API can be used like an object in it.
555
+ * @group Props
556
+ */
557
+ overlayOptions;
558
+ /**
559
+ * Defines a string that labels the filter input.
560
+ * @group Props
561
+ */
562
+ ariaFilterLabel;
563
+ /**
564
+ * Defines how the items are filtered.
565
+ * @group Props
566
+ */
567
+ filterMatchMode = 'contains';
568
+ /**
569
+ * Advisory information to display in a tooltip on hover.
570
+ * @group Props
571
+ */
572
+ tooltip = '';
573
+ /**
574
+ * Position of the tooltip.
575
+ * @group Props
576
+ */
577
+ tooltipPosition = 'right';
578
+ /**
579
+ * Type of CSS position.
580
+ * @group Props
581
+ */
582
+ tooltipPositionStyle = 'absolute';
583
+ /**
584
+ * Style class of the tooltip.
585
+ * @group Props
586
+ */
587
+ tooltipStyleClass;
588
+ /**
589
+ * Applies focus to the filter element when the overlay is shown.
590
+ * @group Props
591
+ */
592
+ autofocusFilter = false;
593
+ /**
594
+ * Defines how the selected items are displayed.
595
+ * @group Props
596
+ */
597
+ display = 'comma';
598
+ /**
599
+ * Defines the autocomplete is active.
600
+ * @group Props
601
+ */
602
+ autocomplete = 'off';
603
+ /**
604
+ * When enabled, a clear icon is displayed to clear the value.
605
+ * @group Props
606
+ */
607
+ showClear = false;
608
+ /**
609
+ * When present, it specifies that the component should automatically get focus on load.
610
+ * @group Props
611
+ */
612
+ autofocus;
613
+ /**
614
+ * Label to display when there are no selections.
615
+ * @group Props
616
+ */
617
+ set placeholder(val) {
618
+ this._placeholder.set(val);
619
+ }
620
+ get placeholder() {
621
+ return this._placeholder.asReadonly();
622
+ }
623
+ /**
624
+ * An array of objects to display as the available options.
625
+ * @group Props
626
+ */
627
+ get options() {
628
+ return this._options();
629
+ }
630
+ set options(val) {
631
+ if (!deepEquals(this._options(), val)) {
632
+ this._options.set(val);
633
+ }
634
+ }
635
+ /**
636
+ * When specified, filter displays with this value.
637
+ * @group Props
638
+ */
639
+ get filterValue() {
640
+ return this._filterValue();
641
+ }
642
+ set filterValue(val) {
643
+ this._filterValue.set(val);
644
+ }
645
+ /**
646
+ * Whether all data is selected.
647
+ * @group Props
648
+ */
649
+ get selectAll() {
650
+ return this._selectAll;
651
+ }
652
+ set selectAll(value) {
653
+ this._selectAll = value;
654
+ }
655
+ /**
656
+ * Indicates whether to focus on options when hovering over them, defaults to optionLabel.
657
+ * @group Props
658
+ */
659
+ focusOnHover = true;
660
+ /**
661
+ * Fields used when filtering the options, defaults to optionLabel.
662
+ * @group Props
663
+ */
664
+ filterFields;
665
+ /**
666
+ * Determines if the option will be selected on focus.
667
+ * @group Props
668
+ */
669
+ selectOnFocus = false;
670
+ /**
671
+ * Whether to focus on the first visible or selected element when the overlay panel is shown.
672
+ * @group Props
673
+ */
674
+ autoOptionFocus = false;
675
+ /**
676
+ * Whether the selected option will be add highlight class.
677
+ * @group Props
678
+ */
679
+ highlightOnSelect = true;
680
+ /**
681
+ * Specifies the size of the component.
682
+ * @defaultValue undefined
683
+ * @group Props
684
+ */
685
+ size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
686
+ /**
687
+ * Specifies the input variant of the component.
688
+ * @defaultValue undefined
689
+ * @group Props
690
+ */
691
+ variant = input(...(ngDevMode ? [undefined, { debugName: "variant" }] : []));
692
+ /**
693
+ * Spans 100% width of the container when enabled.
694
+ * @defaultValue undefined
695
+ * @group Props
696
+ */
697
+ fluid = input(undefined, ...(ngDevMode ? [{ debugName: "fluid", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
698
+ /**
699
+ * Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
700
+ * @defaultValue 'self'
701
+ * @group Props
702
+ */
703
+ appendTo = input(undefined, ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
704
+ /**
705
+ * Callback to invoke when value changes.
706
+ * @param {MultiSelectChangeEvent} event - Custom change event.
707
+ * @group Emits
708
+ */
709
+ onChange = new EventEmitter();
710
+ /**
711
+ * Callback to invoke when data is filtered.
712
+ * @param {MultiSelectFilterEvent} event - Custom filter event.
713
+ * @group Emits
714
+ */
715
+ onFilter = new EventEmitter();
716
+ /**
717
+ * Callback to invoke when multiselect receives focus.
718
+ * @param {MultiSelectFocusEvent} event - Custom focus event.
719
+ * @group Emits
720
+ */
721
+ onFocus = new EventEmitter();
722
+ /**
723
+ * Callback to invoke when multiselect loses focus.
724
+ * @param {MultiSelectBlurEvent} event - Custom blur event.
725
+ * @group Emits
726
+ */
727
+ onBlur = new EventEmitter();
728
+ /**
729
+ * Callback to invoke when component is clicked.
730
+ * @param {Event} event - Browser event.
731
+ * @group Emits
732
+ */
733
+ onClick = new EventEmitter();
734
+ /**
735
+ * Callback to invoke when input field is cleared.
736
+ * @group Emits
737
+ */
738
+ onClear = new EventEmitter();
739
+ /**
740
+ * Callback to invoke when overlay panel becomes visible.
741
+ * @param {AnimationEvent} event - Animation event.
742
+ * @group Emits
743
+ */
744
+ onPanelShow = new EventEmitter();
745
+ /**
746
+ * Callback to invoke when overlay panel becomes hidden.
747
+ * @param {AnimationEvent} event - Animation event.
748
+ * @group Emits
749
+ */
750
+ onPanelHide = new EventEmitter();
751
+ /**
752
+ * Callback to invoke in lazy mode to load new data.
753
+ * @param {MultiSelectLazyLoadEvent} event - Lazy load event.
754
+ * @group Emits
755
+ */
756
+ onLazyLoad = new EventEmitter();
757
+ /**
758
+ * Callback to invoke in lazy mode to load new data.
759
+ * @param {MultiSelectRemoveEvent} event - Remove event.
760
+ * @group Emits
761
+ */
762
+ onRemove = new EventEmitter();
763
+ /**
764
+ * Callback to invoke when all data is selected.
765
+ * @param {MultiSelectSelectAllChangeEvent} event - Custom select event.
766
+ * @group Emits
767
+ */
768
+ onSelectAllChange = new EventEmitter();
769
+ overlayViewChild;
770
+ filterInputChild;
771
+ focusInputViewChild;
772
+ itemsViewChild;
773
+ scroller;
774
+ lastHiddenFocusableElementOnOverlay;
775
+ firstHiddenFocusableElementOnOverlay;
776
+ headerCheckboxViewChild;
777
+ footerFacet;
778
+ headerFacet;
779
+ _componentStyle = inject(MultiSelectStyle);
780
+ searchValue;
781
+ searchTimeout;
782
+ _selectAll = null;
783
+ _placeholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
784
+ _disableTooltip = false;
785
+ value;
786
+ _filteredOptions;
787
+ focus;
788
+ filtered;
789
+ itemTemplate;
790
+ groupTemplate;
791
+ loaderTemplate;
792
+ headerTemplate;
793
+ filterTemplate;
794
+ footerTemplate;
795
+ emptyFilterTemplate;
796
+ emptyTemplate;
797
+ selectedItemsTemplate;
798
+ loadingIconTemplate;
799
+ filterIconTemplate;
800
+ removeTokenIconTemplate;
801
+ chipIconTemplate;
802
+ clearIconTemplate;
803
+ dropdownIconTemplate;
804
+ itemCheckboxIconTemplate;
805
+ headerCheckboxIconTemplate;
806
+ templates;
807
+ _itemTemplate;
808
+ _groupTemplate;
809
+ _loaderTemplate;
810
+ _headerTemplate;
811
+ _filterTemplate;
812
+ _footerTemplate;
813
+ _emptyFilterTemplate;
814
+ _emptyTemplate;
815
+ _selectedItemsTemplate;
816
+ _loadingIconTemplate;
817
+ _filterIconTemplate;
818
+ _removeTokenIconTemplate;
819
+ _chipIconTemplate;
820
+ _clearIconTemplate;
821
+ _dropdownIconTemplate;
822
+ _itemCheckboxIconTemplate;
823
+ _headerCheckboxIconTemplate;
824
+ $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant(), ...(ngDevMode ? [{ debugName: "$variant" }] : []));
825
+ $appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), ...(ngDevMode ? [{ debugName: "$appendTo" }] : []));
826
+ pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true });
827
+ get hasFluid() {
828
+ return this.fluid() ?? !!this.pcFluid;
829
+ }
830
+ ngAfterContentInit() {
831
+ this.templates.forEach((item) => {
832
+ switch (item.getType()) {
833
+ case 'item':
834
+ this._itemTemplate = item.template;
835
+ break;
836
+ case 'group':
837
+ this._groupTemplate = item.template;
838
+ break;
839
+ case 'selectedItems':
840
+ case 'selecteditems':
841
+ this._selectedItemsTemplate = item.template;
842
+ break;
843
+ case 'header':
844
+ this._headerTemplate = item.template;
845
+ break;
846
+ case 'filter':
847
+ this._filterTemplate = item.template;
848
+ break;
849
+ case 'emptyfilter':
850
+ this._emptyFilterTemplate = item.template;
851
+ break;
852
+ case 'empty':
853
+ this._emptyTemplate = item.template;
854
+ break;
855
+ case 'footer':
856
+ this._footerTemplate = item.template;
857
+ break;
858
+ case 'loader':
859
+ this._loaderTemplate = item.template;
860
+ break;
861
+ case 'headercheckboxicon':
862
+ this._headerCheckboxIconTemplate = item.template;
863
+ break;
864
+ case 'loadingicon':
865
+ this._loadingIconTemplate = item.template;
866
+ break;
867
+ case 'filtericon':
868
+ this._filterIconTemplate = item.template;
869
+ break;
870
+ case 'removetokenicon':
871
+ this._removeTokenIconTemplate = item.template;
872
+ break;
873
+ case 'clearicon':
874
+ this._clearIconTemplate = item.template;
875
+ break;
876
+ case 'dropdownicon':
877
+ this._dropdownIconTemplate = item.template;
878
+ break;
879
+ case 'itemcheckboxicon':
880
+ this._itemCheckboxIconTemplate = item.template;
881
+ break;
882
+ case 'chipicon':
883
+ this._chipIconTemplate = item.template;
884
+ break;
885
+ default:
886
+ this._itemTemplate = item.template;
887
+ break;
888
+ }
889
+ });
890
+ }
891
+ headerCheckboxFocus;
892
+ filterOptions;
893
+ preventModelTouched;
894
+ focused = false;
895
+ itemsWrapper;
896
+ _displaySelectedLabel = true;
897
+ _maxSelectedLabels = 3;
898
+ modelValue = signal(null, ...(ngDevMode ? [{ debugName: "modelValue" }] : []));
899
+ _filterValue = signal(null, ...(ngDevMode ? [{ debugName: "_filterValue" }] : []));
900
+ _options = signal(null, ...(ngDevMode ? [{ debugName: "_options" }] : []));
901
+ startRangeIndex = signal(-1, ...(ngDevMode ? [{ debugName: "startRangeIndex" }] : []));
902
+ focusedOptionIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedOptionIndex" }] : []));
903
+ selectedOptions;
904
+ clickInProgress = false;
905
+ get emptyMessageLabel() {
906
+ return this.emptyMessage || this.config.getTranslation(TranslationKeys.EMPTY_MESSAGE);
907
+ }
908
+ get emptyFilterMessageLabel() {
909
+ return this.emptyFilterMessage || this.config.getTranslation(TranslationKeys.EMPTY_FILTER_MESSAGE);
910
+ }
911
+ get isVisibleClearIcon() {
912
+ return this.modelValue() != null && this.modelValue() !== '' && isNotEmpty(this.modelValue()) && this.showClear && !this.$disabled() && !this.readonly && this.$filled();
913
+ }
914
+ get toggleAllAriaLabel() {
915
+ return this.config.translation.aria ? this.config.translation.aria[this.allSelected() ? 'selectAll' : 'unselectAll'] : undefined;
916
+ }
917
+ get listLabel() {
918
+ return this.config.getTranslation(TranslationKeys.ARIA)['listLabel'];
919
+ }
920
+ getAllVisibleAndNonVisibleOptions() {
921
+ return this.group ? this.flatOptions(this.options) : this.options || [];
922
+ }
923
+ visibleOptions = computed(() => {
924
+ const options = this.getAllVisibleAndNonVisibleOptions();
925
+ const isArrayOfObjects = isArray(options) && ObjectUtils.isObject(options[0]);
926
+ if (this._filterValue()) {
927
+ let filteredOptions;
928
+ if (isArrayOfObjects) {
929
+ filteredOptions = this.filterService.filter(options, this.searchFields(), this._filterValue(), this.filterMatchMode, this.filterLocale);
930
+ }
931
+ else {
932
+ filteredOptions = options.filter((option) => option.toString().toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase()));
933
+ }
934
+ if (this.group) {
935
+ const optionGroups = this.options || [];
936
+ const filtered = [];
937
+ optionGroups.forEach((group) => {
938
+ const groupChildren = this.getOptionGroupChildren(group);
939
+ const filteredItems = groupChildren.filter((item) => filteredOptions.includes(item));
940
+ if (filteredItems.length > 0)
941
+ filtered.push({
942
+ ...group,
943
+ [typeof this.optionGroupChildren === 'string' ? this.optionGroupChildren : 'items']: [...filteredItems]
944
+ });
945
+ });
946
+ return this.flatOptions(filtered);
947
+ }
948
+ return filteredOptions;
949
+ }
950
+ return options;
951
+ }, ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
952
+ label = computed(() => {
953
+ let label;
954
+ const modelValue = this.modelValue();
955
+ if (modelValue && modelValue.length && this.displaySelectedLabel) {
956
+ if (isNotEmpty(this.maxSelectedLabels) && modelValue.length > this.maxSelectedLabels) {
957
+ return this.getSelectedItemsLabel();
958
+ }
959
+ else {
960
+ label = '';
961
+ for (let i = 0; i < modelValue.length; i++) {
962
+ if (i !== 0) {
963
+ label += ', ';
964
+ }
965
+ label += this.getLabelByValue(modelValue[i]);
966
+ }
967
+ }
968
+ }
969
+ else {
970
+ label = this.placeholder() || '';
971
+ }
972
+ return label;
973
+ }, ...(ngDevMode ? [{ debugName: "label" }] : []));
974
+ chipSelectedItems = computed(() => {
975
+ return isNotEmpty(this.maxSelectedLabels) && this.modelValue() && this.modelValue().length > this.maxSelectedLabels ? this.modelValue().slice(0, this.maxSelectedLabels) : this.modelValue();
976
+ }, ...(ngDevMode ? [{ debugName: "chipSelectedItems" }] : []));
977
+ constructor(zone, filterService, overlayService) {
978
+ super();
979
+ this.zone = zone;
980
+ this.filterService = filterService;
981
+ this.overlayService = overlayService;
982
+ effect(() => {
983
+ const modelValue = this.modelValue();
984
+ const allVisibleAndNonVisibleOptions = this.getAllVisibleAndNonVisibleOptions();
985
+ if (allVisibleAndNonVisibleOptions && isNotEmpty(allVisibleAndNonVisibleOptions)) {
986
+ if (this.optionValue && this.optionLabel && modelValue) {
987
+ this.selectedOptions = allVisibleAndNonVisibleOptions.filter((option) => modelValue.includes(option[this.optionLabel]) || modelValue.includes(option[this.optionValue]));
988
+ }
989
+ else {
990
+ this.selectedOptions = modelValue;
991
+ }
992
+ this.cd.markForCheck();
993
+ }
994
+ });
995
+ }
996
+ ngOnInit() {
997
+ super.ngOnInit();
998
+ this.id = this.id || uuid('pn_id_');
999
+ this.autoUpdateModel();
1000
+ if (this.filterBy) {
1001
+ this.filterOptions = {
1002
+ filter: (value) => this.onFilterInputChange(value),
1003
+ reset: () => this.resetFilter()
1004
+ };
1005
+ }
1006
+ }
1007
+ maxSelectionLimitReached() {
1008
+ return this.selectionLimit && this.modelValue() && this.modelValue().length === this.selectionLimit;
1009
+ }
1010
+ ngAfterViewInit() {
1011
+ super.ngAfterViewInit();
1012
+ if (this.overlayVisible) {
1013
+ this.show();
1014
+ }
1015
+ }
1016
+ ngAfterViewChecked() {
1017
+ if (this.filtered) {
1018
+ this.zone.runOutsideAngular(() => {
1019
+ setTimeout(() => {
1020
+ this.overlayViewChild?.alignOverlay();
1021
+ }, 1);
1022
+ });
1023
+ this.filtered = false;
1024
+ }
1025
+ }
1026
+ flatOptions(options) {
1027
+ return (options || []).reduce((result, option, index) => {
1028
+ result.push({ optionGroup: option, group: true, index });
1029
+ const optionGroupChildren = this.getOptionGroupChildren(option);
1030
+ optionGroupChildren && optionGroupChildren.forEach((o) => result.push(o));
1031
+ return result;
1032
+ }, []);
1033
+ }
1034
+ autoUpdateModel() {
1035
+ if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption()) {
1036
+ this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());
1037
+ const value = this.getOptionValue(this.visibleOptions()[this.focusedOptionIndex()]);
1038
+ this.onOptionSelect({ originalEvent: null, option: [value] });
1039
+ }
1040
+ }
1041
+ /**
1042
+ * Updates the model value.
1043
+ * @group Method
1044
+ */
1045
+ updateModel(value, event) {
1046
+ this.value = value;
1047
+ this.onModelChange(value);
1048
+ this.writeValue(value);
1049
+ }
1050
+ onInputClick(event) {
1051
+ event.stopPropagation();
1052
+ event.preventDefault();
1053
+ this.focusedOptionIndex.set(-1);
1054
+ }
1055
+ onOptionSelect(event, isFocus = false, index = -1) {
1056
+ const { originalEvent, option } = event;
1057
+ if (this.$disabled() || this.isOptionDisabled(option)) {
1058
+ return;
1059
+ }
1060
+ let selected = this.isSelected(option);
1061
+ let value = null;
1062
+ if (selected) {
1063
+ value = this.modelValue().filter((val) => !equals(val, this.getOptionValue(option), this.equalityKey()));
1064
+ }
1065
+ else {
1066
+ value = [...(this.modelValue() || []), this.getOptionValue(option)];
1067
+ }
1068
+ this.updateModel(value, originalEvent);
1069
+ index !== -1 && this.focusedOptionIndex.set(index);
1070
+ isFocus && focus(this.focusInputViewChild?.nativeElement);
1071
+ this.onChange.emit({
1072
+ originalEvent: event,
1073
+ value: value,
1074
+ itemValue: option
1075
+ });
1076
+ }
1077
+ findSelectedOptionIndex() {
1078
+ return this.hasSelectedOption() ? this.visibleOptions().findIndex((option) => this.isValidSelectedOption(option)) : -1;
1079
+ }
1080
+ onOptionSelectRange(event, start = -1, end = -1) {
1081
+ start === -1 && (start = this.findNearestSelectedOptionIndex(end, true));
1082
+ end === -1 && (end = this.findNearestSelectedOptionIndex(start));
1083
+ if (start !== -1 && end !== -1) {
1084
+ const rangeStart = Math.min(start, end);
1085
+ const rangeEnd = Math.max(start, end);
1086
+ const value = this.visibleOptions()
1087
+ .slice(rangeStart, rangeEnd + 1)
1088
+ .filter((option) => this.isValidOption(option))
1089
+ .map((option) => this.getOptionValue(option));
1090
+ this.updateModel(value, event);
1091
+ }
1092
+ }
1093
+ searchFields() {
1094
+ return (this.filterBy || this.optionLabel || 'label').split(',');
1095
+ }
1096
+ findNearestSelectedOptionIndex(index, firstCheckUp = false) {
1097
+ let matchedOptionIndex = -1;
1098
+ if (this.hasSelectedOption()) {
1099
+ if (firstCheckUp) {
1100
+ matchedOptionIndex = this.findPrevSelectedOptionIndex(index);
1101
+ matchedOptionIndex = matchedOptionIndex === -1 ? this.findNextSelectedOptionIndex(index) : matchedOptionIndex;
1102
+ }
1103
+ else {
1104
+ matchedOptionIndex = this.findNextSelectedOptionIndex(index);
1105
+ matchedOptionIndex = matchedOptionIndex === -1 ? this.findPrevSelectedOptionIndex(index) : matchedOptionIndex;
1106
+ }
1107
+ }
1108
+ return matchedOptionIndex > -1 ? matchedOptionIndex : index;
1109
+ }
1110
+ findPrevSelectedOptionIndex(index) {
1111
+ const matchedOptionIndex = this.hasSelectedOption() && index > 0 ? findLastIndex(this.visibleOptions().slice(0, index), (option) => this.isValidSelectedOption(option)) : -1;
1112
+ return matchedOptionIndex > -1 ? matchedOptionIndex : -1;
1113
+ }
1114
+ findFirstFocusedOptionIndex() {
1115
+ const selectedIndex = this.findFirstSelectedOptionIndex();
1116
+ return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
1117
+ }
1118
+ findFirstOptionIndex() {
1119
+ return this.visibleOptions().findIndex((option) => this.isValidOption(option));
1120
+ }
1121
+ findFirstSelectedOptionIndex() {
1122
+ return this.hasSelectedOption() ? this.visibleOptions().findIndex((option) => this.isValidSelectedOption(option)) : -1;
1123
+ }
1124
+ findNextSelectedOptionIndex(index) {
1125
+ const matchedOptionIndex = this.hasSelectedOption() && index < this.visibleOptions().length - 1
1126
+ ? this.visibleOptions()
1127
+ .slice(index + 1)
1128
+ .findIndex((option) => this.isValidSelectedOption(option))
1129
+ : -1;
1130
+ return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : -1;
1131
+ }
1132
+ equalityKey() {
1133
+ return this.optionValue ? null : this.dataKey;
1134
+ }
1135
+ hasSelectedOption() {
1136
+ return isNotEmpty(this.modelValue());
1137
+ }
1138
+ isValidSelectedOption(option) {
1139
+ return this.isValidOption(option) && this.isSelected(option);
1140
+ }
1141
+ isOptionGroup(option) {
1142
+ return (this.group || this.optionGroupLabel) && option.optionGroup && option.group;
1143
+ }
1144
+ isValidOption(option) {
1145
+ return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
1146
+ }
1147
+ isOptionDisabled(option) {
1148
+ if (this.maxSelectionLimitReached() && !this.isSelected(option)) {
1149
+ return true;
1150
+ }
1151
+ return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : option && option.disabled !== undefined ? option.disabled : false;
1152
+ }
1153
+ isSelected(option) {
1154
+ const optionValue = this.getOptionValue(option);
1155
+ return (this.modelValue() || []).some((value) => equals(value, optionValue, this.equalityKey()));
1156
+ }
1157
+ isOptionMatched(option) {
1158
+ return this.isValidOption(option) && this.getOptionLabel(option).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
1159
+ }
1160
+ isEmpty() {
1161
+ return !this._options() || (this.visibleOptions() && this.visibleOptions().length === 0);
1162
+ }
1163
+ getOptionIndex(index, scrollerOptions) {
1164
+ return this.virtualScrollerDisabled ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index'];
1165
+ }
1166
+ getAriaPosInset(index) {
1167
+ return ((this.optionGroupLabel
1168
+ ? index -
1169
+ this.visibleOptions()
1170
+ .slice(0, index)
1171
+ .filter((option) => this.isOptionGroup(option)).length
1172
+ : index) + 1);
1173
+ }
1174
+ get ariaSetSize() {
1175
+ return this.visibleOptions().filter((option) => !this.isOptionGroup(option)).length;
1176
+ }
1177
+ getLabelByValue(value) {
1178
+ const options = this.group ? this.flatOptions(this._options()) : this._options() || [];
1179
+ const matchedOption = options.find((option) => !this.isOptionGroup(option) && equals(this.getOptionValue(option), value, this.equalityKey()));
1180
+ return matchedOption ? this.getOptionLabel(matchedOption) : null;
1181
+ }
1182
+ getSelectedItemsLabel() {
1183
+ let pattern = /{(.*?)}/;
1184
+ let message = this.selectedItemsLabel ? this.selectedItemsLabel : this.config.getTranslation(TranslationKeys.SELECTION_MESSAGE);
1185
+ if (pattern.test(message)) {
1186
+ return message.replace(message.match(pattern)[0], this.modelValue().length + '');
1187
+ }
1188
+ return message;
1189
+ }
1190
+ getOptionLabel(option) {
1191
+ return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option && option.label != undefined ? option.label : option;
1192
+ }
1193
+ getOptionValue(option) {
1194
+ return this.optionValue ? resolveFieldData(option, this.optionValue) : !this.optionLabel && option && option.value !== undefined ? option.value : option;
1195
+ }
1196
+ getOptionGroupLabel(optionGroup) {
1197
+ return this.optionGroupLabel ? resolveFieldData(optionGroup, this.optionGroupLabel) : optionGroup && optionGroup.label != undefined ? optionGroup.label : optionGroup;
1198
+ }
1199
+ getOptionGroupChildren(optionGroup) {
1200
+ return this.optionGroupChildren ? resolveFieldData(optionGroup, this.optionGroupChildren) : optionGroup.items;
1201
+ }
1202
+ onKeyDown(event) {
1203
+ if (this.$disabled()) {
1204
+ event.preventDefault();
1205
+ return;
1206
+ }
1207
+ const metaKey = event.metaKey || event.ctrlKey;
1208
+ switch (event.code) {
1209
+ case 'ArrowDown':
1210
+ this.onArrowDownKey(event);
1211
+ break;
1212
+ case 'ArrowUp':
1213
+ this.onArrowUpKey(event);
1214
+ break;
1215
+ case 'Home':
1216
+ this.onHomeKey(event);
1217
+ break;
1218
+ case 'End':
1219
+ this.onEndKey(event);
1220
+ break;
1221
+ case 'PageDown':
1222
+ this.onPageDownKey(event);
1223
+ break;
1224
+ case 'PageUp':
1225
+ this.onPageUpKey(event);
1226
+ break;
1227
+ case 'Enter':
1228
+ case 'Space':
1229
+ this.onEnterKey(event);
1230
+ break;
1231
+ case 'Escape':
1232
+ this.onEscapeKey(event);
1233
+ break;
1234
+ case 'Tab':
1235
+ this.onTabKey(event);
1236
+ break;
1237
+ case 'ShiftLeft':
1238
+ case 'ShiftRight':
1239
+ this.onShiftKey();
1240
+ break;
1241
+ default:
1242
+ if (event.code === 'KeyA' && metaKey) {
1243
+ const value = this.visibleOptions()
1244
+ .filter((option) => this.isValidOption(option))
1245
+ .map((option) => this.getOptionValue(option));
1246
+ this.updateModel(value, event);
1247
+ event.preventDefault();
1248
+ break;
1249
+ }
1250
+ if (!metaKey && isPrintableCharacter(event.key)) {
1251
+ !this.overlayVisible && this.show();
1252
+ this.searchOptions(event, event.key);
1253
+ event.preventDefault();
1254
+ }
1255
+ break;
1256
+ }
1257
+ }
1258
+ onFilterKeyDown(event) {
1259
+ switch (event.code) {
1260
+ case 'ArrowDown':
1261
+ this.onArrowDownKey(event);
1262
+ break;
1263
+ case 'ArrowUp':
1264
+ this.onArrowUpKey(event, true);
1265
+ break;
1266
+ case 'ArrowLeft':
1267
+ case 'ArrowRight':
1268
+ this.onArrowLeftKey(event, true);
1269
+ break;
1270
+ case 'Home':
1271
+ this.onHomeKey(event, true);
1272
+ break;
1273
+ case 'End':
1274
+ this.onEndKey(event, true);
1275
+ break;
1276
+ case 'Enter':
1277
+ case 'NumpadEnter':
1278
+ this.onEnterKey(event);
1279
+ break;
1280
+ case 'Escape':
1281
+ this.onEscapeKey(event);
1282
+ break;
1283
+ case 'Tab':
1284
+ this.onTabKey(event, true);
1285
+ break;
1286
+ default:
1287
+ break;
1288
+ }
1289
+ }
1290
+ onArrowLeftKey(event, pressedInInputText = false) {
1291
+ pressedInInputText && this.focusedOptionIndex.set(-1);
1292
+ }
1293
+ onArrowDownKey(event) {
1294
+ const optionIndex = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.findFirstFocusedOptionIndex();
1295
+ if (event.shiftKey) {
1296
+ this.onOptionSelectRange(event, this.startRangeIndex(), optionIndex);
1297
+ }
1298
+ this.changeFocusedOptionIndex(event, optionIndex);
1299
+ !this.overlayVisible && this.show();
1300
+ event.preventDefault();
1301
+ event.stopPropagation();
1302
+ }
1303
+ onArrowUpKey(event, pressedInInputText = false) {
1304
+ if (event.altKey && !pressedInInputText) {
1305
+ if (this.focusedOptionIndex() !== -1) {
1306
+ this.onOptionSelect(event, this.visibleOptions()[this.focusedOptionIndex()]);
1307
+ }
1308
+ this.overlayVisible && this.hide();
1309
+ event.preventDefault();
1310
+ }
1311
+ else {
1312
+ const optionIndex = this.focusedOptionIndex() !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex()) : this.findLastFocusedOptionIndex();
1313
+ if (event.shiftKey) {
1314
+ this.onOptionSelectRange(event, optionIndex, this.startRangeIndex());
1315
+ }
1316
+ this.changeFocusedOptionIndex(event, optionIndex);
1317
+ !this.overlayVisible && this.show();
1318
+ event.preventDefault();
1319
+ }
1320
+ event.stopPropagation();
1321
+ }
1322
+ onHomeKey(event, pressedInInputText = false) {
1323
+ const { currentTarget } = event;
1324
+ if (pressedInInputText) {
1325
+ const len = currentTarget.value.length;
1326
+ currentTarget.setSelectionRange(0, event.shiftKey ? len : 0);
1327
+ this.focusedOptionIndex.set(-1);
1328
+ }
1329
+ else {
1330
+ let metaKey = event.metaKey || event.ctrlKey;
1331
+ let optionIndex = this.findFirstOptionIndex();
1332
+ if (event.shiftKey && metaKey) {
1333
+ this.onOptionSelectRange(event, optionIndex, this.startRangeIndex());
1334
+ }
1335
+ this.changeFocusedOptionIndex(event, optionIndex);
1336
+ !this.overlayVisible && this.show();
1337
+ }
1338
+ event.preventDefault();
1339
+ }
1340
+ onEndKey(event, pressedInInputText = false) {
1341
+ const { currentTarget } = event;
1342
+ if (pressedInInputText) {
1343
+ const len = currentTarget.value.length;
1344
+ currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len);
1345
+ this.focusedOptionIndex.set(-1);
1346
+ }
1347
+ else {
1348
+ let metaKey = event.metaKey || event.ctrlKey;
1349
+ let optionIndex = this.findLastFocusedOptionIndex();
1350
+ if (event.shiftKey && metaKey) {
1351
+ this.onOptionSelectRange(event, this.startRangeIndex(), optionIndex);
1352
+ }
1353
+ this.changeFocusedOptionIndex(event, optionIndex);
1354
+ !this.overlayVisible && this.show();
1355
+ }
1356
+ event.preventDefault();
1357
+ }
1358
+ onPageDownKey(event) {
1359
+ this.scrollInView(this.visibleOptions().length - 1);
1360
+ event.preventDefault();
1361
+ }
1362
+ onPageUpKey(event) {
1363
+ this.scrollInView(0);
1364
+ event.preventDefault();
1365
+ }
1366
+ onEnterKey(event) {
1367
+ if (!this.overlayVisible) {
1368
+ this.onArrowDownKey(event);
1369
+ }
1370
+ else {
1371
+ if (this.focusedOptionIndex() !== -1) {
1372
+ if (event.shiftKey) {
1373
+ this.onOptionSelectRange(event, this.focusedOptionIndex());
1374
+ }
1375
+ else {
1376
+ this.onOptionSelect({ originalEvent: event, option: this.visibleOptions()[this.focusedOptionIndex()] });
1377
+ }
1378
+ }
1379
+ }
1380
+ event.preventDefault();
1381
+ }
1382
+ onEscapeKey(event) {
1383
+ this.overlayVisible && this.hide(true);
1384
+ event.stopPropagation();
1385
+ event.preventDefault();
1386
+ }
1387
+ onTabKey(event, pressedInInputText = false) {
1388
+ if (!pressedInInputText) {
1389
+ if (this.overlayVisible && this.hasFocusableElements()) {
1390
+ focus(event.shiftKey ? this.lastHiddenFocusableElementOnOverlay.nativeElement : this.firstHiddenFocusableElementOnOverlay.nativeElement);
1391
+ event.preventDefault();
1392
+ }
1393
+ else {
1394
+ if (this.focusedOptionIndex() !== -1) {
1395
+ const option = this.visibleOptions()[this.focusedOptionIndex()];
1396
+ !this.isSelected(option) && this.onOptionSelect({ originalEvent: event, option });
1397
+ }
1398
+ this.overlayVisible && this.hide(this.filter);
1399
+ }
1400
+ }
1401
+ }
1402
+ onShiftKey() {
1403
+ this.startRangeIndex.set(this.focusedOptionIndex());
1404
+ }
1405
+ onContainerClick(event) {
1406
+ if (this.$disabled() || this.loading || this.readonly || event.target.isSameNode(this.focusInputViewChild?.nativeElement)) {
1407
+ return;
1408
+ }
1409
+ if (!this.overlayViewChild || !this.overlayViewChild.el.nativeElement.contains(event.target)) {
1410
+ if (this.clickInProgress) {
1411
+ return;
1412
+ }
1413
+ this.clickInProgress = true;
1414
+ setTimeout(() => {
1415
+ this.clickInProgress = false;
1416
+ }, 150);
1417
+ this.overlayVisible ? this.hide(true) : this.show(true);
1418
+ }
1419
+ this.focusInputViewChild?.nativeElement.focus({ preventScroll: true });
1420
+ this.onClick.emit(event);
1421
+ this.cd.detectChanges();
1422
+ }
1423
+ onFirstHiddenFocus(event) {
1424
+ const focusableEl = event.relatedTarget === this.focusInputViewChild?.nativeElement ? getFirstFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement, ':not([data-p-hidden-focusable="true"])') : this.focusInputViewChild?.nativeElement;
1425
+ focus(focusableEl);
1426
+ }
1427
+ onInputFocus(event) {
1428
+ this.focused = true;
1429
+ const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
1430
+ this.focusedOptionIndex.set(focusedOptionIndex);
1431
+ this.overlayVisible && this.scrollInView(this.focusedOptionIndex());
1432
+ this.onFocus.emit({ originalEvent: event });
1433
+ }
1434
+ onInputBlur(event) {
1435
+ this.focused = false;
1436
+ this.onBlur.emit({ originalEvent: event });
1437
+ if (!this.preventModelTouched) {
1438
+ this.onModelTouched();
1439
+ }
1440
+ this.preventModelTouched = false;
1441
+ }
1442
+ onFilterInputChange(event) {
1443
+ let value = event.target.value;
1444
+ this._filterValue.set(value);
1445
+ this.focusedOptionIndex.set(-1);
1446
+ this.onFilter.emit({ originalEvent: event, filter: this._filterValue() });
1447
+ !this.virtualScrollerDisabled && this.scroller.scrollToIndex(0);
1448
+ setTimeout(() => {
1449
+ this.overlayViewChild.alignOverlay();
1450
+ });
1451
+ }
1452
+ onLastHiddenFocus(event) {
1453
+ const focusableEl = event.relatedTarget === this.focusInputViewChild?.nativeElement ? getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement, ':not([data-p-hidden-focusable="true"])') : this.focusInputViewChild?.nativeElement;
1454
+ focus(focusableEl);
1455
+ }
1456
+ onOptionMouseEnter(event, index) {
1457
+ if (this.focusOnHover) {
1458
+ this.changeFocusedOptionIndex(event, index);
1459
+ }
1460
+ }
1461
+ onFilterBlur(event) {
1462
+ this.focusedOptionIndex.set(-1);
1463
+ }
1464
+ onToggleAll(event) {
1465
+ if (this.$disabled() || this.readonly) {
1466
+ return;
1467
+ }
1468
+ if (this.selectAll != null) {
1469
+ this.onSelectAllChange.emit({
1470
+ originalEvent: event,
1471
+ checked: !this.allSelected()
1472
+ });
1473
+ }
1474
+ else {
1475
+ // pre-selected disabled options should always be selected.
1476
+ const selectedDisabledOptions = this.getAllVisibleAndNonVisibleOptions().filter((option) => this.isSelected(option) && (this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : option && option.disabled !== undefined ? option.disabled : false));
1477
+ const visibleOptions = this.allSelected()
1478
+ ? this.visibleOptions().filter((option) => !this.isValidOption(option) && this.isSelected(option))
1479
+ : this.visibleOptions().filter((option) => this.isSelected(option) || this.isValidOption(option));
1480
+ const selectedOptionsBeforeSearch = this.filter && !this.allSelected() ? this.getAllVisibleAndNonVisibleOptions().filter((option) => this.isSelected(option) && this.isValidOption(option)) : [];
1481
+ const optionValues = [...selectedOptionsBeforeSearch, ...selectedDisabledOptions, ...visibleOptions].map((option) => this.getOptionValue(option));
1482
+ const value = [...new Set(optionValues)];
1483
+ this.updateModel(value, event);
1484
+ // because onToggleAll could have been called during filtering, this additional test needs to be performed before calling onSelectAllChange.emit
1485
+ if (!value.length || value.length === this.getAllVisibleAndNonVisibleOptions().length) {
1486
+ this.onSelectAllChange.emit({
1487
+ originalEvent: event,
1488
+ checked: !!value.length
1489
+ });
1490
+ }
1491
+ }
1492
+ if (this.partialSelected()) {
1493
+ this.selectedOptions = null;
1494
+ this.cd.markForCheck();
1495
+ }
1496
+ this.onChange.emit({ originalEvent: event, value: this.value });
1497
+ DomHandler.focus(this.headerCheckboxViewChild?.inputViewChild?.nativeElement);
1498
+ this.headerCheckboxFocus = true;
1499
+ event.originalEvent.preventDefault();
1500
+ event.originalEvent.stopPropagation();
1501
+ }
1502
+ changeFocusedOptionIndex(event, index) {
1503
+ if (this.focusedOptionIndex() !== index) {
1504
+ this.focusedOptionIndex.set(index);
1505
+ this.scrollInView();
1506
+ }
1507
+ }
1508
+ get virtualScrollerDisabled() {
1509
+ return !this.virtualScroll;
1510
+ }
1511
+ scrollInView(index = -1) {
1512
+ const id = index !== -1 ? `${this.id}_${index}` : this.focusedOptionId;
1513
+ if (this.itemsViewChild && this.itemsViewChild.nativeElement) {
1514
+ const element = findSingle(this.itemsViewChild.nativeElement, `li[id="${id}"]`);
1515
+ if (element) {
1516
+ element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
1517
+ }
1518
+ else if (!this.virtualScrollerDisabled) {
1519
+ setTimeout(() => {
1520
+ this.virtualScroll && this.scroller?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
1521
+ }, 0);
1522
+ }
1523
+ }
1524
+ }
1525
+ get focusedOptionId() {
1526
+ return this.focusedOptionIndex() !== -1 ? `${this.id}_${this.focusedOptionIndex()}` : null;
1527
+ }
1528
+ allSelected() {
1529
+ return this.selectAll !== null ? this.selectAll : isNotEmpty(this.visibleOptions()) && this.visibleOptions().every((option) => this.isOptionGroup(option) || this.isOptionDisabled(option) || this.isSelected(option));
1530
+ }
1531
+ partialSelected() {
1532
+ return this.selectedOptions && this.selectedOptions.length > 0 && this.selectedOptions.length < this.options.length;
1533
+ }
1534
+ /**
1535
+ * Displays the panel.
1536
+ * @group Method
1537
+ */
1538
+ show(isFocus) {
1539
+ this.overlayVisible = true;
1540
+ const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex();
1541
+ this.focusedOptionIndex.set(focusedOptionIndex);
1542
+ if (isFocus) {
1543
+ focus(this.focusInputViewChild?.nativeElement);
1544
+ }
1545
+ this.cd.markForCheck();
1546
+ }
1547
+ /**
1548
+ * Hides the panel.
1549
+ * @group Method
1550
+ */
1551
+ hide(isFocus) {
1552
+ this.overlayVisible = false;
1553
+ this.focusedOptionIndex.set(-1);
1554
+ if (this.filter && this.resetFilterOnHide) {
1555
+ this.resetFilter();
1556
+ }
1557
+ if (this.overlayOptions?.mode === 'modal') {
1558
+ unblockBodyScroll();
1559
+ }
1560
+ isFocus && focus(this.focusInputViewChild?.nativeElement);
1561
+ this.cd.markForCheck();
1562
+ }
1563
+ onOverlayAnimationStart(event) {
1564
+ if (event.toState === 'visible') {
1565
+ this.itemsWrapper = findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement, this.virtualScroll ? '.p-scroller' : '.p-multiselect-list-container');
1566
+ this.virtualScroll && this.scroller?.setContentEl(this.itemsViewChild?.nativeElement);
1567
+ if (this.options && this.options.length) {
1568
+ if (this.virtualScroll) {
1569
+ const selectedIndex = this.modelValue() ? this.focusedOptionIndex() : -1;
1570
+ if (selectedIndex !== -1) {
1571
+ this.scroller?.scrollToIndex(selectedIndex);
1572
+ }
1573
+ }
1574
+ else {
1575
+ let selectedListItem = findSingle(this.itemsWrapper, '[data-p-highlight="true"]');
1576
+ if (selectedListItem) {
1577
+ selectedListItem.scrollIntoView({ block: 'nearest', inline: 'nearest' });
1578
+ }
1579
+ }
1580
+ }
1581
+ if (this.filterInputChild && this.filterInputChild.nativeElement) {
1582
+ this.preventModelTouched = true;
1583
+ if (this.autofocusFilter) {
1584
+ this.filterInputChild.nativeElement.focus();
1585
+ }
1586
+ }
1587
+ this.onPanelShow.emit(event);
1588
+ }
1589
+ if (event.toState === 'void') {
1590
+ this.itemsWrapper = null;
1591
+ this.onModelTouched();
1592
+ this.onPanelHide.emit(event);
1593
+ }
1594
+ }
1595
+ resetFilter() {
1596
+ if (this.filterInputChild && this.filterInputChild.nativeElement) {
1597
+ this.filterInputChild.nativeElement.value = '';
1598
+ }
1599
+ this._filterValue.set(null);
1600
+ this._filteredOptions = null;
1601
+ }
1602
+ close(event) {
1603
+ this.hide();
1604
+ event.preventDefault();
1605
+ event.stopPropagation();
1606
+ }
1607
+ clear(event) {
1608
+ this.value = null;
1609
+ this.updateModel(null, event);
1610
+ this.selectedOptions = null;
1611
+ this.onClear.emit();
1612
+ this._disableTooltip = true;
1613
+ event.stopPropagation();
1614
+ }
1615
+ labelContainerMouseLeave() {
1616
+ if (this._disableTooltip)
1617
+ this._disableTooltip = false;
1618
+ }
1619
+ removeOption(optionValue, event) {
1620
+ let value = this.modelValue().filter((val) => !equals(val, optionValue, this.equalityKey()));
1621
+ this.updateModel(value, event);
1622
+ this.onChange.emit({
1623
+ originalEvent: event,
1624
+ value: value,
1625
+ itemValue: optionValue
1626
+ });
1627
+ this.onRemove.emit({
1628
+ newValue: value,
1629
+ removed: optionValue
1630
+ });
1631
+ event && event.stopPropagation();
1632
+ }
1633
+ findNextOptionIndex(index) {
1634
+ const matchedOptionIndex = index < this.visibleOptions().length - 1
1635
+ ? this.visibleOptions()
1636
+ .slice(index + 1)
1637
+ .findIndex((option) => this.isValidOption(option))
1638
+ : -1;
1639
+ return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
1640
+ }
1641
+ findPrevOptionIndex(index) {
1642
+ const matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions().slice(0, index), (option) => this.isValidOption(option)) : -1;
1643
+ return matchedOptionIndex > -1 ? matchedOptionIndex : index;
1644
+ }
1645
+ findLastSelectedOptionIndex() {
1646
+ return this.hasSelectedOption() ? findLastIndex(this.visibleOptions(), (option) => this.isValidSelectedOption(option)) : -1;
1647
+ }
1648
+ findLastFocusedOptionIndex() {
1649
+ const selectedIndex = this.findLastSelectedOptionIndex();
1650
+ return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
1651
+ }
1652
+ findLastOptionIndex() {
1653
+ return findLastIndex(this.visibleOptions(), (option) => this.isValidOption(option));
1654
+ }
1655
+ searchOptions(event, char) {
1656
+ this.searchValue = (this.searchValue || '') + char;
1657
+ let optionIndex = -1;
1658
+ let matched = false;
1659
+ if (this.focusedOptionIndex() !== -1) {
1660
+ optionIndex = this.visibleOptions()
1661
+ .slice(this.focusedOptionIndex())
1662
+ .findIndex((option) => this.isOptionMatched(option));
1663
+ optionIndex =
1664
+ optionIndex === -1
1665
+ ? this.visibleOptions()
1666
+ .slice(0, this.focusedOptionIndex())
1667
+ .findIndex((option) => this.isOptionMatched(option))
1668
+ : optionIndex + this.focusedOptionIndex();
1669
+ }
1670
+ else {
1671
+ optionIndex = this.visibleOptions().findIndex((option) => this.isOptionMatched(option));
1672
+ }
1673
+ if (optionIndex !== -1) {
1674
+ matched = true;
1675
+ }
1676
+ if (optionIndex === -1 && this.focusedOptionIndex() === -1) {
1677
+ optionIndex = this.findFirstFocusedOptionIndex();
1678
+ }
1679
+ if (optionIndex !== -1) {
1680
+ this.changeFocusedOptionIndex(event, optionIndex);
1681
+ }
1682
+ if (this.searchTimeout) {
1683
+ clearTimeout(this.searchTimeout);
1684
+ }
1685
+ this.searchTimeout = setTimeout(() => {
1686
+ this.searchValue = '';
1687
+ this.searchTimeout = null;
1688
+ }, 500);
1689
+ return matched;
1690
+ }
1691
+ hasFocusableElements() {
1692
+ return getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement, ':not([data-p-hidden-focusable="true"])').length > 0;
1693
+ }
1694
+ hasFilter() {
1695
+ return this._filterValue() && this._filterValue().trim().length > 0;
1696
+ }
1697
+ /**
1698
+ * @override
1699
+ *
1700
+ * @see {@link BaseEditableHolder.writeControlValue}
1701
+ * Writes the value to the control.
1702
+ */
1703
+ writeControlValue(value, setModelValue) {
1704
+ this.value = value;
1705
+ setModelValue(value);
1706
+ this.cd.markForCheck();
1707
+ }
1708
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelect, deps: [{ token: i0.NgZone }, { token: i3.FilterService }, { token: i3.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
1709
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: MultiSelect, isStandalone: true, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: false, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, group: { classPropertyName: "group", publicName: "group", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filterPlaceHolder: { classPropertyName: "filterPlaceHolder", publicName: "filterPlaceHolder", isSignal: false, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: false, isRequired: false, transformFunction: null }, overlayVisible: { classPropertyName: "overlayVisible", publicName: "overlayVisible", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, displaySelectedLabel: { classPropertyName: "displaySelectedLabel", publicName: "displaySelectedLabel", isSignal: false, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: false, isRequired: false, transformFunction: null }, selectionLimit: { classPropertyName: "selectionLimit", publicName: "selectionLimit", isSignal: false, isRequired: false, transformFunction: numberAttribute }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: false, isRequired: false, transformFunction: null }, showToggleAll: { classPropertyName: "showToggleAll", publicName: "showToggleAll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: false, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: false, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: false, isRequired: false, transformFunction: null }, chipIcon: { classPropertyName: "chipIcon", publicName: "chipIcon", isSignal: false, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: false, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: false, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: false, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: false, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: false, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: false, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: false, isRequired: false, transformFunction: null }, ariaFilterLabel: { classPropertyName: "ariaFilterLabel", publicName: "ariaFilterLabel", isSignal: false, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: false, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: false, isRequired: false, transformFunction: null }, tooltipPositionStyle: { classPropertyName: "tooltipPositionStyle", publicName: "tooltipPositionStyle", isSignal: false, isRequired: false, transformFunction: null }, tooltipStyleClass: { classPropertyName: "tooltipStyleClass", publicName: "tooltipStyleClass", isSignal: false, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, display: { classPropertyName: "display", publicName: "display", isSignal: false, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: false, isRequired: false, transformFunction: null }, selectAll: { classPropertyName: "selectAll", publicName: "selectAll", isSignal: false, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filterFields: { classPropertyName: "filterFields", publicName: "filterFields", isSignal: false, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, highlightOnSelect: { classPropertyName: "highlightOnSelect", publicName: "highlightOnSelect", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onClear: "onClear", onPanelShow: "onPanelShow", onPanelHide: "onPanelHide", onLazyLoad: "onLazyLoad", onRemove: "onRemove", onSelectAllChange: "onSelectAllChange" }, host: { listeners: { "click": "onContainerClick($event)" }, properties: { "attr.id": "id", "class": "cn(cx('root'), styleClass)", "style": "sx('root')" } }, providers: [MULTISELECT_VALUE_ACCESSOR, MultiSelectStyle], queries: [{ propertyName: "footerFacet", first: true, predicate: Footer, descendants: true }, { propertyName: "headerFacet", first: true, predicate: Header, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"] }, { propertyName: "groupTemplate", first: true, predicate: ["group"] }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"] }, { propertyName: "headerTemplate", first: true, predicate: ["header"] }, { propertyName: "filterTemplate", first: true, predicate: ["filter"] }, { propertyName: "footerTemplate", first: true, predicate: ["footer"] }, { propertyName: "emptyFilterTemplate", first: true, predicate: ["emptyfilter"] }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"] }, { propertyName: "selectedItemsTemplate", first: true, predicate: ["selecteditems"] }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"] }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"] }, { propertyName: "removeTokenIconTemplate", first: true, predicate: ["removetokenicon"] }, { propertyName: "chipIconTemplate", first: true, predicate: ["chipicon"] }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"] }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"] }, { propertyName: "itemCheckboxIconTemplate", first: true, predicate: ["itemcheckboxicon"] }, { propertyName: "headerCheckboxIconTemplate", first: true, predicate: ["headercheckboxicon"] }, { propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "filterInputChild", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true }, { propertyName: "headerCheckboxViewChild", first: true, predicate: ["headerCheckbox"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1710
+ <div class="p-hidden-accessible" [attr.data-p-hidden-accessible]="true">
1711
+ <input
1712
+ #focusInput
1713
+ [pTooltip]="tooltip"
1714
+ [tooltipPosition]="tooltipPosition"
1715
+ [positionStyle]="tooltipPositionStyle"
1716
+ [tooltipStyleClass]="tooltipStyleClass"
1717
+ [attr.aria-disabled]="$disabled()"
1718
+ [attr.id]="inputId"
1719
+ role="combobox"
1720
+ [attr.aria-label]="ariaLabel"
1721
+ [attr.aria-labelledby]="ariaLabelledBy"
1722
+ [attr.aria-haspopup]="'listbox'"
1723
+ [attr.aria-expanded]="overlayVisible ?? false"
1724
+ [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1725
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1726
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1727
+ (focus)="onInputFocus($event)"
1728
+ (blur)="onInputBlur($event)"
1729
+ (keydown)="onKeyDown($event)"
1730
+ [pAutoFocus]="autofocus"
1731
+ [attr.value]="modelValue()"
1732
+ [attr.name]="name()"
1733
+ [attr.required]="required() ? '' : undefined"
1734
+ [attr.disabled]="$disabled() ? '' : undefined"
1735
+ />
1736
+ </div>
1737
+ <div
1738
+ [class]="cx('labelContainer')"
1739
+ [pTooltip]="tooltip"
1740
+ (mouseleave)="labelContainerMouseLeave()"
1741
+ [tooltipDisabled]="_disableTooltip"
1742
+ [tooltipPosition]="tooltipPosition"
1743
+ [positionStyle]="tooltipPositionStyle"
1744
+ [tooltipStyleClass]="tooltipStyleClass"
1745
+ >
1746
+ <div [class]="cx('label')">
1747
+ <ng-container *ngIf="!selectedItemsTemplate && !_selectedItemsTemplate">
1748
+ <ng-container *ngIf="display === 'comma'">{{ label() || 'empty' }}</ng-container>
1749
+ <ng-container *ngIf="display === 'chip'">
1750
+ @if (chipSelectedItems() && chipSelectedItems().length === maxSelectedLabels) {
1751
+ {{ getSelectedItemsLabel() }}
1752
+ } @else {
1753
+ <div #token *ngFor="let item of chipSelectedItems(); let i = index" [class]="cx('chipItem')">
1754
+ <p-chip [class]="cx('pcChip')" [label]="getLabelByValue(item)" [removable]="!$disabled() && !readonly" (onRemove)="removeOption(item, $event)" [removeIcon]="chipIcon">
1755
+ <ng-container *ngIf="chipIconTemplate || _chipIconTemplate || removeTokenIconTemplate || _removeTokenIconTemplate">
1756
+ <ng-template #removeicon>
1757
+ <ng-container *ngIf="!$disabled() && !readonly">
1758
+ <span
1759
+ [class]="cx('chipIcon')"
1760
+ *ngIf="chipIconTemplate || _chipIconTemplate || removeTokenIconTemplate || _removeTokenIconTemplate"
1761
+ (click)="removeOption(item, $event)"
1762
+ [attr.data-pc-section]="'clearicon'"
1763
+ [attr.aria-hidden]="true"
1764
+ >
1765
+ <ng-container *ngTemplateOutlet="chipIconTemplate || _chipIconTemplate || removeTokenIconTemplate || _removeTokenIconTemplate; context: { class: 'p-multiselect-chip-icon' }"></ng-container>
1766
+ </span>
1767
+ </ng-container>
1768
+ </ng-template>
1769
+ </ng-container>
1770
+ </p-chip>
1771
+ </div>
1772
+ }
1773
+ <ng-container *ngIf="!modelValue() || modelValue().length === 0">{{ placeholder() || 'empty' }}</ng-container>
1774
+ </ng-container>
1775
+ </ng-container>
1776
+ <ng-container *ngIf="selectedItemsTemplate || _selectedItemsTemplate">
1777
+ <ng-container *ngTemplateOutlet="selectedItemsTemplate || _selectedItemsTemplate; context: { $implicit: selectedOptions, removeChip: removeOption.bind(this) }"></ng-container>
1778
+ <ng-container *ngIf="!modelValue() || modelValue().length === 0">{{ placeholder() || 'empty' }}</ng-container>
1779
+ </ng-container>
1780
+ </div>
1781
+ </div>
1782
+ <ng-container *ngIf="isVisibleClearIcon">
1783
+ <svg data-p-icon="times" *ngIf="!clearIconTemplate && !_clearIconTemplate" [class]="cx('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'" [attr.aria-hidden]="true" />
1784
+ <span *ngIf="clearIconTemplate || _clearIconTemplate" [class]="cx('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'" [attr.aria-hidden]="true">
1785
+ <ng-template *ngTemplateOutlet="clearIconTemplate || _clearIconTemplate"></ng-template>
1786
+ </span>
1787
+ </ng-container>
1788
+ <div [class]="cx('dropdown')">
1789
+ <ng-container *ngIf="loading; else elseBlock">
1790
+ <ng-container *ngIf="loadingIconTemplate || _loadingIconTemplate">
1791
+ <ng-container *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate"></ng-container>
1792
+ </ng-container>
1793
+ <ng-container *ngIf="!loadingIconTemplate && !_loadingIconTemplate">
1794
+ <span *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), 'pi-spin ' + loadingIcon)" [attr.aria-hidden]="true"></span>
1795
+ <span *ngIf="!loadingIcon" [class]="cn(cx('loadingIcon'), 'pi pi-spinner pi-spin')" [attr.aria-hidden]="true"></span>
1796
+ </ng-container>
1797
+ </ng-container>
1798
+ <ng-template #elseBlock>
1799
+ <ng-container *ngIf="!dropdownIconTemplate && !_dropdownIconTemplate">
1800
+ <span *ngIf="dropdownIcon" [class]="cx('dropdownIcon')" [ngClass]="dropdownIcon" [attr.data-pc-section]="'triggericon'" [attr.aria-hidden]="true"></span>
1801
+ <svg data-p-icon="chevron-down" *ngIf="!dropdownIcon" [class]="cx('dropdownIcon')" [attr.data-pc-section]="'triggericon'" [attr.aria-hidden]="true" />
1802
+ </ng-container>
1803
+ <span *ngIf="dropdownIconTemplate || _dropdownIconTemplate" [class]="cx('dropdownIcon')" [attr.data-pc-section]="'triggericon'" [attr.aria-hidden]="true">
1804
+ <ng-template *ngTemplateOutlet="dropdownIconTemplate || _dropdownIconTemplate"></ng-template>
1805
+ </span>
1806
+ </ng-template>
1807
+ </div>
1808
+ <p-overlay #overlay [hostAttrSelector]="attrSelector" [(visible)]="overlayVisible" [options]="overlayOptions" [target]="'@parent'" [appendTo]="$appendTo()" (onAnimationStart)="onOverlayAnimationStart($event)" (onHide)="hide()">
1809
+ <ng-template #content>
1810
+ <div [attr.id]="id + '_list'" [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle">
1811
+ <span
1812
+ #firstHiddenFocusableEl
1813
+ role="presentation"
1814
+ class="p-hidden-accessible p-hidden-focusable"
1815
+ [attr.tabindex]="0"
1816
+ (focus)="onFirstHiddenFocus($event)"
1817
+ [attr.data-p-hidden-accessible]="true"
1818
+ [attr.data-p-hidden-focusable]="true"
1819
+ >
1820
+ </span>
1821
+ <ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate"></ng-container>
1822
+ <div [class]="cx('header')" *ngIf="showHeader">
1823
+ <ng-content select="p-header"></ng-content>
1824
+ <ng-container *ngIf="filterTemplate || _filterTemplate; else builtInFilterElement">
1825
+ <ng-container *ngTemplateOutlet="filterTemplate || _filterTemplate; context: { options: filterOptions }"></ng-container>
1826
+ </ng-container>
1827
+ <ng-template #builtInFilterElement>
1828
+ <p-checkbox
1829
+ [ngModel]="allSelected()"
1830
+ [ariaLabel]="toggleAllAriaLabel"
1831
+ [binary]="true"
1832
+ (onChange)="onToggleAll($event)"
1833
+ *ngIf="showToggleAll && !selectionLimit"
1834
+ [variant]="$variant()"
1835
+ [disabled]="$disabled()"
1836
+ #headerCheckbox
1837
+ >
1838
+ <ng-template #icon let-klass="class">
1839
+ <svg data-p-icon="check" *ngIf="!headerCheckboxIconTemplate && !_headerCheckboxIconTemplate && allSelected()" [class]="klass" [attr.data-pc-section]="'icon'" />
1840
+ <ng-template
1841
+ *ngTemplateOutlet="
1842
+ headerCheckboxIconTemplate || _headerCheckboxIconTemplate;
1843
+ context: {
1844
+ checked: allSelected(),
1845
+ partialSelected: partialSelected(),
1846
+ class: klass
1847
+ }
1848
+ "
1849
+ ></ng-template>
1850
+ </ng-template>
1851
+ </p-checkbox>
1852
+
1853
+ <p-iconfield *ngIf="filter" [class]="cx('pcFilterContainer')">
1854
+ <input
1855
+ #filterInput
1856
+ pInputText
1857
+ [variant]="$variant()"
1858
+ type="text"
1859
+ [attr.autocomplete]="autocomplete"
1860
+ role="searchbox"
1861
+ [attr.aria-owns]="id + '_list'"
1862
+ [attr.aria-activedescendant]="focusedOptionId"
1863
+ [value]="_filterValue() || ''"
1864
+ (input)="onFilterInputChange($event)"
1865
+ (keydown)="onFilterKeyDown($event)"
1866
+ (click)="onInputClick($event)"
1867
+ (blur)="onFilterBlur($event)"
1868
+ [class]="cx('pcFilter')"
1869
+ [attr.disabled]="$disabled() ? '' : undefined"
1870
+ [attr.placeholder]="filterPlaceHolder"
1871
+ [attr.aria-label]="ariaFilterLabel"
1872
+ />
1873
+ <p-inputicon>
1874
+ <svg data-p-icon="search" *ngIf="!filterIconTemplate && !_filterIconTemplate" />
1875
+ <span *ngIf="filterIconTemplate || _filterIconTemplate" class="p-multiselect-filter-icon">
1876
+ <ng-template *ngTemplateOutlet="filterIconTemplate || _filterIconTemplate"></ng-template>
1877
+ </span>
1878
+ </p-inputicon>
1879
+ </p-iconfield>
1880
+ </ng-template>
1881
+ </div>
1882
+ <div [class]="cx('listContainer')" [style.max-height]="virtualScroll ? 'auto' : scrollHeight || 'auto'">
1883
+ <p-scroller
1884
+ *ngIf="virtualScroll"
1885
+ #scroller
1886
+ [items]="visibleOptions()"
1887
+ [style]="{ height: scrollHeight }"
1888
+ [itemSize]="virtualScrollItemSize"
1889
+ [autoSize]="true"
1890
+ [tabindex]="-1"
1891
+ [lazy]="lazy"
1892
+ (onLazyLoad)="onLazyLoad.emit($event)"
1893
+ [options]="virtualScrollOptions"
1894
+ >
1895
+ <ng-template #content let-items let-scrollerOptions="options">
1896
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
1897
+ </ng-template>
1898
+ <ng-container *ngIf="loaderTemplate || _loaderTemplate">
1899
+ <ng-template #loader let-scrollerOptions="options">
1900
+ <ng-container *ngTemplateOutlet="loaderTemplate || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
1901
+ </ng-template>
1902
+ </ng-container>
1903
+ </p-scroller>
1904
+ <ng-container *ngIf="!virtualScroll">
1905
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: visibleOptions(), options: {} }"></ng-container>
1906
+ </ng-container>
1907
+
1908
+ <ng-template #buildInItems let-items let-scrollerOptions="options">
1909
+ <ul #items [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" aria-multiselectable="true" [attr.aria-label]="listLabel">
1910
+ <ng-template ngFor let-option [ngForOf]="items" let-i="index">
1911
+ <ng-container *ngIf="isOptionGroup(option)">
1912
+ <li [attr.id]="id + '_' + getOptionIndex(i, scrollerOptions)" [class]="cx('optionGroup')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1913
+ <span *ngIf="!groupTemplate">{{ getOptionGroupLabel(option.optionGroup) }}</span>
1914
+ <ng-container *ngTemplateOutlet="groupTemplate; context: { $implicit: option.optionGroup }"></ng-container>
1915
+ </li>
1916
+ </ng-container>
1917
+ <ng-container *ngIf="!isOptionGroup(option)">
1918
+ <p-multiselect-item
1919
+ [id]="id + '_' + getOptionIndex(i, scrollerOptions)"
1920
+ [option]="option"
1921
+ [selected]="isSelected(option)"
1922
+ [label]="getOptionLabel(option)"
1923
+ [disabled]="isOptionDisabled(option)"
1924
+ [template]="itemTemplate || _itemTemplate"
1925
+ [itemCheckboxIconTemplate]="itemCheckboxIconTemplate || _itemCheckboxIconTemplate"
1926
+ [itemSize]="scrollerOptions.itemSize"
1927
+ [focused]="focusedOptionIndex() === getOptionIndex(i, scrollerOptions)"
1928
+ [ariaPosInset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
1929
+ [ariaSetSize]="ariaSetSize"
1930
+ [variant]="$variant()"
1931
+ [highlightOnSelect]="highlightOnSelect"
1932
+ (onClick)="onOptionSelect($event, false, getOptionIndex(i, scrollerOptions))"
1933
+ (onMouseEnter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
1934
+ ></p-multiselect-item>
1935
+ </ng-container>
1936
+ </ng-template>
1937
+
1938
+ <li *ngIf="hasFilter() && isEmpty()" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1939
+ @if (!emptyFilterTemplate && !_emptyFilterTemplate && !emptyTemplate && !_emptyTemplate) {
1940
+ {{ emptyFilterMessageLabel }}
1941
+ } @else {
1942
+ <ng-container *ngTemplateOutlet="emptyFilterTemplate || _emptyFilterTemplate || emptyTemplate || _emptyFilterTemplate"></ng-container>
1943
+ }
1944
+ </li>
1945
+ <li *ngIf="!hasFilter() && isEmpty()" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1946
+ @if (!emptyTemplate && !_emptyTemplate) {
1947
+ {{ emptyMessageLabel }}
1948
+ } @else {
1949
+ <ng-container *ngTemplateOutlet="emptyTemplate || _emptyTemplate"></ng-container>
1950
+ }
1951
+ </li>
1952
+ </ul>
1953
+ </ng-template>
1954
+ </div>
1955
+ <div *ngIf="footerFacet || footerTemplate || _footerTemplate">
1956
+ <ng-content select="p-footer"></ng-content>
1957
+ <ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
1958
+ </div>
1959
+
1960
+ <span
1961
+ #lastHiddenFocusableEl
1962
+ role="presentation"
1963
+ class="p-hidden-accessible p-hidden-focusable"
1964
+ [attr.tabindex]="0"
1965
+ (focus)="onLastHiddenFocus($event)"
1966
+ [attr.data-p-hidden-accessible]="true"
1967
+ [attr.data-p-hidden-focusable]="true"
1968
+ ></span>
1969
+ </div>
1970
+ </ng-template>
1971
+ </p-overlay>
1972
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MultiSelectItem, selector: "p-multiSelectItem, p-multiselect-item", inputs: ["id", "option", "selected", "label", "disabled", "itemSize", "focused", "ariaPosInset", "ariaSetSize", "variant", "template", "checkIconTemplate", "itemCheckboxIconTemplate", "highlightOnSelect"], outputs: ["onClick", "onMouseEnter"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options", "appendTo", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: CheckIcon, selector: "[data-p-icon=\"check\"]" }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1973
+ }
1974
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelect, decorators: [{
1975
+ type: Component,
1976
+ args: [{
1977
+ selector: 'p-multiSelect, p-multiselect, p-multi-select',
1978
+ standalone: true,
1979
+ imports: [CommonModule, MultiSelectItem, Overlay, SharedModule, Tooltip, Scroller, AutoFocus, CheckIcon, SearchIcon, TimesIcon, ChevronDownIcon, IconField, InputIcon, InputText, Chip, Checkbox, FormsModule],
1980
+ template: `
1981
+ <div class="p-hidden-accessible" [attr.data-p-hidden-accessible]="true">
1982
+ <input
1983
+ #focusInput
1984
+ [pTooltip]="tooltip"
1985
+ [tooltipPosition]="tooltipPosition"
1986
+ [positionStyle]="tooltipPositionStyle"
1987
+ [tooltipStyleClass]="tooltipStyleClass"
1988
+ [attr.aria-disabled]="$disabled()"
1989
+ [attr.id]="inputId"
1990
+ role="combobox"
1991
+ [attr.aria-label]="ariaLabel"
1992
+ [attr.aria-labelledby]="ariaLabelledBy"
1993
+ [attr.aria-haspopup]="'listbox'"
1994
+ [attr.aria-expanded]="overlayVisible ?? false"
1995
+ [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1996
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1997
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1998
+ (focus)="onInputFocus($event)"
1999
+ (blur)="onInputBlur($event)"
2000
+ (keydown)="onKeyDown($event)"
2001
+ [pAutoFocus]="autofocus"
2002
+ [attr.value]="modelValue()"
2003
+ [attr.name]="name()"
2004
+ [attr.required]="required() ? '' : undefined"
2005
+ [attr.disabled]="$disabled() ? '' : undefined"
2006
+ />
2007
+ </div>
2008
+ <div
2009
+ [class]="cx('labelContainer')"
2010
+ [pTooltip]="tooltip"
2011
+ (mouseleave)="labelContainerMouseLeave()"
2012
+ [tooltipDisabled]="_disableTooltip"
2013
+ [tooltipPosition]="tooltipPosition"
2014
+ [positionStyle]="tooltipPositionStyle"
2015
+ [tooltipStyleClass]="tooltipStyleClass"
2016
+ >
2017
+ <div [class]="cx('label')">
2018
+ <ng-container *ngIf="!selectedItemsTemplate && !_selectedItemsTemplate">
2019
+ <ng-container *ngIf="display === 'comma'">{{ label() || 'empty' }}</ng-container>
2020
+ <ng-container *ngIf="display === 'chip'">
2021
+ @if (chipSelectedItems() && chipSelectedItems().length === maxSelectedLabels) {
2022
+ {{ getSelectedItemsLabel() }}
2023
+ } @else {
2024
+ <div #token *ngFor="let item of chipSelectedItems(); let i = index" [class]="cx('chipItem')">
2025
+ <p-chip [class]="cx('pcChip')" [label]="getLabelByValue(item)" [removable]="!$disabled() && !readonly" (onRemove)="removeOption(item, $event)" [removeIcon]="chipIcon">
2026
+ <ng-container *ngIf="chipIconTemplate || _chipIconTemplate || removeTokenIconTemplate || _removeTokenIconTemplate">
2027
+ <ng-template #removeicon>
2028
+ <ng-container *ngIf="!$disabled() && !readonly">
2029
+ <span
2030
+ [class]="cx('chipIcon')"
2031
+ *ngIf="chipIconTemplate || _chipIconTemplate || removeTokenIconTemplate || _removeTokenIconTemplate"
2032
+ (click)="removeOption(item, $event)"
2033
+ [attr.data-pc-section]="'clearicon'"
2034
+ [attr.aria-hidden]="true"
2035
+ >
2036
+ <ng-container *ngTemplateOutlet="chipIconTemplate || _chipIconTemplate || removeTokenIconTemplate || _removeTokenIconTemplate; context: { class: 'p-multiselect-chip-icon' }"></ng-container>
2037
+ </span>
2038
+ </ng-container>
2039
+ </ng-template>
2040
+ </ng-container>
2041
+ </p-chip>
2042
+ </div>
2043
+ }
2044
+ <ng-container *ngIf="!modelValue() || modelValue().length === 0">{{ placeholder() || 'empty' }}</ng-container>
2045
+ </ng-container>
2046
+ </ng-container>
2047
+ <ng-container *ngIf="selectedItemsTemplate || _selectedItemsTemplate">
2048
+ <ng-container *ngTemplateOutlet="selectedItemsTemplate || _selectedItemsTemplate; context: { $implicit: selectedOptions, removeChip: removeOption.bind(this) }"></ng-container>
2049
+ <ng-container *ngIf="!modelValue() || modelValue().length === 0">{{ placeholder() || 'empty' }}</ng-container>
2050
+ </ng-container>
2051
+ </div>
2052
+ </div>
2053
+ <ng-container *ngIf="isVisibleClearIcon">
2054
+ <svg data-p-icon="times" *ngIf="!clearIconTemplate && !_clearIconTemplate" [class]="cx('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'" [attr.aria-hidden]="true" />
2055
+ <span *ngIf="clearIconTemplate || _clearIconTemplate" [class]="cx('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'" [attr.aria-hidden]="true">
2056
+ <ng-template *ngTemplateOutlet="clearIconTemplate || _clearIconTemplate"></ng-template>
2057
+ </span>
2058
+ </ng-container>
2059
+ <div [class]="cx('dropdown')">
2060
+ <ng-container *ngIf="loading; else elseBlock">
2061
+ <ng-container *ngIf="loadingIconTemplate || _loadingIconTemplate">
2062
+ <ng-container *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate"></ng-container>
2063
+ </ng-container>
2064
+ <ng-container *ngIf="!loadingIconTemplate && !_loadingIconTemplate">
2065
+ <span *ngIf="loadingIcon" [class]="cn(cx('loadingIcon'), 'pi-spin ' + loadingIcon)" [attr.aria-hidden]="true"></span>
2066
+ <span *ngIf="!loadingIcon" [class]="cn(cx('loadingIcon'), 'pi pi-spinner pi-spin')" [attr.aria-hidden]="true"></span>
2067
+ </ng-container>
2068
+ </ng-container>
2069
+ <ng-template #elseBlock>
2070
+ <ng-container *ngIf="!dropdownIconTemplate && !_dropdownIconTemplate">
2071
+ <span *ngIf="dropdownIcon" [class]="cx('dropdownIcon')" [ngClass]="dropdownIcon" [attr.data-pc-section]="'triggericon'" [attr.aria-hidden]="true"></span>
2072
+ <svg data-p-icon="chevron-down" *ngIf="!dropdownIcon" [class]="cx('dropdownIcon')" [attr.data-pc-section]="'triggericon'" [attr.aria-hidden]="true" />
2073
+ </ng-container>
2074
+ <span *ngIf="dropdownIconTemplate || _dropdownIconTemplate" [class]="cx('dropdownIcon')" [attr.data-pc-section]="'triggericon'" [attr.aria-hidden]="true">
2075
+ <ng-template *ngTemplateOutlet="dropdownIconTemplate || _dropdownIconTemplate"></ng-template>
2076
+ </span>
2077
+ </ng-template>
2078
+ </div>
2079
+ <p-overlay #overlay [hostAttrSelector]="attrSelector" [(visible)]="overlayVisible" [options]="overlayOptions" [target]="'@parent'" [appendTo]="$appendTo()" (onAnimationStart)="onOverlayAnimationStart($event)" (onHide)="hide()">
2080
+ <ng-template #content>
2081
+ <div [attr.id]="id + '_list'" [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle">
2082
+ <span
2083
+ #firstHiddenFocusableEl
2084
+ role="presentation"
2085
+ class="p-hidden-accessible p-hidden-focusable"
2086
+ [attr.tabindex]="0"
2087
+ (focus)="onFirstHiddenFocus($event)"
2088
+ [attr.data-p-hidden-accessible]="true"
2089
+ [attr.data-p-hidden-focusable]="true"
2090
+ >
2091
+ </span>
2092
+ <ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate"></ng-container>
2093
+ <div [class]="cx('header')" *ngIf="showHeader">
2094
+ <ng-content select="p-header"></ng-content>
2095
+ <ng-container *ngIf="filterTemplate || _filterTemplate; else builtInFilterElement">
2096
+ <ng-container *ngTemplateOutlet="filterTemplate || _filterTemplate; context: { options: filterOptions }"></ng-container>
2097
+ </ng-container>
2098
+ <ng-template #builtInFilterElement>
2099
+ <p-checkbox
2100
+ [ngModel]="allSelected()"
2101
+ [ariaLabel]="toggleAllAriaLabel"
2102
+ [binary]="true"
2103
+ (onChange)="onToggleAll($event)"
2104
+ *ngIf="showToggleAll && !selectionLimit"
2105
+ [variant]="$variant()"
2106
+ [disabled]="$disabled()"
2107
+ #headerCheckbox
2108
+ >
2109
+ <ng-template #icon let-klass="class">
2110
+ <svg data-p-icon="check" *ngIf="!headerCheckboxIconTemplate && !_headerCheckboxIconTemplate && allSelected()" [class]="klass" [attr.data-pc-section]="'icon'" />
2111
+ <ng-template
2112
+ *ngTemplateOutlet="
2113
+ headerCheckboxIconTemplate || _headerCheckboxIconTemplate;
2114
+ context: {
2115
+ checked: allSelected(),
2116
+ partialSelected: partialSelected(),
2117
+ class: klass
2118
+ }
2119
+ "
2120
+ ></ng-template>
2121
+ </ng-template>
2122
+ </p-checkbox>
2123
+
2124
+ <p-iconfield *ngIf="filter" [class]="cx('pcFilterContainer')">
2125
+ <input
2126
+ #filterInput
2127
+ pInputText
2128
+ [variant]="$variant()"
2129
+ type="text"
2130
+ [attr.autocomplete]="autocomplete"
2131
+ role="searchbox"
2132
+ [attr.aria-owns]="id + '_list'"
2133
+ [attr.aria-activedescendant]="focusedOptionId"
2134
+ [value]="_filterValue() || ''"
2135
+ (input)="onFilterInputChange($event)"
2136
+ (keydown)="onFilterKeyDown($event)"
2137
+ (click)="onInputClick($event)"
2138
+ (blur)="onFilterBlur($event)"
2139
+ [class]="cx('pcFilter')"
2140
+ [attr.disabled]="$disabled() ? '' : undefined"
2141
+ [attr.placeholder]="filterPlaceHolder"
2142
+ [attr.aria-label]="ariaFilterLabel"
2143
+ />
2144
+ <p-inputicon>
2145
+ <svg data-p-icon="search" *ngIf="!filterIconTemplate && !_filterIconTemplate" />
2146
+ <span *ngIf="filterIconTemplate || _filterIconTemplate" class="p-multiselect-filter-icon">
2147
+ <ng-template *ngTemplateOutlet="filterIconTemplate || _filterIconTemplate"></ng-template>
2148
+ </span>
2149
+ </p-inputicon>
2150
+ </p-iconfield>
2151
+ </ng-template>
2152
+ </div>
2153
+ <div [class]="cx('listContainer')" [style.max-height]="virtualScroll ? 'auto' : scrollHeight || 'auto'">
2154
+ <p-scroller
2155
+ *ngIf="virtualScroll"
2156
+ #scroller
2157
+ [items]="visibleOptions()"
2158
+ [style]="{ height: scrollHeight }"
2159
+ [itemSize]="virtualScrollItemSize"
2160
+ [autoSize]="true"
2161
+ [tabindex]="-1"
2162
+ [lazy]="lazy"
2163
+ (onLazyLoad)="onLazyLoad.emit($event)"
2164
+ [options]="virtualScrollOptions"
2165
+ >
2166
+ <ng-template #content let-items let-scrollerOptions="options">
2167
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
2168
+ </ng-template>
2169
+ <ng-container *ngIf="loaderTemplate || _loaderTemplate">
2170
+ <ng-template #loader let-scrollerOptions="options">
2171
+ <ng-container *ngTemplateOutlet="loaderTemplate || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
2172
+ </ng-template>
2173
+ </ng-container>
2174
+ </p-scroller>
2175
+ <ng-container *ngIf="!virtualScroll">
2176
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: visibleOptions(), options: {} }"></ng-container>
2177
+ </ng-container>
2178
+
2179
+ <ng-template #buildInItems let-items let-scrollerOptions="options">
2180
+ <ul #items [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" aria-multiselectable="true" [attr.aria-label]="listLabel">
2181
+ <ng-template ngFor let-option [ngForOf]="items" let-i="index">
2182
+ <ng-container *ngIf="isOptionGroup(option)">
2183
+ <li [attr.id]="id + '_' + getOptionIndex(i, scrollerOptions)" [class]="cx('optionGroup')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
2184
+ <span *ngIf="!groupTemplate">{{ getOptionGroupLabel(option.optionGroup) }}</span>
2185
+ <ng-container *ngTemplateOutlet="groupTemplate; context: { $implicit: option.optionGroup }"></ng-container>
2186
+ </li>
2187
+ </ng-container>
2188
+ <ng-container *ngIf="!isOptionGroup(option)">
2189
+ <p-multiselect-item
2190
+ [id]="id + '_' + getOptionIndex(i, scrollerOptions)"
2191
+ [option]="option"
2192
+ [selected]="isSelected(option)"
2193
+ [label]="getOptionLabel(option)"
2194
+ [disabled]="isOptionDisabled(option)"
2195
+ [template]="itemTemplate || _itemTemplate"
2196
+ [itemCheckboxIconTemplate]="itemCheckboxIconTemplate || _itemCheckboxIconTemplate"
2197
+ [itemSize]="scrollerOptions.itemSize"
2198
+ [focused]="focusedOptionIndex() === getOptionIndex(i, scrollerOptions)"
2199
+ [ariaPosInset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
2200
+ [ariaSetSize]="ariaSetSize"
2201
+ [variant]="$variant()"
2202
+ [highlightOnSelect]="highlightOnSelect"
2203
+ (onClick)="onOptionSelect($event, false, getOptionIndex(i, scrollerOptions))"
2204
+ (onMouseEnter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
2205
+ ></p-multiselect-item>
2206
+ </ng-container>
2207
+ </ng-template>
2208
+
2209
+ <li *ngIf="hasFilter() && isEmpty()" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
2210
+ @if (!emptyFilterTemplate && !_emptyFilterTemplate && !emptyTemplate && !_emptyTemplate) {
2211
+ {{ emptyFilterMessageLabel }}
2212
+ } @else {
2213
+ <ng-container *ngTemplateOutlet="emptyFilterTemplate || _emptyFilterTemplate || emptyTemplate || _emptyFilterTemplate"></ng-container>
2214
+ }
2215
+ </li>
2216
+ <li *ngIf="!hasFilter() && isEmpty()" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
2217
+ @if (!emptyTemplate && !_emptyTemplate) {
2218
+ {{ emptyMessageLabel }}
2219
+ } @else {
2220
+ <ng-container *ngTemplateOutlet="emptyTemplate || _emptyTemplate"></ng-container>
2221
+ }
2222
+ </li>
2223
+ </ul>
2224
+ </ng-template>
2225
+ </div>
2226
+ <div *ngIf="footerFacet || footerTemplate || _footerTemplate">
2227
+ <ng-content select="p-footer"></ng-content>
2228
+ <ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
2229
+ </div>
2230
+
2231
+ <span
2232
+ #lastHiddenFocusableEl
2233
+ role="presentation"
2234
+ class="p-hidden-accessible p-hidden-focusable"
2235
+ [attr.tabindex]="0"
2236
+ (focus)="onLastHiddenFocus($event)"
2237
+ [attr.data-p-hidden-accessible]="true"
2238
+ [attr.data-p-hidden-focusable]="true"
2239
+ ></span>
2240
+ </div>
2241
+ </ng-template>
2242
+ </p-overlay>
2243
+ `,
2244
+ providers: [MULTISELECT_VALUE_ACCESSOR, MultiSelectStyle],
2245
+ changeDetection: ChangeDetectionStrategy.OnPush,
2246
+ encapsulation: ViewEncapsulation.None,
2247
+ host: {
2248
+ '[attr.id]': 'id',
2249
+ '(click)': 'onContainerClick($event)',
2250
+ '[class]': "cn(cx('root'), styleClass)",
2251
+ '[style]': "sx('root')"
2252
+ }
2253
+ }]
2254
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i3.FilterService }, { type: i3.OverlayService }], propDecorators: { id: [{
2255
+ type: Input
2256
+ }], ariaLabel: [{
2257
+ type: Input
2258
+ }], styleClass: [{
2259
+ type: Input
2260
+ }], panelStyle: [{
2261
+ type: Input
2262
+ }], panelStyleClass: [{
2263
+ type: Input
2264
+ }], inputId: [{
2265
+ type: Input
2266
+ }], readonly: [{
2267
+ type: Input,
2268
+ args: [{ transform: booleanAttribute }]
2269
+ }], group: [{
2270
+ type: Input,
2271
+ args: [{ transform: booleanAttribute }]
2272
+ }], filter: [{
2273
+ type: Input,
2274
+ args: [{ transform: booleanAttribute }]
2275
+ }], filterPlaceHolder: [{
2276
+ type: Input
2277
+ }], filterLocale: [{
2278
+ type: Input
2279
+ }], overlayVisible: [{
2280
+ type: Input,
2281
+ args: [{ transform: booleanAttribute }]
2282
+ }], tabindex: [{
2283
+ type: Input,
2284
+ args: [{ transform: numberAttribute }]
2285
+ }], dataKey: [{
2286
+ type: Input
2287
+ }], ariaLabelledBy: [{
2288
+ type: Input
2289
+ }], displaySelectedLabel: [{
2290
+ type: Input
2291
+ }], maxSelectedLabels: [{
2292
+ type: Input
2293
+ }], selectionLimit: [{
2294
+ type: Input,
2295
+ args: [{ transform: numberAttribute }]
2296
+ }], selectedItemsLabel: [{
2297
+ type: Input
2298
+ }], showToggleAll: [{
2299
+ type: Input,
2300
+ args: [{ transform: booleanAttribute }]
2301
+ }], emptyFilterMessage: [{
2302
+ type: Input
2303
+ }], emptyMessage: [{
2304
+ type: Input
2305
+ }], resetFilterOnHide: [{
2306
+ type: Input,
2307
+ args: [{ transform: booleanAttribute }]
2308
+ }], dropdownIcon: [{
2309
+ type: Input
2310
+ }], chipIcon: [{
2311
+ type: Input
2312
+ }], optionLabel: [{
2313
+ type: Input
2314
+ }], optionValue: [{
2315
+ type: Input
2316
+ }], optionDisabled: [{
2317
+ type: Input
2318
+ }], optionGroupLabel: [{
2319
+ type: Input
2320
+ }], optionGroupChildren: [{
2321
+ type: Input
2322
+ }], showHeader: [{
2323
+ type: Input,
2324
+ args: [{ transform: booleanAttribute }]
2325
+ }], filterBy: [{
2326
+ type: Input
2327
+ }], scrollHeight: [{
2328
+ type: Input
2329
+ }], lazy: [{
2330
+ type: Input,
2331
+ args: [{ transform: booleanAttribute }]
2332
+ }], virtualScroll: [{
2333
+ type: Input,
2334
+ args: [{ transform: booleanAttribute }]
2335
+ }], loading: [{
2336
+ type: Input,
2337
+ args: [{ transform: booleanAttribute }]
2338
+ }], virtualScrollItemSize: [{
2339
+ type: Input,
2340
+ args: [{ transform: numberAttribute }]
2341
+ }], loadingIcon: [{
2342
+ type: Input
2343
+ }], virtualScrollOptions: [{
2344
+ type: Input
2345
+ }], overlayOptions: [{
2346
+ type: Input
2347
+ }], ariaFilterLabel: [{
2348
+ type: Input
2349
+ }], filterMatchMode: [{
2350
+ type: Input
2351
+ }], tooltip: [{
2352
+ type: Input
2353
+ }], tooltipPosition: [{
2354
+ type: Input
2355
+ }], tooltipPositionStyle: [{
2356
+ type: Input
2357
+ }], tooltipStyleClass: [{
2358
+ type: Input
2359
+ }], autofocusFilter: [{
2360
+ type: Input,
2361
+ args: [{ transform: booleanAttribute }]
2362
+ }], display: [{
2363
+ type: Input
2364
+ }], autocomplete: [{
2365
+ type: Input
2366
+ }], showClear: [{
2367
+ type: Input,
2368
+ args: [{ transform: booleanAttribute }]
2369
+ }], autofocus: [{
2370
+ type: Input,
2371
+ args: [{ transform: booleanAttribute }]
2372
+ }], placeholder: [{
2373
+ type: Input
2374
+ }], options: [{
2375
+ type: Input
2376
+ }], filterValue: [{
2377
+ type: Input
2378
+ }], selectAll: [{
2379
+ type: Input
2380
+ }], focusOnHover: [{
2381
+ type: Input,
2382
+ args: [{ transform: booleanAttribute }]
2383
+ }], filterFields: [{
2384
+ type: Input
2385
+ }], selectOnFocus: [{
2386
+ type: Input,
2387
+ args: [{ transform: booleanAttribute }]
2388
+ }], autoOptionFocus: [{
2389
+ type: Input,
2390
+ args: [{ transform: booleanAttribute }]
2391
+ }], highlightOnSelect: [{
2392
+ type: Input,
2393
+ args: [{ transform: booleanAttribute }]
2394
+ }], onChange: [{
2395
+ type: Output
2396
+ }], onFilter: [{
2397
+ type: Output
2398
+ }], onFocus: [{
2399
+ type: Output
2400
+ }], onBlur: [{
2401
+ type: Output
2402
+ }], onClick: [{
2403
+ type: Output
2404
+ }], onClear: [{
2405
+ type: Output
2406
+ }], onPanelShow: [{
2407
+ type: Output
2408
+ }], onPanelHide: [{
2409
+ type: Output
2410
+ }], onLazyLoad: [{
2411
+ type: Output
2412
+ }], onRemove: [{
2413
+ type: Output
2414
+ }], onSelectAllChange: [{
2415
+ type: Output
2416
+ }], overlayViewChild: [{
2417
+ type: ViewChild,
2418
+ args: ['overlay']
2419
+ }], filterInputChild: [{
2420
+ type: ViewChild,
2421
+ args: ['filterInput']
2422
+ }], focusInputViewChild: [{
2423
+ type: ViewChild,
2424
+ args: ['focusInput']
2425
+ }], itemsViewChild: [{
2426
+ type: ViewChild,
2427
+ args: ['items']
2428
+ }], scroller: [{
2429
+ type: ViewChild,
2430
+ args: ['scroller']
2431
+ }], lastHiddenFocusableElementOnOverlay: [{
2432
+ type: ViewChild,
2433
+ args: ['lastHiddenFocusableEl']
2434
+ }], firstHiddenFocusableElementOnOverlay: [{
2435
+ type: ViewChild,
2436
+ args: ['firstHiddenFocusableEl']
2437
+ }], headerCheckboxViewChild: [{
2438
+ type: ViewChild,
2439
+ args: ['headerCheckbox']
2440
+ }], footerFacet: [{
2441
+ type: ContentChild,
2442
+ args: [Footer]
2443
+ }], headerFacet: [{
2444
+ type: ContentChild,
2445
+ args: [Header]
2446
+ }], itemTemplate: [{
2447
+ type: ContentChild,
2448
+ args: ['item', { descendants: false }]
2449
+ }], groupTemplate: [{
2450
+ type: ContentChild,
2451
+ args: ['group', { descendants: false }]
2452
+ }], loaderTemplate: [{
2453
+ type: ContentChild,
2454
+ args: ['loader', { descendants: false }]
2455
+ }], headerTemplate: [{
2456
+ type: ContentChild,
2457
+ args: ['header', { descendants: false }]
2458
+ }], filterTemplate: [{
2459
+ type: ContentChild,
2460
+ args: ['filter', { descendants: false }]
2461
+ }], footerTemplate: [{
2462
+ type: ContentChild,
2463
+ args: ['footer', { descendants: false }]
2464
+ }], emptyFilterTemplate: [{
2465
+ type: ContentChild,
2466
+ args: ['emptyfilter', { descendants: false }]
2467
+ }], emptyTemplate: [{
2468
+ type: ContentChild,
2469
+ args: ['empty', { descendants: false }]
2470
+ }], selectedItemsTemplate: [{
2471
+ type: ContentChild,
2472
+ args: ['selecteditems', { descendants: false }]
2473
+ }], loadingIconTemplate: [{
2474
+ type: ContentChild,
2475
+ args: ['loadingicon', { descendants: false }]
2476
+ }], filterIconTemplate: [{
2477
+ type: ContentChild,
2478
+ args: ['filtericon', { descendants: false }]
2479
+ }], removeTokenIconTemplate: [{
2480
+ type: ContentChild,
2481
+ args: ['removetokenicon', { descendants: false }]
2482
+ }], chipIconTemplate: [{
2483
+ type: ContentChild,
2484
+ args: ['chipicon', { descendants: false }]
2485
+ }], clearIconTemplate: [{
2486
+ type: ContentChild,
2487
+ args: ['clearicon', { descendants: false }]
2488
+ }], dropdownIconTemplate: [{
2489
+ type: ContentChild,
2490
+ args: ['dropdownicon', { descendants: false }]
2491
+ }], itemCheckboxIconTemplate: [{
2492
+ type: ContentChild,
2493
+ args: ['itemcheckboxicon', { descendants: false }]
2494
+ }], headerCheckboxIconTemplate: [{
2495
+ type: ContentChild,
2496
+ args: ['headercheckboxicon', { descendants: false }]
2497
+ }], templates: [{
2498
+ type: ContentChildren,
2499
+ args: [PrimeTemplate]
2500
+ }] } });
2501
+ class MultiSelectModule {
2502
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2503
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectModule, imports: [MultiSelect, SharedModule], exports: [MultiSelect, SharedModule] });
2504
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectModule, imports: [MultiSelect, SharedModule, SharedModule] });
2505
+ }
2506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: MultiSelectModule, decorators: [{
2507
+ type: NgModule,
2508
+ args: [{
2509
+ imports: [MultiSelect, SharedModule],
2510
+ exports: [MultiSelect, SharedModule]
2511
+ }]
2512
+ }] });
2513
+
2514
+ /**
2515
+ * Generated bundle index. Do not edit.
2516
+ */
2517
+
2518
+ export { MULTISELECT_VALUE_ACCESSOR, MultiSelect, MultiSelectClasses, MultiSelectItem, MultiSelectModule, MultiSelectStyle };
2519
+ //# sourceMappingURL=primeng-multiselect.mjs.map