@synopackageland/ui 0.17.11 → 0.17.12
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.
- package/CHANGELOG.md +4 -0
- package/README.md +17 -0
- package/dist/components/composite/upload-queue/UploadQueue.vue.d.ts +2 -0
- package/dist/index.js +851 -851
- package/dist/lib/uploadQueue.d.ts +5 -1
- package/dist/reka-runtime.json +1 -1
- package/package.json +1 -1
|
@@ -9,9 +9,12 @@ export type UploadTask<R = unknown> = {
|
|
|
9
9
|
status: UploadStatus;
|
|
10
10
|
/** The last error's message, when `failed`. */
|
|
11
11
|
error?: string;
|
|
12
|
+
/** A permanent failure: neither automatic nor manual retries are allowed. */
|
|
13
|
+
final?: boolean;
|
|
12
14
|
/** What the upload function resolved with, when `done`. */
|
|
13
15
|
result?: R;
|
|
14
16
|
};
|
|
17
|
+
/** Throw an error with `final: true` to fail immediately and disable manual retries. */
|
|
15
18
|
export type UploadFunction<R> = (file: File, options: {
|
|
16
19
|
signal: AbortSignal;
|
|
17
20
|
onProgress: (loaded: number) => void;
|
|
@@ -19,7 +22,7 @@ export type UploadFunction<R> = (file: File, options: {
|
|
|
19
22
|
export type UploadQueueOptions<R> = {
|
|
20
23
|
/** Files sent at once; 3 by default. */
|
|
21
24
|
concurrency?: number;
|
|
22
|
-
/** Automatic retries after a failure, a second apart and then longer; 2 by default. */
|
|
25
|
+
/** Automatic retries after a non-final failure, a second apart and then longer; 2 by default. */
|
|
23
26
|
retries?: number;
|
|
24
27
|
onDone?: (task: UploadTask<R>) => void;
|
|
25
28
|
onFailed?: (task: UploadTask<R>) => void;
|
|
@@ -28,6 +31,7 @@ export type UploadQueueController<R> = {
|
|
|
28
31
|
tasks: UploadTask<R>[];
|
|
29
32
|
/** Queues the files and returns their tasks. */
|
|
30
33
|
add: (files: Iterable<File>) => UploadTask<R>[];
|
|
34
|
+
/** Retries a failed or canceled task, unless its error was final. */
|
|
31
35
|
retry: (key: string) => void;
|
|
32
36
|
cancel: (key: string) => void;
|
|
33
37
|
cancelAll: () => void;
|
package/dist/reka-runtime.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "2.10.5",
|
|
4
4
|
"delivery": "bundled-patched-esm",
|
|
5
5
|
"patchManifestSha256": "14f10159b60d48ac7a0686f58faf7a30e99898dc267b3c032cf2bdd6052dc52b",
|
|
6
|
-
"bundleSha256": "
|
|
6
|
+
"bundleSha256": "7149f779f52eb15d41b16961f075fa9ac5189b70a0b81845261f2d228c6a4a92",
|
|
7
7
|
"sourceHashes": {
|
|
8
8
|
"shared/useBodyScrollLock.js": "657592f283cb6fd25454abd284a0024af21936cb56e05b762ff0d22b6a979d32",
|
|
9
9
|
"DismissableLayer/DismissableLayer.js": "da05ca544d9822a8e2b71057e78c0e1ef59423aa3893534338fb58e1ecbd1a8d",
|