@uploadcare/file-uploader 1.4.1-alpha.2 → 1.5.1
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 +14 -3
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/ActivityBlock.js +19 -6
- package/abstract/Block.d.ts +3 -3
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +2 -0
- package/abstract/CTX.d.ts +0 -1
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +0 -1
- package/abstract/SolutionBlock.d.ts +0 -1
- package/abstract/SolutionBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.d.ts +0 -1
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +3 -1
- package/abstract/UploaderPublicApi.d.ts +11 -3
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +27 -31
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +2 -1
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +6 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +7 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.js +5 -0
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +5 -0
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.js +11 -5
- package/blocks/CloudImageEditor/src/css/common.css +11 -0
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +1 -0
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +6 -1
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +1 -0
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +16 -21
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +34 -25
- package/blocks/Config/Config.d.ts +1 -1
- package/blocks/DropArea/DropArea.d.ts +0 -1
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +2 -1
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +9 -0
- package/blocks/FileItem/FileItem.d.ts +2 -3
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +4 -8
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +2 -0
- package/blocks/SimpleBtn/SimpleBtn.d.ts +0 -1
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +0 -1
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +1 -1
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +2 -2
- package/blocks/UploadList/UploadList.d.ts +0 -1
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.js +6 -1
- package/blocks/themes/uc-basic/index.css +3 -0
- package/blocks/themes/uc-basic/post-reset.css +3 -0
- package/env.d.ts +1 -1
- package/env.js +1 -1
- package/index.ssr.d.ts +1 -17
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +19 -29
- package/locales/file-uploader/ar.d.ts +9 -0
- package/locales/file-uploader/ar.js +11 -2
- package/locales/file-uploader/az.d.ts +9 -0
- package/locales/file-uploader/az.js +11 -2
- package/locales/file-uploader/ca.d.ts +9 -0
- package/locales/file-uploader/ca.js +11 -2
- package/locales/file-uploader/cs.d.ts +9 -0
- package/locales/file-uploader/cs.js +11 -2
- package/locales/file-uploader/da.d.ts +9 -0
- package/locales/file-uploader/da.js +11 -2
- package/locales/file-uploader/de.d.ts +9 -0
- package/locales/file-uploader/de.js +11 -2
- package/locales/file-uploader/el.d.ts +9 -0
- package/locales/file-uploader/el.js +11 -2
- package/locales/file-uploader/en.d.ts +9 -0
- package/locales/file-uploader/en.js +11 -2
- package/locales/file-uploader/es.d.ts +9 -0
- package/locales/file-uploader/es.js +11 -2
- package/locales/file-uploader/et.d.ts +9 -0
- package/locales/file-uploader/et.js +11 -2
- package/locales/file-uploader/fr.d.ts +9 -0
- package/locales/file-uploader/fr.js +11 -2
- package/locales/file-uploader/he.d.ts +9 -0
- package/locales/file-uploader/he.js +11 -2
- package/locales/file-uploader/hy.d.ts +9 -0
- package/locales/file-uploader/hy.js +11 -2
- package/locales/file-uploader/is.d.ts +9 -0
- package/locales/file-uploader/is.js +11 -2
- package/locales/file-uploader/it.d.ts +9 -0
- package/locales/file-uploader/it.js +11 -2
- package/locales/file-uploader/ja.d.ts +9 -0
- package/locales/file-uploader/ja.js +11 -2
- package/locales/file-uploader/ka.d.ts +9 -0
- package/locales/file-uploader/ka.js +11 -2
- package/locales/file-uploader/kk.d.ts +9 -0
- package/locales/file-uploader/kk.js +11 -2
- package/locales/file-uploader/ko.d.ts +9 -0
- package/locales/file-uploader/ko.js +11 -2
- package/locales/file-uploader/lv.d.ts +9 -0
- package/locales/file-uploader/lv.js +11 -2
- package/locales/file-uploader/nb.d.ts +9 -0
- package/locales/file-uploader/nb.js +11 -2
- package/locales/file-uploader/nl.d.ts +9 -0
- package/locales/file-uploader/nl.js +11 -2
- package/locales/file-uploader/pl.d.ts +9 -0
- package/locales/file-uploader/pl.js +11 -2
- package/locales/file-uploader/pt.d.ts +9 -0
- package/locales/file-uploader/pt.js +11 -2
- package/locales/file-uploader/ro.d.ts +9 -0
- package/locales/file-uploader/ro.js +11 -2
- package/locales/file-uploader/ru.d.ts +9 -0
- package/locales/file-uploader/ru.js +11 -2
- package/locales/file-uploader/sk.d.ts +9 -0
- package/locales/file-uploader/sk.js +11 -2
- package/locales/file-uploader/sr.d.ts +9 -0
- package/locales/file-uploader/sr.js +11 -2
- package/locales/file-uploader/sv.d.ts +9 -0
- package/locales/file-uploader/sv.js +11 -2
- package/locales/file-uploader/tr.d.ts +9 -0
- package/locales/file-uploader/tr.js +11 -2
- package/locales/file-uploader/uk.d.ts +9 -0
- package/locales/file-uploader/uk.js +11 -2
- package/locales/file-uploader/vi.d.ts +9 -0
- package/locales/file-uploader/vi.js +11 -2
- package/locales/file-uploader/zh-TW.d.ts +9 -0
- package/locales/file-uploader/zh-TW.js +11 -2
- package/locales/file-uploader/zh.d.ts +9 -0
- package/locales/file-uploader/zh.js +11 -2
- package/package.json +1 -1
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +0 -1
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +1 -2
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +1 -1
- 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 +3 -3
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.js +1 -1
- 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 +1 -1
- package/web/uc-img.min.js +1 -1
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {{
|
|
3
|
+
* 'cloud-image-edit': import('../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js').ActivityParams;
|
|
4
|
+
* external: import('../blocks/ExternalSource/ExternalSource.js').ActivityParams;
|
|
5
|
+
* }} ActivityParamsMap
|
|
6
|
+
*/
|
|
1
7
|
export class ActivityBlock extends Block {
|
|
2
8
|
/**
|
|
3
9
|
* @private
|
|
@@ -43,7 +49,8 @@ export class ActivityBlock extends Block {
|
|
|
43
49
|
} | undefined): void;
|
|
44
50
|
unregisterActivity(): void;
|
|
45
51
|
get activityKey(): string;
|
|
46
|
-
|
|
52
|
+
/** @type {ActivityParamsMap[keyof ActivityParamsMap]} */
|
|
53
|
+
get activityParams(): import("../blocks/ExternalSource/ExternalSource.js").ActivityParams | import("../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js").ActivityParams;
|
|
47
54
|
/** @type {String} */
|
|
48
55
|
get initActivity(): string;
|
|
49
56
|
/** @type {String} */
|
|
@@ -60,9 +67,13 @@ export namespace ActivityBlock {
|
|
|
60
67
|
URL: "url";
|
|
61
68
|
CLOUD_IMG_EDIT: "cloud-image-edit";
|
|
62
69
|
EXTERNAL: "external";
|
|
63
|
-
DETAILS: "details";
|
|
64
70
|
}>;
|
|
65
71
|
}
|
|
66
|
-
export type
|
|
72
|
+
export type ActivityParamsMap = {
|
|
73
|
+
'cloud-image-edit': import('../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js').ActivityParams;
|
|
74
|
+
external: import('../blocks/ExternalSource/ExternalSource.js').ActivityParams;
|
|
75
|
+
};
|
|
76
|
+
export type RegisteredActivityType = (typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']];
|
|
77
|
+
export type ActivityType = RegisteredActivityType | (string & {}) | null;
|
|
67
78
|
import { Block } from './Block.js';
|
|
68
79
|
//# sourceMappingURL=ActivityBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityBlock.d.ts","sourceRoot":"","sources":["ActivityBlock.js"],"names":[],"mappings":"AASA;
|
|
1
|
+
{"version":3,"file":"ActivityBlock.d.ts","sourceRoot":"","sources":["ActivityBlock.js"],"names":[],"mappings":"AASA;;;;;GAKG;AAEH;IA4FE;;;;;;OAMG;IACH,kCAAsC;IAlGtC,iBAAiB;IACjB,kCAAuB;IAEvB;;;;;;MAA+B;IAE/B;;MAAqE;IAErE,eAAe;IACf,oBAKC;IAED,eAAe;IACf,kBAaC;IA2CD,eAAe;IACf,sBAWC;IAED,eAAe;IACf,8BAEC;IAWD,4CAEC;IAED,iCAEC;IAED;;;;;;;OAOG;IACH;4BAHiB,IAAI;8BACJ,IAAI;yBAQpB;IAED,2BAKC;IAoBD,0BAEC;IAED,yDAAyD;IACzD,oLAEC;IAED,qBAAqB;IACrB,2BAEC;IAED,qBAAqB;IACrB,2BAEC;IAED,oBAoBC;IAlLC,8CAAyB;CAmL5B;;;;;;;;;;;;gCApMY;IACZ,kBAAsB,EAAE,OAAO,gEAAgE,EAAE,cAAc,CAAC;IAChH,UAAc,OAAO,4CAA4C,EAAE,cAAc,CAAC;CAC/E;qCA6MU,CAAC,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC;2BAChF,sBAAsB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,IAAI;sBAxNrC,YAAY"}
|
|
@@ -7,6 +7,13 @@ import { activityBlockCtx } from './CTX.js';
|
|
|
7
7
|
const ACTIVE_ATTR = 'active';
|
|
8
8
|
const ACTIVE_PROP = '___ACTIVITY_IS_ACTIVE___';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {{
|
|
12
|
+
* 'cloud-image-edit': import('../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js').ActivityParams;
|
|
13
|
+
* external: import('../blocks/ExternalSource/ExternalSource.js').ActivityParams;
|
|
14
|
+
* }} ActivityParamsMap
|
|
15
|
+
*/
|
|
16
|
+
|
|
10
17
|
export class ActivityBlock extends Block {
|
|
11
18
|
/** @protected */
|
|
12
19
|
historyTracked = false;
|
|
@@ -54,10 +61,15 @@ export class ActivityBlock extends Block {
|
|
|
54
61
|
this.setAttribute('activity', this.activityType);
|
|
55
62
|
}
|
|
56
63
|
this.sub('*currentActivity', (/** @type {String} */ val) => {
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
this.
|
|
64
|
+
try {
|
|
65
|
+
if (this.activityType !== val && this[ACTIVE_PROP]) {
|
|
66
|
+
this._deactivate();
|
|
67
|
+
} else if (this.activityType === val && !this[ACTIVE_PROP]) {
|
|
68
|
+
this._activate();
|
|
69
|
+
}
|
|
70
|
+
} catch (err) {
|
|
71
|
+
console.error(`Error in activity "${this.activityType}". `, err);
|
|
72
|
+
this.$['*currentActivity'] = this.$['*history'][this.$['*history'].length - 1] ?? null;
|
|
61
73
|
}
|
|
62
74
|
|
|
63
75
|
if (!val) {
|
|
@@ -156,6 +168,7 @@ export class ActivityBlock extends Block {
|
|
|
156
168
|
return this.ctxName + this.activityType;
|
|
157
169
|
}
|
|
158
170
|
|
|
171
|
+
/** @type {ActivityParamsMap[keyof ActivityParamsMap]} */
|
|
159
172
|
get activityParams() {
|
|
160
173
|
return this.$['*currentActivityParams'];
|
|
161
174
|
}
|
|
@@ -201,7 +214,7 @@ ActivityBlock.activities = Object.freeze({
|
|
|
201
214
|
URL: 'url',
|
|
202
215
|
CLOUD_IMG_EDIT: 'cloud-image-edit',
|
|
203
216
|
EXTERNAL: 'external',
|
|
204
|
-
DETAILS: 'details',
|
|
205
217
|
});
|
|
206
218
|
|
|
207
|
-
/** @typedef {(typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']]
|
|
219
|
+
/** @typedef {(typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']]} RegisteredActivityType */
|
|
220
|
+
/** @typedef {RegisteredActivityType | (string & {}) | null} ActivityType */
|
package/abstract/Block.d.ts
CHANGED
|
@@ -41,11 +41,11 @@ export class Block extends BaseComponent<any> {
|
|
|
41
41
|
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[1]} [payload]
|
|
42
42
|
* @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[2]} [options]
|
|
43
43
|
*/
|
|
44
|
-
emit(type: [type: "
|
|
44
|
+
emit(type: [type: "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "change" | "group-created", payload?: unknown, ({
|
|
45
45
|
debounce?: number | boolean | undefined;
|
|
46
|
-
} | undefined)?][0], payload?: [type: "
|
|
46
|
+
} | undefined)?][0], payload?: [type: "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "change" | "group-created", payload?: unknown, ({
|
|
47
47
|
debounce?: number | boolean | undefined;
|
|
48
|
-
} | undefined)?][1], options?: [type: "
|
|
48
|
+
} | undefined)?][1], options?: [type: "file-added" | "file-removed" | "file-upload-start" | "file-upload-progress" | "file-upload-success" | "file-upload-failed" | "file-url-changed" | "modal-open" | "modal-close" | "done-click" | "upload-click" | "activity-change" | "common-upload-start" | "common-upload-progress" | "common-upload-success" | "common-upload-failed" | "change" | "group-created", payload?: unknown, ({
|
|
49
49
|
debounce?: number | boolean | undefined;
|
|
50
50
|
} | undefined)?][2]): void;
|
|
51
51
|
/**
|
package/abstract/Block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAmBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAmBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;IAsTvB,6BAA6B;IAC7B,4CAQC;IA3QD,cAMC;IAxDD,iBAAiB;IACjB,kCAAuB;IAEvB,wDAAwD;IACxD,cADW,OAAO,oBAAoB,EAAE,YAAY,CAChC;IAEpB,UAAmB;IAEnB;;;;OAIG;IACH;;eAcC;IAED;;;;;OAKG;IACH,kBAIC;IAED;;;;OAIG;IACH,wBAJW,MAAM,YACN,MAAM,IAAI,QAKpB;IAIC,uDAAuD;IACvD,mBADW,IAAI,MAAM,EAAE,IAAI;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC,CACjB;IAKpC;;;;OAIG;IACH,WAJW;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,QASnG;IAED;;;OAGG;IACH,gCAHmB,KAAK,KAAK,OAAO,WAUnC;IAED;;;OAGG;IACH,oCAFW,GAAG,QASb;IAkED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,yBAAyB;IACzB,iCAEC;IAwBD;;;;OAIG;IACH,qCAIC;IAED;;;;OAIG;IACH,iCAHa,eAAe,CA6B3B;IAED,iDAAiD;IACjD,yCA8BC;IA3BG,eAAe;IACf,mBAuBE;IAKN;;;;OAIG;IACH,6HAFwD,IAAI,QAQ3D;IAED,8BAA8B;IAC9B,oBADY,OAAO,EAAE,QAWpB;CAYF;;8BAvVmC,sBAAsB;qBAarC,WAAW"}
|
package/abstract/Block.js
CHANGED
package/abstract/CTX.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export function activityBlockCtx(fnCtx: import('./Block').Block): {
|
|
|
9
9
|
export function uploaderBlockCtx(fnCtx: import('./Block').Block): {
|
|
10
10
|
'*commonProgress': number;
|
|
11
11
|
'*uploadList': never[];
|
|
12
|
-
'*focusedEntry': null;
|
|
13
12
|
'*uploadQueue': Queue;
|
|
14
13
|
/** @type {ReturnType<import('../types').OutputErrorCollection>[]} */
|
|
15
14
|
'*collectionErrors': ReturnType<import('../types').OutputErrorCollection>[];
|
package/abstract/CTX.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CTX.d.ts","sourceRoot":"","sources":["CTX.js"],"names":[],"mappings":"AAGO,+BAA2B;AAG3B,wCADK,OAAO,SAAS,EAAE,KAAK;;;;;;EAajC;AAGK,wCADK,OAAO,SAAS,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"CTX.d.ts","sourceRoot":"","sources":["CTX.js"],"names":[],"mappings":"AAGO,+BAA2B;AAG3B,wCADK,OAAO,SAAS,EAAE,KAAK;;;;;;EAajC;AAGK,wCADK,OAAO,SAAS,EAAE,KAAK;;;;IAMjC,qEAAqE;yBAA1D,WAAW,OAAO,UAAU,EAAE,qBAAqB,CAAC,EAAE;IAEjE,8DAA8D;wBAAnD,OAAO,UAAU,EAAE,qBAAqB,GAAG,IAAI;IAE1D,yEAAyE;kBAA9D,OAAO,2BAA2B,EAAE,eAAe,GAAG,IAAI;IAErE,0BAA0B;sBAAf,IAAI,MAAM,CAAC;IAEtB,8EAA8E;6BAAnE,OAAO,2BAA2B,EAAE,oBAAoB,GAAG,IAAI;;;;;;EAE1E;sBAnCoB,2BAA2B"}
|
package/abstract/CTX.js
CHANGED
|
@@ -23,7 +23,6 @@ export const uploaderBlockCtx = (fnCtx) => ({
|
|
|
23
23
|
...activityBlockCtx(fnCtx),
|
|
24
24
|
'*commonProgress': 0,
|
|
25
25
|
'*uploadList': [],
|
|
26
|
-
'*focusedEntry': null,
|
|
27
26
|
'*uploadQueue': new Queue(1),
|
|
28
27
|
/** @type {ReturnType<import('../types').OutputErrorCollection>[]} */
|
|
29
28
|
'*collectionErrors': [],
|
|
@@ -4,7 +4,6 @@ export class SolutionBlock extends Block {
|
|
|
4
4
|
init$: {
|
|
5
5
|
'*commonProgress': number;
|
|
6
6
|
'*uploadList': never[];
|
|
7
|
-
'*focusedEntry': null;
|
|
8
7
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
9
8
|
'*collectionErrors': any[];
|
|
10
9
|
'*collectionState': import("../index.js").OutputCollectionState<import("../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolutionBlock.d.ts","sourceRoot":"","sources":["SolutionBlock.js"],"names":[],"mappings":"AAIA;IAWE,gCAEC;IAED,2BAEC;IAdD
|
|
1
|
+
{"version":3,"file":"SolutionBlock.d.ts","sourceRoot":"","sources":["SolutionBlock.js"],"names":[],"mappings":"AAIA;IAWE,gCAEC;IAED,2BAEC;IAdD;;;;;;;;;;;;;;MAA+B;IAC/B,gBAAiB;CAclB;sBArBqB,YAAY"}
|
|
@@ -6,7 +6,6 @@ export class UploaderBlock extends ActivityBlock {
|
|
|
6
6
|
init$: {
|
|
7
7
|
'*commonProgress': number;
|
|
8
8
|
'*uploadList': never[];
|
|
9
|
-
'*focusedEntry': null;
|
|
10
9
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
11
10
|
'*collectionErrors': any[];
|
|
12
11
|
'*collectionState': import("../types").OutputCollectionState<import("../types").OutputCollectionStatus, "maybe-has-group"> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderBlock.d.ts","sourceRoot":"","sources":["UploaderBlock.js"],"names":[],"mappings":"AAkBA;IACE,iBAAiB;IACjB,mCAAwB;IAExB,eAAe;IACf,mBAAmB;IAEnB
|
|
1
|
+
{"version":3,"file":"UploaderBlock.d.ts","sourceRoot":"","sources":["UploaderBlock.js"],"names":[],"mappings":"AAkBA;IACE,iBAAiB;IACjB,mCAAwB;IAExB,eAAe;IACf,mBAAmB;IAEnB;;;;;;;;;;;;;;MAA+B;IAE/B,eAAe;IACf,0BAOC;IA2BD;;;OAGG;IACH,qDAKC;IAED,mCAAmC;IACnC,6BAKC;IAED,4BAEC;IAED,iCAAiC;IACjC,wCAKC;IAYD,eAAe;IACf,qBA0BC;IAvBC,eAAe;IACf,6BAAiG;IAEjG,eAAe;IACf,uCAEC;IAmBH;;;OAGG;IACH,qBAkBC;IAED,eAAe;IACf,0BAYQ;IAER;;;;OAIG;IACH,gCAiCE;IAEF;;;OAGG;IACH,0CAyFE;IAEF,eAAe;IACf,mCAoBE;IAEF,eAAe;IACf,uBAuCC;IAED;;;OAGG;IACH,kCAHW,MAAM,qEAWhB;IAED;;;OAGG;IACH,oCAHa,QAAQ,OAAO,2BAA2B,EAAE,eAAe,CAAC,CA2BxE;IAED,kEAAkE;IAClE,iBADc,OAAO,sBAAsB,EAAE,eAAe,EAAE,CAK7D;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BApa6B,oBAAoB;qCAWb,2BAA2B;kCAG9B,wBAAwB;kCADxB,wBAAwB;gCAD1B,sBAAsB"}
|
|
@@ -360,7 +360,9 @@ export class UploaderBlock extends ActivityBlock {
|
|
|
360
360
|
this.cfg.useCloudImageEditor &&
|
|
361
361
|
this.hasBlockInCtx((block) => block.activityType === ActivityBlock.activities.CLOUD_IMG_EDIT)
|
|
362
362
|
) {
|
|
363
|
-
this.$['*
|
|
363
|
+
this.$['*currentActivityParams'] = {
|
|
364
|
+
internalId: entry.uid,
|
|
365
|
+
};
|
|
364
366
|
this.$['*currentActivity'] = ActivityBlock.activities.CLOUD_IMG_EDIT;
|
|
365
367
|
}
|
|
366
368
|
}
|
|
@@ -75,10 +75,18 @@ export class UploaderPublicApi {
|
|
|
75
75
|
initFlow: (force?: boolean | undefined) => void;
|
|
76
76
|
doneFlow: () => void;
|
|
77
77
|
/**
|
|
78
|
-
* @
|
|
79
|
-
*
|
|
78
|
+
* @type {<T extends import('./ActivityBlock.js').ActivityType>(
|
|
79
|
+
* activityType: T,
|
|
80
|
+
* ...params: T extends keyof import('./ActivityBlock.js').ActivityParamsMap
|
|
81
|
+
* ? [import('./ActivityBlock.js').ActivityParamsMap[T]]
|
|
82
|
+
* : T extends import('./ActivityBlock.js').RegisteredActivityType
|
|
83
|
+
* ? [undefined?]
|
|
84
|
+
* : [any?]
|
|
85
|
+
* ) => void}
|
|
80
86
|
*/
|
|
81
|
-
setCurrentActivity:
|
|
87
|
+
setCurrentActivity: <T extends import("./ActivityBlock.js").ActivityType>(activityType: T, ...params: T extends keyof import("./ActivityBlock.js").ActivityParamsMap ? [import("./ActivityBlock.js").ActivityParamsMap[T]] : T extends import("./ActivityBlock.js").RegisteredActivityType ? [undefined?] : [any?]) => void;
|
|
88
|
+
/** @returns {import('./ActivityBlock.js').ActivityType} */
|
|
89
|
+
getCurrentActivity: () => import('./ActivityBlock.js').ActivityType;
|
|
82
90
|
/** @param {boolean} opened */
|
|
83
91
|
setModalState: (opened: boolean) => void;
|
|
84
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAYA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,sBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,wBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,4BAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,0BAJW,IAAI;;;;;sBAEF,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAcrD;IAEF,iCAAiC;IACjC,qCADY,MAAM,UAMhB;IAEF,uBAEC;IAED,sBAeE;IAEF,mDAAmD;IACnD,6BADY;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,
|
|
1
|
+
{"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAYA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,sBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,wBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,4BAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,0BAJW,IAAI;;;;;sBAEF,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAcrD;IAEF,iCAAiC;IACjC,qCADY,MAAM,UAMhB;IAEF,uBAEC;IAED,sBAeE;IAEF,mDAAmD;IACnD,6BADY;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,UAgCrC;IAEF;;;;OAIG;IACH,8EAHW,MAAM,iDA6Cf;IAEF,oEAAoE;IACpE,oKAIE;IAEF,+BAA+B;IAC/B,gDAsCE;IAEF,qBAQE;IAEF;;;;;;;;;OASG;IACH,uTAFQ,IAAI,CAWV;IAEF,2DAA2D;IAC3D,0BADc,OAAO,oBAAoB,EAAE,YAAY,CAGrD;IAEF,8BAA8B;IAC9B,wBADY,OAAO,UAOjB;IAEF;;;OAGG;IACH,0BAOC;CACF"}
|
|
@@ -147,12 +147,7 @@ export class UploaderPublicApi {
|
|
|
147
147
|
'The value of `accept` will be concatenated with the internal image mime types list.',
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
const INPUT_DATA_ATTR = 'data-uploadcare-temporary-input';
|
|
152
|
-
|
|
153
|
-
let fileInput = document.createElement('input');
|
|
154
|
-
fileInput.setAttribute(INPUT_DATA_ATTR, '');
|
|
155
|
-
fileInput.style.visibility = 'hidden';
|
|
150
|
+
const fileInput = document.createElement('input');
|
|
156
151
|
fileInput.type = 'file';
|
|
157
152
|
fileInput.multiple = this.cfg.multiple;
|
|
158
153
|
if (options.captureCamera) {
|
|
@@ -161,28 +156,18 @@ export class UploaderPublicApi {
|
|
|
161
156
|
} else {
|
|
162
157
|
fileInput.accept = accept;
|
|
163
158
|
}
|
|
164
|
-
fileInput.addEventListener(
|
|
165
|
-
'change',
|
|
166
|
-
() => {
|
|
167
|
-
if (!fileInput.files) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
[...fileInput.files].forEach((file) =>
|
|
171
|
-
this.addFileFromObject(file, { source: options.captureCamera ? UploadSource.CAMERA : UploadSource.LOCAL }),
|
|
172
|
-
);
|
|
173
|
-
// To call uploadTrigger UploadList should draw file items first:
|
|
174
|
-
this._ctx.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
175
|
-
this._ctx.setOrAddState('*modalActive', true);
|
|
176
|
-
fileInput.remove();
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
once: true,
|
|
180
|
-
},
|
|
181
|
-
);
|
|
182
|
-
|
|
183
|
-
document.querySelectorAll(`[${INPUT_DATA_ATTR}]`).forEach((el) => el.remove());
|
|
184
|
-
document.body.appendChild(fileInput);
|
|
185
159
|
fileInput.dispatchEvent(new MouseEvent('click'));
|
|
160
|
+
fileInput.onchange = () => {
|
|
161
|
+
// @ts-ignore TODO: fix this
|
|
162
|
+
[...fileInput['files']].forEach((file) =>
|
|
163
|
+
this.addFileFromObject(file, { source: options.captureCamera ? UploadSource.CAMERA : UploadSource.LOCAL }),
|
|
164
|
+
);
|
|
165
|
+
// To call uploadTrigger UploadList should draw file items first:
|
|
166
|
+
this._ctx.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
167
|
+
this._ctx.setOrAddState('*modalActive', true);
|
|
168
|
+
// @ts-ignore TODO: fix this
|
|
169
|
+
fileInput['value'] = '';
|
|
170
|
+
};
|
|
186
171
|
};
|
|
187
172
|
|
|
188
173
|
/**
|
|
@@ -293,13 +278,19 @@ export class UploaderPublicApi {
|
|
|
293
278
|
};
|
|
294
279
|
|
|
295
280
|
/**
|
|
296
|
-
* @
|
|
297
|
-
*
|
|
281
|
+
* @type {<T extends import('./ActivityBlock.js').ActivityType>(
|
|
282
|
+
* activityType: T,
|
|
283
|
+
* ...params: T extends keyof import('./ActivityBlock.js').ActivityParamsMap
|
|
284
|
+
* ? [import('./ActivityBlock.js').ActivityParamsMap[T]]
|
|
285
|
+
* : T extends import('./ActivityBlock.js').RegisteredActivityType
|
|
286
|
+
* ? [undefined?]
|
|
287
|
+
* : [any?]
|
|
288
|
+
* ) => void}
|
|
298
289
|
*/
|
|
299
|
-
setCurrentActivity = (activityType, params =
|
|
290
|
+
setCurrentActivity = (activityType, params = undefined) => {
|
|
300
291
|
if (this._ctx.hasBlockInCtx((b) => b.activityType === activityType)) {
|
|
301
292
|
this._ctx.set$({
|
|
302
|
-
'*currentActivityParams': params,
|
|
293
|
+
'*currentActivityParams': params ?? {},
|
|
303
294
|
'*currentActivity': activityType,
|
|
304
295
|
});
|
|
305
296
|
return;
|
|
@@ -307,6 +298,11 @@ export class UploaderPublicApi {
|
|
|
307
298
|
console.warn(`Activity type "${activityType}" not found in the context`);
|
|
308
299
|
};
|
|
309
300
|
|
|
301
|
+
/** @returns {import('./ActivityBlock.js').ActivityType} */
|
|
302
|
+
getCurrentActivity = () => {
|
|
303
|
+
return this._ctx.$['*currentActivity'];
|
|
304
|
+
};
|
|
305
|
+
|
|
310
306
|
/** @param {boolean} opened */
|
|
311
307
|
setModalState = (opened) => {
|
|
312
308
|
if (opened && !this._ctx.$['*currentActivity']) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorButtonControl.d.ts","sourceRoot":"","sources":["EditorButtonControl.js"],"names":[],"mappings":"AAGA;IACE,
|
|
1
|
+
{"version":3,"file":"EditorButtonControl.d.ts","sourceRoot":"","sources":["EditorButtonControl.js"],"names":[],"mappings":"AAGA;IACE,WAOE;IAKA,cAAoC;IACpC,aAAkC;CAoBrC;;;;sBApCqB,4BAA4B"}
|
|
@@ -8,6 +8,7 @@ export class EditorButtonControl extends Block {
|
|
|
8
8
|
title: '',
|
|
9
9
|
icon: '',
|
|
10
10
|
'on.click': null,
|
|
11
|
+
'title-prop': '',
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
initCallback() {
|
|
@@ -37,7 +38,7 @@ export class EditorButtonControl extends Block {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
EditorButtonControl.template = /* HTML */ `
|
|
40
|
-
<button type="button" role="option">
|
|
41
|
+
<button type="button" role="option" l10n="@title:title-prop">
|
|
41
42
|
<uc-icon set="@name: icon;"></uc-icon>
|
|
42
43
|
<div class="uc-title" ref="title-el">{{title}}</div>
|
|
43
44
|
</button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCropButtonControl.d.ts","sourceRoot":"","sources":["EditorCropButtonControl.js"],"names":[],"mappings":"AAkBA;IASM,eAAe;IACf,mBAA2B;
|
|
1
|
+
{"version":3,"file":"EditorCropButtonControl.d.ts","sourceRoot":"","sources":["EditorCropButtonControl.js"],"names":[],"mappings":"AAkBA;IASM,eAAe;IACf,mBAA2B;CAehC;oCA3CmC,0BAA0B"}
|
|
@@ -28,9 +28,14 @@ export class EditorCropButtonControl extends EditorButtonControl {
|
|
|
28
28
|
/** @private */
|
|
29
29
|
this._operation = operation;
|
|
30
30
|
this.$['icon'] = operation;
|
|
31
|
+
this.bindL10n('title-prop', () =>
|
|
32
|
+
this.l10n('a11y-cloud-editor-apply-crop', {
|
|
33
|
+
name: this.l10n(operation).toLowerCase(),
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
31
36
|
});
|
|
32
37
|
|
|
33
|
-
this.$['on.click'] = (
|
|
38
|
+
this.$['on.click'] = () => {
|
|
34
39
|
let prev = this.$['*cropperEl'].getValue(this._operation);
|
|
35
40
|
let next = nextValue(this._operation, prev);
|
|
36
41
|
this.$['*cropperEl'].setValue(this._operation, next);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorFilterControl.d.ts","sourceRoot":"","sources":["EditorFilterControl.js"],"names":[],"mappings":"AAOA;IAeE,sBA2BC;IAED;;;OAGG;IACH,2BAHW,yBAAyB,EAAE,YAC3B,oBAAoB,iBAuB9B;IAfG,yCAA4B;IAoC1B,+BAA0B;IAC1B,4BAAqB;
|
|
1
|
+
{"version":3,"file":"EditorFilterControl.d.ts","sourceRoot":"","sources":["EditorFilterControl.js"],"names":[],"mappings":"AAOA;IAeE,sBA2BC;IAED;;;OAGG;IACH,2BAHW,yBAAyB,EAAE,YAC3B,oBAAoB,iBAuB9B;IAfG,yCAA4B;IAoC1B,+BAA0B;IAC1B,4BAAqB;IAYzB,4CAEE;IAGF,kBAA+B;CAgDlC;;;;oCAjKmC,0BAA0B"}
|
|
@@ -99,6 +99,12 @@ export class EditorFilterControl extends EditorButtonControl {
|
|
|
99
99
|
this._filter = filter;
|
|
100
100
|
this.$.isOriginal = filter === FAKE_ORIGINAL_FILTER;
|
|
101
101
|
this.$.icon = this.$.isOriginal ? 'original' : 'slider';
|
|
102
|
+
|
|
103
|
+
this.bindL10n('title-prop', () =>
|
|
104
|
+
this.l10n('a11y-cloud-editor-apply-filter', {
|
|
105
|
+
name: filter.toLowerCase(),
|
|
106
|
+
}),
|
|
107
|
+
);
|
|
102
108
|
},
|
|
103
109
|
);
|
|
104
110
|
|
|
@@ -158,7 +164,7 @@ export class EditorFilterControl extends EditorButtonControl {
|
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
EditorFilterControl.template = /* HTML */ `
|
|
161
|
-
<button type="button" role="option">
|
|
167
|
+
<button type="button" role="option" l10n="@title:title-prop">
|
|
162
168
|
<div class="uc-preview" ref="preview-el"></div>
|
|
163
169
|
<uc-icon ref="icon-el" set="@name: icon; @size: iconSize;"></uc-icon>
|
|
164
170
|
</button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorOperationControl.d.ts","sourceRoot":"","sources":["EditorOperationControl.js"],"names":[],"mappings":"AAGA;IACE;;;OAGG;IACH,mBAAgB;
|
|
1
|
+
{"version":3,"file":"EditorOperationControl.d.ts","sourceRoot":"","sources":["EditorOperationControl.js"],"names":[],"mappings":"AAGA;IACE;;;OAGG;IACH,mBAAgB;CAmCjB;oCA3CmC,0BAA0B"}
|
|
@@ -21,6 +21,11 @@ export class EditorOperationControl extends EditorButtonControl {
|
|
|
21
21
|
if (operation) {
|
|
22
22
|
this._operation = operation;
|
|
23
23
|
this.$['icon'] = operation;
|
|
24
|
+
this.bindL10n('title-prop', () =>
|
|
25
|
+
this.l10n('a11y-cloud-editor-apply-tuning', {
|
|
26
|
+
name: this.l10n(operation).toLowerCase(),
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
24
29
|
this.bindL10n('title', () => this.l10n(operation));
|
|
25
30
|
}
|
|
26
31
|
});
|
|
@@ -47,6 +47,11 @@ export class EditorToolbar extends Block {
|
|
|
47
47
|
/** @param {MouseEvent} e */
|
|
48
48
|
'on.clickTab': (e: MouseEvent) => void;
|
|
49
49
|
tab_role: string;
|
|
50
|
+
cancel: string;
|
|
51
|
+
apply: string;
|
|
52
|
+
'a11y-editor-tab-filters': string;
|
|
53
|
+
'a11y-editor-tab-tuning': string;
|
|
54
|
+
'a11y-editor-tab-crop': string;
|
|
50
55
|
};
|
|
51
56
|
/** @private */
|
|
52
57
|
private _debouncedShowLoader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["EditorToolbar.js"],"names":[],"mappings":"AA2DA;IAII;;QAGE,qDAAqD;8BAA1C,OAAO,YAAY,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuDjD,4BAA4B;2BAAhB,UAAU
|
|
1
|
+
{"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["EditorToolbar.js"],"names":[],"mappings":"AA2DA;IAII;;QAGE,qDAAqD;8BAA1C,OAAO,YAAY,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuDjD,4BAA4B;2BAAhB,UAAU;;;;;;;MAgBvB;IAED,eAAe;IAEf,6BAAsE;IAGxE,eAAe;IACf,uBAKC;IAED;;;OAGG;IACH,gCAKC;IAED;;;OAGG;IACH,6BAKC;IAED;;;OAGG;IACH,6BAKC;IAED;;;OAGG;IACH,4BAoCC;IAED;;;;OAIG;IACH,qBAyBC;IAED;;;OAGG;IACH,4BAKC;IAED,eAAe;IACf,0BAIC;IAED,eAAe;IACf,4BAWC;IALG,oBAGC;IAIL;;;OAGG;IACH,oBAEC;IAED;;MAwBM;CAiFP;;;;sBAlZqB,4BAA4B"}
|
|
@@ -28,7 +28,7 @@ function renderTabToggle(id) {
|
|
|
28
28
|
ref="tab-toggle-${id}"
|
|
29
29
|
data-id="${id}"
|
|
30
30
|
icon="${id}"
|
|
31
|
-
set="onclick: on.clickTab; aria-role:tab_role; aria-controls:tab_${id}"
|
|
31
|
+
set="onclick: on.clickTab; aria-role:tab_role; aria-controls:tab_${id}; title-prop: a11y-editor-tab-${id}"
|
|
32
32
|
>
|
|
33
33
|
</uc-btn-ui>
|
|
34
34
|
</uc-presence-toggle>
|
|
@@ -130,6 +130,11 @@ export class EditorToolbar extends Block {
|
|
|
130
130
|
[`tab_${TabId.TUNING}`]: `tab_${TabId.TUNING}`,
|
|
131
131
|
[`tab_${TabId.CROP}`]: `tab_${TabId.CROP}`,
|
|
132
132
|
[`tab_${TabId.FILTERS}`]: `tab_${TabId.FILTERS}`,
|
|
133
|
+
cancel: 'cancel',
|
|
134
|
+
apply: 'apply',
|
|
135
|
+
'a11y-editor-tab-filters': 'a11y-editor-tab-filters',
|
|
136
|
+
'a11y-editor-tab-tuning': 'a11y-editor-tab-tuning',
|
|
137
|
+
'a11y-editor-tab-crop': 'a11y-editor-tab-crop',
|
|
133
138
|
};
|
|
134
139
|
|
|
135
140
|
/** @private */
|
|
@@ -421,8 +426,9 @@ EditorToolbar.template = /* HTML */ `
|
|
|
421
426
|
<div ref="tabs-indicator" class="uc-tab-toggles_indicator"></div>
|
|
422
427
|
${ALL_TABS.map(renderTabToggle).join('')}
|
|
423
428
|
</uc-presence-toggle>
|
|
424
|
-
<uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel
|
|
425
|
-
|
|
429
|
+
<uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel; title-prop:cancel">
|
|
430
|
+
</uc-btn-ui>
|
|
431
|
+
<uc-btn-ui theme="primary-icon" icon="done" set="onclick: on.apply; title-prop:apply"> </uc-btn-ui>
|
|
426
432
|
</div>
|
|
427
433
|
</uc-presence-toggle>
|
|
428
434
|
<uc-presence-toggle
|
|
@@ -433,8 +439,8 @@ EditorToolbar.template = /* HTML */ `
|
|
|
433
439
|
<uc-editor-slider ref="slider-el"></uc-editor-slider>
|
|
434
440
|
</div>
|
|
435
441
|
<div class="uc-controls-row">
|
|
436
|
-
<uc-btn-ui theme="secondary" set="onclick: on.cancelSlider
|
|
437
|
-
<uc-btn-ui theme="primary" set="onclick: on.applySlider
|
|
442
|
+
<uc-btn-ui theme="secondary" set="onclick: on.cancelSlider" l10n="@text:cancel"> </uc-btn-ui>
|
|
443
|
+
<uc-btn-ui theme="primary" set="onclick: on.applySlider" l10n="@text:apply"> </uc-btn-ui>
|
|
438
444
|
</div>
|
|
439
445
|
</uc-presence-toggle>
|
|
440
446
|
</div>
|
|
@@ -433,6 +433,13 @@ uc-editor-filter-control > button .uc-title {
|
|
|
433
433
|
text-transform: uppercase;
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
+
uc-editor-button-control > button uc-icon,
|
|
437
|
+
uc-editor-operation-control > button uc-icon,
|
|
438
|
+
uc-editor-crop-button-control > button uc-icon,
|
|
439
|
+
uc-editor-filter-control > button uc-icon {
|
|
440
|
+
pointer-events: none;
|
|
441
|
+
}
|
|
442
|
+
|
|
436
443
|
uc-editor-filter-control > button .uc-preview {
|
|
437
444
|
position: absolute;
|
|
438
445
|
right: 0;
|
|
@@ -869,6 +876,10 @@ uc-btn-ui > button {
|
|
|
869
876
|
user-select: none;
|
|
870
877
|
}
|
|
871
878
|
|
|
879
|
+
uc-btn-ui > button > uc-icon {
|
|
880
|
+
pointer-events: none;
|
|
881
|
+
}
|
|
882
|
+
|
|
872
883
|
uc-btn-ui .uc-text {
|
|
873
884
|
white-space: nowrap;
|
|
874
885
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BtnUi.d.ts","sourceRoot":"","sources":["BtnUi.js"],"names":[],"mappings":"AAGA;IAII,uBAA0B;IAC1B,qBAAwB;IACxB,qBAAwB;IAExB
|
|
1
|
+
{"version":3,"file":"BtnUi.d.ts","sourceRoot":"","sources":["BtnUi.js"],"names":[],"mappings":"AAGA;IAII,uBAA0B;IAC1B,qBAAwB;IACxB,qBAAwB;IAExB;;;;;;;;MASC;IAWH,mBAOC;IAsCD,sBAQC;CACF;;;;sBArFqB,kCAAkC"}
|
|
@@ -17,6 +17,7 @@ export class BtnUi extends Block {
|
|
|
17
17
|
theme: null,
|
|
18
18
|
'aria-role': '',
|
|
19
19
|
'aria-controls': '',
|
|
20
|
+
'title-prop': '',
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
this.defineAccessor('active', (active) => {
|
|
@@ -67,6 +68,10 @@ export class BtnUi extends Block {
|
|
|
67
68
|
this.defineAccessor('aria-controls', (value) => {
|
|
68
69
|
this.$['aria-controls'] = value || '';
|
|
69
70
|
});
|
|
71
|
+
|
|
72
|
+
this.defineAccessor('title-prop', (value) => {
|
|
73
|
+
this.$['title-prop'] = value || '';
|
|
74
|
+
});
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
set reverse(val) {
|
|
@@ -83,7 +88,7 @@ export class BtnUi extends Block {
|
|
|
83
88
|
BtnUi.bindAttributes({ text: 'text', icon: 'icon', reverse: 'reverse', theme: 'theme' });
|
|
84
89
|
|
|
85
90
|
BtnUi.template = /* HTML */ `
|
|
86
|
-
<button type="button" set="@role:aria-role; @aria-controls: aria-controls">
|
|
91
|
+
<button type="button" set="@role:aria-role; @aria-controls: aria-controls;" l10n="@title:title-prop">
|
|
87
92
|
<uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>
|
|
88
93
|
<div class="uc-text">{{text}}</div>
|
|
89
94
|
</button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliderUi.d.ts","sourceRoot":"","sources":["SliderUi.js"],"names":[],"mappings":"AAEA;IACE,WAiBE;IA6BE,WAAiB;IAenB,sCAIE;IAGF,+BAAgG;IAyBlG,+BAWC;IAED,iCAgBC;IAED,qBAmCC;IALC,uCAA2B;IAI3B,iBAAwB;
|
|
1
|
+
{"version":3,"file":"SliderUi.d.ts","sourceRoot":"","sources":["SliderUi.js"],"names":[],"mappings":"AAEA;IACE,WAiBE;IA6BE,WAAiB;IAenB,sCAIE;IAGF,+BAAgG;IAyBlG,+BAWC;IAED,iCAgBC;IAED,qBAmCC;IALC,uCAA2B;IAI3B,iBAAwB;CAO3B;;;;sBAxKqB,kCAAkC"}
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
+
/** @typedef {{ internalId: string }} ActivityParams */
|
|
1
2
|
export class CloudImageEditorActivity extends UploaderBlock {
|
|
2
3
|
activityType: "cloud-image-edit";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'*currentActivityParams': {};
|
|
16
|
-
'*history': never[];
|
|
17
|
-
'*historyBack': null;
|
|
18
|
-
'*closeModal': () => void;
|
|
19
|
-
};
|
|
20
|
-
entry: import("../../abstract/TypedData.js").TypedData | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @type {import('../../abstract/TypedData.js').TypedData | undefined}
|
|
7
|
+
*/
|
|
8
|
+
private _entry;
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* @type {CloudImageEditorBlock | undefined}
|
|
12
|
+
*/
|
|
13
|
+
private _instance;
|
|
14
|
+
/** @type {ActivityParams} */
|
|
15
|
+
get activityParams(): ActivityParams;
|
|
21
16
|
/** @param {CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>} e */
|
|
22
17
|
handleApply(e: CustomEvent<import('../CloudImageEditor/src/types.js').ApplyResult>): void;
|
|
23
18
|
handleCancel(): void;
|
|
24
19
|
mountEditor(): void;
|
|
25
|
-
_mounted: boolean | undefined;
|
|
26
|
-
/** @private */
|
|
27
|
-
private _instance;
|
|
28
20
|
unmountEditor(): void;
|
|
29
21
|
}
|
|
22
|
+
export type ActivityParams = {
|
|
23
|
+
internalId: string;
|
|
24
|
+
};
|
|
30
25
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
31
26
|
//# sourceMappingURL=CloudImageEditorActivity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAKA;IAEE,iCAAuD;
|
|
1
|
+
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAKA,uDAAuD;AAEvD;IAEE,iCAAuD;IAEvD;;;OAGG;IACH,eAAO;IAEP;;;OAGG;IACH,kBAAU;IAEV,6BAA6B;IAC7B,qCAMC;IAuBD,qFAAqF;IACrF,eADY,YAAY,OAAO,kCAAkC,EAAE,WAAW,CAAC,QAW9E;IAED,qBAEC;IAED,oBA4CC;IAED,sBAIC;CACF;6BApHa;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE;8BAHN,iCAAiC"}
|