@uploadcare/file-uploader 1.3.0-alpha.4 → 1.3.0-alpha.5
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/Block.d.ts +1 -1
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +18 -15
- package/abstract/TypedCollection.js +1 -1
- package/abstract/TypedData.js +1 -1
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +1 -1
- package/abstract/UploaderPublicApi.js +1 -1
- package/blocks/CameraSource/CameraSource.js +9 -9
- package/blocks/CloudImageEditor/src/CropFrame.js +1 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +2 -2
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +2 -2
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +1 -1
- package/blocks/CloudImageEditor/src/EditorScroller.js +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.js +2 -2
- package/blocks/CloudImageEditor/src/EditorToolbar.js +12 -12
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +3 -3
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +1 -1
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +1 -1
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +2 -2
- package/blocks/CloudImageEditor/src/template.js +4 -4
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +1 -1
- package/blocks/Copyright/Copyright.js +1 -1
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/DropArea.js +3 -3
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +7 -7
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +10 -10
- package/blocks/FormInput/FormInput.js +1 -1
- package/blocks/Icon/Icon.js +2 -2
- package/blocks/Img/ImgConfig.d.ts +1 -1
- package/blocks/Img/ImgConfig.d.ts.map +1 -1
- package/blocks/Img/ImgConfig.js +1 -1
- package/blocks/Modal/Modal.js +1 -1
- package/blocks/ProgressBar/ProgressBar.js +1 -1
- package/blocks/ProgressBarCommon/ProgressBarCommon.js +2 -2
- package/blocks/Select/Select.js +2 -2
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.js +3 -3
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +2 -2
- package/blocks/SourceList/SourceList.js +1 -1
- package/blocks/StartFrom/StartFrom.js +1 -1
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.js +8 -8
- package/blocks/UrlSource/UrlSource.js +5 -5
- 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 +1 -1
- package/index.ssr.js +73 -73
- package/package.json +4 -3
- package/solutions/file-uploader/inline/FileUploaderInline.js +1 -2
- package/solutions/file-uploader/regular/FileUploaderRegular.js +2 -4
- package/symbiote.js +19 -0
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.js +3 -3
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +3 -3
- package/abstract/bindCompatibilityFallbackProcessor.d.ts +0 -3
- package/abstract/bindCompatibilityFallbackProcessor.d.ts.map +0 -1
- package/abstract/bindCompatibilityFallbackProcessor.js +0 -16
package/abstract/Block.d.ts
CHANGED
|
@@ -89,6 +89,6 @@ export class Block extends Symbiote<any> {
|
|
|
89
89
|
/** @param {unknown[]} args */
|
|
90
90
|
debugPrint(...args: unknown[]): void;
|
|
91
91
|
}
|
|
92
|
-
import { Symbiote } from '
|
|
92
|
+
import { Symbiote } from '../symbiote.js';
|
|
93
93
|
import { A11y } from './a11y.js';
|
|
94
94
|
//# sourceMappingURL=Block.d.ts.map
|
package/abstract/Block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAoBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;IAkUvB,6BAA6B;IAC7B,4CAQC;IAvRD,cAOC;IAzDD,iBAAiB;IACjB,kCAAuB;IAEvB,wDAAwD;IACxD,cADW,OAAO,oBAAoB,EAAE,YAAY,CAChC;IAEpB,UAAmB;IAEnB;;;;OAIG;IACH,8BAHW;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,UAiB5C;IAED;;;;;OAKG;IACH,kBAIC;IAED;;;;OAIG;IACH,wBAJW,MAAM,YACN,MAAM,IAAI,QAKpB;IAIC,uDAAuD;IACvD,mBADW,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC,CACjB;IAMpC;;;;OAIG;IACH,WAJW,UAAU,CAAC,OAAO,6CAA6C,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,YACzF,UAAU,CAAC,OAAO,6CAA6C,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,YACzF,UAAU,CAAC,OAAO,6CAA6C,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QASnG;IAED;;;OAGG;IACH,wBAHW,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,WAUnC;IAED;;;OAGG;IACH,oCAFW,GAAG,QASb;IA8ED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,yBAAyB;IACzB,iCAEC;IAsBD;;;;OAIG;IACH,qCAIC;IAED;;;;OAIG;IACH,iCAHa,OAAO,QAAQ,CA6B3B;IAED,iDAAiD;IACjD,yCA8BC;IA3BG,eAAe;IACf,mBAuBE;IAKN;;;;OAIG;IACH,eAJmD,CAAC,SAAvC,MAAO,OAAO,UAAU,EAAE,UAAW,OACvC,CAAC,YACD,CAAC,KAAK,EAAE,OAAO,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,QAQ3D;IAED,8BAA8B;IAC9B,oBADY,OAAO,EAAE,QAYpB;CAYF;yBApWqD,gBAAgB;qBAWjD,WAAW"}
|
package/abstract/Block.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { DICT, PubSub, Symbiote } from '
|
|
3
|
-
// @ts-ignore - something wrong with the tsd
|
|
4
|
-
import { slotProcessor } from '@symbiotejs/symbiote/core/slotProcessor.js';
|
|
2
|
+
import { DICT, PubSub, Symbiote, slotProcessor } from '../symbiote.js';
|
|
5
3
|
import { initialConfig } from '../blocks/Config/initialConfig.js';
|
|
6
4
|
import { EventEmitter } from '../blocks/UploadCtxProvider/EventEmitter.js';
|
|
7
5
|
import { WindowHeightTracker } from '../utils/WindowHeightTracker.js';
|
|
@@ -15,7 +13,6 @@ import { LocaleManager, localeStateKey } from './LocaleManager.js';
|
|
|
15
13
|
import { A11y } from './a11y.js';
|
|
16
14
|
import { l10nProcessor } from './l10nProcessor.js';
|
|
17
15
|
import { sharedConfigKey } from './sharedConfigKey.js';
|
|
18
|
-
import { bindCompatibilityFallbackProcessor } from './bindCompatibilityFallbackProcessor.js';
|
|
19
16
|
|
|
20
17
|
const TAG_PREFIX = 'uc-';
|
|
21
18
|
const CTX_NAME_FALLBACK_ATTR = 'ctx-name';
|
|
@@ -85,9 +82,6 @@ export class Block extends Symbiote {
|
|
|
85
82
|
// @ts-expect-error TODO: fix this
|
|
86
83
|
this.addTemplateProcessor(l10nProcessor);
|
|
87
84
|
this.addTemplateProcessor(slotProcessor);
|
|
88
|
-
|
|
89
|
-
// Prepend tpl processors with bind compatibility fallback processor
|
|
90
|
-
this.tplProcessors = new Set([bindCompatibilityFallbackProcessor, ...this.tplProcessors]);
|
|
91
85
|
}
|
|
92
86
|
|
|
93
87
|
/**
|
|
@@ -143,19 +137,28 @@ export class Block extends Symbiote {
|
|
|
143
137
|
this.processInnerHtml = true;
|
|
144
138
|
}
|
|
145
139
|
if (this.requireCtxName) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
Promise.race([
|
|
141
|
+
waitForAttribute({
|
|
142
|
+
element: this,
|
|
143
|
+
attribute: DICT.CTX_NAME_ATTR,
|
|
144
|
+
}),
|
|
145
|
+
waitForAttribute({
|
|
146
|
+
element: this,
|
|
147
|
+
attribute: CTX_NAME_FALLBACK_ATTR,
|
|
148
|
+
}),
|
|
149
|
+
]).then((result) => {
|
|
150
150
|
if (result.success) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
if (result.attribute === CTX_NAME_FALLBACK_ATTR) {
|
|
152
|
+
const ctxName = result.value;
|
|
153
|
+
this.style.setProperty(DICT.CSS_CTX_PROP, `'${ctxName}'`);
|
|
154
|
+
}
|
|
154
155
|
// async wait for ctx attribute to be set, needed for Angular because it sets attributes after mount
|
|
155
156
|
// TODO: should be moved to the symbiote core
|
|
156
157
|
super.connectedCallback();
|
|
157
158
|
} else {
|
|
158
|
-
console.error(
|
|
159
|
+
console.error(
|
|
160
|
+
`Attribute "${DICT.CTX_NAME_ATTR}" or "${CTX_NAME_FALLBACK_ATTR}" is required and it is not set.`,
|
|
161
|
+
);
|
|
159
162
|
}
|
|
160
163
|
});
|
|
161
164
|
} else {
|
package/abstract/TypedData.js
CHANGED
|
@@ -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;;;;;oCAbU,UAAU;mCACW,UAAU;6BAEjC,2BAA2B;;wCAGU,2BAE5C;;;;;;MAK8B;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,uBAqCC;IAED;;;OAGG;IACH,kCAHW,MAAM,qEAWhB;IAED;;;OAGG;IACH,oCAHa,OAAO,CAAC,OAAO,2BAA2B,EAAE,eAAe,CAAC,CA2BxE;IAED,kEAAkE;IAClE,iBADc,OAAO,sBAAsB,EAAE,eAAe,EAAE,CAK7D;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAla6B,oBAAoB;qCAWb,2BAA2B;kCAG9B,wBAAwB;kCADxB,wBAAwB;gCAD1B,sBAAsB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { ActivityBlock } from './ActivityBlock.js';
|
|
3
3
|
|
|
4
|
-
import { PubSub } from '
|
|
4
|
+
import { PubSub } from '../symbiote.js';
|
|
5
5
|
import { uploadFileGroup } from '@uploadcare/upload-client';
|
|
6
6
|
import { calculateMaxCenteredCropFrame } from '../blocks/CloudImageEditor/src/crop-utils.js';
|
|
7
7
|
import { parseCropPreset } from '../blocks/CloudImageEditor/src/lib/parseCropPreset.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { ActivityBlock } from './ActivityBlock.js';
|
|
3
3
|
|
|
4
|
-
import { PubSub } from '
|
|
4
|
+
import { PubSub } from '../symbiote.js';
|
|
5
5
|
import { EventType } from '../blocks/UploadCtxProvider/EventEmitter.js';
|
|
6
6
|
import { UploadSource } from '../blocks/utils/UploadSource.js';
|
|
7
7
|
import { serializeCsv } from '../blocks/utils/comma-separated.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from '
|
|
1
|
+
import { html } from '../../symbiote.js';
|
|
2
2
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
3
3
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
4
4
|
import { UploadSource } from '../utils/UploadSource.js';
|
|
@@ -216,19 +216,19 @@ export class CameraSource extends UploaderBlock {
|
|
|
216
216
|
|
|
217
217
|
CameraSource.template = html`
|
|
218
218
|
<uc-activity-header>
|
|
219
|
-
<button type="button" class="uc-mini-btn"
|
|
219
|
+
<button type="button" class="uc-mini-btn" set="onclick: *historyBack">
|
|
220
220
|
<uc-icon name="back"></uc-icon>
|
|
221
221
|
</button>
|
|
222
|
-
<div
|
|
222
|
+
<div set="@hidden: !cameraSelectHidden">
|
|
223
223
|
<uc-icon name="camera"></uc-icon>
|
|
224
224
|
<span l10n="caption-camera"></span>
|
|
225
225
|
</div>
|
|
226
226
|
<uc-select
|
|
227
227
|
class="uc-camera-select"
|
|
228
|
-
|
|
228
|
+
set="options: cameraSelectOptions; @hidden: cameraSelectHidden; onchange: onCameraSelectChange"
|
|
229
229
|
>
|
|
230
230
|
</uc-select>
|
|
231
|
-
<button type="button" class="uc-mini-btn uc-close-btn"
|
|
231
|
+
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *closeModal">
|
|
232
232
|
<uc-icon name="close"></uc-icon>
|
|
233
233
|
</button>
|
|
234
234
|
</uc-activity-header>
|
|
@@ -236,18 +236,18 @@ CameraSource.template = html`
|
|
|
236
236
|
<video
|
|
237
237
|
autoplay
|
|
238
238
|
playsinline
|
|
239
|
-
|
|
239
|
+
set="srcObject: video; style.transform: videoTransformCss; @hidden: videoHidden"
|
|
240
240
|
ref="video"
|
|
241
241
|
></video>
|
|
242
|
-
<div class="uc-message-box"
|
|
242
|
+
<div class="uc-message-box" set="@hidden: messageHidden">
|
|
243
243
|
<span l10n="l10nMessage"></span>
|
|
244
244
|
<button
|
|
245
245
|
type="button"
|
|
246
|
-
|
|
246
|
+
set="onclick: onRequestPermissions; @hidden: requestBtnHidden"
|
|
247
247
|
l10n="camera-permissions-request"
|
|
248
248
|
></button>
|
|
249
249
|
</div>
|
|
250
|
-
<button type="button" class="uc-shot-btn"
|
|
250
|
+
<button type="button" class="uc-shot-btn" set="onclick: onShot; @disabled: shotBtnDisabled">
|
|
251
251
|
<uc-icon name="camera"></uc-icon>
|
|
252
252
|
</button>
|
|
253
253
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from '
|
|
1
|
+
import { html } from '../../../symbiote.js';
|
|
2
2
|
import { classNames } from './lib/classNames.js';
|
|
3
3
|
import { Block } from '../../../abstract/Block.js';
|
|
4
4
|
|
|
@@ -39,7 +39,7 @@ export class EditorButtonControl extends Block {
|
|
|
39
39
|
|
|
40
40
|
EditorButtonControl.template = html`
|
|
41
41
|
<button type="button" role="option">
|
|
42
|
-
<uc-icon
|
|
42
|
+
<uc-icon set="@name: icon;"></uc-icon>
|
|
43
43
|
<div class="uc-title" ref="title-el">{{title}}</div>
|
|
44
44
|
</button>
|
|
45
45
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { html } from '
|
|
2
|
+
import { html } from '../../../symbiote.js';
|
|
3
3
|
import { createCdnUrl, createCdnUrlModifiers } from '../../../utils/cdn-utils.js';
|
|
4
4
|
import { EditorButtonControl } from './EditorButtonControl.js';
|
|
5
5
|
import { FAKE_ORIGINAL_FILTER } from './EditorSlider.js';
|
|
@@ -156,6 +156,6 @@ export class EditorFilterControl extends EditorButtonControl {
|
|
|
156
156
|
EditorFilterControl.template = html`
|
|
157
157
|
<button type="button" role="option">
|
|
158
158
|
<div class="uc-preview" ref="preview-el"></div>
|
|
159
|
-
<uc-icon ref="icon-el"
|
|
159
|
+
<uc-icon ref="icon-el" set="@name: icon;"></uc-icon>
|
|
160
160
|
</button>
|
|
161
161
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Block } from '../../../abstract/Block.js';
|
|
2
|
-
import { html } from '
|
|
2
|
+
import { html } from '../../../symbiote.js';
|
|
3
3
|
import { COLOR_OPERATIONS_CONFIG } from './toolbar-constants.js';
|
|
4
4
|
|
|
5
5
|
const ControlType = {
|
|
@@ -114,6 +114,6 @@ export class EditorSlider extends Block {
|
|
|
114
114
|
EditorSlider.template = html`
|
|
115
115
|
<uc-slider-ui
|
|
116
116
|
ref="slider-el"
|
|
117
|
-
|
|
117
|
+
set="disabled: disabled; min: min; max: max; defaultValue: defaultValue; zero: zero; onInput: on.input;"
|
|
118
118
|
></uc-slider-ui>
|
|
119
119
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { html } from '
|
|
2
|
+
import { html } from '../../../symbiote.js';
|
|
3
3
|
import { debounce } from '../../utils/debounce.js';
|
|
4
4
|
import { Block } from '../../../abstract/Block.js';
|
|
5
5
|
import { EditorCropButtonControl } from './EditorCropButtonControl.js';
|
|
@@ -22,14 +22,14 @@ function renderTabToggle(id) {
|
|
|
22
22
|
return /* HTML */ `
|
|
23
23
|
<uc-presence-toggle
|
|
24
24
|
class="uc-tab-toggle"
|
|
25
|
-
|
|
25
|
+
set="visible: presence.tabToggle.${id}; styles: presence.tabToggleStyles;"
|
|
26
26
|
>
|
|
27
27
|
<uc-btn-ui
|
|
28
28
|
theme="tab"
|
|
29
29
|
ref="tab-toggle-${id}"
|
|
30
30
|
data-id="${id}"
|
|
31
31
|
icon="${id}"
|
|
32
|
-
|
|
32
|
+
set="onclick: on.clickTab; aria-role:tab_role; aria-controls:tab_${id}"
|
|
33
33
|
>
|
|
34
34
|
</uc-btn-ui>
|
|
35
35
|
</uc-presence-toggle>
|
|
@@ -42,7 +42,7 @@ function renderTabContent(id) {
|
|
|
42
42
|
<uc-presence-toggle
|
|
43
43
|
id="tab_${id}"
|
|
44
44
|
class="uc-tab-content"
|
|
45
|
-
|
|
45
|
+
set="visible: presence.tabContent.${id}; styles: presence.tabContentStyles"
|
|
46
46
|
>
|
|
47
47
|
<uc-editor-scroller hidden-scrollbar>
|
|
48
48
|
<div class="uc-controls-list_align">
|
|
@@ -401,7 +401,7 @@ export class EditorToolbar extends Block {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
EditorToolbar.template = html`
|
|
404
|
-
<uc-line-loader-ui
|
|
404
|
+
<uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>
|
|
405
405
|
<div class="uc-info-tooltip_container">
|
|
406
406
|
<div class="uc-info-tooltip_wrapper">
|
|
407
407
|
<div ref="tooltip-el" class="uc-info-tooltip uc-info-tooltip_hidden">{{*operationTooltip}}</div>
|
|
@@ -411,31 +411,31 @@ EditorToolbar.template = html`
|
|
|
411
411
|
<uc-presence-toggle
|
|
412
412
|
role="tablist"
|
|
413
413
|
class="uc-sub-toolbar"
|
|
414
|
-
|
|
414
|
+
set="visible: presence.mainToolbar; styles: presence.subTopToolbarStyles"
|
|
415
415
|
>
|
|
416
416
|
<div class="uc-tab-content-row">${ALL_TABS.map(renderTabContent).join('')}</div>
|
|
417
417
|
<div class="uc-controls-row">
|
|
418
418
|
<uc-presence-toggle
|
|
419
419
|
class="uc-tab-toggles"
|
|
420
|
-
|
|
420
|
+
set="visible: presence.tabToggles; styles: presence.tabTogglesStyles"
|
|
421
421
|
>
|
|
422
422
|
<div ref="tabs-indicator" class="uc-tab-toggles_indicator"></div>
|
|
423
423
|
${ALL_TABS.map(renderTabToggle).join('')}
|
|
424
424
|
</uc-presence-toggle>
|
|
425
|
-
<uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax"
|
|
426
|
-
<uc-btn-ui theme="primary-icon" icon="done"
|
|
425
|
+
<uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel"> </uc-btn-ui>
|
|
426
|
+
<uc-btn-ui theme="primary-icon" icon="done" set="onclick: on.apply"> </uc-btn-ui>
|
|
427
427
|
</div>
|
|
428
428
|
</uc-presence-toggle>
|
|
429
429
|
<uc-presence-toggle
|
|
430
430
|
class="uc-sub-toolbar"
|
|
431
|
-
|
|
431
|
+
set="visible: presence.subToolbar; styles: presence.subBottomToolbarStyles"
|
|
432
432
|
>
|
|
433
433
|
<div class="uc-slider">
|
|
434
434
|
<uc-editor-slider ref="slider-el"></uc-editor-slider>
|
|
435
435
|
</div>
|
|
436
436
|
<div class="uc-controls-row">
|
|
437
|
-
<uc-btn-ui theme="secondary"
|
|
438
|
-
<uc-btn-ui theme="primary"
|
|
437
|
+
<uc-btn-ui theme="secondary" set="onclick: on.cancelSlider;" l10n="@text:cancel"> </uc-btn-ui>
|
|
438
|
+
<uc-btn-ui theme="primary" set="onclick: on.applySlider;" l10n="@text:apply"> </uc-btn-ui>
|
|
439
439
|
</div>
|
|
440
440
|
</uc-presence-toggle>
|
|
441
441
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from '
|
|
1
|
+
import { html } from '../../../../../symbiote.js';
|
|
2
2
|
import { Block } from '../../../../../abstract/Block.js';
|
|
3
3
|
import { classNames } from '../../lib/classNames.js';
|
|
4
4
|
|
|
@@ -83,8 +83,8 @@ export class BtnUi extends Block {
|
|
|
83
83
|
BtnUi.bindAttributes({ text: 'text', icon: 'icon', reverse: 'reverse', theme: 'theme' });
|
|
84
84
|
|
|
85
85
|
BtnUi.template = html`
|
|
86
|
-
<button type="button"
|
|
87
|
-
<uc-icon
|
|
86
|
+
<button type="button" set="@role:aria-role; @aria-controls: aria-controls">
|
|
87
|
+
<uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>
|
|
88
88
|
<div class="uc-text">{{text}}</div>
|
|
89
89
|
</button>
|
|
90
90
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from '
|
|
1
|
+
import { html } from '../../../../../symbiote.js';
|
|
2
2
|
import { Block } from '../../../../../abstract/Block.js';
|
|
3
3
|
|
|
4
4
|
export class SliderUi extends Block {
|
|
@@ -174,6 +174,6 @@ SliderUi.template = html`
|
|
|
174
174
|
class="uc-input"
|
|
175
175
|
type="range"
|
|
176
176
|
ref="input-el"
|
|
177
|
-
|
|
177
|
+
set="oninput: on.sliderInput; onchange: on.sliderChange; @min: min; @max: max; @value: defaultValue;"
|
|
178
178
|
/>
|
|
179
179
|
`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { html } from '
|
|
1
|
+
import { html } from '../../../symbiote.js';
|
|
2
2
|
import { TRANSPARENT_PIXEL_SRC } from '../../../utils/transparentPixelSrc.js';
|
|
3
3
|
import svgIconsSprite from './svg-sprite.js';
|
|
4
4
|
|
|
5
5
|
export const TEMPLATE = html`
|
|
6
6
|
${svgIconsSprite}
|
|
7
7
|
<div class="uc-wrapper uc-wrapper_desktop">
|
|
8
|
-
<uc-presence-toggle class="uc-network_problems_splash"
|
|
8
|
+
<uc-presence-toggle class="uc-network_problems_splash" set="visible: presence.networkProblems;">
|
|
9
9
|
<div class="uc-network_problems_content">
|
|
10
10
|
<div class="uc-network_problems_icon">
|
|
11
11
|
<uc-icon name="sad"></uc-icon>
|
|
@@ -13,7 +13,7 @@ export const TEMPLATE = html`
|
|
|
13
13
|
<div class="uc-network_problems_text">Network error</div>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="uc-network_problems_footer">
|
|
16
|
-
<uc-btn-ui theme="primary" text="Retry"
|
|
16
|
+
<uc-btn-ui theme="primary" text="Retry" set="onclick: *on.retryNetwork"></uc-btn-ui>
|
|
17
17
|
</div>
|
|
18
18
|
</uc-presence-toggle>
|
|
19
19
|
<div class="uc-viewport">
|
|
@@ -28,7 +28,7 @@ export const TEMPLATE = html`
|
|
|
28
28
|
<div class="uc-info_pan">{{msg}}</div>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="uc-toolbar">
|
|
31
|
-
<uc-line-loader-ui
|
|
31
|
+
<uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>
|
|
32
32
|
<div class="uc-toolbar_content uc-toolbar_content__editor">
|
|
33
33
|
<uc-editor-toolbar></uc-editor-toolbar>
|
|
34
34
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAMA;IAEE,iCAAuD;IAKrD;;;;;;
|
|
1
|
+
{"version":3,"file":"CloudImageEditorActivity.d.ts","sourceRoot":"","sources":["CloudImageEditorActivity.js"],"names":[],"mappings":"AAMA;IAEE,iCAAuD;IAKrD;;;;;;oCAW8B,gBAAU;mCAGoB,gBAAU;6BAInE,2BAEA;;wCAOH,wCAAyB;;;;;;MAxBxB;IAeC,mEAAkB;IAsBtB,qFAAqF;IACrF,eADY,WAAW,CAAC,OAAO,kCAAkC,EAAE,WAAW,CAAC,QAW9E;IAED,qBAEC;IAED,oBAqCC;IAJC,8BAAoB;IAEpB,eAAe;IACf,kBAAyB;IAG3B,sBAGC;CACF;8BA9G6B,iCAAiC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { DICT } from '
|
|
2
|
+
import { DICT } from '../../symbiote.js';
|
|
3
3
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
4
4
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
5
5
|
import { CloudImageEditorBlock } from '../CloudImageEditor/index.js';
|
|
@@ -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;;;;;;;;;;;;;oCAAE,gBAAU;mCAGA,gBACb;6BAGO,2BACI;;wCASK,wCAA2B;;;;;;MAPzC;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 { PubSub, html } from '
|
|
3
|
+
import { PubSub, html } from '../../symbiote.js';
|
|
4
4
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
5
5
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
6
6
|
import { stringToArray } from '../../utils/stringToArray.js';
|
|
@@ -249,8 +249,8 @@ export class DropArea extends UploaderBlock {
|
|
|
249
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":"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;;;;;;;;;;;;oCApBG,gBAAU;mCAMhB,gBAAS;6BAKY,2BAA2B;;wCAIZ,wCAE1B;;;;;;MAuBN;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,MAAM,CAAC,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, html } from '
|
|
3
|
+
import { create, html } from '../../symbiote.js';
|
|
4
4
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
5
5
|
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
6
6
|
import { stringToArray } from '../../utils/stringToArray.js';
|
|
@@ -240,27 +240,27 @@ export class ExternalSource extends UploaderBlock {
|
|
|
240
240
|
|
|
241
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>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"AAmBA;IAIE,eAAe;IACf,mBAAuB;IACvB;;;OAGG;IACH,eAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gCAA4E;IAC5E,eAAe;IACf,iCAA0E;IAE1E,eAAe;IACf,sBAAsB;IAKpB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"AAmBA;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;;;;;;;;;;;;;;;;;;;;;oCA9BF,gBAAQ;mCAIV,gBAEK;6BAEW,2BAGd;;wCAMa,wCACQ;;;;;;MA2ClB;IAGH,eASC;IAED;;;OAGG;IACH,0BAaC;IAED,eAAe;IACf,wBAgBC;IAED,eAAe;IACf,2BAsCC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;OAGG;IACH,uBAkDC;IAsCD,wEAAwE;IACxE,oBADY,CAAC,OAAO,aAAa,EAAE,MAAM,OAAO,aAAa,CAAC,QAsB7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAqFC;CACF;;;;;8BAla6B,iCAAiC;AAO/D;;;;;GAKG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { html } from '
|
|
2
|
+
import { html } from '../../symbiote.js';
|
|
3
3
|
import { CancelError, uploadFile } from '@uploadcare/upload-client';
|
|
4
4
|
import { shrinkFile } from '@uploadcare/image-shrink';
|
|
5
5
|
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
@@ -424,22 +424,22 @@ export class FileItem extends UploaderBlock {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
FileItem.template = html`
|
|
427
|
-
<div class="uc-inner"
|
|
428
|
-
<div class="uc-thumb"
|
|
427
|
+
<div class="uc-inner" set="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">
|
|
428
|
+
<div class="uc-thumb" set="style.backgroundImage: thumbUrl">
|
|
429
429
|
<div class="uc-badge">
|
|
430
|
-
<uc-icon
|
|
430
|
+
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
431
431
|
</div>
|
|
432
432
|
</div>
|
|
433
433
|
<div class="uc-file-name-wrapper">
|
|
434
|
-
<span class="uc-file-name"
|
|
435
|
-
<span class="uc-file-error"
|
|
434
|
+
<span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
|
|
435
|
+
<span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
|
|
436
436
|
</div>
|
|
437
437
|
<div class="uc-file-actions">
|
|
438
438
|
<button
|
|
439
439
|
type="button"
|
|
440
440
|
l10n="@title:file-item-edit-button"
|
|
441
441
|
class="uc-edit-btn uc-mini-btn"
|
|
442
|
-
|
|
442
|
+
set="onclick: onEdit; @hidden: !isEditable"
|
|
443
443
|
>
|
|
444
444
|
<uc-icon name="edit-file"></uc-icon>
|
|
445
445
|
</button>
|
|
@@ -447,15 +447,15 @@ FileItem.template = html`
|
|
|
447
447
|
type="button"
|
|
448
448
|
l10n="@title:file-item-remove-button"
|
|
449
449
|
class="uc-remove-btn uc-mini-btn"
|
|
450
|
-
|
|
450
|
+
set="onclick: onRemove;"
|
|
451
451
|
>
|
|
452
452
|
<uc-icon name="remove-file"></uc-icon>
|
|
453
453
|
</button>
|
|
454
|
-
<button type="button" class="uc-upload-btn uc-mini-btn"
|
|
454
|
+
<button type="button" class="uc-upload-btn uc-mini-btn" set="onclick: onUpload;">
|
|
455
455
|
<uc-icon name="upload"></uc-icon>
|
|
456
456
|
</button>
|
|
457
457
|
</div>
|
|
458
|
-
<uc-progress-bar class="uc-progress-bar"
|
|
458
|
+
<uc-progress-bar class="uc-progress-bar" set="value: progressValue; visible: progressVisible;"> </uc-progress-bar>
|
|
459
459
|
</div>
|
|
460
460
|
`;
|
|
461
461
|
FileItem.activeInstances = new Set();
|
package/blocks/Icon/Icon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { html } from '
|
|
2
|
+
import { html } from '../../symbiote.js';
|
|
3
3
|
import { Block } from '../../abstract/Block.js';
|
|
4
4
|
|
|
5
5
|
export class Icon extends Block {
|
|
@@ -33,7 +33,7 @@ export class Icon extends Block {
|
|
|
33
33
|
|
|
34
34
|
Icon.template = html`
|
|
35
35
|
<svg ref="svg" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
-
<use
|
|
36
|
+
<use set="@href: href;"></use>
|
|
37
37
|
</svg>
|
|
38
38
|
`;
|
|
39
39
|
|
|
@@ -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 { Symbiote } from '
|
|
30
|
+
import { Symbiote } from '../../symbiote.js';
|
|
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;;IAnFD,cAAqB;IAErB;;;OAGG;IACH,iBAFa,GAAG,CAIf;IAED,qDAAqD;IACrD,wBAIC;IAED;;;OAGG;IACH,yBAFW,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,QAW5B;IAED,0BAEC;IAED,8BAMC;IAED;;;OAGG;IACH,qBAHW,WAAW,SACX,MAAM,IAAI,QAsBpB;IAfC,eAAe;IACf,qBAOQ;IAGN,eAAe;IACf,kBAA0B;IAoB9B,oEAIC;CACF;yBArGgC,
|
|
1
|
+
{"version":3,"file":"ImgConfig.d.ts","sourceRoot":"","sources":["ImgConfig.js"],"names":[],"mappings":"AAUA;IAkFE,0CAEC;;IAnFD,cAAqB;IAErB;;;OAGG;IACH,iBAFa,GAAG,CAIf;IAED,qDAAqD;IACrD,wBAIC;IAED;;;OAGG;IACH,yBAFW,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,QAW5B;IAED,0BAEC;IAED,8BAMC;IAED;;;OAGG;IACH,qBAHW,WAAW,SACX,MAAM,IAAI,QAsBpB;IAfC,eAAe;IACf,qBAOQ;IAGN,eAAe;IACf,kBAA0B;IAoB9B,oEAIC;CACF;yBArGgC,mBAAmB"}
|
package/blocks/Img/ImgConfig.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Symbiote, PubSub } from '
|
|
1
|
+
import { Symbiote, PubSub } from '../../symbiote.js';
|
|
2
2
|
import { PROPS_MAP } from './props-map.js';
|
|
3
3
|
import { CSS_PREF } from './configurations.js';
|
|
4
4
|
import { PACKAGE_NAME, PACKAGE_VERSION } from '../../env.js';
|