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,2073 @@
1
+ import * as i2 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, forwardRef, input, EventEmitter, inject, signal, computed, booleanAttribute, numberAttribute, ContentChildren, HostListener, ContentChild, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
6
+ import { resolveFieldData, isNotEmpty, uuid, findLastIndex, equals, focus, isEmpty, findSingle } from '@primeuix/utils';
7
+ import * as i1 from 'primeng/api';
8
+ import { TranslationKeys, SharedModule, PrimeTemplate } from 'primeng/api';
9
+ import { AutoFocus } from 'primeng/autofocus';
10
+ import { BaseInput } from 'primeng/baseinput';
11
+ import { Chip } from 'primeng/chip';
12
+ import { PrimeNG } from 'primeng/config';
13
+ import { TimesCircleIcon, SpinnerIcon, ChevronDownIcon, TimesIcon } from 'primeng/icons';
14
+ import { InputText } from 'primeng/inputtext';
15
+ import { Overlay } from 'primeng/overlay';
16
+ import { Ripple } from 'primeng/ripple';
17
+ import { Scroller } from 'primeng/scroller';
18
+ import { style } from '@primeuix/styles/autocomplete';
19
+ import { BaseStyle } from 'primeng/base';
20
+
21
+ const theme = /*css*/ `
22
+ ${style}
23
+
24
+ /* For PrimeNG */
25
+ p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input,
26
+ p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple,
27
+ p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input,
28
+ p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-multiple p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input,
29
+ p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple {
30
+ border-color: dt('autocomplete.invalid.border.color');
31
+ }
32
+
33
+ p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
34
+ p-autoComplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple,
35
+ p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
36
+ p-auto-complete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple,
37
+ p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
38
+ p-autocomplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
39
+ border-color: dt('autocomplete.focus.border.color');
40
+ }
41
+
42
+ p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder,
43
+ p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder,
44
+ p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder {
45
+ color: dt('autocomplete.invalid.placeholder.color');
46
+ }
47
+
48
+ p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder,
49
+ p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder,
50
+ p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder {
51
+ color: dt('autocomplete.invalid.placeholder.color');
52
+ }
53
+ `;
54
+ const inlineStyles = {
55
+ root: { position: 'relative' }
56
+ };
57
+ const classes = {
58
+ root: ({ instance }) => [
59
+ 'p-autocomplete p-component p-inputwrapper',
60
+ {
61
+ 'p-invalid': instance.invalid(),
62
+ 'p-focus': instance.focused,
63
+ 'p-inputwrapper-filled': instance.$filled(),
64
+ 'p-inputwrapper-focus': (instance.focused && !instance.$disabled()) || instance.autofocus || instance.overlayVisible,
65
+ 'p-autocomplete-open': instance.overlayVisible,
66
+ 'p-autocomplete-clearable': instance.showClear && !instance.$disabled(),
67
+ 'p-autocomplete-fluid': instance.hasFluid
68
+ }
69
+ ],
70
+ pcInputText: 'p-autocomplete-input',
71
+ inputMultiple: ({ instance }) => [
72
+ 'p-autocomplete-input-multiple',
73
+ {
74
+ 'p-disabled': instance.$disabled(),
75
+ 'p-variant-filled': instance.$variant() === 'filled'
76
+ }
77
+ ],
78
+ chipItem: ({ instance, i }) => [
79
+ 'p-autocomplete-chip-item',
80
+ {
81
+ 'p-focus': instance.focusedMultipleOptionIndex() === i
82
+ }
83
+ ],
84
+ pcChip: 'p-autocomplete-chip',
85
+ chipIcon: 'p-autocomplete-chip-icon',
86
+ inputChip: 'p-autocomplete-input-chip',
87
+ loader: 'p-autocomplete-loader',
88
+ dropdown: 'p-autocomplete-dropdown',
89
+ overlay: ({ instance }) => ['p-autocomplete-overlay p-component-overlay p-component', { 'p-input-filled': instance.$variant() === 'filled', 'p-ripple-disabled': instance.config.ripple() === false }],
90
+ listContainer: 'p-autocomplete-list-container',
91
+ list: 'p-autocomplete-list',
92
+ optionGroup: 'p-autocomplete-option-group',
93
+ option: ({ instance, option, i, scrollerOptions }) => ({
94
+ 'p-autocomplete-option': true,
95
+ 'p-autocomplete-option-selected': instance.isSelected(option),
96
+ 'p-focus': instance.focusedOptionIndex() === instance.getOptionIndex(i, scrollerOptions),
97
+ 'p-disabled': instance.isOptionDisabled(option)
98
+ }),
99
+ emptyMessage: 'p-autocomplete-empty-message',
100
+ clearIcon: 'p-autocomplete-clear-icon'
101
+ };
102
+ class AutoCompleteStyle extends BaseStyle {
103
+ name = 'autocomplete';
104
+ theme = theme;
105
+ classes = classes;
106
+ inlineStyles = inlineStyles;
107
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
108
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteStyle });
109
+ }
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteStyle, decorators: [{
111
+ type: Injectable
112
+ }] });
113
+ /**
114
+ *
115
+ * AutoComplete is an input component that provides real-time suggestions while being typed.
116
+ *
117
+ * [Live Demo](https://www.primeng.org/autocomplete/)
118
+ *
119
+ * @module autocompletestyle
120
+ *
121
+ */
122
+ var AutoCompleteClasses;
123
+ (function (AutoCompleteClasses) {
124
+ /**
125
+ * Class name of the root element
126
+ */
127
+ AutoCompleteClasses["root"] = "p-autocomplete";
128
+ /**
129
+ * Class name of the input element
130
+ */
131
+ AutoCompleteClasses["pcInputText"] = "p-autocomplete-input";
132
+ /**
133
+ * Class name of the input multiple element
134
+ */
135
+ AutoCompleteClasses["inputMultiple"] = "p-autocomplete-input-multiple";
136
+ /**
137
+ * Class name of the chip item element
138
+ */
139
+ AutoCompleteClasses["chipItem"] = "p-autocomplete-chip-item";
140
+ /**
141
+ * Class name of the chip element
142
+ */
143
+ AutoCompleteClasses["pcChip"] = "p-autocomplete-chip";
144
+ /**
145
+ * Class name of the chip icon element
146
+ */
147
+ AutoCompleteClasses["chipIcon"] = "p-autocomplete-chip-icon";
148
+ /**
149
+ * Class name of the input chip element
150
+ */
151
+ AutoCompleteClasses["inputChip"] = "p-autocomplete-input-chip";
152
+ /**
153
+ * Class name of the loader element
154
+ */
155
+ AutoCompleteClasses["loader"] = "p-autocomplete-loader";
156
+ /**
157
+ * Class name of the dropdown element
158
+ */
159
+ AutoCompleteClasses["dropdown"] = "p-autocomplete-dropdown";
160
+ /**
161
+ * Class name of the panel element
162
+ */
163
+ AutoCompleteClasses["panel"] = "p-autocomplete-overlay";
164
+ /**
165
+ * Class name of the list element
166
+ */
167
+ AutoCompleteClasses["list"] = "p-autocomplete-list";
168
+ /**
169
+ * Class name of the option group element
170
+ */
171
+ AutoCompleteClasses["optionGroup"] = "p-autocomplete-option-group";
172
+ /**
173
+ * Class name of the option element
174
+ */
175
+ AutoCompleteClasses["option"] = "p-autocomplete-option";
176
+ /**
177
+ * Class name of the empty message element
178
+ */
179
+ AutoCompleteClasses["emptyMessage"] = "p-autocomplete-empty-message";
180
+ /**
181
+ * Class name of the clear icon
182
+ */
183
+ AutoCompleteClasses["clearIcon"] = "p-autocomplete-clear-icon";
184
+ })(AutoCompleteClasses || (AutoCompleteClasses = {}));
185
+
186
+ const AUTOCOMPLETE_VALUE_ACCESSOR = {
187
+ provide: NG_VALUE_ACCESSOR,
188
+ useExisting: forwardRef(() => AutoComplete),
189
+ multi: true
190
+ };
191
+ /**
192
+ * AutoComplete is an input component that provides real-time suggestions when being typed.
193
+ * @group Components
194
+ */
195
+ class AutoComplete extends BaseInput {
196
+ overlayService;
197
+ zone;
198
+ /**
199
+ * Minimum number of characters to initiate a search.
200
+ * @deprecated since v20.0.0, use `minQueryLength` instead.
201
+ * @group Props
202
+ */
203
+ minLength = 1;
204
+ /**
205
+ * Minimum number of characters to initiate a search.
206
+ * @group Props
207
+ */
208
+ minQueryLength;
209
+ /**
210
+ * Delay between keystrokes to wait before sending a query.
211
+ * @group Props
212
+ */
213
+ delay = 300;
214
+ /**
215
+ * Inline style of the overlay panel element.
216
+ * @group Props
217
+ */
218
+ panelStyle;
219
+ /**
220
+ * Style class of the component.
221
+ * @deprecated since v20.0.0, use `class` instead.
222
+ * @group Props
223
+ */
224
+ styleClass;
225
+ /**
226
+ * Style class of the overlay panel element.
227
+ * @group Props
228
+ */
229
+ panelStyleClass;
230
+ /**
231
+ * Inline style of the input field.
232
+ * @group Props
233
+ */
234
+ inputStyle;
235
+ /**
236
+ * Identifier of the focus input to match a label defined for the component.
237
+ * @group Props
238
+ */
239
+ inputId;
240
+ /**
241
+ * Inline style of the input field.
242
+ * @group Props
243
+ */
244
+ inputStyleClass;
245
+ /**
246
+ * Hint text for the input field.
247
+ * @group Props
248
+ */
249
+ placeholder;
250
+ /**
251
+ * When present, it specifies that the input cannot be typed.
252
+ * @group Props
253
+ */
254
+ readonly;
255
+ /**
256
+ * Maximum height of the suggestions panel.
257
+ * @group Props
258
+ */
259
+ scrollHeight = '200px';
260
+ /**
261
+ * Defines if data is loaded and interacted with in lazy manner.
262
+ * @group Props
263
+ */
264
+ lazy = false;
265
+ /**
266
+ * Whether the data should be loaded on demand during scroll.
267
+ * @group Props
268
+ */
269
+ virtualScroll;
270
+ /**
271
+ * Height of an item in the list for VirtualScrolling.
272
+ * @group Props
273
+ */
274
+ virtualScrollItemSize;
275
+ /**
276
+ * Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
277
+ * @group Props
278
+ */
279
+ virtualScrollOptions;
280
+ /**
281
+ * When enabled, highlights the first item in the list by default.
282
+ * @group Props
283
+ */
284
+ autoHighlight;
285
+ /**
286
+ * When present, autocomplete clears the manual input if it does not match of the suggestions to force only accepting values from the suggestions.
287
+ * @group Props
288
+ */
289
+ forceSelection;
290
+ /**
291
+ * Type of the input, defaults to "text".
292
+ * @group Props
293
+ */
294
+ type = 'text';
295
+ /**
296
+ * Whether to automatically manage layering.
297
+ * @group Props
298
+ */
299
+ autoZIndex = true;
300
+ /**
301
+ * Base zIndex value to use in layering.
302
+ * @group Props
303
+ */
304
+ baseZIndex = 0;
305
+ /**
306
+ * Defines a string that labels the input for accessibility.
307
+ * @group Props
308
+ */
309
+ ariaLabel;
310
+ /**
311
+ * Defines a string that labels the dropdown button for accessibility.
312
+ * @group Props
313
+ */
314
+ dropdownAriaLabel;
315
+ /**
316
+ * Specifies one or more IDs in the DOM that labels the input field.
317
+ * @group Props
318
+ */
319
+ ariaLabelledBy;
320
+ /**
321
+ * Icon class of the dropdown icon.
322
+ * @group Props
323
+ */
324
+ dropdownIcon;
325
+ /**
326
+ * Ensures uniqueness of selected items on multiple mode.
327
+ * @group Props
328
+ */
329
+ unique = true;
330
+ /**
331
+ * Whether to display options as grouped when nested options are provided.
332
+ * @group Props
333
+ */
334
+ group;
335
+ /**
336
+ * Whether to run a query when input receives focus.
337
+ * @group Props
338
+ */
339
+ completeOnFocus = false;
340
+ /**
341
+ * When enabled, a clear icon is displayed to clear the value.
342
+ * @group Props
343
+ */
344
+ showClear = false;
345
+ /**
346
+ * Displays a button next to the input field when enabled.
347
+ * @group Props
348
+ */
349
+ dropdown;
350
+ /**
351
+ * Whether to show the empty message or not.
352
+ * @group Props
353
+ */
354
+ showEmptyMessage = true;
355
+ /**
356
+ * Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value.
357
+ * @group Props
358
+ */
359
+ dropdownMode = 'blank';
360
+ /**
361
+ * Specifies if multiple values can be selected.
362
+ * @group Props
363
+ */
364
+ multiple;
365
+ /**
366
+ * Index of the element in tabbing order.
367
+ * @group Props
368
+ */
369
+ tabindex;
370
+ /**
371
+ * A property to uniquely identify a value in options.
372
+ * @group Props
373
+ */
374
+ dataKey;
375
+ /**
376
+ * Text to display when there is no data. Defaults to global value in i18n translation configuration.
377
+ * @group Props
378
+ */
379
+ emptyMessage;
380
+ /**
381
+ * Transition options of the show animation.
382
+ * @group Props
383
+ */
384
+ showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
385
+ /**
386
+ * Transition options of the hide animation.
387
+ * @group Props
388
+ */
389
+ hideTransitionOptions = '.1s linear';
390
+ /**
391
+ * When present, it specifies that the component should automatically get focus on load.
392
+ * @group Props
393
+ */
394
+ autofocus;
395
+ /**
396
+ * Used to define a string that autocomplete attribute the current element.
397
+ * @group Props
398
+ */
399
+ autocomplete = 'off';
400
+ /**
401
+ * Name of the options field of an option group.
402
+ * @group Props
403
+ */
404
+ optionGroupChildren = 'items';
405
+ /**
406
+ * Name of the label field of an option group.
407
+ * @group Props
408
+ */
409
+ optionGroupLabel = 'label';
410
+ /**
411
+ * Options for the overlay element.
412
+ * @group Props
413
+ */
414
+ overlayOptions;
415
+ /**
416
+ * An array of suggestions to display.
417
+ * @group Props
418
+ */
419
+ get suggestions() {
420
+ return this._suggestions();
421
+ }
422
+ set suggestions(value) {
423
+ this._suggestions.set(value);
424
+ this.handleSuggestionsChange();
425
+ }
426
+ /**
427
+ * Property name or getter function to use as the label of an option.
428
+ * @group Props
429
+ */
430
+ optionLabel;
431
+ /**
432
+ * Property name or getter function to use as the value of an option.
433
+ * @group Props
434
+ */
435
+ optionValue;
436
+ /**
437
+ * Unique identifier of the component.
438
+ * @group Props
439
+ */
440
+ id;
441
+ /**
442
+ * Text to display when the search is active. Defaults to global value in i18n translation configuration.
443
+ * @group Props
444
+ * @defaultValue '{0} results are available'
445
+ */
446
+ searchMessage;
447
+ /**
448
+ * Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration.
449
+ * @group Props
450
+ * @defaultValue 'No selected item'
451
+ */
452
+ emptySelectionMessage;
453
+ /**
454
+ * Text to be displayed in hidden accessible field when options are selected. Defaults to global value in i18n translation configuration.
455
+ * @group Props
456
+ * @defaultValue '{0} items selected'
457
+ */
458
+ selectionMessage;
459
+ /**
460
+ * Whether to focus on the first visible or selected element when the overlay panel is shown.
461
+ * @group Props
462
+ */
463
+ autoOptionFocus = false;
464
+ /**
465
+ * When enabled, the focused option is selected.
466
+ * @group Props
467
+ */
468
+ selectOnFocus;
469
+ /**
470
+ * Locale to use in searching. The default locale is the host environment's current locale.
471
+ * @group Props
472
+ */
473
+ searchLocale;
474
+ /**
475
+ * Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
476
+ * @group Props
477
+ */
478
+ optionDisabled;
479
+ /**
480
+ * When enabled, the hovered option will be focused.
481
+ * @group Props
482
+ */
483
+ focusOnHover = true;
484
+ /**
485
+ * Whether typeahead is active or not.
486
+ * @defaultValue true
487
+ * @group Props
488
+ */
489
+ typeahead = true;
490
+ /**
491
+ * 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).
492
+ * @defaultValue 'self'
493
+ * @group Props
494
+ */
495
+ appendTo = input(undefined, ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
496
+ /**
497
+ * Callback to invoke to search for suggestions.
498
+ * @param {AutoCompleteCompleteEvent} event - Custom complete event.
499
+ * @group Emits
500
+ */
501
+ completeMethod = new EventEmitter();
502
+ /**
503
+ * Callback to invoke when a suggestion is selected.
504
+ * @param {AutoCompleteSelectEvent} event - custom select event.
505
+ * @group Emits
506
+ */
507
+ onSelect = new EventEmitter();
508
+ /**
509
+ * Callback to invoke when a selected value is removed.
510
+ * @param {AutoCompleteUnselectEvent} event - custom unselect event.
511
+ * @group Emits
512
+ */
513
+ onUnselect = new EventEmitter();
514
+ /**
515
+ * Callback to invoke when the component receives focus.
516
+ * @param {Event} event - Browser event.
517
+ * @group Emits
518
+ */
519
+ onFocus = new EventEmitter();
520
+ /**
521
+ * Callback to invoke when the component loses focus.
522
+ * @param {Event} event - Browser event.
523
+ * @group Emits
524
+ */
525
+ onBlur = new EventEmitter();
526
+ /**
527
+ * Callback to invoke to when dropdown button is clicked.
528
+ * @param {AutoCompleteDropdownClickEvent} event - custom dropdown click event.
529
+ * @group Emits
530
+ */
531
+ onDropdownClick = new EventEmitter();
532
+ /**
533
+ * Callback to invoke when clear button is clicked.
534
+ * @param {Event} event - Browser event.
535
+ * @group Emits
536
+ */
537
+ onClear = new EventEmitter();
538
+ /**
539
+ * Callback to invoke on input key up.
540
+ * @param {KeyboardEvent} event - Keyboard event.
541
+ * @group Emits
542
+ */
543
+ onKeyUp = new EventEmitter();
544
+ /**
545
+ * Callback to invoke on overlay is shown.
546
+ * @param {Event} event - Browser event.
547
+ * @group Emits
548
+ */
549
+ onShow = new EventEmitter();
550
+ /**
551
+ * Callback to invoke on overlay is hidden.
552
+ * @param {Event} event - Browser event.
553
+ * @group Emits
554
+ */
555
+ onHide = new EventEmitter();
556
+ /**
557
+ * Callback to invoke on lazy load data.
558
+ * @param {AutoCompleteLazyLoadEvent} event - Lazy load event.
559
+ * @group Emits
560
+ */
561
+ onLazyLoad = new EventEmitter();
562
+ inputEL;
563
+ multiInputEl;
564
+ multiContainerEL;
565
+ dropdownButton;
566
+ itemsViewChild;
567
+ scroller;
568
+ overlayViewChild;
569
+ itemsWrapper;
570
+ /**
571
+ * Custom item template.
572
+ * @group Templates
573
+ */
574
+ itemTemplate;
575
+ /**
576
+ * Custom empty message template.
577
+ * @group Templates
578
+ */
579
+ emptyTemplate;
580
+ /**
581
+ * Custom header template.
582
+ * @group Templates
583
+ */
584
+ headerTemplate;
585
+ /**
586
+ * Custom footer template.
587
+ * @group Templates
588
+ */
589
+ footerTemplate;
590
+ /**
591
+ * Custom selected item template.
592
+ * @group Templates
593
+ */
594
+ selectedItemTemplate;
595
+ /**
596
+ * Custom group item template.
597
+ * @group Templates
598
+ */
599
+ groupTemplate;
600
+ /**
601
+ * Custom loader template.
602
+ * @group Templates
603
+ */
604
+ loaderTemplate;
605
+ /**
606
+ * Custom remove icon template.
607
+ * @group Templates
608
+ */
609
+ removeIconTemplate;
610
+ /**
611
+ * Custom loading icon template.
612
+ * @group Templates
613
+ */
614
+ loadingIconTemplate;
615
+ /**
616
+ * Custom clear icon template.
617
+ * @group Templates
618
+ */
619
+ clearIconTemplate;
620
+ /**
621
+ * Custom dropdown icon template.
622
+ * @group Templates
623
+ */
624
+ dropdownIconTemplate;
625
+ onHostClick(event) {
626
+ this.onContainerClick(event);
627
+ }
628
+ primeng = inject(PrimeNG);
629
+ value;
630
+ _suggestions = signal(null, ...(ngDevMode ? [{ debugName: "_suggestions" }] : []));
631
+ timeout;
632
+ overlayVisible;
633
+ suggestionsUpdated;
634
+ highlightOption;
635
+ highlightOptionChanged;
636
+ focused = false;
637
+ loading;
638
+ scrollHandler;
639
+ listId;
640
+ searchTimeout;
641
+ dirty = false;
642
+ _itemTemplate;
643
+ _groupTemplate;
644
+ _selectedItemTemplate;
645
+ _headerTemplate;
646
+ _emptyTemplate;
647
+ _footerTemplate;
648
+ _loaderTemplate;
649
+ _removeIconTemplate;
650
+ _loadingIconTemplate;
651
+ _clearIconTemplate;
652
+ _dropdownIconTemplate;
653
+ focusedMultipleOptionIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedMultipleOptionIndex" }] : []));
654
+ focusedOptionIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedOptionIndex" }] : []));
655
+ _componentStyle = inject(AutoCompleteStyle);
656
+ $appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), ...(ngDevMode ? [{ debugName: "$appendTo" }] : []));
657
+ visibleOptions = computed(() => {
658
+ return this.group ? this.flatOptions(this._suggestions()) : this._suggestions() || [];
659
+ }, ...(ngDevMode ? [{ debugName: "visibleOptions" }] : []));
660
+ inputValue = computed(() => {
661
+ const modelValue = this.modelValue();
662
+ const selectedOption = this.optionValueSelected ? (this.suggestions || []).find((item) => resolveFieldData(item, this.optionValue) === modelValue) : modelValue;
663
+ if (isNotEmpty(modelValue)) {
664
+ if (typeof modelValue === 'object' || this.optionValueSelected) {
665
+ const label = this.getOptionLabel(selectedOption);
666
+ return label != null ? label : modelValue;
667
+ }
668
+ else {
669
+ return modelValue;
670
+ }
671
+ }
672
+ else {
673
+ return '';
674
+ }
675
+ }, ...(ngDevMode ? [{ debugName: "inputValue" }] : []));
676
+ get focusedMultipleOptionId() {
677
+ return this.focusedMultipleOptionIndex() !== -1 ? `${this.id}_multiple_option_${this.focusedMultipleOptionIndex()}` : null;
678
+ }
679
+ get focusedOptionId() {
680
+ return this.focusedOptionIndex() !== -1 ? `${this.id}_${this.focusedOptionIndex()}` : null;
681
+ }
682
+ get searchResultMessageText() {
683
+ return isNotEmpty(this.visibleOptions()) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions().length) : this.emptySearchMessageText;
684
+ }
685
+ get searchMessageText() {
686
+ return this.searchMessage || this.config.translation.searchMessage || '';
687
+ }
688
+ get emptySearchMessageText() {
689
+ return this.emptyMessage || this.config.translation.emptySearchMessage || '';
690
+ }
691
+ get selectionMessageText() {
692
+ return this.selectionMessage || this.config.translation.selectionMessage || '';
693
+ }
694
+ get emptySelectionMessageText() {
695
+ return this.emptySelectionMessage || this.config.translation.emptySelectionMessage || '';
696
+ }
697
+ get selectedMessageText() {
698
+ return this.hasSelectedOption() ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue()?.length : '1') : this.emptySelectionMessageText;
699
+ }
700
+ get ariaSetSize() {
701
+ return this.visibleOptions().filter((option) => !this.isOptionGroup(option)).length;
702
+ }
703
+ get listLabel() {
704
+ return this.config.getTranslation(TranslationKeys.ARIA)['listLabel'];
705
+ }
706
+ get virtualScrollerDisabled() {
707
+ return !this.virtualScroll;
708
+ }
709
+ get optionValueSelected() {
710
+ return typeof this.modelValue() === 'string' && this.optionValue;
711
+ }
712
+ chipItemClass(index) {
713
+ return this._componentStyle.classes.chipItem({ instance: this, i: index });
714
+ }
715
+ constructor(overlayService, zone) {
716
+ super();
717
+ this.overlayService = overlayService;
718
+ this.zone = zone;
719
+ }
720
+ ngOnInit() {
721
+ super.ngOnInit();
722
+ this.id = this.id || uuid('pn_id_');
723
+ this.cd.detectChanges();
724
+ }
725
+ templates;
726
+ ngAfterContentInit() {
727
+ this.templates.forEach((item) => {
728
+ switch (item.getType()) {
729
+ case 'item':
730
+ this._itemTemplate = item.template;
731
+ break;
732
+ case 'group':
733
+ this._groupTemplate = item.template;
734
+ break;
735
+ case 'selecteditem':
736
+ this._selectedItemTemplate = item.template;
737
+ break;
738
+ case 'selectedItem':
739
+ this._selectedItemTemplate = item.template;
740
+ break;
741
+ case 'header':
742
+ this._headerTemplate = item.template;
743
+ break;
744
+ case 'empty':
745
+ this._emptyTemplate = item.template;
746
+ break;
747
+ case 'footer':
748
+ this._footerTemplate = item.template;
749
+ break;
750
+ case 'loader':
751
+ this._loaderTemplate = item.template;
752
+ break;
753
+ case 'removetokenicon':
754
+ this._removeIconTemplate = item.template;
755
+ break;
756
+ case 'loadingicon':
757
+ this._loadingIconTemplate = item.template;
758
+ break;
759
+ case 'clearicon':
760
+ this._clearIconTemplate = item.template;
761
+ break;
762
+ case 'dropdownicon':
763
+ this._dropdownIconTemplate = item.template;
764
+ break;
765
+ default:
766
+ this._itemTemplate = item.template;
767
+ break;
768
+ }
769
+ });
770
+ }
771
+ ngAfterViewChecked() {
772
+ //Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
773
+ if (this.suggestionsUpdated && this.overlayViewChild) {
774
+ this.zone.runOutsideAngular(() => {
775
+ setTimeout(() => {
776
+ if (this.overlayViewChild) {
777
+ this.overlayViewChild.alignOverlay();
778
+ }
779
+ }, 1);
780
+ this.suggestionsUpdated = false;
781
+ });
782
+ }
783
+ }
784
+ handleSuggestionsChange() {
785
+ if (this.loading) {
786
+ this._suggestions()?.length > 0 || this.showEmptyMessage || !!this.emptyTemplate ? this.show() : this.hide();
787
+ const focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
788
+ this.focusedOptionIndex.set(focusedOptionIndex);
789
+ this.suggestionsUpdated = true;
790
+ this.loading = false;
791
+ this.cd.markForCheck();
792
+ }
793
+ }
794
+ flatOptions(options) {
795
+ return (options || []).reduce((result, option, index) => {
796
+ result.push({ optionGroup: option, group: true, index });
797
+ const optionGroupChildren = this.getOptionGroupChildren(option);
798
+ optionGroupChildren && optionGroupChildren.forEach((o) => result.push(o));
799
+ return result;
800
+ }, []);
801
+ }
802
+ isOptionGroup(option) {
803
+ return this.optionGroupLabel && option.optionGroup && option.group;
804
+ }
805
+ findFirstOptionIndex() {
806
+ return this.visibleOptions().findIndex((option) => this.isValidOption(option));
807
+ }
808
+ findLastOptionIndex() {
809
+ return findLastIndex(this.visibleOptions(), (option) => this.isValidOption(option));
810
+ }
811
+ findFirstFocusedOptionIndex() {
812
+ const selectedIndex = this.findSelectedOptionIndex();
813
+ return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
814
+ }
815
+ findLastFocusedOptionIndex() {
816
+ const selectedIndex = this.findSelectedOptionIndex();
817
+ return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
818
+ }
819
+ findSelectedOptionIndex() {
820
+ return this.hasSelectedOption() ? this.visibleOptions().findIndex((option) => this.isValidSelectedOption(option)) : -1;
821
+ }
822
+ findNextOptionIndex(index) {
823
+ const matchedOptionIndex = index < this.visibleOptions().length - 1
824
+ ? this.visibleOptions()
825
+ .slice(index + 1)
826
+ .findIndex((option) => this.isValidOption(option))
827
+ : -1;
828
+ return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
829
+ }
830
+ findPrevOptionIndex(index) {
831
+ const matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions().slice(0, index), (option) => this.isValidOption(option)) : -1;
832
+ return matchedOptionIndex > -1 ? matchedOptionIndex : index;
833
+ }
834
+ isValidSelectedOption(option) {
835
+ return this.isValidOption(option) && this.isSelected(option);
836
+ }
837
+ isValidOption(option) {
838
+ return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
839
+ }
840
+ isOptionDisabled(option) {
841
+ return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;
842
+ }
843
+ isSelected(option) {
844
+ if (this.multiple) {
845
+ return this.unique ? this.modelValue()?.find((model) => equals(model, this.getOptionValue(option), this.equalityKey())) : false;
846
+ }
847
+ return equals(this.modelValue(), this.getOptionValue(option), this.equalityKey());
848
+ }
849
+ isOptionMatched(option, value) {
850
+ return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale) === value.toLocaleLowerCase(this.searchLocale);
851
+ }
852
+ isInputClicked(event) {
853
+ return event.target === this.inputEL.nativeElement;
854
+ }
855
+ isDropdownClicked(event) {
856
+ return this.dropdownButton?.nativeElement ? event.target === this.dropdownButton.nativeElement || this.dropdownButton.nativeElement.contains(event.target) : false;
857
+ }
858
+ equalityKey() {
859
+ return this.dataKey; // TODO: The 'optionValue' properties can be added.
860
+ }
861
+ onContainerClick(event) {
862
+ if (this.$disabled() || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) {
863
+ return;
864
+ }
865
+ if (!this.overlayViewChild || !this.overlayViewChild.overlayViewChild?.nativeElement.contains(event.target)) {
866
+ focus(this.inputEL.nativeElement);
867
+ }
868
+ }
869
+ handleDropdownClick(event) {
870
+ let query = undefined;
871
+ if (this.overlayVisible) {
872
+ this.hide(true);
873
+ }
874
+ else {
875
+ focus(this.inputEL.nativeElement);
876
+ query = this.inputEL.nativeElement.value;
877
+ if (this.dropdownMode === 'blank')
878
+ this.search(event, '', 'dropdown');
879
+ else if (this.dropdownMode === 'current')
880
+ this.search(event, query, 'dropdown');
881
+ }
882
+ this.onDropdownClick.emit({ originalEvent: event, query });
883
+ }
884
+ onInput(event) {
885
+ if (this.typeahead) {
886
+ const _minLength = this.minQueryLength || this.minLength;
887
+ if (this.searchTimeout) {
888
+ clearTimeout(this.searchTimeout);
889
+ }
890
+ let query = event.target.value;
891
+ if (this.maxlength() !== null) {
892
+ query = query.split('').slice(0, this.maxlength()).join('');
893
+ }
894
+ if (!this.multiple && !this.forceSelection) {
895
+ this.updateModel(query);
896
+ }
897
+ if (query.length === 0 && !this.multiple) {
898
+ this.onClear.emit();
899
+ setTimeout(() => {
900
+ this.hide();
901
+ }, this.delay / 2);
902
+ }
903
+ else {
904
+ if (query.length >= _minLength) {
905
+ this.focusedOptionIndex.set(-1);
906
+ this.searchTimeout = setTimeout(() => {
907
+ this.search(event, query, 'input');
908
+ }, this.delay);
909
+ }
910
+ else {
911
+ this.hide();
912
+ }
913
+ }
914
+ }
915
+ }
916
+ onInputChange(event) {
917
+ if (this.forceSelection) {
918
+ let valid = false;
919
+ if (this.visibleOptions()) {
920
+ const matchedValue = this.visibleOptions().find((option) => this.isOptionMatched(option, this.inputEL.nativeElement.value || ''));
921
+ if (matchedValue !== undefined) {
922
+ valid = true;
923
+ !this.isSelected(matchedValue) && this.onOptionSelect(event, matchedValue);
924
+ }
925
+ }
926
+ if (!valid) {
927
+ this.inputEL.nativeElement.value = '';
928
+ !this.multiple && this.updateModel(null);
929
+ }
930
+ }
931
+ }
932
+ onInputFocus(event) {
933
+ if (this.$disabled()) {
934
+ // For ScreenReaders
935
+ return;
936
+ }
937
+ if (!this.dirty && this.completeOnFocus) {
938
+ this.search(event, event.target.value, 'focus');
939
+ }
940
+ this.dirty = true;
941
+ this.focused = true;
942
+ const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
943
+ this.focusedOptionIndex.set(focusedOptionIndex);
944
+ this.overlayVisible && this.scrollInView(this.focusedOptionIndex());
945
+ this.onFocus.emit(event);
946
+ }
947
+ onMultipleContainerFocus(event) {
948
+ if (this.$disabled()) {
949
+ // For ScreenReaders
950
+ return;
951
+ }
952
+ this.focused = true;
953
+ }
954
+ onMultipleContainerBlur(event) {
955
+ this.focusedMultipleOptionIndex.set(-1);
956
+ this.focused = false;
957
+ }
958
+ onMultipleContainerKeyDown(event) {
959
+ if (this.$disabled()) {
960
+ event.preventDefault();
961
+ return;
962
+ }
963
+ switch (event.code) {
964
+ case 'ArrowLeft':
965
+ this.onArrowLeftKeyOnMultiple(event);
966
+ break;
967
+ case 'ArrowRight':
968
+ this.onArrowRightKeyOnMultiple(event);
969
+ break;
970
+ case 'Backspace':
971
+ this.onBackspaceKeyOnMultiple(event);
972
+ break;
973
+ default:
974
+ break;
975
+ }
976
+ }
977
+ onInputBlur(event) {
978
+ this.dirty = false;
979
+ this.focused = false;
980
+ this.focusedOptionIndex.set(-1);
981
+ this.onModelTouched();
982
+ this.onBlur.emit(event);
983
+ }
984
+ onInputPaste(event) {
985
+ this.onKeyDown(event);
986
+ }
987
+ onInputKeyUp(event) {
988
+ this.onKeyUp.emit(event);
989
+ }
990
+ onKeyDown(event) {
991
+ if (this.$disabled()) {
992
+ event.preventDefault();
993
+ return;
994
+ }
995
+ switch (event.code) {
996
+ case 'ArrowDown':
997
+ this.onArrowDownKey(event);
998
+ break;
999
+ case 'ArrowUp':
1000
+ this.onArrowUpKey(event);
1001
+ break;
1002
+ case 'ArrowLeft':
1003
+ this.onArrowLeftKey(event);
1004
+ break;
1005
+ case 'ArrowRight':
1006
+ this.onArrowRightKey(event);
1007
+ break;
1008
+ case 'Home':
1009
+ this.onHomeKey(event);
1010
+ break;
1011
+ case 'End':
1012
+ this.onEndKey(event);
1013
+ break;
1014
+ case 'PageDown':
1015
+ this.onPageDownKey(event);
1016
+ break;
1017
+ case 'PageUp':
1018
+ this.onPageUpKey(event);
1019
+ break;
1020
+ case 'Enter':
1021
+ case 'NumpadEnter':
1022
+ this.onEnterKey(event);
1023
+ break;
1024
+ case 'Escape':
1025
+ this.onEscapeKey(event);
1026
+ break;
1027
+ case 'Tab':
1028
+ this.onTabKey(event);
1029
+ break;
1030
+ case 'Backspace':
1031
+ this.onBackspaceKey(event);
1032
+ break;
1033
+ case 'ShiftLeft':
1034
+ case 'ShiftRight':
1035
+ //NOOP
1036
+ break;
1037
+ default:
1038
+ break;
1039
+ }
1040
+ }
1041
+ onArrowDownKey(event) {
1042
+ if (!this.overlayVisible) {
1043
+ return;
1044
+ }
1045
+ const optionIndex = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.findFirstFocusedOptionIndex();
1046
+ this.changeFocusedOptionIndex(event, optionIndex);
1047
+ event.preventDefault();
1048
+ event.stopPropagation();
1049
+ }
1050
+ onArrowUpKey(event) {
1051
+ if (!this.overlayVisible) {
1052
+ return;
1053
+ }
1054
+ if (event.altKey) {
1055
+ if (this.focusedOptionIndex() !== -1) {
1056
+ this.onOptionSelect(event, this.visibleOptions()[this.focusedOptionIndex()]);
1057
+ }
1058
+ this.overlayVisible && this.hide();
1059
+ event.preventDefault();
1060
+ }
1061
+ else {
1062
+ const optionIndex = this.focusedOptionIndex() !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex()) : this.findLastFocusedOptionIndex();
1063
+ this.changeFocusedOptionIndex(event, optionIndex);
1064
+ event.preventDefault();
1065
+ event.stopPropagation();
1066
+ }
1067
+ }
1068
+ onArrowLeftKey(event) {
1069
+ const target = event.currentTarget;
1070
+ this.focusedOptionIndex.set(-1);
1071
+ if (this.multiple) {
1072
+ if (isEmpty(target.value) && this.hasSelectedOption()) {
1073
+ focus(this.multiContainerEL.nativeElement);
1074
+ this.focusedMultipleOptionIndex.set(this.modelValue().length);
1075
+ }
1076
+ else {
1077
+ event.stopPropagation(); // To prevent onArrowLeftKeyOnMultiple method
1078
+ }
1079
+ }
1080
+ }
1081
+ onArrowRightKey(event) {
1082
+ this.focusedOptionIndex.set(-1);
1083
+ this.multiple && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method
1084
+ }
1085
+ onHomeKey(event) {
1086
+ const { currentTarget } = event;
1087
+ const len = currentTarget.value.length;
1088
+ currentTarget.setSelectionRange(0, event.shiftKey ? len : 0);
1089
+ this.focusedOptionIndex.set(-1);
1090
+ event.preventDefault();
1091
+ }
1092
+ onEndKey(event) {
1093
+ const { currentTarget } = event;
1094
+ const len = currentTarget.value.length;
1095
+ currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len);
1096
+ this.focusedOptionIndex.set(-1);
1097
+ event.preventDefault();
1098
+ }
1099
+ onPageDownKey(event) {
1100
+ this.scrollInView(this.visibleOptions().length - 1);
1101
+ event.preventDefault();
1102
+ }
1103
+ onPageUpKey(event) {
1104
+ this.scrollInView(0);
1105
+ event.preventDefault();
1106
+ }
1107
+ onEnterKey(event) {
1108
+ if (!this.typeahead) {
1109
+ if (this.multiple) {
1110
+ if (!this.isSelected(event.target.value)) {
1111
+ this.updateModel([...(this.modelValue() || []), event.target.value]);
1112
+ this.inputEL.nativeElement.value = '';
1113
+ }
1114
+ }
1115
+ }
1116
+ if (!this.overlayVisible) {
1117
+ return;
1118
+ }
1119
+ else {
1120
+ if (this.focusedOptionIndex() !== -1) {
1121
+ this.onOptionSelect(event, this.visibleOptions()[this.focusedOptionIndex()]);
1122
+ }
1123
+ this.hide();
1124
+ }
1125
+ event.preventDefault();
1126
+ }
1127
+ onEscapeKey(event) {
1128
+ this.overlayVisible && this.hide(true);
1129
+ event.preventDefault();
1130
+ }
1131
+ onTabKey(event) {
1132
+ if (this.focusedOptionIndex() !== -1) {
1133
+ this.onOptionSelect(event, this.visibleOptions()[this.focusedOptionIndex()]);
1134
+ }
1135
+ this.overlayVisible && this.hide();
1136
+ }
1137
+ onBackspaceKey(event) {
1138
+ if (this.multiple) {
1139
+ if (isNotEmpty(this.modelValue()) && !this.inputEL.nativeElement.value) {
1140
+ const removedValue = this.modelValue()[this.modelValue().length - 1];
1141
+ const newValue = this.modelValue().slice(0, -1);
1142
+ this.updateModel(newValue);
1143
+ this.onUnselect.emit({ originalEvent: event, value: removedValue });
1144
+ }
1145
+ event.stopPropagation(); // To prevent onBackspaceKeyOnMultiple method
1146
+ }
1147
+ if (!this.multiple && this.showClear && this.findSelectedOptionIndex() != -1) {
1148
+ this.clear();
1149
+ }
1150
+ }
1151
+ onArrowLeftKeyOnMultiple(event) {
1152
+ const optionIndex = this.focusedMultipleOptionIndex() < 1 ? 0 : this.focusedMultipleOptionIndex() - 1;
1153
+ this.focusedMultipleOptionIndex.set(optionIndex);
1154
+ }
1155
+ onArrowRightKeyOnMultiple(event) {
1156
+ let optionIndex = this.focusedMultipleOptionIndex();
1157
+ optionIndex++;
1158
+ this.focusedMultipleOptionIndex.set(optionIndex);
1159
+ if (optionIndex > this.modelValue().length - 1) {
1160
+ this.focusedMultipleOptionIndex.set(-1);
1161
+ focus(this.inputEL.nativeElement);
1162
+ }
1163
+ }
1164
+ onBackspaceKeyOnMultiple(event) {
1165
+ if (this.focusedMultipleOptionIndex() !== -1) {
1166
+ this.removeOption(event, this.focusedMultipleOptionIndex());
1167
+ }
1168
+ }
1169
+ onOptionSelect(event, option, isHide = true) {
1170
+ const value = this.getOptionValue(option);
1171
+ if (this.multiple) {
1172
+ this.inputEL.nativeElement.value = '';
1173
+ if (!this.isSelected(option)) {
1174
+ this.updateModel([...(this.modelValue() || []), value]);
1175
+ }
1176
+ }
1177
+ else {
1178
+ this.updateModel(value);
1179
+ }
1180
+ this.onSelect.emit({ originalEvent: event, value: option });
1181
+ isHide && this.hide(true);
1182
+ }
1183
+ onOptionMouseEnter(event, index) {
1184
+ if (this.focusOnHover) {
1185
+ this.changeFocusedOptionIndex(event, index);
1186
+ }
1187
+ }
1188
+ search(event, query, source) {
1189
+ //allow empty string but not undefined or null
1190
+ if (query === undefined || query === null) {
1191
+ return;
1192
+ }
1193
+ //do not search blank values on input change
1194
+ if (source === 'input' && query.trim().length === 0) {
1195
+ return;
1196
+ }
1197
+ this.loading = true;
1198
+ this.completeMethod.emit({ originalEvent: event, query });
1199
+ }
1200
+ removeOption(event, index) {
1201
+ event.stopPropagation();
1202
+ const removedOption = this.modelValue()[index];
1203
+ const value = this.modelValue().filter((_, i) => i !== index);
1204
+ this.updateModel(value);
1205
+ this.onUnselect.emit({ originalEvent: event, value: removedOption });
1206
+ focus(this.inputEL.nativeElement);
1207
+ }
1208
+ updateModel(value) {
1209
+ this.value = value;
1210
+ this.writeModelValue(value);
1211
+ this.onModelChange(value);
1212
+ this.updateInputValue();
1213
+ this.cd.markForCheck();
1214
+ }
1215
+ updateInputValue() {
1216
+ if (this.inputEL && this.inputEL.nativeElement) {
1217
+ if (!this.multiple) {
1218
+ this.inputEL.nativeElement.value = this.inputValue();
1219
+ }
1220
+ else {
1221
+ this.inputEL.nativeElement.value = '';
1222
+ }
1223
+ }
1224
+ }
1225
+ autoUpdateModel() {
1226
+ if ((this.selectOnFocus || this.autoHighlight) && this.autoOptionFocus && !this.hasSelectedOption()) {
1227
+ const focusedOptionIndex = this.findFirstFocusedOptionIndex();
1228
+ this.focusedOptionIndex.set(focusedOptionIndex);
1229
+ this.onOptionSelect(null, this.visibleOptions()[this.focusedOptionIndex()], false);
1230
+ }
1231
+ }
1232
+ scrollInView(index = -1) {
1233
+ const id = index !== -1 ? `${this.id}_${index}` : this.focusedOptionId;
1234
+ if (this.itemsViewChild && this.itemsViewChild.nativeElement) {
1235
+ const element = findSingle(this.itemsViewChild.nativeElement, `li[id="${id}"]`);
1236
+ if (element) {
1237
+ element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
1238
+ }
1239
+ else if (!this.virtualScrollerDisabled) {
1240
+ setTimeout(() => {
1241
+ this.virtualScroll && this.scroller?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
1242
+ }, 0);
1243
+ }
1244
+ }
1245
+ }
1246
+ changeFocusedOptionIndex(event, index) {
1247
+ if (this.focusedOptionIndex() !== index) {
1248
+ this.focusedOptionIndex.set(index);
1249
+ this.scrollInView();
1250
+ if (this.selectOnFocus) {
1251
+ this.onOptionSelect(event, this.visibleOptions()[index], false);
1252
+ }
1253
+ }
1254
+ }
1255
+ show(isFocus = false) {
1256
+ this.dirty = true;
1257
+ this.overlayVisible = true;
1258
+ const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
1259
+ this.focusedOptionIndex.set(focusedOptionIndex);
1260
+ isFocus && focus(this.inputEL.nativeElement);
1261
+ if (isFocus) {
1262
+ focus(this.inputEL.nativeElement);
1263
+ }
1264
+ this.onShow.emit();
1265
+ this.cd.markForCheck();
1266
+ }
1267
+ hide(isFocus = false) {
1268
+ const _hide = () => {
1269
+ this.dirty = isFocus;
1270
+ this.overlayVisible = false;
1271
+ this.focusedOptionIndex.set(-1);
1272
+ isFocus && focus(this.inputEL.nativeElement);
1273
+ this.onHide.emit();
1274
+ this.cd.markForCheck();
1275
+ };
1276
+ setTimeout(() => {
1277
+ _hide();
1278
+ }, 0); // For ScreenReaders
1279
+ }
1280
+ clear() {
1281
+ this.updateModel(null);
1282
+ this.inputEL.nativeElement.value = '';
1283
+ this.onClear.emit();
1284
+ }
1285
+ hasSelectedOption() {
1286
+ return isNotEmpty(this.modelValue());
1287
+ }
1288
+ getAriaPosInset(index) {
1289
+ return ((this.optionGroupLabel
1290
+ ? index -
1291
+ this.visibleOptions()
1292
+ .slice(0, index)
1293
+ .filter((option) => this.isOptionGroup(option)).length
1294
+ : index) + 1);
1295
+ }
1296
+ getOptionLabel(option) {
1297
+ return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option && option.label != undefined ? option.label : option;
1298
+ }
1299
+ getOptionValue(option) {
1300
+ return this.optionValue ? resolveFieldData(option, this.optionValue) : option && option.value != undefined ? option.value : option;
1301
+ }
1302
+ getOptionIndex(index, scrollerOptions) {
1303
+ return this.virtualScrollerDisabled ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index'];
1304
+ }
1305
+ getOptionGroupLabel(optionGroup) {
1306
+ return this.optionGroupLabel ? resolveFieldData(optionGroup, this.optionGroupLabel) : optionGroup && optionGroup.label != undefined ? optionGroup.label : optionGroup;
1307
+ }
1308
+ getOptionGroupChildren(optionGroup) {
1309
+ return this.optionGroupChildren ? resolveFieldData(optionGroup, this.optionGroupChildren) : optionGroup.items;
1310
+ }
1311
+ onOverlayAnimationStart(event) {
1312
+ if (event.toState === 'visible') {
1313
+ this.itemsWrapper = findSingle(this.overlayViewChild.overlayViewChild?.nativeElement, this.virtualScroll ? '.p-scroller' : '.p-autocomplete-panel');
1314
+ if (this.virtualScroll) {
1315
+ this.scroller?.setContentEl(this.itemsViewChild?.nativeElement);
1316
+ this.scroller.viewInit();
1317
+ }
1318
+ if (this.visibleOptions() && this.visibleOptions().length) {
1319
+ if (this.virtualScroll) {
1320
+ const selectedIndex = this.modelValue() ? this.focusedOptionIndex() : -1;
1321
+ if (selectedIndex !== -1) {
1322
+ this.scroller?.scrollToIndex(selectedIndex);
1323
+ }
1324
+ }
1325
+ else {
1326
+ let selectedListItem = findSingle(this.itemsWrapper, '.p-autocomplete-item.p-highlight');
1327
+ if (selectedListItem) {
1328
+ selectedListItem.scrollIntoView({ block: 'nearest', inline: 'center' });
1329
+ }
1330
+ }
1331
+ }
1332
+ }
1333
+ }
1334
+ /**
1335
+ * @override
1336
+ *
1337
+ * @see {@link BaseEditableHolder.writeControlValue}
1338
+ * Writes the value to the control.
1339
+ */
1340
+ writeControlValue(value, setModelValue) {
1341
+ this.value = value;
1342
+ setModelValue(value);
1343
+ this.updateInputValue();
1344
+ this.cd.markForCheck();
1345
+ }
1346
+ ngOnDestroy() {
1347
+ if (this.scrollHandler) {
1348
+ this.scrollHandler.destroy();
1349
+ this.scrollHandler = null;
1350
+ }
1351
+ super.ngOnDestroy();
1352
+ }
1353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoComplete, deps: [{ token: i1.OverlayService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1354
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: AutoComplete, isStandalone: true, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: { minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: false, isRequired: false, transformFunction: numberAttribute }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: false, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, 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 }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: false, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, dropdownAriaLabel: { classPropertyName: "dropdownAriaLabel", publicName: "dropdownAriaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: false, isRequired: false, transformFunction: null }, unique: { classPropertyName: "unique", publicName: "unique", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, group: { classPropertyName: "group", publicName: "group", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showEmptyMessage: { classPropertyName: "showEmptyMessage", publicName: "showEmptyMessage", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdownMode: { classPropertyName: "dropdownMode", publicName: "dropdownMode", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", 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 }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: false, isRequired: false, transformFunction: null }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: false, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: false, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", 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 }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, searchMessage: { classPropertyName: "searchMessage", publicName: "searchMessage", isSignal: false, isRequired: false, transformFunction: null }, emptySelectionMessage: { classPropertyName: "emptySelectionMessage", publicName: "emptySelectionMessage", isSignal: false, isRequired: false, transformFunction: null }, selectionMessage: { classPropertyName: "selectionMessage", publicName: "selectionMessage", isSignal: false, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, searchLocale: { classPropertyName: "searchLocale", publicName: "searchLocale", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: false, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onFocus: "onFocus", onBlur: "onBlur", onDropdownClick: "onDropdownClick", onClear: "onClear", onKeyUp: "onKeyUp", onShow: "onShow", onHide: "onHide", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "cn(cx('root'), styleClass)", "style": "sx('root')" } }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR, AutoCompleteStyle], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selecteditem"], descendants: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], descendants: true }, { propertyName: "removeIconTemplate", first: true, predicate: ["removeicon"], descendants: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], descendants: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"], descendants: true }, { propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "inputEL", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "multiInputEl", first: true, predicate: ["multiIn"], descendants: true }, { propertyName: "multiContainerEL", first: true, predicate: ["multiContainer"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["ddBtn"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1355
+ <input
1356
+ *ngIf="!multiple"
1357
+ #focusInput
1358
+ [pAutoFocus]="autofocus"
1359
+ pInputText
1360
+ [class]="cn(cx('pcInputText'), inputStyleClass)"
1361
+ [ngStyle]="inputStyle"
1362
+ [attr.type]="type"
1363
+ [attr.value]="inputValue()"
1364
+ [variant]="$variant()"
1365
+ [invalid]="invalid()"
1366
+ [attr.id]="inputId"
1367
+ [attr.autocomplete]="autocomplete"
1368
+ aria-autocomplete="list"
1369
+ role="combobox"
1370
+ [attr.placeholder]="placeholder"
1371
+ [attr.name]="name()"
1372
+ [attr.minlength]="minlength()"
1373
+ [pSize]="size()"
1374
+ [attr.min]="min()"
1375
+ [attr.max]="max()"
1376
+ [attr.pattern]="pattern()"
1377
+ [attr.size]="inputSize()"
1378
+ [attr.maxlength]="maxlength()"
1379
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1380
+ [attr.required]="required() ? '' : undefined"
1381
+ [attr.readonly]="readonly ? '' : undefined"
1382
+ [attr.disabled]="$disabled() ? '' : undefined"
1383
+ [attr.aria-label]="ariaLabel"
1384
+ [attr.aria-labelledby]="ariaLabelledBy"
1385
+ [attr.aria-required]="required()"
1386
+ [attr.aria-expanded]="overlayVisible ?? false"
1387
+ [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1388
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1389
+ (input)="onInput($event)"
1390
+ (keydown)="onKeyDown($event)"
1391
+ (change)="onInputChange($event)"
1392
+ (focus)="onInputFocus($event)"
1393
+ (blur)="onInputBlur($event)"
1394
+ (paste)="onInputPaste($event)"
1395
+ (keyup)="onInputKeyUp($event)"
1396
+ [fluid]="hasFluid"
1397
+ />
1398
+ <ng-container *ngIf="$filled() && !$disabled() && showClear && !loading">
1399
+ <svg data-p-icon="times" *ngIf="!clearIconTemplate && !_clearIconTemplate" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
1400
+ <span *ngIf="clearIconTemplate || _clearIconTemplate" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true">
1401
+ <ng-template *ngTemplateOutlet="clearIconTemplate || _clearIconTemplate"></ng-template>
1402
+ </span>
1403
+ </ng-container>
1404
+
1405
+ <ul
1406
+ *ngIf="multiple"
1407
+ #multiContainer
1408
+ [class]="cx('inputMultiple')"
1409
+ [tabindex]="-1"
1410
+ role="listbox"
1411
+ [attr.aria-orientation]="'horizontal'"
1412
+ [attr.aria-activedescendant]="focused ? focusedMultipleOptionId : undefined"
1413
+ (focus)="onMultipleContainerFocus($event)"
1414
+ (blur)="onMultipleContainerBlur($event)"
1415
+ (keydown)="onMultipleContainerKeyDown($event)"
1416
+ >
1417
+ <li
1418
+ #token
1419
+ *ngFor="let option of modelValue(); let i = index"
1420
+ [class]="cx('chipItem', { i })"
1421
+ [attr.id]="id + '_multiple_option_' + i"
1422
+ role="option"
1423
+ [attr.aria-label]="getOptionLabel(option)"
1424
+ [attr.aria-setsize]="modelValue().length"
1425
+ [attr.aria-posinset]="i + 1"
1426
+ [attr.aria-selected]="true"
1427
+ >
1428
+ <p-chip [class]="cx('pcChip')" [label]="!selectedItemTemplate && !_selectedItemTemplate && getOptionLabel(option)" [removable]="true" (onRemove)="!readonly ? removeOption($event, i) : ''">
1429
+ <ng-container *ngTemplateOutlet="selectedItemTemplate || _selectedItemTemplate; context: { $implicit: option }"></ng-container>
1430
+ <ng-template #removeicon>
1431
+ <span *ngIf="!removeIconTemplate && !_removeIconTemplate" [class]="cx('chipIcon')" (click)="!readonly ? removeOption($event, i) : ''">
1432
+ <svg data-p-icon="times-circle" [class]="cx('chipIcon')" [attr.aria-hidden]="true" />
1433
+ </span>
1434
+ <span *ngIf="removeIconTemplate || _removeIconTemplate" [attr.aria-hidden]="true">
1435
+ <ng-template *ngTemplateOutlet="removeIconTemplate || _removeIconTemplate; context: { removeCallback: removeOption.bind(this), index: i, class: cx('chipIcon') }"></ng-template>
1436
+ </span>
1437
+ </ng-template>
1438
+ </p-chip>
1439
+ </li>
1440
+ <li [class]="cx('inputChip')" role="option">
1441
+ <input
1442
+ #focusInput
1443
+ [pAutoFocus]="autofocus"
1444
+ [class]="cx('pcInputText')"
1445
+ [ngStyle]="inputStyle"
1446
+ [attr.type]="type"
1447
+ [attr.id]="inputId"
1448
+ [attr.autocomplete]="autocomplete"
1449
+ [attr.name]="name()"
1450
+ [attr.minlength]="minlength()"
1451
+ [attr.maxlength]="maxlength()"
1452
+ [attr.size]="size()"
1453
+ [attr.min]="min()"
1454
+ [attr.max]="max()"
1455
+ [attr.pattern]="pattern()"
1456
+ role="combobox"
1457
+ [attr.placeholder]="!$filled() ? placeholder : null"
1458
+ aria-autocomplete="list"
1459
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1460
+ [attr.required]="required() ? '' : undefined"
1461
+ [attr.readonly]="readonly ? '' : undefined"
1462
+ [attr.disabled]="$disabled() ? '' : undefined"
1463
+ [attr.aria-label]="ariaLabel"
1464
+ [attr.aria-labelledby]="ariaLabelledBy"
1465
+ [attr.aria-required]="required()"
1466
+ [attr.aria-expanded]="overlayVisible ?? false"
1467
+ [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1468
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1469
+ (input)="onInput($event)"
1470
+ (keydown)="onKeyDown($event)"
1471
+ (change)="onInputChange($event)"
1472
+ (focus)="onInputFocus($event)"
1473
+ (blur)="onInputBlur($event)"
1474
+ (paste)="onInputPaste($event)"
1475
+ (keyup)="onInputKeyUp($event)"
1476
+ />
1477
+ </li>
1478
+ </ul>
1479
+ <ng-container *ngIf="loading">
1480
+ <svg data-p-icon="spinner" *ngIf="!loadingIconTemplate && !_loadingIconTemplate" [class]="cx('loader')" [spin]="true" [attr.aria-hidden]="true" />
1481
+ <span *ngIf="loadingIconTemplate || _loadingIconTemplate" [class]="cx('loader')" [attr.aria-hidden]="true">
1482
+ <ng-template *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate"></ng-template>
1483
+ </span>
1484
+ </ng-container>
1485
+ <button #ddBtn type="button" [attr.aria-label]="dropdownAriaLabel" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex">
1486
+ <span *ngIf="dropdownIcon" [ngClass]="dropdownIcon" [attr.aria-hidden]="true"></span>
1487
+ <ng-container *ngIf="!dropdownIcon">
1488
+ <svg data-p-icon="chevron-down" *ngIf="!dropdownIconTemplate && !_dropdownIconTemplate" />
1489
+ <ng-template *ngTemplateOutlet="dropdownIconTemplate || _dropdownIconTemplate"></ng-template>
1490
+ </ng-container>
1491
+ </button>
1492
+ <p-overlay
1493
+ #overlay
1494
+ [hostAttrSelector]="attrSelector"
1495
+ [(visible)]="overlayVisible"
1496
+ [options]="overlayOptions"
1497
+ [target]="'@parent'"
1498
+ [appendTo]="$appendTo()"
1499
+ [showTransitionOptions]="showTransitionOptions"
1500
+ [hideTransitionOptions]="hideTransitionOptions"
1501
+ (onAnimationStart)="onOverlayAnimationStart($event)"
1502
+ (onHide)="hide()"
1503
+ >
1504
+ <ng-template #content>
1505
+ <div [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle">
1506
+ <ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate"></ng-container>
1507
+ <div [class]="cx('listContainer')" [style.max-height]="virtualScroll ? 'auto' : scrollHeight">
1508
+ <p-scroller
1509
+ *ngIf="virtualScroll"
1510
+ #scroller
1511
+ [items]="visibleOptions()"
1512
+ [style]="{ height: scrollHeight }"
1513
+ [itemSize]="virtualScrollItemSize"
1514
+ [autoSize]="true"
1515
+ [lazy]="lazy"
1516
+ (onLazyLoad)="onLazyLoad.emit($event)"
1517
+ [options]="virtualScrollOptions"
1518
+ >
1519
+ <ng-template #content let-items let-scrollerOptions="options">
1520
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
1521
+ </ng-template>
1522
+ <ng-container *ngIf="loaderTemplate || _loaderTemplate">
1523
+ <ng-template #loader let-scrollerOptions="options">
1524
+ <ng-container *ngTemplateOutlet="loaderTemplate || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
1525
+ </ng-template>
1526
+ </ng-container>
1527
+ </p-scroller>
1528
+ <ng-container *ngIf="!virtualScroll">
1529
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: visibleOptions(), options: {} }"></ng-container>
1530
+ </ng-container>
1531
+ </div>
1532
+
1533
+ <ng-template #buildInItems let-items let-scrollerOptions="options">
1534
+ <ul #items [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="id + '_list'" [attr.aria-label]="listLabel">
1535
+ <ng-template ngFor let-option [ngForOf]="items" let-i="index">
1536
+ <ng-container *ngIf="isOptionGroup(option)">
1537
+ <li [attr.id]="id + '_' + getOptionIndex(i, scrollerOptions)" [class]="cx('optionGroup')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1538
+ <span *ngIf="!groupTemplate">{{ getOptionGroupLabel(option.optionGroup) }}</span>
1539
+ <ng-container *ngTemplateOutlet="groupTemplate; context: { $implicit: option.optionGroup }"></ng-container>
1540
+ </li>
1541
+ </ng-container>
1542
+ <ng-container *ngIf="!isOptionGroup(option)">
1543
+ <li
1544
+ pRipple
1545
+ [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }"
1546
+ [class]="cx('option', { option, i, scrollerOptions })"
1547
+ [attr.id]="id + '_' + getOptionIndex(i, scrollerOptions)"
1548
+ role="option"
1549
+ [attr.aria-label]="getOptionLabel(option)"
1550
+ [attr.aria-selected]="isSelected(option)"
1551
+ [attr.aria-disabled]="isOptionDisabled(option)"
1552
+ [attr.data-p-focused]="focusedOptionIndex() === getOptionIndex(i, scrollerOptions)"
1553
+ [attr.aria-setsize]="ariaSetSize"
1554
+ [attr.aria-posinset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
1555
+ (click)="onOptionSelect($event, option)"
1556
+ (mouseenter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
1557
+ >
1558
+ <span *ngIf="!itemTemplate && !_itemTemplate">{{ getOptionLabel(option) }}</span>
1559
+ <ng-container
1560
+ *ngTemplateOutlet="
1561
+ itemTemplate || _itemTemplate;
1562
+ context: {
1563
+ $implicit: option,
1564
+ index: scrollerOptions.getOptions ? scrollerOptions.getOptions(i) : i
1565
+ }
1566
+ "
1567
+ ></ng-container>
1568
+ </li>
1569
+ </ng-container>
1570
+ </ng-template>
1571
+ <li *ngIf="!items || (items && items.length === 0 && showEmptyMessage)" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1572
+ <ng-container *ngIf="!emptyTemplate && !_emptyTemplate; else empty">
1573
+ {{ searchResultMessageText }}
1574
+ </ng-container>
1575
+ <ng-container #empty *ngTemplateOutlet="emptyTemplate || _emptyTemplate"></ng-container>
1576
+ </li>
1577
+ </ul>
1578
+ </ng-template>
1579
+ <ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
1580
+ </div>
1581
+ <span role="status" aria-live="polite" class="p-hidden-accessible">
1582
+ {{ selectedMessageText }}
1583
+ </span>
1584
+ </ng-template>
1585
+ </p-overlay>
1586
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "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: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { 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: TimesCircleIcon, selector: "[data-p-icon=\"times-circle\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1587
+ }
1588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoComplete, decorators: [{
1589
+ type: Component,
1590
+ args: [{
1591
+ selector: 'p-autoComplete, p-autocomplete, p-auto-complete',
1592
+ standalone: true,
1593
+ imports: [CommonModule, Overlay, InputText, Ripple, Scroller, AutoFocus, TimesCircleIcon, SpinnerIcon, ChevronDownIcon, Chip, SharedModule, TimesIcon],
1594
+ template: `
1595
+ <input
1596
+ *ngIf="!multiple"
1597
+ #focusInput
1598
+ [pAutoFocus]="autofocus"
1599
+ pInputText
1600
+ [class]="cn(cx('pcInputText'), inputStyleClass)"
1601
+ [ngStyle]="inputStyle"
1602
+ [attr.type]="type"
1603
+ [attr.value]="inputValue()"
1604
+ [variant]="$variant()"
1605
+ [invalid]="invalid()"
1606
+ [attr.id]="inputId"
1607
+ [attr.autocomplete]="autocomplete"
1608
+ aria-autocomplete="list"
1609
+ role="combobox"
1610
+ [attr.placeholder]="placeholder"
1611
+ [attr.name]="name()"
1612
+ [attr.minlength]="minlength()"
1613
+ [pSize]="size()"
1614
+ [attr.min]="min()"
1615
+ [attr.max]="max()"
1616
+ [attr.pattern]="pattern()"
1617
+ [attr.size]="inputSize()"
1618
+ [attr.maxlength]="maxlength()"
1619
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1620
+ [attr.required]="required() ? '' : undefined"
1621
+ [attr.readonly]="readonly ? '' : undefined"
1622
+ [attr.disabled]="$disabled() ? '' : undefined"
1623
+ [attr.aria-label]="ariaLabel"
1624
+ [attr.aria-labelledby]="ariaLabelledBy"
1625
+ [attr.aria-required]="required()"
1626
+ [attr.aria-expanded]="overlayVisible ?? false"
1627
+ [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1628
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1629
+ (input)="onInput($event)"
1630
+ (keydown)="onKeyDown($event)"
1631
+ (change)="onInputChange($event)"
1632
+ (focus)="onInputFocus($event)"
1633
+ (blur)="onInputBlur($event)"
1634
+ (paste)="onInputPaste($event)"
1635
+ (keyup)="onInputKeyUp($event)"
1636
+ [fluid]="hasFluid"
1637
+ />
1638
+ <ng-container *ngIf="$filled() && !$disabled() && showClear && !loading">
1639
+ <svg data-p-icon="times" *ngIf="!clearIconTemplate && !_clearIconTemplate" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
1640
+ <span *ngIf="clearIconTemplate || _clearIconTemplate" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true">
1641
+ <ng-template *ngTemplateOutlet="clearIconTemplate || _clearIconTemplate"></ng-template>
1642
+ </span>
1643
+ </ng-container>
1644
+
1645
+ <ul
1646
+ *ngIf="multiple"
1647
+ #multiContainer
1648
+ [class]="cx('inputMultiple')"
1649
+ [tabindex]="-1"
1650
+ role="listbox"
1651
+ [attr.aria-orientation]="'horizontal'"
1652
+ [attr.aria-activedescendant]="focused ? focusedMultipleOptionId : undefined"
1653
+ (focus)="onMultipleContainerFocus($event)"
1654
+ (blur)="onMultipleContainerBlur($event)"
1655
+ (keydown)="onMultipleContainerKeyDown($event)"
1656
+ >
1657
+ <li
1658
+ #token
1659
+ *ngFor="let option of modelValue(); let i = index"
1660
+ [class]="cx('chipItem', { i })"
1661
+ [attr.id]="id + '_multiple_option_' + i"
1662
+ role="option"
1663
+ [attr.aria-label]="getOptionLabel(option)"
1664
+ [attr.aria-setsize]="modelValue().length"
1665
+ [attr.aria-posinset]="i + 1"
1666
+ [attr.aria-selected]="true"
1667
+ >
1668
+ <p-chip [class]="cx('pcChip')" [label]="!selectedItemTemplate && !_selectedItemTemplate && getOptionLabel(option)" [removable]="true" (onRemove)="!readonly ? removeOption($event, i) : ''">
1669
+ <ng-container *ngTemplateOutlet="selectedItemTemplate || _selectedItemTemplate; context: { $implicit: option }"></ng-container>
1670
+ <ng-template #removeicon>
1671
+ <span *ngIf="!removeIconTemplate && !_removeIconTemplate" [class]="cx('chipIcon')" (click)="!readonly ? removeOption($event, i) : ''">
1672
+ <svg data-p-icon="times-circle" [class]="cx('chipIcon')" [attr.aria-hidden]="true" />
1673
+ </span>
1674
+ <span *ngIf="removeIconTemplate || _removeIconTemplate" [attr.aria-hidden]="true">
1675
+ <ng-template *ngTemplateOutlet="removeIconTemplate || _removeIconTemplate; context: { removeCallback: removeOption.bind(this), index: i, class: cx('chipIcon') }"></ng-template>
1676
+ </span>
1677
+ </ng-template>
1678
+ </p-chip>
1679
+ </li>
1680
+ <li [class]="cx('inputChip')" role="option">
1681
+ <input
1682
+ #focusInput
1683
+ [pAutoFocus]="autofocus"
1684
+ [class]="cx('pcInputText')"
1685
+ [ngStyle]="inputStyle"
1686
+ [attr.type]="type"
1687
+ [attr.id]="inputId"
1688
+ [attr.autocomplete]="autocomplete"
1689
+ [attr.name]="name()"
1690
+ [attr.minlength]="minlength()"
1691
+ [attr.maxlength]="maxlength()"
1692
+ [attr.size]="size()"
1693
+ [attr.min]="min()"
1694
+ [attr.max]="max()"
1695
+ [attr.pattern]="pattern()"
1696
+ role="combobox"
1697
+ [attr.placeholder]="!$filled() ? placeholder : null"
1698
+ aria-autocomplete="list"
1699
+ [attr.tabindex]="!$disabled() ? tabindex : -1"
1700
+ [attr.required]="required() ? '' : undefined"
1701
+ [attr.readonly]="readonly ? '' : undefined"
1702
+ [attr.disabled]="$disabled() ? '' : undefined"
1703
+ [attr.aria-label]="ariaLabel"
1704
+ [attr.aria-labelledby]="ariaLabelledBy"
1705
+ [attr.aria-required]="required()"
1706
+ [attr.aria-expanded]="overlayVisible ?? false"
1707
+ [attr.aria-controls]="overlayVisible ? id + '_list' : null"
1708
+ [attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
1709
+ (input)="onInput($event)"
1710
+ (keydown)="onKeyDown($event)"
1711
+ (change)="onInputChange($event)"
1712
+ (focus)="onInputFocus($event)"
1713
+ (blur)="onInputBlur($event)"
1714
+ (paste)="onInputPaste($event)"
1715
+ (keyup)="onInputKeyUp($event)"
1716
+ />
1717
+ </li>
1718
+ </ul>
1719
+ <ng-container *ngIf="loading">
1720
+ <svg data-p-icon="spinner" *ngIf="!loadingIconTemplate && !_loadingIconTemplate" [class]="cx('loader')" [spin]="true" [attr.aria-hidden]="true" />
1721
+ <span *ngIf="loadingIconTemplate || _loadingIconTemplate" [class]="cx('loader')" [attr.aria-hidden]="true">
1722
+ <ng-template *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate"></ng-template>
1723
+ </span>
1724
+ </ng-container>
1725
+ <button #ddBtn type="button" [attr.aria-label]="dropdownAriaLabel" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex">
1726
+ <span *ngIf="dropdownIcon" [ngClass]="dropdownIcon" [attr.aria-hidden]="true"></span>
1727
+ <ng-container *ngIf="!dropdownIcon">
1728
+ <svg data-p-icon="chevron-down" *ngIf="!dropdownIconTemplate && !_dropdownIconTemplate" />
1729
+ <ng-template *ngTemplateOutlet="dropdownIconTemplate || _dropdownIconTemplate"></ng-template>
1730
+ </ng-container>
1731
+ </button>
1732
+ <p-overlay
1733
+ #overlay
1734
+ [hostAttrSelector]="attrSelector"
1735
+ [(visible)]="overlayVisible"
1736
+ [options]="overlayOptions"
1737
+ [target]="'@parent'"
1738
+ [appendTo]="$appendTo()"
1739
+ [showTransitionOptions]="showTransitionOptions"
1740
+ [hideTransitionOptions]="hideTransitionOptions"
1741
+ (onAnimationStart)="onOverlayAnimationStart($event)"
1742
+ (onHide)="hide()"
1743
+ >
1744
+ <ng-template #content>
1745
+ <div [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle">
1746
+ <ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate"></ng-container>
1747
+ <div [class]="cx('listContainer')" [style.max-height]="virtualScroll ? 'auto' : scrollHeight">
1748
+ <p-scroller
1749
+ *ngIf="virtualScroll"
1750
+ #scroller
1751
+ [items]="visibleOptions()"
1752
+ [style]="{ height: scrollHeight }"
1753
+ [itemSize]="virtualScrollItemSize"
1754
+ [autoSize]="true"
1755
+ [lazy]="lazy"
1756
+ (onLazyLoad)="onLazyLoad.emit($event)"
1757
+ [options]="virtualScrollOptions"
1758
+ >
1759
+ <ng-template #content let-items let-scrollerOptions="options">
1760
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: items, options: scrollerOptions }"></ng-container>
1761
+ </ng-template>
1762
+ <ng-container *ngIf="loaderTemplate || _loaderTemplate">
1763
+ <ng-template #loader let-scrollerOptions="options">
1764
+ <ng-container *ngTemplateOutlet="loaderTemplate || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
1765
+ </ng-template>
1766
+ </ng-container>
1767
+ </p-scroller>
1768
+ <ng-container *ngIf="!virtualScroll">
1769
+ <ng-container *ngTemplateOutlet="buildInItems; context: { $implicit: visibleOptions(), options: {} }"></ng-container>
1770
+ </ng-container>
1771
+ </div>
1772
+
1773
+ <ng-template #buildInItems let-items let-scrollerOptions="options">
1774
+ <ul #items [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="id + '_list'" [attr.aria-label]="listLabel">
1775
+ <ng-template ngFor let-option [ngForOf]="items" let-i="index">
1776
+ <ng-container *ngIf="isOptionGroup(option)">
1777
+ <li [attr.id]="id + '_' + getOptionIndex(i, scrollerOptions)" [class]="cx('optionGroup')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1778
+ <span *ngIf="!groupTemplate">{{ getOptionGroupLabel(option.optionGroup) }}</span>
1779
+ <ng-container *ngTemplateOutlet="groupTemplate; context: { $implicit: option.optionGroup }"></ng-container>
1780
+ </li>
1781
+ </ng-container>
1782
+ <ng-container *ngIf="!isOptionGroup(option)">
1783
+ <li
1784
+ pRipple
1785
+ [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }"
1786
+ [class]="cx('option', { option, i, scrollerOptions })"
1787
+ [attr.id]="id + '_' + getOptionIndex(i, scrollerOptions)"
1788
+ role="option"
1789
+ [attr.aria-label]="getOptionLabel(option)"
1790
+ [attr.aria-selected]="isSelected(option)"
1791
+ [attr.aria-disabled]="isOptionDisabled(option)"
1792
+ [attr.data-p-focused]="focusedOptionIndex() === getOptionIndex(i, scrollerOptions)"
1793
+ [attr.aria-setsize]="ariaSetSize"
1794
+ [attr.aria-posinset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
1795
+ (click)="onOptionSelect($event, option)"
1796
+ (mouseenter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
1797
+ >
1798
+ <span *ngIf="!itemTemplate && !_itemTemplate">{{ getOptionLabel(option) }}</span>
1799
+ <ng-container
1800
+ *ngTemplateOutlet="
1801
+ itemTemplate || _itemTemplate;
1802
+ context: {
1803
+ $implicit: option,
1804
+ index: scrollerOptions.getOptions ? scrollerOptions.getOptions(i) : i
1805
+ }
1806
+ "
1807
+ ></ng-container>
1808
+ </li>
1809
+ </ng-container>
1810
+ </ng-template>
1811
+ <li *ngIf="!items || (items && items.length === 0 && showEmptyMessage)" [class]="cx('emptyMessage')" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
1812
+ <ng-container *ngIf="!emptyTemplate && !_emptyTemplate; else empty">
1813
+ {{ searchResultMessageText }}
1814
+ </ng-container>
1815
+ <ng-container #empty *ngTemplateOutlet="emptyTemplate || _emptyTemplate"></ng-container>
1816
+ </li>
1817
+ </ul>
1818
+ </ng-template>
1819
+ <ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
1820
+ </div>
1821
+ <span role="status" aria-live="polite" class="p-hidden-accessible">
1822
+ {{ selectedMessageText }}
1823
+ </span>
1824
+ </ng-template>
1825
+ </p-overlay>
1826
+ `,
1827
+ providers: [AUTOCOMPLETE_VALUE_ACCESSOR, AutoCompleteStyle],
1828
+ changeDetection: ChangeDetectionStrategy.OnPush,
1829
+ encapsulation: ViewEncapsulation.None,
1830
+ host: {
1831
+ '[class]': "cn(cx('root'), styleClass)",
1832
+ '[style]': "sx('root')"
1833
+ }
1834
+ }]
1835
+ }], ctorParameters: () => [{ type: i1.OverlayService }, { type: i0.NgZone }], propDecorators: { minLength: [{
1836
+ type: Input,
1837
+ args: [{ transform: numberAttribute }]
1838
+ }], minQueryLength: [{
1839
+ type: Input,
1840
+ args: [{ transform: numberAttribute }]
1841
+ }], delay: [{
1842
+ type: Input,
1843
+ args: [{ transform: numberAttribute }]
1844
+ }], panelStyle: [{
1845
+ type: Input
1846
+ }], styleClass: [{
1847
+ type: Input
1848
+ }], panelStyleClass: [{
1849
+ type: Input
1850
+ }], inputStyle: [{
1851
+ type: Input
1852
+ }], inputId: [{
1853
+ type: Input
1854
+ }], inputStyleClass: [{
1855
+ type: Input
1856
+ }], placeholder: [{
1857
+ type: Input
1858
+ }], readonly: [{
1859
+ type: Input,
1860
+ args: [{ transform: booleanAttribute }]
1861
+ }], scrollHeight: [{
1862
+ type: Input
1863
+ }], lazy: [{
1864
+ type: Input,
1865
+ args: [{ transform: booleanAttribute }]
1866
+ }], virtualScroll: [{
1867
+ type: Input,
1868
+ args: [{ transform: booleanAttribute }]
1869
+ }], virtualScrollItemSize: [{
1870
+ type: Input,
1871
+ args: [{ transform: numberAttribute }]
1872
+ }], virtualScrollOptions: [{
1873
+ type: Input
1874
+ }], autoHighlight: [{
1875
+ type: Input,
1876
+ args: [{ transform: booleanAttribute }]
1877
+ }], forceSelection: [{
1878
+ type: Input,
1879
+ args: [{ transform: booleanAttribute }]
1880
+ }], type: [{
1881
+ type: Input
1882
+ }], autoZIndex: [{
1883
+ type: Input,
1884
+ args: [{ transform: booleanAttribute }]
1885
+ }], baseZIndex: [{
1886
+ type: Input,
1887
+ args: [{ transform: numberAttribute }]
1888
+ }], ariaLabel: [{
1889
+ type: Input
1890
+ }], dropdownAriaLabel: [{
1891
+ type: Input
1892
+ }], ariaLabelledBy: [{
1893
+ type: Input
1894
+ }], dropdownIcon: [{
1895
+ type: Input
1896
+ }], unique: [{
1897
+ type: Input,
1898
+ args: [{ transform: booleanAttribute }]
1899
+ }], group: [{
1900
+ type: Input,
1901
+ args: [{ transform: booleanAttribute }]
1902
+ }], completeOnFocus: [{
1903
+ type: Input,
1904
+ args: [{ transform: booleanAttribute }]
1905
+ }], showClear: [{
1906
+ type: Input,
1907
+ args: [{ transform: booleanAttribute }]
1908
+ }], dropdown: [{
1909
+ type: Input,
1910
+ args: [{ transform: booleanAttribute }]
1911
+ }], showEmptyMessage: [{
1912
+ type: Input,
1913
+ args: [{ transform: booleanAttribute }]
1914
+ }], dropdownMode: [{
1915
+ type: Input
1916
+ }], multiple: [{
1917
+ type: Input,
1918
+ args: [{ transform: booleanAttribute }]
1919
+ }], tabindex: [{
1920
+ type: Input,
1921
+ args: [{ transform: numberAttribute }]
1922
+ }], dataKey: [{
1923
+ type: Input
1924
+ }], emptyMessage: [{
1925
+ type: Input
1926
+ }], showTransitionOptions: [{
1927
+ type: Input
1928
+ }], hideTransitionOptions: [{
1929
+ type: Input
1930
+ }], autofocus: [{
1931
+ type: Input,
1932
+ args: [{ transform: booleanAttribute }]
1933
+ }], autocomplete: [{
1934
+ type: Input
1935
+ }], optionGroupChildren: [{
1936
+ type: Input
1937
+ }], optionGroupLabel: [{
1938
+ type: Input
1939
+ }], overlayOptions: [{
1940
+ type: Input
1941
+ }], suggestions: [{
1942
+ type: Input
1943
+ }], optionLabel: [{
1944
+ type: Input
1945
+ }], optionValue: [{
1946
+ type: Input
1947
+ }], id: [{
1948
+ type: Input
1949
+ }], searchMessage: [{
1950
+ type: Input
1951
+ }], emptySelectionMessage: [{
1952
+ type: Input
1953
+ }], selectionMessage: [{
1954
+ type: Input
1955
+ }], autoOptionFocus: [{
1956
+ type: Input,
1957
+ args: [{ transform: booleanAttribute }]
1958
+ }], selectOnFocus: [{
1959
+ type: Input,
1960
+ args: [{ transform: booleanAttribute }]
1961
+ }], searchLocale: [{
1962
+ type: Input,
1963
+ args: [{ transform: booleanAttribute }]
1964
+ }], optionDisabled: [{
1965
+ type: Input
1966
+ }], focusOnHover: [{
1967
+ type: Input,
1968
+ args: [{ transform: booleanAttribute }]
1969
+ }], typeahead: [{
1970
+ type: Input,
1971
+ args: [{ transform: booleanAttribute }]
1972
+ }], completeMethod: [{
1973
+ type: Output
1974
+ }], onSelect: [{
1975
+ type: Output
1976
+ }], onUnselect: [{
1977
+ type: Output
1978
+ }], onFocus: [{
1979
+ type: Output
1980
+ }], onBlur: [{
1981
+ type: Output
1982
+ }], onDropdownClick: [{
1983
+ type: Output
1984
+ }], onClear: [{
1985
+ type: Output
1986
+ }], onKeyUp: [{
1987
+ type: Output
1988
+ }], onShow: [{
1989
+ type: Output
1990
+ }], onHide: [{
1991
+ type: Output
1992
+ }], onLazyLoad: [{
1993
+ type: Output
1994
+ }], inputEL: [{
1995
+ type: ViewChild,
1996
+ args: ['focusInput']
1997
+ }], multiInputEl: [{
1998
+ type: ViewChild,
1999
+ args: ['multiIn']
2000
+ }], multiContainerEL: [{
2001
+ type: ViewChild,
2002
+ args: ['multiContainer']
2003
+ }], dropdownButton: [{
2004
+ type: ViewChild,
2005
+ args: ['ddBtn']
2006
+ }], itemsViewChild: [{
2007
+ type: ViewChild,
2008
+ args: ['items']
2009
+ }], scroller: [{
2010
+ type: ViewChild,
2011
+ args: ['scroller']
2012
+ }], overlayViewChild: [{
2013
+ type: ViewChild,
2014
+ args: ['overlay']
2015
+ }], itemTemplate: [{
2016
+ type: ContentChild,
2017
+ args: ['item']
2018
+ }], emptyTemplate: [{
2019
+ type: ContentChild,
2020
+ args: ['empty']
2021
+ }], headerTemplate: [{
2022
+ type: ContentChild,
2023
+ args: ['header']
2024
+ }], footerTemplate: [{
2025
+ type: ContentChild,
2026
+ args: ['footer']
2027
+ }], selectedItemTemplate: [{
2028
+ type: ContentChild,
2029
+ args: ['selecteditem']
2030
+ }], groupTemplate: [{
2031
+ type: ContentChild,
2032
+ args: ['group']
2033
+ }], loaderTemplate: [{
2034
+ type: ContentChild,
2035
+ args: ['loader']
2036
+ }], removeIconTemplate: [{
2037
+ type: ContentChild,
2038
+ args: ['removeicon']
2039
+ }], loadingIconTemplate: [{
2040
+ type: ContentChild,
2041
+ args: ['loadingicon']
2042
+ }], clearIconTemplate: [{
2043
+ type: ContentChild,
2044
+ args: ['clearicon']
2045
+ }], dropdownIconTemplate: [{
2046
+ type: ContentChild,
2047
+ args: ['dropdownicon']
2048
+ }], onHostClick: [{
2049
+ type: HostListener,
2050
+ args: ['click', ['$event']]
2051
+ }], templates: [{
2052
+ type: ContentChildren,
2053
+ args: [PrimeTemplate]
2054
+ }] } });
2055
+ class AutoCompleteModule {
2056
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2057
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteModule, imports: [AutoComplete], exports: [AutoComplete, SharedModule] });
2058
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteModule, imports: [AutoComplete, SharedModule] });
2059
+ }
2060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AutoCompleteModule, decorators: [{
2061
+ type: NgModule,
2062
+ args: [{
2063
+ imports: [AutoComplete],
2064
+ exports: [AutoComplete, SharedModule]
2065
+ }]
2066
+ }] });
2067
+
2068
+ /**
2069
+ * Generated bundle index. Do not edit.
2070
+ */
2071
+
2072
+ export { AUTOCOMPLETE_VALUE_ACCESSOR, AutoComplete, AutoCompleteClasses, AutoCompleteModule, AutoCompleteStyle };
2073
+ //# sourceMappingURL=primeng-autocomplete.mjs.map