@uploadcare/file-uploader 1.6.0-alpha.0 → 1.6.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/UploaderBlock.d.ts +4 -1
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +11 -18
- package/blocks/DropArea/DropArea.js +1 -1
- package/blocks/FileItem/FileItem.d.ts +2 -1
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +11 -6
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +5 -4
- package/blocks/UploadList/UploadList.js +1 -1
- package/blocks/UrlSource/UrlSource.js +1 -1
- package/blocks/utils/UploadSource.d.ts +27 -1
- package/blocks/utils/UploadSource.d.ts.map +1 -1
- package/blocks/utils/UploadSource.js +20 -1
- package/env.d.ts +1 -1
- package/env.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.ssr.d.ts +97 -14
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +88 -16
- package/locales/file-uploader/ar.d.ts +5 -0
- package/locales/file-uploader/ar.js +5 -0
- package/locales/file-uploader/az.d.ts +5 -0
- package/locales/file-uploader/az.js +5 -0
- package/locales/file-uploader/ca.d.ts +5 -0
- package/locales/file-uploader/ca.js +5 -0
- package/locales/file-uploader/cs.d.ts +5 -0
- package/locales/file-uploader/cs.js +5 -0
- package/locales/file-uploader/da.d.ts +5 -0
- package/locales/file-uploader/da.js +5 -0
- package/locales/file-uploader/de.d.ts +5 -0
- package/locales/file-uploader/de.js +5 -0
- package/locales/file-uploader/el.d.ts +5 -0
- package/locales/file-uploader/el.js +5 -0
- package/locales/file-uploader/en.d.ts +5 -0
- package/locales/file-uploader/en.js +5 -0
- package/locales/file-uploader/es.d.ts +5 -0
- package/locales/file-uploader/es.js +5 -0
- package/locales/file-uploader/et.d.ts +5 -0
- package/locales/file-uploader/et.js +5 -0
- package/locales/file-uploader/fr.d.ts +5 -0
- package/locales/file-uploader/fr.js +5 -0
- package/locales/file-uploader/he.d.ts +5 -0
- package/locales/file-uploader/he.js +5 -0
- package/locales/file-uploader/hy.d.ts +5 -0
- package/locales/file-uploader/hy.js +5 -0
- package/locales/file-uploader/is.d.ts +5 -0
- package/locales/file-uploader/is.js +5 -0
- package/locales/file-uploader/it.d.ts +5 -0
- package/locales/file-uploader/it.js +5 -0
- package/locales/file-uploader/ja.d.ts +5 -0
- package/locales/file-uploader/ja.js +5 -0
- package/locales/file-uploader/ka.d.ts +5 -0
- package/locales/file-uploader/ka.js +5 -0
- package/locales/file-uploader/kk.d.ts +5 -0
- package/locales/file-uploader/kk.js +5 -0
- package/locales/file-uploader/ko.d.ts +5 -0
- package/locales/file-uploader/ko.js +5 -0
- package/locales/file-uploader/lv.d.ts +5 -0
- package/locales/file-uploader/lv.js +5 -0
- package/locales/file-uploader/nb.d.ts +5 -0
- package/locales/file-uploader/nb.js +5 -0
- package/locales/file-uploader/nl.d.ts +5 -0
- package/locales/file-uploader/nl.js +5 -0
- package/locales/file-uploader/pl.d.ts +5 -0
- package/locales/file-uploader/pl.js +5 -0
- package/locales/file-uploader/pt.d.ts +5 -0
- package/locales/file-uploader/pt.js +5 -0
- package/locales/file-uploader/ro.d.ts +5 -0
- package/locales/file-uploader/ro.js +5 -0
- package/locales/file-uploader/ru.d.ts +5 -0
- package/locales/file-uploader/ru.js +5 -0
- package/locales/file-uploader/sk.d.ts +5 -0
- package/locales/file-uploader/sk.js +5 -0
- package/locales/file-uploader/sr.d.ts +5 -0
- package/locales/file-uploader/sr.js +5 -0
- package/locales/file-uploader/sv.d.ts +5 -0
- package/locales/file-uploader/sv.js +5 -0
- package/locales/file-uploader/tr.d.ts +5 -0
- package/locales/file-uploader/tr.js +5 -0
- package/locales/file-uploader/uk.d.ts +5 -0
- package/locales/file-uploader/uk.js +5 -0
- package/locales/file-uploader/vi.d.ts +5 -0
- package/locales/file-uploader/vi.js +5 -0
- package/locales/file-uploader/zh-TW.d.ts +5 -0
- package/locales/file-uploader/zh-TW.js +5 -0
- package/locales/file-uploader/zh.d.ts +5 -0
- package/locales/file-uploader/zh.js +5 -0
- package/package.json +1 -1
- package/types/exported.d.ts +2 -0
- 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/blocks/EditorFilerobotImage/EditorFilerobotImage.d.ts +0 -13
- package/blocks/EditorFilerobotImage/EditorFilerobotImage.d.ts.map +0 -1
- package/blocks/EditorFilerobotImage/EditorFilerobotImage.js +0 -59
|
@@ -100,8 +100,11 @@ export namespace UploaderBlock {
|
|
|
100
100
|
ONEDRIVE: "onedrive";
|
|
101
101
|
HUDDLE: "huddle";
|
|
102
102
|
LOCAL: "local";
|
|
103
|
-
|
|
103
|
+
DROP_AREA: "drop-area";
|
|
104
104
|
CAMERA: "camera";
|
|
105
|
+
EXTERNAL: "external";
|
|
106
|
+
API: "js-api";
|
|
107
|
+
URL: "url";
|
|
105
108
|
DRAW: "draw";
|
|
106
109
|
}>;
|
|
107
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderBlock.d.ts","sourceRoot":"","sources":["UploaderBlock.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploaderBlock.d.ts","sourceRoot":"","sources":["UploaderBlock.js"],"names":[],"mappings":"AAmBA;IACE,iBAAiB;IACjB,mCAAwB;IAExB,eAAe;IACf,mBAAmB;IAEnB;;;;;;;;;;;;;;MAA+B;IAE/B,eAAe;IACf,0BAOC;IA2BD;;;OAGG;IACH,qDAKC;IAED,mCAAmC;IACnC,6BAKC;IAED,4BAEC;IAED,iCAAiC;IACjC,wCAKC;IAYD,eAAe;IACf,qBA0BC;IAvBC,eAAe;IACf,6BAAiG;IAEjG,eAAe;IACf,uCAEC;IAmBH;;;OAGG;IACH,qBAkBC;IAED,eAAe;IACf,0BAYQ;IAER;;;;OAIG;IACH,gCAiCE;IAEF;;;OAGG;IACH,0CAyFE;IAEF,eAAe;IACf,mCAoBE;IAEF,eAAe;IACf,uBAuCC;IAED;;;OAGG;IACH,kCAHW,MAAM,qEAWhB;IAED;;;OAGG;IACH,oCAHa,QAAQ,OAAO,2BAA2B,EAAE,eAAe,CAAC,CA2BxE;IAED,kEAAkE;IAClE,iBADc,OAAO,sBAAsB,EAAE,eAAe,EAAE,CAK7D;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAra6B,oBAAoB;qCAWb,2BAA2B;kCAG9B,wBAAwB;kCADxB,wBAAwB;gCAD1B,sBAAsB"}
|
|
@@ -15,6 +15,7 @@ import { TypedCollection } from './TypedCollection.js';
|
|
|
15
15
|
import { UploaderPublicApi } from './UploaderPublicApi.js';
|
|
16
16
|
import { ValidationManager } from './ValidationManager.js';
|
|
17
17
|
import { uploadEntrySchema } from './uploadEntrySchema.js';
|
|
18
|
+
import { ExternalUploadSource, UploadSource } from '../blocks/utils/UploadSource.js';
|
|
18
19
|
|
|
19
20
|
export class UploaderBlock extends ActivityBlock {
|
|
20
21
|
/** @protected */
|
|
@@ -421,26 +422,18 @@ export class UploaderBlock extends ActivityBlock {
|
|
|
421
422
|
}
|
|
422
423
|
}
|
|
423
424
|
|
|
424
|
-
/**
|
|
425
|
+
/**
|
|
426
|
+
* @deprecated Use list sources ExternalUploadSource from from blocks/utils/UploadSource.js
|
|
427
|
+
* @enum {String}
|
|
428
|
+
*/
|
|
425
429
|
UploaderBlock.extSrcList = Object.freeze({
|
|
426
|
-
|
|
427
|
-
DROPBOX: 'dropbox',
|
|
428
|
-
GDRIVE: 'gdrive',
|
|
429
|
-
GPHOTOS: 'gphotos',
|
|
430
|
-
INSTAGRAM: 'instagram',
|
|
431
|
-
FLICKR: 'flickr',
|
|
432
|
-
VK: 'vk',
|
|
433
|
-
EVERNOTE: 'evernote',
|
|
434
|
-
BOX: 'box',
|
|
435
|
-
ONEDRIVE: 'onedrive',
|
|
436
|
-
HUDDLE: 'huddle',
|
|
430
|
+
...ExternalUploadSource,
|
|
437
431
|
});
|
|
438
432
|
|
|
439
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* @deprecated Use list sources UploadSource from from blocks/utils/UploadSource.js
|
|
435
|
+
* @enum {String}
|
|
436
|
+
*/
|
|
440
437
|
UploaderBlock.sourceTypes = Object.freeze({
|
|
441
|
-
|
|
442
|
-
URL: 'url',
|
|
443
|
-
CAMERA: 'camera',
|
|
444
|
-
DRAW: 'draw',
|
|
445
|
-
...UploaderBlock.extSrcList,
|
|
438
|
+
...UploadSource,
|
|
446
439
|
});
|
|
@@ -151,7 +151,7 @@ export class DropArea extends UploaderBlock {
|
|
|
151
151
|
this.subConfigValue('sourceList', (value) => {
|
|
152
152
|
const list = stringToArray(value);
|
|
153
153
|
// Enable drop area if local files are allowed
|
|
154
|
-
this.$.isEnabled = list.includes(
|
|
154
|
+
this.$.isEnabled = list.includes(UploadSource.LOCAL);
|
|
155
155
|
// Show drop area if it's enabled or default slot is overrided
|
|
156
156
|
this.$.isVisible = this.$.isEnabled || !this.querySelector('[data-default-slot]');
|
|
157
157
|
});
|
|
@@ -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,QA0B7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAsFC;CACF;;;;;8BApa6B,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,10 @@ 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.l10n('a11y-file-item-status', {
|
|
295
|
+
fileName: this._entry?.getValue('fileName'),
|
|
296
|
+
status: this.l10n(state?.description?.toLocaleLowerCase() ?? '').toLocaleLowerCase(),
|
|
297
|
+
}),
|
|
293
298
|
});
|
|
294
299
|
}
|
|
295
300
|
|
|
@@ -392,7 +397,7 @@ export class FileItem extends UploaderBlock {
|
|
|
392
397
|
cdnUrl: entry.getValue('cdnUrl') ?? fileInfo.cdnUrl,
|
|
393
398
|
cdnUrlModifiers: entry.getValue('cdnUrlModifiers') ?? '',
|
|
394
399
|
uploadProgress: 100,
|
|
395
|
-
source: entry.getValue('source') ??
|
|
400
|
+
source: entry.getValue('source') ?? null,
|
|
396
401
|
});
|
|
397
402
|
|
|
398
403
|
if (entry === this._entry) {
|
|
@@ -426,7 +431,7 @@ FileItem.template = /* HTML */ `
|
|
|
426
431
|
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
427
432
|
</div>
|
|
428
433
|
</div>
|
|
429
|
-
<div class="uc-file-name-wrapper">
|
|
434
|
+
<div aria-live="polite" class="uc-file-name-wrapper" set="@aria-label:ariaLabelStatusFile;">
|
|
430
435
|
<span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
|
|
431
436
|
<span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
|
|
432
437
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceBtn.d.ts","sourceRoot":"","sources":["SourceBtn.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SourceBtn.d.ts","sourceRoot":"","sources":["SourceBtn.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AAEH;IAEE,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACZ;IACjB;;;OAGG;IACH,yBAAsB;IAKpB;;;;;;;;;;;;;;;;MAIC;IAGH,kBAuCC;IAkBD,kCAAkC;IAClC,yBADY,OAAO,QAGlB;IAED,2BAA2B;IAC3B,cADY,MAAM,WAGjB;IAED,iBAYC;IAED,2BAA2B;IAC3B,gBADY,MAAM,QAcjB;CACF;;;;sBA9HY;IACZ,IAAQ,EAAE,MAAM,CAAC;IACjB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,cAAkB,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;8BAd0B,iCAAiC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
3
3
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
4
|
+
import { ExternalUploadSource, UploadSource } from '../utils/UploadSource.js';
|
|
4
5
|
|
|
5
6
|
const L10N_PREFIX = 'src-type-';
|
|
6
7
|
|
|
@@ -37,19 +38,19 @@ export class SourceBtn extends UploaderBlock {
|
|
|
37
38
|
|
|
38
39
|
initTypes() {
|
|
39
40
|
this.registerType({
|
|
40
|
-
type:
|
|
41
|
+
type: UploadSource.LOCAL,
|
|
41
42
|
activate: () => {
|
|
42
43
|
this.api.openSystemDialog();
|
|
43
44
|
return false;
|
|
44
45
|
},
|
|
45
46
|
});
|
|
46
47
|
this.registerType({
|
|
47
|
-
type:
|
|
48
|
+
type: UploadSource.URL,
|
|
48
49
|
activity: ActivityBlock.activities.URL,
|
|
49
50
|
textKey: 'from-url',
|
|
50
51
|
});
|
|
51
52
|
this.registerType({
|
|
52
|
-
type:
|
|
53
|
+
type: UploadSource.CAMERA,
|
|
53
54
|
activity: ActivityBlock.activities.CAMERA,
|
|
54
55
|
activate: () => {
|
|
55
56
|
const supportsCapture = 'capture' in document.createElement('input');
|
|
@@ -65,7 +66,7 @@ export class SourceBtn extends UploaderBlock {
|
|
|
65
66
|
icon: 'edit-draw',
|
|
66
67
|
});
|
|
67
68
|
|
|
68
|
-
for (let externalSourceType of Object.values(
|
|
69
|
+
for (let externalSourceType of Object.values(ExternalUploadSource)) {
|
|
69
70
|
this.registerType({
|
|
70
71
|
type: externalSourceType,
|
|
71
72
|
activity: ActivityBlock.activities.EXTERNAL,
|
|
@@ -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"
|
|
@@ -13,7 +13,7 @@ export class UrlSource extends UploaderBlock {
|
|
|
13
13
|
e.preventDefault();
|
|
14
14
|
|
|
15
15
|
let url = this.ref.input['value'];
|
|
16
|
-
this.api.addFileFromUrl(url, { source: UploadSource.
|
|
16
|
+
this.api.addFileFromUrl(url, { source: UploadSource.URL });
|
|
17
17
|
this.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
18
18
|
},
|
|
19
19
|
onCancel: () => {
|
|
@@ -1,9 +1,35 @@
|
|
|
1
|
+
export const ExternalUploadSource: Readonly<{
|
|
2
|
+
FACEBOOK: "facebook";
|
|
3
|
+
DROPBOX: "dropbox";
|
|
4
|
+
GDRIVE: "gdrive";
|
|
5
|
+
GPHOTOS: "gphotos";
|
|
6
|
+
INSTAGRAM: "instagram";
|
|
7
|
+
FLICKR: "flickr";
|
|
8
|
+
VK: "vk";
|
|
9
|
+
EVERNOTE: "evernote";
|
|
10
|
+
BOX: "box";
|
|
11
|
+
ONEDRIVE: "onedrive";
|
|
12
|
+
HUDDLE: "huddle";
|
|
13
|
+
}>;
|
|
1
14
|
export const UploadSource: Readonly<{
|
|
15
|
+
FACEBOOK: "facebook";
|
|
16
|
+
DROPBOX: "dropbox";
|
|
17
|
+
GDRIVE: "gdrive";
|
|
18
|
+
GPHOTOS: "gphotos";
|
|
19
|
+
INSTAGRAM: "instagram";
|
|
20
|
+
FLICKR: "flickr";
|
|
21
|
+
VK: "vk";
|
|
22
|
+
EVERNOTE: "evernote";
|
|
23
|
+
BOX: "box";
|
|
24
|
+
ONEDRIVE: "onedrive";
|
|
25
|
+
HUDDLE: "huddle";
|
|
2
26
|
LOCAL: "local";
|
|
3
27
|
DROP_AREA: "drop-area";
|
|
4
|
-
URL_TAB: "url-tab";
|
|
5
28
|
CAMERA: "camera";
|
|
6
29
|
EXTERNAL: "external";
|
|
7
30
|
API: "js-api";
|
|
31
|
+
URL: "url";
|
|
32
|
+
DRAW: "draw";
|
|
8
33
|
}>;
|
|
34
|
+
export type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
9
35
|
//# sourceMappingURL=UploadSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadSource.d.ts","sourceRoot":"","sources":["UploadSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploadSource.d.ts","sourceRoot":"","sources":["UploadSource.js"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;GASG;0BAEW,CAAC,mBAAmB,CAAC,CAAC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
export const ExternalUploadSource = Object.freeze({
|
|
3
|
+
FACEBOOK: 'facebook',
|
|
4
|
+
DROPBOX: 'dropbox',
|
|
5
|
+
GDRIVE: 'gdrive',
|
|
6
|
+
GPHOTOS: 'gphotos',
|
|
7
|
+
INSTAGRAM: 'instagram',
|
|
8
|
+
FLICKR: 'flickr',
|
|
9
|
+
VK: 'vk',
|
|
10
|
+
EVERNOTE: 'evernote',
|
|
11
|
+
BOX: 'box',
|
|
12
|
+
ONEDRIVE: 'onedrive',
|
|
13
|
+
HUDDLE: 'huddle',
|
|
14
|
+
});
|
|
15
|
+
|
|
1
16
|
export const UploadSource = Object.freeze({
|
|
2
17
|
LOCAL: 'local',
|
|
3
18
|
DROP_AREA: 'drop-area',
|
|
4
|
-
URL_TAB: 'url-tab',
|
|
5
19
|
CAMERA: 'camera',
|
|
6
20
|
EXTERNAL: 'external',
|
|
7
21
|
API: 'js-api',
|
|
22
|
+
URL: 'url',
|
|
23
|
+
DRAW: 'draw',
|
|
24
|
+
...ExternalUploadSource,
|
|
8
25
|
});
|
|
26
|
+
|
|
27
|
+
/** @typedef {(typeof UploadSource)[keyof typeof UploadSource]} SourceTypes */
|
package/env.d.ts
CHANGED
package/env.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -36,4 +36,5 @@ export { defineLocale } from "./abstract/localeRegistry.js";
|
|
|
36
36
|
export { loadFileUploaderFrom } from "./abstract/loadFileUploaderFrom.js";
|
|
37
37
|
export { toKebabCase } from "./utils/toKebabCase.js";
|
|
38
38
|
export { BaseComponent, Data, UID } from "@symbiotejs/symbiote";
|
|
39
|
+
export { UploadSource, ExternalUploadSource } from "./blocks/utils/UploadSource.js";
|
|
39
40
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -44,6 +44,7 @@ export { defineComponents } from './abstract/defineComponents.js';
|
|
|
44
44
|
export { defineLocale } from './abstract/localeRegistry.js';
|
|
45
45
|
export { loadFileUploaderFrom } from './abstract/loadFileUploaderFrom.js';
|
|
46
46
|
export { toKebabCase } from './utils/toKebabCase.js';
|
|
47
|
+
export { UploadSource, ExternalUploadSource } from './blocks/utils/UploadSource.js';
|
|
47
48
|
|
|
48
49
|
export * from './env.js';
|
|
49
50
|
|
package/index.ssr.d.ts
CHANGED
|
@@ -70,8 +70,11 @@ export const CameraSource: {
|
|
|
70
70
|
};
|
|
71
71
|
sourceTypes: {
|
|
72
72
|
LOCAL: string;
|
|
73
|
-
|
|
73
|
+
DROP_AREA: string;
|
|
74
74
|
CAMERA: string;
|
|
75
|
+
EXTERNAL: string;
|
|
76
|
+
API: string;
|
|
77
|
+
URL: string;
|
|
75
78
|
DRAW: string;
|
|
76
79
|
FACEBOOK: string;
|
|
77
80
|
DROPBOX: string;
|
|
@@ -125,8 +128,11 @@ export const CloudImageEditorActivity: {
|
|
|
125
128
|
};
|
|
126
129
|
sourceTypes: {
|
|
127
130
|
LOCAL: string;
|
|
128
|
-
|
|
131
|
+
DROP_AREA: string;
|
|
129
132
|
CAMERA: string;
|
|
133
|
+
EXTERNAL: string;
|
|
134
|
+
API: string;
|
|
135
|
+
URL: string;
|
|
130
136
|
DRAW: string;
|
|
131
137
|
FACEBOOK: string;
|
|
132
138
|
DROPBOX: string;
|
|
@@ -224,8 +230,11 @@ export const DropArea: {
|
|
|
224
230
|
};
|
|
225
231
|
sourceTypes: {
|
|
226
232
|
LOCAL: string;
|
|
227
|
-
|
|
233
|
+
DROP_AREA: string;
|
|
228
234
|
CAMERA: string;
|
|
235
|
+
EXTERNAL: string;
|
|
236
|
+
API: string;
|
|
237
|
+
URL: string;
|
|
229
238
|
DRAW: string;
|
|
230
239
|
FACEBOOK: string;
|
|
231
240
|
DROPBOX: string;
|
|
@@ -333,8 +342,11 @@ export const ExternalSource: {
|
|
|
333
342
|
};
|
|
334
343
|
sourceTypes: {
|
|
335
344
|
LOCAL: string;
|
|
336
|
-
|
|
345
|
+
DROP_AREA: string;
|
|
337
346
|
CAMERA: string;
|
|
347
|
+
EXTERNAL: string;
|
|
348
|
+
API: string;
|
|
349
|
+
URL: string;
|
|
338
350
|
DRAW: string;
|
|
339
351
|
FACEBOOK: string;
|
|
340
352
|
DROPBOX: string;
|
|
@@ -362,6 +374,19 @@ export const ExternalSource: {
|
|
|
362
374
|
is: string;
|
|
363
375
|
bindAttributes: () => void;
|
|
364
376
|
};
|
|
377
|
+
export namespace ExternalUploadSource {
|
|
378
|
+
let FACEBOOK: string;
|
|
379
|
+
let DROPBOX: string;
|
|
380
|
+
let GDRIVE: string;
|
|
381
|
+
let GPHOTOS: string;
|
|
382
|
+
let INSTAGRAM: string;
|
|
383
|
+
let FLICKR: string;
|
|
384
|
+
let VK: string;
|
|
385
|
+
let EVERNOTE: string;
|
|
386
|
+
let BOX: string;
|
|
387
|
+
let ONEDRIVE: string;
|
|
388
|
+
let HUDDLE: string;
|
|
389
|
+
}
|
|
365
390
|
export const FileItem: {
|
|
366
391
|
new (): {};
|
|
367
392
|
template: string;
|
|
@@ -381,8 +406,11 @@ export const FileItem: {
|
|
|
381
406
|
};
|
|
382
407
|
sourceTypes: {
|
|
383
408
|
LOCAL: string;
|
|
384
|
-
|
|
409
|
+
DROP_AREA: string;
|
|
385
410
|
CAMERA: string;
|
|
411
|
+
EXTERNAL: string;
|
|
412
|
+
API: string;
|
|
413
|
+
URL: string;
|
|
386
414
|
DRAW: string;
|
|
387
415
|
FACEBOOK: string;
|
|
388
416
|
DROPBOX: string;
|
|
@@ -449,8 +477,11 @@ export const FormInput: {
|
|
|
449
477
|
};
|
|
450
478
|
sourceTypes: {
|
|
451
479
|
LOCAL: string;
|
|
452
|
-
|
|
480
|
+
DROP_AREA: string;
|
|
453
481
|
CAMERA: string;
|
|
482
|
+
EXTERNAL: string;
|
|
483
|
+
API: string;
|
|
484
|
+
URL: string;
|
|
454
485
|
DRAW: string;
|
|
455
486
|
FACEBOOK: string;
|
|
456
487
|
DROPBOX: string;
|
|
@@ -512,7 +543,7 @@ export const Modal: {
|
|
|
512
543
|
bindAttributes: () => void;
|
|
513
544
|
};
|
|
514
545
|
export const PACKAGE_NAME: "blocks";
|
|
515
|
-
export const PACKAGE_VERSION: "1.
|
|
546
|
+
export const PACKAGE_VERSION: "1.6.0";
|
|
516
547
|
export const PresenceToggle: {
|
|
517
548
|
new (): {};
|
|
518
549
|
template: string;
|
|
@@ -547,8 +578,11 @@ export const ProgressBarCommon: {
|
|
|
547
578
|
};
|
|
548
579
|
sourceTypes: {
|
|
549
580
|
LOCAL: string;
|
|
550
|
-
|
|
581
|
+
DROP_AREA: string;
|
|
551
582
|
CAMERA: string;
|
|
583
|
+
EXTERNAL: string;
|
|
584
|
+
API: string;
|
|
585
|
+
URL: string;
|
|
552
586
|
DRAW: string;
|
|
553
587
|
FACEBOOK: string;
|
|
554
588
|
DROPBOX: string;
|
|
@@ -604,8 +638,11 @@ export const SimpleBtn: {
|
|
|
604
638
|
};
|
|
605
639
|
sourceTypes: {
|
|
606
640
|
LOCAL: string;
|
|
607
|
-
|
|
641
|
+
DROP_AREA: string;
|
|
608
642
|
CAMERA: string;
|
|
643
|
+
EXTERNAL: string;
|
|
644
|
+
API: string;
|
|
645
|
+
URL: string;
|
|
609
646
|
DRAW: string;
|
|
610
647
|
FACEBOOK: string;
|
|
611
648
|
DROPBOX: string;
|
|
@@ -666,8 +703,11 @@ export const SourceBtn: {
|
|
|
666
703
|
};
|
|
667
704
|
sourceTypes: {
|
|
668
705
|
LOCAL: string;
|
|
669
|
-
|
|
706
|
+
DROP_AREA: string;
|
|
670
707
|
CAMERA: string;
|
|
708
|
+
EXTERNAL: string;
|
|
709
|
+
API: string;
|
|
710
|
+
URL: string;
|
|
671
711
|
DRAW: string;
|
|
672
712
|
FACEBOOK: string;
|
|
673
713
|
DROPBOX: string;
|
|
@@ -769,8 +809,11 @@ export const UploadCtxProvider: {
|
|
|
769
809
|
};
|
|
770
810
|
sourceTypes: {
|
|
771
811
|
LOCAL: string;
|
|
772
|
-
|
|
812
|
+
DROP_AREA: string;
|
|
773
813
|
CAMERA: string;
|
|
814
|
+
EXTERNAL: string;
|
|
815
|
+
API: string;
|
|
816
|
+
URL: string;
|
|
774
817
|
DRAW: string;
|
|
775
818
|
FACEBOOK: string;
|
|
776
819
|
DROPBOX: string;
|
|
@@ -816,8 +859,11 @@ export const UploadList: {
|
|
|
816
859
|
};
|
|
817
860
|
sourceTypes: {
|
|
818
861
|
LOCAL: string;
|
|
819
|
-
|
|
862
|
+
DROP_AREA: string;
|
|
820
863
|
CAMERA: string;
|
|
864
|
+
EXTERNAL: string;
|
|
865
|
+
API: string;
|
|
866
|
+
URL: string;
|
|
821
867
|
DRAW: string;
|
|
822
868
|
FACEBOOK: string;
|
|
823
869
|
DROPBOX: string;
|
|
@@ -845,6 +891,37 @@ export const UploadList: {
|
|
|
845
891
|
is: string;
|
|
846
892
|
bindAttributes: () => void;
|
|
847
893
|
};
|
|
894
|
+
export namespace UploadSource {
|
|
895
|
+
export let LOCAL: string;
|
|
896
|
+
export let DROP_AREA: string;
|
|
897
|
+
export let CAMERA: string;
|
|
898
|
+
export let EXTERNAL: string;
|
|
899
|
+
export let API: string;
|
|
900
|
+
export let URL: string;
|
|
901
|
+
export let DRAW: string;
|
|
902
|
+
let FACEBOOK_1: string;
|
|
903
|
+
export { FACEBOOK_1 as FACEBOOK };
|
|
904
|
+
let DROPBOX_1: string;
|
|
905
|
+
export { DROPBOX_1 as DROPBOX };
|
|
906
|
+
let GDRIVE_1: string;
|
|
907
|
+
export { GDRIVE_1 as GDRIVE };
|
|
908
|
+
let GPHOTOS_1: string;
|
|
909
|
+
export { GPHOTOS_1 as GPHOTOS };
|
|
910
|
+
let INSTAGRAM_1: string;
|
|
911
|
+
export { INSTAGRAM_1 as INSTAGRAM };
|
|
912
|
+
let FLICKR_1: string;
|
|
913
|
+
export { FLICKR_1 as FLICKR };
|
|
914
|
+
let VK_1: string;
|
|
915
|
+
export { VK_1 as VK };
|
|
916
|
+
let EVERNOTE_1: string;
|
|
917
|
+
export { EVERNOTE_1 as EVERNOTE };
|
|
918
|
+
let BOX_1: string;
|
|
919
|
+
export { BOX_1 as BOX };
|
|
920
|
+
let ONEDRIVE_1: string;
|
|
921
|
+
export { ONEDRIVE_1 as ONEDRIVE };
|
|
922
|
+
let HUDDLE_1: string;
|
|
923
|
+
export { HUDDLE_1 as HUDDLE };
|
|
924
|
+
}
|
|
848
925
|
export const UploaderBlock: {
|
|
849
926
|
new (): {};
|
|
850
927
|
extSrcList: {
|
|
@@ -862,8 +939,11 @@ export const UploaderBlock: {
|
|
|
862
939
|
};
|
|
863
940
|
sourceTypes: {
|
|
864
941
|
LOCAL: string;
|
|
865
|
-
|
|
942
|
+
DROP_AREA: string;
|
|
866
943
|
CAMERA: string;
|
|
944
|
+
EXTERNAL: string;
|
|
945
|
+
API: string;
|
|
946
|
+
URL: string;
|
|
867
947
|
DRAW: string;
|
|
868
948
|
FACEBOOK: string;
|
|
869
949
|
DROPBOX: string;
|
|
@@ -909,8 +989,11 @@ export const UrlSource: {
|
|
|
909
989
|
};
|
|
910
990
|
sourceTypes: {
|
|
911
991
|
LOCAL: string;
|
|
912
|
-
|
|
992
|
+
DROP_AREA: string;
|
|
913
993
|
CAMERA: string;
|
|
994
|
+
EXTERNAL: string;
|
|
995
|
+
API: string;
|
|
996
|
+
URL: string;
|
|
914
997
|
DRAW: string;
|
|
915
998
|
FACEBOOK: string;
|
|
916
999
|
DROPBOX: string;
|
package/index.ssr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ssr.d.ts","sourceRoot":"","sources":["index.ssr.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;EAcE;AACF;;;;;;;;;;;;;;;EAcE;AACF;;;;;EAIE;AACF;;;;;;EAKE;AACF;;;;;;;;EAYE;AACF
|
|
1
|
+
{"version":3,"file":"index.ssr.d.ts","sourceRoot":"","sources":["index.ssr.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;EAcE;AACF;;;;;;;;;;;;;;;EAcE;AACF;;;;;EAIE;AACF;;;;;;EAKE;AACF;;;;;;;;EAYE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqFE;AACF;;;;;;;;EAuCE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CE;AACF;;;;;;;;EAuCE;AACF;;;;;;;EA0FE;AACF;;;;;;;EAaE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEE;AACF;;;;;;;EAWE;AACF;;;;;;;EAWE;AACF;;;;;;;EASE;AACF;;;;;;EAKE;AACF;;;;;;;EAWE;AACF;;;;;;;EAME;AACF;;;;;;;EAWE;AACF;;;;;;;EA2IE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EE;;;;;;;;;;;;;;AAcF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFE;AACF;;;;;;EAKE;AACF;;;;;;EAKE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CE;AACF;;;;;;;;EAYE;AACF;;;;;;EAwBE;AACF;;;;;;;EAUE;AACF;;;;;;;;EAWE;AACF,oCAAqC;AACrC,sCAAuC;AACvC;;;;;;;EAME;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDE;AACF;;;;;;;EAME;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DE;AACF;;;;;;;EAeE;AACF;;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDE;AACF;;;;;;EAKE;AACF;;;;;;;;;;;;;;;;EAeE;AACF;;;;;;;;;;;;EAWE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8FE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsEE;AACK,yCAAiC;AACjC,qCAA6B;AAC7B,6CAAqC;AACrC,oCAA4B"}
|