@exhaustive-ui/core 3.0.0-alpha.0 → 22.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
  4. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-api.mjs +10 -17
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +786 -928
  8. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
  10. package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
  12. package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
  14. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
  16. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
  18. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
  20. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-carousel.mjs +561 -599
  22. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
  24. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
  26. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
  28. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
  30. package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
  32. package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +227 -394
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +255 -266
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +585 -653
  38. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
  40. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-datepicker.mjs +1792 -1787
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +480 -577
  44. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
  46. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
  48. package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
  50. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
  52. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
  54. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
  56. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-fileupload.mjs +774 -745
  58. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
  60. package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
  62. package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
  64. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
  66. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs +2 -2
  68. package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
  70. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
  72. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
  74. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
  76. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
  78. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
  80. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
  82. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
  84. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
  86. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
  88. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
  90. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
  92. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
  94. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
  96. package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
  98. package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  100. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
  102. package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
  104. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
  106. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
  108. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
  110. package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
  112. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
  114. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
  116. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
  118. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
  120. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
  122. package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
  124. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
  126. package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
  128. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
  130. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
  132. package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
  134. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
  136. package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
  138. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
  140. package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
  142. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
  144. package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
  146. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
  148. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
  150. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
  152. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
  154. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
  156. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
  158. package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
  160. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
  162. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
  164. package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
  166. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
  168. package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
  170. package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
  171. package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
  172. package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
  173. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
  174. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
  175. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
  176. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
  177. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  178. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  179. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  180. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  181. package/fesm2022/exhaustive-ui-core-inplace.mjs +68 -102
  182. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  183. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  184. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  185. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  186. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  187. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  188. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  189. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  190. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  191. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  192. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  193. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  194. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  195. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  196. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  197. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  198. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  199. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  200. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  201. package/fesm2022/exhaustive-ui-core-listbox.mjs +591 -728
  202. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  203. package/fesm2022/exhaustive-ui-core-megamenu.mjs +324 -375
  204. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  205. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  206. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  207. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  208. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  209. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  210. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  211. package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
  212. package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
  213. package/fesm2022/exhaustive-ui-core-multiselect.mjs +945 -1045
  214. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  215. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  216. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  217. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  218. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  219. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  220. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  221. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  222. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  223. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  224. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  225. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  226. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  227. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  228. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  229. package/fesm2022/exhaustive-ui-core-picklist.mjs +861 -879
  230. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  231. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  232. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  233. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  234. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  235. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  236. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  237. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  238. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  239. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  240. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  241. package/fesm2022/exhaustive-ui-core-select.mjs +837 -986
  242. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  243. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  244. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  245. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  246. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  247. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  248. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  249. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  250. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  251. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  252. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  253. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  254. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  255. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  256. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  257. package/fesm2022/exhaustive-ui-core-table.mjs +2435 -2721
  258. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  259. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  260. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  261. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  262. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  263. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +604 -690
  264. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  265. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  266. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  267. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  268. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  269. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  270. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  271. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  272. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  273. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  274. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  275. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  276. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  277. package/fesm2022/exhaustive-ui-core-treeselect.mjs +333 -423
  278. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  279. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  280. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  281. package/package.json +11 -11
  282. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  283. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  284. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  285. package/schematics/migrations.json +11 -6
  286. package/schematics/utils/removed-inputs.js +0 -0
  287. package/schematics/utils/renamed-inputs.js +175 -0
  288. package/schematics/utils/styleclass.js +24 -8
  289. package/schematics/utils/versions.json +8 -8
  290. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  291. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  292. package/types/exhaustive-ui-core-api.d.ts +2 -3
  293. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  294. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  295. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  296. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  297. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  298. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  299. package/types/exhaustive-ui-core-button.d.ts +57 -89
  300. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  301. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  302. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  303. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  304. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  305. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  306. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  307. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  308. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  309. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  310. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  311. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  312. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  313. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  314. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  315. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  316. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  317. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  318. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  319. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  320. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  321. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  322. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  323. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  324. package/types/exhaustive-ui-core-image.d.ts +35 -68
  325. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  326. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  327. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  328. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  329. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  330. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  331. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  332. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  333. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  334. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  335. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  336. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  337. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  338. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  339. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  340. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  341. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  342. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  343. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  344. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  345. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  346. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  347. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  348. package/types/exhaustive-ui-core-password.d.ts +56 -93
  349. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  350. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  351. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  352. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  353. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  354. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  355. package/types/exhaustive-ui-core-select.d.ts +137 -188
  356. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  357. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  358. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  359. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  360. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  361. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  362. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  363. package/types/exhaustive-ui-core-table.d.ts +349 -453
  364. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  365. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  366. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  367. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  368. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  369. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  370. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  371. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  372. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  373. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  374. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  375. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -3,7 +3,8 @@ import * as i1 from '@angular/common';
3
3
  import { CommonModule, isPlatformBrowser } from '@angular/common';
4
4
  import { HttpClient, HttpEventType } from '@angular/common/http';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, InjectionToken, inject, output, input, ChangeDetectionStrategy, Component, contentChild, viewChild, NgZone, contentChildren, numberAttribute, booleanAttribute, Input, ViewEncapsulation, NgModule } from '@angular/core';
6
+ import { Injectable, InjectionToken, inject, output, input, ChangeDetectionStrategy, Component, afterEveryRender, afterNextRender, effect, untracked, booleanAttribute, numberAttribute, contentChild, viewChild, signal, NgZone, computed, contentChildren, ViewEncapsulation, NgModule } from '@angular/core';
7
+ import { toSignal } from '@angular/core/rxjs-interop';
7
8
  import { DomSanitizer } from '@angular/platform-browser';
8
9
  import { addClass, removeClass } from '@exhaustive-ui/utils';
9
10
  import { TranslationKeys, PrimeTemplate, SharedModule } from '@exhaustive-ui/core/api';
@@ -19,7 +20,7 @@ import { style } from '@exhaustive-ui/styles/fileupload';
19
20
  import { BaseStyle } from '@exhaustive-ui/core/base';
20
21
 
