@uploadcare/file-uploader 1.19.4-alpha.3 → 1.19.4
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/abstract/CTX.d.ts +2 -2
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +1 -1
- package/abstract/SolutionBlock.d.ts +1 -1
- package/abstract/UploaderBlock.d.ts +1 -1
- package/abstract/UploaderPublicApi.d.ts +2 -2
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +4 -4
- package/abstract/buildOutputCollectionState.js +1 -1
- package/blocks/CameraSource/CameraSource.d.ts +1 -1
- package/blocks/DropArea/DropArea.d.ts +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +1 -1
- package/blocks/FileItem/FileItem.d.ts +1 -1
- package/blocks/FileItem/FileItemConfig.d.ts +1 -1
- package/blocks/FileItem/FileItemConfig.d.ts.map +1 -1
- package/blocks/FileItem/FileItemConfig.js +3 -3
- package/blocks/SimpleBtn/SimpleBtn.d.ts +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +1 -1
- package/blocks/Thumb/Thumb.d.ts +1 -1
- package/blocks/UploadList/UploadList.d.ts +1 -1
- package/env.d.ts +1 -1
- package/env.js +1 -1
- package/index.ssr.d.ts +1 -1
- package/index.ssr.js +1 -1
- package/package.json +2 -4
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +1 -1
- package/types/exported.d.ts +51 -51
- package/web/file-uploader.iife.min.js +1 -1
- package/web/file-uploader.min.js +1 -1
- package/web/uc-cloud-image-editor.min.js +1 -1
- package/web/uc-file-uploader-inline.min.js +1 -1
- package/web/uc-file-uploader-minimal.min.js +1 -1
- package/web/uc-file-uploader-regular.min.js +1 -1
- package/web/uc-img.min.js +1 -1
package/abstract/CTX.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export function uploaderBlockCtx(fnCtx: import("./Block").Block): {
|
|
|
10
10
|
'*commonProgress': number;
|
|
11
11
|
'*uploadList': never[];
|
|
12
12
|
'*uploadQueue': Queue;
|
|
13
|
-
/** @type {
|
|
14
|
-
'*collectionErrors':
|
|
13
|
+
/** @type {import('../types').OutputErrorCollection[]} */
|
|
14
|
+
'*collectionErrors': import("../types").OutputErrorCollection[];
|
|
15
15
|
/** @type {import('../types').OutputCollectionState | null} */
|
|
16
16
|
'*collectionState': import("../types").OutputCollectionState | null;
|
|
17
17
|
/** @type {import('@uploadcare/upload-client').UploadcareGroup | null} */
|
package/abstract/CTX.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CTX.d.ts","sourceRoot":"","sources":["CTX.js"],"names":[],"mappings":"AAGO,+BAA2B;AAG3B,wCADK,OAAO,SAAS,EAAE,KAAK;;;;;;EAejC;AAGK,wCADK,OAAO,SAAS,EAAE,KAAK;;;;IAMjC,
|
|
1
|
+
{"version":3,"file":"CTX.d.ts","sourceRoot":"","sources":["CTX.js"],"names":[],"mappings":"AAGO,+BAA2B;AAG3B,wCADK,OAAO,SAAS,EAAE,KAAK;;;;;;EAejC;AAGK,wCADK,OAAO,SAAS,EAAE,KAAK;;;;IAMjC,yDAAyD;yBAA9C,OAAO,UAAU,EAAE,qBAAqB,EAAE;IAErD,8DAA8D;wBAAnD,OAAO,UAAU,EAAE,qBAAqB,GAAG,IAAI;IAE1D,yEAAyE;kBAA9D,OAAO,2BAA2B,EAAE,eAAe,GAAG,IAAI;IAErE,0BAA0B;sBAAf,GAAG,CAAC,MAAM,CAAC;IAEtB,8EAA8E;6BAAnE,OAAO,2BAA2B,EAAE,oBAAoB,GAAG,IAAI;;;;;;EAE1E;sBArCoB,2BAA2B"}
|
package/abstract/CTX.js
CHANGED
|
@@ -26,7 +26,7 @@ export const uploaderBlockCtx = (fnCtx) => ({
|
|
|
26
26
|
'*commonProgress': 0,
|
|
27
27
|
'*uploadList': [],
|
|
28
28
|
'*uploadQueue': new Queue(1),
|
|
29
|
-
/** @type {
|
|
29
|
+
/** @type {import('../types').OutputErrorCollection[]} */
|
|
30
30
|
'*collectionErrors': [],
|
|
31
31
|
/** @type {import('../types').OutputCollectionState | null} */
|
|
32
32
|
'*collectionState': null,
|
|
@@ -5,7 +5,7 @@ export class SolutionBlock extends Block {
|
|
|
5
5
|
'*commonProgress': number;
|
|
6
6
|
'*uploadList': never[];
|
|
7
7
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
8
|
-
'*collectionErrors':
|
|
8
|
+
'*collectionErrors': import("../index.js").OutputErrorCollection[];
|
|
9
9
|
'*collectionState': import("../index.js").OutputCollectionState | null;
|
|
10
10
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
11
11
|
'*uploadTrigger': Set<string>;
|
|
@@ -7,7 +7,7 @@ export class UploaderBlock extends ActivityBlock {
|
|
|
7
7
|
'*commonProgress': number;
|
|
8
8
|
'*uploadList': never[];
|
|
9
9
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
10
|
-
'*collectionErrors':
|
|
10
|
+
'*collectionErrors': import("../types").OutputErrorCollection[];
|
|
11
11
|
'*collectionState': import("../types").OutputCollectionState | null;
|
|
12
12
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
13
13
|
'*uploadTrigger': Set<string>;
|
|
@@ -69,9 +69,9 @@ export class UploaderPublicApi {
|
|
|
69
69
|
* @param {string} entryId
|
|
70
70
|
* @returns {import('../types/exported.js').OutputFileEntry<TStatus>}
|
|
71
71
|
*/
|
|
72
|
-
getOutputItem
|
|
72
|
+
getOutputItem<TStatus extends import("../types").OutputFileStatus>(entryId: string): import("../types/exported.js").OutputFileEntry<TStatus>;
|
|
73
73
|
/** @template {import('../types').OutputCollectionStatus} TStatus */
|
|
74
|
-
getOutputCollectionState
|
|
74
|
+
getOutputCollectionState<TStatus extends import("../types").OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
|
|
75
75
|
/** @param {Boolean} [force] */
|
|
76
76
|
initFlow: (force?: boolean) => void;
|
|
77
77
|
doneFlow: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAqBA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,iBAAkB,KAJP,MAIU,EAAE,+BAHZ;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAGT,KAF3C,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,kBAAmB,MAJR,MAIY,EAAE,+BAHd;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAGP,KAF7C,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,oBAAqB,QAJV,MAIgB,EAAE,+BAHlB;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAGH,KAFjD,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,oBAAqB,MAJV,IAIc,EAAE,yCAHhB;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MA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AAO,oBAAoB,EAAE,YAAY,CAGrD;IAEF,8BAA8B;IAC9B,gBAAiB,QADL,OACW,UAYrB;IAEF;;;OAGG;IACH,0BAOC;CACF;2CA3X0C,iCAAiC"}
|
|
@@ -215,7 +215,7 @@ export class UploaderPublicApi {
|
|
|
215
215
|
* @param {string} entryId
|
|
216
216
|
* @returns {import('../types/exported.js').OutputFileEntry<TStatus>}
|
|
217
217
|
*/
|
|
218
|
-
getOutputItem
|
|
218
|
+
getOutputItem(entryId) {
|
|
219
219
|
const uploadEntryData = /** @type {import('./uploadEntrySchema.js').UploadEntryData} */ (
|
|
220
220
|
Data.getCtx(entryId).store
|
|
221
221
|
);
|
|
@@ -260,14 +260,14 @@ export class UploaderPublicApi {
|
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
return /** @type {import('../types/exported.js').OutputFileEntry<TStatus>} */ (outputItem);
|
|
263
|
-
}
|
|
263
|
+
}
|
|
264
264
|
|
|
265
265
|
/** @template {import('../types').OutputCollectionStatus} TStatus */
|
|
266
|
-
getOutputCollectionState
|
|
266
|
+
getOutputCollectionState() {
|
|
267
267
|
return /** @type {ReturnType<typeof buildOutputCollectionState<TStatus>>} */ (
|
|
268
268
|
buildOutputCollectionState(this._ctx)
|
|
269
269
|
);
|
|
270
|
-
}
|
|
270
|
+
}
|
|
271
271
|
|
|
272
272
|
/** @param {Boolean} [force] */
|
|
273
273
|
initFlow = (force = false) => {
|
|
@@ -43,7 +43,7 @@ export function buildOutputCollectionState(uploaderBlock) {
|
|
|
43
43
|
progress: () => {
|
|
44
44
|
return uploaderBlock.$['*commonProgress'];
|
|
45
45
|
},
|
|
46
|
-
/** @returns {ReturnType<
|
|
46
|
+
/** @returns {ReturnType<import('../types').OutputErrorFile>[]} */
|
|
47
47
|
errors: () => {
|
|
48
48
|
return uploaderBlock.$['*collectionErrors'];
|
|
49
49
|
},
|
|
@@ -64,7 +64,7 @@ export class CameraSource extends UploaderBlock {
|
|
|
64
64
|
'*commonProgress': number;
|
|
65
65
|
'*uploadList': never[];
|
|
66
66
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
67
|
-
'*collectionErrors':
|
|
67
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
68
68
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
69
69
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
70
70
|
'*uploadTrigger': Set<string>;
|
|
@@ -12,7 +12,7 @@ export class DropArea extends UploaderBlock {
|
|
|
12
12
|
'*commonProgress': number;
|
|
13
13
|
'*uploadList': never[];
|
|
14
14
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
15
|
-
'*collectionErrors':
|
|
15
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
16
16
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
17
17
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
18
18
|
'*uploadTrigger': Set<string>;
|
|
@@ -22,7 +22,7 @@ export class ExternalSource extends UploaderBlock {
|
|
|
22
22
|
'*commonProgress': number;
|
|
23
23
|
'*uploadList': never[];
|
|
24
24
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
25
|
-
'*collectionErrors':
|
|
25
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
26
26
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
27
27
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
28
28
|
'*uploadTrigger': Set<string>;
|
|
@@ -24,7 +24,7 @@ export class FileItem extends FileItemConfig {
|
|
|
24
24
|
'*commonProgress': number;
|
|
25
25
|
'*uploadList': never[];
|
|
26
26
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
27
|
-
'*collectionErrors':
|
|
27
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
28
28
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
29
29
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
30
30
|
'*uploadTrigger': Set<string>;
|
|
@@ -20,7 +20,7 @@ export class FileItemConfig extends UploaderBlock {
|
|
|
20
20
|
* @param {(value: import('../../abstract/uploadEntrySchema.js').UploadEntryData[K]) => void} handler_
|
|
21
21
|
* @protected
|
|
22
22
|
*/
|
|
23
|
-
protected _subEntry
|
|
23
|
+
protected _subEntry<K extends import("../../abstract/uploadEntrySchema.js").UploadEntryKeys>(prop_: K, handler_: (value: import("../../abstract/uploadEntrySchema.js").UploadEntryData[K]) => void): void;
|
|
24
24
|
/** @protected */
|
|
25
25
|
protected _reset(): void;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileItemConfig.d.ts","sourceRoot":"","sources":["FileItemConfig.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileItemConfig.d.ts","sourceRoot":"","sources":["FileItemConfig.js"],"names":[],"mappings":"AAGA;IACE,iBAAiB;IACjB,+BAAuB;IAEvB;;;OAGG;IACH,kBAHU,OAAO,qCAAqC,EAAE,oBAAoB,GAAG,IAAI,CAGrE;IAEd;;;;;;OAMG;IACH,qBANqB,CAAC,SAAR,GAAG,EAAG,EAC0F,CAAC,SAAlG,CAAE,KAAK,EAAE,OAAO,qCAAqC,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,GAAI,MAClG,CAAC,GACC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAezC;IAED;;;;;OAKG;IACH,oBAL6E,CAAC,SAAjE,OAAQ,qCAAqC,EAAE,eAAgB,SACjE,CAAC,YACD,CAAC,KAAK,EAAE,OAAO,qCAAqC,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,QAoB3F;IAED,iBAAiB;IACjB,yBAOC;CAMF;8BAxE6B,iCAAiC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//@ts-check
|
|
2
|
-
|
|
3
2
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
4
3
|
|
|
5
4
|
export class FileItemConfig extends UploaderBlock {
|
|
@@ -39,8 +38,8 @@ export class FileItemConfig extends UploaderBlock {
|
|
|
39
38
|
* @param {(value: import('../../abstract/uploadEntrySchema.js').UploadEntryData[K]) => void} handler_
|
|
40
39
|
* @protected
|
|
41
40
|
*/
|
|
42
|
-
_subEntry
|
|
43
|
-
this._withEntry(
|
|
41
|
+
_subEntry(prop_, handler_) {
|
|
42
|
+
return this._withEntry(
|
|
44
43
|
/**
|
|
45
44
|
* @template {import('../../abstract/uploadEntrySchema.js').UploadEntryKeys} K
|
|
46
45
|
* @param {import('../../abstract/uploadEntrySchema.js').UploadEntryTypedData} entry
|
|
@@ -56,6 +55,7 @@ export class FileItemConfig extends UploaderBlock {
|
|
|
56
55
|
this._entrySubs.add(sub);
|
|
57
56
|
},
|
|
58
57
|
)(prop_, handler_);
|
|
58
|
+
}
|
|
59
59
|
|
|
60
60
|
/** @protected */
|
|
61
61
|
_reset() {
|
|
@@ -6,7 +6,7 @@ export class SimpleBtn extends UploaderBlock {
|
|
|
6
6
|
'*commonProgress': number;
|
|
7
7
|
'*uploadList': never[];
|
|
8
8
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
9
|
-
'*collectionErrors':
|
|
9
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
10
10
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
11
11
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
12
12
|
'*uploadTrigger': Set<string>;
|
|
@@ -22,7 +22,7 @@ export class SourceBtn extends UploaderBlock {
|
|
|
22
22
|
'*commonProgress': number;
|
|
23
23
|
'*uploadList': never[];
|
|
24
24
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
25
|
-
'*collectionErrors':
|
|
25
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
26
26
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
27
27
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
28
28
|
'*uploadTrigger': Set<string>;
|
package/blocks/Thumb/Thumb.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export class Thumb extends FileItemConfig {
|
|
|
15
15
|
'*commonProgress': number;
|
|
16
16
|
'*uploadList': never[];
|
|
17
17
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
18
|
-
'*collectionErrors':
|
|
18
|
+
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
19
19
|
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
20
20
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
21
21
|
'*uploadTrigger': Set<string>;
|
|
@@ -25,7 +25,7 @@ export class UploadList extends UploaderBlock {
|
|
|
25
25
|
'*commonProgress': number;
|
|
26
26
|
'*uploadList': never[];
|
|
27
27
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
28
|
-
'*collectionErrors':
|
|
28
|
+
'*collectionErrors': import("../../types").OutputErrorCollection[];
|
|
29
29
|
'*collectionState': import("../../types").OutputCollectionState | null;
|
|
30
30
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
31
31
|
'*uploadTrigger': Set<string>;
|
package/env.d.ts
CHANGED
package/env.js
CHANGED
package/index.ssr.d.ts
CHANGED
|
@@ -550,7 +550,7 @@ export namespace ModalEvents {
|
|
|
550
550
|
let DESTROY: string;
|
|
551
551
|
}
|
|
552
552
|
export const PACKAGE_NAME: "blocks";
|
|
553
|
-
export const PACKAGE_VERSION: "1.19.
|
|
553
|
+
export const PACKAGE_VERSION: "1.19.4";
|
|
554
554
|
export const PresenceToggle: {
|
|
555
555
|
new (): {};
|
|
556
556
|
template: string;
|
package/index.ssr.js
CHANGED
|
@@ -1070,7 +1070,7 @@ export const ModalEvents = {
|
|
|
1070
1070
|
DESTROY: "modal:destroy",
|
|
1071
1071
|
};
|
|
1072
1072
|
export const PACKAGE_NAME = `blocks`;
|
|
1073
|
-
export const PACKAGE_VERSION = `1.19.
|
|
1073
|
+
export const PACKAGE_VERSION = `1.19.4`;
|
|
1074
1074
|
export const PresenceToggle = class {
|
|
1075
1075
|
static template = `<slot></slot> `;
|
|
1076
1076
|
static reg = () => {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadcare/file-uploader",
|
|
3
|
-
"version": "1.19.4
|
|
3
|
+
"version": "1.19.4",
|
|
4
4
|
"description": "Building blocks for Uploadcare products integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web components",
|
|
@@ -35,9 +35,7 @@
|
|
|
35
35
|
"MIT"
|
|
36
36
|
],
|
|
37
37
|
"type": "module",
|
|
38
|
-
"sideEffects": [
|
|
39
|
-
"*.css"
|
|
40
|
-
],
|
|
38
|
+
"sideEffects": ["*.css"],
|
|
41
39
|
"module": "./index.js",
|
|
42
40
|
"exports": {
|
|
43
41
|
".": {
|
|
@@ -5,7 +5,7 @@ export class FileUploaderInline extends SolutionBlock {
|
|
|
5
5
|
'*commonProgress': number;
|
|
6
6
|
'*uploadList': never[];
|
|
7
7
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
8
|
-
'*collectionErrors':
|
|
8
|
+
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
9
9
|
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
10
10
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
11
11
|
'*uploadTrigger': Set<string>;
|
|
@@ -7,7 +7,7 @@ export class FileUploaderMinimal extends SolutionBlock {
|
|
|
7
7
|
'*commonProgress': number;
|
|
8
8
|
'*uploadList': never[];
|
|
9
9
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
10
|
-
'*collectionErrors':
|
|
10
|
+
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
11
11
|
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
12
12
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
13
13
|
'*uploadTrigger': Set<string>;
|
|
@@ -4,7 +4,7 @@ export class FileUploaderRegular extends SolutionBlock {
|
|
|
4
4
|
'*commonProgress': number;
|
|
5
5
|
'*uploadList': never[];
|
|
6
6
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
7
|
-
'*collectionErrors':
|
|
7
|
+
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
8
8
|
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
9
9
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
10
10
|
'*uploadTrigger': Set<string>;
|
package/types/exported.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export type ConfigType = {
|
|
|
80
80
|
*/
|
|
81
81
|
sourceList: string;
|
|
82
82
|
/**
|
|
83
|
-
* Top-level origin for the uploader.
|
|
83
|
+
* Top-level origin for the uploader.
|
|
84
84
|
* This is used for Google Drive Picker if there is no access to the origin due to the cross-origin policy.
|
|
85
85
|
*/
|
|
86
86
|
topLevelOrigin: string;
|
|
@@ -302,7 +302,7 @@ export type ConfigType = {
|
|
|
302
302
|
|
|
303
303
|
cloudImageEditorMaskHref: string | null;
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
/**
|
|
306
306
|
* Adds data-testid attributes to the each block. Needed for testing purposes.
|
|
307
307
|
* @default false
|
|
308
308
|
*/
|
|
@@ -314,8 +314,8 @@ export type ConfigAttributesType = KebabCaseKeys<ConfigPlainType> & LowerCaseKey
|
|
|
314
314
|
|
|
315
315
|
export type KebabCase<S extends string> = S extends `${infer C}${infer T}`
|
|
316
316
|
? T extends Uncapitalize<T>
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
? `${Uncapitalize<C>}${KebabCase<T>}`
|
|
318
|
+
: `${Uncapitalize<C>}-${KebabCase<T>}`
|
|
319
319
|
: S;
|
|
320
320
|
export type KebabCaseKeys<T extends Record<string, unknown>> = { [Key in keyof T as KebabCase<Key & string>]: T[Key] };
|
|
321
321
|
export type LowerCase<S extends string> = Lowercase<S>;
|
|
@@ -374,17 +374,17 @@ export type OutputErrorTypePayload = {
|
|
|
374
374
|
|
|
375
375
|
export type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends OutputCustomErrorType
|
|
376
376
|
? {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
type?: T;
|
|
378
|
+
message: string;
|
|
379
|
+
payload?: OutputErrorTypePayload[T];
|
|
380
|
+
}
|
|
381
381
|
: T extends keyof OutputErrorTypePayload
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
382
|
+
? {
|
|
383
|
+
type: T;
|
|
384
|
+
message: string;
|
|
385
|
+
payload?: OutputErrorTypePayload[T];
|
|
386
|
+
}
|
|
387
|
+
: never;
|
|
388
388
|
|
|
389
389
|
export type OutputErrorFile = OutputError<OutputFileErrorType>;
|
|
390
390
|
|
|
@@ -406,7 +406,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
|
|
|
406
406
|
fullPath: string | null;
|
|
407
407
|
source: SourceTypes | null;
|
|
408
408
|
} & (
|
|
409
|
-
|
|
409
|
+
| {
|
|
410
410
|
status: 'success';
|
|
411
411
|
fileInfo: UploadcareFile;
|
|
412
412
|
uuid: string;
|
|
@@ -418,7 +418,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
|
|
|
418
418
|
isRemoved: false;
|
|
419
419
|
errors: [];
|
|
420
420
|
}
|
|
421
|
-
|
|
421
|
+
| {
|
|
422
422
|
status: 'failed';
|
|
423
423
|
fileInfo: UploadcareFile | null;
|
|
424
424
|
uuid: string | null;
|
|
@@ -430,7 +430,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
|
|
|
430
430
|
isRemoved: false;
|
|
431
431
|
errors: OutputError<OutputFileErrorType>[];
|
|
432
432
|
}
|
|
433
|
-
|
|
433
|
+
| {
|
|
434
434
|
status: 'uploading';
|
|
435
435
|
fileInfo: null;
|
|
436
436
|
uuid: null;
|
|
@@ -442,7 +442,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
|
|
|
442
442
|
isRemoved: false;
|
|
443
443
|
errors: [];
|
|
444
444
|
}
|
|
445
|
-
|
|
445
|
+
| {
|
|
446
446
|
status: 'removed';
|
|
447
447
|
fileInfo: UploadcareFile | null;
|
|
448
448
|
uuid: string | null;
|
|
@@ -454,7 +454,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
|
|
|
454
454
|
isRemoved: true;
|
|
455
455
|
errors: OutputError<OutputFileErrorType>[];
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
| {
|
|
458
458
|
status: 'idle';
|
|
459
459
|
fileInfo: null;
|
|
460
460
|
uuid: null;
|
|
@@ -466,7 +466,7 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
|
|
|
466
466
|
isRemoved: false;
|
|
467
467
|
errors: [];
|
|
468
468
|
}
|
|
469
|
-
);
|
|
469
|
+
);
|
|
470
470
|
|
|
471
471
|
export type OutputCollectionStatus = 'idle' | 'uploading' | 'success' | 'failed';
|
|
472
472
|
|
|
@@ -490,43 +490,43 @@ export type OutputCollectionState<
|
|
|
490
490
|
} & (TGroupFlag extends 'has-group'
|
|
491
491
|
? { group: UploadcareGroup }
|
|
492
492
|
: TGroupFlag extends 'maybe-has-group'
|
|
493
|
-
|
|
494
|
-
|
|
493
|
+
? { group: UploadcareGroup | null }
|
|
494
|
+
: never) &
|
|
495
495
|
(
|
|
496
496
|
| {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
497
|
+
status: 'idle';
|
|
498
|
+
isFailed: false;
|
|
499
|
+
isUploading: false;
|
|
500
|
+
isSuccess: false;
|
|
501
|
+
errors: [];
|
|
502
|
+
allEntries: OutputFileEntry<'idle' | 'success'>[];
|
|
503
|
+
}
|
|
504
504
|
| {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
505
|
+
status: 'uploading';
|
|
506
|
+
isFailed: false;
|
|
507
|
+
isUploading: true;
|
|
508
|
+
isSuccess: false;
|
|
509
|
+
errors: [];
|
|
510
|
+
allEntries: OutputFileEntry[];
|
|
511
|
+
}
|
|
512
512
|
| {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
513
|
+
status: 'success';
|
|
514
|
+
isFailed: false;
|
|
515
|
+
isUploading: false;
|
|
516
|
+
isSuccess: true;
|
|
517
|
+
errors: [];
|
|
518
|
+
allEntries: OutputFileEntry<'success'>[];
|
|
519
|
+
}
|
|
520
520
|
| {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
521
|
+
status: 'failed';
|
|
522
|
+
isFailed: true;
|
|
523
|
+
isUploading: false;
|
|
524
|
+
isSuccess: false;
|
|
525
|
+
errors: OutputError<OutputCollectionErrorType>[];
|
|
526
|
+
allEntries: OutputFileEntry[];
|
|
527
|
+
}
|
|
528
528
|
);
|
|
529
529
|
|
|
530
530
|
export { EventType, EventPayload } from '../blocks/UploadCtxProvider/EventEmitter';
|
|
531
531
|
|
|
532
|
-
export {};
|
|
532
|
+
export { };
|