@nanahoshi/mona-ui 0.32.3 → 0.34.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 (78) hide show
  1. package/docs/api/file-upload.md +174 -0
  2. package/docs/api/grid.md +46 -13
  3. package/docs/api/i18n.md +46 -0
  4. package/docs/api/locales.md +14 -14
  5. package/docs/file-upload.md +516 -0
  6. package/docs/forms.md +2 -0
  7. package/docs/grid-columns.md +121 -17
  8. package/docs/grid-state-export.md +24 -7
  9. package/docs/grid.md +1 -1
  10. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +2 -2
  11. package/fesm2022/nanahoshi-mona-ui-command.mjs +4 -3
  12. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +2 -2
  13. package/fesm2022/nanahoshi-mona-ui-file-upload.mjs +1137 -0
  14. package/fesm2022/{nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs → nanahoshi-mona-ui-grid-grid-colgroup.component-Lv3GunpV.mjs} +2 -2
  15. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-BYH9XbCV.mjs} +8 -3
  16. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-C1qjq2s7.mjs → nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs} +10 -6
  17. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-CgOt2A6O.mjs → nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs} +23 -8
  18. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-tguG2LpN.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-Wndy-_Bt.mjs} +5 -5
  19. package/fesm2022/{nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs → nanahoshi-mona-ui-grid-grid.styles-aPD3c2A6.mjs} +230 -18
  20. package/fesm2022/nanahoshi-mona-ui-grid.mjs +425 -31
  21. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +74 -0
  22. package/fesm2022/nanahoshi-mona-ui-internal-live-announcer.mjs +10 -0
  23. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +3 -2
  24. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +2 -2
  25. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +50 -0
  26. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +38 -0
  27. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +38 -0
  28. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +38 -0
  29. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +29 -0
  30. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +38 -0
  31. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +29 -0
  32. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +29 -0
  33. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +44 -0
  34. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +38 -0
  35. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +44 -0
  36. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +29 -0
  37. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +29 -0
  38. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +29 -0
  39. package/fesm2022/nanahoshi-mona-ui-notification.mjs +2 -2
  40. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +2 -2
  41. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
  42. package/file-upload/package.json +4 -0
  43. package/i18n/catalogs/en-US.messages.json +29 -0
  44. package/internal/live-announcer/package.json +4 -0
  45. package/llms.txt +6 -4
  46. package/locales/ar-sa/ar-sa.messages.json +29 -0
  47. package/locales/de-de/de-de.messages.json +29 -0
  48. package/locales/es-es/es-es.messages.json +29 -0
  49. package/locales/fr-fr/fr-fr.messages.json +29 -0
  50. package/locales/id-id/id-id.messages.json +29 -0
  51. package/locales/it-it/it-it.messages.json +29 -0
  52. package/locales/ja-jp/ja-jp.messages.json +29 -0
  53. package/locales/ko-kr/ko-kr.messages.json +29 -0
  54. package/locales/pl-pl/pl-pl.messages.json +29 -0
  55. package/locales/pt-br/pt-br.messages.json +29 -0
  56. package/locales/ru-ru/ru-ru.messages.json +29 -0
  57. package/locales/tr-tr/tr-tr.messages.json +29 -0
  58. package/locales/zh-cn/zh-cn.messages.json +29 -0
  59. package/locales/zh-tw/zh-tw.messages.json +29 -0
  60. package/package.json +9 -1
  61. package/types/nanahoshi-mona-ui-file-upload.d.ts +366 -0
  62. package/types/nanahoshi-mona-ui-grid.d.ts +142 -64
  63. package/types/nanahoshi-mona-ui-i18n.d.ts +60 -0
  64. package/types/nanahoshi-mona-ui-internal-live-announcer.d.ts +12 -0
  65. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
  66. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
  67. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
  68. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
  69. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
  70. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
  71. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
  72. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
  73. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +29 -0
  74. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
  75. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
  76. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
  77. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
  78. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
