@4sh/ui-kit 0.16.0 → 0.17.1

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 (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,119 +1,202 @@
1
- import * as _angular_core from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
3
- import { UiIconSize } from '@4sh/ui-kit/base/ui-icon';
4
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import { UiIconSize } from "@4sh/ui-kit/base/ui-icon";
5
+ import * as i0 from "@angular/core";
6
+ import { TemplateRef } from "@angular/core";
5
7
  /** Lifecycle of a selected file. */
6
- type UiUploadStatus = 'pending' | 'uploading' | 'completed' | 'error';
8
+ export type UiUploadStatus = 'pending' | 'uploading' | 'completed' | 'error';
7
9
  /** A file selected in the uploader, plus its upload/validation state. */
8
- interface UiUploadFile {
9
- /** Stable id for tracking (kept across re-renders). */
10
- readonly id: string;
11
- /** The underlying browser File. */
12
- readonly file: File;
13
- /** File name (from the File, exposed for template convenience). */
14
- readonly name: string;
15
- /** Size in bytes. */
16
- readonly size: number;
17
- /** MIME type reported by the browser. */
18
- readonly type: string;
19
- /** Current lifecycle state. */
20
- status: UiUploadStatus;
21
- /** Upload progress, 0–100 (meaningful while `status === 'uploading'`). */
22
- progress: number;
23
- /** Object URL for image previews — MUST be revoked when the file is removed. */
24
- objectUrl?: string;
25
- /** Validation or upload error message, when `status === 'error'`. */
26
- error?: string;
10
+ export interface UiUploadFile {
11
+ /** Stable id for tracking (kept across re-renders); the server id for a stored file. */
12
+ readonly id: string;
13
+ /** The underlying browser File; absent for a file already stored server-side (`initialFiles`). */
14
+ readonly file?: File;
15
+ /** File name (from the File, exposed for template convenience). */
16
+ readonly name: string;
17
+ /** Size in bytes. */
18
+ readonly size: number;
19
+ /** MIME type reported by the browser. */
20
+ readonly type: string;
21
+ /** Current lifecycle state. */
22
+ status: UiUploadStatus;
23
+ /** Upload progress, 0–100 (meaningful while `status === 'uploading'`). */
24
+ progress: number;
25
+ /** Object URL for image previews — MUST be revoked when the file is removed. */
26
+ objectUrl?: string;
27
+ /** Validation or upload error message, when `status === 'error'`. */
28
+ error?: string;
29
+ }
30
+ /** A file picked in the browser (selector, drop or `add()`): it always carries its `File`. */
31
+ export type UiLocalUploadFile = UiUploadFile & {
32
+ readonly file: File;
33
+ };
34
+ /** A file already stored server-side, listed with the new ones (`initialFiles`). */
35
+ export interface UiStoredFile {
36
+ /** Server id, kept as the row id: `removed` and `fileOpen` hand it back. */
37
+ readonly id: string;
38
+ /** File name. */
39
+ readonly name: string;
40
+ /** Size in bytes. */
41
+ readonly size: number;
42
+ /** MIME type, when known. */
43
+ readonly type?: string;
27
44
  }
45
+ /** Whether a file was picked in the browser, as opposed to stored server-side. */
46
+ export declare function isLocalUploadFile(file: UiUploadFile): file is UiLocalUploadFile;
28
47
  /** Payload for the custom upload handler (customUpload = true). */
29
- interface UiUploadHandlerEvent {
30
- /** Files awaiting upload (status `pending`). */
31
- files: UiUploadFile[];
32
- /** Marks a file as uploaded (sets status `completed`, progress 100). */
33
- markUploaded: (file: UiUploadFile) => void;
34
- /** Marks a file as failed with an optional message. */
35
- markError: (file: UiUploadFile, message?: string) => void;
36
- /** Updates a file's progress (0–100). */
37
- setProgress: (file: UiUploadFile, progress: number) => void;
48
+ export interface UiUploadHandlerEvent {
49
+ /** Files awaiting upload (status `pending`), all picked in the browser. */
50
+ files: UiLocalUploadFile[];
51
+ /** Marks a file as uploaded (sets status `completed`, progress 100). */
52
+ markUploaded: (file: UiUploadFile) => void;
53
+ /** Marks a file as failed with an optional message. */
54
+ markError: (file: UiUploadFile, message?: string) => void;
55
+ /** Updates a file's progress (0–100). */
56
+ setProgress: (file: UiUploadFile, progress: number) => void;
38
57
  }
39
58
  /** Emitted when files finish uploading (built-in uploader). */
40
- interface UiUploadEvent {
41
- files: UiUploadFile[];
42
- /** Raw XHR of the last request (built-in uploader only). */
43
- xhr?: XMLHttpRequest;
59
+ export interface UiUploadEvent {
60
+ files: UiUploadFile[];
61
+ /** Raw XHR of the last request (built-in uploader only). */
62
+ xhr?: XMLHttpRequest;
44
63
  }
45
64
  /** Emitted on a validation or upload error. */
46
- interface UiUploadErrorEvent {
47
- file: UiUploadFile;
48
- /** 'type' | 'size' | 'limit' | 'upload'. */
49
- reason: 'type' | 'size' | 'limit' | 'upload';
50
- message: string;
65
+ export interface UiUploadErrorEvent {
66
+ file: UiUploadFile;
67
+ /** 'type' | 'size' | 'total-size' | 'limit' | 'upload'. */
68
+ reason: 'type' | 'size' | 'total-size' | 'limit' | 'upload';
69
+ message: string;
51
70
  }
52
71
  /** Human-readable file size (e.g. "2.5 MB"). Base-1024. */
53
- declare function formatFileSize(bytes: number): string;
72
+ export declare function formatFileSize(bytes: number): string;
54
73
  /**
55
74
  * Whether a File matches an `accept` string (e.g. "image/*,.pdf").
56
75
  * Empty/absent accept means everything is allowed.
57
76
  */
58
- declare function isFileTypeAccepted(file: File, accept: string | undefined): boolean;
77
+ export declare function isFileTypeAccepted(file: File, accept: string | undefined): boolean;
59
78
  /** Whether a File is a previewable image. */
60
- declare function isImageFile(file: File): boolean;
61
-
62
- type UiFileUploadListSize = 'default' | 'small';
79
+ export declare function isImageFile(file: File): boolean;
80
+ export type UiFileUploadListSize = 'default' | 'small';
63
81
  /**
64
82
  * ui-file-upload-list — a single file row (the repeatable unit of an upload list).
65
83
  *
66
84
  * Presentational: shows a leading thumbnail (for images) or file icon, the file
67
- * name + size/status, and a remove button. While the file is uploading it swaps
85
+ * name + size/status, and a remove button. With `openable`, the name becomes a button emitting
86
+ * `open` (e.g. to preview the file); content projected into the row lands next to the remove
87
+ * button, for extra actions. While the file is uploading it swaps
68
88
  * the leading icon for a `ui-spinner` and reveals a slim progress bar.
69
89
  *
70
90
  * Named to mirror the Figma component; the uploader stacks one row per file.
71
91
  */
72
- declare class UiFileUploadList {
73
- /** The file to display (name/size/status/progress/preview). */
74
- file: _angular_core.InputSignal<UiUploadFile>;
75
- /** Size of the file rows. */
76
- size: _angular_core.InputSignal<UiFileUploadListSize>;
77
- /** FontAwesome icon for non-image files. */
78
- icon: _angular_core.InputSignal<string>;
79
- /** Whether the remove button is shown. */
80
- removable: _angular_core.InputSignalWithTransform<boolean, unknown>;
81
- /** Accessible name of the remove button (raw text — the file name is appended in the template). */
82
- removeAriaLabel: _angular_core.InputSignal<string>;
83
- /** Fallback error text when the file carries no message. */
84
- failedLabel: _angular_core.InputSignal<string>;
85
- /** Accessible name of the upload spinner — `{0}` is the file name. */
86
- uploadingLabel: _angular_core.InputSignal<string>;
87
- /** Accessible name of the progress bar — `{0}` is the file name. */
88
- progressLabel: _angular_core.InputSignal<string>;
89
- /** Emitted when the remove button is activated. */
90
- remove: _angular_core.OutputEmitterRef<UiUploadFile>;
91
- /** @ignore Formatted size (e.g. "2.5 MB"). */
92
- protected readonly sizeLabel: _angular_core.Signal<string>;
93
- /** @ignore Accessible name of the upload spinner (`{0}` filled with the file name). */
94
- protected readonly uploadingAriaLabel: _angular_core.Signal<string>;
95
- /** @ignore Accessible name of the progress bar (`{0}` filled with the file name). */
96
- protected readonly progressAriaLabel: _angular_core.Signal<string>;
97
- /** @ignore Uploading in progress → show the spinner + progress bar. */
98
- protected readonly isUploading: _angular_core.Signal<boolean>;
99
- /** @ignore Error state → surface the message + error styling. */
100
- protected readonly isError: _angular_core.Signal<boolean>;
101
- /** @ignore Image with a usable preview URL → render a thumbnail. */
102
- protected readonly thumbnail: _angular_core.Signal<string | null>;
103
- /** @ignore Secondary line: error message, else size (+ status hint). */
104
- protected readonly infoLabel: _angular_core.Signal<string>;
105
- /** @ignore */
106
- protected readonly iconSize: _angular_core.Signal<UiIconSize>;
107
- /** @ignore */
108
- protected readonly classes: _angular_core.Signal<string>;
109
- /** @ignore */
110
- protected onRemove(): void;
111
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFileUploadList, never>;
112
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiFileUploadList, "ui-file-upload-list", never, { "file": { "alias": "file"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "removeAriaLabel": { "alias": "removeAriaLabel"; "required": false; "isSignal": true; }; "failedLabel": { "alias": "failedLabel"; "required": false; "isSignal": true; }; "uploadingLabel": { "alias": "uploadingLabel"; "required": false; "isSignal": true; }; "progressLabel": { "alias": "progressLabel"; "required": false; "isSignal": true; }; }, { "remove": "remove"; }, never, never, true, never>;
92
+ export declare class UiFileUploadList {
93
+ /** The file to display (name/size/status/progress/preview). */
94
+ file: import("@angular/core").InputSignal<UiUploadFile>;
95
+ /** Size of the file rows. */
96
+ size: import("@angular/core").InputSignal<UiFileUploadListSize>;
97
+ /** FontAwesome icon for non-image files. */
98
+ icon: import("@angular/core").InputSignal<string>;
99
+ /** Whether the remove button is shown. */
100
+ removable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
101
+ /** Makes the file name a button emitting `open`. */
102
+ openable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
103
+ /** Accessible name of the file name button (`openable`) — `{0}` is the file name. */
104
+ openLabel: import("@angular/core").InputSignal<string>;
105
+ /** Accessible name of the remove button (raw text — the file name is appended in the template). */
106
+ removeAriaLabel: import("@angular/core").InputSignal<string>;
107
+ /** Fallback error text when the file carries no message. */
108
+ failedLabel: import("@angular/core").InputSignal<string>;
109
+ /** Accessible name of the upload spinner — `{0}` is the file name. */
110
+ uploadingLabel: import("@angular/core").InputSignal<string>;
111
+ /** Accessible name of the progress bar — `{0}` is the file name. */
112
+ progressLabel: import("@angular/core").InputSignal<string>;
113
+ /** Emitted when the remove button is activated. */
114
+ remove: import("@angular/core").OutputEmitterRef<UiUploadFile>;
115
+ /** Emitted when the file name is activated (`openable`). */
116
+ open: import("@angular/core").OutputEmitterRef<UiUploadFile>;
117
+ /** @ignore Formatted size (e.g. "2.5 MB"). */
118
+ protected readonly sizeLabel: import("@angular/core").Signal<string>;
119
+ /** @ignore Accessible name of the file name button (`{0}` filled with the file name). */
120
+ protected readonly openAriaLabel: import("@angular/core").Signal<string>;
121
+ /** @ignore Accessible name of the upload spinner (`{0}` filled with the file name). */
122
+ protected readonly uploadingAriaLabel: import("@angular/core").Signal<string>;
123
+ /** @ignore Accessible name of the progress bar (`{0}` filled with the file name). */
124
+ protected readonly progressAriaLabel: import("@angular/core").Signal<string>;
125
+ /** @ignore Uploading in progress → show the spinner + progress bar. */
126
+ protected readonly isUploading: import("@angular/core").Signal<boolean>;
127
+ /** @ignore Error state → surface the message + error styling. */
128
+ protected readonly isError: import("@angular/core").Signal<boolean>;
129
+ /** @ignore Image with a usable preview URL → render a thumbnail. */
130
+ protected readonly thumbnail: import("@angular/core").Signal<string | null>;
131
+ /** @ignore Secondary line: error message, else size (+ status hint). */
132
+ protected readonly infoLabel: import("@angular/core").Signal<string>;
133
+ /** @ignore */
134
+ protected readonly iconSize: import("@angular/core").Signal<UiIconSize>;
135
+ /** @ignore */
136
+ protected readonly classes: import("@angular/core").Signal<string>;
137
+ /** @ignore */
138
+ protected onRemove(): void;
139
+ /** @ignore */
140
+ protected onOpen(): void;
141
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiFileUploadList, never>;
142
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiFileUploadList, "ui-file-upload-list", never, {
143
+ "file": {
144
+ "alias": "file";
145
+ "required": true;
146
+ "isSignal": true;
147
+ };
148
+ "size": {
149
+ "alias": "size";
150
+ "required": false;
151
+ "isSignal": true;
152
+ };
153
+ "icon": {
154
+ "alias": "icon";
155
+ "required": false;
156
+ "isSignal": true;
157
+ };
158
+ "removable": {
159
+ "alias": "removable";
160
+ "required": false;
161
+ "isSignal": true;
162
+ };
163
+ "openable": {
164
+ "alias": "openable";
165
+ "required": false;
166
+ "isSignal": true;
167
+ };
168
+ "openLabel": {
169
+ "alias": "openLabel";
170
+ "required": false;
171
+ "isSignal": true;
172
+ };
173
+ "removeAriaLabel": {
174
+ "alias": "removeAriaLabel";
175
+ "required": false;
176
+ "isSignal": true;
177
+ };
178
+ "failedLabel": {
179
+ "alias": "failedLabel";
180
+ "required": false;
181
+ "isSignal": true;
182
+ };
183
+ "uploadingLabel": {
184
+ "alias": "uploadingLabel";
185
+ "required": false;
186
+ "isSignal": true;
187
+ };
188
+ "progressLabel": {
189
+ "alias": "progressLabel";
190
+ "required": false;
191
+ "isSignal": true;
192
+ };
193
+ }, {
194
+ "remove": "remove";
195
+ "open": "open";
196
+ }, never, ["*"], true, never>;
113
197
  }
114
-
115
- type UiFileUploadMode = 'field' | 'drag';
116
- type UiFileUploadSize = 'default' | 'small';
198
+ export type UiFileUploadMode = 'field' | 'drag';
199
+ export type UiFileUploadSize = 'default' | 'small';
117
200
  /**
118
201
  * ui-file-upload — headless file uploader (field + drag-and-drop).
119
202
  *
@@ -124,155 +207,414 @@ type UiFileUploadSize = 'default' | 'small';
124
207
  * handler (`customUpload`). Progress is tracked with `XMLHttpRequest` so no
125
208
  * global HTTP provider is required.
126
209
  *
210
+ * Files already stored server-side (`initialFiles`) are listed with the new ones, without a
211
+ * browser `File`; `add()` feeds files obtained outside the picker (e.g. a camera capture)
212
+ * through the same validation and upload as a selection.
213
+ *
127
214
  * Security notes: client-side validation is a UX convenience — always re-validate
128
215
  * server-side. Image previews use object URLs that are revoked on removal/clear.
129
216
  */
130
- declare class UiFileUpload {
131
- /** `field` = compact input + Browse button; `drag` = full drop zone. */
132
- mode: _angular_core.InputSignal<UiFileUploadMode>;
133
- /** Size of the control, its buttons and its file list. */
134
- size: _angular_core.InputSignal<UiFileUploadSize>;
135
- /** Native `name`: a surrounding `<form>` submits the current selection under it. */
136
- name: _angular_core.InputSignal<string | undefined>;
137
- /** Allow selecting more than one file. */
138
- multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
139
- /** Ripple Effect */
140
- ripple: _angular_core.InputSignalWithTransform<boolean, unknown>;
141
- /** Native `accept` filter, e.g. "image/*,.pdf". Also enforced on drop. */
142
- accept: _angular_core.InputSignal<string | undefined>;
143
- /** Max size per file, in bytes. */
144
- maxFileSize: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
145
- /** Max number of files kept at once. */
146
- fileLimit: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
147
- /** Disables selection, drop and upload. */
148
- disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
149
- /** Upload each file as soon as it is selected. */
150
- auto: _angular_core.InputSignalWithTransform<boolean, unknown>;
151
- /** Delegate uploading to the `uploadHandler` output instead of the built-in XHR. */
152
- customUpload: _angular_core.InputSignalWithTransform<boolean, unknown>;
153
- /** Endpoint for the built-in uploader. */
154
- url: _angular_core.InputSignal<string | undefined>;
155
- /** HTTP method for the built-in uploader. */
156
- method: _angular_core.InputSignal<"post" | "put">;
157
- /** Field name used for each file in the multipart body. */
158
- fieldName: _angular_core.InputSignal<string>;
159
- /** Send credentials (cookies) with the built-in upload request. */
160
- withCredentials: _angular_core.InputSignalWithTransform<boolean, unknown>;
161
- /** Show the file list under the control. */
162
- showFileList: _angular_core.InputSignalWithTransform<boolean, unknown>;
163
- /** Show the Upload/Cancel toolbar buttons (drag mode). */
164
- showControls: _angular_core.InputSignalWithTransform<boolean, unknown>;
165
- /** Label of the Browse button. */
166
- browseLabel: _angular_core.InputSignal<string>;
167
- /** Placeholder shown in field mode before any selection. */
168
- chooseLabel: _angular_core.InputSignal<string>;
169
- /** Label of the Upload toolbar button (drag mode). */
170
- uploadLabel: _angular_core.InputSignal<string>;
171
- /** Label of the toolbar button that clears the selection (drag mode). */
172
- cancelLabel: _angular_core.InputSignal<string>;
173
- /** Drag-zone link + prompt. */
174
- dragLinkLabel: _angular_core.InputSignal<string>;
175
- /** Text after the drag-zone link (drag mode). */
176
- dragPromptLabel: _angular_core.InputSignal<string>;
177
- /** Small hint under the drag prompt (e.g. "JPG, PNG (max 5 MB)"). */
178
- hint: _angular_core.InputSignal<string | undefined>;
179
- /** Accessible name for the whole control. */
180
- ariaLabel: _angular_core.InputSignal<string>;
181
- /** Multi-file summary in field mode — `{0}` is replaced by the file count. */
182
- filesSummaryLabel: _angular_core.InputSignal<string>;
183
- /** Rejection message: file type not accepted — `{0}` is the file name. */
184
- invalidTypeMessage: _angular_core.InputSignal<string>;
185
- /** Rejection message: file too large — `{0}` is the file name. */
186
- invalidSizeMessage: _angular_core.InputSignal<string>;
187
- /** Rejection message: `fileLimit` reached — `{0}` is the limit. */
188
- limitReachedMessage: _angular_core.InputSignal<string>;
189
- /** Error shown when an upload fails without a server message. */
190
- uploadErrorMessage: _angular_core.InputSignal<string>;
191
- /** Error shown when the upload request fails at the network level. */
192
- networkErrorMessage: _angular_core.InputSignal<string>;
193
- /** Error shown on a non-2xx response — `{0}` is the HTTP status. */
194
- httpErrorMessage: _angular_core.InputSignal<string>;
195
- /** Overrides a single file row (context: `{ $implicit: UiUploadFile, remove }`). */
196
- fileTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
197
- /** Overrides the content section (context: `{ $implicit: UiUploadFile[], remove, clear }`). */
198
- contentTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
199
- /** Custom toolbar content (context: `{ $implicit: UiUploadFile[], choose, upload, clear }`). */
200
- toolbarTemplate: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
201
- /** Files added to the selection (validated). */
202
- selected: _angular_core.OutputEmitterRef<UiUploadFile[]>;
203
- /** The full current selection changed. */
204
- filesChange: _angular_core.OutputEmitterRef<UiUploadFile[]>;
205
- /** A custom upload was requested (customUpload = true). */
206
- uploadHandler: _angular_core.OutputEmitterRef<UiUploadHandlerEvent>;
207
- /** Built-in upload completed for a batch. */
208
- uploaded: _angular_core.OutputEmitterRef<UiUploadEvent>;
209
- /** A file failed validation or upload. */
210
- uploadError: _angular_core.OutputEmitterRef<UiUploadErrorEvent>;
211
- /** A file was removed. */
212
- removed: _angular_core.OutputEmitterRef<UiUploadFile>;
213
- /** The selection was cleared. */
214
- cleared: _angular_core.OutputEmitterRef<void>;
215
- /** @ignore Stable id linking the visible label(s) to the native input. */
216
- protected readonly inputId: string;
217
- private readonly host;
218
- private readonly destroyRef;
219
- private readonly fileInput;
220
- private readonly formValueInput;
221
- /** In-flight requests, keyed by file id, so we can abort. */
222
- private readonly requests;
223
- /** @ignore Current selection. */
224
- private readonly selection;
225
- /** Read-only view of the current files. */
226
- readonly files: _angular_core.Signal<UiUploadFile[]>;
227
- /** @ignore Drop-zone highlight while dragging over. */
228
- protected readonly dragging: _angular_core.WritableSignal<boolean>;
229
- /** @ignore Transient validation messages (rendered in a live region). */
230
- protected readonly messages: _angular_core.WritableSignal<string[]>;
231
- constructor();
232
- /** @ignore */
233
- protected readonly hasFiles: _angular_core.Signal<boolean>;
234
- /** @ignore */
235
- protected readonly pending: _angular_core.Signal<UiUploadFile[]>;
236
- /** @ignore Single-file summary shown in field mode. */
237
- protected readonly fieldSummary: _angular_core.Signal<string>;
238
- /** @ignore */
239
- protected readonly canUpload: _angular_core.Signal<boolean>;
240
- /** @ignore */
241
- protected readonly classes: _angular_core.Signal<string>;
242
- /** @ignore */ protected readonly removeFn: (f: UiUploadFile) => void;
243
- /** @ignore */ protected readonly clearFn: () => void;
244
- /** @ignore */ protected readonly chooseFn: () => void;
245
- /** @ignore */ protected readonly uploadFn: () => void;
246
- /** Opens the native file picker. */
247
- choose(): void;
248
- /** Uploads all pending files (built-in XHR, or emits `uploadHandler`). */
249
- upload(): void;
250
- /** Removes a file (aborts its upload, revokes its preview). */
251
- remove(target: UiUploadFile): void;
252
- /** Clears the whole selection. */
253
- clear(): void;
254
- /** @ignore */
255
- protected onInputChange(event: Event): void;
256
- /** @ignore */
257
- protected onDragOver(event: DragEvent): void;
258
- /** @ignore */
259
- protected onDragLeave(event: DragEvent): void;
260
- /** @ignore */
261
- protected onDrop(event: DragEvent): void;
262
- /** Validate + add a FileList to the selection. */
263
- private ingest;
264
- private toUploadFile;
265
- private fail;
266
- /** Mutates one file in place (immutably) and pushes a new array reference. */
267
- private patch;
268
- private emitCustomUpload;
269
- private xhrUpload;
270
- private uploadFailed;
271
- private revoke;
272
- private resetInput;
273
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiFileUpload, never>;
274
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiFileUpload, "ui-file-upload", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "ripple": { "alias": "ripple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "fileLimit": { "alias": "fileLimit"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "auto": { "alias": "auto"; "required": false; "isSignal": true; }; "customUpload": { "alias": "customUpload"; "required": false; "isSignal": true; }; "url": { "alias": "url"; "required": false; "isSignal": true; }; "method": { "alias": "method"; "required": false; "isSignal": true; }; "fieldName": { "alias": "fieldName"; "required": false; "isSignal": true; }; "withCredentials": { "alias": "withCredentials"; "required": false; "isSignal": true; }; "showFileList": { "alias": "showFileList"; "required": false; "isSignal": true; }; "showControls": { "alias": "showControls"; "required": false; "isSignal": true; }; "browseLabel": { "alias": "browseLabel"; "required": false; "isSignal": true; }; "chooseLabel": { "alias": "chooseLabel"; "required": false; "isSignal": true; }; "uploadLabel": { "alias": "uploadLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "dragLinkLabel": { "alias": "dragLinkLabel"; "required": false; "isSignal": true; }; "dragPromptLabel": { "alias": "dragPromptLabel"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "filesSummaryLabel": { "alias": "filesSummaryLabel"; "required": false; "isSignal": true; }; "invalidTypeMessage": { "alias": "invalidTypeMessage"; "required": false; "isSignal": true; }; "invalidSizeMessage": { "alias": "invalidSizeMessage"; "required": false; "isSignal": true; }; "limitReachedMessage": { "alias": "limitReachedMessage"; "required": false; "isSignal": true; }; "uploadErrorMessage": { "alias": "uploadErrorMessage"; "required": false; "isSignal": true; }; "networkErrorMessage": { "alias": "networkErrorMessage"; "required": false; "isSignal": true; }; "httpErrorMessage": { "alias": "httpErrorMessage"; "required": false; "isSignal": true; }; "fileTemplate": { "alias": "fileTemplate"; "required": false; "isSignal": true; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; "isSignal": true; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "filesChange": "filesChange"; "uploadHandler": "uploadHandler"; "uploaded": "uploaded"; "uploadError": "uploadError"; "removed": "removed"; "cleared": "cleared"; }, never, never, true, never>;
275
- }
276
-
277
- export { UiFileUpload, UiFileUploadList, formatFileSize, isFileTypeAccepted, isImageFile };
278
- export type { UiFileUploadListSize, UiFileUploadMode, UiFileUploadSize, UiUploadErrorEvent, UiUploadEvent, UiUploadFile, UiUploadHandlerEvent, UiUploadStatus };
217
+ export declare class UiFileUpload {
218
+ /** `field` = compact input + Browse button; `drag` = full drop zone. */
219
+ mode: import("@angular/core").InputSignal<UiFileUploadMode>;
220
+ /** Size of the control, its buttons and its file list. */
221
+ size: import("@angular/core").InputSignal<UiFileUploadSize>;
222
+ /** Native `name`: a surrounding `<form>` submits the current selection under it. */
223
+ name: import("@angular/core").InputSignal<string | undefined>;
224
+ /** Allow selecting more than one file. */
225
+ multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
226
+ /** Ripple Effect */
227
+ ripple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
228
+ /** Native `accept` filter, e.g. "image/*,.pdf". Also enforced on drop. */
229
+ accept: import("@angular/core").InputSignal<string | undefined>;
230
+ /** Max size per file, in bytes. */
231
+ maxFileSize: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
232
+ /** Max size of the whole selection, stored files included, in bytes. */
233
+ maxTotalSize: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
234
+ /** Max number of files kept at once. */
235
+ fileLimit: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
236
+ /** Disables selection, drop and upload. */
237
+ disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
238
+ /**
239
+ * Files already stored server-side, listed with the new ones (status `completed`, no `File`).
240
+ * Setting it resets the selection to these files, without emitting `filesChange`; files picked
241
+ * in the browser and not uploaded yet (pending, uploading, failed) are kept.
242
+ */
243
+ initialFiles: import("@angular/core").InputSignal<UiStoredFile[]>;
244
+ /** Upload each file as soon as it is selected. */
245
+ auto: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
246
+ /** Delegate uploading to the `uploadHandler` output instead of the built-in XHR. */
247
+ customUpload: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
248
+ /** Endpoint for the built-in uploader. */
249
+ url: import("@angular/core").InputSignal<string | undefined>;
250
+ /** HTTP method for the built-in uploader. */
251
+ method: import("@angular/core").InputSignal<"post" | "put">;
252
+ /** Field name used for each file in the multipart body. */
253
+ fieldName: import("@angular/core").InputSignal<string>;
254
+ /** Send credentials (cookies) with the built-in upload request. */
255
+ withCredentials: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
256
+ /** Show the file list under the control. */
257
+ showFileList: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
258
+ /** Show the Upload/Cancel toolbar buttons (drag mode). */
259
+ showControls: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
260
+ /** Show the file count and total size under the list. */
261
+ showTotal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
262
+ /** Makes each file name a button emitting `fileOpen` (e.g. to preview the file). */
263
+ openable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
264
+ /** Label of the Browse button. */
265
+ browseLabel: import("@angular/core").InputSignal<string>;
266
+ /** Placeholder shown in field mode before any selection. */
267
+ chooseLabel: import("@angular/core").InputSignal<string>;
268
+ /** Label of the Upload toolbar button (drag mode). */
269
+ uploadLabel: import("@angular/core").InputSignal<string>;
270
+ /** Label of the toolbar button that clears the selection (drag mode). */
271
+ cancelLabel: import("@angular/core").InputSignal<string>;
272
+ /** Drag-zone link + prompt. */
273
+ dragLinkLabel: import("@angular/core").InputSignal<string>;
274
+ /** Text after the drag-zone link (drag mode). */
275
+ dragPromptLabel: import("@angular/core").InputSignal<string>;
276
+ /** Small hint under the drag prompt (e.g. "JPG, PNG (max 5 MB)"). */
277
+ hint: import("@angular/core").InputSignal<string | undefined>;
278
+ /** Accessible name for the whole control. */
279
+ ariaLabel: import("@angular/core").InputSignal<string>;
280
+ /** Multi-file summary in field mode — `{0}` is replaced by the file count. */
281
+ filesSummaryLabel: import("@angular/core").InputSignal<string>;
282
+ /** Rejection message: file type not accepted — `{0}` is the file name. */
283
+ invalidTypeMessage: import("@angular/core").InputSignal<string>;
284
+ /** Rejection message: file too large — `{0}` is the file name. */
285
+ invalidSizeMessage: import("@angular/core").InputSignal<string>;
286
+ /** Total under the list (`showTotal`) — `{0}` is the file count, `{1}` the total size. */
287
+ totalLabel: import("@angular/core").InputSignal<string>;
288
+ /** Rejection message: `maxTotalSize` exceeded — `{0}` is the file name, `{1}` the limit. */
289
+ totalSizeExceededMessage: import("@angular/core").InputSignal<string>;
290
+ /** Rejection message: `fileLimit` reached — `{0}` is the limit. */
291
+ limitReachedMessage: import("@angular/core").InputSignal<string>;
292
+ /** Error shown when an upload fails without a server message. */
293
+ uploadErrorMessage: import("@angular/core").InputSignal<string>;
294
+ /** Error shown when the upload request fails at the network level. */
295
+ networkErrorMessage: import("@angular/core").InputSignal<string>;
296
+ /** Error shown on a non-2xx response — `{0}` is the HTTP status. */
297
+ httpErrorMessage: import("@angular/core").InputSignal<string>;
298
+ /** Overrides a single file row (context: `{ $implicit: UiUploadFile, remove, open }`). */
299
+ fileTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
300
+ /** Extra actions on a default file row, next to its remove button (context: `{ $implicit: UiUploadFile, remove, open }`). */
301
+ fileActionsTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
302
+ /** Overrides the content section (context: `{ $implicit: UiUploadFile[], remove, clear }`). */
303
+ contentTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
304
+ /** Custom toolbar content (context: `{ $implicit: UiUploadFile[], choose, upload, clear }`). */
305
+ toolbarTemplate: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
306
+ /** Files added to the selection (validated). */
307
+ selected: import("@angular/core").OutputEmitterRef<UiLocalUploadFile[]>;
308
+ /** The full current selection changed. */
309
+ filesChange: import("@angular/core").OutputEmitterRef<UiUploadFile[]>;
310
+ /** A custom upload was requested (customUpload = true). */
311
+ uploadHandler: import("@angular/core").OutputEmitterRef<UiUploadHandlerEvent>;
312
+ /** Built-in upload completed for a batch. */
313
+ uploaded: import("@angular/core").OutputEmitterRef<UiUploadEvent>;
314
+ /** A file failed validation or upload. */
315
+ uploadError: import("@angular/core").OutputEmitterRef<UiUploadErrorEvent>;
316
+ /** A file was removed. */
317
+ removed: import("@angular/core").OutputEmitterRef<UiUploadFile>;
318
+ /** The selection was cleared. */
319
+ cleared: import("@angular/core").OutputEmitterRef<void>;
320
+ /** A file name was activated (`openable`). */
321
+ fileOpen: import("@angular/core").OutputEmitterRef<UiUploadFile>;
322
+ /** @ignore Stable id linking the visible label(s) to the native input. */
323
+ protected readonly inputId: string;
324
+ private readonly host;
325
+ private readonly destroyRef;
326
+ private readonly fileInput;
327
+ private readonly formValueInput;
328
+ /** In-flight requests, keyed by file id, so we can abort. */
329
+ private readonly requests;
330
+ /** @ignore Current selection. */
331
+ private readonly selection;
332
+ /** Read-only view of the current files. */
333
+ readonly files: import("@angular/core").Signal<UiUploadFile[]>;
334
+ /** @ignore `initialFiles` compared by content, so a list rebuilt on every check (same files)
335
+ * does not wipe the files the user has just added. */
336
+ private readonly storedFiles;
337
+ /** @ignore Drop-zone highlight while dragging over. */
338
+ protected readonly dragging: import("@angular/core").WritableSignal<boolean>;
339
+ /** @ignore Transient validation messages (rendered in a live region). */
340
+ protected readonly messages: import("@angular/core").WritableSignal<string[]>;
341
+ constructor();
342
+ /** @ignore */
343
+ protected readonly hasFiles: import("@angular/core").Signal<boolean>;
344
+ /** @ignore Files picked in the browser: what the toolbar's clear acts on. */
345
+ protected readonly hasLocalFiles: import("@angular/core").Signal<boolean>;
346
+ /** @ignore */
347
+ protected readonly pending: import("@angular/core").Signal<UiLocalUploadFile[]>;
348
+ /** @ignore File count and total size under the list (`showTotal`). */
349
+ protected readonly totalSummary: import("@angular/core").Signal<string>;
350
+ /** @ignore Single-file summary shown in field mode. */
351
+ protected readonly fieldSummary: import("@angular/core").Signal<string>;
352
+ /** @ignore */
353
+ protected readonly canUpload: import("@angular/core").Signal<boolean>;
354
+ /** @ignore */
355
+ protected readonly classes: import("@angular/core").Signal<string>;
356
+ /** @ignore */ protected readonly removeFn: (f: UiUploadFile) => void;
357
+ /** @ignore */ protected readonly clearFn: () => void;
358
+ /** @ignore */ protected readonly chooseFn: () => void;
359
+ /** @ignore */ protected readonly uploadFn: () => void;
360
+ /** @ignore */ protected readonly openFn: (f: UiUploadFile) => void;
361
+ /** Opens the native file picker. */
362
+ choose(): void;
363
+ /**
364
+ * Adds files obtained outside the picker (e.g. a camera capture) exactly like a selection or a
365
+ * drop: validation and its messages, selection, then upload when `auto`.
366
+ */
367
+ add(files: FileList | readonly File[]): void;
368
+ /** Uploads all pending files (built-in XHR, or emits `uploadHandler`). */
369
+ upload(): void;
370
+ /** Removes a file (aborts its upload, revokes its preview). */
371
+ remove(target: UiUploadFile): void;
372
+ /**
373
+ * Clears the files picked in the browser. Stored files (`initialFiles`) stay: removing one is a
374
+ * server deletion, done one at a time (`removed`).
375
+ */
376
+ clear(): void;
377
+ /** @ignore */
378
+ protected onInputChange(event: Event): void;
379
+ /** @ignore */
380
+ protected onDragOver(event: DragEvent): void;
381
+ /** @ignore */
382
+ protected onDragLeave(event: DragEvent): void;
383
+ /** @ignore */
384
+ protected onDrop(event: DragEvent): void;
385
+ /** Validate + add files to the selection. */
386
+ private ingest;
387
+ /** Resets the selection to the stored files, keeping the unfinished local ones, without outputs. */
388
+ private reset;
389
+ private toUploadFile;
390
+ private fail;
391
+ /** Mutates one file in place (immutably) and pushes a new array reference. */
392
+ private patch;
393
+ private emitCustomUpload;
394
+ private xhrUpload;
395
+ private uploadFailed;
396
+ private revoke;
397
+ private resetInput;
398
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiFileUpload, never>;
399
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiFileUpload, "ui-file-upload", never, {
400
+ "mode": {
401
+ "alias": "mode";
402
+ "required": false;
403
+ "isSignal": true;
404
+ };
405
+ "size": {
406
+ "alias": "size";
407
+ "required": false;
408
+ "isSignal": true;
409
+ };
410
+ "name": {
411
+ "alias": "name";
412
+ "required": false;
413
+ "isSignal": true;
414
+ };
415
+ "multiple": {
416
+ "alias": "multiple";
417
+ "required": false;
418
+ "isSignal": true;
419
+ };
420
+ "ripple": {
421
+ "alias": "ripple";
422
+ "required": false;
423
+ "isSignal": true;
424
+ };
425
+ "accept": {
426
+ "alias": "accept";
427
+ "required": false;
428
+ "isSignal": true;
429
+ };
430
+ "maxFileSize": {
431
+ "alias": "maxFileSize";
432
+ "required": false;
433
+ "isSignal": true;
434
+ };
435
+ "maxTotalSize": {
436
+ "alias": "maxTotalSize";
437
+ "required": false;
438
+ "isSignal": true;
439
+ };
440
+ "fileLimit": {
441
+ "alias": "fileLimit";
442
+ "required": false;
443
+ "isSignal": true;
444
+ };
445
+ "disabled": {
446
+ "alias": "disabled";
447
+ "required": false;
448
+ "isSignal": true;
449
+ };
450
+ "initialFiles": {
451
+ "alias": "initialFiles";
452
+ "required": false;
453
+ "isSignal": true;
454
+ };
455
+ "auto": {
456
+ "alias": "auto";
457
+ "required": false;
458
+ "isSignal": true;
459
+ };
460
+ "customUpload": {
461
+ "alias": "customUpload";
462
+ "required": false;
463
+ "isSignal": true;
464
+ };
465
+ "url": {
466
+ "alias": "url";
467
+ "required": false;
468
+ "isSignal": true;
469
+ };
470
+ "method": {
471
+ "alias": "method";
472
+ "required": false;
473
+ "isSignal": true;
474
+ };
475
+ "fieldName": {
476
+ "alias": "fieldName";
477
+ "required": false;
478
+ "isSignal": true;
479
+ };
480
+ "withCredentials": {
481
+ "alias": "withCredentials";
482
+ "required": false;
483
+ "isSignal": true;
484
+ };
485
+ "showFileList": {
486
+ "alias": "showFileList";
487
+ "required": false;
488
+ "isSignal": true;
489
+ };
490
+ "showControls": {
491
+ "alias": "showControls";
492
+ "required": false;
493
+ "isSignal": true;
494
+ };
495
+ "showTotal": {
496
+ "alias": "showTotal";
497
+ "required": false;
498
+ "isSignal": true;
499
+ };
500
+ "openable": {
501
+ "alias": "openable";
502
+ "required": false;
503
+ "isSignal": true;
504
+ };
505
+ "browseLabel": {
506
+ "alias": "browseLabel";
507
+ "required": false;
508
+ "isSignal": true;
509
+ };
510
+ "chooseLabel": {
511
+ "alias": "chooseLabel";
512
+ "required": false;
513
+ "isSignal": true;
514
+ };
515
+ "uploadLabel": {
516
+ "alias": "uploadLabel";
517
+ "required": false;
518
+ "isSignal": true;
519
+ };
520
+ "cancelLabel": {
521
+ "alias": "cancelLabel";
522
+ "required": false;
523
+ "isSignal": true;
524
+ };
525
+ "dragLinkLabel": {
526
+ "alias": "dragLinkLabel";
527
+ "required": false;
528
+ "isSignal": true;
529
+ };
530
+ "dragPromptLabel": {
531
+ "alias": "dragPromptLabel";
532
+ "required": false;
533
+ "isSignal": true;
534
+ };
535
+ "hint": {
536
+ "alias": "hint";
537
+ "required": false;
538
+ "isSignal": true;
539
+ };
540
+ "ariaLabel": {
541
+ "alias": "ariaLabel";
542
+ "required": false;
543
+ "isSignal": true;
544
+ };
545
+ "filesSummaryLabel": {
546
+ "alias": "filesSummaryLabel";
547
+ "required": false;
548
+ "isSignal": true;
549
+ };
550
+ "invalidTypeMessage": {
551
+ "alias": "invalidTypeMessage";
552
+ "required": false;
553
+ "isSignal": true;
554
+ };
555
+ "invalidSizeMessage": {
556
+ "alias": "invalidSizeMessage";
557
+ "required": false;
558
+ "isSignal": true;
559
+ };
560
+ "totalLabel": {
561
+ "alias": "totalLabel";
562
+ "required": false;
563
+ "isSignal": true;
564
+ };
565
+ "totalSizeExceededMessage": {
566
+ "alias": "totalSizeExceededMessage";
567
+ "required": false;
568
+ "isSignal": true;
569
+ };
570
+ "limitReachedMessage": {
571
+ "alias": "limitReachedMessage";
572
+ "required": false;
573
+ "isSignal": true;
574
+ };
575
+ "uploadErrorMessage": {
576
+ "alias": "uploadErrorMessage";
577
+ "required": false;
578
+ "isSignal": true;
579
+ };
580
+ "networkErrorMessage": {
581
+ "alias": "networkErrorMessage";
582
+ "required": false;
583
+ "isSignal": true;
584
+ };
585
+ "httpErrorMessage": {
586
+ "alias": "httpErrorMessage";
587
+ "required": false;
588
+ "isSignal": true;
589
+ };
590
+ "fileTemplate": {
591
+ "alias": "fileTemplate";
592
+ "required": false;
593
+ "isSignal": true;
594
+ };
595
+ "fileActionsTemplate": {
596
+ "alias": "fileActionsTemplate";
597
+ "required": false;
598
+ "isSignal": true;
599
+ };
600
+ "contentTemplate": {
601
+ "alias": "contentTemplate";
602
+ "required": false;
603
+ "isSignal": true;
604
+ };
605
+ "toolbarTemplate": {
606
+ "alias": "toolbarTemplate";
607
+ "required": false;
608
+ "isSignal": true;
609
+ };
610
+ }, {
611
+ "selected": "selected";
612
+ "filesChange": "filesChange";
613
+ "uploadHandler": "uploadHandler";
614
+ "uploaded": "uploaded";
615
+ "uploadError": "uploadError";
616
+ "removed": "removed";
617
+ "cleared": "cleared";
618
+ "fileOpen": "fileOpen";
619
+ }, never, never, true, never>;
620
+ }