ngwr 16.5.0 → 16.7.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 (450) hide show
  1. package/avatar/styles/_index.scss +39 -0
  2. package/back-top/styles/_index.scss +6 -0
  3. package/breadcrumbs/styles/_rules.scss +34 -0
  4. package/button/styles/_index.scss +45 -2
  5. package/cascader/styles/_rules.scss +7 -0
  6. package/charts/chart-legend/styles/_index.scss +1 -9
  7. package/copy-value/styles/_index.scss +4 -0
  8. package/counter/styles/_index.scss +1 -8
  9. package/date-picker/styles/_index.scss +15 -9
  10. package/dialog/styles/_index.scss +37 -0
  11. package/dropdown/styles/_index.scss +17 -0
  12. package/editor/styles/_index.scss +1 -8
  13. package/event-calendar/styles/_index.scss +2 -6
  14. package/fesm2022/ngwr-affix.mjs +4 -4
  15. package/fesm2022/ngwr-affix.mjs.map +1 -1
  16. package/fesm2022/ngwr-alert.mjs +3 -3
  17. package/fesm2022/ngwr-anchor.mjs +12 -5
  18. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  19. package/fesm2022/ngwr-animations-aurora.mjs +3 -3
  20. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  21. package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
  22. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  23. package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
  24. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  25. package/fesm2022/ngwr-animations-confetti.mjs +3 -3
  26. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  27. package/fesm2022/ngwr-animations-decode.mjs +3 -3
  28. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  29. package/fesm2022/ngwr-animations-destruct.mjs +3 -3
  30. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  31. package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
  32. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  33. package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
  34. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
  36. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
  38. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  39. package/fesm2022/ngwr-animations-glitch.mjs +3 -3
  40. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  41. package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
  42. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
  43. package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
  44. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
  45. package/fesm2022/ngwr-animations-marquee.mjs +4 -3
  46. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  47. package/fesm2022/ngwr-animations-orbit.mjs +3 -3
  48. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  49. package/fesm2022/ngwr-animations-reveal.mjs +3 -3
  50. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  51. package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
  52. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  53. package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
  54. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  55. package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
  56. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  57. package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
  58. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  59. package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
  60. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  61. package/fesm2022/ngwr-animations-tilt.mjs +23 -16
  62. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  63. package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
  64. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  65. package/fesm2022/ngwr-avatar.mjs +171 -6
  66. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  67. package/fesm2022/ngwr-back-top.mjs +3 -3
  68. package/fesm2022/ngwr-badge.mjs +6 -6
  69. package/fesm2022/ngwr-breadcrumbs.mjs +47 -13
  70. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  71. package/fesm2022/ngwr-burger.mjs +3 -3
  72. package/fesm2022/ngwr-button.mjs +38 -9
  73. package/fesm2022/ngwr-button.mjs.map +1 -1
  74. package/fesm2022/ngwr-calendar.mjs +3 -3
  75. package/fesm2022/ngwr-card.mjs +9 -9
  76. package/fesm2022/ngwr-carousel.mjs +14 -8
  77. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  78. package/fesm2022/ngwr-cascader.mjs +27 -7
  79. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
  81. package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
  82. package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
  83. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
  85. package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
  86. package/fesm2022/ngwr-charts-core.mjs +18 -11
  87. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
  89. package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
  90. package/fesm2022/ngwr-charts-gauge.mjs +3 -3
  91. package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
  92. package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
  93. package/fesm2022/ngwr-charts-meter-group.mjs +7 -5
  94. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  95. package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
  96. package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
  97. package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
  98. package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
  99. package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
  100. package/fesm2022/ngwr-checkbox.mjs +9 -8
  101. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  102. package/fesm2022/ngwr-clipboard.mjs +3 -3
  103. package/fesm2022/ngwr-collapse.mjs +9 -9
  104. package/fesm2022/ngwr-color-picker.mjs +27 -7
  105. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  106. package/fesm2022/ngwr-command-palette.mjs +3 -3
  107. package/fesm2022/ngwr-comment.mjs +7 -6
  108. package/fesm2022/ngwr-comment.mjs.map +1 -1
  109. package/fesm2022/ngwr-compare.mjs +3 -3
  110. package/fesm2022/ngwr-context-menu.mjs +16 -17
  111. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  112. package/fesm2022/ngwr-cookie.mjs +3 -3
  113. package/fesm2022/ngwr-copy-value.mjs +3 -3
  114. package/fesm2022/ngwr-counter.mjs +6 -6
  115. package/fesm2022/ngwr-date-picker-testing.mjs +35 -0
  116. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  117. package/fesm2022/ngwr-date-picker.mjs +151 -54
  118. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  119. package/fesm2022/ngwr-date-stamp.mjs +3 -3
  120. package/fesm2022/ngwr-date.mjs +40 -16
  121. package/fesm2022/ngwr-date.mjs.map +1 -1
  122. package/fesm2022/ngwr-density.mjs +6 -6
  123. package/fesm2022/ngwr-descriptions.mjs +6 -6
  124. package/fesm2022/ngwr-dialog.mjs +35 -24
  125. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  126. package/fesm2022/ngwr-directives.mjs +189 -23
  127. package/fesm2022/ngwr-directives.mjs.map +1 -1
  128. package/fesm2022/ngwr-divider.mjs +3 -3
  129. package/fesm2022/ngwr-drawer.mjs +18 -18
  130. package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
  131. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  132. package/fesm2022/ngwr-dropdown.mjs +59 -16
  133. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  134. package/fesm2022/ngwr-editor.mjs +6 -5
  135. package/fesm2022/ngwr-editor.mjs.map +1 -1
  136. package/fesm2022/ngwr-empty.mjs +3 -3
  137. package/fesm2022/ngwr-event-calendar.mjs +27 -15
  138. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  139. package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
  140. package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-file-upload.mjs +68 -13
  142. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  143. package/fesm2022/ngwr-form.mjs +181 -12
  144. package/fesm2022/ngwr-form.mjs.map +1 -1
  145. package/fesm2022/ngwr-graph-testing.mjs +30 -0
  146. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  147. package/fesm2022/ngwr-graph.mjs +100 -11
  148. package/fesm2022/ngwr-graph.mjs.map +1 -1
  149. package/fesm2022/ngwr-hotkey.mjs +6 -6
  150. package/fesm2022/ngwr-i18n-ar.mjs +21 -2
  151. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-cs.mjs +21 -2
  153. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-de.mjs +21 -2
  155. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-en.mjs +21 -2
  157. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-es.mjs +21 -2
  159. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-fr.mjs +21 -2
  161. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-he.mjs +21 -2
  163. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-hi.mjs +21 -2
  165. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-id.mjs +21 -2
  167. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-it.mjs +21 -2
  169. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-ja.mjs +21 -2
  171. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-kk.mjs +520 -0
  173. package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
  174. package/fesm2022/ngwr-i18n-ko.mjs +21 -2
  175. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-nl.mjs +21 -2
  177. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-pl.mjs +21 -2
  179. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-pt.mjs +21 -2
  181. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-ru.mjs +21 -2
  183. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-sv.mjs +21 -2
  185. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-tr.mjs +21 -2
  187. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-uk.mjs +21 -2
  189. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-vi.mjs +21 -2
  191. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-zh-tw.mjs +21 -2
  193. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-zh.mjs +21 -2
  195. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n.mjs +91 -20
  197. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  198. package/fesm2022/ngwr-icon.mjs +6 -6
  199. package/fesm2022/ngwr-image-cropper.mjs +8 -4
  200. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  201. package/fesm2022/ngwr-input-number.mjs +27 -4
  202. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  203. package/fesm2022/ngwr-input-otp.mjs +5 -5
  204. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  205. package/fesm2022/ngwr-input.mjs +25 -17
  206. package/fesm2022/ngwr-input.mjs.map +1 -1
  207. package/fesm2022/ngwr-keyboard.mjs +3 -3
  208. package/fesm2022/ngwr-knob.mjs +3 -3
  209. package/fesm2022/ngwr-layout.mjs +15 -15
  210. package/fesm2022/ngwr-layout.mjs.map +1 -1
  211. package/fesm2022/ngwr-lightbox.mjs +8 -8
  212. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  213. package/fesm2022/ngwr-list.mjs +9 -9
  214. package/fesm2022/ngwr-list.mjs.map +1 -1
  215. package/fesm2022/ngwr-load-state.mjs +16 -15
  216. package/fesm2022/ngwr-load-state.mjs.map +1 -1
  217. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  218. package/fesm2022/ngwr-loading-bar.mjs +8 -8
  219. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  220. package/fesm2022/ngwr-mention.mjs +14 -6
  221. package/fesm2022/ngwr-mention.mjs.map +1 -1
  222. package/fesm2022/ngwr-meta.mjs +15 -12
  223. package/fesm2022/ngwr-meta.mjs.map +1 -1
  224. package/fesm2022/ngwr-overlay.mjs +9 -9
  225. package/fesm2022/ngwr-page-header.mjs +24 -3
  226. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  227. package/fesm2022/ngwr-pagination-testing.mjs +3 -0
  228. package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
  229. package/fesm2022/ngwr-pagination.mjs +34 -5
  230. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  231. package/fesm2022/ngwr-pipes.mjs +35 -28
  232. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  233. package/fesm2022/ngwr-platform.mjs +9 -9
  234. package/fesm2022/ngwr-popconfirm.mjs +9 -7
  235. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  236. package/fesm2022/ngwr-popover.mjs +162 -18
  237. package/fesm2022/ngwr-popover.mjs.map +1 -1
  238. package/fesm2022/ngwr-progress.mjs +75 -10
  239. package/fesm2022/ngwr-progress.mjs.map +1 -1
  240. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  241. package/fesm2022/ngwr-qr.mjs +9 -5
  242. package/fesm2022/ngwr-qr.mjs.map +1 -1
  243. package/fesm2022/ngwr-radio.mjs +77 -11
  244. package/fesm2022/ngwr-radio.mjs.map +1 -1
  245. package/fesm2022/ngwr-rating.mjs +3 -3
  246. package/fesm2022/ngwr-resizable.mjs +3 -3
  247. package/fesm2022/ngwr-result.mjs +12 -12
  248. package/fesm2022/ngwr-schema-form.mjs +20 -7
  249. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  250. package/fesm2022/ngwr-scroll.mjs +233 -10
  251. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  252. package/fesm2022/ngwr-segmented.mjs +23 -3
  253. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  254. package/fesm2022/ngwr-select.mjs +106 -26
  255. package/fesm2022/ngwr-select.mjs.map +1 -1
  256. package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
  257. package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
  258. package/fesm2022/ngwr-sidebar.mjs +66 -11
  259. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  260. package/fesm2022/ngwr-skeleton.mjs +3 -3
  261. package/fesm2022/ngwr-slider.mjs +3 -3
  262. package/fesm2022/ngwr-sortable-list.mjs +27 -15
  263. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  264. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  265. package/fesm2022/ngwr-spinner.mjs +3 -3
  266. package/fesm2022/ngwr-splitter.mjs +3 -3
  267. package/fesm2022/ngwr-statistic.mjs +9 -9
  268. package/fesm2022/ngwr-stepper.mjs +6 -6
  269. package/fesm2022/ngwr-storage.mjs +4 -4
  270. package/fesm2022/ngwr-storage.mjs.map +1 -1
  271. package/fesm2022/ngwr-switch.mjs +5 -5
  272. package/fesm2022/ngwr-switch.mjs.map +1 -1
  273. package/fesm2022/ngwr-table-router.mjs +89 -0
  274. package/fesm2022/ngwr-table-router.mjs.map +1 -0
  275. package/fesm2022/ngwr-table-testing.mjs +5 -0
  276. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  277. package/fesm2022/ngwr-table.mjs +307 -47
  278. package/fesm2022/ngwr-table.mjs.map +1 -1
  279. package/fesm2022/ngwr-tabs-router.mjs +9 -5
  280. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  281. package/fesm2022/ngwr-tabs-testing.mjs +8 -1
  282. package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
  283. package/fesm2022/ngwr-tabs.mjs +60 -10
  284. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  285. package/fesm2022/ngwr-textarea.mjs +5 -5
  286. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  287. package/fesm2022/ngwr-theme.mjs +3 -3
  288. package/fesm2022/ngwr-timeline.mjs +6 -6
  289. package/fesm2022/ngwr-toast.mjs +43 -15
  290. package/fesm2022/ngwr-toast.mjs.map +1 -1
  291. package/fesm2022/ngwr-toolbar.mjs +3 -3
  292. package/fesm2022/ngwr-tour.mjs +9 -8
  293. package/fesm2022/ngwr-tour.mjs.map +1 -1
  294. package/fesm2022/ngwr-transfer.mjs +4 -3
  295. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  296. package/fesm2022/ngwr-tree.mjs +3 -3
  297. package/fesm2022/ngwr-typography.mjs +23 -3
  298. package/fesm2022/ngwr-typography.mjs.map +1 -1
  299. package/fesm2022/ngwr-utils-router.mjs +3 -3
  300. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  301. package/fesm2022/ngwr-utils.mjs +74 -4
  302. package/fesm2022/ngwr-utils.mjs.map +1 -1
  303. package/fesm2022/ngwr-validators.mjs +33 -1
  304. package/fesm2022/ngwr-validators.mjs.map +1 -1
  305. package/fesm2022/ngwr-version.mjs +1 -1
  306. package/fesm2022/ngwr-version.mjs.map +1 -1
  307. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  308. package/fesm2022/ngwr-window.mjs +18 -13
  309. package/fesm2022/ngwr-window.mjs.map +1 -1
  310. package/file-upload/styles/_index.scss +16 -0
  311. package/form/styles/_index.scss +37 -0
  312. package/graph/styles/_index.scss +49 -9
  313. package/i18n/ar.json +19 -2
  314. package/i18n/cs.json +19 -2
  315. package/i18n/de.json +19 -2
  316. package/i18n/en.json +19 -2
  317. package/i18n/es.json +19 -2
  318. package/i18n/fr.json +19 -2
  319. package/i18n/he.json +19 -2
  320. package/i18n/hi.json +19 -2
  321. package/i18n/id.json +19 -2
  322. package/i18n/it.json +19 -2
  323. package/i18n/ja.json +19 -2
  324. package/i18n/kk.json +567 -0
  325. package/i18n/ko.json +19 -2
  326. package/i18n/nl.json +19 -2
  327. package/i18n/pl.json +19 -2
  328. package/i18n/pt.json +19 -2
  329. package/i18n/ru.json +19 -2
  330. package/i18n/sv.json +19 -2
  331. package/i18n/tr.json +19 -2
  332. package/i18n/uk.json +19 -2
  333. package/i18n/vi.json +19 -2
  334. package/i18n/zh-TW.json +19 -2
  335. package/i18n/zh.json +19 -2
  336. package/image-cropper/styles/_index.scss +1 -9
  337. package/input-number/styles/_index.scss +7 -0
  338. package/layout/styles/_index.scss +13 -1
  339. package/llms-full.txt +37 -26
  340. package/llms.txt +4 -1
  341. package/loading-bar/styles/_rules.scss +6 -0
  342. package/package.json +16 -8
  343. package/page-header/styles/_index.scss +18 -0
  344. package/pagination/styles/_index.scss +6 -0
  345. package/popover/styles/_index.scss +9 -0
  346. package/progress/styles/_index.scss +64 -0
  347. package/schematics/use/symbol-map.json +7 -0
  348. package/segmented/styles/_index.scss +7 -0
  349. package/select/styles/_index.scss +7 -0
  350. package/sidebar/styles/_index.scss +64 -6
  351. package/skills/ngwr/SKILL.md +7 -6
  352. package/skills/ngwr/references/catalog.md +7 -5
  353. package/sortable-list/styles/_rules.scss +1 -9
  354. package/speed-dial/styles/_index.scss +6 -0
  355. package/stepper/styles/_index.scss +1 -9
  356. package/table/styles/_index.scss +168 -30
  357. package/tabs/styles/_index.scss +9 -0
  358. package/theme/_index.scss +12 -1
  359. package/theme/styles/_colors.scss +11 -0
  360. package/theme/styles/_contrast.scss +6 -0
  361. package/theme/styles/_focus.scss +3 -1
  362. package/theme/styles/_index.scss +1 -0
  363. package/theme/styles/_mixins.scss +45 -0
  364. package/theme/styles/_print.scss +17 -0
  365. package/toast/styles/_index.scss +7 -0
  366. package/tour/styles/_index.scss +9 -0
  367. package/tree/styles/_index.scss +1 -9
  368. package/types/ngwr-anchor.d.ts +3 -0
  369. package/types/ngwr-animations-aurora.d.ts +6 -0
  370. package/types/ngwr-animations-blur-reveal.d.ts +6 -0
  371. package/types/ngwr-animations-click-sparks.d.ts +6 -0
  372. package/types/ngwr-animations-confetti.d.ts +6 -0
  373. package/types/ngwr-animations-decode.d.ts +6 -0
  374. package/types/ngwr-animations-destruct.d.ts +6 -0
  375. package/types/ngwr-animations-dot-grid.d.ts +6 -0
  376. package/types/ngwr-animations-falling-letters.d.ts +6 -0
  377. package/types/ngwr-animations-flow-lines.d.ts +6 -0
  378. package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
  379. package/types/ngwr-animations-glitch.d.ts +6 -0
  380. package/types/ngwr-animations-glow-border.d.ts +6 -0
  381. package/types/ngwr-animations-gradient-flow.d.ts +6 -0
  382. package/types/ngwr-animations-marquee.d.ts +6 -0
  383. package/types/ngwr-animations-orbit.d.ts +6 -0
  384. package/types/ngwr-animations-reveal.d.ts +6 -0
  385. package/types/ngwr-animations-ripple-grid.d.ts +6 -0
  386. package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
  387. package/types/ngwr-animations-shimmer.d.ts +6 -0
  388. package/types/ngwr-animations-spotlight.d.ts +6 -0
  389. package/types/ngwr-animations-thread-lines.d.ts +6 -0
  390. package/types/ngwr-animations-tilt.d.ts +10 -0
  391. package/types/ngwr-animations-typewriter.d.ts +6 -0
  392. package/types/ngwr-avatar.d.ts +39 -0
  393. package/types/ngwr-breadcrumbs.d.ts +25 -0
  394. package/types/ngwr-button.d.ts +35 -3
  395. package/types/ngwr-carousel.d.ts +2 -0
  396. package/types/ngwr-cascader.d.ts +7 -0
  397. package/types/ngwr-charts-core.d.ts +16 -0
  398. package/types/ngwr-charts-meter-group.d.ts +2 -0
  399. package/types/ngwr-checkbox.d.ts +1 -0
  400. package/types/ngwr-color-picker.d.ts +1 -0
  401. package/types/ngwr-context-menu.d.ts +1 -1
  402. package/types/ngwr-date-picker-testing.d.ts +22 -0
  403. package/types/ngwr-date-picker.d.ts +97 -17
  404. package/types/ngwr-date.d.ts +51 -0
  405. package/types/ngwr-dialog.d.ts +39 -8
  406. package/types/ngwr-directives.d.ts +57 -4
  407. package/types/ngwr-drawer.d.ts +1 -1
  408. package/types/ngwr-dropdown-testing.d.ts +8 -1
  409. package/types/ngwr-dropdown.d.ts +30 -1
  410. package/types/ngwr-event-calendar.d.ts +4 -0
  411. package/types/ngwr-file-upload-testing.d.ts +10 -0
  412. package/types/ngwr-file-upload.d.ts +55 -1
  413. package/types/ngwr-form.d.ts +87 -1
  414. package/types/ngwr-graph-testing.d.ts +28 -1
  415. package/types/ngwr-graph.d.ts +53 -3
  416. package/types/ngwr-i18n-kk.d.ts +3 -0
  417. package/types/ngwr-i18n.d.ts +65 -5
  418. package/types/ngwr-image-cropper.d.ts +6 -0
  419. package/types/ngwr-input-number.d.ts +8 -0
  420. package/types/ngwr-input.d.ts +7 -0
  421. package/types/ngwr-layout.d.ts +1 -1
  422. package/types/ngwr-loading-bar-router.d.ts +6 -0
  423. package/types/ngwr-page-header.d.ts +23 -1
  424. package/types/ngwr-pagination-testing.d.ts +8 -0
  425. package/types/ngwr-pagination.d.ts +16 -0
  426. package/types/ngwr-popconfirm.d.ts +1 -1
  427. package/types/ngwr-popover.d.ts +67 -4
  428. package/types/ngwr-progress.d.ts +63 -1
  429. package/types/ngwr-radio.d.ts +47 -5
  430. package/types/ngwr-scroll.d.ts +86 -0
  431. package/types/ngwr-segmented.d.ts +7 -0
  432. package/types/ngwr-select.d.ts +88 -25
  433. package/types/ngwr-sidebar-testing.d.ts +21 -7
  434. package/types/ngwr-sidebar.d.ts +66 -4
  435. package/types/ngwr-sortable-list.d.ts +20 -7
  436. package/types/ngwr-table-router.d.ts +49 -0
  437. package/types/ngwr-table-testing.d.ts +7 -0
  438. package/types/ngwr-table.d.ts +241 -10
  439. package/types/ngwr-tabs-router.d.ts +7 -1
  440. package/types/ngwr-tabs-testing.d.ts +5 -1
  441. package/types/ngwr-tabs.d.ts +34 -1
  442. package/types/ngwr-toast.d.ts +11 -0
  443. package/types/ngwr-tour.d.ts +0 -1
  444. package/types/ngwr-typography.d.ts +7 -0
  445. package/types/ngwr-utils-router.d.ts +6 -0
  446. package/types/ngwr-utils.d.ts +69 -2
  447. package/types/ngwr-validators.d.ts +49 -1
  448. package/types/ngwr-version.d.ts +1 -1
  449. package/typography/styles/_index.scss +4 -0
  450. package/window/styles/_index.scss +1 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-file-upload-testing.mjs","names":[],"sources":["../../../projects/lib/file-upload/testing/wr-file-upload-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, type EventData, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrFileUploadSize, WrFileUploadState } from 'ngwr/file-upload';\n\nimport type { WrFileUploadHarnessFilters } from './types';\n\n/**\n * A `DataTransfer` carrying `files`.\n *\n * `FileList` has no constructor anywhere — a browser mints one only as a side\n * effect of `new DataTransfer()`, and jsdom ships neither (`new FileList()` is an\n * illegal constructor there, and the `files` IDL setter refuses anything that is\n * not the genuine article). So: the real thing where it can be had, and an\n * array-like stand-in otherwise, which is all the component ever reads — it does\n * `Array.from(files)` and nothing else.\n */\nfunction dataTransferFor(files: readonly File[]): DataTransfer {\n const Transfer = (globalThis as { DataTransfer?: new () => DataTransfer }).DataTransfer;\n\n if (Transfer) {\n try {\n const transfer = new Transfer();\n for (const file of files) transfer.items.add(file);\n return transfer;\n } catch {\n // A DataTransfer that cannot take items is no use — fall through.\n }\n }\n\n const list: Record<PropertyKey, unknown> = { ...files };\n list['length'] = files.length;\n list['item'] = (index: number): File | null => files[index] ?? null;\n list[Symbol.iterator] = function* (): Generator<File> {\n yield* files;\n };\n\n return {\n dropEffect: 'none',\n effectAllowed: 'all',\n files: list,\n items: [],\n types: files.length > 0 ? ['Files'] : [],\n } as unknown as DataTransfer;\n}\n\n/**\n * The payload `TestElement.dispatchEvent` merges onto the event it fires.\n *\n * One transfer is shared by every event of a drag, the way a real one is: the\n * component writes `dropEffect` on it during `dragover` and reads `files` back\n * out on `drop`.\n */\nfunction dragPayload(transfer: DataTransfer): Record<string, EventData> {\n return { dataTransfer: transfer } as unknown as Record<string, EventData>;\n}\n\n/** The native element behind a `TestElement`, or `null` when there is no DOM to reach. */\nfunction nativeElement(element: TestElement): Element | null {\n const candidate = (element as Partial<{ element: unknown }>).element;\n return typeof Element !== 'undefined' && candidate instanceof Element ? candidate : null;\n}\n\nfunction isFileInput(element: Element | null): element is HTMLInputElement {\n return element !== null && element.tagName === 'INPUT' && (element as HTMLInputElement).type === 'file';\n}\n\n/** Put `files` on the picker, whichever way this environment allows. */\nfunction setPickerFiles(input: HTMLInputElement, files: readonly File[]): void {\n const list = dataTransferFor(files).files;\n\n try {\n input.files = list;\n if (input.files?.length === files.length) return;\n } catch {\n // jsdom's IDL setter refuses a stand-in FileList. Shadow the accessor instead.\n }\n\n // An own data property wins over the prototype accessor, so the component still\n // reads its files off the REAL input — which matters, because the alternative\n // (forging `event.target`) would let a harness pass on a component that never\n // touches the element the user operated.\n Object.defineProperty(input, 'files', { configurable: true, value: list });\n}\n\n/**\n * Test harness for `<wr-file-upload>`.\n *\n * The control a user operates is the `.wr-file-upload__zone` — a `role=\"button\"`\n * div that is the single tab stop; the `<input type=\"file\">` behind it is\n * `aria-hidden` and `tabindex=\"-1\"`, and exists only so a click can be forwarded\n * to it. So focus, drag and disabled state are all read off the zone, plus the\n * `wr-file-upload--*` host modifiers and the rendered file list. The picker is\n * touched only where it is the one that carries the state — `accept` and\n * `multiple` land on it, and {@link selectFiles} has to hand it the files.\n *\n * What this component does NOT have, so this harness does not either:\n * - **no upload.** `<wr-file-upload>` picks files and uploading them is the app's\n * job. What the app says through `[status]` is readable, per file, with\n * {@link getFileStatus}; the percent is on the row's `wr-progress`.\n * - **no thumbnail pixels.** {@link hasPreview} says a thumbnail is in the row.\n * jsdom decodes no image, so whether it shows the file cannot be read.\n * - **no rendered error.** A file refused for its type, its size or the file count\n * leaves NOTHING in the DOM — no `aria-invalid`, no message, and a list that\n * simply did not grow. The `(rejected)` output is the only channel, so a spec\n * asserts on the host's handler. See {@link selectFiles}.\n * - **no `maxSize` / `maxFiles` readback.** Neither reaches the DOM (unlike\n * `accept` and `multiple`, which land on the picker), so they can only be\n * observed by offering a file that breaks them.\n *\n * Two traps worth knowing before writing assertions. The bound value's SHAPE\n * follows `multiple` — a bare `File` (or `null`) in single mode, a `File[]` in\n * multi — and `[showList]=\"false\"` renders no list at all, so {@link getFileNames}\n * answers `[]` for a component that is holding files. Assert the bound value in\n * that case.\n *\n * @example\n * ```ts\n * const upload = await loader.getHarness(WrFileUploadHarness.with({ label: 'Avatar' }));\n * await upload.selectFiles(new File(['…'], 'me.png', { type: 'image/png' }));\n *\n * expect(await upload.getFileNames()).toEqual(['me.png']);\n * await upload.removeFileNamed('me.png');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrFileUploadHarness extends ComponentHarness {\n static hostSelector = 'wr-file-upload';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrFileUploadHarnessFilters = {}): HarnessPredicate<WrFileUploadHarness> {\n return new HarnessPredicate(WrFileUploadHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('multiple', options.multiple, async (harness, multiple) => (await harness.isMultiple()) === multiple)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly zone = this.locatorFor('.wr-file-upload__zone');\n private readonly picker = this.locatorFor('input.wr-file-upload__picker');\n private readonly items = this.locatorForAll('.wr-file-upload__item');\n private readonly names = this.locatorForAll('.wr-file-upload__name');\n private readonly sizes = this.locatorForAll('.wr-file-upload__size');\n private readonly removeButtons = this.locatorForAll('.wr-file-upload__remove');\n\n /**\n * The accessible name of the trigger — what a screen-reader user is told this\n * control is.\n *\n * The `dropZoneLabel` override when one is set, read off `aria-label`. Otherwise\n * the text of what `aria-labelledby` points at, in order: the field's label\n * inside a `<wr-form-field>`, then the zone's visible copy. Resolved through the\n * ids rather than read off the zone's own text, because the field's label sits\n * outside the zone.\n */\n async getLabel(): Promise<string> {\n const zone = await this.zone();\n const override = await zone.getAttribute('aria-label');\n if (override) return override;\n\n const ids = ((await zone.getAttribute('aria-labelledby')) ?? '').split(/\\s+/).filter(Boolean);\n const root = this.documentRootLocatorFactory();\n const parts = await Promise.all(ids.map(async id => (await root.locatorForOptional(`[id=\"${id}\"]`)())?.text()));\n return parts\n .filter((part): part is string => !!part)\n .join(' ')\n .replace(/\\s+/g, ' ')\n .trim();\n }\n\n /** The visible call-to-action line — the `pickLabel` input. */\n async getPickText(): Promise<string> {\n return (await this.locatorFor('.wr-file-upload__hint strong')()).text();\n }\n\n /** The visible instruction below the CTA — the `dropLabel` input. */\n async getDropText(): Promise<string> {\n return (await this.locatorFor('.wr-file-upload__hint span')()).text();\n }\n\n /** The optional `helperText` line, or `null` when the component was given none. */\n async getHelperText(): Promise<string | null> {\n const helper = await this.locatorForOptional('.wr-file-upload__hint small')();\n return helper === null ? null : helper.text();\n }\n\n /** The `accept` list the picker advertises, or `null` when it accepts anything. */\n async getAccept(): Promise<string | null> {\n return (await this.picker()).getAttribute('accept');\n }\n\n /**\n * Whether more than one file can be held.\n *\n * Read as the DOM PROPERTY: the template writes the attribute as an empty string\n * (`[attr.multiple]=\"multiple() ? '' : null\"`), and `''` is falsy — an attribute\n * read would report a multi-file upload as single.\n */\n async isMultiple(): Promise<boolean> {\n return (await this.picker()).getProperty<boolean>('multiple');\n }\n\n /** The control size. `'md'` is the default and paints no modifier of its own. */\n async getSize(): Promise<WrFileUploadSize> {\n const host = await this.host();\n if (await host.hasClass('wr-file-upload--sm')) return 'sm';\n if (await host.hasClass('wr-file-upload--lg')) return 'lg';\n return 'md';\n }\n\n /**\n * Whether the control refuses interaction.\n *\n * Read from the zone's `aria-disabled`. The host also carries\n * `wr-file-upload--disabled` and the picker its own `disabled`, but the zone is\n * a `role=\"button\"` div — `aria-disabled` is the only one of the three that\n * tells a screen-reader user the trigger is inert.\n */\n async isDisabled(): Promise<boolean> {\n return (await (await this.zone()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Whether the zone is armed for a drop.\n *\n * The `wr-file-upload--dragging` host modifier is the whole signal — a drop\n * target has no ARIA state, so there is nothing better to read here.\n */\n async isDragging(): Promise<boolean> {\n return (await this.host()).hasClass('wr-file-upload--dragging');\n }\n\n /** How many files the list is RENDERING. Zero with `[showList]=\"false\"`, always. */\n async getFileCount(): Promise<number> {\n return (await this.items()).length;\n }\n\n /** The file names in the rendered list, in order. */\n async getFileNames(): Promise<string[]> {\n const names = await this.names();\n return Promise.all(names.map(name => name.text()));\n }\n\n /**\n * The file sizes in the rendered list, as SHOWN — `'4.9 KB'`, not `5000`.\n *\n * The component formats bytes for display and the byte count never reaches the\n * DOM, so this is the string a user reads. Assert the `File` itself if the exact\n * size matters.\n */\n async getFileSizes(): Promise<string[]> {\n const sizes = await this.sizes();\n return Promise.all(sizes.map(size => size.text()));\n }\n\n /**\n * Hand files to the picker, the way choosing them in the browser dialog does.\n *\n * This is the one method that reaches past `TestElement` to the native\n * `<input type=\"file\">`, and it has to: `TestElement` has no file API, and it\n * cannot grow one portably, because a `FileList` is not constructible and a\n * remote WebDriver session cannot be handed a `File` object at all. Everything\n * else on this harness is environment-agnostic; this needs a DOM behind it\n * (`TestbedHarnessEnvironment`), and says so with an error when it does not have\n * one. The input is found through this harness's own locator rather than a\n * `document` query, so it is still THIS component's picker that gets the files.\n *\n * Rejected files are silent: nothing appears in the DOM, so pair this with the\n * host's `(rejected)` handler when a file is meant to be refused. In single mode\n * the LAST accepted file wins, which is also how a drop of several files onto a\n * single-file zone behaves.\n *\n * @throws if called with no files, on a disabled upload, or outside a DOM\n * environment.\n */\n async selectFiles(...files: File[]): Promise<void> {\n if (files.length === 0) {\n throw new Error(\n 'WrFileUploadHarness.selectFiles(): pass at least one file. Cancelling the browser dialog fires no ' +\n '`change` at all, so \"picked nothing\" is not a state a user can put the component in.'\n );\n }\n\n if (await this.isDisabled()) {\n // The component guards its drop handler but not its `change` handler — it\n // does not need to, since a disabled `<input type=\"file\">` cannot be\n // operated. Forcing the event through anyway would smuggle a file past the\n // disabled state and leave a consumer's spec proving something no user can do.\n throw new Error(\n 'WrFileUploadHarness.selectFiles(): the upload is disabled, and a disabled picker cannot be opened. ' +\n 'Enable it first, or use dropFiles() to assert that a disabled zone refuses what is dropped on it.'\n );\n }\n\n const picker = await this.picker();\n const input = nativeElement(picker);\n\n if (!isFileInput(input)) {\n throw new Error(\n 'WrFileUploadHarness.selectFiles(): no DOM element behind the harness. Files can only be handed to a ' +\n 'real <input type=\"file\">, so this method needs TestbedHarnessEnvironment; a remote WebDriver ' +\n 'environment cannot carry a File across. Every other method on this harness works in both.'\n );\n }\n\n setPickerFiles(input, files);\n await picker.dispatchEvent('change');\n }\n\n /**\n * Drag files over the zone and drop them.\n *\n * Driven by dispatching the drag sequence AT the zone rather than by coordinates:\n * nothing has layout in a unit test — `getBoundingClientRect` is all zeros — so a\n * pointer-driven drag would land nowhere. From the component's side it is the\n * same event either way; it reads `dataTransfer.files` and never a position.\n *\n * A disabled upload refuses the drop itself, so this stays a no-op there rather\n * than throwing the way {@link selectFiles} does — that refusal is the\n * component's own, and worth asserting.\n */\n async dropFiles(...files: File[]): Promise<void> {\n const zone = await this.zone();\n const payload = dragPayload(dataTransferFor(files));\n\n await zone.dispatchEvent('dragenter', payload);\n await zone.dispatchEvent('dragover', payload);\n await zone.dispatchEvent('drop', payload);\n }\n\n /** Drag over the zone without letting go — arms {@link isDragging}. */\n async dragOver(): Promise<void> {\n const zone = await this.zone();\n const payload = dragPayload(dataTransferFor([]));\n\n await zone.dispatchEvent('dragenter', payload);\n await zone.dispatchEvent('dragover', payload);\n }\n\n /**\n * Drag back out of the zone, disarming {@link isDragging}.\n *\n * Dispatched at the zone itself on purpose: the component ignores a `dragleave`\n * whose target is one of the zone's children, because crossing the icon or the\n * hint text is not leaving the zone.\n */\n async dragLeave(): Promise<void> {\n await (await this.zone()).dispatchEvent('dragleave');\n }\n\n /**\n * Remove the file at `index` from the rendered list.\n *\n * On a disabled upload the remove buttons are disabled too, so this is a no-op\n * there — assert the result rather than assuming it.\n */\n async removeFile(index: number): Promise<void> {\n const buttons = await this.removeButtons();\n\n if (index < 0 || index >= buttons.length) {\n throw new Error(\n `WrFileUploadHarness.removeFile(${index}): the rendered list holds ${buttons.length} file(s). ` +\n 'With [showList]=\"false\" it holds none no matter what is selected.'\n );\n }\n\n await buttons[index].click();\n }\n\n /** Remove the file with this name. Names come from {@link getFileNames}. */\n async removeFileNamed(name: string): Promise<void> {\n await this.removeFile(await this.indexNamed('removeFileNamed', name));\n }\n\n /**\n * The upload state the app set for this file through `[status]`: `'pending'`,\n * `'uploading'`, `'done'` or `'error'`, or `null` for a file with no entry.\n *\n * Read off the row's `wr-file-upload__item--<state>` modifier, the one place\n * every state leaves a mark: `pending` draws no part of its own.\n */\n async getFileStatus(name: string): Promise<WrFileUploadState | null> {\n const row = await this.rowNamed('getFileStatus', name);\n for (const state of ['pending', 'uploading', 'done', 'error'] as const) {\n if (await row.hasClass(`wr-file-upload__item--${state}`)) return state;\n }\n return null;\n }\n\n /**\n * Press the retry button of this file's row, which emits `(retry)` with the file.\n *\n * @throws if the file is not in the `error` state: only a failed row has the button.\n */\n async retry(name: string): Promise<void> {\n const index = await this.indexNamed('retry', name);\n const button = await this.locatorForOptional(\n `.wr-file-upload__item:nth-child(${index + 1}) .wr-file-upload__retry`\n )();\n\n if (button === null) {\n throw new Error(\n `WrFileUploadHarness.retry(${JSON.stringify(name)}): the row has no retry button. Only a file whose ` +\n `status is 'error' has one; this one is ${JSON.stringify(await this.getFileStatus(name))}.`\n );\n }\n\n await button.click();\n }\n\n /**\n * Whether this file's row shows a thumbnail: `[previews]` is on and the file\n * is an image. jsdom has no `URL.createObjectURL`, so a spec that expects\n * `true` has to stub it.\n */\n async hasPreview(name: string): Promise<boolean> {\n const index = await this.indexNamed('hasPreview', name);\n const image = await this.locatorForOptional(\n `.wr-file-upload__item:nth-child(${index + 1}) img.wr-file-upload__preview`\n )();\n return image !== null;\n }\n\n /** Index of the row with this name, or a throw that says what the list holds. */\n private async indexNamed(method: string, name: string): Promise<number> {\n const names = await this.getFileNames();\n const index = names.indexOf(name);\n\n if (index === -1) {\n const holding = names.length > 0 ? names.map(n => JSON.stringify(n)).join(', ') : 'no files';\n throw new Error(`WrFileUploadHarness.${method}(${JSON.stringify(name)}): the rendered list holds ${holding}.`);\n }\n\n return index;\n }\n\n private async rowNamed(method: string, name: string): Promise<TestElement> {\n return (await this.items())[await this.indexNamed(method, name)];\n }\n\n /** Move keyboard focus to the zone — the control's only tab stop. */\n async focus(): Promise<void> {\n return (await this.zone()).focus();\n }\n\n /** Whether the zone has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.zone()).isFocused();\n }\n}\n"],"mappings":";;;;;;;AAuBA,SAAS,gBAAgB,OAAsB;CAC7C,MAAM,WAAY,WAAyD;CAE3E,IAAI,UACF,IAAI;EACF,MAAM,WAAW,IAAI,SAAQ;EAC7B,KAAK,MAAM,QAAQ,OAAO,SAAS,MAAM,IAAI,IAAI;EACjD,OAAO;CACT,QAAQ,CAER;CAGF,MAAM,OAAqC,EAAE,GAAG,MAAK;CACrD,KAAK,YAAY,MAAM;CACvB,KAAK,WAAW,UAA+B,MAAM,UAAU;CAC/D,KAAK,OAAO,YAAY,aAAS;EAC/B,OAAO;CACT;CAEA,OAAO;EACL,YAAY;EACZ,eAAe;EACf,OAAO;EACP,OAAO,CAAA;EACP,OAAO,MAAM,SAAS,IAAI,CAAC,OAAO,IAAI,CAAA;CACZ;AAC9B;AASA,SAAS,YAAY,UAAsB;CACzC,OAAO,EAAE,cAAc,SAAQ;AACjC;AAGA,SAAS,cAAc,SAAoB;CACzC,MAAM,YAAa,QAA0C;CAC7D,OAAO,OAAO,YAAY,eAAe,qBAAqB,UAAU,YAAY;AACtF;AAEA,SAAS,YAAY,SAAuB;CAC1C,OAAO,YAAY,QAAQ,QAAQ,YAAY,WAAY,QAA6B,SAAS;AACnG;AAGA,SAAS,eAAe,OAAyB,OAAsB;CACrE,MAAM,OAAO,gBAAgB,KAAK,CAAC,CAAC;CAEpC,IAAI;EACF,MAAM,QAAQ;EACd,IAAI,MAAM,OAAO,WAAW,MAAM,QAAQ;CAC5C,QAAQ,CAER;CAMA,OAAO,eAAe,OAAO,SAAS;EAAE,cAAc;E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tB,MAAM,QAAQ,MAAM,KAAK,WAAW,SAAS,IAAI;EACjD,MAAM,SAAS,MAAM,KAAK,mBACxB,mCAAmC,QAAQ,EAAC,yBAA0B,CACvE,CAAA;EAED,IAAI,WAAW,MACb,MAAM,IAAI,MACR,6BAA6B,KAAK,UAAU,IAAI,EAAC,2FACL,KAAK,UAAU,MAAM,KAAK,cAAc,IAAI,CAAC,EAAC,EAAG;EAIjG,MAAM,OAAO,MAAK;CACpB;CAOA,MAAM,WAAW,MAAY;EAC3B,MAAM,QAAQ,MAAM,KAAK,WAAW,cAAc,IAAI;EAItD,OAAO,MAHa,KAAK,mBACvB,mCAAmC,QAAQ,EAAC,8BAA+B,CAC5E,CAAA,MACgB;CACnB;CAGQ,MAAM,WAAW,QAAgB,MAAY;EACnD,MAAM,QAAQ,MAAM,KAAK,aAAY;EACrC,MAAM,QAAQ,MAAM,QAAQ,IAAI;EAEhC,IAAI,UAAU,IAAI;GAChB,MAAM,UAAU,MAAM,SAAS,IAAI,MAAM,KAAI,MAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI;GAClF,MAAM,IAAI,MAAM,uBAAuB,OAAM,GAAI,KAAK,UAAU,IAAI,EAAC,6BAA8B,QAAO,EAAG;EAC/G;EAEA,OAAO;CACT;CAEQ,MAAM,SAAS,QAAgB,MAAY;EACjD,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,MAAM,KAAK,WAAW,QAAQ,IAAI;CAChE;CAGA,MAAM,QAAK;EACT,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,MAAK;CAClC;CAGA,MAAM,YAAS;EACb,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,UAAS;CACtC"}
1
+ {"version":3,"file":"ngwr-file-upload-testing.mjs","names":[],"sources":["../../../projects/lib/file-upload/testing/wr-file-upload-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, type EventData, HarnessPredicate, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrFileUploadSize, WrFileUploadState } from 'ngwr/file-upload';\n\nimport type { WrFileUploadHarnessFilters } from './types';\n\n/**\n * A `DataTransfer` carrying `files`.\n *\n * `FileList` has no constructor anywhere — a browser mints one only as a side\n * effect of `new DataTransfer()`, and jsdom ships neither (`new FileList()` is an\n * illegal constructor there, and the `files` IDL setter refuses anything that is\n * not the genuine article). So: the real thing where it can be had, and an\n * array-like stand-in otherwise, which is all the component ever reads — it does\n * `Array.from(files)` and nothing else.\n */\nfunction dataTransferFor(files: readonly File[]): DataTransfer {\n const Transfer = (globalThis as { DataTransfer?: new () => DataTransfer }).DataTransfer;\n\n if (Transfer) {\n try {\n const transfer = new Transfer();\n for (const file of files) transfer.items.add(file);\n return transfer;\n } catch {\n // A DataTransfer that cannot take items is no use — fall through.\n }\n }\n\n const list: Record<PropertyKey, unknown> = { ...files };\n list['length'] = files.length;\n list['item'] = (index: number): File | null => files[index] ?? null;\n list[Symbol.iterator] = function* (): Generator<File> {\n yield* files;\n };\n\n return {\n dropEffect: 'none',\n effectAllowed: 'all',\n files: list,\n items: [],\n types: files.length > 0 ? ['Files'] : [],\n } as unknown as DataTransfer;\n}\n\n/**\n * The payload `TestElement.dispatchEvent` merges onto the event it fires.\n *\n * One transfer is shared by every event of a drag, the way a real one is: the\n * component writes `dropEffect` on it during `dragover` and reads `files` back\n * out on `drop`.\n */\nfunction dragPayload(transfer: DataTransfer): Record<string, EventData> {\n return { dataTransfer: transfer } as unknown as Record<string, EventData>;\n}\n\n/** The native element behind a `TestElement`, or `null` when there is no DOM to reach. */\nfunction nativeElement(element: TestElement): Element | null {\n const candidate = (element as Partial<{ element: unknown }>).element;\n return typeof Element !== 'undefined' && candidate instanceof Element ? candidate : null;\n}\n\nfunction isFileInput(element: Element | null): element is HTMLInputElement {\n return element !== null && element.tagName === 'INPUT' && (element as HTMLInputElement).type === 'file';\n}\n\n/** Put `files` on the picker, whichever way this environment allows. */\nfunction setPickerFiles(input: HTMLInputElement, files: readonly File[]): void {\n const list = dataTransferFor(files).files;\n\n try {\n input.files = list;\n if (input.files?.length === files.length) return;\n } catch {\n // jsdom's IDL setter refuses a stand-in FileList. Shadow the accessor instead.\n }\n\n // An own data property wins over the prototype accessor, so the component still\n // reads its files off the REAL input — which matters, because the alternative\n // (forging `event.target`) would let a harness pass on a component that never\n // touches the element the user operated.\n Object.defineProperty(input, 'files', { configurable: true, value: list });\n}\n\n/**\n * Test harness for `<wr-file-upload>`.\n *\n * Stored files (`[stored]`) are rows like any other: they count in\n * {@link getFileCount}, {@link getFileNames} and {@link getFileSizes}, come first,\n * and {@link removeFile} / {@link removeFileNamed} press their remove button, which\n * emits `(storedRemove)` rather than changing the bound value.\n *\n * The control a user operates is the `.wr-file-upload__zone` — a `role=\"button\"`\n * div that is the single tab stop; the `<input type=\"file\">` behind it is\n * `aria-hidden` and `tabindex=\"-1\"`, and exists only so a click can be forwarded\n * to it. So focus, drag and disabled state are all read off the zone, plus the\n * `wr-file-upload--*` host modifiers and the rendered file list. The picker is\n * touched only where it is the one that carries the state — `accept` and\n * `multiple` land on it, and {@link selectFiles} has to hand it the files.\n *\n * What this component does NOT have, so this harness does not either:\n * - **no upload.** `<wr-file-upload>` picks files and uploading them is the app's\n * job. What the app says through `[status]` is readable, per file, with\n * {@link getFileStatus}; the percent is on the row's `wr-progress`.\n * - **no thumbnail pixels.** {@link hasPreview} says a thumbnail is in the row.\n * jsdom decodes no image, so whether it shows the file cannot be read.\n * - **no rendered error.** A file refused for its type, its size or the file count\n * leaves NOTHING in the DOM — no `aria-invalid`, no message, and a list that\n * simply did not grow. The `(rejected)` output is the only channel, so a spec\n * asserts on the host's handler. See {@link selectFiles}.\n * - **no `maxSize` / `maxFiles` readback.** Neither reaches the DOM (unlike\n * `accept` and `multiple`, which land on the picker), so they can only be\n * observed by offering a file that breaks them.\n *\n * Two traps worth knowing before writing assertions. The bound value's SHAPE\n * follows `multiple` — a bare `File` (or `null`) in single mode, a `File[]` in\n * multi — and `[showList]=\"false\"` renders no list at all, so {@link getFileNames}\n * answers `[]` for a component that is holding files. Assert the bound value in\n * that case.\n *\n * @example\n * ```ts\n * const upload = await loader.getHarness(WrFileUploadHarness.with({ label: 'Avatar' }));\n * await upload.selectFiles(new File(['…'], 'me.png', { type: 'image/png' }));\n *\n * expect(await upload.getFileNames()).toEqual(['me.png']);\n * await upload.removeFileNamed('me.png');\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrFileUploadHarness extends ComponentHarness {\n static hostSelector = 'wr-file-upload';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrFileUploadHarnessFilters = {}): HarnessPredicate<WrFileUploadHarness> {\n return new HarnessPredicate(WrFileUploadHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('multiple', options.multiple, async (harness, multiple) => (await harness.isMultiple()) === multiple)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly zone = this.locatorFor('.wr-file-upload__zone');\n private readonly picker = this.locatorFor('input.wr-file-upload__picker');\n private readonly items = this.locatorForAll('.wr-file-upload__item');\n private readonly names = this.locatorForAll('.wr-file-upload__name');\n private readonly sizes = this.locatorForAll('.wr-file-upload__size');\n private readonly removeButtons = this.locatorForAll('.wr-file-upload__remove');\n\n /**\n * The accessible name of the trigger — what a screen-reader user is told this\n * control is.\n *\n * The `dropZoneLabel` override when one is set, read off `aria-label`. Otherwise\n * the text of what `aria-labelledby` points at, in order: the field's label\n * inside a `<wr-form-field>`, then the zone's visible copy. Resolved through the\n * ids rather than read off the zone's own text, because the field's label sits\n * outside the zone.\n */\n async getLabel(): Promise<string> {\n const zone = await this.zone();\n const override = await zone.getAttribute('aria-label');\n if (override) return override;\n\n const ids = ((await zone.getAttribute('aria-labelledby')) ?? '').split(/\\s+/).filter(Boolean);\n const root = this.documentRootLocatorFactory();\n const parts = await Promise.all(ids.map(async id => (await root.locatorForOptional(`[id=\"${id}\"]`)())?.text()));\n return parts\n .filter((part): part is string => !!part)\n .join(' ')\n .replace(/\\s+/g, ' ')\n .trim();\n }\n\n /** The visible call-to-action line — the `pickLabel` input. */\n async getPickText(): Promise<string> {\n return (await this.locatorFor('.wr-file-upload__hint strong')()).text();\n }\n\n /** The visible instruction below the CTA — the `dropLabel` input. */\n async getDropText(): Promise<string> {\n return (await this.locatorFor('.wr-file-upload__hint span')()).text();\n }\n\n /** The optional `helperText` line, or `null` when the component was given none. */\n async getHelperText(): Promise<string | null> {\n const helper = await this.locatorForOptional('.wr-file-upload__hint small')();\n return helper === null ? null : helper.text();\n }\n\n /** The `accept` list the picker advertises, or `null` when it accepts anything. */\n async getAccept(): Promise<string | null> {\n return (await this.picker()).getAttribute('accept');\n }\n\n /**\n * Whether more than one file can be held.\n *\n * Read as the DOM PROPERTY: the template writes the attribute as an empty string\n * (`[attr.multiple]=\"multiple() ? '' : null\"`), and `''` is falsy — an attribute\n * read would report a multi-file upload as single.\n */\n async isMultiple(): Promise<boolean> {\n return (await this.picker()).getProperty<boolean>('multiple');\n }\n\n /** The control size. `'md'` is the default and paints no modifier of its own. */\n async getSize(): Promise<WrFileUploadSize> {\n const host = await this.host();\n if (await host.hasClass('wr-file-upload--sm')) return 'sm';\n if (await host.hasClass('wr-file-upload--lg')) return 'lg';\n return 'md';\n }\n\n /**\n * Whether the control refuses interaction.\n *\n * Read from the zone's `aria-disabled`. The host also carries\n * `wr-file-upload--disabled` and the picker its own `disabled`, but the zone is\n * a `role=\"button\"` div — `aria-disabled` is the only one of the three that\n * tells a screen-reader user the trigger is inert.\n */\n async isDisabled(): Promise<boolean> {\n return (await (await this.zone()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Whether the zone is armed for a drop.\n *\n * The `wr-file-upload--dragging` host modifier is the whole signal — a drop\n * target has no ARIA state, so there is nothing better to read here.\n */\n async isDragging(): Promise<boolean> {\n return (await this.host()).hasClass('wr-file-upload--dragging');\n }\n\n /** How many files the list is RENDERING. Zero with `[showList]=\"false\"`, always. */\n async getFileCount(): Promise<number> {\n return (await this.items()).length;\n }\n\n /** The file names in the rendered list, in order. */\n async getFileNames(): Promise<string[]> {\n const names = await this.names();\n return Promise.all(names.map(name => name.text()));\n }\n\n /**\n * The file sizes in the rendered list, as SHOWN — `'4.9 KB'`, not `5000`.\n *\n * The component formats bytes for display and the byte count never reaches the\n * DOM, so this is the string a user reads. Assert the `File` itself if the exact\n * size matters.\n */\n async getFileSizes(): Promise<string[]> {\n const sizes = await this.sizes();\n return Promise.all(sizes.map(size => size.text()));\n }\n\n /**\n * Hand files to the picker, the way choosing them in the browser dialog does.\n *\n * This is the one method that reaches past `TestElement` to the native\n * `<input type=\"file\">`, and it has to: `TestElement` has no file API, and it\n * cannot grow one portably, because a `FileList` is not constructible and a\n * remote WebDriver session cannot be handed a `File` object at all. Everything\n * else on this harness is environment-agnostic; this needs a DOM behind it\n * (`TestbedHarnessEnvironment`), and says so with an error when it does not have\n * one. The input is found through this harness's own locator rather than a\n * `document` query, so it is still THIS component's picker that gets the files.\n *\n * Rejected files are silent: nothing appears in the DOM, so pair this with the\n * host's `(rejected)` handler when a file is meant to be refused. In single mode\n * the LAST accepted file wins, which is also how a drop of several files onto a\n * single-file zone behaves.\n *\n * @throws if called with no files, on a disabled upload, or outside a DOM\n * environment.\n */\n async selectFiles(...files: File[]): Promise<void> {\n if (files.length === 0) {\n throw new Error(\n 'WrFileUploadHarness.selectFiles(): pass at least one file. Cancelling the browser dialog fires no ' +\n '`change` at all, so \"picked nothing\" is not a state a user can put the component in.'\n );\n }\n\n if (await this.isDisabled()) {\n // The component guards its drop handler but not its `change` handler — it\n // does not need to, since a disabled `<input type=\"file\">` cannot be\n // operated. Forcing the event through anyway would smuggle a file past the\n // disabled state and leave a consumer's spec proving something no user can do.\n throw new Error(\n 'WrFileUploadHarness.selectFiles(): the upload is disabled, and a disabled picker cannot be opened. ' +\n 'Enable it first, or use dropFiles() to assert that a disabled zone refuses what is dropped on it.'\n );\n }\n\n const picker = await this.picker();\n const input = nativeElement(picker);\n\n if (!isFileInput(input)) {\n throw new Error(\n 'WrFileUploadHarness.selectFiles(): no DOM element behind the harness. Files can only be handed to a ' +\n 'real <input type=\"file\">, so this method needs TestbedHarnessEnvironment; a remote WebDriver ' +\n 'environment cannot carry a File across. Every other method on this harness works in both.'\n );\n }\n\n setPickerFiles(input, files);\n await picker.dispatchEvent('change');\n }\n\n /**\n * Drag files over the zone and drop them.\n *\n * Driven by dispatching the drag sequence AT the zone rather than by coordinates:\n * nothing has layout in a unit test — `getBoundingClientRect` is all zeros — so a\n * pointer-driven drag would land nowhere. From the component's side it is the\n * same event either way; it reads `dataTransfer.files` and never a position.\n *\n * A disabled upload refuses the drop itself, so this stays a no-op there rather\n * than throwing the way {@link selectFiles} does — that refusal is the\n * component's own, and worth asserting.\n */\n async dropFiles(...files: File[]): Promise<void> {\n const zone = await this.zone();\n const payload = dragPayload(dataTransferFor(files));\n\n await zone.dispatchEvent('dragenter', payload);\n await zone.dispatchEvent('dragover', payload);\n await zone.dispatchEvent('drop', payload);\n }\n\n /** Drag over the zone without letting go — arms {@link isDragging}. */\n async dragOver(): Promise<void> {\n const zone = await this.zone();\n const payload = dragPayload(dataTransferFor([]));\n\n await zone.dispatchEvent('dragenter', payload);\n await zone.dispatchEvent('dragover', payload);\n }\n\n /**\n * Drag back out of the zone, disarming {@link isDragging}.\n *\n * Dispatched at the zone itself on purpose: the component ignores a `dragleave`\n * whose target is one of the zone's children, because crossing the icon or the\n * hint text is not leaving the zone.\n */\n async dragLeave(): Promise<void> {\n await (await this.zone()).dispatchEvent('dragleave');\n }\n\n /**\n * Remove the file at `index` from the rendered list.\n *\n * On a disabled upload the remove buttons are disabled too, so this is a no-op\n * there — assert the result rather than assuming it.\n */\n async removeFile(index: number): Promise<void> {\n const buttons = await this.removeButtons();\n\n if (index < 0 || index >= buttons.length) {\n throw new Error(\n `WrFileUploadHarness.removeFile(${index}): the rendered list holds ${buttons.length} file(s). ` +\n 'With [showList]=\"false\" it holds none no matter what is selected.'\n );\n }\n\n await buttons[index].click();\n }\n\n /** Remove the file with this name. Names come from {@link getFileNames}. */\n async removeFileNamed(name: string): Promise<void> {\n await this.removeFile(await this.indexNamed('removeFileNamed', name));\n }\n\n /**\n * The upload state the app set for this file through `[status]`: `'pending'`,\n * `'uploading'`, `'done'` or `'error'`, or `null` for a file with no entry.\n *\n * Read off the row's `wr-file-upload__item--<state>` modifier, the one place\n * every state leaves a mark: `pending` draws no part of its own.\n */\n async getFileStatus(name: string): Promise<WrFileUploadState | null> {\n const row = await this.rowNamed('getFileStatus', name);\n for (const state of ['pending', 'uploading', 'done', 'error'] as const) {\n if (await row.hasClass(`wr-file-upload__item--${state}`)) return state;\n }\n return null;\n }\n\n /**\n * Press the retry button of this file's row, which emits `(retry)` with the file.\n *\n * @throws if the file is not in the `error` state: only a failed row has the button.\n */\n async retry(name: string): Promise<void> {\n const index = await this.indexNamed('retry', name);\n const button = await this.locatorForOptional(\n `.wr-file-upload__item:nth-child(${index + 1}) .wr-file-upload__retry`\n )();\n\n if (button === null) {\n throw new Error(\n `WrFileUploadHarness.retry(${JSON.stringify(name)}): the row has no retry button. Only a file whose ` +\n `status is 'error' has one; this one is ${JSON.stringify(await this.getFileStatus(name))}.`\n );\n }\n\n await button.click();\n }\n\n /**\n * Whether this file's row shows a thumbnail: `[previews]` is on and the file\n * is an image. jsdom has no `URL.createObjectURL`, so a spec that expects\n * `true` has to stub it.\n */\n async hasPreview(name: string): Promise<boolean> {\n const index = await this.indexNamed('hasPreview', name);\n const image = await this.locatorForOptional(\n `.wr-file-upload__item:nth-child(${index + 1}) img.wr-file-upload__preview`\n )();\n return image !== null;\n }\n\n /**\n * The `href` of this row's link, or `null` for a row whose name is plain text.\n * Only a stored file (`[stored]`) with a `url` has one.\n */\n async getLink(name: string): Promise<string | null> {\n const index = await this.indexNamed('getLink', name);\n const link = await this.locatorForOptional(\n `.wr-file-upload__item:nth-child(${index + 1}) a.wr-file-upload__link`\n )();\n return link === null ? null : link.getAttribute('href');\n }\n\n /** Index of the row with this name, or a throw that says what the list holds. */\n private async indexNamed(method: string, name: string): Promise<number> {\n const names = await this.getFileNames();\n const index = names.indexOf(name);\n\n if (index === -1) {\n const holding = names.length > 0 ? names.map(n => JSON.stringify(n)).join(', ') : 'no files';\n throw new Error(`WrFileUploadHarness.${method}(${JSON.stringify(name)}): the rendered list holds ${holding}.`);\n }\n\n return index;\n }\n\n private async rowNamed(method: string, name: string): Promise<TestElement> {\n return (await this.items())[await this.indexNamed(method, name)];\n }\n\n /** Move keyboard focus to the zone — the control's only tab stop. */\n async focus(): Promise<void> {\n return (await this.zone()).focus();\n }\n\n /** Whether the zone has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.zone()).isFocused();\n }\n}\n"],"mappings":";;;;;;;AAuBA,SAAS,gBAAgB,OAAsB;CAC7C,MAAM,WAAY,WAAyD;CAE3E,IAAI,UACF,IAAI;EACF,MAAM,WAAW,IAAI,SAAQ;EAC7B,KAAK,MAAM,QAAQ,OAAO,SAAS,MAAM,IAAI,IAAI;EACjD,OAAO;CACT,QAAQ,CAER;CAGF,MAAM,OAAqC,EAAE,GAAG,MAAK;CACrD,KAAK,YAAY,MAAM;CACvB,KAAK,WAAW,UAA+B,MAAM,UAAU;CAC/D,KAAK,OAAO,YAAY,aAAS;EAC/B,OAAO;CACT;CAEA,OAAO;EACL,YAAY;EACZ,eAAe;EACf,OAAO;EACP,OAAO,CAAA;EACP,OAAO,MAAM,SAAS,IAAI,CAAC,OAAO,IAAI,CAAA;CACZ;AAC9B;AASA,SAAS,YAAY,UAAsB;CACzC,OAAO,EAAE,cAAc,SAAQ;AACjC;AAGA,SAAS,cAAc,SAAoB;CACzC,MAAM,YAAa,QAA0C;CAC7D,OAAO,OAAO,YAAY,eAAe,qBAAqB,UAA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I,MAAM,uBAAuB,OAAM,GAAI,KAAK,UAAU,IAAI,EAAC,6BAA8B,QAAO,EAAG;EAC/G;EAEA,OAAO;CACT;CAEQ,MAAM,SAAS,QAAgB,MAAY;EACjD,QAAQ,MAAM,KAAK,MAAK,EAAA,CAAI,MAAM,KAAK,WAAW,QAAQ,IAAI;CAChE;CAGA,MAAM,QAAK;EACT,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,MAAK;CAClC;CAGA,MAAM,YAAS;EACb,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,UAAS;CACtC"}
@@ -53,6 +53,7 @@ var WrFileUpload = class WrFileUpload {
53
53
  transform: coerceBooleanProperty
54
54
  });
55
55
  status = input(null, ...ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []);
56
+ stored = input([], ...ngDevMode ? [{ debugName: "stored" }] : /* istanbul ignore next */ []);
56
57
  previews = input(false, {
57
58
  ...ngDevMode ? { debugName: "previews" } : /* istanbul ignore next */ {},
58
59
  transform: coerceBooleanProperty
@@ -83,6 +84,7 @@ var WrFileUpload = class WrFileUpload {
83
84
  const given = this.removeFileLabel();
84
85
  return given ? given.replace(/\{\{\s*name\s*\}\}/g, () => name) : this.removeText({ name });
85
86
  }
87
+ openText = useI18nFormatter("fileUpload.openFile", "{{name}} (opens in a new tab)");
86
88
  resolvedRetry = useI18nText(this.retryLabel, "fileUpload.retry", "Try again");
87
89
  resolvedUploading = useI18nText(this.uploadingLabel, "fileUpload.uploading", "Uploading");
88
90
  resolvedUploaded = useI18nText(this.uploadedLabel, "fileUpload.uploaded", "Uploaded");
@@ -91,6 +93,7 @@ var WrFileUpload = class WrFileUpload {
91
93
  helperText = input("", ...ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []);
92
94
  value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
93
95
  rejected = output();
96
+ storedRemove = output();
94
97
  retry = output();
95
98
  touch = output();
96
99
  picker = viewChild.required("picker", ...ngDevMode ? [{ debugName: "picker" }] : /* istanbul ignore next */ []);
@@ -120,6 +123,11 @@ var WrFileUpload = class WrFileUpload {
120
123
  };
121
124
  });
122
125
  }, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
126
+ storedRows = computed(() => this.stored().map((stored) => ({
127
+ stored,
128
+ url: stored.url ?? null,
129
+ size: typeof stored.size === "number" && Number.isFinite(stored.size) && stored.size >= 0 ? stored.size : null
130
+ })), ...ngDevMode ? [{ debugName: "storedRows" }] : /* istanbul ignore next */ []);
123
131
  busy = computed(() => this.rows().some((row) => row.state === "uploading"), ...ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []);
124
132
  announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
125
133
  lastStates = null;
@@ -137,7 +145,7 @@ var WrFileUpload = class WrFileUpload {
137
145
  value: this.number(0, 0),
138
146
  unit: this.unitTexts[0]()
139
147
  });
140
- const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), this.unitTexts.length - 1);
148
+ const i = Math.max(0, Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), this.unitTexts.length - 1));
141
149
  const v = bytes / 1024 ** i;
