filecove 0.1.0 → 0.2.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 (203) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/buttons/toolbar-actions.d.ts +1 -1
  3. package/dist/components/buttons/tooltip-icon-button.d.ts +1 -1
  4. package/dist/components/downloads/download-panel.d.ts +1 -1
  5. package/dist/components/drag/drag-preview.d.ts +24 -0
  6. package/dist/components/file-manager/announcer.d.ts +1 -1
  7. package/dist/components/file-manager/content/file-grid.d.ts +1 -1
  8. package/dist/components/file-manager/content/file-list.d.ts +1 -1
  9. package/dist/components/file-manager/content/folder-view.d.ts +1 -1
  10. package/dist/components/file-manager/content/item-icon.d.ts +1 -1
  11. package/dist/components/file-manager/content/search-results.d.ts +1 -1
  12. package/dist/components/file-manager/content/search-tabs.d.ts +1 -1
  13. package/dist/components/file-manager/content/trash-bar.d.ts +1 -1
  14. package/dist/components/file-manager/context-menu/context-menu.d.ts +1 -1
  15. package/dist/components/file-manager/dialogs/conflict-step.d.ts +1 -1
  16. package/dist/components/file-manager/dialogs/delete-dialog.d.ts +3 -2
  17. package/dist/components/file-manager/dialogs/image-viewer.d.ts +1 -1
  18. package/dist/components/file-manager/dialogs/name-dialog.d.ts +1 -1
  19. package/dist/components/file-manager/dialogs/paste-dialog.d.ts +1 -1
  20. package/dist/components/file-manager/dialogs/preview-dialog.d.ts +2 -2
  21. package/dist/components/file-manager/dialogs/restore-dialog.d.ts +1 -1
  22. package/dist/components/file-manager/dialogs/shortcuts-dialog.d.ts +1 -1
  23. package/dist/components/file-manager/dialogs/transfer-dialog.d.ts +2 -2
  24. package/dist/components/file-manager/dialogs/upload-dialog.d.ts +1 -1
  25. package/dist/components/file-manager/file-manager.d.ts +1 -1
  26. package/dist/components/file-manager/header-bar/header-bar.d.ts +1 -1
  27. package/dist/components/file-manager/header-bar/history-menu.d.ts +1 -1
  28. package/dist/components/file-manager/header-bar/path-bar.d.ts +1 -1
  29. package/dist/components/file-manager/header-bar/search-field.d.ts +1 -1
  30. package/dist/components/file-manager/header-bar/search-sections-menu.d.ts +1 -1
  31. package/dist/components/file-manager/header-bar/view-menu.d.ts +1 -1
  32. package/dist/components/file-manager/notice-bar.d.ts +1 -1
  33. package/dist/components/file-manager/properties-pane.d.ts +2 -2
  34. package/dist/components/file-manager/sidebar/location-item.d.ts +1 -1
  35. package/dist/components/file-manager/sidebar/main-menu.d.ts +1 -1
  36. package/dist/components/file-manager/sidebar/sidebar.d.ts +2 -2
  37. package/dist/components/icons/create-icon.d.ts +1 -1
  38. package/dist/components/icons/icon-provider.d.ts +1 -1
  39. package/dist/components/icons/icon-slot.d.ts +1 -1
  40. package/dist/components/icons/icon.d.ts +1 -1
  41. package/dist/components/media-manager/asset-delete.d.ts +20 -8
  42. package/dist/components/media-manager/asset-hold.d.ts +1 -1
  43. package/dist/components/media-manager/asset-option.d.ts +13 -2
  44. package/dist/components/media-manager/asset-trail.d.ts +1 -1
  45. package/dist/components/media-manager/choice-list.d.ts +1 -1
  46. package/dist/components/media-manager/choices-pane.d.ts +1 -1
  47. package/dist/components/media-manager/group-create.d.ts +1 -1
  48. package/dist/components/media-manager/group-path.d.ts +8 -2
  49. package/dist/components/media-manager/library-list.d.ts +4 -2
  50. package/dist/components/media-manager/media-asset.d.ts +19 -7
  51. package/dist/components/media-manager/media-edit-many.d.ts +33 -0
  52. package/dist/components/media-manager/media-fields.d.ts +1 -1
  53. package/dist/components/media-manager/media-filter-chips.d.ts +17 -0
  54. package/dist/components/media-manager/media-filters-dialog.d.ts +39 -0
  55. package/dist/components/media-manager/media-filters.d.ts +37 -0
  56. package/dist/components/media-manager/media-form.d.ts +3 -1
  57. package/dist/components/media-manager/media-frame.d.ts +7 -3
  58. package/dist/components/media-manager/media-grid.d.ts +34 -5
  59. package/dist/components/media-manager/media-group.d.ts +1 -1
  60. package/dist/components/media-manager/media-header.d.ts +20 -3
  61. package/dist/components/media-manager/media-manager.d.ts +33 -10
  62. package/dist/components/media-manager/media-move.d.ts +19 -11
  63. package/dist/components/media-manager/media-picker.d.ts +25 -7
  64. package/dist/components/media-manager/media-picture.d.ts +1 -1
  65. package/dist/components/media-manager/media-process.d.ts +1 -1
  66. package/dist/components/media-manager/media-row.d.ts +1 -1
  67. package/dist/components/media-manager/media-tile.d.ts +1 -1
  68. package/dist/components/media-manager/media-upload.d.ts +28 -6
  69. package/dist/components/media-manager/picker-frame.d.ts +6 -2
  70. package/dist/components/media-manager/selection-bar.d.ts +25 -0
  71. package/dist/components/media-manager/upload-tile.d.ts +5 -3
  72. package/dist/components/properties/properties-panel.d.ts +9 -3
  73. package/dist/components/properties/property-display.d.ts +1 -1
  74. package/dist/components/properties/property-editor.d.ts +1 -1
  75. package/dist/components/properties/property-input.d.ts +1 -1
  76. package/dist/components/transfers/transfer-panel.d.ts +1 -1
  77. package/dist/components/ui/dialog.d.ts +1 -1
  78. package/dist/components/ui/root-providers.d.ts +1 -1
  79. package/dist/components/uploads/upload-panel.d.ts +8 -2
  80. package/dist/contexts/cut-context.d.ts +1 -1
  81. package/dist/contexts/data-context.d.ts +3 -3
  82. package/dist/contexts/direction-context.d.ts +1 -1
  83. package/dist/contexts/drag-context.d.ts +1 -1
  84. package/dist/contexts/icon-context.d.ts +1 -1
  85. package/dist/contexts/locale-context.d.ts +1 -1
  86. package/dist/contexts/moving-context.d.ts +1 -1
  87. package/dist/hooks/use-asset-states.d.ts +1 -1
  88. package/dist/hooks/use-clipboard-follow.d.ts +2 -2
  89. package/dist/hooks/use-cut-ids.d.ts +1 -1
  90. package/dist/hooks/use-dev-checks.d.ts +16 -0
  91. package/dist/hooks/use-download-queue.d.ts +3 -3
  92. package/dist/hooks/use-dragged-ids.d.ts +1 -1
  93. package/dist/hooks/use-drop-target.d.ts +1 -1
  94. package/dist/hooks/use-entry-drag.d.ts +2 -2
  95. package/dist/hooks/use-files-drop.d.ts +7 -1
  96. package/dist/hooks/use-folder.d.ts +3 -3
  97. package/dist/hooks/use-icon-config.d.ts +1 -1
  98. package/dist/hooks/use-level-filters.d.ts +112 -0
  99. package/dist/hooks/use-level-search.d.ts +8 -6
  100. package/dist/hooks/use-locale.d.ts +3 -3
  101. package/dist/hooks/use-location-history.d.ts +1 -1
  102. package/dist/hooks/use-long-press.d.ts +1 -1
  103. package/dist/hooks/use-marquee.d.ts +1 -1
  104. package/dist/hooks/use-match-count.d.ts +5 -4
  105. package/dist/hooks/use-media-search.d.ts +22 -8
  106. package/dist/hooks/use-moving-ids.d.ts +2 -2
  107. package/dist/hooks/use-preview-contents.d.ts +1 -1
  108. package/dist/hooks/use-properties.d.ts +2 -2
  109. package/dist/hooks/use-scroll-measure.d.ts +1 -1
  110. package/dist/hooks/use-search.d.ts +6 -5
  111. package/dist/hooks/use-selection.d.ts +1 -1
  112. package/dist/hooks/use-text-direction.d.ts +1 -1
  113. package/dist/hooks/use-thumbnail.d.ts +1 -1
  114. package/dist/hooks/use-transfer-queue.d.ts +5 -5
  115. package/dist/hooks/use-tree-rows.d.ts +1 -1
  116. package/dist/hooks/use-tree-selection.d.ts +1 -1
  117. package/dist/hooks/use-upload-queue.d.ts +7 -5
  118. package/dist/hooks/use-virtual-lines.d.ts +1 -1
  119. package/dist/hooks/use-wheel-zoom.d.ts +1 -1
  120. package/dist/icon-sets/filled.d.ts +1 -1
  121. package/dist/icon-sets/outlined.d.ts +1 -1
  122. package/dist/icon-sets/rounded.d.ts +1 -1
  123. package/dist/icon-sets/sharp.d.ts +1 -1
  124. package/dist/icon-sets/two-tone.d.ts +1 -1
  125. package/dist/index.d.ts +18 -18
  126. package/dist/index.js +4307 -1129
  127. package/dist/index.js.map +1 -1
  128. package/dist/locales/en-us.d.ts +1 -1
  129. package/dist/store/download-queue.d.ts +1 -1
  130. package/dist/store/folder-store.d.ts +1 -1
  131. package/dist/store/properties-cache.d.ts +9 -1
  132. package/dist/store/thumbnail-cache.d.ts +1 -1
  133. package/dist/store/transfer-across.d.ts +1 -1
  134. package/dist/store/transfer-queue.d.ts +2 -2
  135. package/dist/store/upload-queue.d.ts +28 -8
  136. package/dist/styles/classes.d.ts +30 -2
  137. package/dist/styles/layout.d.ts +2 -2
  138. package/dist/styles/media-layout.d.ts +1 -1
  139. package/dist/styles.css +1095 -367
  140. package/dist/styles.layer.css +1095 -367
  141. package/dist/types/action.d.ts +3 -3
  142. package/dist/types/adapter.d.ts +164 -11
  143. package/dist/types/api.d.ts +21 -9
  144. package/dist/types/clipboard.d.ts +2 -2
  145. package/dist/types/download.d.ts +1 -1
  146. package/dist/types/drag.d.ts +4 -4
  147. package/dist/types/folder.d.ts +1 -1
  148. package/dist/types/index.d.ts +27 -27
  149. package/dist/types/locale.d.ts +161 -4
  150. package/dist/types/main-menu.d.ts +1 -1
  151. package/dist/types/media.d.ts +127 -11
  152. package/dist/types/menu.d.ts +4 -4
  153. package/dist/types/navigation.d.ts +2 -2
  154. package/dist/types/preview.d.ts +1 -1
  155. package/dist/types/previewer.d.ts +1 -1
  156. package/dist/types/properties.d.ts +20 -2
  157. package/dist/types/property-definition.d.ts +58 -1
  158. package/dist/types/search.d.ts +2 -2
  159. package/dist/types/section.d.ts +2 -2
  160. package/dist/types/selection.d.ts +3 -3
  161. package/dist/types/slots.d.ts +12 -7
  162. package/dist/types/transfer.d.ts +2 -2
  163. package/dist/types/tree.d.ts +2 -2
  164. package/dist/types/undo.d.ts +3 -3
  165. package/dist/types/upload.d.ts +79 -3
  166. package/dist/types/view.d.ts +5 -5
  167. package/dist/utils/action-groups.d.ts +1 -1
  168. package/dist/utils/clipboard.d.ts +2 -2
  169. package/dist/utils/dom.d.ts +13 -0
  170. package/dist/utils/download.d.ts +1 -1
  171. package/dist/utils/field-errors.d.ts +1 -1
  172. package/dist/utils/files.d.ts +9 -5
  173. package/dist/utils/format.d.ts +1 -1
  174. package/dist/utils/groups.d.ts +1 -1
  175. package/dist/utils/hidden.d.ts +1 -1
  176. package/dist/utils/keyboard.d.ts +1 -1
  177. package/dist/utils/media.d.ts +82 -5
  178. package/dist/utils/menu-position.d.ts +1 -1
  179. package/dist/utils/names.d.ts +1 -1
  180. package/dist/utils/navigation.d.ts +1 -1
  181. package/dist/utils/path.d.ts +2 -2
  182. package/dist/utils/permissions.d.ts +2 -2
  183. package/dist/utils/preview.d.ts +1 -1
  184. package/dist/utils/property-value.d.ts +3 -1
  185. package/dist/utils/search.d.ts +1 -1
  186. package/dist/utils/sections.d.ts +1 -1
  187. package/dist/utils/selection.d.ts +1 -1
  188. package/dist/utils/shortcut.d.ts +1 -1
  189. package/dist/utils/slots.d.ts +2 -2
  190. package/dist/utils/sort.d.ts +1 -1
  191. package/dist/utils/transfer.d.ts +1 -1
  192. package/dist/utils/trash.d.ts +1 -1
  193. package/dist/utils/undo.d.ts +1 -1
  194. package/dist/utils/zoom.d.ts +2 -2
  195. package/docs/README.md +1 -1
  196. package/docs/adapter.md +66 -6
  197. package/docs/customizing.md +31 -2
  198. package/docs/getting-started.md +3 -1
  199. package/docs/media-manager.md +194 -7
  200. package/docs/search.md +2 -0
  201. package/docs/uploads-and-downloads.md +2 -1
  202. package/package.json +1 -1
  203. package/dist/components/file-manager/drag-preview.d.ts +0 -22
