@uploadcare/file-uploader 1.5.3-alpha.0 → 1.6.0-alpha.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.
- package/README.md +1 -1
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +1 -0
- package/abstract/uploadEntrySchema.d.ts +2 -0
- package/abstract/uploadEntrySchema.d.ts.map +1 -1
- package/abstract/uploadEntrySchema.js +1 -0
- package/blocks/FileItem/FileItem.d.ts +1 -2
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +6 -7
- package/blocks/UploadList/UploadList.js +1 -1
- package/index.ssr.js +2 -2
- package/package.json +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +1 -1
- package/web/file-uploader.iife.min.js +1 -1
- package/web/file-uploader.min.js +2 -2
- package/web/uc-file-uploader-inline.min.js +2 -2
- package/web/uc-file-uploader-minimal.min.js +3 -3
- package/web/uc-file-uploader-regular.min.js +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
# 📦 Uploadcare File Uploader: stack-agnostic library for uploading, processing, and editing images on-the-fly
|
|
20
20
|
|
|
21
|
-
[](https://www.npmjs.com/package/@uploadcare/file-uploader)
|
|
22
22
|
[](https://github.com/uploadcare/blocks/actions?query=workflow%3ABuild+branch%3Amaster)
|
|
23
23
|
[](https://opensource.org/licenses/MIT)
|
|
24
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAYA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,sBAJW,MAAM;;;;sBAEJ,O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AAE,OAAO,CAAA;KAAE,UA0DrC;IAEF;;;;OAIG;IACH,8EAHW,MAAM,iDA8Cf;IAEF,oEAAoE;IACpE,oKAIE;IAEF,+BAA+B;IAC/B,gDAsCE;IAEF,qBAQE;IAEF;;;;;;;;;OASG;IACH,uTAFQ,IAAI,CAWV;IAEF,2DAA2D;IAC3D,0BADc,OAAO,oBAAoB,EAAE,YAAY,CAGrD;IAEF,8BAA8B;IAC9B,wBADY,OAAO,UAOjB;IAEF;;;OAGG;IACH,0BAOC;CACF"}
|
|
@@ -240,6 +240,7 @@ export class UploaderPublicApi {
|
|
|
240
240
|
isRemoved: status === 'removed',
|
|
241
241
|
errors: /** @type {import('../types/exported.js').OutputFileEntry['errors']} */ (uploadEntryData.errors),
|
|
242
242
|
status,
|
|
243
|
+
source: uploadEntryData?.source,
|
|
243
244
|
};
|
|
244
245
|
|
|
245
246
|
return /** @type {import('../types/exported.js').OutputFileEntry<TStatus>} */ (outputItem);
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* @property {string | null} fullPath
|
|
25
25
|
* @property {import('@uploadcare/upload-client').Metadata | null} metadata
|
|
26
26
|
* @property {boolean} isRemoved
|
|
27
|
+
* @property {String} source
|
|
27
28
|
*/
|
|
28
29
|
/**
|
|
29
30
|
* @template {keyof UploadEntry} K
|
|
@@ -59,6 +60,7 @@ export type UploadEntry = {
|
|
|
59
60
|
fullPath: string | null;
|
|
60
61
|
metadata: import('@uploadcare/upload-client').Metadata | null;
|
|
61
62
|
isRemoved: boolean;
|
|
63
|
+
source: string;
|
|
62
64
|
};
|
|
63
65
|
import { UploadcareFile } from '@uploadcare/upload-client';
|
|
64
66
|
//# sourceMappingURL=uploadEntrySchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadEntrySchema.d.ts","sourceRoot":"","sources":["uploadEntrySchema.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"uploadEntrySchema.d.ts","sourceRoot":"","sources":["uploadEntrySchema.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;GAGG;AACH,gCAFU,OAAO,CAAC,EAAE;IAAE,IAAI,WAAW;IAAC,KAAK,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,UAAS;CAAE,CAAC,CAwGpE;;UArIW,IAAI;;;cAGJ,MAAM;kBACN,MAAM;oBACN,MAAM;;;;;;;cAON,cAAc;;;;YAId,CAAC;QACd,IAAQ,EAAE,OAAO,IAAI,EAAE,mBAAmB,GAAG,OAAO,IAAI,EAAE,yBAAyB,CAAC;QACpF,OAAW,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE;iBACnB,KAAK,GAAG,IAAI;cACZ,MAAM,GAAG,IAAI;cACb,OAAO,2BAA2B,EAAE,QAAQ,GAAG,IAAI;eACnD,OAAO;;;+BA3BU,2BAA2B"}
|
|
@@ -28,7 +28,6 @@ export class FileItem extends UploaderBlock {
|
|
|
28
28
|
isFocused: boolean;
|
|
29
29
|
isEditable: boolean;
|
|
30
30
|
state: symbol;
|
|
31
|
-
ariaLabelStatusFile: string;
|
|
32
31
|
onEdit: () => void;
|
|
33
32
|
onRemove: () => void;
|
|
34
33
|
onUpload: () => void;
|
|
@@ -36,7 +35,7 @@ export class FileItem extends UploaderBlock {
|
|
|
36
35
|
'*uploadList': never[];
|
|
37
36
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
38
37
|
'*collectionErrors': any[];
|
|
39
|
-
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
38
|
+
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null; /** @private */
|
|
40
39
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
41
40
|
'*uploadTrigger': Set<string>;
|
|
42
41
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"AAkBA;IAIE,eAAe;IACf,mBAAuB;IACvB;;;OAGG;IACH,eAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gCAA4E;IAC5E,eAAe;IACf,iCAA0E;IAE1E,eAAe;IACf,sBAAsB;IAKpB
|
|
1
|
+
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"AAkBA;IAIE,eAAe;IACf,mBAAuB;IACvB;;;OAGG;IACH,eAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gCAA4E;IAC5E,eAAe;IACf,iCAA0E;IAE1E,eAAe;IACf,sBAAsB;IAKpB;;;;;;;;;;;;;;;;;;;;;uJApBF,eAAe;;;;;;;;;MA+CZ;IAGH,eASC;IAED;;;OAGG;IACH,0BAaC;IAED,eAAe;IACf,wBAgBC;IAED,eAAe;IACf,2BAsCC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;OAGG;IACH,uBAkDC;IAsCD,wEAAwE;IACxE,oBADY,CAAC,oBAAoB,CAAC,CAAC,MAAM,oBAAoB,CAAC,QAsB7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAsFC;CACF;;;;;8BA/Z6B,iCAAiC;AAO/D;;;;;GAKG"}
|
|
@@ -10,10 +10,10 @@ import { generateThumb } from '../utils/resizeImage.js';
|
|
|
10
10
|
import { parseShrink } from '../../utils/parseShrink.js';
|
|
11
11
|
|
|
12
12
|
const FileItemState = Object.freeze({
|
|
13
|
-
FINISHED: Symbol(
|
|
14
|
-
FAILED: Symbol(
|
|
15
|
-
UPLOADING: Symbol(
|
|
16
|
-
IDLE: Symbol(
|
|
13
|
+
FINISHED: Symbol(0),
|
|
14
|
+
FAILED: Symbol(1),
|
|
15
|
+
UPLOADING: Symbol(2),
|
|
16
|
+
IDLE: Symbol(3),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export class FileItem extends UploaderBlock {
|
|
@@ -55,7 +55,6 @@ export class FileItem extends UploaderBlock {
|
|
|
55
55
|
isFocused: false,
|
|
56
56
|
isEditable: false,
|
|
57
57
|
state: FileItemState.IDLE,
|
|
58
|
-
ariaLabelStatusFile: '',
|
|
59
58
|
onEdit: () => {
|
|
60
59
|
this.$['*currentActivityParams'] = {
|
|
61
60
|
internalId: this._entry.uid,
|
|
@@ -291,7 +290,6 @@ export class FileItem extends UploaderBlock {
|
|
|
291
290
|
progressVisible: state === FileItemState.UPLOADING,
|
|
292
291
|
isEditable: this.cfg.useCloudImageEditor && this._entry?.getValue('isImage') && this._entry?.getValue('cdnUrl'),
|
|
293
292
|
errorText: this._entry.getValue('errors')?.[0]?.message,
|
|
294
|
-
ariaLabelStatusFile: `${this._entry?.getValue('fileName')} ${state.description}`,
|
|
295
293
|
});
|
|
296
294
|
}
|
|
297
295
|
|
|
@@ -394,6 +392,7 @@ export class FileItem extends UploaderBlock {
|
|
|
394
392
|
cdnUrl: entry.getValue('cdnUrl') ?? fileInfo.cdnUrl,
|
|
395
393
|
cdnUrlModifiers: entry.getValue('cdnUrlModifiers') ?? '',
|
|
396
394
|
uploadProgress: 100,
|
|
395
|
+
source: entry.getValue('source') ?? '',
|
|
397
396
|
});
|
|
398
397
|
|
|
399
398
|
if (entry === this._entry) {
|
|
@@ -427,7 +426,7 @@ FileItem.template = /* HTML */ `
|
|
|
427
426
|
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
428
427
|
</div>
|
|
429
428
|
</div>
|
|
430
|
-
<div
|
|
429
|
+
<div class="uc-file-name-wrapper">
|
|
431
430
|
<span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
|
|
432
431
|
<span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
|
|
433
432
|
</div>
|
|
@@ -201,7 +201,7 @@ export class UploadList extends UploaderBlock {
|
|
|
201
201
|
|
|
202
202
|
UploadList.template = /* HTML */ `
|
|
203
203
|
<uc-activity-header>
|
|
204
|
-
<span
|
|
204
|
+
<span class="uc-header-text">{{headerText}}</span>
|
|
205
205
|
<button
|
|
206
206
|
type="button"
|
|
207
207
|
class="uc-mini-btn uc-close-btn"
|
package/index.ssr.js
CHANGED
|
@@ -744,7 +744,7 @@ export const FileItem = class {
|
|
|
744
744
|
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
745
745
|
</div>
|
|
746
746
|
</div>
|
|
747
|
-
<div
|
|
747
|
+
<div class="uc-file-name-wrapper">
|
|
748
748
|
<span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
|
|
749
749
|
<span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
|
|
750
750
|
</div>
|
|
@@ -1243,7 +1243,7 @@ export const UploadCtxProvider = class {
|
|
|
1243
1243
|
export const UploadList = class {
|
|
1244
1244
|
static template = `
|
|
1245
1245
|
<uc-activity-header>
|
|
1246
|
-
<span
|
|
1246
|
+
<span class="uc-header-text">{{headerText}}</span>
|
|
1247
1247
|
<button
|
|
1248
1248
|
type="button"
|
|
1249
1249
|
class="uc-mini-btn uc-close-btn"
|
package/package.json
CHANGED