21
22
  const classes = {
22
- root: ({ instance }) => `p-fileupload p-fileupload-${instance.mode} p-component`,
23
+ root: ({ instance }) => `p-fileupload p-fileupload-${instance.mode()} p-component`,
23
24
  header: 'p-fileupload-header',
24
25
  pcChooseButton: 'p-fileupload-choose-button',
25
26
  pcUploadButton: 'p-fileupload-upload-button',
@@ -173,13 +174,12 @@ class FileContent extends BaseComponent {
173
174
  </p-button>
174
175
  </div>
175
176
  </div>
176
- }`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Badge, selector: "p-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
177
+ }`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Badge, selector: "p-badge", inputs: ["badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
177
178
  }
178
179
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: FileContent, decorators: [{
179
180
  type: Component,
180
181
  args: [{
181
182
  selector: '[pFileContent]',
182
- standalone: true,
183
183
  template: `@for (file of files(); track file?.name + '-' + $index; let index = $index) {
184
184
  <div [class]="cx('file')" [pBind]="$pcFileUpload.ptm('file')">
185
185
  <img role="presentation" [class]="cx('fileThumbnail')" [attr.alt]="file.name" [src]="file.objectURL" [width]="previewWidth()" [pBind]="$pcFileUpload.ptm('fileThumbnail')" />
@@ -213,194 +213,246 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
213
213
  class FileUpload extends BaseComponent {
214
214
  componentName = 'FileUpload';
215
215
  bindDirectiveInstance = inject(Bind, { self: true });
216
- onAfterViewChecked() {
217
- this.bindDirectiveInstance.setAttrs(this.ptm('host'));
216
+ constructor() {
217
+ super();
218
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptm('host')));
219
+ afterNextRender(() => {
220
+ if (isPlatformBrowser(this.platformId)) {
221
+ if (this.mode() === 'advanced') {
222
+ this.zone.runOutsideAngular(() => {
223
+ const content = this.content();
224
+ if (content) {
225
+ this.dragOverListener.set(this.renderer.listen(content.nativeElement, 'dragover', this.onDragOver.bind(this)));
226
+ }
227
+ });
228
+ }
229
+ }
230
+ });
231
+ effect(() => {
232
+ const files = this.files();
233
+ if (files !== undefined) {
234
+ untracked(() => {
235
+ const validFiles = [];
236
+ for (let i = 0; i < files.length; i++) {
237
+ let file = files[i];
238
+ if (this.validate(file)) {
239
+ if (this.isImage(file)) {
240
+ file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));
241
+ }
242
+ validFiles.push(files[i]);
243
+ }
244
+ }
245
+ this._files.set(validFiles);
246
+ });
247
+ }
248
+ });
218
249
  }
219
250
  /**
220
251
  * Name of the request parameter to identify the files at backend.
221
252
  * @group Props
222
253
  */
223
- name;
254
+ name = input(/* @ts-ignore */
255
+ ...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
224
256
  /**
225
257
  * Remote url to upload the files.
226
258
  * @group Props
227
259
  */
228
- url;
260
+ url = input(/* @ts-ignore */
261
+ ...(ngDevMode ? [undefined, { debugName: "url" }] : /* istanbul ignore next */ []));
229
262
  /**
230
263
  * HTTP method to send the files to the url such as "post" and "put".
231
264
  * @group Props
232
265
  */
233
- method = 'post';
266
+ method = input('post', /* @ts-ignore */
267
+ ...(ngDevMode ? [{ debugName: "method" }] : /* istanbul ignore next */ []));
234
268
  /**
235
269
  * Used to select multiple files at once from file dialog.
236
270
  * @group Props
237
271
  */
238
- multiple;
272
+ multiple = input(undefined, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
239
273
  /**
240
274
  * Comma-separated list of pattern to restrict the allowed file types. Can be any combination of either the MIME types (such as "image/*") or the file extensions (such as ".jpg").
241
275
  * @group Props
242
276
  */
243
- accept;
277
+ accept = input(/* @ts-ignore */
278
+ ...(ngDevMode ? [undefined, { debugName: "accept" }] : /* istanbul ignore next */ []));
244
279
  /**
245
280
  * Disables the upload functionality.
246
281
  * @group Props
247
282
  */
248
- disabled;
283
+ disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
249
284
  /**
250
285
  * When enabled, upload begins automatically after selection is completed.
251
286
  * @group Props
252
287
  */
253
- auto;
288
+ auto = input(undefined, { ...(ngDevMode ? { debugName: "auto" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
254
289
  /**
255
290
  * Cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates.
256
291
  * @group Props
257
292
  */
258
- withCredentials;
293
+ withCredentials = input(undefined, { ...(ngDevMode ? { debugName: "withCredentials" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
259
294
  /**
260
295
  * Maximum file size allowed in bytes.
261
296
  * @group Props
262
297
  */
263
- maxFileSize;
298
+ maxFileSize = input(undefined, { ...(ngDevMode ? { debugName: "maxFileSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
264
299
  /**
265
300
  * Summary message of the invalid file size.
266
301
  * @group Props
267
302
  */
268
- invalidFileSizeMessageSummary = '{0}: Invalid file size, ';
303
+ invalidFileSizeMessageSummary = input('{0}: Invalid file size, ', /* @ts-ignore */
304
+ ...(ngDevMode ? [{ debugName: "invalidFileSizeMessageSummary" }] : /* istanbul ignore next */ []));
269
305
  /**
270
306
  * Detail message of the invalid file size.
271
307
  * @group Props
272
308
  */
273
- invalidFileSizeMessageDetail = 'maximum upload size is {0}.';
309
+ invalidFileSizeMessageDetail = input('maximum upload size is {0}.', /* @ts-ignore */
310
+ ...(ngDevMode ? [{ debugName: "invalidFileSizeMessageDetail" }] : /* istanbul ignore next */ []));
274
311
  /**
275
312
  * Summary message of the invalid file type.
276
313
  * @group Props
277
314
  */
278
- invalidFileTypeMessageSummary = '{0}: Invalid file type, ';
315
+ invalidFileTypeMessageSummary = input('{0}: Invalid file type, ', /* @ts-ignore */
316
+ ...(ngDevMode ? [{ debugName: "invalidFileTypeMessageSummary" }] : /* istanbul ignore next */ []));
279
317
  /**
280
318
  * Detail message of the invalid file type.
281
319
  * @group Props
282
320
  */
283
- invalidFileTypeMessageDetail = 'allowed file types: {0}.';
321
+ invalidFileTypeMessageDetail = input('allowed file types: {0}.', /* @ts-ignore */
322
+ ...(ngDevMode ? [{ debugName: "invalidFileTypeMessageDetail" }] : /* istanbul ignore next */ []));
284
323
  /**
285
324
  * Detail message of the invalid file type.
286
325
  * @group Props
287
326
  */
288
- invalidFileLimitMessageDetail = 'limit is {0} at most.';
327
+ invalidFileLimitMessageDetail = input('limit is {0} at most.', /* @ts-ignore */
328
+ ...(ngDevMode ? [{ debugName: "invalidFileLimitMessageDetail" }] : /* istanbul ignore next */ []));
289
329
  /**
290
330
  * Summary message of the invalid file type.
291
331
  * @group Props
292
332
  */
293
- invalidFileLimitMessageSummary = 'Maximum number of files exceeded, ';
333
+ invalidFileLimitMessageSummary = input('Maximum number of files exceeded, ', /* @ts-ignore */
334
+ ...(ngDevMode ? [{ debugName: "invalidFileLimitMessageSummary" }] : /* istanbul ignore next */ []));
294
335
  /**
295
336
  * Inline style of the element.
296
337
  * @group Props
297
338
  */
298
- style;
339
+ style = input(/* @ts-ignore */
340
+ ...(ngDevMode ? [undefined, { debugName: "style" }] : /* istanbul ignore next */ []));
299
341
  /**
300
342
  * Class of the element.
301
343
  * @group Props
302
344
  */
303
- styleClass;
345
+ styleClass = input(/* @ts-ignore */
346
+ ...(ngDevMode ? [undefined, { debugName: "styleClass" }] : /* istanbul ignore next */ []));
304
347
  /**
305
348
  * Width of the image thumbnail in pixels.
306
349
  * @group Props
307
350
  */
308
- previewWidth = 50;
351
+ previewWidth = input(50, { ...(ngDevMode ? { debugName: "previewWidth" } : /* istanbul ignore next */ {}), transform: numberAttribute });
309
352
  /**
310
353
  * Label of the choose button. Defaults to Exhaustive Locale configuration.
311
354
  * @group Props
312
355
  */
313
- chooseLabel;
356
+ chooseLabel = input(/* @ts-ignore */
357
+ ...(ngDevMode ? [undefined, { debugName: "chooseLabel" }] : /* istanbul ignore next */ []));
314
358
  /**
315
359
  * Label of the upload button. Defaults to Exhaustive Locale configuration.
316
360
  * @group Props
317
361
  */
318
- uploadLabel;
362
+ uploadLabel = input(/* @ts-ignore */
363
+ ...(ngDevMode ? [undefined, { debugName: "uploadLabel" }] : /* istanbul ignore next */ []));
319
364
  /**
320
365
  * Label of the cancel button. Defaults to Exhaustive Locale configuration.
321
366
  * @group Props
322
367
  */
323
- cancelLabel;
368
+ cancelLabel = input(/* @ts-ignore */
369
+ ...(ngDevMode ? [undefined, { debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
324
370
  /**
325
371
  * Icon of the choose button.
326
372
  * @group Props
327
373
  */
328
- chooseIcon;
374
+ chooseIcon = input(/* @ts-ignore */
375
+ ...(ngDevMode ? [undefined, { debugName: "chooseIcon" }] : /* istanbul ignore next */ []));
329
376
  /**
330
377
  * Icon of the upload button.
331
378
  * @group Props
332
379
  */
333
- uploadIcon;
380
+ uploadIcon = input(/* @ts-ignore */
381
+ ...(ngDevMode ? [undefined, { debugName: "uploadIcon" }] : /* istanbul ignore next */ []));
334
382
  /**
335
383
  * Icon of the cancel button.
336
384
  * @group Props
337
385
  */
338
- cancelIcon;
386
+ cancelIcon = input(/* @ts-ignore */
387
+ ...(ngDevMode ? [undefined, { debugName: "cancelIcon" }] : /* istanbul ignore next */ []));
339
388
  /**
340
389
  * Whether to show the upload button.
341
390
  * @group Props
342
391
  */
343
- showUploadButton = true;
392
+ showUploadButton = input(true, { ...(ngDevMode ? { debugName: "showUploadButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
344
393
  /**
345
394
  * Whether to show the cancel button.
346
395
  * @group Props
347
396
  */
348
- showCancelButton = true;
397
+ showCancelButton = input(true, { ...(ngDevMode ? { debugName: "showCancelButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
349
398
  /**
350
399
  * Defines the UI of the component.
351
400
  * @group Props
352
401
  */
353
- mode = 'advanced';
402
+ mode = input('advanced', /* @ts-ignore */
403
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
354
404
  /**
355
405
  * HttpHeaders class represents the header configuration options for an HTTP request.
356
406
  * @group Props
357
407
  */
358
- headers;
408
+ headers = input(/* @ts-ignore */
409
+ ...(ngDevMode ? [undefined, { debugName: "headers" }] : /* istanbul ignore next */ []));
359
410
  /**
360
411
  * Whether to use the default upload or a manual implementation defined in uploadHandler callback. Defaults to Exhaustive Locale configuration.
361
412
  * @group Props
362
413
  */
363
- customUpload;
414
+ customUpload = input(undefined, { ...(ngDevMode ? { debugName: "customUpload" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
364
415
  /**
365
416
  * Maximum number of files that can be uploaded.
366
417
  * @group Props
367
418
  */
368
- fileLimit;
419
+ fileLimit = input(undefined, { ...(ngDevMode ? { debugName: "fileLimit" } : /* istanbul ignore next */ {}), transform: (value) => numberAttribute(value, undefined) });
369
420
  /**
370
421
  * Style class of the upload button.
371
422
  * @group Props
372
423
  */
373
- uploadStyleClass;
424
+ uploadStyleClass = input(/* @ts-ignore */
425
+ ...(ngDevMode ? [undefined, { debugName: "uploadStyleClass" }] : /* istanbul ignore next */ []));
374
426
  /**
375
427
  * Style class of the cancel button.
376
428
  * @group Props
377
429
  */
378
- cancelStyleClass;
379
- /**
380
- * Style class of the remove button.
381
- * @group Props
382
- */
383
- removeStyleClass;
430
+ cancelStyleClass = input(/* @ts-ignore */
431
+ ...(ngDevMode ? [undefined, { debugName: "cancelStyleClass" }] : /* istanbul ignore next */ []));
384
432
  /**
385
433
  * Style class of the choose button.
386
434
  * @group Props
387
435
  */
388
- chooseStyleClass;
436
+ chooseStyleClass = input(/* @ts-ignore */
437
+ ...(ngDevMode ? [undefined, { debugName: "chooseStyleClass" }] : /* istanbul ignore next */ []));
389
438
  /**
390
439
  * Used to pass all properties of the ButtonProps to the choose button inside the component.
391
440
  * @group Props
392
441
  */
393
- chooseButtonProps;
442
+ chooseButtonProps = input(/* @ts-ignore */
443
+ ...(ngDevMode ? [undefined, { debugName: "chooseButtonProps" }] : /* istanbul ignore next */ []));
394
444
  /**
395
445
  * Used to pass all properties of the ButtonProps to the upload button inside the component.
396
446
  * @group Props
397
447
  */
398
- uploadButtonProps = { severity: 'secondary' };
448
+ uploadButtonProps = input({ severity: 'secondary' }, /* @ts-ignore */
449
+ ...(ngDevMode ? [{ debugName: "uploadButtonProps" }] : /* istanbul ignore next */ []));
399
450
  /**
400
451
  * Used to pass all properties of the ButtonProps to the cancel button inside the component.
401
452
  * @group Props
402
453
  */
403
- cancelButtonProps = { severity: 'secondary' };
454
+ cancelButtonProps = input({ severity: 'secondary' }, /* @ts-ignore */
455
+ ...(ngDevMode ? [{ debugName: "cancelButtonProps" }] : /* istanbul ignore next */ []));
404
456
  /**
405
457
  * Callback to invoke before file upload is initialized.
406
458
  * @param {FileBeforeUploadEvent} event - Custom upload event.
@@ -521,119 +573,80 @@ class FileUpload extends BaseComponent {
521
573
  ...(ngDevMode ? [{ debugName: "basicFileInput" }] : /* istanbul ignore next */ []));
522
574
  content = viewChild('content', /* @ts-ignore */
523
575
  ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
524
- set files(files) {
525
- this._files = [];
526
- for (let i = 0; i < files.length; i++) {
527
- let file = files[i];
528
- if (this.validate(file)) {
529
- if (this.isImage(file)) {
530
- file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));
531
- }
532
- this._files.push(files[i]);
533
- }
534
- }
535
- }
536
- get files() {
537
- return this._files;
538
- }
539
- get basicButtonLabel() {
540
- if (this.auto || !this.hasFiles()) {
541
- return this.chooseLabel;
542
- }
543
- return this.uploadLabel ?? this.files[0].name;
544
- }
545
- _files = [];
546
- progress = 0;
547
- dragHighlight;
548
- msgs;
549
- uploadedFileCount = 0;
550
- focus;
551
- uploading;
552
- duplicateIEEvent; // flag to recognize duplicate onchange event for file input
553
- translationSubscription;
554
- dragOverListener;
555
- uploadedFiles = [];
576
+ files = input(/* @ts-ignore */
577
+ ...(ngDevMode ? [undefined, { debugName: "files" }] : /* istanbul ignore next */ []));
578
+ _files = signal([], /* @ts-ignore */
579
+ ...(ngDevMode ? [{ debugName: "_files" }] : /* istanbul ignore next */ []));
580
+ progress = signal(0, /* @ts-ignore */
581
+ ...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
582
+ msgs = signal(undefined, /* @ts-ignore */
583
+ ...(ngDevMode ? [{ debugName: "msgs" }] : /* istanbul ignore next */ []));
584
+ uploadedFileCount = signal(0, /* @ts-ignore */
585
+ ...(ngDevMode ? [{ debugName: "uploadedFileCount" }] : /* istanbul ignore next */ []));
586
+ focus = signal(undefined, /* @ts-ignore */
587
+ ...(ngDevMode ? [{ debugName: "focus" }] : /* istanbul ignore next */ []));
588
+ uploading = signal(undefined, /* @ts-ignore */
589
+ ...(ngDevMode ? [{ debugName: "uploading" }] : /* istanbul ignore next */ []));
590
+ translation = toSignal(this.config.translationObserver, { initialValue: this.config.translation });
591
+ dragOverListener = signal(undefined, /* @ts-ignore */
592
+ ...(ngDevMode ? [{ debugName: "dragOverListener" }] : /* istanbul ignore next */ []));
593
+ uploadedFiles = signal([], /* @ts-ignore */
594
+ ...(ngDevMode ? [{ debugName: "uploadedFiles" }] : /* istanbul ignore next */ []));
556
595
  sanitizer = inject(DomSanitizer);
557
596
  zone = inject(NgZone);
558
597
  http = inject(HttpClient);
559
598
  _componentStyle = inject(FileUploadStyle);
560
- onInit() {
561
- this.translationSubscription = this.config.translationObserver.subscribe(() => {
562
- this.cd.markForCheck();
563
- });
564
- }
565
- onAfterViewInit() {
566
- if (isPlatformBrowser(this.platformId)) {
567
- if (this.mode === 'advanced') {
568
- this.zone.runOutsideAngular(() => {
569
- const content = this.content();
570
- if (content) {
571
- this.dragOverListener = this.renderer.listen(content.nativeElement, 'dragover', this.onDragOver.bind(this));
572
- }
573
- });
574
- }
575
- }
576
- }
577
- _headerTemplate;
578
- _contentTemplate;
579
- _toolbarTemplate;
580
- _chooseIconTemplate;
581
- _uploadIconTemplate;
582
- _cancelIconTemplate;
583
- _emptyTemplate;
584
- _fileTemplate;
585
- _fileLabelTemplate;
599
+ _headerTemplate = computed(() => this.templates()
600
+ .filter((item) => item.getType() === 'header')
601
+ .at(-1)?.template, /* @ts-ignore */
602
+ ...(ngDevMode ? [{ debugName: "_headerTemplate" }] : /* istanbul ignore next */ []));
603
+ _contentTemplate = computed(() => this.templates()
604
+ .filter((item) => item.getType() === 'content')
605
+ .at(-1)?.template, /* @ts-ignore */
606
+ ...(ngDevMode ? [{ debugName: "_contentTemplate" }] : /* istanbul ignore next */ []));
607
+ _toolbarTemplate = computed(() => this.templates()
608
+ .filter((item) => item.getType() === 'toolbar')
609
+ .at(-1)?.template, /* @ts-ignore */
610
+ ...(ngDevMode ? [{ debugName: "_toolbarTemplate" }] : /* istanbul ignore next */ []));
611
+ _chooseIconTemplate = computed(() => this.templates()
612
+ .filter((item) => item.getType() === 'chooseicon')
613
+ .at(-1)?.template, /* @ts-ignore */
614
+ ...(ngDevMode ? [{ debugName: "_chooseIconTemplate" }] : /* istanbul ignore next */ []));
615
+ _uploadIconTemplate = computed(() => this.templates()
616
+ .filter((item) => item.getType() === 'uploadicon')
617
+ .at(-1)?.template, /* @ts-ignore */
618
+ ...(ngDevMode ? [{ debugName: "_uploadIconTemplate" }] : /* istanbul ignore next */ []));
619
+ _cancelIconTemplate = computed(() => this.templates()
620
+ .filter((item) => item.getType() === 'cancelicon')
621
+ .at(-1)?.template, /* @ts-ignore */
622
+ ...(ngDevMode ? [{ debugName: "_cancelIconTemplate" }] : /* istanbul ignore next */ []));
623
+ _emptyTemplate = computed(() => this.templates()
624
+ .filter((item) => item.getType() === 'empty')
625
+ .at(-1)?.template, /* @ts-ignore */
626
+ ...(ngDevMode ? [{ debugName: "_emptyTemplate" }] : /* istanbul ignore next */ []));
627
+ _fileTemplate = computed(() => this.templates()
628
+ .filter((item) => !['header', 'content', 'toolbar', 'chooseicon', 'uploadicon', 'cancelicon', 'empty', 'filelabel'].includes(item.getType()))
629
+ .at(-1)?.template, /* @ts-ignore */
630
+ ...(ngDevMode ? [{ debugName: "_fileTemplate" }] : /* istanbul ignore next */ []));
631
+ _fileLabelTemplate = computed(() => this.templates()
632
+ .filter((item) => item.getType() === 'filelabel')
633
+ .at(-1)?.template, /* @ts-ignore */
634
+ ...(ngDevMode ? [{ debugName: "_fileLabelTemplate" }] : /* istanbul ignore next */ []));
586
635
  templates = contentChildren(PrimeTemplate, /* @ts-ignore */
587
636
  ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
588
- onAfterContentInit() {
589
- this.templates()?.forEach((item) => {
590
- switch (item.getType()) {
591
- case 'header':
592
- this._headerTemplate = item.template;
593
- break;
594
- case 'file':
595
- this._fileTemplate = item.template;
596
- break;
597
- case 'content':
598
- this._contentTemplate = item.template;
599
- break;
600
- case 'toolbar':
601
- this._toolbarTemplate = item.template;
602
- break;
603
- case 'chooseicon':
604
- this._chooseIconTemplate = item.template;
605
- break;
606
- case 'uploadicon':
607
- this._uploadIconTemplate = item.template;
608
- break;
609
- case 'cancelicon':
610
- this._cancelIconTemplate = item.template;
611
- break;
612
- case 'empty':
613
- this._emptyTemplate = item.template;
614
- break;
615
- case 'filelabel':
616
- this._fileLabelTemplate = item.template;
617
- break;
618
- default:
619
- this._fileTemplate = item.template;
620
- break;
621
- }
622
- });
623
- }
624
- basicFileChosenLabel() {
625
- if (this.auto)
626
- return this.chooseButtonLabel;
637
+ basicFileChosenLabel = computed(() => {
638
+ if (this.auto())
639
+ return this.chooseButtonLabel();
627
640
  else if (this.hasFiles()) {
628
- if (this.files && this.files.length === 1)
629
- return this.files[0].name;
630
- return this.config.getTranslation('fileChosenMessage')?.replace('{0}', this.files.length);
641
+ if (this._files() && this._files().length === 1)
642
+ return this._files()[0].name;
643
+ return this.translation()['fileChosenMessage']?.replace('{0}', this._files().length);
631
644
  }
632
- return this.config.getTranslation('noFileChosenMessage') || '';
633
- }
634
- completedLabel() {
635
- return this.config.getTranslation('completed') || '';
636
- }
645
+ return this.translation()['noFileChosenMessage'] || '';
646
+ }, /* @ts-ignore */
647
+ ...(ngDevMode ? [{ debugName: "basicFileChosenLabel" }] : /* istanbul ignore next */ []));
648
+ completedLabel = computed(() => this.translation()['completed'] || '', /* @ts-ignore */
649
+ ...(ngDevMode ? [{ debugName: "completedLabel" }] : /* istanbul ignore next */ []));
637
650
  getTranslation(option) {
638
651
  return this.config.getTranslation(option);
639
652
  }
@@ -641,15 +654,10 @@ class FileUpload extends BaseComponent {
641
654
  this.advancedFileInput()?.nativeElement.click();
642
655
  }
643
656
  onFileSelect(event) {
644
- if (event.type !== 'drop' && this.isIE11() && this.duplicateIEEvent) {
645
- this.duplicateIEEvent = false;
646
- return;
657
+ if (!this.multiple()) {
658
+ this._files.set([]);
647
659
  }
648
- if (!this.multiple) {
649
- this.files = [];
650
- }
651
- this.msgs = [];
652
- this.files = this.files || [];
660
+ this.msgs.set([]);
653
661
  let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
654
662
  for (let i = 0; i < files.length; i++) {
655
663
  let file = files[i];
@@ -658,58 +666,58 @@ class FileUpload extends BaseComponent {
658
666
  if (this.isImage(file)) {
659
667
  file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));
660
668
  }
661
- this.files.push(files[i]);
669
+ this._files.update((currentFiles) => [...currentFiles, files[i]]);
662
670
  }
663
671
  }
664
672
  }
665
- this.onSelect.emit({ originalEvent: event, files: files, currentFiles: this.files });
673
+ this.onSelect.emit({ originalEvent: event, files: files, currentFiles: this._files() });
666
674
  // this will check the fileLimit with the uploaded files
667
675
  this.checkFileLimit(files);
668
- if (this.hasFiles() && this.auto && (this.mode !== 'advanced' || !this.isFileLimitExceeded())) {
676
+ if (this.hasFiles() && this.auto() && (this.mode() !== 'advanced' || !this.isFileLimitExceeded())) {
669
677
  this.upload();
670
678
  }
671
- if (event.type !== 'drop' && this.isIE11()) {
672
- this.clearIEInput();
673
- }
674
- else {
675
- this.clearInputElement();
676
- }
679
+ this.clearInputElement();
677
680
  }
678
681
  isFileSelected(file) {
679
- for (let sFile of this.files) {
682
+ for (let sFile of this._files()) {
680
683
  if (sFile.name + sFile.type + sFile.size === file.name + file.type + file.size) {
681
684
  return true;
682
685
  }
683
686
  }
684
687
  return false;
685
688
  }
686
- isIE11() {
687
- if (isPlatformBrowser(this.platformId)) {
688
- return !!this.document.defaultView['MSInputMethodContext'] && !!this.document['documentMode'];
689
- }
690
- }
691
689
  validate(file) {
692
- this.msgs = this.msgs || [];
693
- if (this.accept && !this.isFileTypeValid(file)) {
694
- const text = `${this.invalidFileTypeMessageSummary.replace('{0}', file.name)} ${this.invalidFileTypeMessageDetail.replace('{0}', this.accept)}`;
695
- this.msgs.push({
696
- severity: 'error',
697
- text: text
698
- });
690
+ this.msgs.update((msgs) => msgs || []);
691
+ const accept = this.accept();
692
+ if (accept && !this.isFileTypeValid(file)) {
693
+ const text = `${this.invalidFileTypeMessageSummary().replace('{0}', file.name)} ${this.invalidFileTypeMessageDetail().replace('{0}', accept)}`;
694
+ this.msgs.update((msgs) => [
695
+ ...msgs,
696
+ {
697
+ severity: 'error',
698
+ text: text
699
+ }
700
+ ]);
699
701
  return false;
700
702
  }
701
- if (this.maxFileSize && file.size > this.maxFileSize) {
702
- const text = `${this.invalidFileSizeMessageSummary.replace('{0}', file.name)} ${this.invalidFileSizeMessageDetail.replace('{0}', this.formatSize(this.maxFileSize))}`;
703
- this.msgs.push({
704
- severity: 'error',
705
- text: text
706
- });
703
+ const maxFileSize = this.maxFileSize();
704
+ if (maxFileSize && file.size > maxFileSize) {
705
+ const text = `${this.invalidFileSizeMessageSummary().replace('{0}', file.name)} ${this.invalidFileSizeMessageDetail().replace('{0}', this.formatSize(maxFileSize))}`;
706
+ this.msgs.update((msgs) => [
707
+ ...msgs,
708
+ {
709
+ severity: 'error',
710
+ text: text
711
+ }
712
+ ]);
707
713
  return false;
708
714
  }
709
715
  return true;
710
716
  }
711
717
  isFileTypeValid(file) {
712
- let acceptableTypes = this.accept?.split(',').map((type) => type.trim());
718
+ let acceptableTypes = this.accept()
719
+ ?.split(',')
720
+ .map((type) => type.trim());
713
721
  for (let type of acceptableTypes) {
714
722
  let acceptable = this.isWildcard(type) ? this.getTypeClass(file.type) === this.getTypeClass(type) : file.type == type || this.getFileExtension(file).toLowerCase() === type.toLowerCase();
715
723
  if (acceptable) {
@@ -730,40 +738,36 @@ class FileUpload extends BaseComponent {
730
738
  isImage(file) {
731
739
  return /^image\//.test(file.type);
732
740
  }
733
- onImageLoad(img) {
734
- window.URL.revokeObjectURL(img.src);
735
- }
736
741
  /**
737
742
  * Uploads the selected files.
738
743
  * @group Method
739
744
  */
740
745
  uploader() {
741
- if (this.customUpload) {
742
- if (this.fileLimit) {
743
- this.uploadedFileCount += this.files.length;
746
+ if (this.customUpload()) {
747
+ if (this.fileLimit()) {
748
+ this.uploadedFileCount.update((count) => count + this._files().length);
744
749
  }
745
750
  this.uploadHandler.emit({
746
- files: this.files
751
+ files: this._files()
747
752
  });
748
- this.cd.markForCheck();
749
753
  }
750
754
  else {
751
- this.uploading = true;
752
- this.msgs = [];
755
+ this.uploading.set(true);
756
+ this.msgs.set([]);
753
757
  let formData = new FormData();
754
758
  this.onBeforeUpload.emit({
755
759
  formData: formData
756
760
  });
757
- for (let i = 0; i < this.files.length; i++) {
758
- formData.append(this.name, this.files[i], this.files[i].name);
761
+ for (let i = 0; i < this._files().length; i++) {
762
+ formData.append(this.name(), this._files()[i], this._files()[i].name);
759
763
  }
760
764
  this.http
761
- .request(this.method, this.url, {
765
+ .request(this.method(), this.url(), {
762
766
  body: formData,
763
- headers: this.headers,
767
+ headers: this.headers(),
764
768
  reportProgress: true,
765
769
  observe: 'events',
766
- withCredentials: this.withCredentials
770
+ withCredentials: this.withCredentials()
767
771
  })
768
772
  .subscribe((event) => {
769
773
  switch (event.type) {
@@ -774,32 +778,31 @@ class FileUpload extends BaseComponent {
774
778
  });
775
779
  break;
776
780
  case HttpEventType.Response:
777
- this.uploading = false;
778
- this.progress = 0;
781
+ this.uploading.set(false);
782
+ this.progress.set(0);
779
783
  if (event['status'] >= 200 && event['status'] < 300) {
780
- if (this.fileLimit) {
781
- this.uploadedFileCount += this.files.length;
784
+ if (this.fileLimit()) {
785
+ this.uploadedFileCount.update((count) => count + this._files().length);
782
786
  }
783
- this.onUpload.emit({ originalEvent: event, files: this.files });
787
+ this.onUpload.emit({ originalEvent: event, files: this._files() });
784
788
  }
785
789
  else {
786
- this.onError.emit({ files: this.files });
790
+ this.onError.emit({ files: this._files() });
787
791
  }
788
- this.uploadedFiles = [...this.uploadedFiles, ...this.files];
792
+ this.uploadedFiles.update((uploadedFiles) => [...uploadedFiles, ...this._files()]);
789
793
  this.clear();
790
794
  break;
791
795
  case HttpEventType.UploadProgress: {
792
796
  if (event['loaded']) {
793
- this.progress = Math.round((event['loaded'] * 100) / event['total']);
797
+ this.progress.set(Math.round((event['loaded'] * 100) / event['total']));
794
798
  }
795
- this.onProgress.emit({ originalEvent: event, progress: this.progress });
799
+ this.onProgress.emit({ originalEvent: event, progress: this.progress() });
796
800
  break;
797
801
  }
798
802
  }
799
- this.cd.markForCheck();
800
803
  }, (error) => {
801
- this.uploading = false;
802
- this.onError.emit({ files: this.files, error: error });
804
+ this.uploading.set(false);
805
+ this.onError.emit({ files: this._files(), error: error });
803
806
  });
804
807
  }
805
808
  }
@@ -820,11 +823,10 @@ class FileUpload extends BaseComponent {
820
823
  * @group Method
821
824
  */
822
825
  clear() {
823
- this.files = [];
826
+ this._files.set([]);
824
827
  this.onClear.emit(undefined);
825
828
  this.clearInputElement();
826
- this.msgs = [];
827
- this.cd.markForCheck();
829
+ this.msgs.set([]);
828
830
  }
829
831
  /**
830
832
  * Removes a single file.
@@ -834,9 +836,9 @@ class FileUpload extends BaseComponent {
834
836
  */
835
837
  remove(event, index) {
836
838
  this.clearInputElement();
837
- this.onRemove.emit({ originalEvent: event, file: this.files[index] });
838
- this.files.splice(index, 1);
839
- this.checkFileLimit(this.files);
839
+ this.onRemove.emit({ originalEvent: event, file: this._files()[index] });
840
+ this._files.update((files) => files.filter((_, i) => i !== index));
841
+ this.checkFileLimit(this._files());
840
842
  }
841
843
  /**
842
844
  * Removes uploaded file.
@@ -844,38 +846,43 @@ class FileUpload extends BaseComponent {
844
846
  * @group Method
845
847
  */
846
848
  removeUploadedFile(index) {
847
- let removedFile = this.uploadedFiles.splice(index, 1)[0];
848
- this.uploadedFiles = [...this.uploadedFiles];
849
- this.onRemoveUploadedFile.emit({ file: removedFile, files: this.uploadedFiles });
850
- }
851
- isFileLimitExceeded() {
852
- const isAutoMode = this.auto;
853
- const totalFileCount = isAutoMode ? this.files.length : this.files.length + this.uploadedFileCount;
854
- if (this.fileLimit && this.fileLimit <= totalFileCount && this.focus) {
855
- this.focus = false;
856
- }
857
- return this.fileLimit && this.fileLimit < totalFileCount;
849
+ let removedFile = this.uploadedFiles()[index];
850
+ this.uploadedFiles.update((uploadedFiles) => uploadedFiles.filter((_, i) => i !== index));
851
+ this.onRemoveUploadedFile.emit({ file: removedFile, files: this.uploadedFiles() });
858
852
  }
859
- isChooseDisabled() {
860
- if (this.auto) {
861
- return this.fileLimit && this.fileLimit <= this.files.length;
853
+ isFileLimitExceeded = computed(() => {
854
+ const isAutoMode = this.auto();
855
+ const totalFileCount = isAutoMode ? this._files().length : this._files().length + this.uploadedFileCount();
856
+ const fileLimit = this.fileLimit();
857
+ return fileLimit && fileLimit < totalFileCount;
858
+ }, /* @ts-ignore */
859
+ ...(ngDevMode ? [{ debugName: "isFileLimitExceeded" }] : /* istanbul ignore next */ []));
860
+ isChooseDisabled = computed(() => {
861
+ const fileLimit = this.fileLimit();
862
+ if (this.auto()) {
863
+ return fileLimit && fileLimit <= this._files().length;
862
864
  }
863
865
  else {
864
- return this.fileLimit && this.fileLimit <= this.files.length + this.uploadedFileCount;
866
+ return fileLimit && fileLimit <= this._files().length + this.uploadedFileCount();
865
867
  }
866
- }
868
+ }, /* @ts-ignore */
869
+ ...(ngDevMode ? [{ debugName: "isChooseDisabled" }] : /* istanbul ignore next */ []));
867
870
  checkFileLimit(files) {
868
- this.msgs ??= [];
869
- const hasExistingValidationMessages = this.msgs.length > 0 && this.fileLimit && this.fileLimit < files.length;
871
+ this.msgs.update((msgs) => msgs ?? []);
872
+ const fileLimit = this.fileLimit();
873
+ const hasExistingValidationMessages = this.msgs().length > 0 && fileLimit && fileLimit < files.length;
870
874
  if (this.isFileLimitExceeded() || hasExistingValidationMessages) {
871
- const text = `${this.invalidFileLimitMessageSummary.replace('{0}', this.fileLimit.toString())} ${this.invalidFileLimitMessageDetail.replace('{0}', this.fileLimit.toString())}`;
872
- this.msgs.push({
873
- severity: 'error',
874
- text: text
875
- });
875
+ const text = `${this.invalidFileLimitMessageSummary().replace('{0}', fileLimit.toString())} ${this.invalidFileLimitMessageDetail().replace('{0}', fileLimit.toString())}`;
876
+ this.msgs.update((msgs) => [
877
+ ...msgs,
878
+ {
879
+ severity: 'error',
880
+ text: text
881
+ }
882
+ ]);
876
883
  }
877
884
  else {
878
- this.msgs = this.msgs.filter((msg) => !msg.text.includes(this.invalidFileLimitMessageSummary));
885
+ this.msgs.update((msgs) => msgs.filter((msg) => !msg.text.includes(this.invalidFileLimitMessageSummary())));
879
886
  }
880
887
  }
881
888
  clearInputElement() {
@@ -888,58 +895,48 @@ class FileUpload extends BaseComponent {
888
895
  basicFileInput.nativeElement.value = '';
889
896
  }
890
897
  }
891
- clearIEInput() {
892
- const advancedFileInput = this.advancedFileInput();
893
- if (advancedFileInput && advancedFileInput.nativeElement) {
894
- this.duplicateIEEvent = true; //IE11 fix to prevent onFileChange trigger again
895
- advancedFileInput.nativeElement.value = '';
896
- }
897
- }
898
- hasFiles() {
899
- return this.files && this.files.length > 0;
900
- }
901
- hasUploadedFiles() {
902
- return this.uploadedFiles && this.uploadedFiles.length > 0;
903
- }
898
+ hasFiles = computed(() => this._files() && this._files().length > 0, /* @ts-ignore */
899
+ ...(ngDevMode ? [{ debugName: "hasFiles" }] : /* istanbul ignore next */ []));
900
+ hasUploadedFiles = computed(() => this.uploadedFiles() && this.uploadedFiles().length > 0, /* @ts-ignore */
901
+ ...(ngDevMode ? [{ debugName: "hasUploadedFiles" }] : /* istanbul ignore next */ []));
904
902
  onDragEnter(e) {
905
- if (!this.disabled) {
903
+ if (!this.disabled()) {
906
904
  e.stopPropagation();
907
905
  e.preventDefault();
908
906
  }
909
907
  }
910
908
  onDragOver(e) {
911
- if (!this.disabled) {
909
+ if (!this.disabled()) {
912
910
  !this.$unstyled() && addClass(this.content()?.nativeElement, 'p-fileupload-highlight');
913
911
  this.content()?.nativeElement.setAttribute('data-p-highlight', true);
914
- this.dragHighlight = true;
915
912
  e.stopPropagation();
916
913
  e.preventDefault();
917
914
  }
918
915
  }
919
916
  onDragLeave(event) {
920
- if (!this.disabled) {
917
+ if (!this.disabled()) {
921
918
  !this.$unstyled() && removeClass(this.content()?.nativeElement, 'p-fileupload-highlight');
922
919
  this.content()?.nativeElement.setAttribute('data-p-highlight', false);
923
920
  }
924
921
  }
925
922
  onDrop(event) {
926
- if (!this.disabled) {
923
+ if (!this.disabled()) {
927
924
  !this.$unstyled() && removeClass(this.content()?.nativeElement, 'p-fileupload-highlight');
928
925
  this.content()?.nativeElement.setAttribute('data-p-highlight', false);
929
926
  event.stopPropagation();
930
927
  event.preventDefault();
931
928
  let files = event.dataTransfer ? event.dataTransfer.files : event.target.files;
932
- let allowDrop = this.multiple || (files && files.length === 1);
929
+ let allowDrop = this.multiple() || (files && files.length === 1);
933
930
  if (allowDrop) {
934
931
  this.onFileSelect(event);
935
932
  }
936
933
  }
937
934
  }
938
935
  onFocus() {
939
- this.focus = true;
936
+ this.focus.set(true);
940
937
  }
941
938
  onBlur() {
942
- this.focus = false;
939
+ this.focus.set(false);
943
940
  }
944
941
  formatSize(bytes) {
945
942
  const k = 1024;
@@ -974,541 +971,573 @@ class FileUpload extends BaseComponent {
974
971
  getBlockableElement() {
975
972
  return this.el.nativeElement.children[0];
976
973
  }
977
- get chooseButtonLabel() {
978
- return this.chooseLabel || this.config.getTranslation(TranslationKeys.CHOOSE);
979
- }
980
- get uploadButtonLabel() {
981
- return this.uploadLabel || this.config.getTranslation(TranslationKeys.UPLOAD);
982
- }
983
- get cancelButtonLabel() {
984
- return this.cancelLabel || this.config.getTranslation(TranslationKeys.CANCEL);
985
- }
986
- get browseFilesLabel() {
987
- return this.config.getTranslation(TranslationKeys.ARIA)[TranslationKeys.BROWSE_FILES];
988
- }
989
- get pendingLabel() {
990
- return this.config.getTranslation(TranslationKeys.PENDING);
991
- }
974
+ chooseButtonLabel = computed(() => this.chooseLabel() || this.translation()[TranslationKeys.CHOOSE], /* @ts-ignore */
975
+ ...(ngDevMode ? [{ debugName: "chooseButtonLabel" }] : /* istanbul ignore next */ []));
976
+ uploadButtonLabel = computed(() => this.uploadLabel() || this.translation()[TranslationKeys.UPLOAD], /* @ts-ignore */
977
+ ...(ngDevMode ? [{ debugName: "uploadButtonLabel" }] : /* istanbul ignore next */ []));
978
+ cancelButtonLabel = computed(() => this.cancelLabel() || this.translation()[TranslationKeys.CANCEL], /* @ts-ignore */
979
+ ...(ngDevMode ? [{ debugName: "cancelButtonLabel" }] : /* istanbul ignore next */ []));
980
+ browseFilesLabel = computed(() => this.translation()[TranslationKeys.ARIA][TranslationKeys.BROWSE_FILES], /* @ts-ignore */
981
+ ...(ngDevMode ? [{ debugName: "browseFilesLabel" }] : /* istanbul ignore next */ []));
982
+ pendingLabel = computed(() => this.translation()[TranslationKeys.PENDING], /* @ts-ignore */
983
+ ...(ngDevMode ? [{ debugName: "pendingLabel" }] : /* istanbul ignore next */ []));
992
984
  onDestroy() {
993
985
  const content = this.content();
994
986
  if (content && content.nativeElement) {
995
- if (this.dragOverListener) {
996
- this.dragOverListener();
997
- this.dragOverListener = null;
987
+ const dragOverListener = this.dragOverListener();
988
+ if (dragOverListener) {
989
+ dragOverListener();
990
+ this.dragOverListener.set(null);
998
991
  }
999
992
  }
1000
- if (this.translationSubscription) {
1001
- this.translationSubscription.unsubscribe();
1002
- }
1003
993
  }
1004
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: FileUpload, deps: null, target: i0.ɵɵFactoryTarget.Component });
1005
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: FileUpload, isStandalone: true, selector: "p-fileupload, p-fileUpload", inputs: { name: "name", url: "url", method: "method", multiple: ["multiple", "multiple", booleanAttribute], accept: "accept", disabled: ["disabled", "disabled", booleanAttribute], auto: ["auto", "auto", booleanAttribute], withCredentials: ["withCredentials", "withCredentials", booleanAttribute], maxFileSize: ["maxFileSize", "maxFileSize", numberAttribute], invalidFileSizeMessageSummary: "invalidFileSizeMessageSummary", invalidFileSizeMessageDetail: "invalidFileSizeMessageDetail", invalidFileTypeMessageSummary: "invalidFileTypeMessageSummary", invalidFileTypeMessageDetail: "invalidFileTypeMessageDetail", invalidFileLimitMessageDetail: "invalidFileLimitMessageDetail", invalidFileLimitMessageSummary: "invalidFileLimitMessageSummary", style: "style", styleClass: "styleClass", previewWidth: ["previewWidth", "previewWidth", numberAttribute], chooseLabel: "chooseLabel", uploadLabel: "uploadLabel", cancelLabel: "cancelLabel", chooseIcon: "chooseIcon", uploadIcon: "uploadIcon", cancelIcon: "cancelIcon", showUploadButton: ["showUploadButton", "showUploadButton", booleanAttribute], showCancelButton: ["showCancelButton", "showCancelButton", booleanAttribute], mode: "mode", headers: "headers", customUpload: ["customUpload", "customUpload", booleanAttribute], fileLimit: ["fileLimit", "fileLimit", (value) => numberAttribute(value, undefined)], uploadStyleClass: "uploadStyleClass", cancelStyleClass: "cancelStyleClass", removeStyleClass: "removeStyleClass", chooseStyleClass: "chooseStyleClass", chooseButtonProps: "chooseButtonProps", uploadButtonProps: "uploadButtonProps", cancelButtonProps: "cancelButtonProps", files: "files" }, outputs: { onBeforeUpload: "onBeforeUpload", onSend: "onSend", onUpload: "onUpload", onError: "onError", onClear: "onClear", onRemove: "onRemove", onSelect: "onSelect", onProgress: "onProgress", uploadHandler: "uploadHandler", onImageError: "onImageError", onRemoveUploadedFile: "onRemoveUploadedFile" }, providers: [FileUploadStyle, { provide: FILEUPLOAD_INSTANCE, useExisting: FileUpload }, { provide: PARENT_INSTANCE, useExisting: FileUpload }], queries: [{ propertyName: "fileTemplate", first: true, predicate: ["file"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: ["toolbar"], isSignal: true }, { propertyName: "chooseIconTemplate", first: true, predicate: ["chooseicon"], isSignal: true }, { propertyName: "fileLabelTemplate", first: true, predicate: ["filelabel"], isSignal: true }, { propertyName: "uploadIconTemplate", first: true, predicate: ["uploadicon"], isSignal: true }, { propertyName: "cancelIconTemplate", first: true, predicate: ["cancelicon"], isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "advancedFileInput", first: true, predicate: ["advancedfileinput"], descendants: true, isSignal: true }, { propertyName: "basicFileInput", first: true, predicate: ["basicfileinput"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i2.Bind }], ngImport: i0, template: `
1006
- <div [class]="cn(cx('root'), styleClass)" [ngStyle]="style" *ngIf="mode === 'advanced'" [pBind]="ptm('root')">
1007
- <input [attr.aria-label]="browseFilesLabel" #advancedfileinput type="file" (change)="onFileSelect($event)" [multiple]="multiple" [accept]="accept" [disabled]="disabled || isChooseDisabled()" [attr.title]="''" [pBind]="ptm('input')" />
1008
- <div [class]="cx('header')" [pBind]="ptm('header')">
1009
- <ng-container *ngIf="!headerTemplate() && !_headerTemplate">
1010
- <p-button
1011
- [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass)"
1012
- [disabled]="disabled || isChooseDisabled()"
1013
- (focus)="onFocus()"
1014
- [label]="chooseButtonLabel"
1015
- (blur)="onBlur()"
1016
- (onClick)="choose()"
1017
- (keydown.enter)="choose()"
1018
- [buttonProps]="chooseButtonProps"
1019
- [pt]="ptm('pcChooseButton')"
1020
- [unstyled]="unstyled()"
1021
- >
1022
- <input
1023
- [attr.aria-label]="browseFilesLabel"
1024
- #advancedfileinput
1025
- type="file"
1026
- (change)="onFileSelect($event)"
1027
- [multiple]="multiple"
1028
- [accept]="accept"
1029
- [disabled]="disabled || isChooseDisabled()"
1030
- [attr.title]="''"
1031
- [pBind]="ptm('input')"
1032
- />
1033
- <ng-template #icon>
1034
- <span *ngIf="chooseIcon" [class]="chooseIcon" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon"></span>
1035
- <ng-container *ngIf="!chooseIcon">
1036
- <svg data-p-icon="plus" *ngIf="!chooseIconTemplate() && !_chooseIconTemplate" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon" />
1037
- <span *ngIf="chooseIconTemplate() || _chooseIconTemplate" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon">
1038
- <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate"></ng-template>
1039
- </span>
1040
- </ng-container>
1041
- </ng-template>
1042
- </p-button>
994
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: FileUpload, deps: [], target: i0.ɵɵFactoryTarget.Component });
995
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: FileUpload, isStandalone: true, selector: "p-fileupload, p-fileUpload", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, method: { classPropertyName: "method", publicName: "method", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, auto: { classPropertyName: "auto", publicName: "auto", isSignal: true, isRequired: false, transformFunction: null }, withCredentials: { classPropertyName: "withCredentials", publicName: "withCredentials", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, invalidFileSizeMessageSummary: { classPropertyName: "invalidFileSizeMessageSummary", publicName: "invalidFileSizeMessageSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidFileSizeMessageDetail: { classPropertyName: "invalidFileSizeMessageDetail", publicName: "invalidFileSizeMessageDetail", isSignal: true, isRequired: false, transformFunction: null }, invalidFileTypeMessageSummary: { classPropertyName: "invalidFileTypeMessageSummary", publicName: "invalidFileTypeMessageSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidFileTypeMessageDetail: { classPropertyName: "invalidFileTypeMessageDetail", publicName: "invalidFileTypeMessageDetail", isSignal: true, isRequired: false, transformFunction: null }, invalidFileLimitMessageDetail: { classPropertyName: "invalidFileLimitMessageDetail", publicName: "invalidFileLimitMessageDetail", isSignal: true, isRequired: false, transformFunction: null }, invalidFileLimitMessageSummary: { classPropertyName: "invalidFileLimitMessageSummary", publicName: "invalidFileLimitMessageSummary", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, previewWidth: { classPropertyName: "previewWidth", publicName: "previewWidth", isSignal: true, isRequired: false, transformFunction: null }, chooseLabel: { classPropertyName: "chooseLabel", publicName: "chooseLabel", isSignal: true, isRequired: false, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, chooseIcon: { classPropertyName: "chooseIcon", publicName: "chooseIcon", isSignal: true, isRequired: false, transformFunction: null }, uploadIcon: { classPropertyName: "uploadIcon", publicName: "uploadIcon", isSignal: true, isRequired: false, transformFunction: null }, cancelIcon: { classPropertyName: "cancelIcon", publicName: "cancelIcon", isSignal: true, isRequired: false, transformFunction: null }, showUploadButton: { classPropertyName: "showUploadButton", publicName: "showUploadButton", isSignal: true, isRequired: false, transformFunction: null }, showCancelButton: { classPropertyName: "showCancelButton", publicName: "showCancelButton", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, headers: { classPropertyName: "headers", publicName: "headers", isSignal: true, isRequired: false, transformFunction: null }, customUpload: { classPropertyName: "customUpload", publicName: "customUpload", isSignal: true, isRequired: false, transformFunction: null }, fileLimit: { classPropertyName: "fileLimit", publicName: "fileLimit", isSignal: true, isRequired: false, transformFunction: null }, uploadStyleClass: { classPropertyName: "uploadStyleClass", publicName: "uploadStyleClass", isSignal: true, isRequired: false, transformFunction: null }, cancelStyleClass: { classPropertyName: "cancelStyleClass", publicName: "cancelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, chooseStyleClass: { classPropertyName: "chooseStyleClass", publicName: "chooseStyleClass", isSignal: true, isRequired: false, transformFunction: null }, chooseButtonProps: { classPropertyName: "chooseButtonProps", publicName: "chooseButtonProps", isSignal: true, isRequired: false, transformFunction: null }, uploadButtonProps: { classPropertyName: "uploadButtonProps", publicName: "uploadButtonProps", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonProps: { classPropertyName: "cancelButtonProps", publicName: "cancelButtonProps", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBeforeUpload: "onBeforeUpload", onSend: "onSend", onUpload: "onUpload", onError: "onError", onClear: "onClear", onRemove: "onRemove", onSelect: "onSelect", onProgress: "onProgress", uploadHandler: "uploadHandler", onImageError: "onImageError", onRemoveUploadedFile: "onRemoveUploadedFile" }, providers: [FileUploadStyle, { provide: FILEUPLOAD_INSTANCE, useExisting: FileUpload }, { provide: PARENT_INSTANCE, useExisting: FileUpload }], queries: [{ propertyName: "fileTemplate", first: true, predicate: ["file"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: ["toolbar"], isSignal: true }, { propertyName: "chooseIconTemplate", first: true, predicate: ["chooseicon"], isSignal: true }, { propertyName: "fileLabelTemplate", first: true, predicate: ["filelabel"], isSignal: true }, { propertyName: "uploadIconTemplate", first: true, predicate: ["uploadicon"], isSignal: true }, { propertyName: "cancelIconTemplate", first: true, predicate: ["cancelicon"], isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "advancedFileInput", first: true, predicate: ["advancedfileinput"], descendants: true, isSignal: true }, { propertyName: "basicFileInput", first: true, predicate: ["basicfileinput"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i2.Bind }], ngImport: i0, template: `
996
+ @if (mode() === 'advanced') {
997
+ <div [class]="cn(cx('root'), styleClass())" [ngStyle]="style()" [pBind]="ptm('root')">
998
+ <input
999
+ [attr.aria-label]="browseFilesLabel()"
1000
+ #advancedfileinput
1001
+ type="file"
1002
+ (change)="onFileSelect($event)"
1003
+ [multiple]="multiple()"
1004
+ [accept]="accept()"
1005
+ [disabled]="disabled() || isChooseDisabled()"
1006
+ [attr.title]="''"
1007
+ [pBind]="ptm('input')"
1008
+ />
1009
+ <div [class]="cx('header')" [pBind]="ptm('header')">
1010
+ @if (!headerTemplate() && !_headerTemplate()) {
1011
+ <p-button
1012
+ [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass())"
1013
+ [disabled]="disabled() || isChooseDisabled()"
1014
+ (focus)="onFocus()"
1015
+ [label]="chooseButtonLabel()"
1016
+ (blur)="onBlur()"
1017
+ (onClick)="choose()"
1018
+ (keydown.enter)="choose()"
1019
+ [buttonProps]="chooseButtonProps()"
1020
+ [pt]="ptm('pcChooseButton')"
1021
+ [unstyled]="unstyled()"
1022
+ >
1023
+ <input
1024
+ [attr.aria-label]="browseFilesLabel()"
1025
+ #advancedfileinput
1026
+ type="file"
1027
+ (change)="onFileSelect($event)"
1028
+ [multiple]="multiple()"
1029
+ [accept]="accept()"
1030
+ [disabled]="disabled() || isChooseDisabled()"
1031
+ [attr.title]="''"
1032
+ [pBind]="ptm('input')"
1033
+ />
1034
+ <ng-template #icon>
1035
+ @if (chooseIcon()) {
1036
+ <span [class]="chooseIcon()" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon"></span>
1037
+ }
1038
+ @if (!chooseIcon()) {
1039
+ @if (!chooseIconTemplate() && !_chooseIconTemplate()) {
1040
+ <svg data-p-icon="plus" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon" />
1041
+ }
1042
+ @if (chooseIconTemplate() || _chooseIconTemplate()) {
1043
+ <span [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon">
1044
+ <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate()"></ng-template>
1045
+ </span>
1046
+ }
1047
+ }
1048
+ </ng-template>
1049
+ </p-button>
1043
1050
 
1044
- <p-button
1045
- *ngIf="!auto && showUploadButton"
1046
- [label]="uploadButtonLabel"
1047
- (onClick)="upload()"
1048
- [disabled]="!hasFiles() || isFileLimitExceeded()"
1049
- [styleClass]="cn(cx('pcUploadButton'), uploadStyleClass)"
1050
- [buttonProps]="uploadButtonProps"
1051
- [pt]="ptm('pcUploadButton')"
1052
- [unstyled]="unstyled()"
1053
- >
1054
- <ng-template #icon>
1055
- <span *ngIf="uploadIcon" [ngClass]="uploadIcon" [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon"></span>
1056
- <ng-container *ngIf="!uploadIcon">
1057
- <svg data-p-icon="upload" *ngIf="!uploadIconTemplate() && !_uploadIconTemplate" [pBind]="ptm('pcUploadButton')?.icon" />
1058
- <span *ngIf="uploadIconTemplate() || _uploadIconTemplate" [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon">
1059
- <ng-template *ngTemplateOutlet="uploadIconTemplate() || _uploadIconTemplate"></ng-template>
1060
- </span>
1061
- </ng-container>
1062
- </ng-template>
1063
- </p-button>
1064
- <p-button
1065
- *ngIf="!auto && showCancelButton"
1066
- [label]="cancelButtonLabel"
1067
- (onClick)="clear()"
1068
- [disabled]="!hasFiles() || uploading"
1069
- [styleClass]="cn(cx('pcCancelButton'), cancelStyleClass)"
1070
- [buttonProps]="cancelButtonProps"
1071
- [pt]="ptm('pcCancelButton')"
1072
- [unstyled]="unstyled()"
1073
- >
1074
- <ng-template #icon>
1075
- <span *ngIf="cancelIcon" [ngClass]="cancelIcon"></span>
1076
- <ng-container *ngIf="!cancelIcon">
1077
- <svg data-p-icon="times" *ngIf="!cancelIconTemplate() && !_cancelIconTemplate" [attr.aria-hidden]="true" />
1078
- <span *ngIf="cancelIconTemplate() || _cancelIconTemplate" [attr.aria-hidden]="true">
1079
- <ng-template *ngTemplateOutlet="cancelIconTemplate() || _cancelIconTemplate"></ng-template>
1080
- </span>
1081
- </ng-container>
1082
- </ng-template>
1083
- </p-button>
1084
- </ng-container>
1085
- <ng-container
1086
- *ngTemplateOutlet="
1087
- headerTemplate() || _headerTemplate;
1088
- context: {
1089
- $implicit: files,
1090
- uploadedFiles: uploadedFiles,
1091
- chooseCallback: choose.bind(this),
1092
- clearCallback: clear.bind(this),
1093
- uploadCallback: upload.bind(this)
1051
+ @if (!auto() && showUploadButton()) {
1052
+ <p-button
1053
+ [label]="uploadButtonLabel()"
1054
+ (onClick)="upload()"
1055
+ [disabled]="!hasFiles() || isFileLimitExceeded()"
1056
+ [styleClass]="cn(cx('pcUploadButton'), uploadStyleClass())"
1057
+ [buttonProps]="uploadButtonProps()"
1058
+ [pt]="ptm('pcUploadButton')"
1059
+ [unstyled]="unstyled()"
1060
+ >
1061
+ <ng-template #icon>
1062
+ @if (uploadIcon()) {
1063
+ <span [ngClass]="uploadIcon()" [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon"></span>
1064
+ }
1065
+ @if (!uploadIcon()) {
1066
+ @if (!uploadIconTemplate() && !_uploadIconTemplate()) {
1067
+ <svg data-p-icon="upload" [pBind]="ptm('pcUploadButton')?.icon" />
1068
+ }
1069
+ @if (uploadIconTemplate() || _uploadIconTemplate()) {
1070
+ <span [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon">
1071
+ <ng-template *ngTemplateOutlet="uploadIconTemplate() || _uploadIconTemplate()"></ng-template>
1072
+ </span>
1073
+ }
1074
+ }
1075
+ </ng-template>
1076
+ </p-button>
1094
1077
  }
1095
- "
1096
- ></ng-container>
1097
- <ng-container *ngTemplateOutlet="toolbarTemplate() || _toolbarTemplate"></ng-container>
1098
- </div>
1099
- <div #content [class]="cx('content')" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)" [pBind]="ptm('content')">
1100
- @if (contentTemplate() || _contentTemplate) {
1078
+ @if (!auto() && showCancelButton()) {
1079
+ <p-button
1080
+ [label]="cancelButtonLabel()"
1081
+ (onClick)="clear()"
1082
+ [disabled]="!hasFiles() || uploading()"
1083
+ [styleClass]="cn(cx('pcCancelButton'), cancelStyleClass())"
1084
+ [buttonProps]="cancelButtonProps()"
1085
+ [pt]="ptm('pcCancelButton')"
1086
+ [unstyled]="unstyled()"
1087
+ >
1088
+ <ng-template #icon>
1089
+ @if (cancelIcon()) {
1090
+ <span [ngClass]="cancelIcon()"></span>
1091
+ }
1092
+ @if (!cancelIcon()) {
1093
+ @if (!cancelIconTemplate() && !_cancelIconTemplate()) {
1094
+ <svg data-p-icon="times" [attr.aria-hidden]="true" />
1095
+ }
1096
+ @if (cancelIconTemplate() || _cancelIconTemplate()) {
1097
+ <span [attr.aria-hidden]="true">
1098
+ <ng-template *ngTemplateOutlet="cancelIconTemplate() || _cancelIconTemplate()"></ng-template>
1099
+ </span>
1100
+ }
1101
+ }
1102
+ </ng-template>
1103
+ </p-button>
1104
+ }
1105
+ }
1101
1106
  <ng-container
1102
1107
  *ngTemplateOutlet="
1103
- contentTemplate() || _contentTemplate;
1108
+ headerTemplate() || _headerTemplate();
1104
1109
  context: {
1105
- $implicit: files,
1106
- uploadedFiles: uploadedFiles,
1110
+ $implicit: _files(),
1111
+ uploadedFiles: uploadedFiles(),
1107
1112
  chooseCallback: choose.bind(this),
1108
1113
  clearCallback: clear.bind(this),
1109
- removeUploadedFileCallback: removeUploadedFile.bind(this),
1110
- removeFileCallback: remove.bind(this),
1111
- progress: progress,
1112
- messages: msgs
1114
+ uploadCallback: upload.bind(this)
1113
1115
  }
1114
1116
  "
1115
1117
  ></ng-container>
1116
- } @else {
1117
- <p-progressbar [value]="progress" [showValue]="false" *ngIf="hasFiles()" [pt]="ptm('pcProgressBar')"></p-progressbar>
1118
- @for (message of msgs; track message) {
1119
- <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1120
- }
1118
+ <ng-container *ngTemplateOutlet="toolbarTemplate() || _toolbarTemplate()"></ng-container>
1119
+ </div>
1120
+ <div #content [class]="cx('content')" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)" [pBind]="ptm('content')">
1121
+ @if (contentTemplate() || _contentTemplate()) {
1122
+ <ng-container
1123
+ *ngTemplateOutlet="
1124
+ contentTemplate() || _contentTemplate();
1125
+ context: {
1126
+ $implicit: _files(),
1127
+ uploadedFiles: uploadedFiles(),
1128
+ chooseCallback: choose.bind(this),
1129
+ clearCallback: clear.bind(this),
1130
+ removeUploadedFileCallback: removeUploadedFile.bind(this),
1131
+ removeFileCallback: remove.bind(this),
1132
+ progress: progress(),
1133
+ messages: msgs()
1134
+ }
1135
+ "
1136
+ ></ng-container>
1137
+ } @else {
1138
+ @if (hasFiles()) {
1139
+ <p-progressbar [value]="progress()" [showValue]="false" [pt]="ptm('pcProgressBar')"></p-progressbar>
1140
+ }
1141
+ @for (message of msgs(); track message) {
1142
+ <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1143
+ }
1121
1144
 
1122
- @if (hasFiles()) {
1123
- <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1124
- <ng-template ngFor [ngForOf]="files" [ngForTemplate]="fileTemplate() || _fileTemplate"></ng-template>
1125
- @if (!fileTemplate() && !_fileTemplate) {
1126
- <div
1127
- pFileContent
1128
- [unstyled]="unstyled()"
1129
- [files]="files"
1130
- (onRemove)="onRemoveClick($event)"
1131
- [badgeValue]="pendingLabel"
1132
- [previewWidth]="previewWidth"
1133
- [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate"
1134
- ></div>
1135
- }
1136
- </div>
1145
+ @if (hasFiles()) {
1146
+ <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1147
+ @for (file of _files(); track file) {
1148
+ <ng-container *ngTemplateOutlet="fileTemplate() || _fileTemplate(); context: { $implicit: file, ngForOf: _files(), index: $index, count: $count, first: $first, last: $last, even: $even, odd: $odd }"></ng-container>
1149
+ }
1150
+ @if (!fileTemplate() && !_fileTemplate()) {
1151
+ <div
1152
+ pFileContent
1153
+ [unstyled]="unstyled()"
1154
+ [files]="_files()"
1155
+ (onRemove)="onRemoveClick($event)"
1156
+ [badgeValue]="pendingLabel()"
1157
+ [previewWidth]="previewWidth()"
1158
+ [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate()"
1159
+ ></div>
1160
+ }
1161
+ </div>
1162
+ }
1163
+ @if (hasUploadedFiles()) {
1164
+ <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1165
+ @for (file of uploadedFiles(); track file) {
1166
+ <ng-container
1167
+ *ngTemplateOutlet="fileTemplate() || _fileTemplate(); context: { $implicit: file, ngForOf: uploadedFiles(), index: $index, count: $count, first: $first, last: $last, even: $even, odd: $odd }"
1168
+ ></ng-container>
1169
+ }
1170
+ @if (!fileTemplate() && !_fileTemplate()) {
1171
+ <div
1172
+ pFileContent
1173
+ [unstyled]="unstyled()"
1174
+ [files]="uploadedFiles()"
1175
+ (onRemove)="onRemoveUploadedFileClick($event)"
1176
+ [badgeValue]="completedLabel()"
1177
+ badgeSeverity="success"
1178
+ [previewWidth]="previewWidth()"
1179
+ [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate()"
1180
+ ></div>
1181
+ }
1182
+ </div>
1183
+ }
1137
1184
  }
1138
- @if (hasUploadedFiles()) {
1139
- <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1140
- <ng-template ngFor [ngForOf]="uploadedFiles" [ngForTemplate]="fileTemplate() || _fileTemplate"></ng-template>
1141
- @if (!fileTemplate() && !_fileTemplate) {
1142
- <div
1143
- pFileContent
1144
- [unstyled]="unstyled()"
1145
- [files]="uploadedFiles"
1146
- (onRemove)="onRemoveUploadedFileClick($event)"
1147
- [badgeValue]="completedLabel()"
1148
- badgeSeverity="success"
1149
- [previewWidth]="previewWidth"
1150
- [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate"
1151
- ></div>
1152
- }
1153
- </div>
1185
+ @if ((emptyTemplate() || _emptyTemplate()) && !hasFiles() && !hasUploadedFiles()) {
1186
+ <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate()" [pBind]="ptm('empty')"></ng-container>
1154
1187
  }
1155
- }
1156
- @if ((emptyTemplate() || _emptyTemplate) && !hasFiles() && !hasUploadedFiles()) {
1157
- <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate" [pBind]="ptm('empty')"></ng-container>
1158
- }
1188
+ </div>
1159
1189
  </div>
1160
- </div>
1161
- <div [class]="cn(cx('root'), styleClass)" *ngIf="mode === 'basic'" [pBind]="ptm('root')">
1162
- @for (message of msgs; track message) {
1163
- <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1164
- }
1190
+ }
1191
+ @if (mode() === 'basic') {
1192
+ <div [class]="cn(cx('root'), styleClass())" [pBind]="ptm('root')">
1193
+ @for (message of msgs(); track message) {
1194
+ <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1195
+ }
1165
1196
 
1166
- <div [class]="cx('basicContent')" [pBind]="ptm('basicContent')">
1167
- <p-button
1168
- [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass)"
1169
- [disabled]="disabled"
1170
- [label]="chooseButtonLabel"
1171
- [style]="style"
1172
- (onClick)="onBasicUploaderClick()"
1173
- (keydown)="onBasicKeydown($event)"
1174
- [buttonProps]="chooseButtonProps"
1175
- [pt]="ptm('pcChooseButton')"
1176
- [unstyled]="unstyled()"
1177
- >
1178
- <ng-template #icon>
1179
- @if (hasFiles() && !auto) {
1180
- <span *ngIf="uploadIcon" class="p-button-icon p-button-icon-left" [ngClass]="uploadIcon" [pBind]="ptm('pcChooseButton')?.icon"></span>
1181
- <ng-container *ngIf="!uploadIcon">
1182
- <svg data-p-icon="upload" *ngIf="!uploadIconTemplate() && !_uploadIconTemplate" [class]="'p-button-icon p-button-icon-left'" [pBind]="ptm('pcChooseButton')?.icon" />
1183
- <span *ngIf="_uploadIconTemplate || uploadIconTemplate()" class="p-button-icon p-button-icon-left" [pBind]="ptm('pcChooseButton')?.icon">
1184
- <ng-template *ngTemplateOutlet="_uploadIconTemplate || uploadIconTemplate()"></ng-template>
1185
- </span>
1186
- </ng-container>
1197
+ <div [class]="cx('basicContent')" [pBind]="ptm('basicContent')">
1198
+ <p-button
1199
+ [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass())"
1200
+ [disabled]="disabled()"
1201
+ [label]="chooseButtonLabel()"
1202
+ [style]="style()"
1203
+ (onClick)="onBasicUploaderClick()"
1204
+ (keydown)="onBasicKeydown($event)"
1205
+ [buttonProps]="chooseButtonProps()"
1206
+ [pt]="ptm('pcChooseButton')"
1207
+ [unstyled]="unstyled()"
1208
+ >
1209
+ <ng-template #icon>
1210
+ @if (hasFiles() && !auto()) {
1211
+ @if (uploadIcon()) {
1212
+ <span class="p-button-icon p-button-icon-left" [ngClass]="uploadIcon()" [pBind]="ptm('pcChooseButton')?.icon"></span>
1213
+ }
1214
+ @if (!uploadIcon()) {
1215
+ @if (!uploadIconTemplate() && !_uploadIconTemplate()) {
1216
+ <svg data-p-icon="upload" [class]="'p-button-icon p-button-icon-left'" [pBind]="ptm('pcChooseButton')?.icon" />
1217
+ }
1218
+ @if (_uploadIconTemplate() || uploadIconTemplate()) {
1219
+ <span class="p-button-icon p-button-icon-left" [pBind]="ptm('pcChooseButton')?.icon">
1220
+ <ng-template *ngTemplateOutlet="_uploadIconTemplate() || uploadIconTemplate()"></ng-template>
1221
+ </span>
1222
+ }
1223
+ }
1224
+ } @else {
1225
+ @if (chooseIcon()) {
1226
+ <span class="p-button-icon p-button-icon-left pi" [ngClass]="chooseIcon()" [pBind]="ptm('pcChooseButton')?.icon"></span>
1227
+ }
1228
+ @if (!chooseIcon()) {
1229
+ @if (!chooseIconTemplate() && !_chooseIconTemplate()) {
1230
+ <svg data-p-icon="plus" [pBind]="ptm('pcChooseButton')?.icon" />
1231
+ }
1232
+ <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate()"></ng-template>
1233
+ }
1234
+ }
1235
+ </ng-template>
1236
+ <input
1237
+ [attr.aria-label]="browseFilesLabel()"
1238
+ #basicfileinput
1239
+ type="file"
1240
+ [accept]="accept()"
1241
+ [multiple]="multiple()"
1242
+ [disabled]="disabled()"
1243
+ (change)="onFileSelect($event)"
1244
+ (focus)="onFocus()"
1245
+ (blur)="onBlur()"
1246
+ [pBind]="ptm('input')"
1247
+ />
1248
+ </p-button>
1249
+ @if (!auto()) {
1250
+ @if (!fileLabelTemplate() && !_fileLabelTemplate()) {
1251
+ <span>
1252
+ {{ basicFileChosenLabel() }}
1253
+ </span>
1187
1254
  } @else {
1188
- <span *ngIf="chooseIcon" class="p-button-icon p-button-icon-left pi" [ngClass]="chooseIcon" [pBind]="ptm('pcChooseButton')?.icon"></span>
1189
- <ng-container *ngIf="!chooseIcon">
1190
- <svg data-p-icon="plus" *ngIf="!chooseIconTemplate() && !_chooseIconTemplate" [pBind]="ptm('pcChooseButton')?.icon" />
1191
- <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate"></ng-template>
1192
- </ng-container>
1255
+ <ng-container *ngTemplateOutlet="fileLabelTemplate() || _fileLabelTemplate(); context: { $implicit: _files() }"></ng-container>
1193
1256
  }
1194
- </ng-template>
1195
- <input [attr.aria-label]="browseFilesLabel" #basicfileinput type="file" [accept]="accept" [multiple]="multiple" [disabled]="disabled" (change)="onFileSelect($event)" (focus)="onFocus()" (blur)="onBlur()" [pBind]="ptm('input')" />
1196
- </p-button>
1197
- @if (!auto) {
1198
- @if (!fileLabelTemplate() && !_fileLabelTemplate) {
1199
- <span>
1200
- {{ basicFileChosenLabel() }}
1201
- </span>
1202
- } @else {
1203
- <ng-container *ngTemplateOutlet="fileLabelTemplate() || _fileLabelTemplate; context: { $implicit: files }"></ng-container>
1204
1257
  }
1205
- }
1258
+ </div>
1206
1259
  </div>
1207
- </div>
1208
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "valueStyleClass", "unit", "mode", "color"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "closable", "icon", "closeIcon", "life", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { kind: "component", type: PlusIcon, selector: "[data-p-icon=\"plus\"]" }, { kind: "component", type: UploadIcon, selector: "[data-p-icon=\"upload\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: FileContent, selector: "[pFileContent]", inputs: ["files", "badgeSeverity", "badgeValue", "previewWidth", "fileRemoveIconTemplate"], outputs: ["onRemove"] }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1260
+ }
1261
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "valueStyleClass", "unit", "mode", "color"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "closable", "icon", "closeIcon", "life", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { kind: "component", type: PlusIcon, selector: "[data-p-icon=\"plus\"]" }, { kind: "component", type: UploadIcon, selector: "[data-p-icon=\"upload\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: FileContent, selector: "[pFileContent]", inputs: ["files", "badgeSeverity", "badgeValue", "previewWidth", "fileRemoveIconTemplate"], outputs: ["onRemove"] }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1209
1262
  }
1210
1263
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: FileUpload, decorators: [{
1211
1264
  type: Component,
1212
1265
  args: [{
1213
1266
  selector: 'p-fileupload, p-fileUpload',
1214
- standalone: true,
1215
1267
  imports: [CommonModule, Button, ProgressBar, Message, PlusIcon, UploadIcon, TimesIcon, SharedModule, FileContent, Bind],
1216
1268
  template: `
1217
- <div [class]="cn(cx('root'), styleClass)" [ngStyle]="style" *ngIf="mode === 'advanced'" [pBind]="ptm('root')">
1218
- <input [attr.aria-label]="browseFilesLabel" #advancedfileinput type="file" (change)="onFileSelect($event)" [multiple]="multiple" [accept]="accept" [disabled]="disabled || isChooseDisabled()" [attr.title]="''" [pBind]="ptm('input')" />
1219
- <div [class]="cx('header')" [pBind]="ptm('header')">
1220
- <ng-container *ngIf="!headerTemplate() && !_headerTemplate">
1221
- <p-button
1222
- [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass)"
1223
- [disabled]="disabled || isChooseDisabled()"
1224
- (focus)="onFocus()"
1225
- [label]="chooseButtonLabel"
1226
- (blur)="onBlur()"
1227
- (onClick)="choose()"
1228
- (keydown.enter)="choose()"
1229
- [buttonProps]="chooseButtonProps"
1230
- [pt]="ptm('pcChooseButton')"
1231
- [unstyled]="unstyled()"
1232
- >
1233
- <input
1234
- [attr.aria-label]="browseFilesLabel"
1235
- #advancedfileinput
1236
- type="file"
1237
- (change)="onFileSelect($event)"
1238
- [multiple]="multiple"
1239
- [accept]="accept"
1240
- [disabled]="disabled || isChooseDisabled()"
1241
- [attr.title]="''"
1242
- [pBind]="ptm('input')"
1243
- />
1244
- <ng-template #icon>
1245
- <span *ngIf="chooseIcon" [class]="chooseIcon" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon"></span>
1246
- <ng-container *ngIf="!chooseIcon">
1247
- <svg data-p-icon="plus" *ngIf="!chooseIconTemplate() && !_chooseIconTemplate" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon" />
1248
- <span *ngIf="chooseIconTemplate() || _chooseIconTemplate" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon">
1249
- <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate"></ng-template>
1250
- </span>
1251
- </ng-container>
1252
- </ng-template>
1253
- </p-button>
1269
+ @if (mode() === 'advanced') {
1270
+ <div [class]="cn(cx('root'), styleClass())" [ngStyle]="style()" [pBind]="ptm('root')">
1271
+ <input
1272
+ [attr.aria-label]="browseFilesLabel()"
1273
+ #advancedfileinput
1274
+ type="file"
1275
+ (change)="onFileSelect($event)"
1276
+ [multiple]="multiple()"
1277
+ [accept]="accept()"
1278
+ [disabled]="disabled() || isChooseDisabled()"
1279
+ [attr.title]="''"
1280
+ [pBind]="ptm('input')"
1281
+ />
1282
+ <div [class]="cx('header')" [pBind]="ptm('header')">
1283
+ @if (!headerTemplate() && !_headerTemplate()) {
1284
+ <p-button
1285
+ [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass())"
1286
+ [disabled]="disabled() || isChooseDisabled()"
1287
+ (focus)="onFocus()"
1288
+ [label]="chooseButtonLabel()"
1289
+ (blur)="onBlur()"
1290
+ (onClick)="choose()"
1291
+ (keydown.enter)="choose()"
1292
+ [buttonProps]="chooseButtonProps()"
1293
+ [pt]="ptm('pcChooseButton')"
1294
+ [unstyled]="unstyled()"
1295
+ >
1296
+ <input
1297
+ [attr.aria-label]="browseFilesLabel()"
1298
+ #advancedfileinput
1299
+ type="file"
1300
+ (change)="onFileSelect($event)"
1301
+ [multiple]="multiple()"
1302
+ [accept]="accept()"
1303
+ [disabled]="disabled() || isChooseDisabled()"
1304
+ [attr.title]="''"
1305
+ [pBind]="ptm('input')"
1306
+ />
1307
+ <ng-template #icon>
1308
+ @if (chooseIcon()) {
1309
+ <span [class]="chooseIcon()" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon"></span>
1310
+ }
1311
+ @if (!chooseIcon()) {
1312
+ @if (!chooseIconTemplate() && !_chooseIconTemplate()) {
1313
+ <svg data-p-icon="plus" [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon" />
1314
+ }
1315
+ @if (chooseIconTemplate() || _chooseIconTemplate()) {
1316
+ <span [attr.aria-label]="true" [pBind]="ptm('pcChooseButton')?.icon">
1317
+ <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate()"></ng-template>
1318
+ </span>
1319
+ }
1320
+ }
1321
+ </ng-template>
1322
+ </p-button>
1254
1323
 
1255
- <p-button
1256
- *ngIf="!auto && showUploadButton"
1257
- [label]="uploadButtonLabel"
1258
- (onClick)="upload()"
1259
- [disabled]="!hasFiles() || isFileLimitExceeded()"
1260
- [styleClass]="cn(cx('pcUploadButton'), uploadStyleClass)"
1261
- [buttonProps]="uploadButtonProps"
1262
- [pt]="ptm('pcUploadButton')"
1263
- [unstyled]="unstyled()"
1264
- >
1265
- <ng-template #icon>
1266
- <span *ngIf="uploadIcon" [ngClass]="uploadIcon" [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon"></span>
1267
- <ng-container *ngIf="!uploadIcon">
1268
- <svg data-p-icon="upload" *ngIf="!uploadIconTemplate() && !_uploadIconTemplate" [pBind]="ptm('pcUploadButton')?.icon" />
1269
- <span *ngIf="uploadIconTemplate() || _uploadIconTemplate" [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon">
1270
- <ng-template *ngTemplateOutlet="uploadIconTemplate() || _uploadIconTemplate"></ng-template>
1271
- </span>
1272
- </ng-container>
1273
- </ng-template>
1274
- </p-button>
1275
- <p-button
1276
- *ngIf="!auto && showCancelButton"
1277
- [label]="cancelButtonLabel"
1278
- (onClick)="clear()"
1279
- [disabled]="!hasFiles() || uploading"
1280
- [styleClass]="cn(cx('pcCancelButton'), cancelStyleClass)"
1281
- [buttonProps]="cancelButtonProps"
1282
- [pt]="ptm('pcCancelButton')"
1283
- [unstyled]="unstyled()"
1284
- >
1285
- <ng-template #icon>
1286
- <span *ngIf="cancelIcon" [ngClass]="cancelIcon"></span>
1287
- <ng-container *ngIf="!cancelIcon">
1288
- <svg data-p-icon="times" *ngIf="!cancelIconTemplate() && !_cancelIconTemplate" [attr.aria-hidden]="true" />
1289
- <span *ngIf="cancelIconTemplate() || _cancelIconTemplate" [attr.aria-hidden]="true">
1290
- <ng-template *ngTemplateOutlet="cancelIconTemplate() || _cancelIconTemplate"></ng-template>
1291
- </span>
1292
- </ng-container>
1293
- </ng-template>
1294
- </p-button>
1295
- </ng-container>
1296
- <ng-container
1297
- *ngTemplateOutlet="
1298
- headerTemplate() || _headerTemplate;
1299
- context: {
1300
- $implicit: files,
1301
- uploadedFiles: uploadedFiles,
1302
- chooseCallback: choose.bind(this),
1303
- clearCallback: clear.bind(this),
1304
- uploadCallback: upload.bind(this)
1324
+ @if (!auto() && showUploadButton()) {
1325
+ <p-button
1326
+ [label]="uploadButtonLabel()"
1327
+ (onClick)="upload()"
1328
+ [disabled]="!hasFiles() || isFileLimitExceeded()"
1329
+ [styleClass]="cn(cx('pcUploadButton'), uploadStyleClass())"
1330
+ [buttonProps]="uploadButtonProps()"
1331
+ [pt]="ptm('pcUploadButton')"
1332
+ [unstyled]="unstyled()"
1333
+ >
1334
+ <ng-template #icon>
1335
+ @if (uploadIcon()) {
1336
+ <span [ngClass]="uploadIcon()" [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon"></span>
1337
+ }
1338
+ @if (!uploadIcon()) {
1339
+ @if (!uploadIconTemplate() && !_uploadIconTemplate()) {
1340
+ <svg data-p-icon="upload" [pBind]="ptm('pcUploadButton')?.icon" />
1341
+ }
1342
+ @if (uploadIconTemplate() || _uploadIconTemplate()) {
1343
+ <span [attr.aria-hidden]="true" [pBind]="ptm('pcUploadButton')?.icon">
1344
+ <ng-template *ngTemplateOutlet="uploadIconTemplate() || _uploadIconTemplate()"></ng-template>
1345
+ </span>
1346
+ }
1347
+ }
1348
+ </ng-template>
1349
+ </p-button>
1305
1350
  }
1306
- "
1307
- ></ng-container>
1308
- <ng-container *ngTemplateOutlet="toolbarTemplate() || _toolbarTemplate"></ng-container>
1309
- </div>
1310
- <div #content [class]="cx('content')" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)" [pBind]="ptm('content')">
1311
- @if (contentTemplate() || _contentTemplate) {
1351
+ @if (!auto() && showCancelButton()) {
1352
+ <p-button
1353
+ [label]="cancelButtonLabel()"
1354
+ (onClick)="clear()"
1355
+ [disabled]="!hasFiles() || uploading()"
1356
+ [styleClass]="cn(cx('pcCancelButton'), cancelStyleClass())"
1357
+ [buttonProps]="cancelButtonProps()"
1358
+ [pt]="ptm('pcCancelButton')"
1359
+ [unstyled]="unstyled()"
1360
+ >
1361
+ <ng-template #icon>
1362
+ @if (cancelIcon()) {
1363
+ <span [ngClass]="cancelIcon()"></span>
1364
+ }
1365
+ @if (!cancelIcon()) {
1366
+ @if (!cancelIconTemplate() && !_cancelIconTemplate()) {
1367
+ <svg data-p-icon="times" [attr.aria-hidden]="true" />
1368
+ }
1369
+ @if (cancelIconTemplate() || _cancelIconTemplate()) {
1370
+ <span [attr.aria-hidden]="true">
1371
+ <ng-template *ngTemplateOutlet="cancelIconTemplate() || _cancelIconTemplate()"></ng-template>
1372
+ </span>
1373
+ }
1374
+ }
1375
+ </ng-template>
1376
+ </p-button>
1377
+ }
1378
+ }
1312
1379
  <ng-container
1313
1380
  *ngTemplateOutlet="
1314
- contentTemplate() || _contentTemplate;
1381
+ headerTemplate() || _headerTemplate();
1315
1382
  context: {
1316
- $implicit: files,
1317
- uploadedFiles: uploadedFiles,
1383
+ $implicit: _files(),
1384
+ uploadedFiles: uploadedFiles(),
1318
1385
  chooseCallback: choose.bind(this),
1319
1386
  clearCallback: clear.bind(this),
1320
- removeUploadedFileCallback: removeUploadedFile.bind(this),
1321
- removeFileCallback: remove.bind(this),
1322
- progress: progress,
1323
- messages: msgs
1387
+ uploadCallback: upload.bind(this)
1324
1388
  }
1325
1389
  "
1326
1390
  ></ng-container>
1327
- } @else {
1328
- <p-progressbar [value]="progress" [showValue]="false" *ngIf="hasFiles()" [pt]="ptm('pcProgressBar')"></p-progressbar>
1329
- @for (message of msgs; track message) {
1330
- <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1331
- }
1391
+ <ng-container *ngTemplateOutlet="toolbarTemplate() || _toolbarTemplate()"></ng-container>
1392
+ </div>
1393
+ <div #content [class]="cx('content')" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (drop)="onDrop($event)" [pBind]="ptm('content')">
1394
+ @if (contentTemplate() || _contentTemplate()) {
1395
+ <ng-container
1396
+ *ngTemplateOutlet="
1397
+ contentTemplate() || _contentTemplate();
1398
+ context: {
1399
+ $implicit: _files(),
1400
+ uploadedFiles: uploadedFiles(),
1401
+ chooseCallback: choose.bind(this),
1402
+ clearCallback: clear.bind(this),
1403
+ removeUploadedFileCallback: removeUploadedFile.bind(this),
1404
+ removeFileCallback: remove.bind(this),
1405
+ progress: progress(),
1406
+ messages: msgs()
1407
+ }
1408
+ "
1409
+ ></ng-container>
1410
+ } @else {
1411
+ @if (hasFiles()) {
1412
+ <p-progressbar [value]="progress()" [showValue]="false" [pt]="ptm('pcProgressBar')"></p-progressbar>
1413
+ }
1414
+ @for (message of msgs(); track message) {
1415
+ <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1416
+ }
1332
1417
 
1333
- @if (hasFiles()) {
1334
- <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1335
- <ng-template ngFor [ngForOf]="files" [ngForTemplate]="fileTemplate() || _fileTemplate"></ng-template>
1336
- @if (!fileTemplate() && !_fileTemplate) {
1337
- <div
1338
- pFileContent
1339
- [unstyled]="unstyled()"
1340
- [files]="files"
1341
- (onRemove)="onRemoveClick($event)"
1342
- [badgeValue]="pendingLabel"
1343
- [previewWidth]="previewWidth"
1344
- [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate"
1345
- ></div>
1346
- }
1347
- </div>
1418
+ @if (hasFiles()) {
1419
+ <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1420
+ @for (file of _files(); track file) {
1421
+ <ng-container *ngTemplateOutlet="fileTemplate() || _fileTemplate(); context: { $implicit: file, ngForOf: _files(), index: $index, count: $count, first: $first, last: $last, even: $even, odd: $odd }"></ng-container>
1422
+ }
1423
+ @if (!fileTemplate() && !_fileTemplate()) {
1424
+ <div
1425
+ pFileContent
1426
+ [unstyled]="unstyled()"
1427
+ [files]="_files()"
1428
+ (onRemove)="onRemoveClick($event)"
1429
+ [badgeValue]="pendingLabel()"
1430
+ [previewWidth]="previewWidth()"
1431
+ [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate()"
1432
+ ></div>
1433
+ }
1434
+ </div>
1435
+ }
1436
+ @if (hasUploadedFiles()) {
1437
+ <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1438
+ @for (file of uploadedFiles(); track file) {
1439
+ <ng-container
1440
+ *ngTemplateOutlet="fileTemplate() || _fileTemplate(); context: { $implicit: file, ngForOf: uploadedFiles(), index: $index, count: $count, first: $first, last: $last, even: $even, odd: $odd }"
1441
+ ></ng-container>
1442
+ }
1443
+ @if (!fileTemplate() && !_fileTemplate()) {
1444
+ <div
1445
+ pFileContent
1446
+ [unstyled]="unstyled()"
1447
+ [files]="uploadedFiles()"
1448
+ (onRemove)="onRemoveUploadedFileClick($event)"
1449
+ [badgeValue]="completedLabel()"
1450
+ badgeSeverity="success"
1451
+ [previewWidth]="previewWidth()"
1452
+ [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate()"
1453
+ ></div>
1454
+ }
1455
+ </div>
1456
+ }
1348
1457
  }
1349
- @if (hasUploadedFiles()) {
1350
- <div [class]="cx('fileList')" [pBind]="ptm('fileList')">
1351
- <ng-template ngFor [ngForOf]="uploadedFiles" [ngForTemplate]="fileTemplate() || _fileTemplate"></ng-template>
1352
- @if (!fileTemplate() && !_fileTemplate) {
1353
- <div
1354
- pFileContent
1355
- [unstyled]="unstyled()"
1356
- [files]="uploadedFiles"
1357
- (onRemove)="onRemoveUploadedFileClick($event)"
1358
- [badgeValue]="completedLabel()"
1359
- badgeSeverity="success"
1360
- [previewWidth]="previewWidth"
1361
- [fileRemoveIconTemplate]="cancelIconTemplate() || _cancelIconTemplate"
1362
- ></div>
1363
- }
1364
- </div>
1458
+ @if ((emptyTemplate() || _emptyTemplate()) && !hasFiles() && !hasUploadedFiles()) {
1459
+ <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate()" [pBind]="ptm('empty')"></ng-container>
1365
1460
  }
1366
- }
1367
- @if ((emptyTemplate() || _emptyTemplate) && !hasFiles() && !hasUploadedFiles()) {
1368
- <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate" [pBind]="ptm('empty')"></ng-container>
1369
- }
1461
+ </div>
1370
1462
  </div>
1371
- </div>
1372
- <div [class]="cn(cx('root'), styleClass)" *ngIf="mode === 'basic'" [pBind]="ptm('root')">
1373
- @for (message of msgs; track message) {
1374
- <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1375
- }
1463
+ }
1464
+ @if (mode() === 'basic') {
1465
+ <div [class]="cn(cx('root'), styleClass())" [pBind]="ptm('root')">
1466
+ @for (message of msgs(); track message) {
1467
+ <p-message [severity]="message.severity" [text]="message.text" [pt]="ptm('pcMessage')" [unstyled]="unstyled()"></p-message>
1468
+ }
1376
1469
 
1377
- <div [class]="cx('basicContent')" [pBind]="ptm('basicContent')">
1378
- <p-button
1379
- [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass)"
1380
- [disabled]="disabled"
1381
- [label]="chooseButtonLabel"
1382
- [style]="style"
1383
- (onClick)="onBasicUploaderClick()"
1384
- (keydown)="onBasicKeydown($event)"
1385
- [buttonProps]="chooseButtonProps"
1386
- [pt]="ptm('pcChooseButton')"
1387
- [unstyled]="unstyled()"
1388
- >
1389
- <ng-template #icon>
1390
- @if (hasFiles() && !auto) {
1391
- <span *ngIf="uploadIcon" class="p-button-icon p-button-icon-left" [ngClass]="uploadIcon" [pBind]="ptm('pcChooseButton')?.icon"></span>
1392
- <ng-container *ngIf="!uploadIcon">
1393
- <svg data-p-icon="upload" *ngIf="!uploadIconTemplate() && !_uploadIconTemplate" [class]="'p-button-icon p-button-icon-left'" [pBind]="ptm('pcChooseButton')?.icon" />
1394
- <span *ngIf="_uploadIconTemplate || uploadIconTemplate()" class="p-button-icon p-button-icon-left" [pBind]="ptm('pcChooseButton')?.icon">
1395
- <ng-template *ngTemplateOutlet="_uploadIconTemplate || uploadIconTemplate()"></ng-template>
1396
- </span>
1397
- </ng-container>
1470
+ <div [class]="cx('basicContent')" [pBind]="ptm('basicContent')">
1471
+ <p-button
1472
+ [styleClass]="cn(cx('pcChooseButton'), chooseStyleClass())"
1473
+ [disabled]="disabled()"
1474
+ [label]="chooseButtonLabel()"
1475
+ [style]="style()"
1476
+ (onClick)="onBasicUploaderClick()"
1477
+ (keydown)="onBasicKeydown($event)"
1478
+ [buttonProps]="chooseButtonProps()"
1479
+ [pt]="ptm('pcChooseButton')"
1480
+ [unstyled]="unstyled()"
1481
+ >
1482
+ <ng-template #icon>
1483
+ @if (hasFiles() && !auto()) {
1484
+ @if (uploadIcon()) {
1485
+ <span class="p-button-icon p-button-icon-left" [ngClass]="uploadIcon()" [pBind]="ptm('pcChooseButton')?.icon"></span>
1486
+ }
1487
+ @if (!uploadIcon()) {
1488
+ @if (!uploadIconTemplate() && !_uploadIconTemplate()) {
1489
+ <svg data-p-icon="upload" [class]="'p-button-icon p-button-icon-left'" [pBind]="ptm('pcChooseButton')?.icon" />
1490
+ }
1491
+ @if (_uploadIconTemplate() || uploadIconTemplate()) {
1492
+ <span class="p-button-icon p-button-icon-left" [pBind]="ptm('pcChooseButton')?.icon">
1493
+ <ng-template *ngTemplateOutlet="_uploadIconTemplate() || uploadIconTemplate()"></ng-template>
1494
+ </span>
1495
+ }
1496
+ }
1497
+ } @else {
1498
+ @if (chooseIcon()) {
1499
+ <span class="p-button-icon p-button-icon-left pi" [ngClass]="chooseIcon()" [pBind]="ptm('pcChooseButton')?.icon"></span>
1500
+ }
1501
+ @if (!chooseIcon()) {
1502
+ @if (!chooseIconTemplate() && !_chooseIconTemplate()) {
1503
+ <svg data-p-icon="plus" [pBind]="ptm('pcChooseButton')?.icon" />
1504
+ }
1505
+ <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate()"></ng-template>
1506
+ }
1507
+ }
1508
+ </ng-template>
1509
+ <input
1510
+ [attr.aria-label]="browseFilesLabel()"
1511
+ #basicfileinput
1512
+ type="file"
1513
+ [accept]="accept()"
1514
+ [multiple]="multiple()"
1515
+ [disabled]="disabled()"
1516
+ (change)="onFileSelect($event)"
1517
+ (focus)="onFocus()"
1518
+ (blur)="onBlur()"
1519
+ [pBind]="ptm('input')"
1520
+ />
1521
+ </p-button>
1522
+ @if (!auto()) {
1523
+ @if (!fileLabelTemplate() && !_fileLabelTemplate()) {
1524
+ <span>
1525
+ {{ basicFileChosenLabel() }}
1526
+ </span>
1398
1527
  } @else {
1399
- <span *ngIf="chooseIcon" class="p-button-icon p-button-icon-left pi" [ngClass]="chooseIcon" [pBind]="ptm('pcChooseButton')?.icon"></span>
1400
- <ng-container *ngIf="!chooseIcon">
1401
- <svg data-p-icon="plus" *ngIf="!chooseIconTemplate() && !_chooseIconTemplate" [pBind]="ptm('pcChooseButton')?.icon" />
1402
- <ng-template *ngTemplateOutlet="chooseIconTemplate() || _chooseIconTemplate"></ng-template>
1403
- </ng-container>
1528
+ <ng-container *ngTemplateOutlet="fileLabelTemplate() || _fileLabelTemplate(); context: { $implicit: _files() }"></ng-container>
1404
1529
  }
1405
- </ng-template>
1406
- <input [attr.aria-label]="browseFilesLabel" #basicfileinput type="file" [accept]="accept" [multiple]="multiple" [disabled]="disabled" (change)="onFileSelect($event)" (focus)="onFocus()" (blur)="onBlur()" [pBind]="ptm('input')" />
1407
- </p-button>
1408
- @if (!auto) {
1409
- @if (!fileLabelTemplate() && !_fileLabelTemplate) {
1410
- <span>
1411
- {{ basicFileChosenLabel() }}
1412
- </span>
1413
- } @else {
1414
- <ng-container *ngTemplateOutlet="fileLabelTemplate() || _fileLabelTemplate; context: { $implicit: files }"></ng-container>
1415
1530
  }
1416
- }
1531
+ </div>
1417
1532
  </div>
1418
- </div>
1533
+ }
1419
1534
  `,
1420
1535
  changeDetection: ChangeDetectionStrategy.OnPush,
1421
1536
  encapsulation: ViewEncapsulation.None,
1422
1537
  providers: [FileUploadStyle, { provide: FILEUPLOAD_INSTANCE, useExisting: FileUpload }, { provide: PARENT_INSTANCE, useExisting: FileUpload }],
1423
1538
  hostDirectives: [Bind]
1424
1539
  }]
1425
- }], propDecorators: { name: [{
1426
- type: Input
1427
- }], url: [{
1428
- type: Input
1429
- }], method: [{
1430
- type: Input
1431
- }], multiple: [{
1432
- type: Input,
1433
- args: [{ transform: booleanAttribute }]
1434
- }], accept: [{
1435
- type: Input
1436
- }], disabled: [{
1437
- type: Input,
1438
- args: [{ transform: booleanAttribute }]
1439
- }], auto: [{
1440
- type: Input,
1441
- args: [{ transform: booleanAttribute }]
1442
- }], withCredentials: [{
1443
- type: Input,
1444
- args: [{ transform: booleanAttribute }]
1445
- }], maxFileSize: [{
1446
- type: Input,
1447
- args: [{ transform: numberAttribute }]
1448
- }], invalidFileSizeMessageSummary: [{
1449
- type: Input
1450
- }], invalidFileSizeMessageDetail: [{
1451
- type: Input
1452
- }], invalidFileTypeMessageSummary: [{
1453
- type: Input
1454
- }], invalidFileTypeMessageDetail: [{
1455
- type: Input
1456
- }], invalidFileLimitMessageDetail: [{
1457
- type: Input
1458
- }], invalidFileLimitMessageSummary: [{
1459
- type: Input
1460
- }], style: [{
1461
- type: Input
1462
- }], styleClass: [{
1463
- type: Input
1464
- }], previewWidth: [{
1465
- type: Input,
1466
- args: [{ transform: numberAttribute }]
1467
- }], chooseLabel: [{
1468
- type: Input
1469
- }], uploadLabel: [{
1470
- type: Input
1471
- }], cancelLabel: [{
1472
- type: Input
1473
- }], chooseIcon: [{
1474
- type: Input
1475
- }], uploadIcon: [{
1476
- type: Input
1477
- }], cancelIcon: [{
1478
- type: Input
1479
- }], showUploadButton: [{
1480
- type: Input,
1481
- args: [{ transform: booleanAttribute }]
1482
- }], showCancelButton: [{
1483
- type: Input,
1484
- args: [{ transform: booleanAttribute }]
1485
- }], mode: [{
1486
- type: Input
1487
- }], headers: [{
1488
- type: Input
1489
- }], customUpload: [{
1490
- type: Input,
1491
- args: [{ transform: booleanAttribute }]
1492
- }], fileLimit: [{
1493
- type: Input,
1494
- args: [{ transform: (value) => numberAttribute(value, undefined) }]
1495
- }], uploadStyleClass: [{
1496
- type: Input
1497
- }], cancelStyleClass: [{
1498
- type: Input
1499
- }], removeStyleClass: [{
1500
- type: Input
1501
- }], chooseStyleClass: [{
1502
- type: Input
1503
- }], chooseButtonProps: [{
1504
- type: Input
1505
- }], uploadButtonProps: [{
1506
- type: Input
1507
- }], cancelButtonProps: [{
1508
- type: Input
1509
- }], onBeforeUpload: [{ type: i0.Output, args: ["onBeforeUpload"] }], onSend: [{ type: i0.Output, args: ["onSend"] }], onUpload: [{ type: i0.Output, args: ["onUpload"] }], onError: [{ type: i0.Output, args: ["onError"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onRemove: [{ type: i0.Output, args: ["onRemove"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onProgress: [{ type: i0.Output, args: ["onProgress"] }], uploadHandler: [{ type: i0.Output, args: ["uploadHandler"] }], onImageError: [{ type: i0.Output, args: ["onImageError"] }], onRemoveUploadedFile: [{ type: i0.Output, args: ["onRemoveUploadedFile"] }], fileTemplate: [{ type: i0.ContentChild, args: ['file', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: ['toolbar', { ...{ descendants: false }, isSignal: true }] }], chooseIconTemplate: [{ type: i0.ContentChild, args: ['chooseicon', { ...{ descendants: false }, isSignal: true }] }], fileLabelTemplate: [{ type: i0.ContentChild, args: ['filelabel', { ...{ descendants: false }, isSignal: true }] }], uploadIconTemplate: [{ type: i0.ContentChild, args: ['uploadicon', { ...{ descendants: false }, isSignal: true }] }], cancelIconTemplate: [{ type: i0.ContentChild, args: ['cancelicon', { ...{ descendants: false }, isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { ...{ descendants: false }, isSignal: true }] }], advancedFileInput: [{ type: i0.ViewChild, args: ['advancedfileinput', { isSignal: true }] }], basicFileInput: [{ type: i0.ViewChild, args: ['basicfileinput', { isSignal: true }] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], files: [{
1510
- type: Input
1511
- }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
1540
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], method: [{ type: i0.Input, args: [{ isSignal: true, alias: "method", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], auto: [{ type: i0.Input, args: [{ isSignal: true, alias: "auto", required: false }] }], withCredentials: [{ type: i0.Input, args: [{ isSignal: true, alias: "withCredentials", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], invalidFileSizeMessageSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidFileSizeMessageSummary", required: false }] }], invalidFileSizeMessageDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidFileSizeMessageDetail", required: false }] }], invalidFileTypeMessageSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidFileTypeMessageSummary", required: false }] }], invalidFileTypeMessageDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidFileTypeMessageDetail", required: false }] }], invalidFileLimitMessageDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidFileLimitMessageDetail", required: false }] }], invalidFileLimitMessageSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidFileLimitMessageSummary", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], previewWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewWidth", required: false }] }], chooseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseLabel", required: false }] }], uploadLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], chooseIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseIcon", required: false }] }], uploadIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadIcon", required: false }] }], cancelIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelIcon", required: false }] }], showUploadButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showUploadButton", required: false }] }], showCancelButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCancelButton", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], headers: [{ type: i0.Input, args: [{ isSignal: true, alias: "headers", required: false }] }], customUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "customUpload", required: false }] }], fileLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileLimit", required: false }] }], uploadStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadStyleClass", required: false }] }], cancelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelStyleClass", required: false }] }], chooseStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseStyleClass", required: false }] }], chooseButtonProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseButtonProps", required: false }] }], uploadButtonProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadButtonProps", required: false }] }], cancelButtonProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonProps", required: false }] }], onBeforeUpload: [{ type: i0.Output, args: ["onBeforeUpload"] }], onSend: [{ type: i0.Output, args: ["onSend"] }], onUpload: [{ type: i0.Output, args: ["onUpload"] }], onError: [{ type: i0.Output, args: ["onError"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onRemove: [{ type: i0.Output, args: ["onRemove"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onProgress: [{ type: i0.Output, args: ["onProgress"] }], uploadHandler: [{ type: i0.Output, args: ["uploadHandler"] }], onImageError: [{ type: i0.Output, args: ["onImageError"] }], onRemoveUploadedFile: [{ type: i0.Output, args: ["onRemoveUploadedFile"] }], fileTemplate: [{ type: i0.ContentChild, args: ['file', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: ['toolbar', { ...{ descendants: false }, isSignal: true }] }], chooseIconTemplate: [{ type: i0.ContentChild, args: ['chooseicon', { ...{ descendants: false }, isSignal: true }] }], fileLabelTemplate: [{ type: i0.ContentChild, args: ['filelabel', { ...{ descendants: false }, isSignal: true }] }], uploadIconTemplate: [{ type: i0.ContentChild, args: ['uploadicon', { ...{ descendants: false }, isSignal: true }] }], cancelIconTemplate: [{ type: i0.ContentChild, args: ['cancelicon', { ...{ descendants: false }, isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { ...{ descendants: false }, isSignal: true }] }], advancedFileInput: [{ type: i0.ViewChild, args: ['advancedfileinput', { isSignal: true }] }], basicFileInput: [{ type: i0.ViewChild, args: ['basicfileinput', { isSignal: true }] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
1512
1541
  class FileUploadModule {
1513
1542
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1514
1543
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: FileUploadModule, imports: [FileUpload, SharedModule], exports: [FileUpload, SharedModule] });