@@ -1,6 +1,6 @@
1
- import type { EntriesInFolder, FileEntry } from "./adapter";
2
- import type { IconSource } from "./icon";
3
- import type { FolderRef, Section } from "./section";
1
+ import type { EntriesInFolder, FileEntry } from "./adapter.js";
2
+ import type { IconSource } from "./icon.js";
3
+ import type { FolderRef, Section } from "./section.js";
4
4
  /**
5
5
  * What a context menu was opened on: "selection" for entries, "folder" for a folder's empty
6
6
  * space, the path bar menu, or a section in the sidebar.
@@ -1,5 +1,5 @@
1
- import type { FolderRef } from "./section";
2
- import type { ViewMode } from "./view";
1
+ import type { FolderRef } from "./section.js";
2
+ import type { ViewMode } from "./view.js";
3
3
  /** A file or folder as the adapter reports it. */
4
4
  export interface FileEntry {
5
5
  /**
@@ -182,6 +182,15 @@ export interface SearchOptions {
182
182
  * are left out of the results then.
183
183
  */
184
184
  showHidden: boolean;
185
+ /**
186
+ * What a media library's filter form holds (`MediaSection.filterForm`), by the app's own keys, for
187
+ * the backend to narrow what it finds by, such as `{ language: "de", type: "certificate" }`: the
188
+ * form's defaults while the user has set nothing. With a filter set, `query` may be empty, and
189
+ * everything below `rootId` the filters let through is wanted. What they mean is the backend's;
190
+ * the media manager never reads them. Undefined from the file manager, and from a library with no
191
+ * filter form.
192
+ */
193
+ filters?: Readonly<Record<string, unknown>>;
185
194
  }
