@uploadcare/file-uploader 1.12.0-alpha.0 → 1.13.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/abstract/ActivityBlock.d.ts +5 -5
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/Block.d.ts +3 -9
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/CTX.d.ts +6 -6
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/LocaleManager.d.ts +3 -3
- package/abstract/LocaleManager.d.ts.map +1 -1
- package/abstract/SecureUploadsManager.d.ts +2 -2
- package/abstract/SecureUploadsManager.d.ts.map +1 -1
- package/abstract/SolutionBlock.d.ts +2 -2
- package/abstract/SolutionBlock.d.ts.map +1 -1
- package/abstract/TypedCollection.d.ts.map +1 -1
- package/abstract/TypedData.d.ts +1 -1
- package/abstract/TypedData.d.ts.map +1 -1
- package/abstract/UploaderBlock.d.ts +5 -7
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.d.ts +23 -22
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/ValidationManager.d.ts +4 -4
- package/abstract/ValidationManager.d.ts.map +1 -1
- package/abstract/a11y.d.ts +2 -2
- package/abstract/a11y.d.ts.map +1 -1
- package/abstract/buildOutputCollectionState.d.ts +1 -1
- package/abstract/buildOutputCollectionState.d.ts.map +1 -1
- package/abstract/defineComponents.d.ts.map +1 -1
- package/abstract/l10nProcessor.d.ts.map +1 -1
- package/abstract/loadFileUploaderFrom.d.ts +1 -1
- package/abstract/loadFileUploaderFrom.d.ts.map +1 -1
- package/abstract/localeRegistry.d.ts.map +1 -1
- package/abstract/sharedConfigKey.d.ts.map +1 -1
- package/abstract/uploadEntrySchema.d.ts +2 -2
- package/abstract/uploadEntrySchema.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.d.ts +9 -9
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.js +11 -10
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +8 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.js +45 -0
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
- package/blocks/CloudImageEditor/src/crop-utils.d.ts +14 -14
- package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/cropper-constants.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/css/common.css +4 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +1 -1
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +1 -1
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +3 -3
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/state.d.ts +4 -4
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/types.d.ts +8 -58
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/Config/Config.d.ts +4 -12
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/Config.js +2 -0
- package/blocks/Config/initialConfig.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts.map +1 -1
- package/blocks/Config/initialConfig.js +3 -0
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Config/normalizeConfigValue.js +2 -0
- package/blocks/DropArea/DropArea.d.ts +2 -2
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/addDropzone.d.ts.map +1 -1
- package/blocks/DropArea/getDropItems.d.ts +2 -2
- package/blocks/DropArea/getDropItems.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +11 -5
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +27 -16
- package/blocks/ExternalSource/MessageBridge.d.ts +3 -3
- package/blocks/ExternalSource/MessageBridge.d.ts.map +1 -1
- package/blocks/ExternalSource/external-source.css +14 -0
- package/blocks/ExternalSource/query-string.d.ts.map +1 -1
- package/blocks/ExternalSource/types.d.ts +65 -76
- package/blocks/ExternalSource/types.d.ts.map +1 -1
- package/blocks/ExternalSource/types.js +1 -15
- package/blocks/FileItem/FileItem.d.ts +2 -2
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/Img/ImgBase.d.ts +3 -3
- package/blocks/Img/ImgBase.d.ts.map +1 -1
- package/blocks/Img/ImgConfig.d.ts.map +1 -1
- package/blocks/Img/configurations.d.ts.map +1 -1
- package/blocks/Range/Range.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceList/SourceList.d.ts.map +1 -1
- package/blocks/SourceList/SourceList.js +11 -0
- package/blocks/Spinner/Spinner.d.ts +8 -0
- package/blocks/Spinner/Spinner.d.ts.map +1 -0
- package/blocks/Spinner/Spinner.js +5 -0
- package/blocks/Spinner/spinner.css +18 -0
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +20 -20
- package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +4 -4
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.d.ts +2 -2
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -3
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +1 -1
- package/blocks/themes/uc-basic/index.css +1 -0
- package/blocks/themes/uc-basic/svg-sprite.d.ts +1 -1
- package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -1
- package/blocks/themes/uc-basic/svg-sprite.js +1 -1
- package/blocks/utils/UploadSource.d.ts +0 -2
- package/blocks/utils/UploadSource.d.ts.map +1 -1
- package/blocks/utils/UploadSource.js +0 -1
- package/blocks/utils/debounce.d.ts +3 -1
- package/blocks/utils/debounce.d.ts.map +1 -1
- package/blocks/utils/resizeImage.d.ts +1 -1
- package/blocks/utils/resizeImage.d.ts.map +1 -1
- package/blocks/utils/throttle.d.ts +3 -1
- package/blocks/utils/throttle.d.ts.map +1 -1
- package/blocks/utils/userAgent.d.ts +1 -1
- package/blocks/utils/userAgent.d.ts.map +1 -1
- package/env.d.ts +1 -1
- package/env.d.ts.map +1 -1
- package/env.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.ssr.d.ts +8 -30
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +13 -35
- package/locales/file-uploader/ar.d.ts +0 -1
- package/locales/file-uploader/ar.js +0 -1
- package/locales/file-uploader/az.d.ts +0 -1
- package/locales/file-uploader/az.js +0 -1
- package/locales/file-uploader/ca.d.ts +0 -1
- package/locales/file-uploader/ca.js +0 -1
- package/locales/file-uploader/cs.d.ts +0 -1
- package/locales/file-uploader/cs.js +0 -1
- package/locales/file-uploader/da.d.ts +0 -1
- package/locales/file-uploader/da.js +0 -1
- package/locales/file-uploader/de.d.ts +0 -1
- package/locales/file-uploader/de.js +0 -1
- package/locales/file-uploader/el.d.ts +0 -1
- package/locales/file-uploader/el.js +0 -1
- package/locales/file-uploader/en.d.ts +0 -1
- package/locales/file-uploader/en.js +0 -1
- package/locales/file-uploader/es.d.ts +0 -1
- package/locales/file-uploader/es.js +0 -1
- package/locales/file-uploader/et.d.ts +0 -1
- package/locales/file-uploader/et.js +0 -1
- package/locales/file-uploader/fi.d.ts +0 -1
- package/locales/file-uploader/fi.js +0 -1
- package/locales/file-uploader/fr.d.ts +0 -1
- package/locales/file-uploader/fr.js +0 -1
- package/locales/file-uploader/he.d.ts +0 -1
- package/locales/file-uploader/he.js +0 -1
- package/locales/file-uploader/hy.d.ts +0 -1
- package/locales/file-uploader/hy.js +0 -1
- package/locales/file-uploader/is.d.ts +0 -1
- package/locales/file-uploader/is.js +0 -1
- package/locales/file-uploader/it.d.ts +0 -1
- package/locales/file-uploader/it.js +0 -1
- package/locales/file-uploader/ja.d.ts +0 -1
- package/locales/file-uploader/ja.js +0 -1
- package/locales/file-uploader/ka.d.ts +0 -1
- package/locales/file-uploader/ka.js +0 -1
- package/locales/file-uploader/kk.d.ts +0 -1
- package/locales/file-uploader/kk.js +0 -1
- package/locales/file-uploader/ko.d.ts +0 -1
- package/locales/file-uploader/ko.js +0 -1
- package/locales/file-uploader/lv.d.ts +0 -1
- package/locales/file-uploader/lv.js +0 -1
- package/locales/file-uploader/nb.d.ts +0 -1
- package/locales/file-uploader/nb.js +0 -1
- package/locales/file-uploader/nl.d.ts +0 -1
- package/locales/file-uploader/nl.js +0 -1
- package/locales/file-uploader/pl.d.ts +0 -1
- package/locales/file-uploader/pl.js +0 -1
- package/locales/file-uploader/pt.d.ts +0 -1
- package/locales/file-uploader/pt.js +0 -1
- package/locales/file-uploader/ro.d.ts +0 -1
- package/locales/file-uploader/ro.js +0 -1
- package/locales/file-uploader/ru.d.ts +0 -1
- package/locales/file-uploader/ru.js +0 -1
- package/locales/file-uploader/sk.d.ts +0 -1
- package/locales/file-uploader/sk.js +0 -1
- package/locales/file-uploader/sr.d.ts +0 -1
- package/locales/file-uploader/sr.js +0 -1
- package/locales/file-uploader/sv.d.ts +0 -1
- package/locales/file-uploader/sv.js +0 -1
- package/locales/file-uploader/tr.d.ts +0 -1
- package/locales/file-uploader/tr.js +0 -1
- package/locales/file-uploader/uk.d.ts +0 -1
- package/locales/file-uploader/uk.js +0 -1
- package/locales/file-uploader/vi.d.ts +0 -1
- package/locales/file-uploader/vi.js +0 -1
- package/locales/file-uploader/zh-TW.d.ts +0 -1
- package/locales/file-uploader/zh-TW.js +0 -1
- package/locales/file-uploader/zh.d.ts +0 -1
- package/locales/file-uploader/zh.js +0 -1
- package/package.json +1 -1
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +2 -2
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -3
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/types/exported.d.ts +170 -0
- package/utils/cdn-utils.d.ts +3 -3
- package/utils/cdn-utils.d.ts.map +1 -1
- package/utils/fileTypes.d.ts +1 -1
- package/utils/fileTypes.d.ts.map +1 -1
- package/utils/getPluralForm.d.ts.map +1 -1
- package/utils/isSecureTokenExpired.d.ts +1 -1
- package/utils/memoize.d.ts.map +1 -1
- package/utils/mixinClass.d.ts +3 -1
- package/utils/mixinClass.d.ts.map +1 -1
- package/utils/prettyBytes.d.ts.map +1 -1
- package/utils/template-utils.d.ts +1 -1
- package/utils/template-utils.d.ts.map +1 -1
- package/utils/toKebabCase.d.ts.map +1 -1
- package/utils/transparentPixelSrc.d.ts.map +1 -1
- package/utils/uniqueArray.d.ts.map +1 -1
- package/utils/validators/collection/validateCollectionUploadError.d.ts +1 -1
- package/utils/validators/collection/validateMultiple.d.ts +1 -1
- package/utils/validators/file/validateFileType.d.ts +1 -1
- package/utils/validators/file/validateIsImage.d.ts +1 -1
- package/utils/validators/file/validateMaxSizeLimit.d.ts +1 -1
- package/utils/validators/file/validateUploadError.d.ts +1 -1
- package/utils/waitForAttribute.d.ts +1 -1
- package/utils/waitForAttribute.d.ts.map +1 -1
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.min.css +1 -1
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.css +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.css +1 -1
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +2 -2
|
@@ -113,6 +113,7 @@ const mapping = {
|
|
|
113
113
|
imgOnly: asBoolean,
|
|
114
114
|
accept: asString,
|
|
115
115
|
externalSourcesPreferredTypes: asString,
|
|
116
|
+
externalSourcesEmbedCss: asString,
|
|
116
117
|
store: asStore,
|
|
117
118
|
cameraMirror: asBoolean,
|
|
118
119
|
cameraCapture: asCameraCapture,
|
|
@@ -171,6 +172,7 @@ const mapping = {
|
|
|
171
172
|
mediaRecorerOptions: asObject,
|
|
172
173
|
|
|
173
174
|
maxVideoRecordingDuration: asNumber,
|
|
175
|
+
maskHrefCloudEditor: asString,
|
|
174
176
|
};
|
|
175
177
|
|
|
176
178
|
/**
|
|
@@ -11,8 +11,8 @@ export class DropArea extends UploaderBlock {
|
|
|
11
11
|
'*commonProgress': number;
|
|
12
12
|
'*uploadList': never[];
|
|
13
13
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
14
|
-
'*collectionErrors':
|
|
15
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
14
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
15
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
16
16
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
17
17
|
'*uploadTrigger': Set<string>;
|
|
18
18
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropArea.d.ts","sourceRoot":"","sources":["DropArea.js"],"names":[],"mappings":"AAaA;IAKI
|
|
1
|
+
{"version":3,"file":"DropArea.d.ts","sourceRoot":"","sources":["DropArea.js"],"names":[],"mappings":"AAaA;IAKI;;;;;;;;;;;;+CAFO,gBAEJ;mCAGC,gBAAU;6BAIZ,2BACA;;wCASK,wCAA2B;;;;;;MAPjC;IAGH,oBAgBC;IAgDC,eAAe;IACf,yBA2BE;IAIA,yDAWE;IA6BF;;;OAGG;IACH,uBASC;IAOL;;;;;OAKG;IACH,sBAeC;IAED,eAAe;IACf,0BAcC;CAqBF;;;;8BAlP6B,iCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addDropzone.d.ts","sourceRoot":"","sources":["addDropzone.js"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH;
|
|
1
|
+
{"version":3,"file":"addDropzone.d.ts","sourceRoot":"","sources":["addDropzone.js"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,kCALG;IAA0B,OAAO,EAAzB,WAAW;IACI,QAAQ;IACR,OAAO;IACF,YAAY,EAAhC,aAAa;CACvB,cAwGA"}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export function getDropItems(dataTransfer: DataTransfer): Promise<DropItem[]>;
|
|
8
8
|
export type DropItem = {
|
|
9
|
-
type:
|
|
9
|
+
type: "file";
|
|
10
10
|
file: File;
|
|
11
11
|
fullPath?: string;
|
|
12
12
|
} | {
|
|
13
|
-
type:
|
|
13
|
+
type: "url";
|
|
14
14
|
url: string;
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=getDropItems.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDropItems.d.ts","sourceRoot":"","sources":["getDropItems.js"],"names":[],"mappings":"AAwGA;;;;;GAKG;AACH,2CAHW,YAAY,GACV,
|
|
1
|
+
{"version":3,"file":"getDropItems.d.ts","sourceRoot":"","sources":["getDropItems.js"],"names":[],"mappings":"AAwGA;;;;;GAKG;AACH,2CAHW,YAAY,GACV,OAAO,CAAC,QAAQ,EAAE,CAAC,CA0D/B;uBAnKY;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -5,14 +5,15 @@ export class ExternalSource extends UploaderBlock {
|
|
|
5
5
|
activityIcon: string;
|
|
6
6
|
activityCaption: string;
|
|
7
7
|
/** @type {import('./types.js').InputMessageMap['selected-files-change']['selectedFiles']} */
|
|
8
|
-
selectedList: import(
|
|
8
|
+
selectedList: import("./types.js").InputMessageMap["selected-files-change"]["selectedFiles"];
|
|
9
9
|
total: number;
|
|
10
|
-
iframe: null;
|
|
11
10
|
isSelectionReady: boolean;
|
|
11
|
+
isDoneBtnEnabled: boolean;
|
|
12
12
|
couldSelectAll: boolean;
|
|
13
13
|
couldDeselectAll: boolean;
|
|
14
14
|
showSelectionStatus: boolean;
|
|
15
15
|
counterText: string;
|
|
16
|
+
doneBtnTextClass: string;
|
|
16
17
|
onDone: () => void;
|
|
17
18
|
onCancel: () => void;
|
|
18
19
|
onSelectAll: () => void;
|
|
@@ -20,8 +21,8 @@ export class ExternalSource extends UploaderBlock {
|
|
|
20
21
|
'*commonProgress': number;
|
|
21
22
|
'*uploadList': never[];
|
|
22
23
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
23
|
-
'*collectionErrors':
|
|
24
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
24
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
25
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
25
26
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
26
27
|
'*uploadTrigger': Set<string>;
|
|
27
28
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -46,7 +47,12 @@ export class ExternalSource extends UploaderBlock {
|
|
|
46
47
|
/** @private */
|
|
47
48
|
private handleIframeLoad;
|
|
48
49
|
/** @private */
|
|
49
|
-
private
|
|
50
|
+
private applyTheme;
|
|
51
|
+
/**
|
|
52
|
+
* @private
|
|
53
|
+
* @param {string} css
|
|
54
|
+
*/
|
|
55
|
+
private applyEmbedCss;
|
|
50
56
|
/** @private */
|
|
51
57
|
private setupL10n;
|
|
52
58
|
/** @private */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"AAWA,+DAA+D;AAE/D;IAEE,yBAAiD;IAK/C;;;QAKE,6FAA6F;sBAAlF,OAAO,YAAY,EAAE,eAAe,CAAC,uBAAuB,CAAC,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;+CAV3D,gBAAU;mCAOxC,gBAAG;6BAG+B,2BAA2B;;wCAKzC,wCACJ;;;;;;MA2BjB;IAGH,6BAA6B;IAC7B,sBADW,cAAc,CAOxB;IAgDD;;;OAGG;IACH,mCAcC;IAED;;;OAGG;IACH,kCAsBC;IAED,eAAe;IACf,yBAIC;IAED,eAAe;IACf,mBAKC;IAED;;;OAGG;IACH,sBAKC;IAED,eAAe;IACf,kBAKC;IAED,eAAe;IACf,kBAeC;IAED,eAAe;IACf,oBA6BC;IALC,eAAe;IACf,uBAA6D;IAM/D,eAAe;IACf,sBAMC;IAED,eAAe;IACf,6BASC;CACF;;;;6BAjQa;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE;8BAPd,iCAAiC"}
|
|
@@ -8,7 +8,6 @@ import { wildcardRegexp } from '../../utils/wildcardRegexp.js';
|
|
|
8
8
|
import { buildThemeDefinition } from './buildThemeDefinition.js';
|
|
9
9
|
import { MessageBridge } from './MessageBridge.js';
|
|
10
10
|
import { queryString } from './query-string.js';
|
|
11
|
-
import { A11y } from '../../abstract/a11y.js';
|
|
12
11
|
|
|
13
12
|
/** @typedef {{ externalSourceType: string }} ActivityParams */
|
|
14
13
|
|
|
@@ -27,13 +26,14 @@ export class ExternalSource extends UploaderBlock {
|
|
|
27
26
|
/** @type {import('./types.js').InputMessageMap['selected-files-change']['selectedFiles']} */
|
|
28
27
|
selectedList: [],
|
|
29
28
|
total: 0,
|
|
30
|
-
iframe: null,
|
|
31
29
|
|
|
32
30
|
isSelectionReady: false,
|
|
31
|
+
isDoneBtnEnabled: false,
|
|
33
32
|
couldSelectAll: false,
|
|
34
33
|
couldDeselectAll: false,
|
|
35
34
|
showSelectionStatus: false,
|
|
36
35
|
counterText: '',
|
|
36
|
+
doneBtnTextClass: 'uc-hidden',
|
|
37
37
|
|
|
38
38
|
onDone: () => {
|
|
39
39
|
for (const message of this.$.selectedList) {
|
|
@@ -108,6 +108,10 @@ export class ExternalSource extends UploaderBlock {
|
|
|
108
108
|
this.subConfigValue('localeName', (val) => {
|
|
109
109
|
this.setupL10n();
|
|
110
110
|
});
|
|
111
|
+
|
|
112
|
+
this.subConfigValue('externalSourcesEmbedCss', (embedCss) => {
|
|
113
|
+
this.applyEmbedCss(embedCss);
|
|
114
|
+
});
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
/**
|
|
@@ -148,7 +152,9 @@ export class ExternalSource extends UploaderBlock {
|
|
|
148
152
|
);
|
|
149
153
|
|
|
150
154
|
this.set$({
|
|
155
|
+
doneBtnTextClass: message.isReady ? '' : 'uc-hidden',
|
|
151
156
|
isSelectionReady: message.isReady,
|
|
157
|
+
isDoneBtnEnabled: message.isReady && message.selectedFiles.length > 0,
|
|
152
158
|
showSelectionStatus: message.isMultipleMode && message.total > 0,
|
|
153
159
|
couldSelectAll: message.selectedCount < message.total,
|
|
154
160
|
couldDeselectAll: message.selectedCount === message.total,
|
|
@@ -158,22 +164,30 @@ export class ExternalSource extends UploaderBlock {
|
|
|
158
164
|
|
|
159
165
|
/** @private */
|
|
160
166
|
handleIframeLoad() {
|
|
161
|
-
this.
|
|
167
|
+
this.applyEmbedCss(this.cfg.externalSourcesEmbedCss);
|
|
168
|
+
this.applyTheme();
|
|
162
169
|
this.setupL10n();
|
|
163
|
-
|
|
164
|
-
this.$.iframe.contentWindow?.focus();
|
|
165
|
-
|
|
166
|
-
this.a11y?.registerBlock(this);
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
/** @private */
|
|
170
|
-
|
|
173
|
+
applyTheme() {
|
|
171
174
|
this._messageBridge?.send({
|
|
172
175
|
type: 'set-theme-definition',
|
|
173
176
|
theme: buildThemeDefinition(this),
|
|
174
177
|
});
|
|
175
178
|
}
|
|
176
179
|
|
|
180
|
+
/**
|
|
181
|
+
* @private
|
|
182
|
+
* @param {string} css
|
|
183
|
+
*/
|
|
184
|
+
applyEmbedCss(css) {
|
|
185
|
+
this._messageBridge?.send({
|
|
186
|
+
type: 'set-embed-css',
|
|
187
|
+
css,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
177
191
|
/** @private */
|
|
178
192
|
setupL10n() {
|
|
179
193
|
this._messageBridge?.send({
|
|
@@ -216,7 +230,6 @@ export class ExternalSource extends UploaderBlock {
|
|
|
216
230
|
});
|
|
217
231
|
iframe.addEventListener('load', this.handleIframeLoad.bind(this));
|
|
218
232
|
|
|
219
|
-
this.$['iframe'] = iframe;
|
|
220
233
|
this.ref.iframeWrapper.innerHTML = '';
|
|
221
234
|
this.ref.iframeWrapper.appendChild(iframe);
|
|
222
235
|
|
|
@@ -247,7 +260,7 @@ export class ExternalSource extends UploaderBlock {
|
|
|
247
260
|
this.set$({
|
|
248
261
|
selectedList: [],
|
|
249
262
|
total: 0,
|
|
250
|
-
|
|
263
|
+
isDoneBtnEnabled: false,
|
|
251
264
|
couldSelectAll: false,
|
|
252
265
|
couldDeselectAll: false,
|
|
253
266
|
showSelectionStatus: false,
|
|
@@ -275,12 +288,10 @@ ExternalSource.template = /* HTML */ `
|
|
|
275
288
|
<button type="button" set="onclick: onSelectAll; @hidden: !couldSelectAll" l10n="select-all"></button>
|
|
276
289
|
<button type="button" set="onclick: onDeselectAll; @hidden: !couldDeselectAll" l10n="deselect-all"></button>
|
|
277
290
|
</div>
|
|
278
|
-
<button
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
l10n="done"
|
|
283
|
-
></button>
|
|
291
|
+
<button type="button" class="uc-done-btn uc-primary-btn" set="onclick: onDone; @disabled: !isDoneBtnEnabled;">
|
|
292
|
+
<uc-spinner set="@hidden: isSelectionReady"></uc-spinner>
|
|
293
|
+
<span l10n="done" set="@class: doneBtnTextClass"></span>
|
|
294
|
+
</button>
|
|
284
295
|
</div>
|
|
285
296
|
</div>
|
|
286
297
|
`;
|
|
@@ -2,7 +2,7 @@ export class MessageBridge {
|
|
|
2
2
|
/** @param {Window} context */
|
|
3
3
|
constructor(context: Window);
|
|
4
4
|
/** @type {Map<string, Set<import('./types').InputMessageHandler<import('./types').InputMessageType>>>} */
|
|
5
|
-
_handlerMap: Map<string, Set<import(
|
|
5
|
+
_handlerMap: Map<string, Set<import("./types").InputMessageHandler<import("./types").InputMessageType>>>;
|
|
6
6
|
/** @type {Window} */
|
|
7
7
|
_context: Window;
|
|
8
8
|
/** @param {MessageEvent} e */
|
|
@@ -12,9 +12,9 @@ export class MessageBridge {
|
|
|
12
12
|
* @param {T} type
|
|
13
13
|
* @param {import('./types').InputMessageHandler<T>} handler
|
|
14
14
|
*/
|
|
15
|
-
on<T extends "
|
|
15
|
+
on<T extends import("./types").InputMessageType>(type: T, handler: import("./types").InputMessageHandler<T>): void;
|
|
16
16
|
/** @param {import('./types').OutputMessage} message */
|
|
17
|
-
send(message: import(
|
|
17
|
+
send(message: import("./types").OutputMessage): void;
|
|
18
18
|
destroy(): void;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=MessageBridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBridge.d.ts","sourceRoot":"","sources":["MessageBridge.js"],"names":[],"mappings":"AAgBA;IAOE,8BAA8B;IAC9B,qBADY,MAAM,EAKjB;IAXD,0GAA0G;IAC1G,aADW,
|
|
1
|
+
{"version":3,"file":"MessageBridge.d.ts","sourceRoot":"","sources":["MessageBridge.js"],"names":[],"mappings":"AAgBA;IAOE,8BAA8B;IAC9B,qBADY,MAAM,EAKjB;IAXD,0GAA0G;IAC1G,aADW,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,SAAS,EAAE,mBAAmB,CAAC,OAAO,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAC9E;IAExB,qBAAqB;IACrB,UADW,MAAM,CACR;IAST,8BAA8B;IAC9B,oBADY,YAAY,UAgBtB;IAEF;;;;OAIG;IACH,GAJkD,CAAC,SAAtC,OAAQ,SAAS,EAAE,gBAAiB,QACtC,CAAC,WACD,OAAO,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC,QASlD;IAED,uDAAuD;IACvD,cADY,OAAO,SAAS,EAAE,aAAa,QAG1C;IAED,gBAEC;CACF"}
|
|
@@ -78,3 +78,17 @@ uc-external-source uc-activity-header {
|
|
|
78
78
|
uc-external-source uc-activity-header .uc-close-btn {
|
|
79
79
|
pointer-events: auto;
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
uc-external-source .uc-done-btn > span.uc-hidden {
|
|
83
|
+
visibility: hidden;
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
uc-external-source .uc-done-btn > uc-spinner {
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-string.d.ts","sourceRoot":"","sources":["query-string.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH
|
|
1
|
+
{"version":3,"file":"query-string.d.ts","sourceRoot":"","sources":["query-string.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oCAHW;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAC7D,MAAM,CAWlB"}
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
export type InstagramInfo = {
|
|
2
|
-
caption?: string | null;
|
|
3
|
-
created: number;
|
|
4
|
-
id: string;
|
|
5
|
-
public_page?: string;
|
|
6
|
-
username: string;
|
|
7
|
-
size?: number;
|
|
8
|
-
name?: string;
|
|
9
|
-
modified?: number;
|
|
10
|
-
};
|
|
11
1
|
export type DoneSuccessResponse = {
|
|
12
2
|
error?: undefined;
|
|
13
|
-
info?: InstagramInfo;
|
|
14
3
|
alternatives?: Record<string, string>;
|
|
15
4
|
is_image?: boolean | null;
|
|
16
5
|
filename?: string;
|
|
17
|
-
obj_type:
|
|
6
|
+
obj_type: "selected_file";
|
|
18
7
|
url: string;
|
|
19
8
|
};
|
|
20
9
|
export type InputMessageMap = {
|
|
21
|
-
|
|
22
|
-
type:
|
|
10
|
+
"selected-files-change": {
|
|
11
|
+
type: "selected-files-change";
|
|
23
12
|
total: number;
|
|
24
13
|
selectedCount: number;
|
|
25
14
|
} & ({
|
|
@@ -38,76 +27,76 @@ export type InputMessageMap = {
|
|
|
38
27
|
};
|
|
39
28
|
export type InputMessageType = keyof InputMessageMap;
|
|
40
29
|
export type InputMessage = InputMessageMap[InputMessageType];
|
|
41
|
-
export type InputMessageHandler<T extends "
|
|
30
|
+
export type InputMessageHandler<T extends import("./types").InputMessageType> = (message: import("./types").InputMessageMap[T]) => void;
|
|
42
31
|
export type ThemeDefinition = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
32
|
+
"--uc-font-family": string;
|
|
33
|
+
"--uc-font-size": string;
|
|
34
|
+
"--uc-line-height": string;
|
|
35
|
+
"--uc-button-size": string;
|
|
36
|
+
"--uc-preview-size": string;
|
|
37
|
+
"--uc-input-size": string;
|
|
38
|
+
"--uc-padding": string;
|
|
39
|
+
"--uc-radius": string;
|
|
40
|
+
"--uc-transition": string;
|
|
41
|
+
"--uc-background": string;
|
|
42
|
+
"--uc-foreground": string;
|
|
43
|
+
"--uc-primary": string;
|
|
44
|
+
"--uc-primary-hover": string;
|
|
45
|
+
"--uc-primary-transparent": string;
|
|
46
|
+
"--uc-primary-foreground": string;
|
|
47
|
+
"--uc-secondary": string;
|
|
48
|
+
"--uc-secondary-hover": string;
|
|
49
|
+
"--uc-secondary-foreground": string;
|
|
50
|
+
"--uc-muted": string;
|
|
51
|
+
"--uc-muted-foreground": string;
|
|
52
|
+
"--uc-destructive": string;
|
|
53
|
+
"--uc-destructive-foreground": string;
|
|
54
|
+
"--uc-border": string;
|
|
55
|
+
"--uc-primary-rgb-light": string;
|
|
56
|
+
"--uc-primary-light": string;
|
|
57
|
+
"--uc-primary-hover-light": string;
|
|
58
|
+
"--uc-primary-transparent-light": string;
|
|
59
|
+
"--uc-background-light": string;
|
|
60
|
+
"--uc-foreground-light": string;
|
|
61
|
+
"--uc-primary-foreground-light": string;
|
|
62
|
+
"--uc-secondary-light": string;
|
|
63
|
+
"--uc-secondary-hover-light": string;
|
|
64
|
+
"--uc-secondary-foreground-light": string;
|
|
65
|
+
"--uc-muted-light": string;
|
|
66
|
+
"--uc-muted-foreground-light": string;
|
|
67
|
+
"--uc-destructive-light": string;
|
|
68
|
+
"--uc-destructive-foreground-light": string;
|
|
69
|
+
"--uc-border-light": string;
|
|
70
|
+
"--uc-primary-rgb-dark": string;
|
|
71
|
+
"--uc-primary-dark": string;
|
|
72
|
+
"--uc-primary-hover-dark": string;
|
|
73
|
+
"--uc-primary-transparent-dark": string;
|
|
74
|
+
"--uc-background-dark": string;
|
|
75
|
+
"--uc-foreground-dark": string;
|
|
76
|
+
"--uc-primary-foreground-dark": string;
|
|
77
|
+
"--uc-secondary-dark": string;
|
|
78
|
+
"--uc-secondary-hover-dark": string;
|
|
79
|
+
"--uc-secondary-foreground-dark": string;
|
|
80
|
+
"--uc-muted-dark": string;
|
|
81
|
+
"--uc-muted-foreground-dark": string;
|
|
82
|
+
"--uc-destructive-dark": string;
|
|
83
|
+
"--uc-destructive-foreground-dark": string;
|
|
84
|
+
"--uc-border-dark": string;
|
|
85
|
+
"--uc-primary-oklch-light": string;
|
|
86
|
+
"--uc-primary-oklch-dark": string;
|
|
98
87
|
};
|
|
99
88
|
export type OutputMessage = {
|
|
100
|
-
type:
|
|
89
|
+
type: "select-all";
|
|
101
90
|
} | {
|
|
102
|
-
type:
|
|
91
|
+
type: "deselect-all";
|
|
103
92
|
} | {
|
|
104
|
-
type:
|
|
93
|
+
type: "set-theme-definition";
|
|
105
94
|
theme: Record<string, string>;
|
|
106
95
|
} | {
|
|
107
|
-
type:
|
|
96
|
+
type: "set-locale-definition";
|
|
108
97
|
localeDefinition: string;
|
|
109
98
|
} | {
|
|
110
|
-
type:
|
|
111
|
-
css:
|
|
99
|
+
type: "set-embed-css";
|
|
100
|
+
css: string;
|
|
112
101
|
};
|
|
113
102
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"kCAGa;IACR,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;8BAIS;IACZ,uBAA2B,EAAE;QACvB,IAAI,EAAE,uBAAuB,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;KACvB,GAAG,CACA;QACE,OAAO,EAAE,KAAK,CAAC;QACf,cAAc,EAAE,OAAO,CAAC;QACxB,aAAa,EAAE,SAAS,CAAC;KAC1B,GACD;QACE,OAAO,EAAE,IAAI,CAAC;QACd,cAAc,EAAE,IAAI,CAAC;QACrB,aAAa,EAAE,mBAAmB,EAAE,CAAC;KACtC,GACD;QACE,OAAO,EAAE,IAAI,CAAC;QACd,cAAc,EAAE,KAAK,CAAC;QACtB,aAAa,EAAE,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC;KAC3C,CACJ,CAAC;CACH;+BAGU,MAAM,eAAe;2BACrB,eAAe,CAAC,gBAAgB,CAAC;gCAGG,CAAC,SAAtC,OAAQ,SAAS,EAAE,gBAAiB,IACpC,CAAC,OAAO,EAAE,OAAO,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI;8BAIvD;IACZ,kBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAsB,EAAE,MAAM,CAAC;IAC/B,mBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAkB,EAAE,MAAM,CAAC;IAC3B,aAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAwB,EAAE,MAAM,CAAC;IACjC,0BAA8B,EAAE,MAAM,CAAC;IACvC,yBAA6B,EAAE,MAAM,CAAC;IACtC,gBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAA0B,EAAE,MAAM,CAAC;IACnC,2BAA+B,EAAE,MAAM,CAAC;IACxC,YAAgB,EAAE,MAAM,CAAC;IACzB,uBAA2B,EAAE,MAAM,CAAC;IACpC,kBAAsB,EAAE,MAAM,CAAC;IAC/B,6BAAiC,EAAE,MAAM,CAAC;IAC1C,aAAiB,EAAE,MAAM,CAAC;IAC1B,wBAA4B,EAAE,MAAM,CAAC;IACrC,oBAAwB,EAAE,MAAM,CAAC;IACjC,0BAA8B,EAAE,MAAM,CAAC;IACvC,gCAAoC,EAAE,MAAM,CAAC;IAC7C,uBAA2B,EAAE,MAAM,CAAC;IACpC,uBAA2B,EAAE,MAAM,CAAC;IACpC,+BAAmC,EAAE,MAAM,CAAC;IAC5C,sBAA0B,EAAE,MAAM,CAAC;IACnC,4BAAgC,EAAE,MAAM,CAAC;IACzC,iCAAqC,EAAE,MAAM,CAAC;IAC9C,kBAAsB,EAAE,MAAM,CAAC;IAC/B,6BAAiC,EAAE,MAAM,CAAC;IAC1C,wBAA4B,EAAE,MAAM,CAAC;IACrC,mCAAuC,EAAE,MAAM,CAAC;IAChD,mBAAuB,EAAE,MAAM,CAAC;IAChC,uBAA2B,EAAE,MAAM,CAAC;IACpC,mBAAuB,EAAE,MAAM,CAAC;IAChC,yBAA6B,EAAE,MAAM,CAAC;IACtC,+BAAmC,EAAE,MAAM,CAAC;IAC5C,sBAA0B,EAAE,MAAM,CAAC;IACnC,sBAA0B,EAAE,MAAM,CAAC;IACnC,8BAAkC,EAAE,MAAM,CAAC;IAC3C,qBAAyB,EAAE,MAAM,CAAC;IAClC,2BAA+B,EAAE,MAAM,CAAC;IACxC,gCAAoC,EAAE,MAAM,CAAC;IAC7C,iBAAqB,EAAE,MAAM,CAAC;IAC9B,4BAAgC,EAAE,MAAM,CAAC;IACzC,uBAA2B,EAAE,MAAM,CAAC;IACpC,kCAAsC,EAAE,MAAM,CAAC;IAC/C,kBAAsB,EAAE,MAAM,CAAC;IAC/B,0BAA8B,EAAE,MAAM,CAAC;IACvC,yBAA6B,EAAE,MAAM,CAAC;CACnC;4BAIS;IACJ,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IACE,IAAI,EAAE,cAAc,CAAC;CACtB,GACD;IACE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,GACD;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {{
|
|
5
|
-
* caption?: string | null;
|
|
6
|
-
* created: number;
|
|
7
|
-
* id: string;
|
|
8
|
-
* public_page?: string;
|
|
9
|
-
* username: string;
|
|
10
|
-
* size?: number;
|
|
11
|
-
* name?: string;
|
|
12
|
-
* modified?: number;
|
|
13
|
-
* }} InstagramInfo
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
3
|
/**
|
|
17
4
|
* @typedef {{
|
|
18
5
|
* error?: undefined;
|
|
19
|
-
* info?: InstagramInfo;
|
|
20
6
|
* alternatives?: Record<string, string>;
|
|
21
7
|
* is_image?: boolean | null;
|
|
22
8
|
* filename?: string;
|
|
@@ -136,7 +122,7 @@
|
|
|
136
122
|
* }
|
|
137
123
|
* | {
|
|
138
124
|
* type: 'set-embed-css';
|
|
139
|
-
* css:
|
|
125
|
+
* css: string;
|
|
140
126
|
* }} OutputMessage
|
|
141
127
|
*/
|
|
142
128
|
|
|
@@ -35,8 +35,8 @@ export class FileItem extends UploaderBlock {
|
|
|
35
35
|
'*commonProgress': number;
|
|
36
36
|
'*uploadList': never[];
|
|
37
37
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
38
|
-
'*collectionErrors':
|
|
39
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
38
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
39
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
40
40
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
41
41
|
'*uploadTrigger': Set<string>;
|
|
42
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;;;;;;;;;;;;;;;;;;;;;+CA9BwB,gBACtB;mCAEgB,gBAGnB;6BAEW,2BAGd;;wCAMY,wCACS;;;;;;MAwChB;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,OAAO,aAAa,EAAE,MAAM,OAAO,aAAa,CAAC,QA0B7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAsFC;CACF;;;;;8BApa6B,iCAAiC;AAO/D;;;;;GAKG"}
|
package/blocks/Img/ImgBase.d.ts
CHANGED
|
@@ -12,14 +12,14 @@ export class ImgBase extends ImgConfig {
|
|
|
12
12
|
* @param {String} [size]
|
|
13
13
|
* @returns {String | Number}
|
|
14
14
|
*/
|
|
15
|
-
_validateSize(size?: string
|
|
15
|
+
_validateSize(size?: string): string | number;
|
|
16
16
|
/**
|
|
17
17
|
* Image operations
|
|
18
18
|
*
|
|
19
19
|
* @param {String} [size]
|
|
20
20
|
* @param {String} [blur]
|
|
21
21
|
*/
|
|
22
|
-
_getCdnModifiers(size?: string
|
|
22
|
+
_getCdnModifiers(size?: string, blur?: string): string;
|
|
23
23
|
/**
|
|
24
24
|
* @private
|
|
25
25
|
* @param {String} [size]
|
|
@@ -38,7 +38,7 @@ export class ImgBase extends ImgConfig {
|
|
|
38
38
|
* @param {Number} [k]
|
|
39
39
|
* @param {Boolean} [wOnly]
|
|
40
40
|
*/
|
|
41
|
-
_getElSize(el: HTMLElement, k?: number
|
|
41
|
+
_getElSize(el: HTMLElement, k?: number, wOnly?: boolean): string | null;
|
|
42
42
|
/** @param {HTMLImageElement} img */
|
|
43
43
|
_setupEventProxy(img: HTMLImageElement): void;
|
|
44
44
|
/** @type {HTMLImageElement} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgBase.d.ts","sourceRoot":"","sources":["ImgBase.js"],"names":[],"mappings":"AAgBA;IACE,uBAAmB;IACnB,8BAA0B;IAE1B;;;OAGG;IACH,gBAMC;IAED;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"ImgBase.d.ts","sourceRoot":"","sources":["ImgBase.js"],"names":[],"mappings":"AAgBA;IACE,uBAAmB;IACnB,8BAA0B;IAE1B;;;OAGG;IACH,gBAMC;IAED;;;;;OAKG;IACH,8BAFa,eAAe,CAoB3B;IAED;;;;;OAKG;IACH,uDAWC;IAED;;;;;OAKG;IACH,oBA6DC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;;OAIG;IACH,eAJW,WAAW,8CAcrB;IAED,oCAAoC;IACpC,sBADY,gBAAgB,QAY3B;IAED,+BAA+B;IAC/B,WADW,gBAAgB,CAO1B;IAED;;;;;;MAUC;IAED,2BAEC;IAED,sBAEC;IAED,mCAOC;IAED,4BAEC;IAED,8BAA8B;IAC9B,aADY,WAAW,QAgBtB;IAED,oBAsBC;IAED,cAEC;IAED,yBAEC;IAED,yBAUC;IAED;;;;aAQC;IAED;;aAGC;IAED;;;;qBAqBC;IAED,6BA8DC;IAED,aAMC;CACF;0BAlZyB,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgConfig.d.ts","sourceRoot":"","sources":["ImgConfig.js"],"names":[],"mappings":"AAUA;IAkFE,0CAEC
|
|
1
|
+
{"version":3,"file":"ImgConfig.d.ts","sourceRoot":"","sources":["ImgConfig.js"],"names":[],"mappings":"AAUA;IAkFE,0CAEC;;IAnFD,cAAqB;IAErB;;;OAGG;IACH,iBAFa,GAAG,CAIf;IAED,qDAAqD;IACrD,wBAIC;IAED;;;OAGG;IACH,yBAFW,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,QAW5B;IAED,0BAEC;IAED,8BAMC;IAED;;;OAGG;IACH,qBAHW,WAAW,SACX,MAAM,IAAI,QAsBpB;IAfC,eAAe;IACf,qBAOQ;IAGN,eAAe;IACf,kBAA0B;IAoB9B,oEAIC;CACF;8BArGmC,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurations.d.ts","sourceRoot":"","sources":["configurations.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"configurations.d.ts","sourceRoot":"","sources":["configurations.js"],"names":[],"mappings":"AAAA,uBAAwB,WAAW,CAAC;AACpC,8BAA+B,YAAY,CAAC;AAC5C,uBAAwB,CAAC,CAAC;AAC1B,0BAA2B,CAAC,CAAC;AAC7B,+BACuH;AAEvH,wBAAyB,IAAI,CAAC;AAC9B,4BAA6B,IAAI,CAAC;AAElC;;;GAGG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["Range.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["Range.js"],"names":[],"mappings":"AAEA;;IACE;;;;;MAUE;IAIA,+BAA+B;IAC/B,qCAA4B;CAe/B;;;;8BAjC6B,sBAAsB"}
|
|
@@ -6,8 +6,8 @@ export class SimpleBtn extends UploaderBlock {
|
|
|
6
6
|
'*commonProgress': number;
|
|
7
7
|
'*uploadList': never[];
|
|
8
8
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
9
|
-
'*collectionErrors':
|
|
10
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
9
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
10
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
11
11
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
12
12
|
'*uploadTrigger': Set<string>;
|
|
13
13
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleBtn.d.ts","sourceRoot":"","sources":["SimpleBtn.js"],"names":[],"mappings":"AAIA;IAMI
|
|
1
|
+
{"version":3,"file":"SimpleBtn.d.ts","sourceRoot":"","sources":["SimpleBtn.js"],"names":[],"mappings":"AAIA;IAMI;;;;;;;+CAkBM,gBACT;mCAIM,gBAAU;6BACoC,2BAGrD;;wCAI8C,wCACvB;;;;;;MAzBlB;CAoBJ;;;;8BApC6B,iCAAiC"}
|
|
@@ -22,8 +22,8 @@ export class SourceBtn extends UploaderBlock {
|
|
|
22
22
|
'*commonProgress': number;
|
|
23
23
|
'*uploadList': never[];
|
|
24
24
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
25
|
-
'*collectionErrors':
|
|
26
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
25
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
26
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
27
27
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
28
28
|
'*uploadTrigger': Set<string>;
|
|
29
29
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;+CALS,gBAAU;mCAOjB,gBAAO;6BAMM,2BACG;;wCAMD,wCACG;;;;;;MAZnB;IAGH,kBAuCC;IAkBD,kCAAkC;IAClC,yBADY,OAAO,QAGlB;IAED,2BAA2B;IAC3B,cADY,MAAM,WAGjB;IAED,iBAYC;IAED,2BAA2B;IAC3B,gBADY,MAAM,QAcjB;CACF;;;;sBA9HY;IACR,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;8BAd0B,iCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceList.d.ts","sourceRoot":"","sources":["SourceList.js"],"names":[],"mappings":"AAGA;
|
|
1
|
+
{"version":3,"file":"SourceList.d.ts","sourceRoot":"","sources":["SourceList.js"],"names":[],"mappings":"AAGA;CA2BC;sBA9BqB,yBAAyB"}
|
|
@@ -7,9 +7,20 @@ export class SourceList extends Block {
|
|
|
7
7
|
this.subConfigValue('sourceList', (/** @type {String} */ val) => {
|
|
8
8
|
let list = stringToArray(val);
|
|
9
9
|
let html = '';
|
|
10
|
+
|
|
10
11
|
list.forEach((srcName) => {
|
|
12
|
+
if (srcName === 'instagram') {
|
|
13
|
+
console.error(
|
|
14
|
+
"Instagram source was removed because the Instagram Basic Display API hasn't been available since December 4, 2024. " +
|
|
15
|
+
'Official statement, see here:' +
|
|
16
|
+
'https://developers.facebook.com/blog/post/2024/09/04/update-on-instagram-basic-display-api/?locale=en_US',
|
|
17
|
+
);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
html += /* HTML */ `<uc-source-btn type="${srcName}"></uc-source-btn>`;
|
|
12
22
|
});
|
|
23
|
+
|
|
13
24
|
if (this.cfg.sourceListWrap) {
|
|
14
25
|
this.innerHTML = html;
|
|
15
26
|
} else {
|