@uploadcare/file-uploader 1.13.2 → 1.14.0-alpha.11
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/ActivityBlock.js +10 -15
- package/abstract/Block.d.ts +9 -9
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +15 -0
- package/abstract/CTX.d.ts +6 -6
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +3 -1
- package/abstract/LocaleManager.d.ts +3 -3
- package/abstract/LocaleManager.d.ts.map +1 -1
- package/abstract/ModalManager.d.ts +124 -0
- package/abstract/ModalManager.d.ts.map +1 -0
- package/abstract/ModalManager.js +227 -0
- 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 +8 -5
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +24 -8
- package/abstract/UploaderPublicApi.d.ts +25 -23
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +48 -10
- 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 +1 -0
- package/blocks/CameraSource/calcCameraModes.d.ts +5 -0
- package/blocks/CameraSource/calcCameraModes.d.ts.map +1 -0
- package/blocks/CameraSource/calcCameraModes.js +11 -0
- package/blocks/CameraSource/constants.d.ts +1 -0
- package/blocks/CameraSource/constants.d.ts.map +1 -1
- package/blocks/CameraSource/constants.js +2 -0
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +1 -1
- 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/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/CloudImageEditorActivity/CloudImageEditorActivity.js +2 -0
- package/blocks/Config/Config.d.ts +3 -12
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/assertions.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts.map +1 -1
- package/blocks/Config/initialConfig.js +4 -0
- package/blocks/Config/normalizeConfigValue.d.ts +2 -1
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Config/normalizeConfigValue.js +19 -106
- package/blocks/Config/side-effects.d.ts.map +1 -1
- package/blocks/Config/validatorsType.d.ts +37 -0
- package/blocks/Config/validatorsType.d.ts.map +1 -0
- package/blocks/Config/validatorsType.js +134 -0
- package/blocks/DropArea/DropArea.d.ts +3 -2
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/DropArea.js +21 -2
- 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 +3 -3
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +2 -1
- package/blocks/ExternalSource/MessageBridge.d.ts +3 -3
- package/blocks/ExternalSource/MessageBridge.d.ts.map +1 -1
- package/blocks/ExternalSource/query-string.d.ts.map +1 -1
- package/blocks/ExternalSource/types.d.ts +64 -64
- package/blocks/ExternalSource/types.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.d.ts +5 -6
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +40 -42
- package/blocks/FileItem/file-item.css +90 -0
- 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/Modal/Modal.d.ts +21 -2
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +52 -24
- package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/blocks/ProgressBar/ProgressBar.js +1 -0
- package/blocks/ProgressBar/progress-bar.css +1 -0
- 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/SimpleBtn/SimpleBtn.js +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +29 -3
- package/blocks/SourceList/SourceList.d.ts.map +1 -1
- package/blocks/SourceList/SourceList.js +20 -0
- package/blocks/Spinner/Spinner.d.ts.map +1 -1
- package/blocks/StartFrom/StartFrom.js +1 -1
- package/blocks/Thumb/Thumb.d.ts +48 -0
- package/blocks/Thumb/Thumb.d.ts.map +1 -0
- package/blocks/Thumb/Thumb.js +169 -0
- package/blocks/Thumb/thumb.css +4 -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 +4 -2
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.js +16 -1
- package/blocks/UploadList/upload-list.css +23 -0
- package/blocks/UrlSource/UrlSource.d.ts.map +1 -1
- package/blocks/UrlSource/UrlSource.js +1 -0
- 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/common.css +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/themes/uc-basic/theme.css +12 -0
- package/blocks/utils/UploadSource.d.ts +6 -0
- package/blocks/utils/UploadSource.d.ts.map +1 -1
- package/blocks/utils/UploadSource.js +7 -0
- 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/supportCapture.d.ts +2 -0
- package/blocks/utils/supportCapture.d.ts.map +1 -0
- package/blocks/utils/supportCapture.js +3 -0
- 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 +2 -0
- package/index.js +2 -0
- package/index.ssr.d.ts +88 -1
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +119 -10
- package/locales/file-uploader/ar.d.ts +2 -0
- package/locales/file-uploader/ar.js +2 -0
- package/locales/file-uploader/az.d.ts +2 -0
- package/locales/file-uploader/az.js +2 -0
- package/locales/file-uploader/ca.d.ts +2 -0
- package/locales/file-uploader/ca.js +2 -0
- package/locales/file-uploader/cs.d.ts +2 -0
- package/locales/file-uploader/cs.js +2 -0
- package/locales/file-uploader/da.d.ts +2 -0
- package/locales/file-uploader/da.js +2 -0
- package/locales/file-uploader/de.d.ts +2 -0
- package/locales/file-uploader/de.js +2 -0
- package/locales/file-uploader/el.d.ts +2 -0
- package/locales/file-uploader/el.js +2 -0
- package/locales/file-uploader/en.d.ts +2 -0
- package/locales/file-uploader/en.js +2 -0
- package/locales/file-uploader/es.d.ts +2 -0
- package/locales/file-uploader/es.js +2 -0
- package/locales/file-uploader/et.d.ts +2 -0
- package/locales/file-uploader/et.js +2 -0
- package/locales/file-uploader/fi.d.ts +2 -0
- package/locales/file-uploader/fi.js +2 -0
- package/locales/file-uploader/fr.d.ts +2 -0
- package/locales/file-uploader/fr.js +2 -0
- package/locales/file-uploader/he.d.ts +2 -0
- package/locales/file-uploader/he.js +2 -0
- package/locales/file-uploader/hy.d.ts +2 -0
- package/locales/file-uploader/hy.js +2 -0
- package/locales/file-uploader/is.d.ts +2 -0
- package/locales/file-uploader/is.js +2 -0
- package/locales/file-uploader/it.d.ts +2 -0
- package/locales/file-uploader/it.js +2 -0
- package/locales/file-uploader/ja.d.ts +2 -0
- package/locales/file-uploader/ja.js +2 -0
- package/locales/file-uploader/ka.d.ts +2 -0
- package/locales/file-uploader/ka.js +2 -0
- package/locales/file-uploader/kk.d.ts +2 -0
- package/locales/file-uploader/kk.js +2 -0
- package/locales/file-uploader/ko.d.ts +2 -0
- package/locales/file-uploader/ko.js +2 -0
- package/locales/file-uploader/lv.d.ts +2 -0
- package/locales/file-uploader/lv.js +2 -0
- package/locales/file-uploader/nb.d.ts +2 -0
- package/locales/file-uploader/nb.js +2 -0
- package/locales/file-uploader/nl.d.ts +2 -0
- package/locales/file-uploader/nl.js +2 -0
- package/locales/file-uploader/pl.d.ts +2 -0
- package/locales/file-uploader/pl.js +2 -0
- package/locales/file-uploader/pt.d.ts +2 -0
- package/locales/file-uploader/pt.js +2 -0
- package/locales/file-uploader/ro.d.ts +2 -0
- package/locales/file-uploader/ro.js +2 -0
- package/locales/file-uploader/ru.d.ts +2 -0
- package/locales/file-uploader/ru.js +2 -0
- package/locales/file-uploader/sk.d.ts +2 -0
- package/locales/file-uploader/sk.js +2 -0
- package/locales/file-uploader/sr.d.ts +2 -0
- package/locales/file-uploader/sr.js +2 -0
- package/locales/file-uploader/sv.d.ts +2 -0
- package/locales/file-uploader/sv.js +2 -0
- package/locales/file-uploader/tr.d.ts +2 -0
- package/locales/file-uploader/tr.js +2 -0
- package/locales/file-uploader/uk.d.ts +2 -0
- package/locales/file-uploader/uk.js +2 -0
- package/locales/file-uploader/vi.d.ts +2 -0
- package/locales/file-uploader/vi.js +2 -0
- package/locales/file-uploader/zh-TW.d.ts +2 -0
- package/locales/file-uploader/zh-TW.js +2 -0
- package/locales/file-uploader/zh.d.ts +2 -0
- package/locales/file-uploader/zh.js +2 -0
- package/package.json +4 -2
- 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/minimal/FileUploaderMinimal.d.ts +35 -0
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +122 -9
- package/solutions/file-uploader/minimal/index.css +25 -24
- package/solutions/file-uploader/minimal/index.d.ts +1 -13
- package/solutions/file-uploader/minimal/index.js +1 -13
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -5
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +17 -16
- package/types/exported.d.ts +7 -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.css +1 -1
- package/web/uc-file-uploader-minimal.min.js +4 -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
|
@@ -1,112 +1,20 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
import { CameraSourceTypes } from '../CameraSource/constants.js';
|
|
4
|
-
import { deserializeCsv } from '../utils/comma-separated.js';
|
|
5
3
|
import { initialConfig } from './initialConfig.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (typeof value === 'boolean') return value;
|
|
21
|
-
// for attr like multiple="true" (react will pass it as string)
|
|
22
|
-
if (value === 'true') return true;
|
|
23
|
-
// for attr flags like multiple="" (some other libs will pass it as empty string)
|
|
24
|
-
if (value === '') return true;
|
|
25
|
-
// for attr like multiple="false" (react will pass it as string)
|
|
26
|
-
if (value === 'false') return false;
|
|
27
|
-
throw new Error(`Invalid boolean: "${value}"`);
|
|
28
|
-
};
|
|
29
|
-
/** @param {unknown} value */
|
|
30
|
-
const asStore = (value) => (value === 'auto' ? value : asBoolean(value));
|
|
31
|
-
|
|
32
|
-
/** @param {unknown} value */
|
|
33
|
-
const asCameraCapture = (value) => {
|
|
34
|
-
const strValue = asString(value);
|
|
35
|
-
if (strValue !== 'user' && strValue !== 'environment' && strValue !== '') {
|
|
36
|
-
throw new Error(`Invalid value: "${strValue}"`);
|
|
37
|
-
}
|
|
38
|
-
return strValue;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/** @param {unknown} value */
|
|
42
|
-
const asCameraMode = (value) => {
|
|
43
|
-
const strValue = asString(value);
|
|
44
|
-
if (!Object.values(CameraSourceTypes).includes(strValue)) {
|
|
45
|
-
throw new Error(`Invalid value: "${strValue}"`);
|
|
46
|
-
}
|
|
47
|
-
return /** @type {import('../CameraSource/CameraSource.js').CameraMode} */ (strValue);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/** @param {unknown} value */
|
|
51
|
-
const asCameraModes = (value) => {
|
|
52
|
-
const str = asString(value);
|
|
53
|
-
const array = deserializeCsv(str);
|
|
54
|
-
if (array.some((item) => !Object.values(CameraSourceTypes).includes(item))) {
|
|
55
|
-
throw new Error(`Invalid value: "${JSON.stringify(array)}"`);
|
|
56
|
-
}
|
|
57
|
-
return str;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** @param {unknown} value */
|
|
61
|
-
const asMetadata = (value) => {
|
|
62
|
-
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
63
|
-
return /** @type {import('../../types').Metadata} */ (value);
|
|
64
|
-
}
|
|
65
|
-
if (typeof value === 'function') {
|
|
66
|
-
return /** @type {import('../../types').MetadataCallback} */ (value);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
throw new Error('Invalid metadata value. Must be an object or function.');
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @template {{}} T
|
|
74
|
-
* @param {unknown} value
|
|
75
|
-
* @returns {T}
|
|
76
|
-
*/
|
|
77
|
-
const asObject = (value) => {
|
|
78
|
-
if (typeof value === 'object') {
|
|
79
|
-
return /** @type {T} */ (value);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
throw new Error('Invalid value. Must be an object.');
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @template {Function} T
|
|
87
|
-
* @param {unknown} value
|
|
88
|
-
* @returns {T}
|
|
89
|
-
*/
|
|
90
|
-
const asFunction = (value) => {
|
|
91
|
-
if (typeof value === 'function') {
|
|
92
|
-
return /** @type {T} */ (value);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
throw new Error('Invalid value. Must be a function.');
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @template {Function[] | string | {}} T
|
|
100
|
-
* @param {unknown} value
|
|
101
|
-
* @returns {T}
|
|
102
|
-
*/
|
|
103
|
-
const asArray = (value) => {
|
|
104
|
-
if (Array.isArray(value)) {
|
|
105
|
-
return /** @type {T} */ (value);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
throw new Error('Must be an array.');
|
|
109
|
-
};
|
|
4
|
+
import {
|
|
5
|
+
asString,
|
|
6
|
+
asNumber,
|
|
7
|
+
asFunction,
|
|
8
|
+
asBoolean,
|
|
9
|
+
asObject,
|
|
10
|
+
asArray,
|
|
11
|
+
asMetadata,
|
|
12
|
+
asCameraCapture,
|
|
13
|
+
asCameraMode,
|
|
14
|
+
asCameraModes,
|
|
15
|
+
asStore,
|
|
16
|
+
asFilesViewMode,
|
|
17
|
+
} from './validatorsType.js';
|
|
110
18
|
|
|
111
19
|
/**
|
|
112
20
|
* @type {{
|
|
@@ -185,6 +93,10 @@ const mapping = {
|
|
|
185
93
|
mediaRecorderOptions: asObject,
|
|
186
94
|
|
|
187
95
|
maxVideoRecordingDuration: asNumber,
|
|
96
|
+
|
|
97
|
+
filesViewMode: asFilesViewMode,
|
|
98
|
+
gridShowFileNames: asBoolean,
|
|
99
|
+
cloudImageEditorAutoOpen: asBoolean,
|
|
188
100
|
};
|
|
189
101
|
|
|
190
102
|
/**
|
|
@@ -205,3 +117,4 @@ export const normalizeConfigValue = (key, value) => {
|
|
|
205
117
|
return initialConfig[key];
|
|
206
118
|
}
|
|
207
119
|
};
|
|
120
|
+
export { asBoolean };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAWO
|
|
1
|
+
{"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAWO,+BAR+C,CAAC,SAA1C,MAAO,OAAO,aAAa,EAAE,UAAW,sCAC1C;IACN,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACvE,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAC3D,QAsBH"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** @param {unknown} value */
|
|
2
|
+
export function asString(value: unknown): string;
|
|
3
|
+
/** @param {unknown} value */
|
|
4
|
+
export function asNumber(value: unknown): number;
|
|
5
|
+
/** @param {unknown} value */
|
|
6
|
+
export function asBoolean(value: unknown): boolean;
|
|
7
|
+
/** @param {unknown} value */
|
|
8
|
+
export function asStore(value: unknown): boolean | "auto";
|
|
9
|
+
/** @param {unknown} value */
|
|
10
|
+
export function asCameraCapture(value: unknown): "" | "user" | "environment";
|
|
11
|
+
/** @param {unknown} value */
|
|
12
|
+
export function asCameraMode(value: unknown): import("../CameraSource/CameraSource.js").CameraMode;
|
|
13
|
+
/** @param {unknown} value */
|
|
14
|
+
export function asCameraModes(value: unknown): string;
|
|
15
|
+
/** @param {unknown} value */
|
|
16
|
+
export function asMetadata(value: unknown): import("@uploadcare/upload-client").Metadata | import("../../types").MetadataCallback;
|
|
17
|
+
/**
|
|
18
|
+
* @template {{}} T
|
|
19
|
+
* @param {unknown} value
|
|
20
|
+
* @returns {T}
|
|
21
|
+
*/
|
|
22
|
+
export function asObject<T extends {}>(value: unknown): T;
|
|
23
|
+
/**
|
|
24
|
+
* @template {Function} T
|
|
25
|
+
* @param {unknown} value
|
|
26
|
+
* @returns {T}
|
|
27
|
+
*/
|
|
28
|
+
export function asFunction<T extends Function>(value: unknown): T;
|
|
29
|
+
/**
|
|
30
|
+
* @template {Function[] | string | {}} T
|
|
31
|
+
* @param {unknown} value
|
|
32
|
+
* @returns {T}
|
|
33
|
+
*/
|
|
34
|
+
export function asArray<T extends Function[] | string | {}>(value: unknown): T;
|
|
35
|
+
/** @param {unknown} value */
|
|
36
|
+
export function asFilesViewMode(value: unknown): import("../UploadList/UploadList.js").FilesViewMode;
|
|
37
|
+
//# sourceMappingURL=validatorsType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatorsType.d.ts","sourceRoot":"","sources":["validatorsType.js"],"names":[],"mappings":"AAIA,6BAA6B;AAC7B,gCADY,OAAO,UACsB;AAEzC,6BAA6B;AAC7B,gCADY,OAAO,UAOlB;AACD,6BAA6B;AAC7B,iCADY,OAAO,WAWlB;AACD,6BAA6B;AAC7B,+BADY,OAAO,oBACqD;AAExE,6BAA6B;AAC7B,uCADY,OAAO,+BAOlB;AAED,6BAA6B;AAC7B,oCADY,OAAO,GAMC,OAAO,iCAAiC,EAAE,UAAU,CACvE;AAED,6BAA6B;AAC7B,qCADY,OAAO,UAQlB;AAED,6BAA6B;AAC7B,kCADY,OAAO,yFAUlB;AAED;;;;GAIG;AACH,yBAJkB,CAAC,SAAN,EAAI,SACN,OAAO,GACL,CAAC,CAQb;AAED;;;;GAIG;AACH,2BAJwB,CAAC,SAAZ,QAAU,SACZ,OAAO,GACL,CAAC,CAQb;AAED;;;;GAIG;AACH,wBAJwC,CAAC,SAA3B,UAAU,GAAG,MAAM,GAAG,EAAG,SAC5B,OAAO,GACL,CAAC,CAQb;AAED,6BAA6B;AAC7B,uCADY,OAAO,uDASlB"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { CameraSourceTypes } from '../CameraSource/constants.js';
|
|
3
|
+
import { deserializeCsv } from '../utils/comma-separated.js';
|
|
4
|
+
|
|
5
|
+
/** @param {unknown} value */
|
|
6
|
+
const asString = (value) => String(value);
|
|
7
|
+
|
|
8
|
+
/** @param {unknown} value */
|
|
9
|
+
const asNumber = (value) => {
|
|
10
|
+
const number = Number(value);
|
|
11
|
+
if (Number.isNaN(number)) {
|
|
12
|
+
throw new Error(`Invalid number: "${value}"`);
|
|
13
|
+
}
|
|
14
|
+
return number;
|
|
15
|
+
};
|
|
16
|
+
/** @param {unknown} value */
|
|
17
|
+
const asBoolean = (value) => {
|
|
18
|
+
if (typeof value === 'undefined' || value === null) return false;
|
|
19
|
+
if (typeof value === 'boolean') return value;
|
|
20
|
+
// for attr like multiple="true" (react will pass it as string)
|
|
21
|
+
if (value === 'true') return true;
|
|
22
|
+
// for attr flags like multiple="" (some other libs will pass it as empty string)
|
|
23
|
+
if (value === '') return true;
|
|
24
|
+
// for attr like multiple="false" (react will pass it as string)
|
|
25
|
+
if (value === 'false') return false;
|
|
26
|
+
throw new Error(`Invalid boolean: "${value}"`);
|
|
27
|
+
};
|
|
28
|
+
/** @param {unknown} value */
|
|
29
|
+
const asStore = (value) => (value === 'auto' ? value : asBoolean(value));
|
|
30
|
+
|
|
31
|
+
/** @param {unknown} value */
|
|
32
|
+
const asCameraCapture = (value) => {
|
|
33
|
+
const strValue = asString(value);
|
|
34
|
+
if (strValue !== 'user' && strValue !== 'environment' && strValue !== '') {
|
|
35
|
+
throw new Error(`Invalid value: "${strValue}"`);
|
|
36
|
+
}
|
|
37
|
+
return strValue;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @param {unknown} value */
|
|
41
|
+
const asCameraMode = (value) => {
|
|
42
|
+
const strValue = asString(value);
|
|
43
|
+
if (!Object.values(CameraSourceTypes).includes(strValue)) {
|
|
44
|
+
throw new Error(`Invalid value: "${strValue}"`);
|
|
45
|
+
}
|
|
46
|
+
return /** @type {import('../CameraSource/CameraSource.js').CameraMode} */ (strValue);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @param {unknown} value */
|
|
50
|
+
const asCameraModes = (value) => {
|
|
51
|
+
const str = asString(value);
|
|
52
|
+
const array = deserializeCsv(str);
|
|
53
|
+
if (array.some((item) => !Object.values(CameraSourceTypes).includes(item))) {
|
|
54
|
+
throw new Error(`Invalid value: "${JSON.stringify(array)}"`);
|
|
55
|
+
}
|
|
56
|
+
return str;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @param {unknown} value */
|
|
60
|
+
const asMetadata = (value) => {
|
|
61
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
62
|
+
return /** @type {import('../../types').Metadata} */ (value);
|
|
63
|
+
}
|
|
64
|
+
if (typeof value === 'function') {
|
|
65
|
+
return /** @type {import('../../types').MetadataCallback} */ (value);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
throw new Error('Invalid metadata value. Must be an object or function.');
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @template {{}} T
|
|
73
|
+
* @param {unknown} value
|
|
74
|
+
* @returns {T}
|
|
75
|
+
*/
|
|
76
|
+
const asObject = (value) => {
|
|
77
|
+
if (typeof value === 'object') {
|
|
78
|
+
return /** @type {T} */ (value);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
throw new Error('Invalid value. Must be an object.');
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @template {Function} T
|
|
86
|
+
* @param {unknown} value
|
|
87
|
+
* @returns {T}
|
|
88
|
+
*/
|
|
89
|
+
const asFunction = (value) => {
|
|
90
|
+
if (typeof value === 'function') {
|
|
91
|
+
return /** @type {T} */ (value);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
throw new Error('Invalid value. Must be a function.');
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @template {Function[] | string | {}} T
|
|
99
|
+
* @param {unknown} value
|
|
100
|
+
* @returns {T}
|
|
101
|
+
*/
|
|
102
|
+
const asArray = (value) => {
|
|
103
|
+
if (Array.isArray(value)) {
|
|
104
|
+
return /** @type {T} */ (value);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
throw new Error('Must be an array.');
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** @param {unknown} value */
|
|
111
|
+
const asFilesViewMode = (value) => {
|
|
112
|
+
const strValue = asString(value);
|
|
113
|
+
|
|
114
|
+
if (['grid', 'list'].includes(strValue)) {
|
|
115
|
+
return /** @type {import('../UploadList/UploadList.js').FilesViewMode} */ (strValue);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
throw new Error(`Invalid value: "${strValue}"`);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export {
|
|
122
|
+
asString,
|
|
123
|
+
asNumber,
|
|
124
|
+
asBoolean,
|
|
125
|
+
asStore,
|
|
126
|
+
asCameraCapture,
|
|
127
|
+
asCameraMode,
|
|
128
|
+
asCameraModes,
|
|
129
|
+
asMetadata,
|
|
130
|
+
asObject,
|
|
131
|
+
asFunction,
|
|
132
|
+
asArray,
|
|
133
|
+
asFilesViewMode,
|
|
134
|
+
};
|
|
@@ -6,13 +6,14 @@ export class DropArea extends UploaderBlock {
|
|
|
6
6
|
isFullscreen: boolean;
|
|
7
7
|
isEnabled: boolean;
|
|
8
8
|
isVisible: boolean;
|
|
9
|
+
isInitFlow: boolean;
|
|
9
10
|
text: string;
|
|
10
11
|
"uc-drop-area/registry": null;
|
|
11
12
|
'*commonProgress': number;
|
|
12
13
|
'*uploadList': never[];
|
|
13
14
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
14
|
-
'*collectionErrors':
|
|
15
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
15
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
16
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
16
17
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
17
18
|
'*uploadTrigger': Set<string>;
|
|
18
19
|
'*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;;;;;;;;;;;;;+CAAO,gBACT;mCAGI,gBAAG;6BAGQ,2BACG;;wCAUhB,wCAAuB;;;;;;MAPtB;IAGH,oBAgBC;IAsDC,eAAe;IACf,yBA2BE;IAIA,yDAWE;IA6BF;;;OAGG;IACH,uBAmBC;IAOL;;;;;OAKG;IACH,sBAeC;IAED,eAAe;IACf,0BAcC;CAqBF;;;;8BAnQ6B,iCAAiC"}
|
|
@@ -4,7 +4,7 @@ import { Data } from '@symbiotejs/symbiote';
|
|
|
4
4
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
5
5
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
6
6
|
import { stringToArray } from '../../utils/stringToArray.js';
|
|
7
|
-
import { asBoolean } from '../Config/
|
|
7
|
+
import { asBoolean } from '../Config/validatorsType.js';
|
|
8
8
|
import { UploadSource } from '../utils/UploadSource.js';
|
|
9
9
|
import { DropzoneState, addDropzone } from './addDropzone.js';
|
|
10
10
|
|
|
@@ -24,6 +24,7 @@ export class DropArea extends UploaderBlock {
|
|
|
24
24
|
isFullscreen: false,
|
|
25
25
|
isEnabled: true,
|
|
26
26
|
isVisible: true,
|
|
27
|
+
isInitFlow: false,
|
|
27
28
|
text: '',
|
|
28
29
|
[REGISTRY_KEY]: null,
|
|
29
30
|
};
|
|
@@ -69,6 +70,12 @@ export class DropArea extends UploaderBlock {
|
|
|
69
70
|
this.set$({ isClickable: asBoolean(value) });
|
|
70
71
|
},
|
|
71
72
|
);
|
|
73
|
+
this.defineAccessor(
|
|
74
|
+
'initflow',
|
|
75
|
+
/** @param {unknown} value */ (value) => {
|
|
76
|
+
this.set$({ isInitFlow: asBoolean(value) });
|
|
77
|
+
},
|
|
78
|
+
);
|
|
72
79
|
this.defineAccessor(
|
|
73
80
|
'with-icon',
|
|
74
81
|
/** @param {unknown} value */ (value) => {
|
|
@@ -115,10 +122,10 @@ export class DropArea extends UploaderBlock {
|
|
|
115
122
|
}
|
|
116
123
|
});
|
|
117
124
|
if (this.uploadCollection.size) {
|
|
125
|
+
this.modalManager.open(ActivityBlock.activities.UPLOAD_LIST);
|
|
118
126
|
this.set$({
|
|
119
127
|
'*currentActivity': ActivityBlock.activities.UPLOAD_LIST,
|
|
120
128
|
});
|
|
121
|
-
this.setOrAddState('*modalActive', true);
|
|
122
129
|
}
|
|
123
130
|
},
|
|
124
131
|
});
|
|
@@ -173,9 +180,19 @@ export class DropArea extends UploaderBlock {
|
|
|
173
180
|
if (event.type === 'keydown') {
|
|
174
181
|
// @ts-ignore
|
|
175
182
|
if (event.code === 'Space' || event.code === 'Enter') {
|
|
183
|
+
if (this.$.isInitFlow) {
|
|
184
|
+
this.api.initFlow();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
176
188
|
this.api.openSystemDialog();
|
|
177
189
|
}
|
|
178
190
|
} else if (event.type === 'click') {
|
|
191
|
+
if (this.$.isInitFlow) {
|
|
192
|
+
this.api.initFlow();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
179
196
|
this.api.openSystemDialog();
|
|
180
197
|
}
|
|
181
198
|
};
|
|
@@ -270,4 +287,6 @@ DropArea.bindAttributes({
|
|
|
270
287
|
fullscreen: null,
|
|
271
288
|
// @ts-expect-error TODO: fix types inside symbiote
|
|
272
289
|
disabled: null,
|
|
290
|
+
// @ts-expect-error TODO: fix types inside symbiote
|
|
291
|
+
initflow: null,
|
|
273
292
|
});
|
|
@@ -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,7 +5,7 @@ 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
10
|
isSelectionReady: boolean;
|
|
11
11
|
isDoneBtnEnabled: boolean;
|
|
@@ -21,8 +21,8 @@ export class ExternalSource extends UploaderBlock {
|
|
|
21
21
|
'*commonProgress': number;
|
|
22
22
|
'*uploadList': never[];
|
|
23
23
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
24
|
-
'*collectionErrors':
|
|
25
|
-
'*collectionState': import("../../index.js").OutputCollectionState
|
|
24
|
+
'*collectionErrors': ReturnType<import("../../index.js").OutputErrorCollection>[];
|
|
25
|
+
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
26
26
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
27
27
|
'*uploadTrigger': Set<string>;
|
|
28
28
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;;;;;;;;;+CAVnD,gBAE3C;mCAKM,gBAAU;6BAG+B,2BAA2B;;wCAMrE,wCACL;;;;;;MA2BI;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;;;;6BAlQa;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE;8BAPd,iCAAiC"}
|
|
@@ -44,6 +44,7 @@ export class ExternalSource extends UploaderBlock {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
this.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
47
|
+
this.modalManager.open(ActivityBlock.activities.UPLOAD_LIST);
|
|
47
48
|
},
|
|
48
49
|
onCancel: () => {
|
|
49
50
|
this.historyBack();
|
|
@@ -75,8 +76,8 @@ export class ExternalSource extends UploaderBlock {
|
|
|
75
76
|
let { externalSourceType } = /** @type {ActivityParams} */ (this.activityParams);
|
|
76
77
|
|
|
77
78
|
if (!externalSourceType) {
|
|
79
|
+
this.modalManager.close(this.$['*currentActivity']);
|
|
78
80
|
this.$['*currentActivity'] = null;
|
|
79
|
-
this.setOrAddState('*modalActive', false);
|
|
80
81
|
console.error(`Param "externalSourceType" is required for activity "${this.activityType}"`);
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
@@ -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,iBAAkB,GADN,YACO,UAejB;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"}
|
|
@@ -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"}
|