186
195
  /** One entry `search` found, and where it is. */
187
196
  export interface SearchMatch {
@@ -270,6 +279,48 @@ export interface TransferOptions extends OperationOptions {
270
279
  */
271
280
  onEntryDone: (entry: FileEntry, made?: FileEntry) => void;
272
281
  }
282
+ /** Passed to `delete`. */
283
+ export interface DeleteOptions extends OperationOptions {
284
+ /**
285
+ * Reports an entry given that has been deleted, all of it, as soon as it has. Calling it is
286
+ * optional, and it's what tells, should the delete then be refused partway, one entry still in
287
+ * use, say, or cancelled, which entries went: they're gone at once, the media manager names those
288
+ * left, and the media manager and the file manager try only those again. Without it, a delete that
289
+ * failed is tried again for every entry, as nothing says which went.
290
+ */
291
+ onEntryDone: (entry: FileEntry) => void;
292
+ }
293
+ /**
294
+ * What Edit fields… changes of several entries at once, by the definitions' `field`, for
295
+ * `updateManyProperties`: the same for every one of them. A field left out of all three is left as
296
+ * each entry has it.
297
+ */
298
+ export interface PropertyChanges {
299
+ /**
300
+ * Values put in place of what each entry holds, as `updateProperties` takes them (see
301
+ * `PropertyValues`): a string, a number, a boolean, a date as an ISO string, or a list of them, and
302
+ * `null` for one cleared, which JSON keeps. Without `updateManyProperties`, `updateProperties` is
303
+ * handed the same, with each list it changes as that entry's now are.
304
+ */
305
+ values: PropertyValues;
306
+ /**
307
+ * Items added to a list (a definition with `multiple`) of each entry, those it holds already left
308
+ * as they are, as tags are added to several in one go.
309
+ */
310
+ added: Readonly<Record<string, readonly unknown[]>>;
311
+ /** Items taken out of a list of each entry, those it doesn't hold left out. */
312
+ removed: Readonly<Record<string, readonly unknown[]>>;
313
+ }
314
+ /** Passed to `updateManyProperties`. */
315
+ export interface UpdateManyOptions extends OperationOptions {
316
+ /**
317
+ * Reports an entry given whose changes have been saved, as soon as they have. Calling it is
318
+ * optional, and it's what tells, should the backend then refuse some, one it won't let change, say,
319
+ * or the user leave, which went: the media manager names those left, and Save tries only those
320
+ * again. Without it, a refusal is tried again for every entry.
321
+ */
322
+ onEntryDone: (entry: FileEntry) => void;
323
+ }
273
324
  /** What `copy` and `move` may resolve with. An object, so fields can be added later without a breaking change. */
274
325
  export interface TransferResult {
275
326
  /**
@@ -301,6 +352,33 @@ export interface TrashResult {
301
352
  */
302
353
  entries: FileEntry[];
303
354
  }
355
+ /**
356
+ * What `upload` may resolve with in place of the file's entry, to say more of where it went: that
357
+ * the backend already had the file, as one matching uploads by checksum does, or that it put it in
358
+ * another folder than the one it was uploaded into. An object rather than more arguments, so fields
359
+ * can be added later without a breaking change.
360
+ */
361
+ export interface UploadResult {
362
+ /** The file's entry as it now is, or the entry the backend already had in its place. */
363
+ entry: FileEntry;
364
+ /**
365
+ * The backend already had this file and hands that back rather than storing it again. The media
366
+ * manager says so, "“front.jpg” is already in the library", and selects it while picking, as an
367
+ * upload is; the upload panel's row says "Already there". Leave it out for a file stored anew.
368
+ */
369
+ existing?: boolean;
370
+ /**
371
+ * The folders holding `entry`, outermost first, when it isn't in the folder it was uploaded into:
372
+ * from the library's or section's root down, not counting the root, as `SearchMatch.trail` has
373
+ * them, or from higher up, such as the top of the backend, in which case the media manager reads
374
+ * it from below the library's root, wherever that is in it. Empty for an entry right in the root.
375
+ * Leave it out when the entry is in the folder it was uploaded into. The media manager says where
376
+ * it is and offers to show it there; give whole `FileEntry`s where a library's `groupHeader` or
377
+ * `groupForm` reads more of a group. An asset in another library, below another root, can't be
378
+ * shown from this one: store it again, or reject with a message saying where it is.
379
+ */
380
+ trail?: FolderRef[];
381
+ }
304
382
  /** Passed to `upload`. */
305
383
  export interface UploadOptions extends OperationOptions {
306
384
  /**
@@ -326,6 +404,34 @@ export interface UploadOptions extends OperationOptions {
326
404
  */
327
405
  values?: Readonly<Record<string, unknown>>;
328
406
  }
407
+ /** Passed to `replace`. */
408
+ export interface ReplaceOptions extends OperationOptions {
409
+ /**
410
+ * Reports how much of the file has been sent, as `upload`'s does. Calling it is optional; without
411
+ * it the file shows as being sent with no figure.
412
+ */
413
+ onProgress: (loaded: number, total: number) => void;
414
+ /**
415
+ * What the library's upload form held as the user sent the file, as `upload` is handed it, the
416
+ * form being asked of the new file too (`MediaSection.uploadForm`, told the asset it replaces).
417
+ * Undefined where the library asks nothing of it.
418
+ */
419
+ values?: Readonly<Record<string, unknown>>;
420
+ }
421
+ /** Passed to `uploadPart`. */
422
+ export interface UploadPartOptions extends OperationOptions {
423
+ /**
424
+ * Reports how much of the file has been sent, as `upload`'s does. Calling it is optional; without
425
+ * it the file shows as being sent with no figure.
426
+ */
427
+ onProgress: (loaded: number, total: number) => void;
428
+ /**
429
+ * What the part's upload form held as the user sent the file (`PropertyUpload.form`), such as a
430
+ * subtitle's language or whether it's forced; the same object for every file sent together, and
431
+ * kept for Try again. Undefined where the part asks nothing of its files.
432
+ */
433
+ values?: Readonly<Record<string, unknown>>;
434
+ }
329
435
  /** Passed to `content`. */
330
436
  export interface ContentOptions {
331
437
  /**
@@ -593,10 +699,12 @@ export interface FileAdapter {
593
699
  * the user has already confirmed. It also empties the trash (`Section.trash`), with every entry
594
700
  * its root lists, and deletes an entry moved into a folder another adapter serves once it has
595
701
  * been copied there, one entry a call. Without it, the file manager has no way to delete, nor to
596
- * move entries to another adapter, and the media manager's asset view has no Delete button, for an
597
- * asset or a group. Reject with an `Error` to show its message to the user.
702
+ * move entries to another adapter, and the media manager has no Delete, for an asset, a group or
703
+ * several. Report each entry as it's deleted (`onEntryDone`), so one refused partway, as an asset
704
+ * still in use may be, says which went. Reject with an `Error` to show its message to the user,
705
+ * naming what was refused and why.
598
706
  */
599
- delete?(entries: FileEntry[], options: OperationOptions): Promise<void>;
707
+ delete?(entries: FileEntry[], options: DeleteOptions): Promise<void>;
600
708
  /**
601
709
  * Moves entries to the backend's trash, folders with everything in them, from where `restore`
602
710
  * puts them back. The entries share a parent. It's done at once, without asking, as it can be
@@ -624,11 +732,43 @@ export interface FileAdapter {
624
732
  * serves, one after another, read through that adapter's `content`. Resolve with the file's
625
733
  * entry as it now is, so the file manager can show where it went, even when it was kept under
626
734
  * another name beside one of the same name, and undo a copy from another adapter; without it,
627
- * the file is found by its name, which a file kept both no longer has. Without `upload`, the
628
- * file manager has no way to upload, nor to take entries from another adapter. Reject with an
629
- * `Error` to show its message beside the file, e.g. when it's too large or not allowed.
630
- */
631
- upload?(file: File, folderId: string, options: UploadOptions): Promise<FileEntry | void>;
735
+ * the file is found by its name, which a file kept both no longer has. Resolve with an
736
+ * `UploadResult` instead to say the backend already had the file and hands that back, or put it
737
+ * in another folder: the media manager then says so and points to it, rather than waiting for it
738
+ * where it was uploaded. Without `upload`, the file manager has no way to upload, nor to take
739
+ * entries from another adapter. Reject with an `Error` to show its message beside the file, e.g.
740
+ * when it's too large or not allowed.
741
+ */
742
+ upload?(file: File, folderId: string, options: UploadOptions): Promise<FileEntry | UploadResult | void>;
743
+ /**
744
+ * Puts a new file in an asset's place, from the media manager's asset view: the asset stays, with
745
+ * its id, its properties and wherever it's used, and only its file changes, as a photo used by
746
+ * twenty products is replaced once for all of them. The file is checked against the library's
747
+ * `acceptUploads` first, and its `uploadForm` asked of it (`values`). Sent as `upload` is, with
748
+ * its progress, cancel and Try again in the upload panel. Resolve with the entry as it now is, when the
749
+ * backend has it at hand; either way the library is listed again, so list the asset with
750
+ * `FileEntry.processing` while what's made from the new file is being made, and it's followed as
751
+ * an upload's is. Whether the asset keeps its name or takes the new file's is the backend's call.
752
+ * The id has to stay, or what's kept of the asset by it is lost. Reject with an `Error` to show its
753
+ * message beside the file in the upload panel. Without it, nothing is offered.
754
+ */
755
+ replace?(entry: FileEntry, file: File, options: ReplaceOptions): Promise<FileEntry | void>;
756
+ /**
757
+ * Uploads a file into a part of an asset, from the media manager's asset view: a subtitle or an
758
+ * audio track into a video, a poster of its own, a transcript into a piece of audio. The asset
759
+ * stays, with its id and wherever it's used; the file becomes part of it, as the backend decides.
760
+ * `part` is the app's name for it, which a property it defines says it takes files into
761
+ * (`PropertyDefinition.upload`), such as "subtitles", so the backend knows where it goes, and
762
+ * `values` what the part's form asked of it, such as a subtitle's language. The file is checked
763
+ * against the part's `accept` first. Sent as `upload` is, with its progress, cancel and Try again
764
+ * in the upload panel. Resolve with the asset as it now is, when the backend has it at hand;
765
+ * either way its properties are asked for again and the library is listed again, so list the
766
+ * asset with `FileEntry.processing` while what's made of the new part is being made, and it's
767
+ * followed as an upload's is. Reject with an `Error` to show its message beside the file in the
768
+ * upload panel and under the property, such as a language it has subtitles in already. Without
769
+ * it, nothing is offered.
770
+ */
771
+ uploadPart?(entry: FileEntry, part: string, file: File, options: UploadPartOptions): Promise<FileEntry | void>;
632
772
  /**
633
773
  * Says where a file's contents are, for the preview or to download it (`purpose`): a URL to load
634
774
  * them from, or the bytes. For the preview, a URL is used as it is, in an `<img>`, `<video>`,
@@ -686,7 +826,9 @@ export interface FileAdapter {
686
826
  *
687
827
  * The media manager and the picker call it for their search, with the open group's id as `rootId`,
688
828
  * or the library's at its root, and show the matches in the order given, ignoring `score`. Groups
689
- * may be among them. Without it, they filter the open level by name.
829
+ * may be among them. Without it, they filter the open level by name, and offer no filters. A
830
+ * library with a filter form hands what it holds as `filters`, and asks with nothing typed while
831
+ * any filter is set (`SearchOptions.filters`).
690
832
  */
691
833
  search?(rootId: string, query: string, options: SearchOptions): Promise<SearchResult>;
692
834
  /**
@@ -712,6 +854,17 @@ export interface FileAdapter {
712
854
  * out of what the backend won't let the user change. Without it, nothing is editable.
713
855
  */
714
856
  updateProperties?(entry: FileEntry, values: PropertyValues, options: OperationOptions): Promise<EntryProperties | void>;
857
+ /**
858
+ * Saves the same changes to several entries at once, from the media manager's Edit fields… for
859
+ * what's selected while browsing: values put in place, and items added to and taken out of lists,
860
+ * each entry keeping what it has of the rest (`PropertyChanges`), as a backend saving them in one
861
+ * query or job does. The entries may be in several groups, as a search's results are. Report each
862
+ * entry as it's saved (`onEntryDone`), and reject with an `Error` to show its message, naming
863
+ * those not reported, which Save then tries again. Without it, the media manager saves each entry
864
+ * through `updateProperties`, a few at a time, reading a list's items from `properties` first to
865
+ * add to or take from it.
866
+ */
867
+ updateManyProperties?(entries: FileEntry[], changes: PropertyChanges, options: UpdateManyOptions): Promise<void>;
715
868
  /**
716
869
  * Counts everything in folders, all the way down, for the properties panel: how many files and
717
870
  * folders, and the files' sizes added up, together for all of them. The folders may be in
@@ -1,9 +1,9 @@
1
1
  import type { SetStateAction } from "react";
2
- import type { ActionContext } from "./action";
3
- import type { FileAdapter, FileEntry } from "./adapter";
4
- import type { MediaChoice, MediaLocation } from "./media";
5
- import type { FileManagerLocation, GoToPathResult } from "./navigation";
6
- import type { SearchScope } from "./search";
2
+ import type { ActionContext } from "./action.js";
3
+ import type { FileAdapter, FileEntry } from "./adapter.js";
4
+ import type { MediaChoice, MediaLocation } from "./media.js";
5
+ import type { FileManagerLocation, GoToPathResult } from "./navigation.js";
6
+ import type { SearchScope } from "./search.js";
7
7
  export interface RefreshOptions {
8
8
  /**
9
9
  * Only the sections this adapter serves, the file manager's `adapter` or a section's own, since
@@ -139,11 +139,15 @@ export interface MediaManagerApi<V = Record<string, unknown>> {
139
139
  closeView: () => void;
140
140
  /**
141
141
  * Opens the search, as the search button and Ctrl+F do, and focuses it; `query` is put in it, or
142
- * what's typed stays when omitted. Returns false when there's nothing to search: no library, or an
143
- * asset or a step shown in its place.
142
+ * what's typed stays when omitted, and `filters` put in place of what the library's filter form
143
+ * holds (`MediaSearch.filters`), or what's set stays when omitted. Returns false when there's
144
+ * nothing to search: no library, or an asset or a step shown in its place.
145
+ */
146
+ search: (query?: string, filters?: Readonly<Record<string, unknown>>) => boolean;
147
+ /**
148
+ * Ends the search, what's typed and the filters both, giving the focus back if the field had it.
149
+ * Escape in the field, and its ✕, only clear what's typed while filters are set.
144
150
  */
145
- search: (query?: string) => boolean;
146
- /** Closes the search, as Escape does, which gives the focus back if it had it. */
147
151
  closeSearch: () => void;
148
152
  /**
149
153
  * Puts these in place of what's selected, as `value` does, in this order, each matched to its library
@@ -165,6 +169,14 @@ export interface MediaManagerApi<V = Record<string, unknown>> {
165
169
  * when the level open takes no files.
166
170
  */
167
171
  upload: (files?: readonly File[]) => boolean;
172
+ /**
173
+ * Opens the browser's folder picker, as the header's "Upload a folder" does, the folder picked made
174
+ * a group of the level open with everything in it, as one dropped is, after the upload step. Only
175
+ * from a click or a key press, as `upload`'s picker. Returns false when the level open takes no
176
+ * folders (its library makes no groups there, or can't make one of a folder) or the browser can't
177
+ * pick one.
178
+ */
179
+ uploadFolder: () => boolean;
168
180
  /**
169
181
  * Lists libraries and groups again wherever the media manager has them, e.g. after the backend
170
182
  * changed them some other way: those with these ids, and every one listing one of them, or every one
@@ -1,5 +1,5 @@
1
- import type { FileAdapter } from "./adapter";
2
- import type { EntryGroup } from "./menu";
1
+ import type { FileAdapter } from "./adapter.js";
2
+ import type { EntryGroup } from "./menu.js";
3
3
  /**
4
4
  * How the clipboard's entries are looked for again after a change that may have left their ids
5
5
  * naming nothing, or other entries, as path ids do.
@@ -1,4 +1,4 @@
1
- import type { EntriesInFolder, FileAdapter, FileContent, FileEntry } from "./adapter";
1
+ import type { EntriesInFolder, FileAdapter, FileContent, FileEntry } from "./adapter.js";
2
2
  /** A file ready for the browser to save: where it is, and the name to save it under, or "" to leave it to its server. */
3
3
  export interface PreparedDownload {
4
4
  content: FileContent;
@@ -1,7 +1,7 @@
1
- import type { FileEntry } from "./adapter";
2
- import type { Clipboard } from "./clipboard";
3
- import type { EntryGroup } from "./menu";
4
- import type { FolderRef, Section } from "./section";
1
+ import type { FileEntry } from "./adapter.js";
2
+ import type { Clipboard } from "./clipboard.js";
3
+ import type { EntryGroup } from "./menu.js";
4
+ import type { FolderRef, Section } from "./section.js";
5
5
  /**
6
6
  * Entries being dragged: a clipboard of their own, which is cut or copied only once they're
7
7
  * dropped, by the modifier keys held at that moment.
@@ -1,4 +1,4 @@
1
- import type { EntryPermissions, FileEntry } from "./adapter";
1
+ import type { EntryPermissions, FileEntry } from "./adapter.js";
2
2
  export interface FolderState {
3
3
  status: "loading" | "ready" | "error";
4
4
  /** The latest listing. Kept while a refresh is loading so the view doesn't blank out. */
@@ -1,27 +1,27 @@
1
- export type { ActionContext, ActionGroup, ActionTarget, ContextFolder, FileAction } from "./action";
2
- export type { FileManagerApi, MediaManagerApi, RefreshOptions } from "./api";
3
- export type { AssetProcessing, AssetReady, AssetState, ConflictPolicy, ContentOptions, DownloadContent, DownloadOptions, EntriesInFolder, EntryPermissions, EntryProperties, EntryTotals, FileAdapter, FileContent, FileEntry, ListOptions, ListResult, MeasureOptions, MediaInfo, NameCheck, OperationOptions, PropertiesOptions, PropertyField, PropertyGroup, PropertyValue, PropertyValues, RestoreOptions, SearchMatch, SearchOptions, SearchResult, ThumbnailOptions, TransferOptions, TransferResult, TrashInfo, TrashResult, UploadOptions, } from "./adapter";
4
- export type { AdapterIds, Clipboard, ClipboardLookup, ClipboardPart } from "./clipboard";
5
- export type { DownloadItem, DownloadStatus, PreparedDownload } from "./download";
6
- export type { DraggedEntries, DragSource, Drop, DropEffect, DropInto, DropKeys, DropTarget, HeldPress } from "./drag";
7
- export type { Clash, EntryClash, FolderState } from "./folder";
8
- export type { IconComponent, IconName, IconOverrides, IconSet, IconSource } from "./icon";
9
- export type { DownloadLocaleText, FileManagerLocaleText, Locale, LocaleText, MediaManagerLocaleText, PropertiesLocaleText, TransferLocaleText, UploadLocaleText, } from "./locale";
10
- export type { FileManagerLimits, MediaManagerLimits } from "./limits";
11
- export type { MainMenuGroup, MainMenuItem } from "./main-menu";
12
- export type { AssetHold, GroupPicks, AssetStates, FollowedAssets, MediaAction, MediaActionContext, MediaActionGroup, MediaAssetDraw, MediaAssetLookProps, MediaAssetParams, MediaChoice, MediaPickerValue, MediaForm, MediaFormParams, MediaFormRefusal, MediaFormState, MediaGroupForm, MediaGroupFormParams, MediaGroupTarget, MediaGridHandle, MediaKind, MediaLayout, MediaLayouts, MediaLocation, MediaLocationChangeReason, MediaPickForm, MediaPickFormParams, MediaProcessForm, MediaProcessFormParams, MediaSection, MediaSearch, MediaSectionGroup, MediaUploadForm, MediaUploadFormParams, MediaViewed, } from "./media";
13
- export type { EntryGroup, MenuPosition, MenuRequest, OpenMenu, PasteFiles, RunShortcut, ToolbarAction, ToolbarGroup, } from "./menu";
14
- export type { FileManagerLocation, GoToPathResult, HistoryStop, LocationChangeReason, PathProblem, PathResult, PlaceName, } from "./navigation";
15
- export type { PreviewContent, PreviewKind, PreviewPlan, TextExcerpt } from "./preview";
16
- export type { FilePreviewer, PreviewerProps, PreviewerReads } from "./previewer";
17
- export type { FieldErrors, PropertyDefinition, PropertyDefinitionGroup, PropertyEditParams, PropertyErrorKeyParams, PropertyOption, PropertyParams, PropertyRenderParams, PropertyType, } from "./property-definition";
18
- export type { CountTarget, EditableField, PropertiesItem, PropertiesSubject, PropertySave, Requested, SubjectEntry, } from "./properties";
19
- export type { FileManagerSearch, SearchHit, SearchScope, SearchTarget, SectionSearch } from "./search";
20
- export type { FolderRef, Section, SectionFolder, SectionGroup, SectionImports } from "./section";
21
- export type { FileManagerEmptyProps, FileManagerEntrySlotParams, FileManagerErrorProps, FileManagerNoResultsProps, FileManagerSidebarFooterProps, FileManagerSlotPlace, FileManagerSlotProps, FileManagerSlots, MediaAssetSlotParams, MediaEmptyProps, MediaErrorProps, MediaManagerSlotProps, MediaManagerSlots, MediaNoResultsProps, MediaPickerSlotProps, MediaPickerSlots, MediaSlotPlace, SlotAttributes, SlotAttributesOf, SlotLoadingProps, } from "./slots";
22
- export type { MovingIds, MovingKind, MovingKinds, TransferItem, TransferKind, TransferStatus, WentEntry, } from "./transfer";
23
- export type { MadePair, UndoAction, UndoChange, UndoDirection, UndoFolder, UndoFolders, UndoGroup, UndoHistory, UndoMove, UndoRestore, UndoStep, UndoTarget, } from "./undo";
24
- export type { EntrySelection, SelectionDetails, SelectModifiers, TreeSelection, TreeTarget } from "./selection";
25
- export type { DroppedFiles, FileUploadItem, FolderContents, FolderSource, FolderUpload, FolderUploadItem, MediaUploadCheck, RefusedName, UploadFailure, UploadItem, UploadStatus, } from "./upload";
26
- export type { CaptionRow, DividerRow, ErrorRow, FlatTree, FolderRow, SectionRow, StatusRow, TreeGuide, TreeItemRow, TreeReveal, TreeRow, } from "./tree";
27
- export type { Arrival, EntryLayout, EntryOrigin, FileViewProps, GridSize, ScrollTarget, ScrollView, ShownSpan, SortDirection, SortKey, SortOrder, TextDirection, ViewMode, ViewZoom, VirtualLines, ZoomStep, } from "./view";
1
+ export type { ActionContext, ActionGroup, ActionTarget, ContextFolder, FileAction } from "./action.js";
2
+ export type { FileManagerApi, MediaManagerApi, RefreshOptions } from "./api.js";
3
+ export type { AssetProcessing, AssetReady, AssetState, ConflictPolicy, ContentOptions, DeleteOptions, DownloadContent, DownloadOptions, EntriesInFolder, EntryPermissions, EntryProperties, EntryTotals, FileAdapter, FileContent, FileEntry, ListOptions, ListResult, MeasureOptions, MediaInfo, NameCheck, OperationOptions, PropertiesOptions, PropertyField, PropertyGroup, PropertyValue, PropertyChanges, PropertyValues, ReplaceOptions, RestoreOptions, SearchMatch, SearchOptions, SearchResult, ThumbnailOptions, TransferOptions, TransferResult, TrashInfo, TrashResult, UpdateManyOptions, UploadOptions, UploadPartOptions, UploadResult, } from "./adapter.js";
4
+ export type { AdapterIds, Clipboard, ClipboardLookup, ClipboardPart } from "./clipboard.js";
5
+ export type { DownloadItem, DownloadStatus, PreparedDownload } from "./download.js";
6
+ export type { DraggedEntries, DragSource, Drop, DropEffect, DropInto, DropKeys, DropTarget, HeldPress } from "./drag.js";
7
+ export type { Clash, EntryClash, FolderState } from "./folder.js";
8
+ export type { IconComponent, IconName, IconOverrides, IconSet, IconSource } from "./icon.js";
9
+ export type { DownloadLocaleText, FileManagerLocaleText, Locale, LocaleText, MediaManagerLocaleText, PropertiesLocaleText, TransferLocaleText, UploadLocaleText, } from "./locale.js";
10
+ export type { FileManagerLimits, MediaManagerLimits } from "./limits.js";
11
+ export type { MainMenuGroup, MainMenuItem } from "./main-menu.js";
12
+ export type { AssetHold, GroupPicks, AssetStates, FollowedAssets, MediaAction, MediaActionContext, MediaActionGroup, MediaAssetDraw, MediaAssetLookProps, MediaAssetParams, MediaChoice, MediaPickerValue, MediaForm, MediaFormParams, MediaFormRefusal, MediaFormState, MediaGroupForm, MediaGroupFormParams, MediaGroupTarget, MediaGridHandle, MediaFilterChip, MediaFilterForm, MediaFilterFormParams, MediaFiltersVariant, MediaKind, MediaLayout, MediaLayouts, MediaLocation, MediaLocationChangeReason, MediaPickForm, MediaPickFormParams, MediaProcessForm, MediaProcessFormParams, MediaSection, MediaSearch, MediaSectionGroup, MediaUploadForm, MediaUploadFormParams, MediaViewed, } from "./media.js";
13
+ export type { EntryGroup, MenuPosition, MenuRequest, OpenMenu, PasteFiles, RunShortcut, ToolbarAction, ToolbarGroup, } from "./menu.js";
14
+ export type { FileManagerLocation, GoToPathResult, HistoryStop, LocationChangeReason, PathProblem, PathResult, PlaceName, } from "./navigation.js";
15
+ export type { PreviewContent, PreviewKind, PreviewPlan, TextExcerpt } from "./preview.js";
16
+ export type { FilePreviewer, PreviewerProps, PreviewerReads } from "./previewer.js";
17
+ export type { FieldErrors, PropertyDefinition, PropertyDefinitionGroup, PropertyEditParams, PropertyErrorKeyParams, PropertyOption, PropertyParams, PropertyRenderParams, PropertyType, PropertyUpload, } from "./property-definition.js";
18
+ export type { CountTarget, EditableField, PartUploads, PropertiesItem, PropertiesSubject, PropertySave, Requested, SubjectEntry, } from "./properties.js";
19
+ export type { FileManagerSearch, SearchHit, SearchScope, SearchTarget, SectionSearch } from "./search.js";
20
+ export type { FolderRef, Section, SectionFolder, SectionGroup, SectionImports } from "./section.js";
21
+ export type { FileManagerEmptyProps, FileManagerEntrySlotParams, FileManagerErrorProps, FileManagerNoResultsProps, FileManagerSidebarFooterProps, FileManagerSlotPlace, FileManagerSlotProps, FileManagerSlots, MediaAssetSlotParams, MediaEmptyProps, MediaErrorProps, MediaManagerSlotProps, MediaManagerSlots, MediaNoResultsProps, MediaPickerSlotProps, MediaPickerSlots, MediaSlotPlace, SlotAttributes, SlotAttributesOf, SlotLoadingProps, } from "./slots.js";
22
+ export type { MovingIds, MovingKind, MovingKinds, TransferItem, TransferKind, TransferStatus, WentEntry, } from "./transfer.js";
23
+ export type { MadePair, UndoAction, UndoChange, UndoDirection, UndoFolder, UndoFolders, UndoGroup, UndoHistory, UndoMove, UndoRestore, UndoStep, UndoTarget, } from "./undo.js";
24
+ export type { EntrySelection, SelectionDetails, SelectModifiers, TreeSelection, TreeTarget } from "./selection.js";
25
+ export type { DroppedFiles, FileUploadItem, FolderContents, FolderMaker, FolderSource, FolderUpload, FolderUploadItem, FolderUploadOptions, MediaUploadCheck, RefusedName, UploadFailure, UploadItem, UploadPartTarget, UploadPlace, UploadStatus, } from "./upload.js";
26
+ export type { CaptionRow, DividerRow, ErrorRow, FlatTree, FolderRow, SectionRow, StatusRow, TreeGuide, TreeItemRow, TreeReveal, TreeRow, } from "./tree.js";
27
+ export type { Arrival, EntryLayout, EntryOrigin, FileViewProps, GridSize, ScrollTarget, ScrollView, ShownSpan, SortDirection, SortKey, SortOrder, TextDirection, ViewMode, ViewZoom, VirtualLines, ZoomStep, } from "./view.js";
@@ -1,5 +1,5 @@
1
- import type { FileEntry } from "./adapter";
2
- import type { UndoChange } from "./undo";
1
+ import type { FileEntry } from "./adapter.js";
2
+ import type { UndoChange } from "./undo.js";
3
3
  type EntryKind = FileEntry["kind"];
4
4
  /**
5
5
  * What the upload panel says, and the name the upload queue gives a folder to keep both. Kept apart
@@ -37,11 +37,30 @@ export interface UploadLocaleText {
37
37
  uploadFailed: string;
38
38
  /** Read for an uploaded file's check mark. */
39
39
  uploadDone: string;
40
+ /**
41
+ * An uploaded file's status, in place of its size, when the backend already had it and handed
42
+ * that back rather than storing it again; where it is follows after " · ".
43
+ */
44
+ uploadAlreadyThere: string;
40
45
  /** `fileName` is the file's name, or the folder's for a folder. */
41
46
  uploadCancel: (fileName: string) => string;
42
47
  uploadRetry: (fileName: string) => string;
43
48
  /** The button on an uploaded file or folder that shows it in the folder it went into. */
44
49
  uploadShow: (fileName: string) => string;
50
+ /**
51
+ * A file being put in an asset's place (`FileAdapter.replace`), in place of the folder it goes
52
+ * into, after " · ", while it waits, is sent or was cancelled; the row is named by the asset, and
53
+ * `fileName`, the new file's, comes isolated.
54
+ */
55
+ uploadReplacingWith: (fileName: string) => string;
56
+ /** The same, once the file is in the asset's place, after its size and " · ". */
57
+ uploadReplacedWith: (fileName: string) => string;
58
+ /**
59
+ * A file being uploaded into a part of an asset (`FileAdapter.uploadPart`), in place of the folder
60
+ * it goes into, after " · ": `part` is what the property showing the part is called, in the app's
61
+ * language, and `name`, the asset's, comes isolated.
62
+ */
63
+ uploadPartOf: (part: string, name: string) => string;
45
64
  /** A folder's status while what's in it is read, before its files are known. */
46
65
  uploadPreparing: string;
47
66
  /** A folder's status while it uploads: how many of its files are uploaded so far. */
@@ -222,6 +241,13 @@ export interface PropertiesLocaleText {
222
241
  propertiesCopied: (label: string) => string;
223
242
  /** The button that edits a property the backend lets the user change; `label` is the property's. */
224
243
  propertiesEdit: (label: string) => string;
244
+ /**
245
+ * The button uploading files into what a property shows of an asset (`PropertyDefinition.upload`),
246
+ * when it doesn't name itself; `label` is the property's.
247
+ */
248
+ propertiesUploadTo: (label: string) => string;
249
+ /** Names the list, under a property, of the files being uploaded into it; `label` is the property's. */
250
+ propertiesPartUploads: (label: string) => string;
225
251
  /** In place of an editable property's value while it has none. */
226
252
  propertiesNotSet: string;
227
253
  /** The button saving an edited property. */
@@ -761,7 +787,7 @@ export interface FileManagerLocaleText extends UploadLocaleText, DownloadLocaleT
761
787
  * file manager, and the few of the file manager's that both show, such as the type labels. `enUS`
762
788
  * holds them along with the file manager's.
763
789
  */
764
- export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLocaleText, Pick<FileManagerLocaleText, "loading" | "cancel" | "close" | "tryAgain" | "search" | "searchIn" | "clearSearch" | "closeSearch" | "searchResultCount" | "gridView" | "listView" | "upload" | "uploadTitle" | "uploadFailedTitle" | "uploadFoldersFailedTitle" | "uploadFoldersOnly" | "uploadFoldersLeftOut" | "uploadTypesOnly" | "uploadTypesLeftOut" | "uploadNamesRefused" | "itemCount" | "typeFolder" | "typeFile" | "typeImage" | "typeVideo" | "typeAudio" | "typeText" | "typeArchive"> {
790
+ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLocaleText, TransferLocaleText, Pick<FileManagerLocaleText, "loading" | "cancel" | "close" | "tryAgain" | "create" | "delete" | "deleteTitle" | "deleteFailed" | "deleteDone" | "moveTitle" | "moveDone" | "movePartlyDone" | "moveFailedNotice" | "selectAll" | "selectionActions" | "search" | "searchIn" | "searchFailed" | "clearSearch" | "closeSearch" | "searchResultCount" | "gridView" | "listView" | "upload" | "uploadTitle" | "uploadFailedTitle" | "uploadFoldersFailedTitle" | "uploadFoldersOnly" | "uploadFoldersLeftOut" | "uploadTypesOnly" | "uploadTypesLeftOut" | "uploadNamesRefused" | "itemCount" | "typeFolder" | "typeFile" | "typeImage" | "typeVideo" | "typeAudio" | "typeText" | "typeArchive"> {
765
791
  /** The sidebar's list of libraries (sections), for screen readers. */
766
792
  mediaLibraries: string;
767
793
  /** The header's button opening the drawer of libraries, where there's no room to dock them. */
@@ -788,6 +814,23 @@ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLoca
788
814
  mediaGroupDetails: (name: string) => string;
789
815
  /** Names the header's button holding the app's actions that don't show as buttons. */
790
816
  mediaMoreActions: string;
817
+ /** The header's button showing the library's filters (`MediaSection.filterForm`), and the card or dialog holding them. */
818
+ mediaFilters: string;
819
+ /** That button's name while some are set, which its badge shows too. */
820
+ mediaFiltersSet: (count: number) => string;
821
+ /** Names the row of chips under the header, one for each filter set (`MediaFilterForm.chips`). */
822
+ mediaFiltersApplied: string;
823
+ /** A chip's name in that row, `label` being what it says: pressed, it removes that filter. */
824
+ mediaRemoveFilter: (label: string) => string;
825
+ /** The card's button, and the chips row's, putting every filter back to its defaults; the dialog's, what it holds. */
826
+ mediaClearFilters: string;
827
+ /**
828
+ * At the foot of the card, while the form's `ready` holds what's set back without saying why, and
829
+ * of the dialog, beside its Apply held back for that.
830
+ */
831
+ mediaFiltersHeld: string;
832
+ /** The filters dialog's main button, applying what it holds (`filtersVariant` `"dialog"`). */
833
+ mediaApplyFilters: string;
791
834
  /** The header's button making a group in the level open (`MediaSection.createGroups`). */
792
835
  mediaNewGroup: string;
793
836
  /** The label of the field asking its name. */
@@ -796,6 +839,8 @@ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLoca
796
839
  mediaCreateGroupFailed: string;
797
840
  /** Said once it's made; `name` comes isolated. */
798
841
  mediaGroupCreated: (name: string) => string;
842
+ /** Said once it's made in `MediaPicker`, which goes into it; `name` comes isolated. */
843
+ mediaInNewGroup: (name: string) => string;
799
844
  /** A group's details' button opening its form (`MediaSection.groupForm`). */
800
845
  mediaEditGroup: string;
801
846
  /** That form's title, without one of its own; `name` comes isolated. */
@@ -816,6 +861,49 @@ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLoca
816
861
  mediaMoveNoGroups: string;
817
862
  /** Why Move here is held back: it's in this level already. */
818
863
  mediaMoveAlreadyHere: string;
864
+ /**
865
+ * Under the question before deleting, in the asset view or for what's selected: that it can't be
866
+ * undone, and that a group goes with everything in it, when there's one among them.
867
+ */
868
+ mediaDeleteWarning: (count: number, hasGroups: boolean) => string;
869
+ /** Why Move here is held back for several: every one of them is in this level already. */
870
+ mediaMoveAllHere: string;
871
+ /** The selection bar's button choosing where what's selected goes, opening the move step. */
872
+ mediaMoveTo: string;
873
+ /**
874
+ * Under the backend's message, when a delete of several was refused partway: those that weren't
875
+ * deleted, the first three of them by name, isolated, and how many there are in all.
876
+ */
877
+ mediaNotDeleted: (names: readonly string[], count: number) => string;
878
+ /** The selection bar's button changing fields of what's selected, opening Edit fields. */
879
+ mediaEditFields: string;
880
+ /** Edit fields' title: `name` of the one, isolated, or how many. */
881
+ mediaEditFieldsTitle: (count: number, name: string) => string;
882
+ /** At the top of Edit fields, saying that only the fields ticked change, the same for all of them. */
883
+ mediaEditFieldsHint: string;
884
+ /** A field's checkbox in Edit fields, ticked to change it; `label` is the app's. */
885
+ mediaChangeField: (label: string) => string;
886
+ /** Beside a field in Edit fields whose value isn't the same for all of them. */
887
+ mediaFieldMixed: string;
888
+ /** The name of the choice of how a list's items change in Edit fields; `label` is the app's. */
889
+ mediaListChange: (label: string) => string;
890
+ /** The ways a list changes in Edit fields: its items added to each one's, taken out of them, or put in their place. */
891
+ mediaListAdd: string;
892
+ mediaListRemove: string;
893
+ mediaListReplace: string;
894
+ /** Why Save is held back in Edit fields: no field is ticked. */
895
+ mediaEditFieldsNone: string;
896
+ /** Why Save is held back in Edit fields: a field to be filled in is ticked and empty; `label` is the app's. */
897
+ mediaEditFieldsRequired: (label: string) => string;
898
+ /** Said once Edit fields has saved all of them: `name` of the one, isolated, or how many. */
899
+ mediaFieldsSaved: (count: number, name: string) => string;
900
+ /** Why Edit fields' save failed, when the backend didn't say. */
901
+ mediaSaveFieldsFailed: (count: number) => string;
902
+ /**
903
+ * Under the backend's message, when Edit fields' save was refused for some: those not saved, the
904
+ * first three of them by name, isolated, and how many there are in all.
905
+ */
906
+ mediaNotSaved: (names: readonly string[], count: number) => string;
819
907
  /** Why Move here is held back: the library says no group can be in this level (`createGroups`). */
820
908
  mediaMoveNoGroupsHere: string;
821
909
  /** Why Move here is held back: the backend says this level can't be written to. */
@@ -865,7 +953,7 @@ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLoca
865
953
  mediaDimensions: (width: string, height: string) => string;
866
954
  /** A tile's button, and Alt+Enter, opening the asset in the library's place; `name` comes isolated. */
867
955
  mediaOpenAsset: (name: string) => string;
868
- /** The buttons going back to the library or the group something's in; `library` is its name. */
956
+ /** The buttons going back to the library or the group something's in; `library` is its name, isolated. */
869
957
  mediaBackToLibrary: (library: string) => string;
870
958
  /** The asset view's buttons going to the asset before or after it in the library. */
871
959
  mediaPreviousAsset: string;
@@ -882,6 +970,40 @@ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLoca
882
970
  mediaUploading: string;
883
971
  /** One of them, its tile's progress bar's name; `name` comes isolated. */
884
972
  mediaUploadingFile: (name: string) => string;
973
+ /**
974
+ * Said as an upload ends when the backend already had the file and handed that back, the upload
975
+ * panel's row showing where it is; `name` is the file's and `place` the groups it's in, or the
976
+ * library's label at its root, both isolated.
977
+ */
978
+ mediaUploadExisting: (name: string, place: string) => string;
979
+ /**
980
+ * Said as an upload ends when the backend put the file in another group than the one it was
981
+ * uploaded into; `name` and `place` as for `mediaUploadExisting`.
982
+ */
983
+ mediaUploadElsewhere: (name: string, place: string) => string;
984
+ /** The header's button, beside Upload, picking a folder to make a group of, where the level takes folders. */
985
+ mediaUploadFolder: string;
986
+ /** The upload step's list of the folders about to be made groups of, for screen readers. */
987
+ mediaUploadFolders: string;
988
+ /** The upload step's note while it has folders: what's made of them. */
989
+ mediaUploadFoldersNote: string;
990
+ /**
991
+ * A folder on the upload step, once read: how many files it holds all the way down, and how many
992
+ * folders inside it, all the way down, each to be a group inside the one it makes.
993
+ */
994
+ mediaUploadFolderHolds: (files: number, groups: number) => string;
995
+ /** A folder on the upload step going into the group of its name already at that level. */
996
+ mediaUploadFolderMerged: string;
997
+ /** A folder on the upload step holding files, none of which the library takes, so it's left out. */
998
+ mediaUploadFolderNothing: string;
999
+ /** A folder on the upload step the browser couldn't read, so it's left out. */
1000
+ mediaUploadFolderUnread: string;
1001
+ /**
1002
+ * Why a folder uploaded wasn't made a group, listed under its upload's row: the library makes no
1003
+ * group in that place, or its group form won't make one of it there; `place` is the group it would
1004
+ * have gone in, or the library's label, isolated.
1005
+ */
1006
+ mediaGroupRefusedIn: (place: string) => string;
885
1007
  /**
886
1008
  * An asset its backend is still processing, on its tile, where the backend says nothing of what
887
1009
  * it's doing; its `label` stands in its place, and a percent follows either after " · ".
@@ -903,6 +1025,41 @@ export interface MediaManagerLocaleText extends PropertiesLocaleText, UploadLoca
903
1025
  mediaProcessUnavailable: string;
904
1026
  /** Said once the adapter's `process` has taken an asset on, as the step closes; `name` comes isolated. */
905
1027
  mediaProcessSent: (name: string) => string;
1028
+ /** The asset view's button putting a new file in the asset's place (`FileAdapter.replace`). */
1029
+ mediaReplaceFile: string;
1030
+ /** The title of the step asking what's to be made of the new file; `name`, the asset's, comes isolated. */
1031
+ mediaReplaceTitle: (name: string) => string;
1032
+ /** The title of that step when the file picked is of a type the library doesn't take; `name` comes isolated. */
1033
+ mediaReplaceRefusedTitle: (name: string) => string;
1034
+ /** The step's list of the file about to take the asset's place. */
1035
+ mediaReplaceNewFile: string;
1036
+ /** The step's button sending it. */
1037
+ mediaReplace: string;
1038
+ /**
1039
+ * An asset whose file is being replaced, on its tile and under its view's header, while the new
1040
+ * file is sent; a percent follows after " · " once the adapter says how far along it is.
1041
+ */
1042
+ mediaReplacing: string;
1043
+ /** Said once a new file is in an asset's place; `name`, the asset's, comes isolated. */
1044
+ mediaReplaceDone: (name: string) => string;
1045
+ /**
1046
+ * The title of the step asking what's to be made of files uploaded into a part of an asset
1047
+ * (`PropertyUpload.form`), and when some are left out for their type: `part` is what the property
1048
+ * is called, in the app's language, and `name`, the asset's, comes isolated.
1049
+ */
1050
+ mediaPartTitle: (count: number, part: string, name: string) => string;
1051
+ /** The title of that step when none of the files picked is of a type the part takes. */
1052
+ mediaPartRefusedTitle: (count: number, part: string, name: string) => string;
1053
+ /**
1054
+ * An asset files are being uploaded into a part of, on its tile and under its view's header; a
1055
+ * percent follows after " · " once the adapter says how far along it is. `part` is the property's label.
1056
+ */
1057
+ mediaUploadingPart: (part: string) => string;
1058
+ /**
1059
+ * Said once a file is in a part of an asset: `fileName` and `name`, the asset's, come isolated,
1060
+ * `part` is the property's label.
1061
+ */
1062
+ mediaPartUploaded: (fileName: string, part: string, name: string) => string;
906
1063
  /** Over an upload form, its `validate` having refused it without saying why. */
907
1064
  mediaUploadRefused: string;
908
1065
  /** A pick's row, while its form isn't ready and doesn't say why (`MediaForm.ready`). */