@@ -0,0 +1,174 @@
1
+ # `@nanahoshi/mona-ui/file-upload`
2
+
3
+ Everything `@nanahoshi/mona-ui/file-upload` exports.
4
+
5
+ **Guides:** [File Upload](../file-upload.md)
6
+
7
+ ## `FileUploadComponent`
8
+
9
+ Component.
10
+
11
+ Picks files from a drop zone or the browser's file dialog, checks their type, size and count, and lists them. Given
12
+ an `upload` function, it uploads each file with a progress bar, and lets the person cancel or retry an upload.
13
+
14
+ The value is the files the checks let through. With an `upload` function, it's the files that finished uploading,
15
+ so a required field stays invalid until one has.
16
+
17
+ **Selector:** `mona-file-upload`
18
+ **Exported as:** `monaFileUpload`
19
+ **Implements:** `FormValueControl<File[]>`
20
+
21
+ ### Inputs
22
+
23
+ | Name | Type | Default | Description |
24
+ | --- | --- | --- | --- |
25
+ | `accept` | `string` | `""` | File types the dialog offers and the checks accept, as in the native `accept` attribute: extensions such as `.pdf`, MIME types such as `image/png`, or `image/*`. Files dropped on the zone are checked against it too, since the dialog's filter doesn't apply to them. Empty accepts every file. |
26
+ | `aria-describedby` | `string \| null` | `null` | Id of an element that describes the browse button, such as an error message. A form field's hint and errors are added after it. |
27
+ | `aria-label` | `string \| null` | `null` | Accessible name of the group, when no label names it. |
28
+ | `aria-labelledby` | `string \| null` | `null` | Id of the element that names the group. |
29
+ | `autoUpload` | `boolean` | `true` | Uploads each file as soon as it's added. When off, files wait for the upload button, or for `uploadFiles()`. Has no effect without an `upload` function. |
30
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
31
+ | `disabled` | `boolean` | `false` | Turns off the drop zone, the browse button and the list's buttons. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
32
+ | `invalid` | `boolean` | `false` | Marks the upload as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
33
+ | `maxFiles` | `number \| null` | `null` | The most files the list holds, when `multiple` is on. Files past it are listed as rejected. |
34
+ | `maxFileSize` | `number \| null` | `null` | The largest file size in bytes. Larger files are listed as rejected, and not added. |
35
+ | `minFileSize` | `number \| null` | `null` | The smallest file size in bytes. Smaller files, such as empty ones, are listed as rejected. |
36
+ | `multiple` | `boolean` | `true` | Lets the person add several files. When off, a new file replaces the one in the list. |
37
+ | `readonly` | `boolean` | `false` | Keeps the list as it is: files can't be added or removed. |
38
+ | `required` | `boolean` | `false` | Marks the upload as required: it's invalid when touched with no file in its value. |
39
+ | `touched` | `boolean` | `false` | Sets the touched state. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
40
+ | `upload` | `FileUploadHandler \| null` | `null` | Uploads one file, and returns a promise or an observable, such as HttpClient's request with `reportProgress: true` and `observe: "events"`. Without it, the component only picks files, and the value holds them for the form to send. |
41
+ | `value` (two-way) | `File[]` | `[]` | The files the checks let through, or with an `upload` function, the files that finished uploading. Setting it from outside replaces the list, and stops the uploads that are running. |
42
+
43
+ ### Outputs
44
+
45
+ | Name | Type | Description |
46
+ | --- | --- | --- |
47
+ | `remove` | `FileUploadItem` | Emitted when the person removes a file, by its remove or cancel button or by the clear button, with the file as it was. Delete an uploaded file from the server here. |
48
+ | `touch` | `void` | Emitted when focus leaves the component, and when files are dropped on it. The `FormField` directive listens to this to mark the field as touched. |
49
+ | `uploadError` | `FileUploadItem` | Emitted when a file fails to upload, with the error in its `error`. |
50
+ | `uploadSuccess` | `FileUploadItem` | Emitted when a file finishes uploading, with what the upload returned in its `response`. |
51
+ | `valueChange` | `File[]` | Emitted when `value` changes. |
52
+
53
+ ### Properties
54
+
55
+ | Name | Type | Description |
56
+ | --- | --- | --- |
57
+ | `items` (read-only) | `Signal<readonly FileUploadItem[]>` | Every file in the list, with where it stands, in the order they were added. |
58
+ | `uploading` (read-only) | `Signal<boolean>` | Whether any file is uploading. |
59
+
60
+ ### Methods
61
+
62
+ | Signature | Description |
63
+ | --- | --- |
64
+ | `browse(): void` | Opens the browser's file dialog, unless the component is disabled or read-only. |
65
+ | `clearFiles(): void` | Removes every file, stopping the uploads that are running, and emits `remove` for each but the rejected. |
66
+ | `focus(): void` | Moves focus to the browse button. |
67
+ | `uploadFiles(): void` | Uploads every file waiting for the upload button. Does nothing without an `upload` function. |
68
+
69
+ ## `formatFileSize`
70
+
71
+ Function.
72
+
73
+ A file size in the locale, in the largest unit that keeps it at 1 or more: "512 bytes", "1.5 kB", "20 MB". Units are
74
+ multiples of 1024, as limits are usually written (`5 * 1024 * 1024`), so that limit reads as "5 MB".
75
+
76
+ ```typescript
77
+ function formatFileSize(bytes: number, localeId: string): string;
78
+ ```
79
+
80
+ ## `FILE_UPLOAD_DEFAULT_MESSAGES`
81
+
82
+ Constant.
83
+
84
+ ```typescript
85
+ const FILE_UPLOAD_DEFAULT_MESSAGES: MonaFileUploadMessages;
86
+ ```
87
+
88
+ ## `FileUploadContext`
89
+
90
+ Interface.
91
+
92
+ What the upload function gets with each file.
93
+
94
+ ### Properties
95
+
96
+ | Name | Type | Description |
97
+ | --- | --- | --- |
98
+ | `signal` (read-only) | `AbortSignal` | Aborted when the upload stops early: the file is removed, the list is cleared, the value is replaced or the component is destroyed. Pass it to `fetch`. An observable doesn't need it, since it's unsubscribed instead. |
99
+
100
+ ### Methods
101
+
102
+ | Signature | Description |
103
+ | --- | --- |
104
+ | `progress(loaded: number, total?: number): void` | Reports how much of the file has been sent. `total` defaults to the file's size. HttpClient's upload progress events are read without it. |
105
+
106
+ **Used by:** [`FileUploadHandler`](file-upload.md#fileuploadhandler)
107
+
108
+ ## `FileUploadItem`
109
+
110
+ Interface.
111
+
112
+ A file in the upload's list, and where it stands.
113
+
114
+ ### Properties
115
+
116
+ | Name | Type | Description |
117
+ | --- | --- | --- |
118
+ | `error` (read-only) | `unknown` | What the upload failed with, while the status is `failed`. |
119
+ | `file` (read-only) | `File` | |
120
+ | `progress` (read-only) | `number \| null` | How much of the file has been sent, from 0 to 1, while it uploads. Null until the upload function reports progress, which it may never do. |
121
+ | `rejection` (read-only) | `FileUploadRejection \| null` | Why the file wasn't added, while the status is `rejected`. |
122
+ | `response` (read-only) | `unknown` | What the upload function returned for the file, once its status is `uploaded`. |
123
+ | `status` (read-only) | `FileUploadStatus` | |
124
+
125
+ **Used by:** [`FileUploadComponent`](file-upload.md#fileuploadcomponent)
126
+
127
+ ## `FileUploadHandler`
128
+
129
+ Type alias.
130
+
131
+ Uploads one file, and returns a promise or an observable.
132
+
133
+ An observable can be HttpClient's request with `reportProgress: true` and `observe: "events"`: its upload progress
134
+ events move the progress bar, and its response's body becomes the file's `response`. For any other observable, its
135
+ last value does. For a promise, what it resolves to does. A rejected promise or an observable's error marks the file
136
+ `failed`.
137
+
138
+ ```typescript
139
+ type FileUploadHandler = (file: File, context: FileUploadContext) => Observable<unknown> | Promise<unknown>;
140
+ ```
141
+
142
+ **Used by:** [`FileUploadComponent`](file-upload.md#fileuploadcomponent)
143
+
144
+ ## `FileUploadRejection`
145
+
146
+ Type alias.
147
+
148
+ Why a file wasn't added: its type isn't in `accept` (`type`), it's larger than `maxFileSize` (`maxFileSize`) or
149
+ smaller than `minFileSize` (`minFileSize`), or the list already holds as many files as it can (`maxFiles`).
150
+
151
+ ```typescript
152
+ type FileUploadRejection = "maxFileSize" | "maxFiles" | "minFileSize" | "type";
153
+ ```
154
+
155
+ **Used by:** [`FileUploadItem`](file-upload.md#fileuploaditem)
156
+
157
+ ## `FileUploadStatus`
158
+
159
+ Type alias.
160
+
161
+ Where a file in the list stands.
162
+
163
+ - `selected`: added and not uploaded. Without an `upload` function, every file the checks let through stays here.
164
+ With one, a file waits here while `autoUpload` is off.
165
+ - `uploading`: its upload is running.
166
+ - `uploaded`: its upload finished.
167
+ - `failed`: its upload failed, and can be retried.
168
+ - `rejected`: it didn't pass the type, size or count checks. It's listed with the reason, and isn't in the value.
169
+
170
+ ```typescript
171
+ type FileUploadStatus = "failed" | "rejected" | "selected" | "uploaded" | "uploading";
172
+ ```
173
+
174
+ **Used by:** [`FileUploadItem`](file-upload.md#fileuploaditem)
package/docs/api/grid.md CHANGED
@@ -85,6 +85,21 @@ Component.
85
85
  | `title` | `string \| null` | `null` | The title displayed in the command column header. Without one, the localized `commandColumnTitle` message ("Commands"). |
86
86
  | `width` | `number \| null` | `160` | The fixed width of this command column in pixels. |
87
87
 
88
+ ## `GridColumnGroupComponent`
89
+
90
+ Component.
91
+
92
+ Puts a header over the `mona-grid-column`s and `mona-grid-command-column`s inside it. Groups nest: each level adds a
93
+ header row above the column headers.
94
+
95
+ **Selector:** `mona-grid-column-group`
96
+
97
+ ### Inputs
98
+
99
+ | Name | Type | Default | Description |
100
+ | --- | --- | --- | --- |
101
+ | `title` | `string` | `""` | The text shown in the group's header, which also names it for assistive technologies. |
102
+
88
103
  ## `GridEditableDirective`
89
104
 
90
105
  Directive.
@@ -223,6 +238,20 @@ Directive.
223
238
  | --- | --- | --- |
224
239
  | `scrollEnd` | `void` | Emitted when the scroll position reaches the configured threshold from the bottom of the virtualized list. |
225
240
 
241
+ ## `GridExportDirective`
242
+
243
+ Directive.
244
+
245
+ **Selector:** `mona-grid[monaGridExport]`
246
+ **Exported as:** `monaGridExport`
247
+
248
+ ### Methods
249
+
250
+ | Signature | Description |
251
+ | --- | --- |
252
+ | `exportCsv(filename?: string): void` | Exports the visible columns of the current view as CSV (only the loaded page with server binding). |
253
+ | `exportExcel(filename?: string): Promise<void>` | Exports the same rows and columns as `exportCsv` as an Excel workbook (`.xlsx`), with column groups as merged header cells and values that keep their types. Resolves once the download has started. |
254
+
226
255
  ## `GridFilterableDirective`
227
256
 
228
257
  Directive.
@@ -327,19 +356,6 @@ Directive.
327
356
  | --- | --- | --- | --- |
328
357
  | `monaGridEditCommand` | `Row \| null` | `null` | The row the button puts into row edit mode when clicked, usually the command template's `row`. Does nothing while `null` or when the grid isn't in row edit mode. |
329
358
 
330
- ## `GridExportDirective`
331
-
332
- Directive.
333
-
334
- **Selector:** `mona-grid[monaGridExport]`
335
- **Exported as:** `monaGridExport`
336
-
337
- ### Methods
338
-
339
- | Signature | Description |
340
- | --- | --- |
341
- | `exportCsv(filename?: string): void` | Exports the visible columns of the current view as CSV (only the loaded page with server binding). |
342
-
343
359
  ## `GridRemoveCommandDirective`
344
360
 
345
361
  Directive.
@@ -823,6 +839,7 @@ grid scrolls horizontally.
823
839
  | `footerTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridFooterTemplate`, which renders its footer cell, or `null`. |
824
840
  | `format` (read-only) | `ColumnFormat \| null` | How cell values are formatted for display, or `null` to show them as they are. |
825
841
  | `groupFooterTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridGroupFooterTemplate`, which renders its cell in group footer rows, or `null`. |
842
+ | `groups?` (read-only) | `readonly ColumnGroup[]` | The `mona-grid-column-group`s the column sits in, outermost first. Left out, or empty, when it isn't in a group. |
826
843
  | `headerTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridHeaderTemplate`, which replaces the whole header content and receives the column, or `null`. |
827
844
  | `hidden` (read-only) | `boolean` | The column's `hidden` input as set. |
828
845
  | `id` (read-only) | `string` | A unique id generated for the column. |
@@ -861,6 +878,7 @@ Interface.
861
878
  | `footerTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridFooterTemplate`, which renders its footer cell, or `null`. |
862
879
  | `format` (read-only) | `ColumnFormat \| null` | How cell values are formatted for display, or `null` to show them as they are. |
863
880
  | `groupFooterTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridGroupFooterTemplate`, which renders its cell in group footer rows, or `null`. |
881
+ | `groups?` (read-only) | `readonly ColumnGroup[]` | The `mona-grid-column-group`s the column sits in, outermost first. Left out, or empty, when it isn't in a group. |
864
882
  | `headerTemplate` (read-only) | `TemplateRef<unknown> \| null` | The column's `monaGridHeaderTemplate`, which replaces the whole header content and receives the column, or `null`. |
865
883
  | `hidden` (read-only) | `boolean` | The column's `hidden` input as set. |
866
884
  | `id` (read-only) | `string` | A unique id generated for the column. |
@@ -879,6 +897,21 @@ Interface.
879
897
 
880
898
  **Used by:** [`Column`](grid.md#column)
881
899
 
900
+ ## `ColumnGroup`
901
+
902
+ Interface.
903
+
904
+ A `mona-grid-column-group`: a header over the columns inside it.
905
+
906
+ ### Properties
907
+
908
+ | Name | Type | Description |
909
+ | --- | --- | --- |
910
+ | `id` (read-only) | `string` | A unique id generated for the group. |
911
+ | `title` (read-only) | `string` | The text shown in the group's header. |
912
+
913
+ **Used by:** [`ColumnConfig`](grid.md#columnconfig)
914
+
882
915
  ## `ColumnResizeEvent`
883
916
 
884
917
  Interface.
package/docs/api/i18n.md CHANGED
@@ -443,6 +443,51 @@ Interface.
443
443
 
444
444
  **Used by:** [`MonaLocaleMessages`](i18n.md#monalocalemessages)
445
445
 
446
+ ## `MonaFileUploadMessages`
447
+
448
+ Interface.
449
+
450
+ The file upload's drop zone, its list of files, and what it announces as files are added, uploaded and removed.
451
+
452
+ ### Properties
453
+
454
+ | Name | Type | Description |
455
+ | --- | --- | --- |
456
+ | `browse` (read-only) | `string` | The browse button's text, when several files can be added. |
457
+ | `browseFile` (read-only) | `string` | The browse button's text, when one file can be added. |
458
+ | `clear` (read-only) | `string` | Text of the button that removes every file, shown with the upload button while `autoUpload` is off. |
459
+ | `dropFile` (read-only) | `string` | The drop zone's text, when one file can be added. |
460
+ | `dropFiles` (read-only) | `string` | The drop zone's text, when several files can be added. |
461
+ | `dropToAdd` (read-only) | `string` | The drop zone's text while files are dragged over it. |
462
+ | `files` (read-only) | `string` | Name of the list of files. |
463
+ | `invalidType` (read-only) | `string` | Why a file of a type `accept` doesn't list wasn't added. |
464
+ | `readyToUpload` (read-only) | `string` | A file's status while it waits for the upload button. |
465
+ | `upload` (read-only) | `string` | Text of the button that uploads the waiting files, while `autoUpload` is off. |
466
+ | `uploaded` (read-only) | `string` | A file's status once it's uploaded. |
467
+ | `uploadFailed` (read-only) | `string` | A file's status when its upload failed. |
468
+ | `uploading` (read-only) | `string` | A file's status while it uploads. |
469
+
470
+ ### Methods
471
+
472
+ | Signature | Description |
473
+ | --- | --- |
474
+ | `cancel(name: string): string` | Name of the button that stops a file's upload and removes it. |
475
+ | `fileFailed(name: string): string` | Announced when a file's upload fails. |
476
+ | `fileRejected(name: string, reason: string): string` | Announced for a file that wasn't added, with the reason, which is one of the rejection messages. |
477
+ | `fileRemoved(name: string): string` | Announced when a file is removed. |
478
+ | `filesAdded(count: number): string` | Announced when files are added. |
479
+ | `fileTypes(types: string): string` | The accepted types under the drop zone, as a list such as "PDF, PNG or JPG". |
480
+ | `fileUploaded(name: string): string` | Announced when a file's upload finishes. |
481
+ | `maxFiles(count: number): string` | The most files under the drop zone. |
482
+ | `maxFileSize(size: string): string` | The largest file size under the drop zone, formatted in the locale. |
483
+ | `remove(name: string): string` | Name of the button that removes a file. |
484
+ | `retry(name: string): string` | Name of the button that uploads a failed file again. |
485
+ | `tooLarge(size: string): string` | Why a file larger than `maxFileSize` wasn't added, with the size formatted in the locale. |
486
+ | `tooMany(count: number): string` | Why a file past `maxFiles` wasn't added. |
487
+ | `tooSmall(size: string): string` | Why a file smaller than `minFileSize` wasn't added, with the size formatted in the locale. |
488
+
489
+ **Used by:** [`FILE_UPLOAD_DEFAULT_MESSAGES`](file-upload.md#file-upload-default-messages), [`MonaLocaleMessages`](i18n.md#monalocalemessages)
490
+
446
491
  ## `MonaListBoxMessages`
447
492
 
448
493
  Interface.
@@ -1236,6 +1281,7 @@ Interface.
1236
1281
  | `dropdownList` | `MonaDropdownListMessages` |
1237
1282
  | `dropdowns` | `MonaDropdownsMessages` |
1238
1283
  | `editor` | `MonaEditorMessages` |
1284
+ | `fileUpload` | `MonaFileUploadMessages` |
1239
1285
  | `filter` | `MonaFilterMessages` |
1240
1286
  | `formField` | `MonaFormFieldMessages` |
1241
1287
  | `grid` | `MonaGridMessages` |