@uploadcare/file-uploader 1.3.0-alpha.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/abstract/ActivityBlock.d.ts +1 -1
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/ActivityBlock.js +0 -2
- package/abstract/Block.d.ts +11 -4
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +16 -26
- package/abstract/CTX.d.ts +7 -7
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +1 -1
- package/abstract/LocaleManager.d.ts +3 -3
- 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 +1 -1
- package/abstract/TypedCollection.d.ts.map +1 -1
- package/abstract/TypedCollection.js +4 -4
- package/abstract/TypedData.d.ts +2 -2
- package/abstract/TypedData.d.ts.map +1 -1
- package/abstract/TypedData.js +4 -4
- package/abstract/UploaderBlock.d.ts +5 -5
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +5 -5
- package/abstract/UploaderPublicApi.d.ts +21 -22
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +3 -3
- package/abstract/ValidationManager.d.ts +3 -3
- 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/defineComponents.js +0 -5
- package/abstract/l10nProcessor.d.ts.map +1 -1
- package/abstract/l10nProcessor.js +3 -3
- 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/abstract/uploadEntrySchema.js +1 -1
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.js +11 -12
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +11 -11
- package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.js +1 -2
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +2 -3
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +8 -4
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +2 -2
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorScroller.js +1 -2
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.js +2 -3
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.js +14 -15
- 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/css/common.css +2 -2
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +5 -5
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +1 -2
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +2 -3
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +2 -3
- package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts +15 -0
- package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/FocusVisible.js +33 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +10 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.js +256 -0
- 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/template.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/template.js +4 -5
- package/blocks/CloudImageEditor/src/types.d.ts +2 -2
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +3 -3
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +1 -2
- package/blocks/Config/Config.d.ts +11 -3
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/initialConfig.d.ts +1 -1
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Copyright/Copyright.d.ts.map +1 -1
- package/blocks/Copyright/Copyright.js +1 -2
- package/blocks/DropArea/DropArea.d.ts +2 -2
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/DropArea.js +5 -5
- 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 +5 -5
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +9 -9
- package/blocks/ExternalSource/buildStyles.js +2 -2
- package/blocks/ExternalSource/query-string.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.d.ts +3 -3
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +11 -12
- package/blocks/Icon/Icon.d.ts +1 -0
- package/blocks/Icon/Icon.d.ts.map +1 -1
- package/blocks/Icon/Icon.js +5 -3
- package/blocks/Img/ImgBase.js +9 -9
- package/blocks/Img/ImgConfig.d.ts +2 -2
- package/blocks/Img/ImgConfig.d.ts.map +1 -1
- package/blocks/Img/ImgConfig.js +3 -3
- package/blocks/Img/utils/parseObjectToString.js +1 -1
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +1 -2
- package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/blocks/ProgressBar/ProgressBar.js +1 -2
- package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +1 -1
- package/blocks/ProgressBarCommon/ProgressBarCommon.js +1 -2
- package/blocks/Range/Range.d.ts +16 -0
- package/blocks/Range/Range.d.ts.map +1 -0
- package/blocks/Range/Range.js +44 -0
- package/blocks/Range/range.css +65 -0
- package/blocks/Select/Select.d.ts.map +1 -1
- package/blocks/Select/Select.js +9 -14
- package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.js +3 -4
- package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +4 -4
- package/blocks/SourceList/SourceList.d.ts.map +1 -1
- package/blocks/SourceList/SourceList.js +4 -5
- package/blocks/StartFrom/StartFrom.d.ts.map +1 -1
- package/blocks/StartFrom/StartFrom.js +1 -2
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +19 -19
- 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/UploadList/UploadList.js +11 -10
- package/blocks/UrlSource/UrlSource.d.ts.map +1 -1
- package/blocks/UrlSource/UrlSource.js +6 -7
- package/blocks/themes/uc-basic/index.css +1 -0
- package/blocks/utils/debounce.d.ts +1 -3
- package/blocks/utils/debounce.d.ts.map +1 -1
- package/blocks/utils/throttle.d.ts +1 -3
- 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.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.ssr.d.ts +2 -116
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +79 -190
- package/package.json +8 -10
- 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/inline/FileUploaderInline.js +5 -5
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +1 -2
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +2 -2
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +3 -6
- package/types/jsx.d.ts +3 -9
- 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 +1 -3
- package/utils/mixinClass.d.ts.map +1 -1
- package/utils/prettyBytes.d.ts.map +1 -1
- package/utils/template-utils.d.ts.map +1 -1
- package/utils/toKebabCase.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 +6 -12
- package/utils/waitForAttribute.d.ts.map +1 -1
- package/utils/waitForAttribute.js +8 -38
- package/utils/waitForAttribute.test.js +47 -10
- 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 +3 -3
- package/abstract/bindCompatibilityFallbackProcessor.d.ts +0 -3
- package/abstract/bindCompatibilityFallbackProcessor.d.ts.map +0 -1
- package/abstract/bindCompatibilityFallbackProcessor.js +0 -16
- package/utils/withResolvers.d.ts +0 -7
- package/utils/withResolvers.d.ts.map +0 -1
- package/utils/withResolvers.js +0 -17
- package/utils/withResolvers.test.d.ts +0 -2
- package/utils/withResolvers.test.d.ts.map +0 -1
- package/utils/withResolvers.test.js +0 -27
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @param {import('../types').Transformations} transformations
|
|
3
3
|
* @returns {string}
|
|
4
4
|
*/
|
|
5
|
-
export function transformationsToOperations(transformations: import(
|
|
5
|
+
export function transformationsToOperations(transformations: import('../types').Transformations): string;
|
|
6
6
|
/**
|
|
7
7
|
* @param {string[]} operations
|
|
8
8
|
* @returns {import('../types.js').Transformations}
|
|
9
9
|
*/
|
|
10
|
-
export function operationsToTransformations(operations: string[]): import(
|
|
10
|
+
export function operationsToTransformations(operations: string[]): import('../types.js').Transformations;
|
|
11
11
|
/** @type {Record<keyof import('../types').Transformations, unknown>} */
|
|
12
|
-
export const OPERATIONS_DEFAULTS: Record<keyof import(
|
|
12
|
+
export const OPERATIONS_DEFAULTS: Record<keyof import('../types').Transformations, unknown>;
|
|
13
13
|
export const COMMON_OPERATIONS: string;
|
|
14
14
|
//# sourceMappingURL=transformationUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformationUtils.d.ts","sourceRoot":"","sources":["transformationUtils.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,6DAHW,OAAO,UAAU,EAAE,eAAe,GAChC,MAAM,CAalB;AAoDD;;;GAGG;AACH,wDAHW,MAAM,EAAE,GACN,OAAO,aAAa,EAAE,eAAe,CA2BjD;AAlKD,wEAAwE;AACxE,kCADW,
|
|
1
|
+
{"version":3,"file":"transformationUtils.d.ts","sourceRoot":"","sources":["transformationUtils.js"],"names":[],"mappings":"AAsEA;;;GAGG;AACH,6DAHW,OAAO,UAAU,EAAE,eAAe,GAChC,MAAM,CAalB;AAoDD;;;GAGG;AACH,wDAHW,MAAM,EAAE,GACN,OAAO,aAAa,EAAE,eAAe,CA2BjD;AAlKD,wEAAwE;AACxE,kCADW,OAAO,MAAM,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAejE;AAoEH,uCAAqF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @param {import('./CloudImageEditorBlock.js').CloudImageEditorBlock} fnCtx */
|
|
2
|
-
export function initState(fnCtx: import(
|
|
2
|
+
export function initState(fnCtx: import('./CloudImageEditorBlock.js').CloudImageEditorBlock): {
|
|
3
3
|
'*originalUrl': null;
|
|
4
4
|
'*faderEl': null;
|
|
5
5
|
'*cropperEl': null;
|
|
@@ -8,9 +8,9 @@ export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImage
|
|
|
8
8
|
'*networkProblems': boolean;
|
|
9
9
|
'*imageSize': null;
|
|
10
10
|
/** @type {import('./types.js').Transformations} */
|
|
11
|
-
'*editorTransformations': import(
|
|
11
|
+
'*editorTransformations': import('./types.js').Transformations;
|
|
12
12
|
/** @type {import('./types.js').CropPresetList} */
|
|
13
|
-
'*cropPresetList': import(
|
|
13
|
+
'*cropPresetList': import('./types.js').CropPresetList;
|
|
14
14
|
'*tabList': ("crop" | "tuning" | "filters")[];
|
|
15
15
|
'*tabId': "crop";
|
|
16
16
|
entry: null;
|
|
@@ -32,7 +32,7 @@ export function initState(fnCtx: import("./CloudImageEditorBlock.js").CloudImage
|
|
|
32
32
|
'presence.viewerToolbar': boolean;
|
|
33
33
|
'*on.retryNetwork': () => void;
|
|
34
34
|
/** @param {import('./types.js').Transformations} transformations */
|
|
35
|
-
'*on.apply': (transformations: import(
|
|
35
|
+
'*on.apply': (transformations: import('./types.js').Transformations) => void;
|
|
36
36
|
'*on.cancel': () => void;
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["template.js"],"names":[],"mappings":"AAGA,8BAgCE"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { html } from '@symbiotejs/symbiote';
|
|
2
1
|
import { TRANSPARENT_PIXEL_SRC } from '../../../utils/transparentPixelSrc.js';
|
|
3
2
|
import svgIconsSprite from './svg-sprite.js';
|
|
4
3
|
|
|
5
|
-
export const TEMPLATE =
|
|
4
|
+
export const TEMPLATE = /* HTML */ `
|
|
6
5
|
${svgIconsSprite}
|
|
7
6
|
<div class="uc-wrapper uc-wrapper_desktop">
|
|
8
|
-
<uc-presence-toggle class="uc-network_problems_splash"
|
|
7
|
+
<uc-presence-toggle class="uc-network_problems_splash" set="visible: presence.networkProblems;">
|
|
9
8
|
<div class="uc-network_problems_content">
|
|
10
9
|
<div class="uc-network_problems_icon">
|
|
11
10
|
<uc-icon name="sad"></uc-icon>
|
|
@@ -13,7 +12,7 @@ export const TEMPLATE = html`
|
|
|
13
12
|
<div class="uc-network_problems_text">Network error</div>
|
|
14
13
|
</div>
|
|
15
14
|
<div class="uc-network_problems_footer">
|
|
16
|
-
<uc-btn-ui theme="primary" text="Retry"
|
|
15
|
+
<uc-btn-ui theme="primary" text="Retry" set="onclick: *on.retryNetwork"></uc-btn-ui>
|
|
17
16
|
</div>
|
|
18
17
|
</uc-presence-toggle>
|
|
19
18
|
<div class="uc-viewport">
|
|
@@ -28,7 +27,7 @@ export const TEMPLATE = html`
|
|
|
28
27
|
<div class="uc-info_pan">{{msg}}</div>
|
|
29
28
|
</div>
|
|
30
29
|
<div class="uc-toolbar">
|
|
31
|
-
<uc-line-loader-ui
|
|
30
|
+
<uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>
|
|
32
31
|
<div class="uc-toolbar_content uc-toolbar_content__editor">
|
|
33
32
|
<uc-editor-toolbar></uc-editor-toolbar>
|
|
34
33
|
</div>
|
|
@@ -49,10 +49,10 @@ export type ChangeResult = {
|
|
|
49
49
|
transformations: Transformations;
|
|
50
50
|
};
|
|
51
51
|
export type CropAspectRatio = {
|
|
52
|
-
type:
|
|
52
|
+
type: 'aspect-ratio';
|
|
53
53
|
width: number;
|
|
54
54
|
height: number;
|
|
55
55
|
};
|
|
56
56
|
export type CropPresetList = CropAspectRatio[];
|
|
57
|
-
export type Direction =
|
|
57
|
+
export type Direction = '' | 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
58
58
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;gCAGa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;gCAGa,YAAY,YAAY,OAAO,CAAC,CAAC;;;;wBAMjC;IAAE,KAAK,SAAS;IAAC,MAAM,SAAQ;CAAE;;;;;;;8BAYjC;IACZ,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAU,CAAC,EAAE;QAAE,MAAM,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,IAAQ,CAAC,EAAE;QAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACnE;;iBAKU,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;;iBAKf,MAAM;qBACN,MAAM;YACN,MAAM;qBACN,eAAe;;8BAGf;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;6BAEvD,eAAe,EAAE;wBAEjB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI"}
|
|
@@ -6,8 +6,8 @@ export class CloudImageEditorActivity extends UploaderBlock {
|
|
|
6
6
|
'*uploadList': never[];
|
|
7
7
|
'*focusedEntry': null;
|
|
8
8
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
9
|
-
'*collectionErrors':
|
|
10
|
-
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
9
|
+
'*collectionErrors': any[];
|
|
10
|
+
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
11
11
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
12
12
|
'*uploadTrigger': Set<string>;
|
|
13
13
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -19,7 +19,7 @@ export class CloudImageEditorActivity extends UploaderBlock {
|
|
|
19
19
|
};
|
|
20
20
|
entry: import("../../abstract/TypedData.js").TypedData | undefined;
|
|
21
21
|
/** @param {CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>} e */
|
|
22
|
-
handleApply(e: CustomEvent<import(
|
|
22
|
+
handleApply(e: CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>): void;
|
|
23
23
|
handleCancel(): void;
|
|
24
24
|
mountEditor(): void;
|
|
25
25
|
_mounted: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAKA;IAEE,iCAAuD;IAKrD;;;;;;;;;;;;;;;;MAGC;IAeC,mEAAkB;IAsBtB,qFAAqF;IACrF,eADY,YAAY,OAAO,kCAAkC,EAAE,WAAW,CAAC,QAW9E;IAED,qBAEC;IAED,oBAqCC;IAJC,8BAAoB;IAEpB,eAAe;IACf,kBAAyB;IAG3B,sBAGC;CACF;8BA9G6B,iCAAiC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { DICT } from '@symbiotejs/symbiote';
|
|
3
2
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
4
3
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
5
4
|
import { CloudImageEditorBlock } from '../CloudImageEditor/index.js';
|
|
@@ -74,7 +73,7 @@ export class CloudImageEditorActivity extends UploaderBlock {
|
|
|
74
73
|
const cropPreset = this.cfg.cropPreset;
|
|
75
74
|
const tabs = this.cfg.cloudImageEditorTabs;
|
|
76
75
|
|
|
77
|
-
instance.setAttribute(
|
|
76
|
+
instance.setAttribute('ctx-name', this.ctxName);
|
|
78
77
|
instance.setAttribute('cdn-url', cdnUrl);
|
|
79
78
|
|
|
80
79
|
if (cropPreset) {
|
|
@@ -11,8 +11,16 @@
|
|
|
11
11
|
* 'collectionValidators',
|
|
12
12
|
* ]}
|
|
13
13
|
*/
|
|
14
|
-
export const complexConfigKeys: [
|
|
15
|
-
|
|
14
|
+
export const complexConfigKeys: [
|
|
15
|
+
'metadata',
|
|
16
|
+
'localeDefinitionOverride',
|
|
17
|
+
'secureUploadsSignatureResolver',
|
|
18
|
+
'secureDeliveryProxyUrlResolver',
|
|
19
|
+
'iconHrefResolver',
|
|
20
|
+
'fileValidators',
|
|
21
|
+
'collectionValidators'
|
|
22
|
+
];
|
|
23
|
+
export type Config = import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>;
|
|
16
24
|
/** @typedef {import('../../utils/mixinClass.js').MixinClass<typeof ConfigClass, import('../../types').ConfigType>} Config */
|
|
17
25
|
export const Config: Config;
|
|
18
26
|
declare class ConfigClass extends Block {
|
|
@@ -54,6 +62,6 @@ declare class ConfigClass extends Block {
|
|
|
54
62
|
}
|
|
55
63
|
import { Block } from '../../abstract/Block.js';
|
|
56
64
|
/** Mapping of attribute names to state */
|
|
57
|
-
declare const attrStateMapping: Record<
|
|
65
|
+
declare const attrStateMapping: Record<"multiple" | "pubkey" | "accept" | "store" | "debug" | "secure-expire" | "crop-preset" | "multiple-min" | "multiple-max" | "confirm-upload" | "img-only" | "external-sources-preferred-types" | "camera-mirror" | "camera-capture" | "source-list" | "max-local-file-size-bytes" | "thumb-size" | "show-empty-list" | "use-local-image-editor" | "use-cloud-image-editor" | "cloud-image-editor-tabs" | "remove-copyright" | "image-shrink" | "modal-scroll-lock" | "modal-backdrop-strokes" | "source-list-wrap" | "remote-tab-session-key" | "cdn-cname" | "base-url" | "social-base-url" | "secure-signature" | "secure-delivery-proxy" | "retry-throttled-request-max-times" | "multipart-min-file-size" | "multipart-chunk-size" | "max-concurrent-requests" | "multipart-max-concurrent-requests" | "multipart-max-attempts" | "check-for-url-duplicates" | "save-url-for-recurrent-uploads" | "group-output" | "user-agent-integration" | "locale-name" | "secure-uploads-expire-threshold" | "secureexpire" | "croppreset" | "multiplemin" | "multiplemax" | "confirmupload" | "imgonly" | "externalsourcespreferredtypes" | "cameramirror" | "cameracapture" | "sourcelist" | "maxlocalfilesizebytes" | "thumbsize" | "showemptylist" | "uselocalimageeditor" | "usecloudimageeditor" | "cloudimageeditortabs" | "removecopyright" | "imageshrink" | "modalscrolllock" | "modalbackdropstrokes" | "sourcelistwrap" | "remotetabsessionkey" | "cdncname" | "baseurl" | "socialbaseurl" | "securesignature" | "securedeliveryproxy" | "retrythrottledrequestmaxtimes" | "multipartminfilesize" | "multipartchunksize" | "maxconcurrentrequests" | "multipartmaxconcurrentrequests" | "multipartmaxattempts" | "checkforurlduplicates" | "saveurlforrecurrentuploads" | "groupoutput" | "useragentintegration" | "localename" | "secureuploadsexpirethreshold", string>;
|
|
58
66
|
export {};
|
|
59
67
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,gCAVU,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,gCAVU;IACT,UAAc;IACd,0BAA8B;IAC9B,gCAAoC;IACpC,gCAAoC;IACpC,kBAAsB;IACtB,gBAAoB;IACpB,sBAA0B;CACvB,CAUF;qBAiNY,OAAO,2BAA2B,EAAE,UAAU,CAAC,kBAAkB,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC;AAAlH,6HAA6H;AAG7H,4BAAmF;AAvLnF;IAkBE;;;;OAIG;IACH,+BAYC;IAED;;;;OAIG;IACH,2BAQC;IAED;;;;OAIG;IACH,kBAiBC;IAED;;;OAGG;IACH,kBAIC;IAED;;;;OAIG;IACH,wCAJW,MAAM,iBACN,OAAO,aACP,OAAO,QAoBjB;IA0CD;;;;OAIG;IACH,+BAJW,MAAM,uBAAuB,UAC7B,MAAM,UACN,MAAM,QAahB;CACF;sBArOqB,yBAAyB;AAoD/C,0CAA0C;AAC1C,qzDAGG"}
|
|
@@ -2,5 +2,5 @@ export const DEFAULT_CDN_CNAME: "https://ucarecdn.com";
|
|
|
2
2
|
export const DEFAULT_BASE_URL: "https://upload.uploadcare.com";
|
|
3
3
|
export const DEFAULT_SOCIAL_BASE_URL: "https://social.uploadcare.com";
|
|
4
4
|
/** @type {import('../../types/exported').ConfigType} */
|
|
5
|
-
export const initialConfig: import(
|
|
5
|
+
export const initialConfig: import('../../types/exported').ConfigType;
|
|
6
6
|
//# sourceMappingURL=initialConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeConfigValue.d.ts","sourceRoot":"","sources":["normalizeConfigValue.js"],"names":[],"mappings":"AAeO,iCADK,OAAO,WAWlB;AA4IM,
|
|
1
|
+
{"version":3,"file":"normalizeConfigValue.d.ts","sourceRoot":"","sources":["normalizeConfigValue.js"],"names":[],"mappings":"AAeO,iCADK,OAAO,WAWlB;AA4IM,sGAHI,OAAO,mDAcjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Copyright.d.ts","sourceRoot":"","sources":["Copyright.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Copyright.d.ts","sourceRoot":"","sources":["Copyright.js"],"names":[],"mappings":"AAEA;CAqBC;sBAvBqB,yBAAyB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { html } from '@symbiotejs/symbiote';
|
|
2
1
|
import { Block } from '../../abstract/Block.js';
|
|
3
2
|
|
|
4
3
|
export class Copyright extends Block {
|
|
@@ -14,7 +13,7 @@ export class Copyright extends Block {
|
|
|
14
13
|
);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
static template =
|
|
16
|
+
static template = /* HTML */ `
|
|
18
17
|
<a
|
|
19
18
|
href="https://uploadcare.com/?utm_source=copyright&utm_medium=referral&utm_campaign=v4"
|
|
20
19
|
target="_blank noopener"
|
|
@@ -12,8 +12,8 @@ export class DropArea extends UploaderBlock {
|
|
|
12
12
|
'*uploadList': never[];
|
|
13
13
|
'*focusedEntry': null;
|
|
14
14
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
15
|
-
'*collectionErrors':
|
|
16
|
-
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
15
|
+
'*collectionErrors': any[];
|
|
16
|
+
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
17
17
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
18
18
|
'*uploadTrigger': Set<string>;
|
|
19
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;;;;;;;;;;;;;;;;;;;;;;;MAUC;IAGH,oBAgBC;IAgDC,eAAe;IACf,yBA2BE;IAIA,yDAWE;IA6BF;;;OAGG;IACH,uBASC;IAOL;;;;;OAKG;IACH,sBAeC;IAED,eAAe;IACf,0BAcC;CAqBF;;;;8BAlP6B,iCAAiC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
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';
|
|
@@ -233,7 +233,7 @@ export class DropArea extends UploaderBlock {
|
|
|
233
233
|
if (registry) {
|
|
234
234
|
registry.delete(this);
|
|
235
235
|
if (registry.size === 0) {
|
|
236
|
-
|
|
236
|
+
Data.deleteCtx(GLOBAL_CTX_NAME);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -246,11 +246,11 @@ export class DropArea extends UploaderBlock {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
DropArea.template =
|
|
249
|
+
DropArea.template = /* HTML */ `
|
|
250
250
|
<slot>
|
|
251
251
|
<div data-default-slot hidden></div>
|
|
252
|
-
<div ref="content-wrapper" class="uc-content-wrapper"
|
|
253
|
-
<div class="uc-icon-container"
|
|
252
|
+
<div ref="content-wrapper" class="uc-content-wrapper" set="@hidden: !isVisible">
|
|
253
|
+
<div class="uc-icon-container" set="@hidden: !withIcon">
|
|
254
254
|
<uc-icon name="default"></uc-icon>
|
|
255
255
|
<uc-icon name="arrow-down"></uc-icon>
|
|
256
256
|
</div>
|
|
@@ -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;IAL6B,OAAO,EAAzB,WAAW;IACI,QAAQ;IACR,OAAO;IACF,YAAY,EAAhC,aAAa;eAyGvB"}
|
|
@@ -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,QAAQ,QAAQ,EAAE,CAAC,CA0D/B;uBAnKY;IACZ,IAAY,EAAE,MAAM,CAAC;IACrB,IAAY,EAAE,IAAI,CAAC;IACnB,QAAgB,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACN,IAAY,EAAE,KAAK,CAAC;IACpB,GAAW,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -29,8 +29,8 @@ export class ExternalSource extends UploaderBlock {
|
|
|
29
29
|
'*uploadList': never[];
|
|
30
30
|
'*focusedEntry': null;
|
|
31
31
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
32
|
-
'*collectionErrors':
|
|
33
|
-
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
32
|
+
'*collectionErrors': any[];
|
|
33
|
+
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
34
34
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
35
35
|
'*uploadTrigger': Set<string>;
|
|
36
36
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -83,14 +83,14 @@ export type ActivityParams = {
|
|
|
83
83
|
externalSourceType: string;
|
|
84
84
|
};
|
|
85
85
|
export type SelectedFileMessage = {
|
|
86
|
-
type:
|
|
87
|
-
obj_type:
|
|
86
|
+
type: 'file-selected';
|
|
87
|
+
obj_type: 'selected_file';
|
|
88
88
|
filename: string;
|
|
89
89
|
url: string;
|
|
90
90
|
alternatives?: Record<string, string>;
|
|
91
91
|
};
|
|
92
92
|
export type EmbedCssMessage = {
|
|
93
|
-
type:
|
|
93
|
+
type: 'embed-css';
|
|
94
94
|
style: string;
|
|
95
95
|
};
|
|
96
96
|
export type Message = SelectedFileMessage | EmbedCssMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"AAWA,+DAA+D;AAE/D;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH,+DAA+D;AAE/D;IAEE,yBAAiD;IAK/C
|
|
1
|
+
{"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"AAWA,+DAA+D;AAE/D;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH,+DAA+D;AAE/D;IAEE,yBAAiD;IAK/C;;;;;;;;;;;;;;;;;;;;;;MAoBC;IAGH;;;OAGG;IACH,gBAAe;IA2Cf;;;OAGG;IACH,8BAcC;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,2BAUC;IAED,eAAe;IACf,yBAEC;IAED;;;OAGG;IACH,oBAGC;IAED,eAAe;IACf,oBAkBC;IAED,eAAe;IACf,kBAcC;IAED,eAAe;IACf,oBAsBC;IAED,eAAe;IACf,sBAMC;CACF;;;;6BAnOa;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE;kCAG/B;IACZ,IAAQ,EAAE,eAAe,CAAC;IAC1B,QAAY,EAAE,eAAe,CAAC;IAC9B,QAAY,EAAE,MAAM,CAAC;IACrB,GAAO,EAAE,MAAM,CAAC;IAChB,YAAgB,CAAC,EAAE,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;8BAIS;IACZ,IAAQ,EAAE,WAAW,CAAC;IACtB,KAAS,EAAE,MAAM,CAAC;CACf;sBAGU,mBAAmB,GAAG,eAAe;8BA1BrB,iCAAiC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
import { create
|
|
3
|
+
import { create } 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';
|
|
@@ -87,7 +87,7 @@ export class ExternalSource extends UploaderBlock {
|
|
|
87
87
|
this.mountIframe();
|
|
88
88
|
},
|
|
89
89
|
});
|
|
90
|
-
this.sub('*currentActivityParams', () => {
|
|
90
|
+
this.sub('*currentActivityParams', (val) => {
|
|
91
91
|
if (!this.isActivityActive) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
@@ -238,29 +238,29 @@ export class ExternalSource extends UploaderBlock {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
ExternalSource.template =
|
|
241
|
+
ExternalSource.template = /* HTML */ `
|
|
242
242
|
<uc-activity-header>
|
|
243
|
-
<button type="button" class="uc-mini-btn"
|
|
243
|
+
<button type="button" class="uc-mini-btn" set="onclick: *historyBack">
|
|
244
244
|
<uc-icon name="back"></uc-icon>
|
|
245
245
|
</button>
|
|
246
246
|
<div>
|
|
247
|
-
<uc-icon
|
|
247
|
+
<uc-icon set="@name: activityIcon"></uc-icon>
|
|
248
248
|
<span>{{activityCaption}}</span>
|
|
249
249
|
</div>
|
|
250
|
-
<button type="button" class="uc-mini-btn uc-close-btn"
|
|
250
|
+
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *historyBack">
|
|
251
251
|
<uc-icon name="close"></uc-icon>
|
|
252
252
|
</button>
|
|
253
253
|
</uc-activity-header>
|
|
254
254
|
<div class="uc-content">
|
|
255
255
|
<div ref="iframeWrapper" class="uc-iframe-wrapper"></div>
|
|
256
256
|
<div class="uc-toolbar">
|
|
257
|
-
<button type="button" class="uc-cancel-btn uc-secondary-btn"
|
|
257
|
+
<button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel" l10n="cancel"></button>
|
|
258
258
|
<div></div>
|
|
259
|
-
<div
|
|
259
|
+
<div set="@hidden: !multiple" class="uc-selected-counter"><span l10n="selected-count"></span>{{counter}}</div>
|
|
260
260
|
<button
|
|
261
261
|
type="button"
|
|
262
262
|
class="uc-done-btn uc-primary-btn"
|
|
263
|
-
|
|
263
|
+
set="onclick: onDone; @disabled: !counter"
|
|
264
264
|
l10n="done"
|
|
265
265
|
></button>
|
|
266
266
|
</div>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
const styleToCss = (style) => {
|
|
8
8
|
const css = Object.keys(style).reduce((acc, selector) => {
|
|
9
9
|
const propertiesObj = style[selector];
|
|
10
|
-
const propertiesStr = Object.keys(propertiesObj).reduce((
|
|
10
|
+
const propertiesStr = Object.keys(propertiesObj).reduce((acc, prop) => {
|
|
11
11
|
const value = propertiesObj[prop];
|
|
12
|
-
return
|
|
12
|
+
return acc + `${prop}: ${value};`;
|
|
13
13
|
}, '');
|
|
14
14
|
return acc + `${selector}{${propertiesStr}}`;
|
|
15
15
|
}, '');
|
|
@@ -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;;IAFa,MAAM,CAWlB"}
|
|
@@ -35,10 +35,10 @@ export class FileItem extends UploaderBlock {
|
|
|
35
35
|
'*uploadList': never[];
|
|
36
36
|
'*focusedEntry': null;
|
|
37
37
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
38
|
-
'*collectionErrors':
|
|
39
|
-
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
38
|
+
'*collectionErrors': any[];
|
|
39
|
+
'*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
40
40
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
41
|
-
'*uploadTrigger': Set<string>;
|
|
41
|
+
'*uploadTrigger': Set<string>; /** @private */
|
|
42
42
|
'*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
43
43
|
'*currentActivity': null;
|
|
44
44
|
'*currentActivityParams': {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;uCAXF,eAAe;;;;;;;MA0CZ;IAGH,eASC;IAED;;;OAGG;IACH,0BAaC;IAED,eAAe;IACf,wBAgBC;IAED,eAAe;IACf,2BAsCC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;OAGG;IACH,uBAkDC;IAsCD,wEAAwE;IACxE,oBADY,CAAC,oBAAoB,CAAC,CAAC,MAAM,oBAAoB,CAAC,QAsB7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAqFC;CACF;;;;;8BAla6B,iCAAiC;AAO/D;;;;;GAKG"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { html } from '@symbiotejs/symbiote';
|
|
3
2
|
import { CancelError, uploadFile } from '@uploadcare/upload-client';
|
|
4
3
|
import { shrinkFile } from '@uploadcare/image-shrink';
|
|
5
4
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
@@ -294,7 +293,7 @@ export class FileItem extends UploaderBlock {
|
|
|
294
293
|
isFinished: state === FileItemState.FINISHED,
|
|
295
294
|
progressVisible: state === FileItemState.UPLOADING,
|
|
296
295
|
isEditable: this.cfg.useCloudImageEditor && this._entry?.getValue('isImage') && this._entry?.getValue('cdnUrl'),
|
|
297
|
-
errorText: this._entry.getValue('errors')?.[0]?.message
|
|
296
|
+
errorText: this._entry.getValue('errors')?.[0]?.message,
|
|
298
297
|
});
|
|
299
298
|
}
|
|
300
299
|
|
|
@@ -423,23 +422,23 @@ export class FileItem extends UploaderBlock {
|
|
|
423
422
|
}
|
|
424
423
|
}
|
|
425
424
|
|
|
426
|
-
FileItem.template =
|
|
427
|
-
<div class="uc-inner"
|
|
428
|
-
<div class="uc-thumb"
|
|
425
|
+
FileItem.template = /* HTML */ `
|
|
426
|
+
<div class="uc-inner" set="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">
|
|
427
|
+
<div class="uc-thumb" set="style.backgroundImage: thumbUrl">
|
|
429
428
|
<div class="uc-badge">
|
|
430
|
-
<uc-icon
|
|
429
|
+
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
431
430
|
</div>
|
|
432
431
|
</div>
|
|
433
432
|
<div class="uc-file-name-wrapper">
|
|
434
|
-
<span class="uc-file-name"
|
|
435
|
-
<span class="uc-file-error"
|
|
433
|
+
<span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
|
|
434
|
+
<span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
|
|
436
435
|
</div>
|
|
437
436
|
<div class="uc-file-actions">
|
|
438
437
|
<button
|
|
439
438
|
type="button"
|
|
440
439
|
l10n="@title:file-item-edit-button"
|
|
441
440
|
class="uc-edit-btn uc-mini-btn"
|
|
442
|
-
|
|
441
|
+
set="onclick: onEdit; @hidden: !isEditable"
|
|
443
442
|
>
|
|
444
443
|
<uc-icon name="edit-file"></uc-icon>
|
|
445
444
|
</button>
|
|
@@ -447,15 +446,15 @@ FileItem.template = html`
|
|
|
447
446
|
type="button"
|
|
448
447
|
l10n="@title:file-item-remove-button"
|
|
449
448
|
class="uc-remove-btn uc-mini-btn"
|
|
450
|
-
|
|
449
|
+
set="onclick: onRemove;"
|
|
451
450
|
>
|
|
452
451
|
<uc-icon name="remove-file"></uc-icon>
|
|
453
452
|
</button>
|
|
454
|
-
<button type="button" class="uc-upload-btn uc-mini-btn"
|
|
453
|
+
<button type="button" class="uc-upload-btn uc-mini-btn" set="onclick: onUpload;">
|
|
455
454
|
<uc-icon name="upload"></uc-icon>
|
|
456
455
|
</button>
|
|
457
456
|
</div>
|
|
458
|
-
<uc-progress-bar class="uc-progress-bar"
|
|
457
|
+
<uc-progress-bar class="uc-progress-bar" set="value: progressValue; visible: progressVisible;"> </uc-progress-bar>
|
|
459
458
|
</div>
|
|
460
459
|
`;
|
|
461
460
|
FileItem.activeInstances = new Set();
|
package/blocks/Icon/Icon.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":"AAGA;IAII;;;;MAKC;CAmBJ;;;;sBA9BqB,yBAAyB"}
|
package/blocks/Icon/Icon.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { html } from '@symbiotejs/symbiote';
|
|
3
2
|
import { Block } from '../../abstract/Block.js';
|
|
4
3
|
|
|
5
4
|
export class Icon extends Block {
|
|
@@ -10,6 +9,7 @@ export class Icon extends Block {
|
|
|
10
9
|
...this.init$,
|
|
11
10
|
name: '',
|
|
12
11
|
href: '',
|
|
12
|
+
title: '',
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -31,12 +31,14 @@ export class Icon extends Block {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
Icon.template =
|
|
34
|
+
Icon.template = /* HTML */ `
|
|
35
35
|
<svg ref="svg" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
-
<
|
|
36
|
+
<title>{{title}}</title>
|
|
37
|
+
<use set="@href: href;"></use>
|
|
37
38
|
</svg>
|
|
38
39
|
`;
|
|
39
40
|
|
|
40
41
|
Icon.bindAttributes({
|
|
41
42
|
name: 'name',
|
|
43
|
+
title: 'title',
|
|
42
44
|
});
|
package/blocks/Img/ImgBase.js
CHANGED
|
@@ -103,8 +103,8 @@ export class ImgBase extends ImgConfig {
|
|
|
103
103
|
createCdnUrl(
|
|
104
104
|
//
|
|
105
105
|
createOriginalUrl(this.$$('cdn-cname'), this.$$('uuid')),
|
|
106
|
-
cdnModifiers
|
|
107
|
-
)
|
|
106
|
+
cdnModifiers
|
|
107
|
+
)
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -114,8 +114,8 @@ export class ImgBase extends ImgConfig {
|
|
|
114
114
|
createCdnUrl(
|
|
115
115
|
//
|
|
116
116
|
createOriginalUrl(this.$$('cdn-cname'), this.$$('uuid')),
|
|
117
|
-
cdnModifiers
|
|
118
|
-
)
|
|
117
|
+
cdnModifiers
|
|
118
|
+
)
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -126,8 +126,8 @@ export class ImgBase extends ImgConfig {
|
|
|
126
126
|
//
|
|
127
127
|
this.$$('proxy-cname'),
|
|
128
128
|
cdnModifiers,
|
|
129
|
-
this._fmtAbs(this.$$('src'))
|
|
130
|
-
)
|
|
129
|
+
this._fmtAbs(this.$$('src'))
|
|
130
|
+
)
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -138,8 +138,8 @@ export class ImgBase extends ImgConfig {
|
|
|
138
138
|
//
|
|
139
139
|
`https://${this.$$('pubkey')}.ucr.io/`,
|
|
140
140
|
cdnModifiers,
|
|
141
|
-
this._fmtAbs(this.$$('src'))
|
|
142
|
-
)
|
|
141
|
+
this._fmtAbs(this.$$('src'))
|
|
142
|
+
)
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -157,7 +157,7 @@ export class ImgBase extends ImgConfig {
|
|
|
157
157
|
return applyTemplateData(
|
|
158
158
|
this.$$('secure-delivery-proxy'),
|
|
159
159
|
{ previewUrl: url },
|
|
160
|
-
{ transform: (value) => window.encodeURIComponent(value) }
|
|
160
|
+
{ transform: (value) => window.encodeURIComponent(value) }
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
163
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class ImgConfig extends
|
|
1
|
+
export class ImgConfig extends BaseComponent<any> {
|
|
2
2
|
static get observedAttributes(): string[];
|
|
3
3
|
constructor();
|
|
4
4
|
cssInit$: any;
|
|
@@ -27,5 +27,5 @@ export class ImgConfig extends Symbiote<any> {
|
|
|
27
27
|
private _observed;
|
|
28
28
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
29
29
|
}
|
|
30
|
-
import {
|
|
30
|
+
import { BaseComponent } from '@symbiotejs/symbiote';
|
|
31
31
|
//# sourceMappingURL=ImgConfig.d.ts.map
|
|
@@ -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;IAlDgD,cACjD;IAlCA,cAAqB;IAErB;;;OAGG;IACH,iBAFa,GAAG,CAIf;IAED,qDAAqD;IACrD,wBAIC;IAED;;;OAGG;IACH,+BAFiB,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"}
|