142
150
  const digits = v >= 100 || i === 0 ? 0 : 1;
143
151
  return this.sizeText({
@@ -162,6 +170,13 @@ var WrFileUpload = class WrFileUpload {
162
170
  }
163
171
  constructor() {
164
172
  if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("file-upload");
173
+ effect(() => {
174
+ const stored = this.stored();
175
+ const pending = this.focusAfterStored;
176
+ if (!pending || stored.includes(pending.stored)) return;
177
+ this.focusAfterStored = null;
178
+ untracked(() => this.focusRemoveNear(() => pending.index, true));
179
+ });
165
180
  effect(() => {
166
181
  const v = this.value();
167
182
  untracked(() => {
@@ -237,7 +252,28 @@ var WrFileUpload = class WrFileUpload {
237
252
  if (!hadFocus) return;
238
253
  afterNextRender(() => {
239
254
  if (button?.isConnected) return;
240
- this.host.nativeElement.querySelectorAll(".wr-file-upload__remove")[index]?.focus();
255
+ this.host.nativeElement.querySelectorAll(".wr-file-upload__remove")[this.stored().length + index]?.focus();
256
+ }, { injector: this.injector });
257
+ }
258
+ removeStored(row, index) {
259
+ if (this.disabled() || this.readonly()) return;
260
+ const focused = this.host.nativeElement.ownerDocument.activeElement;
261
+ const hadFocus = !!focused?.matches(".wr-file-upload__remove") && this.host.nativeElement.contains(focused);
262
+ this.focusAfterStored = hadFocus ? {
263
+ stored: row.stored,
264
+ index
265
+ } : null;
266
+ this.storedRemove.emit(row.stored);
267
+ }
268
+ focusAfterStored = null;
269
+ focusRemoveNear(at, onlyIfLost = false) {
270
+ afterNextRender(() => {
271
+ const doc = this.host.nativeElement.ownerDocument;
272
+ const active = doc.activeElement;
273
+ if (onlyIfLost && active && active !== doc.body) return;
274
+ const index = at();
275
+ const buttons = this.host.nativeElement.querySelectorAll(".wr-file-upload__remove");
276
+ (buttons[Math.min(index, buttons.length - 1)] ?? this.zone().nativeElement).focus();
241
277
  }, { injector: this.injector });
242
278
  }
243
279
  removeAt(index) {
@@ -248,10 +284,7 @@ var WrFileUpload = class WrFileUpload {
248
284
  this.files.set(next);
249
285
  this.emit();
250
286
  if (!hadFocus) return;
251
- afterNextRender(() => {
252
- const buttons = this.host.nativeElement.querySelectorAll(".wr-file-upload__remove");
253
- (buttons[Math.min(index, buttons.length - 1)] ?? this.zone().nativeElement).focus();
254
- }, { injector: this.injector });
287
+ this.focusRemoveNear(() => this.stored().length + index);
255
288
  }
256
289
  acceptFiles(incoming) {
257
290
  if (this.disabled() || this.readonly()) return;
@@ -271,7 +304,7 @@ var WrFileUpload = class WrFileUpload {
271
304
  if (this.multiple()) {
272
305
  const listed = this.files();
273
306
  const maxFiles = this.maxFiles();
274
- const room = maxFiles > 0 ? Math.max(0, maxFiles - listed.length) : accepted.length;
307
+ const room = maxFiles > 0 ? Math.max(0, maxFiles - listed.length - this.stored().length) : accepted.length;
275
308
  for (const file of accepted.slice(room)) rejections.push({
276
309
  file,
277
310
  reason: "count"
@@ -327,7 +360,7 @@ var WrFileUpload = class WrFileUpload {
327
360
  }
328
361
  static ɵfac = i0.ɵɵngDeclareFactory({
329
362
  minVersion: "12.0.0",
330
- version: "22.2.6",
363
+ version: "22.3.0",
331
364
  ngImport: i0,
332
365
  type: WrFileUpload,
333
366
  deps: [],
@@ -335,7 +368,7 @@ var WrFileUpload = class WrFileUpload {
335
368
  });
336
369
  static ɵcmp = i0.ɵɵngDeclareComponent({
337
370
  minVersion: "17.0.0",
338
- version: "22.2.6",
371
+ version: "22.3.0",
339
372
  type: WrFileUpload,
340
373
  isStandalone: true,
341
374
  selector: "wr-file-upload",
@@ -403,6 +436,13 @@ var WrFileUpload = class WrFileUpload {
403
436
  isRequired: false,
404
437
  transformFunction: null
405
438
  },
439
+ stored: {
440
+ classPropertyName: "stored",
441
+ publicName: "stored",
442
+ isSignal: true,
443
+ isRequired: false,
444
+ transformFunction: null
445
+ },
406
446
  previews: {
407
447
  classPropertyName: "previews",
408
448
  publicName: "previews",
@@ -491,6 +531,7 @@ var WrFileUpload = class WrFileUpload {
491
531
  outputs: {
492
532
  value: "valueChange",
493
533
  rejected: "rejected",
534
+ storedRemove: "storedRemove",
494
535
  retry: "retry",
495
536
  touch: "touch"
496
537
  },
@@ -512,7 +553,7 @@ var WrFileUpload = class WrFileUpload {
512
553
  isSignal: true
513
554
  }],
514
555
  ngImport: i0,
515
- template: "<div\n #zone\n class=\"wr-file-upload__zone\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"zoneName()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"openPicker()\"\n (keydown)=\"onZoneKey($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n (paste)=\"onPaste($event)\"\n>\n <svg class=\"wr-file-upload__icon\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 16V4M12 4l-4 4M12 4l4 4M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <div class=\"wr-file-upload__hint\" [id]=\"hintId\">\n <strong>{{ resolvedPick() }}</strong>\n <span>{{ resolvedDrop() }}</span>\n @if (helperText()) {\n <small>{{ helperText() }}</small>\n }\n </div>\n</div>\n\n<!--\n The real <input type=\"file\"> is never operated directly — the zone above is\n the control and forwards clicks here, so the input is visually hidden and kept\n OUTSIDE the zone: inside, it nested one interactive element within another\n (the zone is role=\"button\") and put two tab stops where users see one. It is\n positioned absolutely and clipped, so being a sibling changes nothing visually.\n aria-hidden must be paired with tabindex=\"-1\", or hiding a focusable element is\n itself a violation.\n-->\n<input\n #picker\n class=\"wr-file-upload__picker\"\n type=\"file\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n [attr.accept]=\"accept() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"disabled() || readonly()\"\n (change)=\"onPickerChange($event)\"\n/>\n\n@if (showList() && files().length > 0) {\n <ul class=\"wr-file-upload__list\" [attr.aria-busy]=\"busy() || null\">\n @for (row of rows(); track $index) {\n <li [class]=\"row.classes\">\n @if (row.preview; as url) {\n <img class=\"wr-file-upload__preview\" alt=\"\" [src]=\"url\" />\n }\n <span\n class=\"wr-file-upload__name\"\n [attr.id]=\"row.state === 'error' ? `${nameId}-${$index}` : null\"\n [title]=\"row.file.name\"\n >{{ row.file.name }}</span\n >\n <span class=\"wr-file-upload__size\">{{ formatBytes(row.file.size) }}</span>\n @switch (row.state) {\n @case ('done') {\n <span class=\"wr-file-upload__done\" role=\"img\" [attr.aria-label]=\"resolvedUploaded()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M20 6 9 17l-5-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-file-upload__retry\"\n [attr.aria-describedby]=\"`${nameId}-${$index}`\"\n [disabled]=\"disabled()\"\n (click)=\"onRetry(row.file, $index)\"\n >\n {{ resolvedRetry() }}\n </button>\n }\n }\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"removeName(row.file.name)\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeAt($index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n @if (row.state === 'uploading') {\n <wr-progress\n class=\"wr-file-upload__progress\"\n size=\"sm\"\n [indeterminate]=\"row.percent === null\"\n [value]=\"row.percent ?? 0\"\n [ariaLabel]=\"statusText({ name: row.file.name, status: resolvedUploading() })\"\n />\n } @else if (row.state === 'error') {\n <span class=\"wr-file-upload__error\">{{ row.message ?? resolvedFailed() }}</span>\n }\n </li>\n }\n </ul>\n}\n\n<!-- One live region for the whole list, in the DOM before any state changes: a\n region inserted together with its text is often not read. -->\n@if (status() !== null) {\n <span class=\"wr-file-upload__announce\" role=\"status\" aria-live=\"polite\">{{ announcement() }}</span>\n}\n",
556
+ template: "<div\n #zone\n class=\"wr-file-upload__zone\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"zoneName()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"openPicker()\"\n (keydown)=\"onZoneKey($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n (paste)=\"onPaste($event)\"\n>\n <svg class=\"wr-file-upload__icon\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 16V4M12 4l-4 4M12 4l4 4M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <div class=\"wr-file-upload__hint\" [id]=\"hintId\">\n <strong>{{ resolvedPick() }}</strong>\n <span>{{ resolvedDrop() }}</span>\n @if (helperText()) {\n <small>{{ helperText() }}</small>\n }\n </div>\n</div>\n\n<!--\n The real <input type=\"file\"> is never operated directly — the zone above is\n the control and forwards clicks here, so the input is visually hidden and kept\n OUTSIDE the zone: inside, it nested one interactive element within another\n (the zone is role=\"button\") and put two tab stops where users see one. It is\n positioned absolutely and clipped, so being a sibling changes nothing visually.\n aria-hidden must be paired with tabindex=\"-1\", or hiding a focusable element is\n itself a violation.\n-->\n<input\n #picker\n class=\"wr-file-upload__picker\"\n type=\"file\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n [attr.accept]=\"accept() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"disabled() || readonly()\"\n (change)=\"onPickerChange($event)\"\n/>\n\n@if (showList() && (files().length > 0 || storedRows().length > 0)) {\n <ul class=\"wr-file-upload__list\" [attr.aria-busy]=\"busy() || null\">\n @for (row of storedRows(); track row.stored) {\n <li class=\"wr-file-upload__item wr-file-upload__item--stored\">\n <span class=\"wr-file-upload__name\" [title]=\"row.stored.name\">\n @if (row.url; as url) {\n <a\n class=\"wr-file-upload__link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n [href]=\"url\"\n [attr.aria-label]=\"openText({ name: row.stored.name })\"\n >{{ row.stored.name }}</a\n >\n } @else {\n {{ row.stored.name }}\n }\n </span>\n @if (row.size !== null) {\n <span class=\"wr-file-upload__size\">{{ formatBytes(row.size) }}</span>\n }\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"removeName(row.stored.name)\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeStored(row, $index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n </li>\n }\n @for (row of rows(); track $index) {\n <li [class]=\"row.classes\">\n @if (row.preview; as url) {\n <img class=\"wr-file-upload__preview\" alt=\"\" [src]=\"url\" />\n }\n <span\n class=\"wr-file-upload__name\"\n [attr.id]=\"row.state === 'error' ? `${nameId}-${$index}` : null\"\n [title]=\"row.file.name\"\n >{{ row.file.name }}</span\n >\n <span class=\"wr-file-upload__size\">{{ formatBytes(row.file.size) }}</span>\n @switch (row.state) {\n @case ('done') {\n <span class=\"wr-file-upload__done\" role=\"img\" [attr.aria-label]=\"resolvedUploaded()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M20 6 9 17l-5-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-file-upload__retry\"\n [attr.aria-describedby]=\"`${nameId}-${$index}`\"\n [disabled]=\"disabled()\"\n (click)=\"onRetry(row.file, $index)\"\n >\n {{ resolvedRetry() }}\n </button>\n }\n }\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"removeName(row.file.name)\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeAt($index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n @if (row.state === 'uploading') {\n <wr-progress\n class=\"wr-file-upload__progress\"\n size=\"sm\"\n [indeterminate]=\"row.percent === null\"\n [value]=\"row.percent ?? 0\"\n [ariaLabel]=\"statusText({ name: row.file.name, status: resolvedUploading() })\"\n />\n } @else if (row.state === 'error') {\n <span class=\"wr-file-upload__error\">{{ row.message ?? resolvedFailed() }}</span>\n }\n </li>\n }\n </ul>\n}\n\n<!-- One live region for the whole list, in the DOM before any state changes: a\n region inserted together with its text is often not read. -->\n@if (status() !== null) {\n <span class=\"wr-file-upload__announce\" role=\"status\" aria-live=\"polite\">{{ announcement() }}</span>\n}\n",
516
557
  dependencies: [{
517
558
  kind: "component",
518
559
  type: WrButton,
@@ -525,6 +566,7 @@ var WrFileUpload = class WrFileUpload {
525
566
  "iconPosition",
526
567
  "disabled",
527
568
  "outlined",
569
+ "ghost",
528
570
  "block",
529
571
  "loading",
530
572
  "disabledWhenLoading"
@@ -538,7 +580,8 @@ var WrFileUpload = class WrFileUpload {
538
580
  "color",
539
581
  "size",
540
582
  "value",
541
- "indeterminate"
583
+ "indeterminate",
584
+ "marks"
542
585
  ]
543
586
  }],
544
587
  encapsulation: i0.ViewEncapsulation.None
@@ -546,7 +589,7 @@ var WrFileUpload = class WrFileUpload {
546
589
  };
547
590
  i0.ɵɵngDeclareClassMetadata({
548
591
  minVersion: "12.0.0",
549
- version: "22.2.6",
592
+ version: "22.3.0",
550
593
  ngImport: i0,
551
594
  type: WrFileUpload,
552
595
  decorators: [{
@@ -559,7 +602,7 @@ i0.ɵɵngDeclareClassMetadata({
559
602
  "[class]": "classes()"
560
603
  },
561
604
  imports: [WrButton, WrProgress],
562
- template: "<div\n #zone\n class=\"wr-file-upload__zone\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"zoneName()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"openPicker()\"\n (keydown)=\"onZoneKey($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n (paste)=\"onPaste($event)\"\n>\n <svg class=\"wr-file-upload__icon\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 16V4M12 4l-4 4M12 4l4 4M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <div class=\"wr-file-upload__hint\" [id]=\"hintId\">\n <strong>{{ resolvedPick() }}</strong>\n <span>{{ resolvedDrop() }}</span>\n @if (helperText()) {\n <small>{{ helperText() }}</small>\n }\n </div>\n</div>\n\n<!--\n The real <input type=\"file\"> is never operated directly — the zone above is\n the control and forwards clicks here, so the input is visually hidden and kept\n OUTSIDE the zone: inside, it nested one interactive element within another\n (the zone is role=\"button\") and put two tab stops where users see one. It is\n positioned absolutely and clipped, so being a sibling changes nothing visually.\n aria-hidden must be paired with tabindex=\"-1\", or hiding a focusable element is\n itself a violation.\n-->\n<input\n #picker\n class=\"wr-file-upload__picker\"\n type=\"file\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n [attr.accept]=\"accept() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"disabled() || readonly()\"\n (change)=\"onPickerChange($event)\"\n/>\n\n@if (showList() && files().length > 0) {\n <ul class=\"wr-file-upload__list\" [attr.aria-busy]=\"busy() || null\">\n @for (row of rows(); track $index) {\n <li [class]=\"row.classes\">\n @if (row.preview; as url) {\n <img class=\"wr-file-upload__preview\" alt=\"\" [src]=\"url\" />\n }\n <span\n class=\"wr-file-upload__name\"\n [attr.id]=\"row.state === 'error' ? `${nameId}-${$index}` : null\"\n [title]=\"row.file.name\"\n >{{ row.file.name }}</span\n >\n <span class=\"wr-file-upload__size\">{{ formatBytes(row.file.size) }}</span>\n @switch (row.state) {\n @case ('done') {\n <span class=\"wr-file-upload__done\" role=\"img\" [attr.aria-label]=\"resolvedUploaded()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M20 6 9 17l-5-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-file-upload__retry\"\n [attr.aria-describedby]=\"`${nameId}-${$index}`\"\n [disabled]=\"disabled()\"\n (click)=\"onRetry(row.file, $index)\"\n >\n {{ resolvedRetry() }}\n </button>\n }\n }\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"removeName(row.file.name)\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeAt($index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n @if (row.state === 'uploading') {\n <wr-progress\n class=\"wr-file-upload__progress\"\n size=\"sm\"\n [indeterminate]=\"row.percent === null\"\n [value]=\"row.percent ?? 0\"\n [ariaLabel]=\"statusText({ name: row.file.name, status: resolvedUploading() })\"\n />\n } @else if (row.state === 'error') {\n <span class=\"wr-file-upload__error\">{{ row.message ?? resolvedFailed() }}</span>\n }\n </li>\n }\n </ul>\n}\n\n<!-- One live region for the whole list, in the DOM before any state changes: a\n region inserted together with its text is often not read. -->\n@if (status() !== null) {\n <span class=\"wr-file-upload__announce\" role=\"status\" aria-live=\"polite\">{{ announcement() }}</span>\n}\n"
605
+ template: "<div\n #zone\n class=\"wr-file-upload__zone\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"zoneName()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"openPicker()\"\n (keydown)=\"onZoneKey($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave()\"\n (drop)=\"onDrop($event)\"\n (paste)=\"onPaste($event)\"\n>\n <svg class=\"wr-file-upload__icon\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 16V4M12 4l-4 4M12 4l4 4M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <div class=\"wr-file-upload__hint\" [id]=\"hintId\">\n <strong>{{ resolvedPick() }}</strong>\n <span>{{ resolvedDrop() }}</span>\n @if (helperText()) {\n <small>{{ helperText() }}</small>\n }\n </div>\n</div>\n\n<!--\n The real <input type=\"file\"> is never operated directly — the zone above is\n the control and forwards clicks here, so the input is visually hidden and kept\n OUTSIDE the zone: inside, it nested one interactive element within another\n (the zone is role=\"button\") and put two tab stops where users see one. It is\n positioned absolutely and clipped, so being a sibling changes nothing visually.\n aria-hidden must be paired with tabindex=\"-1\", or hiding a focusable element is\n itself a violation.\n-->\n<input\n #picker\n class=\"wr-file-upload__picker\"\n type=\"file\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n [attr.accept]=\"accept() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"disabled() || readonly()\"\n (change)=\"onPickerChange($event)\"\n/>\n\n@if (showList() && (files().length > 0 || storedRows().length > 0)) {\n <ul class=\"wr-file-upload__list\" [attr.aria-busy]=\"busy() || null\">\n @for (row of storedRows(); track row.stored) {\n <li class=\"wr-file-upload__item wr-file-upload__item--stored\">\n <span class=\"wr-file-upload__name\" [title]=\"row.stored.name\">\n @if (row.url; as url) {\n <a\n class=\"wr-file-upload__link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n [href]=\"url\"\n [attr.aria-label]=\"openText({ name: row.stored.name })\"\n >{{ row.stored.name }}</a\n >\n } @else {\n {{ row.stored.name }}\n }\n </span>\n @if (row.size !== null) {\n <span class=\"wr-file-upload__size\">{{ formatBytes(row.size) }}</span>\n }\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"removeName(row.stored.name)\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeStored(row, $index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n </li>\n }\n @for (row of rows(); track $index) {\n <li [class]=\"row.classes\">\n @if (row.preview; as url) {\n <img class=\"wr-file-upload__preview\" alt=\"\" [src]=\"url\" />\n }\n <span\n class=\"wr-file-upload__name\"\n [attr.id]=\"row.state === 'error' ? `${nameId}-${$index}` : null\"\n [title]=\"row.file.name\"\n >{{ row.file.name }}</span\n >\n <span class=\"wr-file-upload__size\">{{ formatBytes(row.file.size) }}</span>\n @switch (row.state) {\n @case ('done') {\n <span class=\"wr-file-upload__done\" role=\"img\" [attr.aria-label]=\"resolvedUploaded()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M20 6 9 17l-5-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n @case ('error') {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-file-upload__retry\"\n [attr.aria-describedby]=\"`${nameId}-${$index}`\"\n [disabled]=\"disabled()\"\n (click)=\"onRetry(row.file, $index)\"\n >\n {{ resolvedRetry() }}\n </button>\n }\n }\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"removeName(row.file.name)\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeAt($index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n @if (row.state === 'uploading') {\n <wr-progress\n class=\"wr-file-upload__progress\"\n size=\"sm\"\n [indeterminate]=\"row.percent === null\"\n [value]=\"row.percent ?? 0\"\n [ariaLabel]=\"statusText({ name: row.file.name, status: resolvedUploading() })\"\n />\n } @else if (row.state === 'error') {\n <span class=\"wr-file-upload__error\">{{ row.message ?? resolvedFailed() }}</span>\n }\n </li>\n }\n </ul>\n}\n\n<!-- One live region for the whole list, in the DOM before any state changes: a\n region inserted together with its text is often not read. -->\n@if (status() !== null) {\n <span class=\"wr-file-upload__announce\" role=\"status\" aria-live=\"polite\">{{ announcement() }}</span>\n}\n"
563
606
  }]
564
607
  }],
565
608
  ctorParameters: () => [],
@@ -636,6 +679,14 @@ i0.ɵɵngDeclareClassMetadata({
636
679
  required: false
637
680
  }]
638
681
  }],
682
+ stored: [{
683
+ type: i0.Input,
684
+ args: [{
685
+ isSignal: true,
686
+ alias: "stored",
687
+ required: false
688
+ }]
689
+ }],
639
690
  previews: [{
640
691
  type: i0.Input,
641
692
  args: [{
@@ -739,6 +790,10 @@ i0.ɵɵngDeclareClassMetadata({
739
790
  type: i0.Output,
740
791
  args: ["rejected"]
741
792
  }],
793
+ storedRemove: [{
794
+ type: i0.Output,
795
+ args: ["storedRemove"]
796
+ }],
742
797
  retry: [{
743
798
  type: i0.Output,
744
799
  args: ["retry"]