@uploadcare/file-uploader 1.25.0-alpha.3 → 1.25.0-alpha.4
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/dist/abstract/loadFileUploaderFrom.js +4 -79
- package/dist/env.js +4 -33
- package/dist/index.css +5 -2664
- package/dist/index.d.ts +925 -926
- package/dist/index.js +6 -13630
- package/dist/index.layered.css +4 -2720
- package/dist/index.ssr.js +34 -29
- package/dist/locales/file-uploader/ar.js +4 -165
- package/dist/locales/file-uploader/az.js +4 -157
- package/dist/locales/file-uploader/ca.js +4 -159
- package/dist/locales/file-uploader/cs.js +4 -161
- package/dist/locales/file-uploader/da.js +4 -157
- package/dist/locales/file-uploader/de.js +4 -157
- package/dist/locales/file-uploader/el.js +4 -157
- package/dist/locales/file-uploader/en.js +4 -157
- package/dist/locales/file-uploader/es.js +4 -159
- package/dist/locales/file-uploader/et.js +4 -157
- package/dist/locales/file-uploader/fi.js +4 -157
- package/dist/locales/file-uploader/fr.js +4 -159
- package/dist/locales/file-uploader/he.js +4 -159
- package/dist/locales/file-uploader/hy.js +4 -157
- package/dist/locales/file-uploader/is.js +4 -157
- package/dist/locales/file-uploader/it.js +4 -159
- package/dist/locales/file-uploader/ja.js +4 -157
- package/dist/locales/file-uploader/ka.js +4 -157
- package/dist/locales/file-uploader/kk.js +4 -157
- package/dist/locales/file-uploader/ko.js +4 -157
- package/dist/locales/file-uploader/lv.js +4 -159
- package/dist/locales/file-uploader/nb.js +4 -157
- package/dist/locales/file-uploader/nl.js +4 -157
- package/dist/locales/file-uploader/pl.js +4 -161
- package/dist/locales/file-uploader/pt.js +4 -159
- package/dist/locales/file-uploader/ro.js +4 -159
- package/dist/locales/file-uploader/ru.js +4 -161
- package/dist/locales/file-uploader/sk.js +4 -161
- package/dist/locales/file-uploader/sr.js +4 -159
- package/dist/locales/file-uploader/sv.js +4 -157
- package/dist/locales/file-uploader/tr.js +4 -157
- package/dist/locales/file-uploader/uk.js +4 -161
- package/dist/locales/file-uploader/vi.js +4 -157
- package/dist/locales/file-uploader/zh-TW.js +4 -157
- package/dist/locales/file-uploader/zh.js +4 -157
- package/package.json +19 -18
- package/types/jsx.d.ts +75 -48
- package/web/file-uploader.iife.min.d.ts +927 -928
- package/web/file-uploader.iife.min.js +6 -31
- package/web/file-uploader.iife.min.js.LEGAL.txt +71 -0
- package/web/file-uploader.min.d.ts +927 -928
- package/web/file-uploader.min.js +5 -29
- package/web/file-uploader.min.js.LEGAL.txt +71 -0
- package/web/uc-basic.layered.min.css +4 -23
- package/web/uc-basic.min.css +4 -23
- package/web/uc-cloud-image-editor.layered.min.css +4 -23
- package/web/uc-cloud-image-editor.min.css +4 -23
- package/web/uc-cloud-image-editor.min.d.ts +489 -494
- package/web/uc-cloud-image-editor.min.js +5 -29
- package/web/uc-cloud-image-editor.min.js.LEGAL.txt +70 -0
- package/web/uc-file-uploader-inline.layered.min.css +4 -23
- package/web/uc-file-uploader-inline.min.css +4 -23
- package/web/uc-file-uploader-inline.min.d.ts +927 -928
- package/web/uc-file-uploader-inline.min.js +5 -29
- package/web/uc-file-uploader-inline.min.js.LEGAL.txt +71 -0
- package/web/uc-file-uploader-minimal.layered.min.css +4 -23
- package/web/uc-file-uploader-minimal.min.css +4 -23
- package/web/uc-file-uploader-minimal.min.d.ts +927 -928
- package/web/uc-file-uploader-minimal.min.js +5 -29
- package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +71 -0
- package/web/uc-file-uploader-regular.layered.min.css +4 -23
- package/web/uc-file-uploader-regular.min.css +4 -23
- package/web/uc-file-uploader-regular.min.d.ts +927 -928
- package/web/uc-file-uploader-regular.min.js +5 -29
- package/web/uc-file-uploader-regular.min.js.LEGAL.txt +71 -0
- package/web/uc-img.min.d.ts +28 -38
- package/web/uc-img.min.js +5 -25
- package/web/uc-img.min.js.LEGAL.txt +24 -0
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
-
import {
|
|
3
|
-
import { PubSub } from '@symbiotejs/symbiote';
|
|
4
|
-
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
2
|
+
import { PropertyValues, LitElement, TemplateResult } from 'lit';
|
|
5
3
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
6
4
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
7
|
-
import {
|
|
5
|
+
import { Metadata, UploadcareFile, UploadError, NetworkError, UploadcareGroup, FileFromOptions, Queue } from '@uploadcare/upload-client';
|
|
8
6
|
import { Ref } from 'lit/directives/ref.js';
|
|
9
7
|
|
|
10
|
-
type Constructor
|
|
8
|
+
type Constructor<T = unknown> = new (...args: any[]) => T;
|
|
9
|
+
|
|
10
|
+
type SymbioteStateBag<T extends Record<string, unknown>> = T;
|
|
11
|
+
/**
|
|
12
|
+
* Interface for components using SymbioteMixin
|
|
13
|
+
*/
|
|
14
|
+
declare class SymbioteComponent<TState extends Record<string, unknown> = Record<string, unknown>> {
|
|
15
|
+
$: SymbioteStateBag<TState>;
|
|
16
|
+
sub<TKey extends keyof TState>(key: TKey, callback: (value: TState[TKey]) => void, init?: boolean): () => void;
|
|
17
|
+
pub<TKey extends keyof TState>(key: TKey, value: TState[TKey]): void;
|
|
18
|
+
set$<T extends {
|
|
19
|
+
[K in keyof T]: K extends keyof TState ? TState[K] : never;
|
|
20
|
+
}>(obj: T): void;
|
|
21
|
+
has<TKey extends keyof TState>(key: TKey): boolean;
|
|
22
|
+
add<TKey extends keyof TState>(key: TKey, val: TState[TKey], rewrite?: boolean): void;
|
|
23
|
+
add$<T extends {
|
|
24
|
+
[K in keyof T]: K extends keyof TState ? TState[K] : never;
|
|
25
|
+
}>(obj: T, rewrite?: boolean): void;
|
|
26
|
+
initCallback(): void;
|
|
27
|
+
ctxName: string;
|
|
28
|
+
ctxOwner: boolean;
|
|
29
|
+
}
|
|
11
30
|
|
|
12
31
|
declare class A11y {
|
|
13
32
|
private _destroyKeyUX;
|
|
@@ -26,15 +45,11 @@ declare class LocaleManager {
|
|
|
26
45
|
declare class Modal extends LitBlock {
|
|
27
46
|
static styleAttrs: string[];
|
|
28
47
|
private _mouseDownTarget;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
_closeDialog: () => void;
|
|
35
|
-
_handleDialogClose: () => void;
|
|
36
|
-
_handleDialogMouseDown: (e: MouseEvent) => void;
|
|
37
|
-
_handleDialogMouseUp: (e: MouseEvent) => void;
|
|
48
|
+
private _dialogEl;
|
|
49
|
+
private _closeDialog;
|
|
50
|
+
private _handleDialogClose;
|
|
51
|
+
private _handleDialogMouseDown;
|
|
52
|
+
private _handleDialogMouseUp;
|
|
38
53
|
show(): void;
|
|
39
54
|
hide(): void;
|
|
40
55
|
private _handleModalOpen;
|
|
@@ -42,12 +57,40 @@ declare class Modal extends LitBlock {
|
|
|
42
57
|
private _handleModalCloseAll;
|
|
43
58
|
initCallback(): void;
|
|
44
59
|
disconnectedCallback(): void;
|
|
45
|
-
private
|
|
60
|
+
private _handleDialogRef;
|
|
46
61
|
render(): lit_html.TemplateResult<1>;
|
|
47
62
|
}
|
|
48
63
|
|
|
64
|
+
type Subscription = {
|
|
65
|
+
remove: () => void;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type Uid = string & {
|
|
69
|
+
__uid: true;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
declare function defineComponents(blockExports: Record<string, any>): void;
|
|
73
|
+
|
|
74
|
+
declare const UC_WINDOW_KEY = "UC";
|
|
75
|
+
type IndexModule = Record<string, any>;
|
|
76
|
+
declare global {
|
|
77
|
+
interface Window {
|
|
78
|
+
[UC_WINDOW_KEY]?: IndexModule;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
49
82
|
type LocaleDefinition = Record<string, string>;
|
|
50
83
|
|
|
84
|
+
declare class Icon extends LitBlock {
|
|
85
|
+
name: string;
|
|
86
|
+
private _resolvedHref;
|
|
87
|
+
private _iconHrefResolver;
|
|
88
|
+
initCallback(): void;
|
|
89
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
90
|
+
private _updateResolvedHref;
|
|
91
|
+
render(): lit_html.TemplateResult<1>;
|
|
92
|
+
}
|
|
93
|
+
|
|
51
94
|
declare const InternalEventType: Readonly<{
|
|
52
95
|
readonly INIT_SOLUTION: "init-solution";
|
|
53
96
|
readonly CHANGE_CONFIG: "change-config";
|
|
@@ -108,8 +151,7 @@ declare class EventEmitter {
|
|
|
108
151
|
private _targets;
|
|
109
152
|
private _debugPrint;
|
|
110
153
|
constructor(debugPrint: (...args: unknown[]) => void);
|
|
111
|
-
bindTarget(target: LitBlock): void;
|
|
112
|
-
unbindTarget(target: LitBlock): void;
|
|
154
|
+
bindTarget(target: LitBlock): () => void;
|
|
113
155
|
private _dispatch;
|
|
114
156
|
emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
|
|
115
157
|
debounce?: TDebounce;
|
|
@@ -118,163 +160,18 @@ declare class EventEmitter {
|
|
|
118
160
|
|
|
119
161
|
declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(uploaderBlock: LitUploaderBlock): OutputCollectionState<TCollectionStatus, TGroupFlag>;
|
|
120
162
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
type ExtractKeysFromSchema<T extends TypedSchema> = Extract<keyof T, string>;
|
|
132
|
-
declare class TypedData<T extends TypedSchema> {
|
|
133
|
-
private __typedSchema;
|
|
134
|
-
private __ctxId;
|
|
135
|
-
private __schema;
|
|
136
|
-
private __data;
|
|
137
|
-
constructor(typedSchema: T, ctxName?: string);
|
|
138
|
-
get uid(): string;
|
|
139
|
-
setValue<K extends ExtractKeysFromSchema<T>>(prop: K, value: ExtractDataFromSchema<T>[K]): void;
|
|
140
|
-
setMultipleValues(updObj: Partial<ExtractDataFromSchema<T>>): void;
|
|
141
|
-
getValue<K extends ExtractKeysFromSchema<T>>(prop: K): ExtractDataFromSchema<T>[K];
|
|
142
|
-
subscribe<K extends ExtractKeysFromSchema<T>>(prop: K, handler: (newVal: ExtractDataFromSchema<T>[K]) => void): {
|
|
143
|
-
remove: () => void;
|
|
144
|
-
callback: (val: unknown) => void;
|
|
145
|
-
};
|
|
163
|
+
declare class TypedData<T extends Record<string, unknown>> {
|
|
164
|
+
private _ctxId;
|
|
165
|
+
private _data;
|
|
166
|
+
constructor(initialValue: T);
|
|
167
|
+
get uid(): Uid;
|
|
168
|
+
setValue<K extends keyof T>(prop: K, value: T[K]): void;
|
|
169
|
+
setMultipleValues(updObj: Partial<T>): void;
|
|
170
|
+
getValue<K extends keyof T>(prop: K): T[K];
|
|
171
|
+
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): Subscription;
|
|
146
172
|
remove(): void;
|
|
147
173
|
}
|
|
148
174
|
|
|
149
|
-
declare const uploadEntrySchema: Readonly<{
|
|
150
|
-
file: Readonly<{
|
|
151
|
-
type: {
|
|
152
|
-
new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
|
|
153
|
-
prototype: File;
|
|
154
|
-
};
|
|
155
|
-
value: null;
|
|
156
|
-
nullable: true;
|
|
157
|
-
}>;
|
|
158
|
-
externalUrl: Readonly<{
|
|
159
|
-
type: StringConstructor;
|
|
160
|
-
value: null;
|
|
161
|
-
nullable: true;
|
|
162
|
-
}>;
|
|
163
|
-
fileName: Readonly<{
|
|
164
|
-
type: StringConstructor;
|
|
165
|
-
value: null;
|
|
166
|
-
nullable: true;
|
|
167
|
-
}>;
|
|
168
|
-
fileSize: Readonly<{
|
|
169
|
-
type: NumberConstructor;
|
|
170
|
-
value: null;
|
|
171
|
-
nullable: true;
|
|
172
|
-
}>;
|
|
173
|
-
lastModified: Readonly<{
|
|
174
|
-
type: NumberConstructor;
|
|
175
|
-
value: number;
|
|
176
|
-
}>;
|
|
177
|
-
uploadProgress: Readonly<{
|
|
178
|
-
type: NumberConstructor;
|
|
179
|
-
value: 0;
|
|
180
|
-
}>;
|
|
181
|
-
uuid: Readonly<{
|
|
182
|
-
type: StringConstructor;
|
|
183
|
-
value: null;
|
|
184
|
-
nullable: true;
|
|
185
|
-
}>;
|
|
186
|
-
isImage: Readonly<{
|
|
187
|
-
type: BooleanConstructor;
|
|
188
|
-
value: false;
|
|
189
|
-
}>;
|
|
190
|
-
mimeType: Readonly<{
|
|
191
|
-
type: StringConstructor;
|
|
192
|
-
value: null;
|
|
193
|
-
nullable: true;
|
|
194
|
-
}>;
|
|
195
|
-
ctxName: Readonly<{
|
|
196
|
-
type: StringConstructor;
|
|
197
|
-
value: null;
|
|
198
|
-
nullable: true;
|
|
199
|
-
}>;
|
|
200
|
-
cdnUrl: Readonly<{
|
|
201
|
-
type: StringConstructor;
|
|
202
|
-
value: null;
|
|
203
|
-
nullable: true;
|
|
204
|
-
}>;
|
|
205
|
-
cdnUrlModifiers: Readonly<{
|
|
206
|
-
type: StringConstructor;
|
|
207
|
-
value: null;
|
|
208
|
-
nullable: true;
|
|
209
|
-
}>;
|
|
210
|
-
fileInfo: Readonly<{
|
|
211
|
-
type: typeof UploadcareFile;
|
|
212
|
-
value: null;
|
|
213
|
-
nullable: true;
|
|
214
|
-
}>;
|
|
215
|
-
isUploading: Readonly<{
|
|
216
|
-
type: BooleanConstructor;
|
|
217
|
-
value: false;
|
|
218
|
-
}>;
|
|
219
|
-
abortController: Readonly<{
|
|
220
|
-
type: {
|
|
221
|
-
new (): AbortController;
|
|
222
|
-
prototype: AbortController;
|
|
223
|
-
};
|
|
224
|
-
value: null;
|
|
225
|
-
nullable: true;
|
|
226
|
-
}>;
|
|
227
|
-
thumbUrl: Readonly<{
|
|
228
|
-
type: StringConstructor;
|
|
229
|
-
value: null;
|
|
230
|
-
nullable: true;
|
|
231
|
-
}>;
|
|
232
|
-
silent: Readonly<{
|
|
233
|
-
type: BooleanConstructor;
|
|
234
|
-
value: false;
|
|
235
|
-
}>;
|
|
236
|
-
source: Readonly<{
|
|
237
|
-
type: StringConstructor;
|
|
238
|
-
value: null;
|
|
239
|
-
nullable: true;
|
|
240
|
-
}>;
|
|
241
|
-
fullPath: Readonly<{
|
|
242
|
-
type: StringConstructor;
|
|
243
|
-
value: null;
|
|
244
|
-
nullable: true;
|
|
245
|
-
}>;
|
|
246
|
-
metadata: Readonly<{
|
|
247
|
-
type: ObjectConstructor;
|
|
248
|
-
value: null;
|
|
249
|
-
nullable: true;
|
|
250
|
-
}>;
|
|
251
|
-
errors: Readonly<{
|
|
252
|
-
type: ArrayConstructor;
|
|
253
|
-
value: OutputErrorFile[];
|
|
254
|
-
}>;
|
|
255
|
-
uploadError: Readonly<{
|
|
256
|
-
type: ErrorConstructor;
|
|
257
|
-
value: null;
|
|
258
|
-
nullable: true;
|
|
259
|
-
}>;
|
|
260
|
-
isRemoved: Readonly<{
|
|
261
|
-
type: BooleanConstructor;
|
|
262
|
-
value: false;
|
|
263
|
-
}>;
|
|
264
|
-
isQueuedForUploading: Readonly<{
|
|
265
|
-
type: BooleanConstructor;
|
|
266
|
-
value: false;
|
|
267
|
-
}>;
|
|
268
|
-
isValidationPending: Readonly<{
|
|
269
|
-
type: BooleanConstructor;
|
|
270
|
-
value: false;
|
|
271
|
-
}>;
|
|
272
|
-
isQueuedForValidation: Readonly<{
|
|
273
|
-
type: BooleanConstructor;
|
|
274
|
-
value: false;
|
|
275
|
-
}>;
|
|
276
|
-
}>;
|
|
277
|
-
|
|
278
175
|
type FuncFileValidator = (outputEntry: OutputFileEntry, api: UploaderPublicApi, options?: {
|
|
279
176
|
signal?: AbortSignal;
|
|
280
177
|
}) => undefined | OutputErrorFile | Promise<undefined | OutputErrorFile>;
|
|
@@ -293,9 +190,9 @@ declare class ValidationManager {
|
|
|
293
190
|
private _runQueueDebounced;
|
|
294
191
|
private _entryValidationState;
|
|
295
192
|
constructor(blockInstance: LitUploaderBlock);
|
|
296
|
-
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?:
|
|
193
|
+
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: Uid[]): void;
|
|
297
194
|
runCollectionValidators(): void;
|
|
298
|
-
cleanupValidationForEntry(entry: TypedData<
|
|
195
|
+
cleanupValidationForEntry(entry: TypedData<UploadEntryData>): void;
|
|
299
196
|
private _runFileValidatorsForEntry;
|
|
300
197
|
private _addCustomTypeToValidationError;
|
|
301
198
|
private _getEntryValidationState;
|
|
@@ -305,16 +202,23 @@ declare class ValidationManager {
|
|
|
305
202
|
|
|
306
203
|
type CameraMode = 'photo' | 'video';
|
|
307
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Config keys that can't be passed as attribute (because they are object or function)
|
|
207
|
+
*/
|
|
208
|
+
declare const complexConfigKeys: readonly ["metadata", "localeDefinitionOverride", "secureUploadsSignatureResolver", "secureDeliveryProxyUrlResolver", "iconHrefResolver", "fileValidators", "collectionValidators", "mediaRecorderOptions"];
|
|
308
209
|
/** Mapping of attribute names to state */
|
|
309
210
|
declare const attrStateMapping: Record<string, string>;
|
|
310
211
|
declare class Config extends LitBlock {
|
|
212
|
+
attributesMeta: Partial<ConfigPlainType> & {
|
|
213
|
+
'ctx-name': string;
|
|
214
|
+
};
|
|
311
215
|
init$: LitBlock["init$"] & ConfigType;
|
|
312
|
-
private
|
|
216
|
+
private _computationControllers;
|
|
313
217
|
private _flushValueToAttribute;
|
|
314
218
|
private _flushValueToState;
|
|
315
219
|
private _setValue;
|
|
316
220
|
private _getValue;
|
|
317
|
-
_assertSameValueDifferentReference
|
|
221
|
+
private _assertSameValueDifferentReference;
|
|
318
222
|
initCallback(): void;
|
|
319
223
|
attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
|
|
320
224
|
static get observedAttributes(): string[];
|
|
@@ -396,7 +300,7 @@ declare class UploaderPublicApi {
|
|
|
396
300
|
getOutputCollectionState<TStatus extends OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
|
|
397
301
|
initFlow: (force?: boolean) => void;
|
|
398
302
|
doneFlow: () => void;
|
|
399
|
-
setCurrentActivity: <T extends
|
|
303
|
+
setCurrentActivity: <T extends RegisteredActivityType>(activityType: T, ...params: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] : T extends RegisteredActivityType ? [undefined?] : [never]) => void;
|
|
400
304
|
getCurrentActivity: () => ActivityType;
|
|
401
305
|
setModalState: (opened: boolean) => void;
|
|
402
306
|
private get _sourceList();
|
|
@@ -696,6 +600,8 @@ type ConfigType = {
|
|
|
696
600
|
*/
|
|
697
601
|
testMode: boolean;
|
|
698
602
|
};
|
|
603
|
+
type ConfigComplexType = Pick<ConfigType, (typeof complexConfigKeys)[number]>;
|
|
604
|
+
type ConfigPlainType = Omit<ConfigType, keyof ConfigComplexType>;
|
|
699
605
|
type OutputFileStatus = 'idle' | 'uploading' | 'success' | 'failed' | 'removed';
|
|
700
606
|
type OutputCustomErrorType = 'CUSTOM_ERROR';
|
|
701
607
|
type OutputFileErrorType = OutputCustomErrorType | 'NOT_AN_IMAGE' | 'FORBIDDEN_FILE_TYPE' | 'FILE_SIZE_EXCEEDED' | 'UPLOAD_ERROR' | 'NETWORK_ERROR' | 'UNKNOWN_ERROR';
|
|
@@ -707,7 +613,9 @@ type OutputErrorTypePayload = {
|
|
|
707
613
|
NOT_AN_IMAGE: OutputFileErrorPayload;
|
|
708
614
|
FORBIDDEN_FILE_TYPE: OutputFileErrorPayload;
|
|
709
615
|
FILE_SIZE_EXCEEDED: OutputFileErrorPayload;
|
|
710
|
-
SOME_FILES_HAS_ERRORS: {
|
|
616
|
+
SOME_FILES_HAS_ERRORS: {
|
|
617
|
+
[k: string]: never;
|
|
618
|
+
};
|
|
711
619
|
TOO_MANY_FILES: {
|
|
712
620
|
min: number;
|
|
713
621
|
max: number;
|
|
@@ -857,6 +765,39 @@ type OutputCollectionState<TStatus extends OutputCollectionStatus = OutputCollec
|
|
|
857
765
|
allEntries: OutputFileEntry[];
|
|
858
766
|
});
|
|
859
767
|
|
|
768
|
+
interface UploadEntryData extends Record<string, unknown> {
|
|
769
|
+
file: File | null;
|
|
770
|
+
externalUrl: string | null;
|
|
771
|
+
fileName: string | null;
|
|
772
|
+
fileSize: number | null;
|
|
773
|
+
lastModified: number;
|
|
774
|
+
uploadProgress: number;
|
|
775
|
+
uuid: string | null;
|
|
776
|
+
isImage: boolean;
|
|
777
|
+
mimeType: string | null;
|
|
778
|
+
ctxName: string | null;
|
|
779
|
+
cdnUrl: string | null;
|
|
780
|
+
cdnUrlModifiers: string | null;
|
|
781
|
+
fileInfo: UploadcareFile | null;
|
|
782
|
+
isUploading: boolean;
|
|
783
|
+
abortController: AbortController | null;
|
|
784
|
+
thumbUrl: string | null;
|
|
785
|
+
silent: boolean;
|
|
786
|
+
source: string | null;
|
|
787
|
+
fullPath: string | null;
|
|
788
|
+
metadata: Metadata | null;
|
|
789
|
+
errors: OutputErrorFile[];
|
|
790
|
+
uploadError: Error | null;
|
|
791
|
+
isRemoved: boolean;
|
|
792
|
+
isQueuedForUploading: boolean;
|
|
793
|
+
isValidationPending: boolean;
|
|
794
|
+
isQueuedForValidation: boolean;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
type ActivityParams$1 = {
|
|
798
|
+
externalSourceType: string;
|
|
799
|
+
};
|
|
800
|
+
|
|
860
801
|
declare class SecureUploadsManager {
|
|
861
802
|
private readonly _block;
|
|
862
803
|
private _secureToken;
|
|
@@ -865,43 +806,48 @@ declare class SecureUploadsManager {
|
|
|
865
806
|
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
866
807
|
}
|
|
867
808
|
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
809
|
+
declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
810
|
+
static styleAttrs: string[];
|
|
811
|
+
constructor();
|
|
812
|
+
initCallback(): void;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
816
|
+
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
817
|
+
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
818
|
+
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
819
|
+
initialValue: T;
|
|
820
|
+
watchList?: (keyof T)[];
|
|
874
821
|
handler?: TypedCollectionObserverHandler<T>;
|
|
875
|
-
ctxName?: string;
|
|
876
822
|
};
|
|
877
|
-
declare class TypedCollection<T extends
|
|
878
|
-
private
|
|
879
|
-
private
|
|
880
|
-
private
|
|
881
|
-
private
|
|
882
|
-
private
|
|
883
|
-
private
|
|
884
|
-
private
|
|
885
|
-
private
|
|
886
|
-
private
|
|
887
|
-
private
|
|
888
|
-
private
|
|
889
|
-
private
|
|
890
|
-
private
|
|
823
|
+
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
824
|
+
private _ctxId;
|
|
825
|
+
private _data;
|
|
826
|
+
private _watchList;
|
|
827
|
+
private _subsMap;
|
|
828
|
+
private _propertyObservers;
|
|
829
|
+
private _collectionObservers;
|
|
830
|
+
private _items;
|
|
831
|
+
private _removed;
|
|
832
|
+
private _added;
|
|
833
|
+
private _observeTimeout?;
|
|
834
|
+
private _notifyTimeout?;
|
|
835
|
+
private _notifyObservers;
|
|
836
|
+
private _initialValue;
|
|
891
837
|
constructor(options: TypedCollectionOptions<T>);
|
|
892
|
-
|
|
838
|
+
private _notify;
|
|
893
839
|
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
894
840
|
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
895
|
-
add(init: Partial<
|
|
896
|
-
read(id:
|
|
897
|
-
readProp<K extends
|
|
898
|
-
publishProp<K extends
|
|
899
|
-
remove(id:
|
|
841
|
+
add(init: Partial<T>): string;
|
|
842
|
+
read(id: Uid): TypedData<T> | null;
|
|
843
|
+
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
844
|
+
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
845
|
+
remove(id: Uid): void;
|
|
900
846
|
clearAll(): void;
|
|
901
847
|
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
902
848
|
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
903
|
-
findItems(checkFn: (item: TypedData<T>) => boolean):
|
|
904
|
-
items():
|
|
849
|
+
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
850
|
+
items(): Uid[];
|
|
905
851
|
get size(): number;
|
|
906
852
|
destroy(): void;
|
|
907
853
|
}
|
|
@@ -910,7 +856,7 @@ declare class LitUploaderBlock extends LitActivityBlock {
|
|
|
910
856
|
static extSrcList: Readonly<typeof ExternalUploadSource>;
|
|
911
857
|
static sourceTypes: Readonly<typeof UploadSource>;
|
|
912
858
|
protected couldBeCtxOwner: boolean;
|
|
913
|
-
private
|
|
859
|
+
private _isCtxOwner;
|
|
914
860
|
private _unobserveCollection?;
|
|
915
861
|
private _unobserveCollectionProperties?;
|
|
916
862
|
init$: {
|
|
@@ -928,13 +874,13 @@ declare class LitUploaderBlock extends LitActivityBlock {
|
|
|
928
874
|
'*historyBack': null;
|
|
929
875
|
'*closeModal': () => void;
|
|
930
876
|
};
|
|
931
|
-
private get
|
|
877
|
+
private get _hasCtxOwner();
|
|
932
878
|
initCallback(): void;
|
|
933
879
|
protected get validationManager(): ValidationManager;
|
|
934
880
|
get api(): UploaderPublicApi;
|
|
935
881
|
getAPI(): UploaderPublicApi;
|
|
936
|
-
get uploadCollection(): TypedCollection<
|
|
937
|
-
|
|
882
|
+
get uploadCollection(): TypedCollection<UploadEntryData>;
|
|
883
|
+
get secureUploadsManager(): SecureUploadsManager;
|
|
938
884
|
disconnectedCallback(): void;
|
|
939
885
|
connectedCallback(): void;
|
|
940
886
|
private _initCtxOwner;
|
|
@@ -945,8 +891,8 @@ declare class LitUploaderBlock extends LitActivityBlock {
|
|
|
945
891
|
private _handleCollectionUpdate;
|
|
946
892
|
private _handleCollectionPropertiesUpdate;
|
|
947
893
|
private _flushCommonUploadProgress;
|
|
948
|
-
|
|
949
|
-
private
|
|
894
|
+
private _openCloudImageEditor;
|
|
895
|
+
private _setInitialCrop;
|
|
950
896
|
protected getMetadataFor(entryId: string): Promise<_uploadcare_upload_client.Metadata | undefined>;
|
|
951
897
|
protected getUploadClientOptions(): Promise<FileFromOptions>;
|
|
952
898
|
getOutputData(): OutputFileEntry[];
|
|
@@ -991,19 +937,16 @@ interface CropAspectRatio {
|
|
|
991
937
|
id: string;
|
|
992
938
|
hasFreeform?: boolean;
|
|
993
939
|
}
|
|
994
|
-
|
|
995
|
-
type ActivityParams$1 = {
|
|
996
|
-
internalId: string;
|
|
997
|
-
};
|
|
940
|
+
type CropPresetList = CropAspectRatio[];
|
|
998
941
|
|
|
999
942
|
type ActivityParams = {
|
|
1000
|
-
|
|
943
|
+
internalId: string;
|
|
1001
944
|
};
|
|
1002
945
|
|
|
1003
946
|
declare const ACTIVE_PROP = "___ACTIVITY_IS_ACTIVE___";
|
|
1004
947
|
type ActivityParamsMap = {
|
|
1005
|
-
'cloud-image-edit': ActivityParams
|
|
1006
|
-
external: ActivityParams;
|
|
948
|
+
'cloud-image-edit': ActivityParams;
|
|
949
|
+
external: ActivityParams$1;
|
|
1007
950
|
};
|
|
1008
951
|
declare class LitActivityBlock extends LitBlock {
|
|
1009
952
|
protected historyTracked: boolean;
|
|
@@ -1015,9 +958,7 @@ declare class LitActivityBlock extends LitBlock {
|
|
|
1015
958
|
'*historyBack': null;
|
|
1016
959
|
'*closeModal': () => void;
|
|
1017
960
|
};
|
|
1018
|
-
_debouncedHistoryFlush
|
|
1019
|
-
cancel: () => void;
|
|
1020
|
-
};
|
|
961
|
+
private _debouncedHistoryFlush;
|
|
1021
962
|
private _deactivate;
|
|
1022
963
|
private _activate;
|
|
1023
964
|
initCallback(): void;
|
|
@@ -1033,16 +974,15 @@ declare class LitActivityBlock extends LitBlock {
|
|
|
1033
974
|
CLOUD_IMG_EDIT: 'cloud-image-edit';
|
|
1034
975
|
EXTERNAL: 'external';
|
|
1035
976
|
}>;
|
|
1036
|
-
get isActivityActive(): boolean;
|
|
977
|
+
protected get isActivityActive(): boolean;
|
|
1037
978
|
get couldOpenActivity(): boolean;
|
|
1038
979
|
/** TODO: remove name argument */
|
|
1039
|
-
registerActivity(_name: string, options?: {
|
|
980
|
+
protected registerActivity(_name: string, options?: {
|
|
1040
981
|
onActivate?: () => void;
|
|
1041
982
|
onDeactivate?: () => void;
|
|
1042
983
|
}): void;
|
|
1043
|
-
|
|
984
|
+
private _unregisterActivity;
|
|
1044
985
|
disconnectedCallback(): void;
|
|
1045
|
-
get activityKey(): string;
|
|
1046
986
|
get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
|
|
1047
987
|
get initActivity(): string | null;
|
|
1048
988
|
get doneActivity(): string | null;
|
|
@@ -1114,87 +1054,210 @@ type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> &
|
|
|
1114
1054
|
modalId?: string;
|
|
1115
1055
|
eventType?: CommonEventType;
|
|
1116
1056
|
};
|
|
1117
|
-
|
|
1118
|
-
private readonly _sessionId;
|
|
1119
|
-
private readonly _telemetryInstance;
|
|
1120
|
-
private readonly _block;
|
|
1121
|
-
private _config;
|
|
1122
|
-
private _initialized;
|
|
1123
|
-
private _lastPayload;
|
|
1124
|
-
private readonly _queue;
|
|
1125
|
-
constructor(block: LitBlock);
|
|
1126
|
-
private _init;
|
|
1127
|
-
private _setConfig;
|
|
1128
|
-
private _formattingPayload;
|
|
1129
|
-
private _excludedEvents;
|
|
1057
|
+
interface ITelemetryManager {
|
|
1130
1058
|
sendEvent(body: TelemetryEventBody): void;
|
|
1131
1059
|
sendEventError(error: unknown, context?: string): void;
|
|
1132
|
-
/**
|
|
1133
|
-
* Method to send telemetry event for Cloud Image Editor.
|
|
1134
|
-
*/
|
|
1135
1060
|
sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
|
|
1136
|
-
/**
|
|
1137
|
-
* Deeply compares two objects and returns true if they are equal, false otherwise.
|
|
1138
|
-
*/
|
|
1139
|
-
private _checkObj;
|
|
1140
|
-
private get _timestamp();
|
|
1141
|
-
private get _solution();
|
|
1142
|
-
private get _activity();
|
|
1143
|
-
private get _location();
|
|
1144
1061
|
}
|
|
1145
1062
|
|
|
1146
|
-
declare const
|
|
1063
|
+
declare const TabId: Readonly<{
|
|
1064
|
+
readonly CROP: "crop";
|
|
1065
|
+
readonly TUNING: "tuning";
|
|
1066
|
+
readonly FILTERS: "filters";
|
|
1067
|
+
}>;
|
|
1068
|
+
type TabIdValue$1 = (typeof TabId)[keyof typeof TabId];
|
|
1069
|
+
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
1070
|
+
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
1071
|
+
declare const ALL_FILTERS: readonly ["adaris", "briaril", "calarel", "carris", "cynarel", "cyren", "elmet", "elonni", "enzana", "erydark", "fenralan", "ferand", "galen", "gavin", "gethriel", "iorill", "iothari", "iselva", "jadis", "lavra", "misiara", "namala", "nerion", "nethari", "pamaya", "sarnar", "sedis", "sewen", "sorahel", "sorlen", "tarian", "thellassan", "varriel", "varven", "vevera", "virkas", "yedis", "yllara", "zatvel", "zevcen"];
|
|
1072
|
+
type FilterId = (typeof ALL_FILTERS)[number];
|
|
1073
|
+
declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
1074
|
+
type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
1075
|
+
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
1076
|
+
declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
1077
|
+
brightness: {
|
|
1078
|
+
zero: number;
|
|
1079
|
+
range: readonly [-100, 100];
|
|
1080
|
+
keypointsNumber: number;
|
|
1081
|
+
};
|
|
1082
|
+
exposure: {
|
|
1083
|
+
zero: number;
|
|
1084
|
+
range: readonly [-500, 500];
|
|
1085
|
+
keypointsNumber: number;
|
|
1086
|
+
};
|
|
1087
|
+
gamma: {
|
|
1088
|
+
zero: number;
|
|
1089
|
+
range: readonly [0, 1000];
|
|
1090
|
+
keypointsNumber: number;
|
|
1091
|
+
};
|
|
1092
|
+
contrast: {
|
|
1093
|
+
zero: number;
|
|
1094
|
+
range: readonly [-100, 500];
|
|
1095
|
+
keypointsNumber: number;
|
|
1096
|
+
};
|
|
1097
|
+
saturation: {
|
|
1098
|
+
zero: number;
|
|
1099
|
+
range: readonly [-100, 500];
|
|
1100
|
+
keypointsNumber: number;
|
|
1101
|
+
};
|
|
1102
|
+
vibrance: {
|
|
1103
|
+
zero: number;
|
|
1104
|
+
range: readonly [-100, 500];
|
|
1105
|
+
keypointsNumber: number;
|
|
1106
|
+
};
|
|
1107
|
+
warmth: {
|
|
1108
|
+
zero: number;
|
|
1109
|
+
range: readonly [-100, 100];
|
|
1110
|
+
keypointsNumber: number;
|
|
1111
|
+
};
|
|
1112
|
+
enhance: {
|
|
1113
|
+
zero: number;
|
|
1114
|
+
range: readonly [0, 100];
|
|
1115
|
+
keypointsNumber: number;
|
|
1116
|
+
};
|
|
1117
|
+
filter: {
|
|
1118
|
+
zero: number;
|
|
1119
|
+
range: readonly [0, 100];
|
|
1120
|
+
keypointsNumber: number;
|
|
1121
|
+
};
|
|
1122
|
+
}>;
|
|
1123
|
+
|
|
1124
|
+
type SharedConfigState = {
|
|
1125
|
+
[K in keyof ConfigType as `*cfg/${K}`]: ConfigType[K];
|
|
1126
|
+
};
|
|
1127
|
+
type BlockCtxState = Record<string, never>;
|
|
1128
|
+
type ActivityBlockCtxState = BlockCtxState & {
|
|
1129
|
+
'*currentActivity': string | null;
|
|
1130
|
+
'*currentActivityParams': Record<string, unknown>;
|
|
1131
|
+
'*history': (string | null)[];
|
|
1132
|
+
'*historyBack': (() => void) | null;
|
|
1133
|
+
'*closeModal': () => void;
|
|
1134
|
+
};
|
|
1135
|
+
type UploaderBlockCtxState = ActivityBlockCtxState & {
|
|
1136
|
+
'*commonProgress': number;
|
|
1137
|
+
'*uploadList': {
|
|
1138
|
+
uid: Uid;
|
|
1139
|
+
}[];
|
|
1140
|
+
'*uploadQueue': Queue;
|
|
1141
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
1142
|
+
'*collectionState': OutputCollectionState | null;
|
|
1143
|
+
'*groupInfo': UploadcareGroup | null;
|
|
1144
|
+
'*uploadTrigger': Set<Uid>;
|
|
1145
|
+
'*secureUploadsManager': SecureUploadsManager;
|
|
1146
|
+
};
|
|
1147
|
+
type SolutionBlockCtxState = UploaderBlockCtxState & {
|
|
1148
|
+
'*solution': string | null;
|
|
1149
|
+
};
|
|
1150
|
+
type CloudImageEditorState = {
|
|
1151
|
+
'*originalUrl': string | null;
|
|
1152
|
+
'*loadingOperations': LoadingOperations;
|
|
1153
|
+
'*faderEl': EditorImageFader | null;
|
|
1154
|
+
'*cropperEl': EditorImageCropper | null;
|
|
1155
|
+
'*imgEl': HTMLImageElement | null;
|
|
1156
|
+
'*imgContainerEl': HTMLElement | null;
|
|
1157
|
+
'*networkProblems': boolean;
|
|
1158
|
+
'*imageSize': {
|
|
1159
|
+
width: number;
|
|
1160
|
+
height: number;
|
|
1161
|
+
} | null;
|
|
1162
|
+
'*editorTransformations': Transformations;
|
|
1163
|
+
'*cropPresetList': CropPresetList;
|
|
1164
|
+
'*currentAspectRatio': CropAspectRatio | null;
|
|
1165
|
+
'*tabList': readonly TabIdValue$1[];
|
|
1166
|
+
'*tabId': TabIdValue$1;
|
|
1167
|
+
'*on.retryNetwork': () => void;
|
|
1168
|
+
'*on.apply': (transformations: Transformations) => void;
|
|
1169
|
+
'*on.cancel': () => void;
|
|
1170
|
+
};
|
|
1171
|
+
type EditorImageCropperState = {
|
|
1172
|
+
'*padding': number;
|
|
1173
|
+
'*operations': {
|
|
1174
|
+
rotate: number;
|
|
1175
|
+
mirror: boolean;
|
|
1176
|
+
flip: boolean;
|
|
1177
|
+
};
|
|
1178
|
+
'*imageBox': {
|
|
1179
|
+
x: number;
|
|
1180
|
+
y: number;
|
|
1181
|
+
width: number;
|
|
1182
|
+
height: number;
|
|
1183
|
+
};
|
|
1184
|
+
'*cropBox': {
|
|
1185
|
+
x: number;
|
|
1186
|
+
y: number;
|
|
1187
|
+
width: number;
|
|
1188
|
+
height: number;
|
|
1189
|
+
};
|
|
1190
|
+
};
|
|
1191
|
+
type EditorToolbarState = {
|
|
1192
|
+
'*showListAspectRatio': boolean;
|
|
1193
|
+
'*sliderEl': EditorSlider | null;
|
|
1194
|
+
'*showSlider': boolean;
|
|
1195
|
+
'*currentFilter': string;
|
|
1196
|
+
'*currentOperation': string | null;
|
|
1197
|
+
'*operationTooltip': string | null;
|
|
1198
|
+
};
|
|
1199
|
+
type DynamicBlockState = {
|
|
1200
|
+
'*blocksRegistry': Set<LitBlock>;
|
|
1201
|
+
'*eventEmitter': EventEmitter;
|
|
1202
|
+
'*localeManager': LocaleManager;
|
|
1203
|
+
'*telemetryManager': ITelemetryManager;
|
|
1204
|
+
'*a11y': A11y;
|
|
1205
|
+
'*modalManager': ModalManager | null;
|
|
1206
|
+
};
|
|
1207
|
+
type DynamicUploaderBlockState = {
|
|
1208
|
+
'*uploadCollection': TypedCollection<UploadEntryData> | null;
|
|
1209
|
+
'*publicApi': UploaderPublicApi;
|
|
1210
|
+
'*validationManager': ValidationManager;
|
|
1211
|
+
};
|
|
1212
|
+
type LocaleState = {
|
|
1213
|
+
[key: `*l10n/${string}`]: string;
|
|
1214
|
+
};
|
|
1215
|
+
type SharedState = SolutionBlockCtxState & SharedConfigState & CloudImageEditorState & EditorImageCropperState & EditorToolbarState & DynamicBlockState & DynamicUploaderBlockState & LocaleState;
|
|
1216
|
+
|
|
1217
|
+
declare const LitBlockBase: typeof LitElement & Constructor<{
|
|
1218
|
+
willYield: boolean;
|
|
1147
1219
|
yield(slot: string, defaultContent?: unknown): unknown;
|
|
1148
|
-
}> & Constructor
|
|
1220
|
+
}> & Constructor<{
|
|
1149
1221
|
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
1150
|
-
}> & Constructor
|
|
1151
|
-
$: {
|
|
1152
|
-
[x: string]: any;
|
|
1153
|
-
};
|
|
1154
|
-
sub<T = unknown>(key: string, callback: (value: T) => void, init?: boolean): () => void;
|
|
1155
|
-
pub(key: string, value: unknown): void;
|
|
1156
|
-
set$(obj: {
|
|
1157
|
-
[x: string]: any;
|
|
1158
|
-
}): void;
|
|
1159
|
-
has(key: string): boolean;
|
|
1160
|
-
add(key: string, val: unknown, rewrite?: boolean): void;
|
|
1161
|
-
add$(obj: {
|
|
1162
|
-
[x: string]: any;
|
|
1163
|
-
}, rewrite?: boolean): void;
|
|
1164
|
-
initCallback(): void;
|
|
1165
|
-
sharedCtx: PubSub<Record<string, unknown>>;
|
|
1166
|
-
ctxName: string;
|
|
1167
|
-
}> & Constructor$1<LitElement> & {
|
|
1222
|
+
}> & Constructor<SymbioteComponent<SharedState>> & Constructor<LitElement> & {
|
|
1168
1223
|
reg(tagName: string): void;
|
|
1169
1224
|
};
|
|
1170
1225
|
declare class LitBlock extends LitBlockBase {
|
|
1171
|
-
private
|
|
1226
|
+
private _cfgProxy;
|
|
1227
|
+
private _sharedContextInstances;
|
|
1172
1228
|
static styleAttrs: string[];
|
|
1173
1229
|
activityType: ActivityType;
|
|
1174
1230
|
init$: {};
|
|
1175
1231
|
constructor();
|
|
1176
1232
|
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
1177
|
-
private
|
|
1233
|
+
private _pluralize;
|
|
1178
1234
|
emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
|
|
1179
1235
|
hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
|
|
1180
|
-
setOrAddState(prop: string, newVal: unknown): void;
|
|
1181
1236
|
connectedCallback(): void;
|
|
1182
1237
|
initCallback(): void;
|
|
1183
1238
|
get testId(): string;
|
|
1184
|
-
get modalManager(): ModalManager |
|
|
1185
|
-
get telemetryManager():
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
protected get localeManager(): LocaleManager | null;
|
|
1191
|
-
protected get a11y(): A11y | null;
|
|
1192
|
-
protected get blocksRegistry(): Set<LitBlock>;
|
|
1239
|
+
get modalManager(): ModalManager | null;
|
|
1240
|
+
get telemetryManager(): ITelemetryManager;
|
|
1241
|
+
get localeManager(): LocaleManager;
|
|
1242
|
+
get a11y(): A11y;
|
|
1243
|
+
get blocksRegistry(): Set<LitBlock>;
|
|
1244
|
+
get eventEmitter(): EventEmitter;
|
|
1193
1245
|
disconnectedCallback(): void;
|
|
1194
1246
|
/**
|
|
1195
1247
|
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
1196
1248
|
*/
|
|
1197
1249
|
protected destroyCtxCallback(): void;
|
|
1250
|
+
/**
|
|
1251
|
+
* Adds a shared context instance if it does not exist yet.
|
|
1252
|
+
* @param key The shared state key.
|
|
1253
|
+
* @param resolver The resolver function that creates the instance.
|
|
1254
|
+
* @param persist Whether to persist the instance in the context if the creator block is removed. It's usually needed for those instances that depends on the current block. Defaults to false.
|
|
1255
|
+
*/
|
|
1256
|
+
protected addSharedContextInstance<TKey extends keyof SharedState>(key: TKey, resolver: () => SharedState[TKey], { persist }?: {
|
|
1257
|
+
persist?: boolean | undefined;
|
|
1258
|
+
}): void;
|
|
1259
|
+
private _destroySharedContextInstances;
|
|
1260
|
+
protected getSharedContextInstance<TKey extends keyof SharedState, TRequired extends boolean = true>(key: TKey, isRequired?: TRequired): TRequired extends true ? NonNullable<SharedState[TKey]> : SharedState[TKey];
|
|
1198
1261
|
protected proxyUrl(url: string): Promise<string>;
|
|
1199
1262
|
get cfg(): ConfigType;
|
|
1200
1263
|
subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): () => void;
|
|
@@ -1221,52 +1284,54 @@ declare function initState(fnCtx: CloudImageEditorBlock): {
|
|
|
1221
1284
|
};
|
|
1222
1285
|
|
|
1223
1286
|
declare class CloudImageEditorBlock extends LitBlock {
|
|
1287
|
+
attributesMeta: ({
|
|
1288
|
+
uuid: string;
|
|
1289
|
+
} | {
|
|
1290
|
+
'cdn-url': string;
|
|
1291
|
+
}) & Partial<{
|
|
1292
|
+
tabs: string;
|
|
1293
|
+
'crop-preset': string;
|
|
1294
|
+
}> & {
|
|
1295
|
+
'ctx-name': string;
|
|
1296
|
+
};
|
|
1224
1297
|
ctxOwner: boolean;
|
|
1225
1298
|
static styleAttrs: string[];
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
isImage: boolean;
|
|
1231
|
-
msg: string;
|
|
1232
|
-
src: string;
|
|
1233
|
-
fileType: string;
|
|
1234
|
-
showLoader: boolean;
|
|
1299
|
+
private _statusMessage;
|
|
1300
|
+
private _imageSrc;
|
|
1301
|
+
private _fileType;
|
|
1302
|
+
private _showLoader;
|
|
1235
1303
|
uuid: string | null;
|
|
1236
1304
|
cdnUrl: string | null;
|
|
1237
1305
|
cropPreset: string;
|
|
1238
1306
|
tabs: string | null;
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
presenceViewerToolbar: boolean;
|
|
1243
|
-
private isInitialized;
|
|
1244
|
-
private pendingInitUpdate;
|
|
1307
|
+
private _hasNetworkProblems;
|
|
1308
|
+
private _isInitialized;
|
|
1309
|
+
private _pendingInitUpdate;
|
|
1245
1310
|
private readonly _debouncedShowLoader;
|
|
1246
|
-
private readonly
|
|
1247
|
-
private readonly
|
|
1248
|
-
private readonly
|
|
1249
|
-
private readonly
|
|
1250
|
-
private readonly
|
|
1251
|
-
private readonly
|
|
1252
|
-
private readonly
|
|
1253
|
-
private
|
|
1311
|
+
private readonly _imgRef;
|
|
1312
|
+
private readonly _cropperRef;
|
|
1313
|
+
private readonly _faderRef;
|
|
1314
|
+
private readonly _imgContainerRef;
|
|
1315
|
+
private readonly _handleImageLoad;
|
|
1316
|
+
private readonly _handleImageError;
|
|
1317
|
+
private readonly _handleRetryNetwork;
|
|
1318
|
+
private _scheduleInitialization;
|
|
1254
1319
|
init$: ReturnType<typeof initState>;
|
|
1255
1320
|
initCallback(): void;
|
|
1256
|
-
private
|
|
1257
|
-
private
|
|
1258
|
-
private
|
|
1259
|
-
private get
|
|
1321
|
+
private _assignSharedElements;
|
|
1322
|
+
private _attachImageListeners;
|
|
1323
|
+
private _detachImageListeners;
|
|
1324
|
+
private get _imageClassName();
|
|
1260
1325
|
/**
|
|
1261
1326
|
* To proper work, we need non-zero size the element. So, we'll wait for it.
|
|
1262
1327
|
*/
|
|
1263
1328
|
private _waitForSize;
|
|
1264
|
-
firstUpdated(
|
|
1329
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1265
1330
|
disconnectedCallback(): void;
|
|
1266
1331
|
render(): lit_html.TemplateResult<1>;
|
|
1267
1332
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1268
|
-
private
|
|
1269
|
-
private
|
|
1333
|
+
private _syncTabListFromProp;
|
|
1334
|
+
private _syncCropPresetState;
|
|
1270
1335
|
updateImage(): Promise<void>;
|
|
1271
1336
|
initEditor(): Promise<void>;
|
|
1272
1337
|
}
|
|
@@ -1282,13 +1347,13 @@ declare class CropFrame extends LitBlock {
|
|
|
1282
1347
|
private _dragStartCrop?;
|
|
1283
1348
|
private _frameImage?;
|
|
1284
1349
|
private _guidesHidden;
|
|
1285
|
-
private
|
|
1286
|
-
private readonly
|
|
1350
|
+
private _draggingValue;
|
|
1351
|
+
private readonly _svgRef;
|
|
1287
1352
|
private _svgReady;
|
|
1288
1353
|
private _pendingMaskHref;
|
|
1289
1354
|
private get _svgElement();
|
|
1290
|
-
private get
|
|
1291
|
-
private set
|
|
1355
|
+
private get _dragging();
|
|
1356
|
+
private set _dragging(value);
|
|
1292
1357
|
private _applyGuidesDragState;
|
|
1293
1358
|
private _shouldThumbBeDisabled;
|
|
1294
1359
|
private _createBackdrop;
|
|
@@ -1314,7 +1379,7 @@ declare class CropFrame extends LitBlock {
|
|
|
1314
1379
|
private _render;
|
|
1315
1380
|
toggleThumbs(visible: boolean): void;
|
|
1316
1381
|
initCallback(): void;
|
|
1317
|
-
protected firstUpdated(
|
|
1382
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1318
1383
|
private _initializeSvg;
|
|
1319
1384
|
disconnectedCallback(): void;
|
|
1320
1385
|
render(): TemplateResult;
|
|
@@ -1323,97 +1388,37 @@ declare class CropFrame extends LitBlock {
|
|
|
1323
1388
|
declare class EditorButtonControl extends LitBlock {
|
|
1324
1389
|
active: boolean;
|
|
1325
1390
|
title: string;
|
|
1326
|
-
icon: string;
|
|
1327
|
-
titleProp: string;
|
|
1391
|
+
protected icon: string;
|
|
1392
|
+
protected titleProp: string;
|
|
1328
1393
|
protected get buttonClasses(): Record<string, boolean>;
|
|
1329
|
-
private
|
|
1394
|
+
private _updateHostStateClasses;
|
|
1330
1395
|
protected onClick(_event: MouseEvent): void;
|
|
1331
1396
|
connectedCallback(): void;
|
|
1332
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
1397
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1333
1398
|
render(): lit_html.TemplateResult<1>;
|
|
1334
1399
|
}
|
|
1335
1400
|
|
|
1336
1401
|
declare class EditorFreeformButtonControl extends EditorButtonControl {
|
|
1337
1402
|
initCallback(): void;
|
|
1338
1403
|
onClick(): void;
|
|
1339
|
-
private
|
|
1404
|
+
private _computeTitle;
|
|
1340
1405
|
render(): lit_html.TemplateResult<1>;
|
|
1341
1406
|
}
|
|
1342
1407
|
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
1343
|
-
private _aspectRatio
|
|
1344
|
-
get aspectRatio(): CropAspectRatio |
|
|
1345
|
-
set aspectRatio(value: CropAspectRatio |
|
|
1408
|
+
private _aspectRatio;
|
|
1409
|
+
get aspectRatio(): CropAspectRatio | null;
|
|
1410
|
+
set aspectRatio(value: CropAspectRatio | null);
|
|
1346
1411
|
initCallback(): void;
|
|
1347
|
-
onClick(): void;
|
|
1348
|
-
private
|
|
1349
|
-
private
|
|
1412
|
+
protected onClick(): void;
|
|
1413
|
+
private _updateAspectRatioPresentation;
|
|
1414
|
+
private _renderIcon;
|
|
1350
1415
|
render(): lit_html.TemplateResult<1>;
|
|
1351
1416
|
}
|
|
1352
1417
|
|
|
1353
|
-
declare const TabId: Readonly<{
|
|
1354
|
-
readonly CROP: "crop";
|
|
1355
|
-
readonly TUNING: "tuning";
|
|
1356
|
-
readonly FILTERS: "filters";
|
|
1357
|
-
}>;
|
|
1358
|
-
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
1359
|
-
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
1360
|
-
declare const ALL_FILTERS: readonly ["adaris", "briaril", "calarel", "carris", "cynarel", "cyren", "elmet", "elonni", "enzana", "erydark", "fenralan", "ferand", "galen", "gavin", "gethriel", "iorill", "iothari", "iselva", "jadis", "lavra", "misiara", "namala", "nerion", "nethari", "pamaya", "sarnar", "sedis", "sewen", "sorahel", "sorlen", "tarian", "thellassan", "varriel", "varven", "vevera", "virkas", "yedis", "yllara", "zatvel", "zevcen"];
|
|
1361
|
-
type FilterId = (typeof ALL_FILTERS)[number];
|
|
1362
|
-
declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
1363
|
-
type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
1364
|
-
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
1365
|
-
declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
1366
|
-
brightness: {
|
|
1367
|
-
zero: number;
|
|
1368
|
-
range: readonly [-100, 100];
|
|
1369
|
-
keypointsNumber: number;
|
|
1370
|
-
};
|
|
1371
|
-
exposure: {
|
|
1372
|
-
zero: number;
|
|
1373
|
-
range: readonly [-500, 500];
|
|
1374
|
-
keypointsNumber: number;
|
|
1375
|
-
};
|
|
1376
|
-
gamma: {
|
|
1377
|
-
zero: number;
|
|
1378
|
-
range: readonly [0, 1000];
|
|
1379
|
-
keypointsNumber: number;
|
|
1380
|
-
};
|
|
1381
|
-
contrast: {
|
|
1382
|
-
zero: number;
|
|
1383
|
-
range: readonly [-100, 500];
|
|
1384
|
-
keypointsNumber: number;
|
|
1385
|
-
};
|
|
1386
|
-
saturation: {
|
|
1387
|
-
zero: number;
|
|
1388
|
-
range: readonly [-100, 500];
|
|
1389
|
-
keypointsNumber: number;
|
|
1390
|
-
};
|
|
1391
|
-
vibrance: {
|
|
1392
|
-
zero: number;
|
|
1393
|
-
range: readonly [-100, 500];
|
|
1394
|
-
keypointsNumber: number;
|
|
1395
|
-
};
|
|
1396
|
-
warmth: {
|
|
1397
|
-
zero: number;
|
|
1398
|
-
range: readonly [-100, 100];
|
|
1399
|
-
keypointsNumber: number;
|
|
1400
|
-
};
|
|
1401
|
-
enhance: {
|
|
1402
|
-
zero: number;
|
|
1403
|
-
range: readonly [0, 100];
|
|
1404
|
-
keypointsNumber: number;
|
|
1405
|
-
};
|
|
1406
|
-
filter: {
|
|
1407
|
-
zero: number;
|
|
1408
|
-
range: readonly [0, 100];
|
|
1409
|
-
keypointsNumber: number;
|
|
1410
|
-
};
|
|
1411
|
-
}>;
|
|
1412
|
-
|
|
1413
1418
|
declare class EditorCropButtonControl extends EditorButtonControl {
|
|
1414
1419
|
operation: CropOperation | undefined;
|
|
1415
|
-
protected willUpdate(
|
|
1416
|
-
onClick(e: MouseEvent): void;
|
|
1420
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1421
|
+
protected onClick(e: MouseEvent): void;
|
|
1417
1422
|
}
|
|
1418
1423
|
|
|
1419
1424
|
declare class EditorFilterControl extends EditorButtonControl {
|
|
@@ -1423,12 +1428,12 @@ declare class EditorFilterControl extends EditorButtonControl {
|
|
|
1423
1428
|
private _observer?;
|
|
1424
1429
|
private _cancelPreload?;
|
|
1425
1430
|
private _lastPreviewRequestId;
|
|
1426
|
-
private
|
|
1427
|
-
private
|
|
1428
|
-
private
|
|
1429
|
-
private
|
|
1431
|
+
private _previewVisibilityCheckRaf?;
|
|
1432
|
+
private _previewVisibilityCheckTimeout?;
|
|
1433
|
+
private _previewImage;
|
|
1434
|
+
private _previewLoaded;
|
|
1430
1435
|
isOriginal: boolean;
|
|
1431
|
-
|
|
1436
|
+
private _iconSize;
|
|
1432
1437
|
get filter(): string;
|
|
1433
1438
|
set filter(value: string);
|
|
1434
1439
|
onClick(e: MouseEvent): void;
|
|
@@ -1437,11 +1442,11 @@ declare class EditorFilterControl extends EditorButtonControl {
|
|
|
1437
1442
|
initCallback(): void;
|
|
1438
1443
|
disconnectedCallback(): void;
|
|
1439
1444
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1440
|
-
private
|
|
1441
|
-
private
|
|
1442
|
-
private
|
|
1443
|
-
private
|
|
1444
|
-
private get
|
|
1445
|
+
private _updateFilterLabels;
|
|
1446
|
+
private _loadPreview;
|
|
1447
|
+
private _schedulePreviewVisibilityCheck;
|
|
1448
|
+
private _clearPreviewVisibilityChecks;
|
|
1449
|
+
private get _shouldShowPreview();
|
|
1445
1450
|
render(): lit_html.TemplateResult<1>;
|
|
1446
1451
|
}
|
|
1447
1452
|
|
|
@@ -1461,10 +1466,10 @@ declare class EditorImageCropper extends LitBlock {
|
|
|
1461
1466
|
private _observer?;
|
|
1462
1467
|
private _image;
|
|
1463
1468
|
private _cancelPreload?;
|
|
1464
|
-
private readonly
|
|
1465
|
-
private readonly
|
|
1469
|
+
private readonly _canvasRef;
|
|
1470
|
+
private readonly _frameRef;
|
|
1466
1471
|
constructor();
|
|
1467
|
-
protected firstUpdated(
|
|
1472
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1468
1473
|
private _syncTransformations;
|
|
1469
1474
|
private _initCanvas;
|
|
1470
1475
|
private _alignImage;
|
|
@@ -1551,13 +1556,13 @@ declare class EditorOperationControl extends EditorButtonControl {
|
|
|
1551
1556
|
private _operation;
|
|
1552
1557
|
get operation(): ColorOperation | '';
|
|
1553
1558
|
set operation(value: ColorOperation | '');
|
|
1554
|
-
private
|
|
1559
|
+
private _updateOperationMetadata;
|
|
1555
1560
|
initCallback(): void;
|
|
1556
|
-
onClick(e: MouseEvent): void;
|
|
1561
|
+
protected onClick(e: MouseEvent): void;
|
|
1557
1562
|
}
|
|
1558
1563
|
|
|
1559
1564
|
declare class EditorScroller extends LitBlock {
|
|
1560
|
-
private readonly
|
|
1565
|
+
private readonly _handleWheel;
|
|
1561
1566
|
connectedCallback(): void;
|
|
1562
1567
|
disconnectedCallback(): void;
|
|
1563
1568
|
}
|
|
@@ -1566,76 +1571,84 @@ type SliderOperation = ColorOperation | 'filter';
|
|
|
1566
1571
|
type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
|
|
1567
1572
|
declare const FAKE_ORIGINAL_FILTER = "original";
|
|
1568
1573
|
declare class EditorSlider extends LitBlock {
|
|
1569
|
-
|
|
1570
|
-
|
|
1574
|
+
state: {
|
|
1575
|
+
operation: SliderOperation;
|
|
1576
|
+
filter: SliderFilter | undefined;
|
|
1577
|
+
originalUrl: string;
|
|
1578
|
+
disabled: boolean;
|
|
1579
|
+
min: number;
|
|
1580
|
+
max: number;
|
|
1571
1581
|
value: number;
|
|
1572
|
-
|
|
1582
|
+
defaultValue: number;
|
|
1583
|
+
zero: number;
|
|
1584
|
+
};
|
|
1585
|
+
private _handleInput;
|
|
1573
1586
|
setOperation(operation: SliderOperation, filter?: SliderFilter): void;
|
|
1574
1587
|
private _initializeValues;
|
|
1575
1588
|
apply(): void;
|
|
1576
1589
|
cancel(): void;
|
|
1577
1590
|
initCallback(): void;
|
|
1578
|
-
protected updated(changedProperties:
|
|
1591
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1579
1592
|
render(): lit_html.TemplateResult<1>;
|
|
1580
1593
|
}
|
|
1581
1594
|
|
|
1582
1595
|
type TabIdValue = (typeof TabId)[keyof typeof TabId];
|
|
1583
1596
|
declare class EditorToolbar extends LitBlock {
|
|
1584
|
-
private
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
private
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
private
|
|
1591
|
-
private
|
|
1592
|
-
private
|
|
1593
|
-
private
|
|
1594
|
-
private
|
|
1595
|
-
private readonly
|
|
1596
|
-
private readonly
|
|
1597
|
+
private _showLoader;
|
|
1598
|
+
showMainToolbar: boolean;
|
|
1599
|
+
showSubToolbar: boolean;
|
|
1600
|
+
private _showTabToggles;
|
|
1601
|
+
tabList: readonly TabIdValue[];
|
|
1602
|
+
activeTab: TabIdValue;
|
|
1603
|
+
private _useSliderPanel;
|
|
1604
|
+
private _tooltipVisible;
|
|
1605
|
+
private _operationTooltip;
|
|
1606
|
+
private _tabIndicatorOffset;
|
|
1607
|
+
private _tabIndicatorWidth;
|
|
1608
|
+
private readonly _sliderRef;
|
|
1609
|
+
private readonly _tabIndicatorRef;
|
|
1597
1610
|
protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
|
|
1598
|
-
private readonly
|
|
1599
|
-
private
|
|
1611
|
+
private readonly _handleWindowResize;
|
|
1612
|
+
private _cropPresets;
|
|
1600
1613
|
private _cancelPreload?;
|
|
1601
1614
|
private readonly _debouncedShowLoader;
|
|
1602
1615
|
private readonly _updateInfoTooltip;
|
|
1603
|
-
private readonly
|
|
1604
|
-
private readonly
|
|
1605
|
-
private readonly
|
|
1606
|
-
private readonly
|
|
1607
|
-
private readonly
|
|
1616
|
+
private readonly _subTopToolbarStyles;
|
|
1617
|
+
private readonly _subBottomToolbarStyles;
|
|
1618
|
+
private readonly _tabContentStyles;
|
|
1619
|
+
private readonly _tabToggleStyles;
|
|
1620
|
+
private readonly _tabTogglesStyles;
|
|
1608
1621
|
init$: Record<string, unknown>;
|
|
1609
1622
|
private _onSliderClose;
|
|
1610
1623
|
private _activateTab;
|
|
1611
|
-
private
|
|
1624
|
+
private _applyTabState;
|
|
1612
1625
|
private _syncTabIndicator;
|
|
1613
|
-
private get
|
|
1614
|
-
private
|
|
1615
|
-
private
|
|
1616
|
-
private
|
|
1617
|
-
private
|
|
1618
|
-
private
|
|
1619
|
-
private
|
|
1620
|
-
private
|
|
1621
|
-
private
|
|
1622
|
-
private
|
|
1623
|
-
private
|
|
1624
|
-
private
|
|
1626
|
+
private get _hasAspectRatioPicker();
|
|
1627
|
+
private _renderControlsByTab;
|
|
1628
|
+
private _renderCropTabControls;
|
|
1629
|
+
private _renderFilterTabControls;
|
|
1630
|
+
private _renderTuningTabControls;
|
|
1631
|
+
private _renderControlGroup;
|
|
1632
|
+
private _renderFreeformControl;
|
|
1633
|
+
private _renderAspectRatioControl;
|
|
1634
|
+
private _renderCropOperationControl;
|
|
1635
|
+
private _renderFilterControl;
|
|
1636
|
+
private _renderOperationControl;
|
|
1637
|
+
private _renderAspectRatioList;
|
|
1625
1638
|
private _preloadEditedImage;
|
|
1626
1639
|
initCallback(): void;
|
|
1627
1640
|
connectedCallback(): void;
|
|
1628
|
-
firstUpdated(
|
|
1629
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
1641
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1642
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1630
1643
|
disconnectedCallback(): void;
|
|
1631
|
-
private
|
|
1632
|
-
private
|
|
1633
|
-
private
|
|
1634
|
-
private
|
|
1635
|
-
private
|
|
1636
|
-
private
|
|
1637
|
-
private
|
|
1638
|
-
private
|
|
1644
|
+
private _assignSharedElements;
|
|
1645
|
+
private readonly _handleCancel;
|
|
1646
|
+
private readonly _handleApply;
|
|
1647
|
+
private readonly _handleApplySlider;
|
|
1648
|
+
private readonly _handleCancelSlider;
|
|
1649
|
+
private readonly _handleTabClick;
|
|
1650
|
+
private _renderTabToggle;
|
|
1651
|
+
private _renderTabContent;
|
|
1639
1652
|
render(): TemplateResult<1>;
|
|
1640
1653
|
}
|
|
1641
1654
|
|
|
@@ -1649,26 +1662,26 @@ declare class BtnUi extends LitBlock {
|
|
|
1649
1662
|
ariaRole: string;
|
|
1650
1663
|
ariaControls: string;
|
|
1651
1664
|
titleProp: string;
|
|
1652
|
-
protected firstUpdated(
|
|
1665
|
+
protected firstUpdated(changed: PropertyValues<this>): void;
|
|
1653
1666
|
protected updated(changed: PropertyValues<this>): void;
|
|
1654
|
-
private
|
|
1655
|
-
private
|
|
1656
|
-
private get
|
|
1657
|
-
private get
|
|
1658
|
-
private get
|
|
1667
|
+
private _applyReverse;
|
|
1668
|
+
private _applyThemeClass;
|
|
1669
|
+
private get _iconClassMap();
|
|
1670
|
+
private get _computedIconHidden();
|
|
1671
|
+
private get _computedIconSingle();
|
|
1659
1672
|
render(): lit_html.TemplateResult<1>;
|
|
1660
1673
|
}
|
|
1661
1674
|
|
|
1662
1675
|
declare class LineLoaderUi extends LitBlock {
|
|
1663
1676
|
active: boolean;
|
|
1664
|
-
private readonly
|
|
1677
|
+
private readonly _lineRef;
|
|
1665
1678
|
private _isAnimating;
|
|
1666
|
-
private readonly
|
|
1667
|
-
protected firstUpdated(
|
|
1679
|
+
private readonly _handleTransitionEndRight;
|
|
1680
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1668
1681
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1669
|
-
private
|
|
1670
|
-
private
|
|
1671
|
-
private
|
|
1682
|
+
private _start;
|
|
1683
|
+
private _stop;
|
|
1684
|
+
private _resetLine;
|
|
1672
1685
|
render(): lit_html.TemplateResult<1>;
|
|
1673
1686
|
}
|
|
1674
1687
|
|
|
@@ -1683,13 +1696,13 @@ declare class PresenceToggle extends LitBlock {
|
|
|
1683
1696
|
private _visibleStyle;
|
|
1684
1697
|
private _hiddenStyle;
|
|
1685
1698
|
private _externalTransitions;
|
|
1686
|
-
private
|
|
1699
|
+
private _initialRenderComplete;
|
|
1687
1700
|
set visible(value: boolean);
|
|
1688
1701
|
get visible(): boolean;
|
|
1689
1702
|
set styles(styles: PresenceToggleStyle);
|
|
1690
1703
|
get styles(): PresenceToggleStyle;
|
|
1691
1704
|
private _handleVisible;
|
|
1692
|
-
private
|
|
1705
|
+
private _dispatchInitialRenderEvent;
|
|
1693
1706
|
initCallback(): void;
|
|
1694
1707
|
}
|
|
1695
1708
|
|
|
@@ -1698,9 +1711,9 @@ declare class SliderUi extends LitBlock {
|
|
|
1698
1711
|
private _thumbSize;
|
|
1699
1712
|
private _zeroDotEl?;
|
|
1700
1713
|
private _stepsCount?;
|
|
1701
|
-
private readonly
|
|
1702
|
-
private readonly
|
|
1703
|
-
private readonly
|
|
1714
|
+
private readonly _inputRef;
|
|
1715
|
+
private readonly _thumbRef;
|
|
1716
|
+
private readonly _stepsRef;
|
|
1704
1717
|
disabled: boolean;
|
|
1705
1718
|
min: number;
|
|
1706
1719
|
max: number;
|
|
@@ -1708,12 +1721,12 @@ declare class SliderUi extends LitBlock {
|
|
|
1708
1721
|
zero: number;
|
|
1709
1722
|
private _currentValue;
|
|
1710
1723
|
constructor();
|
|
1711
|
-
private
|
|
1712
|
-
private readonly
|
|
1713
|
-
private readonly
|
|
1714
|
-
private readonly
|
|
1715
|
-
private readonly
|
|
1716
|
-
protected firstUpdated(changedProperties:
|
|
1724
|
+
private _emitSliderEvent;
|
|
1725
|
+
private readonly _handleSliderInput;
|
|
1726
|
+
private readonly _handleSliderChange;
|
|
1727
|
+
private readonly _handleInputFocus;
|
|
1728
|
+
private readonly _handleInputBlur;
|
|
1729
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1717
1730
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1718
1731
|
private _updateValue;
|
|
1719
1732
|
private _updateZeroDot;
|
|
@@ -1725,22 +1738,4 @@ declare class SliderUi extends LitBlock {
|
|
|
1725
1738
|
render(): lit_html.TemplateResult<1>;
|
|
1726
1739
|
}
|
|
1727
1740
|
|
|
1728
|
-
declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
1729
|
-
static styleAttrs: string[];
|
|
1730
|
-
constructor();
|
|
1731
|
-
initCallback(): void;
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
declare function defineComponents(blockExports: Record<string, any>): void;
|
|
1735
|
-
|
|
1736
|
-
declare class Icon extends LitBlock {
|
|
1737
|
-
name: string;
|
|
1738
|
-
private resolvedHref;
|
|
1739
|
-
private iconHrefResolver;
|
|
1740
|
-
initCallback(): void;
|
|
1741
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1742
|
-
private updateResolvedHref;
|
|
1743
|
-
render(): lit_html.TemplateResult<1>;
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
1741
|
export { BtnUi, CloudImageEditor, CloudImageEditorBlock, Config, CropFrame, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, Icon, LineLoaderUi, PresenceToggle, SliderUi, defineComponents };
|