@uploadcare/file-uploader 1.5.1 → 1.5.3-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/abstract/Block.d.ts +3 -3
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +39 -13
- package/blocks/EditorFilerobotImage/EditorFilerobotImage.d.ts +13 -0
- package/blocks/EditorFilerobotImage/EditorFilerobotImage.d.ts.map +1 -0
- package/blocks/EditorFilerobotImage/EditorFilerobotImage.js +59 -0
- package/blocks/FileItem/FileItem.d.ts +2 -1
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +7 -5
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +1 -1
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +2 -2
- package/blocks/UploadList/UploadList.js +1 -1
- package/env.d.ts +1 -1
- package/env.js +1 -1
- package/index.ssr.d.ts +1 -1
- package/index.ssr.js +3 -3
- package/package.json +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +1 -1
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-cloud-image-editor.min.js +1 -1
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.js +3 -3
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +1 -1
package/abstract/Block.d.ts
CHANGED
|
@@ -41,11 +41,11 @@ export class Block extends BaseComponent<any> {
|
|
|
41
41
|
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[1]} [payload]
|
|
42
42
|
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[2]} [options]
|
|
43
43
|
*/
|
|
44
|
-
emit(type: [type: "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "
|
|
44
|
+
emit(type: [type: "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", payload?: unknown, ({
|
|
45
45
|
debounce?: number | boolean | undefined;
|
|
46
|
-
} | undefined)?][0], payload?: [type: "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "
|
|
46
|
+
} | undefined)?][0], payload?: [type: "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", payload?: unknown, ({
|
|
47
47
|
debounce?: number | boolean | undefined;
|
|
48
|
-
} | undefined)?][1], options?: [type: "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "
|
|
48
|
+
} | undefined)?][1], options?: [type: "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", payload?: unknown, ({
|
|
49
49
|
debounce?: number | boolean | undefined;
|
|
50
50
|
} | undefined)?][2]): void;
|
|
51
51
|
/**
|
|
@@ -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,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,wBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,4BAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,0BAJW,IAAI;;;;;sBAEF,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAcrD;IAEF,iCAAiC;IACjC,qCADY,MAAM,UAMhB;IAEF,uBAEC;IAED,sBAeE;IAEF,mDAAmD;IACnD,6BADY;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,
|
|
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,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,wBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,4BAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,0BAJW,IAAI;;;;;sBAEF,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAcrD;IAEF,iCAAiC;IACjC,qCADY,MAAM,UAMhB;IAEF,uBAEC;IAED,sBAeE;IAEF,mDAAmD;IACnD,6BADY;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,UA0DrC;IAEF;;;;OAIG;IACH,8EAHW,MAAM,iDA6Cf;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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { ActivityBlock } from './ActivityBlock.js';
|
|
3
3
|
|
|
4
|
-
import { Data } from '@symbiotejs/symbiote';
|
|
4
|
+
import { applyStyles, Data } from '@symbiotejs/symbiote';
|
|
5
5
|
import { EventType } from '../blocks/UploadCtxProvider/EventEmitter.js';
|
|
6
6
|
import { UploadSource } from '../blocks/utils/UploadSource.js';
|
|
7
7
|
import { serializeCsv } from '../blocks/utils/comma-separated.js';
|
|
@@ -138,7 +138,9 @@ export class UploaderPublicApi {
|
|
|
138
138
|
|
|
139
139
|
/** @param {{ captureCamera?: boolean }} options */
|
|
140
140
|
openSystemDialog = (options = {}) => {
|
|
141
|
-
|
|
141
|
+
const accept = serializeCsv(
|
|
142
|
+
mergeFileTypes([this.cfg.accept ?? '', ...(this.cfg.imgOnly ? IMAGE_ACCEPT_LIST : [])]),
|
|
143
|
+
);
|
|
142
144
|
|
|
143
145
|
if (this.cfg.accept && !!this.cfg.imgOnly) {
|
|
144
146
|
console.warn(
|
|
@@ -147,7 +149,16 @@ export class UploaderPublicApi {
|
|
|
147
149
|
'The value of `accept` will be concatenated with the internal image mime types list.',
|
|
148
150
|
);
|
|
149
151
|
}
|
|
152
|
+
|
|
153
|
+
const INPUT_ATTR_NAME = 'uploadcare-file-input';
|
|
150
154
|
const fileInput = document.createElement('input');
|
|
155
|
+
fileInput.setAttribute(INPUT_ATTR_NAME, '');
|
|
156
|
+
applyStyles(fileInput, {
|
|
157
|
+
opacity: 0,
|
|
158
|
+
height: 0,
|
|
159
|
+
width: 0,
|
|
160
|
+
visibility: 'hidden',
|
|
161
|
+
});
|
|
151
162
|
fileInput.type = 'file';
|
|
152
163
|
fileInput.multiple = this.cfg.multiple;
|
|
153
164
|
if (options.captureCamera) {
|
|
@@ -156,18 +167,33 @@ export class UploaderPublicApi {
|
|
|
156
167
|
} else {
|
|
157
168
|
fileInput.accept = accept;
|
|
158
169
|
}
|
|
170
|
+
fileInput.addEventListener(
|
|
171
|
+
'change',
|
|
172
|
+
() => {
|
|
173
|
+
if (!fileInput.files) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
[...fileInput.files].forEach((file) =>
|
|
177
|
+
this.addFileFromObject(file, { source: options.captureCamera ? UploadSource.CAMERA : UploadSource.LOCAL }),
|
|
178
|
+
);
|
|
179
|
+
// To call uploadTrigger UploadList should draw file items first:
|
|
180
|
+
this._ctx.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
181
|
+
this._ctx.setOrAddState('*modalActive', true);
|
|
182
|
+
fileInput.remove();
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
once: true,
|
|
186
|
+
},
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
document.querySelectorAll(`[${INPUT_ATTR_NAME}]`).forEach((el) => el.remove());
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Some browsers (e.g. Safari) require the file input to be in the DOM to work properly. Without it the file input
|
|
193
|
+
* will open system dialog but won't trigger the change event sometimes.
|
|
194
|
+
*/
|
|
195
|
+
document.body.appendChild(fileInput);
|
|
159
196
|
fileInput.dispatchEvent(new MouseEvent('click'));
|
|
160
|
-
fileInput.onchange = () => {
|
|
161
|
-
// @ts-ignore TODO: fix this
|
|
162
|
-
[...fileInput['files']].forEach((file) =>
|
|
163
|
-
this.addFileFromObject(file, { source: options.captureCamera ? UploadSource.CAMERA : UploadSource.LOCAL }),
|
|
164
|
-
);
|
|
165
|
-
// To call uploadTrigger UploadList should draw file items first:
|
|
166
|
-
this._ctx.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
167
|
-
this._ctx.setOrAddState('*modalActive', true);
|
|
168
|
-
// @ts-ignore TODO: fix this
|
|
169
|
-
fileInput['value'] = '';
|
|
170
|
-
};
|
|
171
197
|
};
|
|
172
198
|
|
|
173
199
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class EditorFilerobotImage extends UploaderBlock {
|
|
2
|
+
activityType: any;
|
|
3
|
+
get activityParams(): import("../CloudImageEditorActivity/CloudImageEditorActivity.js").ActivityParams;
|
|
4
|
+
mounted(): void;
|
|
5
|
+
_entry: import("../../abstract/TypedData.js").TypedData | undefined;
|
|
6
|
+
_instance: any;
|
|
7
|
+
unmounted(): void;
|
|
8
|
+
}
|
|
9
|
+
export namespace EditorFilerobotImage {
|
|
10
|
+
let template: string;
|
|
11
|
+
}
|
|
12
|
+
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
13
|
+
//# sourceMappingURL=EditorFilerobotImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorFilerobotImage.d.ts","sourceRoot":"","sources":["EditorFilerobotImage.js"],"names":[],"mappings":"AAMA;IAEE,kBAA+D;IAG/D,uGAMC;IAcD,gBAiBC;IAfC,oEAAoD;IAcpD,eAAyB;IAI3B,kBAIC;CACF;;;;8BArD6B,iCAAiC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
import { uploadFile } from '@uploadcare/upload-client';
|
|
3
|
+
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
4
|
+
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
5
|
+
import FilerobotImageEditor from 'filerobot-image-editor';
|
|
6
|
+
|
|
7
|
+
export class EditorFilerobotImage extends UploaderBlock {
|
|
8
|
+
couldBeCtxOwner = true;
|
|
9
|
+
activityType = ActivityBlock.activities.EDITOR_FILEROBOT_IMAGE;
|
|
10
|
+
static styleAttrs = ['uc-editor-filerobot-image'];
|
|
11
|
+
|
|
12
|
+
get activityParams() {
|
|
13
|
+
const params = super.activityParams;
|
|
14
|
+
if ('internalId' in params) {
|
|
15
|
+
return params;
|
|
16
|
+
}
|
|
17
|
+
throw new Error(`Cloud Image Editor activity params not found`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
initCallback() {
|
|
21
|
+
super.initCallback();
|
|
22
|
+
|
|
23
|
+
this.registerActivity(this.activityType, {
|
|
24
|
+
onActivate: () => this.mounted(),
|
|
25
|
+
onDeactivate: () => this.unmounted(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
console.log("EditorFilerobotImage");
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
mounted() {
|
|
33
|
+
const { internalId } = this.activityParams;
|
|
34
|
+
this._entry = this.uploadCollection.read(internalId);
|
|
35
|
+
|
|
36
|
+
if (!this._entry) {
|
|
37
|
+
throw new Error(`Entry with internalId "${internalId}" not found`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const file = this._entry.getValue('file');
|
|
41
|
+
const cdnUrl = this._entry.getValue('cdnUrl');
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
const instance = null
|
|
47
|
+
|
|
48
|
+
this._instance = instance
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
unmounted() {
|
|
53
|
+
this._instance = undefined;
|
|
54
|
+
this._entry = undefined;
|
|
55
|
+
this.innerHTML = ''
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
EditorFilerobotImage.template = ``;
|
|
@@ -28,6 +28,7 @@ export class FileItem extends UploaderBlock {
|
|
|
28
28
|
isFocused: boolean;
|
|
29
29
|
isEditable: boolean;
|
|
30
30
|
state: symbol;
|
|
31
|
+
ariaLabelStatusFile: string;
|
|
31
32
|
onEdit: () => void;
|
|
32
33
|
onRemove: () => void;
|
|
33
34
|
onUpload: () => void;
|
|
@@ -35,7 +36,7 @@ export class FileItem extends UploaderBlock {
|
|
|
35
36
|
'*uploadList': never[];
|
|
36
37
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
37
38
|
'*collectionErrors': any[];
|
|
38
|
-
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
39
|
+
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
39
40
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
40
41
|
'*uploadTrigger': Set<string>;
|
|
41
42
|
'*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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BC;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,QAuB7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAqFC;CACF;;;;;8BAha6B,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('FINISHED'),
|
|
14
|
+
FAILED: Symbol('FAILED'),
|
|
15
|
+
UPLOADING: Symbol('UPLOADING'),
|
|
16
|
+
IDLE: Symbol('IDLE'),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export class FileItem extends UploaderBlock {
|
|
@@ -55,6 +55,7 @@ export class FileItem extends UploaderBlock {
|
|
|
55
55
|
isFocused: false,
|
|
56
56
|
isEditable: false,
|
|
57
57
|
state: FileItemState.IDLE,
|
|
58
|
+
ariaLabelStatusFile: '',
|
|
58
59
|
onEdit: () => {
|
|
59
60
|
this.$['*currentActivityParams'] = {
|
|
60
61
|
internalId: this._entry.uid,
|
|
@@ -290,6 +291,7 @@ export class FileItem extends UploaderBlock {
|
|
|
290
291
|
progressVisible: state === FileItemState.UPLOADING,
|
|
291
292
|
isEditable: this.cfg.useCloudImageEditor && this._entry?.getValue('isImage') && this._entry?.getValue('cdnUrl'),
|
|
292
293
|
errorText: this._entry.getValue('errors')?.[0]?.message,
|
|
294
|
+
ariaLabelStatusFile: `${this._entry?.getValue('fileName')} ${state.description}`,
|
|
293
295
|
});
|
|
294
296
|
}
|
|
295
297
|
|
|
@@ -425,7 +427,7 @@ FileItem.template = /* HTML */ `
|
|
|
425
427
|
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
426
428
|
</div>
|
|
427
429
|
</div>
|
|
428
|
-
<div class="uc-file-name-wrapper">
|
|
430
|
+
<div aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
|
|
429
431
|
<span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
|
|
430
432
|
<span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
|
|
431
433
|
</div>
|
|
@@ -78,7 +78,7 @@ export class EventEmitter {
|
|
|
78
78
|
* @param {TDebounce extends false | undefined ? unknown : () => unknown} [payload]
|
|
79
79
|
* @param {{ debounce?: TDebounce }} [options]
|
|
80
80
|
*/
|
|
81
|
-
emit<T extends "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "
|
|
81
|
+
emit<T extends "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created", TDebounce extends number | boolean | undefined>(type: T, payload?: (TDebounce extends false | undefined ? unknown : () => unknown) | undefined, { debounce }?: {
|
|
82
82
|
debounce?: TDebounce | undefined;
|
|
83
83
|
} | undefined): void;
|
|
84
84
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type UploadCtxProvider = (new () => {
|
|
2
|
-
addEventListener<T extends "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "
|
|
3
|
-
removeEventListener<T_1 extends "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "
|
|
2
|
+
addEventListener<T extends "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created">(type: T, listener: (e: CustomEvent<import("./EventEmitter.js").EventPayload[T]>) => void, options?: boolean | AddEventListenerOptions): void;
|
|
3
|
+
removeEventListener<T_1 extends "change" | "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "group-created">(type: T_1, listener: (e: CustomEvent<import("./EventEmitter.js").EventPayload[T_1]>) => void, options?: boolean | EventListenerOptions): void;
|
|
4
4
|
} & UploadCtxProviderClass) & Omit<typeof UploadCtxProviderClass, "new">;
|
|
5
5
|
/**
|
|
6
6
|
* @typedef {import('../../utils/mixinClass.js').MixinClass<
|
|
@@ -201,7 +201,7 @@ export class UploadList extends UploaderBlock {
|
|
|
201
201
|
|
|
202
202
|
UploadList.template = /* HTML */ `
|
|
203
203
|
<uc-activity-header>
|
|
204
|
-
<span class="uc-header-text">{{headerText}}</span>
|
|
204
|
+
<span aria-live="polite" class="uc-header-text">{{headerText}}</span>
|
|
205
205
|
<button
|
|
206
206
|
type="button"
|
|
207
207
|
class="uc-mini-btn uc-close-btn"
|
package/env.d.ts
CHANGED
package/env.js
CHANGED
package/index.ssr.d.ts
CHANGED
|
@@ -512,7 +512,7 @@ export const Modal: {
|
|
|
512
512
|
bindAttributes: () => void;
|
|
513
513
|
};
|
|
514
514
|
export const PACKAGE_NAME: "blocks";
|
|
515
|
-
export const PACKAGE_VERSION: "1.5.
|
|
515
|
+
export const PACKAGE_VERSION: "1.5.2";
|
|
516
516
|
export const PresenceToggle: {
|
|
517
517
|
new (): {};
|
|
518
518
|
template: string;
|
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 class="uc-file-name-wrapper">
|
|
747
|
+
<div aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
|
|
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>
|
|
@@ -943,7 +943,7 @@ export const Modal = class {
|
|
|
943
943
|
static bindAttributes = () => {};
|
|
944
944
|
};
|
|
945
945
|
export const PACKAGE_NAME = `blocks`;
|
|
946
|
-
export const PACKAGE_VERSION = `1.5.
|
|
946
|
+
export const PACKAGE_VERSION = `1.5.2`;
|
|
947
947
|
export const PresenceToggle = class {
|
|
948
948
|
static template = `<slot></slot> `;
|
|
949
949
|
static reg = () => {};
|
|
@@ -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 class="uc-header-text">{{headerText}}</span>
|
|
1246
|
+
<span aria-live="polite" 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