@uploadcare/file-uploader 1.25.0-alpha.9 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract/loadFileUploaderFrom.js +2 -2
- package/dist/env.js +3 -3
- package/dist/index.css +3 -3
- package/dist/index.d.ts +2206 -1890
- package/dist/index.js +5 -5
- package/dist/index.layered.css +3 -3
- package/dist/index.ssr.js +4 -21
- package/dist/locales/file-uploader/ar.js +2 -2
- package/dist/locales/file-uploader/az.js +2 -2
- package/dist/locales/file-uploader/ca.js +2 -2
- package/dist/locales/file-uploader/cs.js +2 -2
- package/dist/locales/file-uploader/da.js +2 -2
- package/dist/locales/file-uploader/de.js +2 -2
- package/dist/locales/file-uploader/el.js +2 -2
- package/dist/locales/file-uploader/en.js +2 -2
- package/dist/locales/file-uploader/es.js +2 -2
- package/dist/locales/file-uploader/et.js +2 -2
- package/dist/locales/file-uploader/fi.js +2 -2
- package/dist/locales/file-uploader/fr.js +2 -2
- package/dist/locales/file-uploader/he.js +2 -2
- package/dist/locales/file-uploader/hy.js +2 -2
- package/dist/locales/file-uploader/is.js +2 -2
- package/dist/locales/file-uploader/it.js +2 -2
- package/dist/locales/file-uploader/ja.js +2 -2
- package/dist/locales/file-uploader/ka.js +2 -2
- package/dist/locales/file-uploader/kk.js +2 -2
- package/dist/locales/file-uploader/ko.js +2 -2
- package/dist/locales/file-uploader/lv.js +2 -2
- package/dist/locales/file-uploader/nb.js +2 -2
- package/dist/locales/file-uploader/nl.js +2 -2
- package/dist/locales/file-uploader/pl.js +2 -2
- package/dist/locales/file-uploader/pt.js +2 -2
- package/dist/locales/file-uploader/ro.js +2 -2
- package/dist/locales/file-uploader/ru.js +2 -2
- package/dist/locales/file-uploader/sk.js +2 -2
- package/dist/locales/file-uploader/sr.js +2 -2
- package/dist/locales/file-uploader/sv.js +2 -2
- package/dist/locales/file-uploader/tr.js +2 -2
- package/dist/locales/file-uploader/uk.js +2 -2
- package/dist/locales/file-uploader/vi.js +2 -2
- package/dist/locales/file-uploader/zh-TW.js +2 -2
- package/dist/locales/file-uploader/zh.js +2 -2
- package/package.json +13 -6
- package/web/file-uploader.iife.min.d.ts +2448 -2002
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.iife.min.js.LEGAL.txt +2 -2
- package/web/file-uploader.min.d.ts +2448 -2002
- package/web/file-uploader.min.js +4 -4
- package/web/file-uploader.min.js.LEGAL.txt +2 -2
- package/web/uc-basic.layered.min.css +3 -3
- package/web/uc-basic.min.css +3 -3
- package/web/uc-cloud-image-editor.layered.min.css +3 -3
- package/web/uc-cloud-image-editor.min.css +3 -3
- package/web/uc-cloud-image-editor.min.d.ts +1421 -372
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.layered.min.css +3 -3
- package/web/uc-file-uploader-inline.min.css +3 -3
- package/web/uc-file-uploader-inline.min.d.ts +2448 -2002
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-inline.min.js.LEGAL.txt +2 -2
- package/web/uc-file-uploader-minimal.layered.min.css +3 -3
- package/web/uc-file-uploader-minimal.min.css +3 -3
- package/web/uc-file-uploader-minimal.min.d.ts +2448 -2002
- package/web/uc-file-uploader-minimal.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +2 -2
- package/web/uc-file-uploader-regular.layered.min.css +3 -3
- package/web/uc-file-uploader-regular.min.css +3 -3
- package/web/uc-file-uploader-regular.min.d.ts +2448 -2002
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-file-uploader-regular.min.js.LEGAL.txt +2 -2
- package/web/uc-img.min.d.ts +5 -0
- package/web/uc-img.min.js +4 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { LitElement, PropertyValues,
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult, nothing } from 'lit';
|
|
2
2
|
import * as lit_html from 'lit-html';
|
|
3
3
|
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
4
|
-
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
5
4
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
6
|
-
import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup,
|
|
5
|
+
import { UploadcareFile, Metadata, FileFromOptions, UploadError, NetworkError, UploadcareGroup, Queue } from '@uploadcare/upload-client';
|
|
7
6
|
export { Metadata, NetworkError, UploadError, UploadcareError, UploadcareFile, UploadcareGroup } from '@uploadcare/upload-client';
|
|
8
7
|
import { Ref } from 'lit/directives/ref.js';
|
|
8
|
+
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
9
9
|
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
declare class PubSub<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
10
|
+
type Unsubscriber = () => void;
|
|
11
|
+
declare class PubSub<T extends Record<string, unknown>> {
|
|
14
12
|
private static _contexts;
|
|
15
13
|
private _store;
|
|
14
|
+
private _ctxId;
|
|
16
15
|
private constructor();
|
|
16
|
+
get id(): string;
|
|
17
17
|
pub<K extends keyof T>(key: K, value: T[K]): void;
|
|
18
|
-
sub<K extends keyof T>(key: K, callback: (value: T[K]) => void, init?: boolean):
|
|
18
|
+
sub<K extends keyof T>(key: K, callback: (value: T[K]) => void, init?: boolean): Unsubscriber;
|
|
19
19
|
read<K extends keyof T>(key: K): T[K];
|
|
20
20
|
add<K extends keyof T>(key: K, value: T[K], rewrite?: boolean): void;
|
|
21
21
|
has(key: keyof T): boolean;
|
|
@@ -45,6 +45,7 @@ declare class SymbioteComponent<TState extends Record<string, unknown> = Record<
|
|
|
45
45
|
[K in keyof T]: K extends keyof TState ? TState[K] : never;
|
|
46
46
|
}>(obj: T, rewrite?: boolean): void;
|
|
47
47
|
initCallback(): void;
|
|
48
|
+
sharedCtx: PubSub<TState>;
|
|
48
49
|
ctxName: string;
|
|
49
50
|
ctxOwner: boolean;
|
|
50
51
|
}
|
|
@@ -84,11 +85,142 @@ declare global {
|
|
|
84
85
|
*/
|
|
85
86
|
declare function loadFileUploaderFrom(url: string, register?: boolean): Promise<IndexModule | null>;
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
declare const _default: {
|
|
89
|
+
'locale-id': string;
|
|
90
|
+
'social-source-lang': string;
|
|
91
|
+
'upload-file': string;
|
|
92
|
+
'upload-files': string;
|
|
93
|
+
'choose-file': string;
|
|
94
|
+
'choose-files': string;
|
|
95
|
+
'drop-files-here': string;
|
|
96
|
+
'select-file-source': string;
|
|
97
|
+
selected: string;
|
|
98
|
+
upload: string;
|
|
99
|
+
'add-more': string;
|
|
100
|
+
cancel: string;
|
|
101
|
+
'start-from-cancel': string;
|
|
102
|
+
clear: string;
|
|
103
|
+
'camera-shot': string;
|
|
104
|
+
'upload-url': string;
|
|
105
|
+
'upload-url-placeholder': string;
|
|
106
|
+
'edit-image': string;
|
|
107
|
+
'edit-detail': string;
|
|
108
|
+
back: string;
|
|
109
|
+
done: string;
|
|
110
|
+
ok: string;
|
|
111
|
+
'remove-from-list': string;
|
|
112
|
+
no: string;
|
|
113
|
+
yes: string;
|
|
114
|
+
'confirm-your-action': string;
|
|
115
|
+
'are-you-sure': string;
|
|
116
|
+
'selected-count': string;
|
|
117
|
+
'select-all': string;
|
|
118
|
+
'deselect-all': string;
|
|
119
|
+
'upload-error': string;
|
|
120
|
+
'validation-error': string;
|
|
121
|
+
'no-files': string;
|
|
122
|
+
browse: string;
|
|
123
|
+
'not-uploaded-yet': string;
|
|
124
|
+
file__one: string;
|
|
125
|
+
file__other: string;
|
|
126
|
+
error__one: string;
|
|
127
|
+
error__other: string;
|
|
128
|
+
'header-uploading': string;
|
|
129
|
+
'header-failed': string;
|
|
130
|
+
'header-succeed': string;
|
|
131
|
+
'header-total': string;
|
|
132
|
+
'src-type-local': string;
|
|
133
|
+
'src-type-from-url': string;
|
|
134
|
+
'src-type-camera': string;
|
|
135
|
+
'src-type-mobile-video-camera': string;
|
|
136
|
+
'src-type-mobile-photo-camera': string;
|
|
137
|
+
'src-type-draw': string;
|
|
138
|
+
'src-type-facebook': string;
|
|
139
|
+
'src-type-dropbox': string;
|
|
140
|
+
'src-type-gdrive': string;
|
|
141
|
+
'src-type-ngdrive': string;
|
|
142
|
+
'src-type-gphotos': string;
|
|
143
|
+
'src-type-flickr': string;
|
|
144
|
+
'src-type-vk': string;
|
|
145
|
+
'src-type-evernote': string;
|
|
146
|
+
'src-type-box': string;
|
|
147
|
+
'src-type-onedrive': string;
|
|
148
|
+
'src-type-huddle': string;
|
|
149
|
+
'src-type-other': string;
|
|
150
|
+
'caption-from-url': string;
|
|
151
|
+
'caption-camera': string;
|
|
152
|
+
'caption-draw': string;
|
|
153
|
+
'caption-edit-file': string;
|
|
154
|
+
'file-no-name': string;
|
|
155
|
+
'toggle-fullscreen': string;
|
|
156
|
+
'toggle-guides': string;
|
|
157
|
+
rotate: string;
|
|
158
|
+
'flip-vertical': string;
|
|
159
|
+
'flip-horizontal': string;
|
|
160
|
+
apply: string;
|
|
161
|
+
brightness: string;
|
|
162
|
+
contrast: string;
|
|
163
|
+
saturation: string;
|
|
164
|
+
exposure: string;
|
|
165
|
+
gamma: string;
|
|
166
|
+
vibrance: string;
|
|
167
|
+
warmth: string;
|
|
168
|
+
enhance: string;
|
|
169
|
+
original: string;
|
|
170
|
+
resize: string;
|
|
171
|
+
crop: string;
|
|
172
|
+
'select-color': string;
|
|
173
|
+
text: string;
|
|
174
|
+
draw: string;
|
|
175
|
+
'cancel-edit': string;
|
|
176
|
+
'tab-view': string;
|
|
177
|
+
'tab-details': string;
|
|
178
|
+
'file-name': string;
|
|
179
|
+
'file-size': string;
|
|
180
|
+
'cdn-url': string;
|
|
181
|
+
'file-size-unknown': string;
|
|
182
|
+
'camera-permissions-denied': string;
|
|
183
|
+
'camera-permissions-prompt': string;
|
|
184
|
+
'camera-permissions-request': string;
|
|
185
|
+
'files-count-limit-error-title': string;
|
|
186
|
+
'files-count-limit-error-too-few': string;
|
|
187
|
+
'files-count-limit-error-too-many': string;
|
|
188
|
+
'files-max-size-limit-error': string;
|
|
189
|
+
'has-validation-errors': string;
|
|
190
|
+
'images-only-accepted': string;
|
|
191
|
+
'file-type-not-allowed': string;
|
|
192
|
+
'some-files-were-not-uploaded': string;
|
|
193
|
+
'file-item-edit-button': string;
|
|
194
|
+
'file-item-remove-button': string;
|
|
195
|
+
'a11y-editor-tab-filters': string;
|
|
196
|
+
'a11y-editor-tab-tuning': string;
|
|
197
|
+
'a11y-editor-tab-crop': string;
|
|
198
|
+
'a11y-activity-header-button-close': string;
|
|
199
|
+
flip: string;
|
|
200
|
+
mirror: string;
|
|
201
|
+
'a11y-cloud-editor-apply-filter': string;
|
|
202
|
+
'a11y-cloud-editor-apply-crop': string;
|
|
203
|
+
'a11y-cloud-editor-apply-tuning': string;
|
|
204
|
+
'a11y-cloud-editor-apply-aspect-ratio': string;
|
|
205
|
+
finished: string;
|
|
206
|
+
failed: string;
|
|
207
|
+
uploading: string;
|
|
208
|
+
idle: string;
|
|
209
|
+
'a11y-file-item-status': string;
|
|
210
|
+
'waiting-for': string;
|
|
211
|
+
'queued-uploading': string;
|
|
212
|
+
'queued-validation': string;
|
|
213
|
+
validation: string;
|
|
214
|
+
'crop-to-shape': string;
|
|
215
|
+
custom: string;
|
|
216
|
+
'freeform-crop': string;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
type LocaleDefinition = typeof _default;
|
|
88
220
|
type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
|
|
89
221
|
declare const defineLocale: (localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver) => void;
|
|
90
222
|
|
|
91
|
-
declare class A11y {
|
|
223
|
+
declare class A11y implements ISharedInstance {
|
|
92
224
|
private _destroyKeyUX;
|
|
93
225
|
private readonly _scopedWindow;
|
|
94
226
|
constructor();
|
|
@@ -96,18 +228,11 @@ declare class A11y {
|
|
|
96
228
|
destroy(): void;
|
|
97
229
|
}
|
|
98
230
|
|
|
99
|
-
declare class LocaleManager {
|
|
100
|
-
private _blockInstance;
|
|
231
|
+
declare class LocaleManager extends SharedInstance {
|
|
101
232
|
private _localeName;
|
|
102
|
-
constructor(
|
|
233
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
103
234
|
}
|
|
104
235
|
|
|
105
|
-
type EventMap = {
|
|
106
|
-
[T in keyof EventPayload]: CustomEvent<EventPayload[T]>;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(uploaderBlock: LitUploaderBlock): OutputCollectionState<TCollectionStatus, TGroupFlag>;
|
|
110
|
-
|
|
111
236
|
declare class TypedData<T extends Record<string, unknown>> {
|
|
112
237
|
private _ctxId;
|
|
113
238
|
private _data;
|
|
@@ -116,10 +241,63 @@ declare class TypedData<T extends Record<string, unknown>> {
|
|
|
116
241
|
setValue<K extends keyof T>(prop: K, value: T[K]): void;
|
|
117
242
|
setMultipleValues(updObj: Partial<T>): void;
|
|
118
243
|
getValue<K extends keyof T>(prop: K): T[K];
|
|
119
|
-
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void):
|
|
244
|
+
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): Unsubscriber;
|
|
245
|
+
destroy(): void;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
249
|
+
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
250
|
+
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
251
|
+
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
252
|
+
initialValue: T;
|
|
253
|
+
watchList?: (keyof T)[];
|
|
254
|
+
handler?: TypedCollectionObserverHandler<T>;
|
|
255
|
+
};
|
|
256
|
+
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
257
|
+
private static readonly _destroyDelayMs;
|
|
258
|
+
private _ctxId;
|
|
259
|
+
private _data;
|
|
260
|
+
private _watchList;
|
|
261
|
+
private _subsMap;
|
|
262
|
+
private _propertyObservers;
|
|
263
|
+
private _collectionObservers;
|
|
264
|
+
private _items;
|
|
265
|
+
private _removed;
|
|
266
|
+
private _added;
|
|
267
|
+
private _markedToDestroy;
|
|
268
|
+
private _observeTimeout?;
|
|
269
|
+
private _notifyTimeout?;
|
|
270
|
+
private _destroyTimeout?;
|
|
271
|
+
private _notifyObservers;
|
|
272
|
+
private _initialValue;
|
|
273
|
+
constructor(options: TypedCollectionOptions<T>);
|
|
274
|
+
private _notify;
|
|
275
|
+
private _scheduleDestroyMarkedItems;
|
|
276
|
+
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
277
|
+
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
278
|
+
add(init: Partial<T>): Uid;
|
|
279
|
+
hasItem(id: Uid): boolean;
|
|
280
|
+
read(id: Uid): TypedData<T> | null;
|
|
281
|
+
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
282
|
+
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
283
|
+
remove(id: Uid): void;
|
|
284
|
+
clearAll(): void;
|
|
285
|
+
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
286
|
+
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
287
|
+
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
288
|
+
items(): Uid[];
|
|
289
|
+
get size(): number;
|
|
120
290
|
destroy(): void;
|
|
121
291
|
}
|
|
122
292
|
|
|
293
|
+
declare const CameraSourceTypes: Readonly<{
|
|
294
|
+
PHOTO: "photo";
|
|
295
|
+
VIDEO: "video";
|
|
296
|
+
}>;
|
|
297
|
+
type ModeCameraType = (typeof CameraSourceTypes)[keyof typeof CameraSourceTypes];
|
|
298
|
+
|
|
299
|
+
declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(bag: SharedInstancesBag): OutputCollectionState<TCollectionStatus, TGroupFlag>;
|
|
300
|
+
|
|
123
301
|
interface UploadEntryData extends Record<string, unknown> {
|
|
124
302
|
file: File | null;
|
|
125
303
|
externalUrl: string | null;
|
|
@@ -151,198 +329,40 @@ interface UploadEntryData extends Record<string, unknown> {
|
|
|
151
329
|
type UploadEntryTypedData = TypedData<UploadEntryData>;
|
|
152
330
|
type UploadEntryKeys = keyof UploadEntryData;
|
|
153
331
|
|
|
154
|
-
type
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
runOn: 'add' | 'upload' | 'change';
|
|
159
|
-
validator: FuncFileValidator;
|
|
332
|
+
type ApiAddFileCommonOptions = {
|
|
333
|
+
silent?: boolean;
|
|
334
|
+
fileName?: string;
|
|
335
|
+
source?: string;
|
|
160
336
|
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
private _commonFileValidators;
|
|
167
|
-
private _commonCollectionValidators;
|
|
168
|
-
private _queue;
|
|
169
|
-
private _runQueueDebounced;
|
|
170
|
-
private _entryValidationState;
|
|
171
|
-
constructor(blockInstance: LitUploaderBlock);
|
|
172
|
-
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: Uid[]): void;
|
|
173
|
-
runCollectionValidators(): void;
|
|
174
|
-
cleanupValidationForEntry(entry: TypedData<UploadEntryData>): void;
|
|
175
|
-
private _runFileValidatorsForEntry;
|
|
176
|
-
private _addCustomTypeToValidationError;
|
|
177
|
-
private _getEntryValidationState;
|
|
178
|
-
private _getValidatorDescriptors;
|
|
179
|
-
private _getValidatorDescriptorsForEntry;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
type CameraMode = 'photo' | 'video';
|
|
183
|
-
declare class CameraSource extends LitUploaderBlock {
|
|
184
|
-
couldBeCtxOwner: boolean;
|
|
185
|
-
activityType: "camera";
|
|
186
|
-
private _unsubPermissions;
|
|
187
|
-
private _capturing;
|
|
188
|
-
private _chunks;
|
|
189
|
-
private _mediaRecorder;
|
|
190
|
-
private _stream;
|
|
191
|
-
private _selectedAudioId;
|
|
192
|
-
private _selectedCameraId;
|
|
193
|
-
private _activeTab;
|
|
194
|
-
private _options;
|
|
195
|
-
private _canvas;
|
|
196
|
-
private _ctx;
|
|
197
|
-
private _cameraDevices;
|
|
198
|
-
private _audioDevices;
|
|
199
|
-
private _permissionResponses;
|
|
200
|
-
private _permissionCleanupFns;
|
|
201
|
-
private _currentVideoSource;
|
|
202
|
-
private readonly _handlePreviewPlay;
|
|
203
|
-
private readonly _handlePreviewPause;
|
|
204
|
-
private _timerRef;
|
|
205
|
-
private _lineRef;
|
|
206
|
-
private _videoRef;
|
|
207
|
-
private _switcherRef;
|
|
208
|
-
private _startTime;
|
|
209
|
-
private _elapsedTime;
|
|
210
|
-
private _videoTransformCss;
|
|
211
|
-
private _videoHidden;
|
|
212
|
-
private _messageHidden;
|
|
213
|
-
private _requestBtnHidden;
|
|
214
|
-
private _cameraSelectOptions;
|
|
215
|
-
private _cameraSelectHidden;
|
|
216
|
-
private _l10nMessage;
|
|
217
|
-
private _timerHidden;
|
|
218
|
-
private _cameraHidden;
|
|
219
|
-
private _cameraActionsHidden;
|
|
220
|
-
private _audioSelectOptions;
|
|
221
|
-
private _audioSelectHidden;
|
|
222
|
-
private _audioSelectDisabled;
|
|
223
|
-
private _audioToggleMicrophoneHidden;
|
|
224
|
-
private _tabCameraHidden;
|
|
225
|
-
private _tabVideoHidden;
|
|
226
|
-
private _currentIcon;
|
|
227
|
-
private _currentTimelineIcon;
|
|
228
|
-
private _toggleMicrophoneIcon;
|
|
229
|
-
private _mutableClassButton;
|
|
230
|
-
private _chooseActionWithCamera;
|
|
231
|
-
private _handleCameraSelectChange;
|
|
232
|
-
private _handleAudioSelectChange;
|
|
233
|
-
private _handleRequestPermissions;
|
|
234
|
-
private _handleStartCamera;
|
|
235
|
-
private _handleToggleRecording;
|
|
236
|
-
private _handleToggleAudio;
|
|
237
|
-
private _handleRetake;
|
|
238
|
-
private _handleAccept;
|
|
239
|
-
private _handleClickTab;
|
|
240
|
-
private _updateTimer;
|
|
241
|
-
private _startTimer;
|
|
242
|
-
private _stopTimer;
|
|
243
|
-
private _startTimeline;
|
|
244
|
-
private _stopTimeline;
|
|
245
|
-
private _animationFrameId;
|
|
246
|
-
private _startRecording;
|
|
247
|
-
private _stopRecording;
|
|
248
|
-
/** This method is used to toggle recording pause/resume */
|
|
249
|
-
private _toggleRecording;
|
|
250
|
-
private _toggleEnableAudio;
|
|
251
|
-
/**
|
|
252
|
-
* Previewing the video that was recorded on the camera
|
|
253
|
-
*/
|
|
254
|
-
private _previewVideo;
|
|
255
|
-
private _attachPreviewListeners;
|
|
256
|
-
private _detachPreviewListeners;
|
|
257
|
-
private _setVideoSource;
|
|
258
|
-
/**
|
|
259
|
-
* Do not bind srcObject directly in the template, because it stops video pausing on shot.
|
|
260
|
-
* I really don'y know why but that's how it is. Assigning srcObject manually fixes the issue.
|
|
261
|
-
*/
|
|
262
|
-
private _applyVideoSource;
|
|
263
|
-
private _retake;
|
|
264
|
-
private _accept;
|
|
265
|
-
private _handlePhoto;
|
|
266
|
-
private _handleVideo;
|
|
267
|
-
private _setCameraState;
|
|
268
|
-
private _shot;
|
|
269
|
-
private _handleActiveTab;
|
|
270
|
-
private _createFile;
|
|
271
|
-
private _guessExtensionByMime;
|
|
337
|
+
declare class UploaderPublicApi extends SharedInstance {
|
|
338
|
+
private _l10n;
|
|
339
|
+
get _uploadCollection(): TypedCollection<UploadEntryData>;
|
|
340
|
+
get cfg(): Readonly<ConfigType>;
|
|
341
|
+
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
272
342
|
/**
|
|
273
|
-
*
|
|
343
|
+
* TODO: Probably we should not allow user to override `source` property
|
|
274
344
|
*/
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Config keys that can't be passed as attribute (because they are object or function)
|
|
299
|
-
*/
|
|
300
|
-
declare const complexConfigKeys: readonly ["metadata", "localeDefinitionOverride", "secureUploadsSignatureResolver", "secureDeliveryProxyUrlResolver", "iconHrefResolver", "fileValidators", "collectionValidators", "mediaRecorderOptions"];
|
|
301
|
-
/** Mapping of attribute names to state */
|
|
302
|
-
declare const attrStateMapping: Record<string, string>;
|
|
303
|
-
declare class Config extends LitBlock {
|
|
304
|
-
attributesMeta: Partial<ConfigPlainType> & {
|
|
305
|
-
'ctx-name': string;
|
|
306
|
-
};
|
|
307
|
-
init$: LitBlock["init$"] & ConfigType;
|
|
308
|
-
private _computationControllers;
|
|
309
|
-
private _flushValueToAttribute;
|
|
310
|
-
private _flushValueToState;
|
|
311
|
-
private _setValue;
|
|
312
|
-
private _getValue;
|
|
313
|
-
private _assertSameValueDifferentReference;
|
|
314
|
-
initCallback(): void;
|
|
315
|
-
attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
|
|
316
|
-
static get observedAttributes(): string[];
|
|
317
|
-
}
|
|
318
|
-
interface Config extends ConfigType {
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
type FilesViewMode = 'grid' | 'list';
|
|
322
|
-
declare class UploadList extends LitUploaderBlock {
|
|
323
|
-
couldBeCtxOwner: boolean;
|
|
324
|
-
protected historyTracked: boolean;
|
|
325
|
-
activityType: "upload-list";
|
|
326
|
-
private _doneBtnVisible;
|
|
327
|
-
private _doneBtnEnabled;
|
|
328
|
-
private _uploadBtnVisible;
|
|
329
|
-
private _addMoreBtnVisible;
|
|
330
|
-
private _addMoreBtnEnabled;
|
|
331
|
-
private _commonErrorMessage;
|
|
332
|
-
private _hasFiles;
|
|
333
|
-
private _latestSummary;
|
|
334
|
-
private get _headerText();
|
|
335
|
-
private _handleAdd;
|
|
336
|
-
private _handleUpload;
|
|
337
|
-
private _handleDone;
|
|
338
|
-
private _handleCancel;
|
|
339
|
-
private _throttledHandleCollectionUpdate;
|
|
340
|
-
private _updateUploadsState;
|
|
341
|
-
private _getHeaderText;
|
|
342
|
-
get couldOpenActivity(): boolean;
|
|
343
|
-
initCallback(): void;
|
|
344
|
-
disconnectedCallback(): void;
|
|
345
|
-
render(): lit_html.TemplateResult<1>;
|
|
345
|
+
addFileFromUrl: (url: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
346
|
+
addFileFromUuid: (uuid: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
347
|
+
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
348
|
+
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: ApiAddFileCommonOptions & {
|
|
349
|
+
fullPath?: string;
|
|
350
|
+
}) => OutputFileEntry<"idle">;
|
|
351
|
+
removeFileByInternalId: (internalId: string) => void;
|
|
352
|
+
removeAllFiles(): void;
|
|
353
|
+
uploadAll: () => void;
|
|
354
|
+
openSystemDialog: (options?: {
|
|
355
|
+
captureCamera?: boolean;
|
|
356
|
+
modeCamera?: ModeCameraType;
|
|
357
|
+
}) => void;
|
|
358
|
+
getOutputItem<TStatus extends OutputFileStatus>(entryId: string): OutputFileEntry<TStatus>;
|
|
359
|
+
getOutputCollectionState<TStatus extends OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
|
|
360
|
+
initFlow: (force?: boolean) => void;
|
|
361
|
+
doneFlow: () => void;
|
|
362
|
+
setCurrentActivity: <T extends RegisteredActivityType>(activityType: T, ...params: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] : T extends RegisteredActivityType ? [undefined?] : [never]) => void;
|
|
363
|
+
getCurrentActivity: () => ActivityType;
|
|
364
|
+
setModalState: (opened: boolean) => void;
|
|
365
|
+
private get _sourceList();
|
|
346
366
|
}
|
|
347
367
|
|
|
348
368
|
declare const ExternalUploadSource: Readonly<{
|
|
@@ -380,1250 +400,960 @@ declare const UploadSource: Readonly<{
|
|
|
380
400
|
}>;
|
|
381
401
|
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
382
402
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
private
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
403
|
+
declare class LitUploaderBlock extends LitActivityBlock {
|
|
404
|
+
static extSrcList: Readonly<typeof ExternalUploadSource>;
|
|
405
|
+
static sourceTypes: Readonly<typeof UploadSource>;
|
|
406
|
+
protected couldBeCtxOwner: boolean;
|
|
407
|
+
private _isCtxOwner;
|
|
408
|
+
private _unobserveCollection?;
|
|
409
|
+
private _unobserveCollectionProperties?;
|
|
410
|
+
init$: {
|
|
411
|
+
'*commonProgress': number;
|
|
412
|
+
'*uploadList': never[];
|
|
413
|
+
'*uploadQueue': _uploadcare_upload_client.Queue;
|
|
414
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
415
|
+
'*collectionState': OutputCollectionState | null;
|
|
416
|
+
'*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
|
|
417
|
+
'*uploadTrigger': Set<string>;
|
|
418
|
+
'*currentActivity': null;
|
|
419
|
+
'*currentActivityParams': {};
|
|
420
|
+
'*history': never[];
|
|
421
|
+
'*historyBack': null;
|
|
422
|
+
'*closeModal': () => void;
|
|
423
|
+
};
|
|
424
|
+
private get _hasCtxOwner();
|
|
425
|
+
initCallback(): void;
|
|
426
|
+
getAPI(): UploaderPublicApi;
|
|
427
|
+
get validationManager(): ValidationManager;
|
|
428
|
+
get api(): UploaderPublicApi;
|
|
429
|
+
get uploadCollection(): TypedCollection<UploadEntryData>;
|
|
430
|
+
get secureUploadsManager(): SecureUploadsManager;
|
|
431
|
+
disconnectedCallback(): void;
|
|
432
|
+
connectedCallback(): void;
|
|
433
|
+
private _initCtxOwner;
|
|
434
|
+
private _observeUploadCollection;
|
|
435
|
+
private _unobserveUploadCollection;
|
|
436
|
+
private _createGroup;
|
|
437
|
+
private _flushOutputItems;
|
|
438
|
+
private _handleCollectionUpdate;
|
|
439
|
+
private _handleCollectionPropertiesUpdate;
|
|
440
|
+
private _flushCommonUploadProgress;
|
|
441
|
+
private _openCloudImageEditor;
|
|
442
|
+
private _setInitialCrop;
|
|
443
|
+
protected getMetadataFor(entryId: string): Promise<_uploadcare_upload_client.Metadata | undefined>;
|
|
444
|
+
protected getUploadClientOptions(): Promise<FileFromOptions>;
|
|
445
|
+
getOutputData(): OutputFileEntry[];
|
|
426
446
|
}
|
|
427
447
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
448
|
+
/**
|
|
449
|
+
* Mapping of loading resources per operation
|
|
450
|
+
*/
|
|
451
|
+
type LoadingOperations = Map<string, Map<string, boolean>>;
|
|
452
|
+
/**
|
|
453
|
+
* Image size
|
|
454
|
+
*/
|
|
455
|
+
interface ImageSize {
|
|
456
|
+
width: number;
|
|
457
|
+
height: number;
|
|
458
|
+
}
|
|
459
|
+
interface Transformations {
|
|
460
|
+
enhance?: number;
|
|
461
|
+
brightness?: number;
|
|
462
|
+
exposure?: number;
|
|
463
|
+
gamma?: number;
|
|
464
|
+
contrast?: number;
|
|
465
|
+
saturation?: number;
|
|
466
|
+
vibrance?: number;
|
|
467
|
+
warmth?: number;
|
|
468
|
+
rotate?: number;
|
|
469
|
+
mirror?: boolean;
|
|
470
|
+
flip?: boolean;
|
|
471
|
+
filter?: {
|
|
472
|
+
name: string;
|
|
473
|
+
amount: number;
|
|
474
|
+
};
|
|
475
|
+
crop?: {
|
|
476
|
+
dimensions: [number, number];
|
|
477
|
+
coords: [number, number];
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
interface ApplyResult {
|
|
481
|
+
originalUrl: string;
|
|
482
|
+
cdnUrlModifiers: string;
|
|
483
|
+
cdnUrl: string;
|
|
484
|
+
transformations: Transformations;
|
|
485
|
+
}
|
|
486
|
+
type ChangeResult = ApplyResult;
|
|
487
|
+
interface CropAspectRatio {
|
|
488
|
+
type: 'aspect-ratio';
|
|
489
|
+
width: number;
|
|
490
|
+
height: number;
|
|
491
|
+
id: string;
|
|
492
|
+
hasFreeform?: boolean;
|
|
493
|
+
}
|
|
494
|
+
type CropPresetList = CropAspectRatio[];
|
|
433
495
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
496
|
+
declare function initState(fnCtx: CloudImageEditorBlock): {
|
|
497
|
+
'*originalUrl': null;
|
|
498
|
+
'*loadingOperations': LoadingOperations;
|
|
499
|
+
'*faderEl': null;
|
|
500
|
+
'*cropperEl': null;
|
|
501
|
+
'*imgEl': null;
|
|
502
|
+
'*imgContainerEl': null;
|
|
503
|
+
'*networkProblems': boolean;
|
|
504
|
+
'*imageSize': null;
|
|
505
|
+
'*editorTransformations': {};
|
|
506
|
+
'*cropPresetList': never[];
|
|
507
|
+
'*currentAspectRatio': null;
|
|
508
|
+
'*tabList': readonly ["crop", "tuning", "filters"];
|
|
509
|
+
'*tabId': "crop";
|
|
510
|
+
'*on.retryNetwork': () => void;
|
|
511
|
+
'*on.apply': (transformations: Transformations) => void;
|
|
512
|
+
'*on.cancel': () => void;
|
|
438
513
|
};
|
|
439
|
-
declare class UploaderPublicApi {
|
|
440
|
-
private _ctx;
|
|
441
|
-
constructor(ctx: LitUploaderBlock);
|
|
442
|
-
get _uploadCollection(): TypedCollection<UploadEntryData>;
|
|
443
|
-
get cfg(): ConfigType;
|
|
444
|
-
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
445
|
-
/**
|
|
446
|
-
* TODO: Probably we should not allow user to override `source` property
|
|
447
|
-
*/
|
|
448
|
-
addFileFromUrl: (url: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
449
|
-
addFileFromUuid: (uuid: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
450
|
-
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
451
|
-
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: ApiAddFileCommonOptions & {
|
|
452
|
-
fullPath?: string;
|
|
453
|
-
}) => OutputFileEntry<"idle">;
|
|
454
|
-
removeFileByInternalId: (internalId: string) => void;
|
|
455
|
-
removeAllFiles(): void;
|
|
456
|
-
uploadAll: () => void;
|
|
457
|
-
openSystemDialog: (options?: {
|
|
458
|
-
captureCamera?: boolean;
|
|
459
|
-
modeCamera?: ModeCameraType;
|
|
460
|
-
}) => void;
|
|
461
|
-
getOutputItem<TStatus extends OutputFileStatus>(entryId: string): OutputFileEntry<TStatus>;
|
|
462
|
-
getOutputCollectionState<TStatus extends OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
|
|
463
|
-
initFlow: (force?: boolean) => void;
|
|
464
|
-
doneFlow: () => void;
|
|
465
|
-
setCurrentActivity: <T extends RegisteredActivityType>(activityType: T, ...params: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] : T extends RegisteredActivityType ? [undefined?] : [never]) => void;
|
|
466
|
-
getCurrentActivity: () => ActivityType;
|
|
467
|
-
setModalState: (opened: boolean) => void;
|
|
468
|
-
private get _sourceList();
|
|
469
|
-
}
|
|
470
514
|
|
|
471
|
-
type
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
cdnUrlModifiers: string;
|
|
476
|
-
fileName: string;
|
|
477
|
-
}) => Promise<string> | string;
|
|
478
|
-
type SecureUploadsSignatureAndExpire = {
|
|
479
|
-
secureSignature: string;
|
|
480
|
-
secureExpire: string;
|
|
515
|
+
type PresenceToggleStyle = {
|
|
516
|
+
transition?: string;
|
|
517
|
+
visible?: string;
|
|
518
|
+
hidden?: string;
|
|
481
519
|
};
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
*/
|
|
548
|
-
maxLocalFileSizeBytes: number;
|
|
549
|
-
/**
|
|
550
|
-
* Thumbnail size.
|
|
551
|
-
*/
|
|
552
|
-
thumbSize: number;
|
|
553
|
-
/**
|
|
554
|
-
* Show the upload list even if it is empty.
|
|
555
|
-
*/
|
|
556
|
-
showEmptyList: boolean;
|
|
557
|
-
/**
|
|
558
|
-
* Use local image editor.
|
|
559
|
-
*/
|
|
560
|
-
useLocalImageEditor: boolean;
|
|
561
|
-
/**
|
|
562
|
-
* Enable cloud image editing.
|
|
563
|
-
*/
|
|
564
|
-
useCloudImageEditor: boolean;
|
|
565
|
-
/**
|
|
566
|
-
* Tabs to show in the cloud image editor.
|
|
567
|
-
*
|
|
568
|
-
* @default 'crop, tuning, filters'
|
|
569
|
-
*/
|
|
570
|
-
cloudImageEditorTabs: string;
|
|
571
|
-
/**
|
|
572
|
-
* Remove copyright information.
|
|
573
|
-
*/
|
|
574
|
-
removeCopyright: boolean;
|
|
575
|
-
/**
|
|
576
|
-
* Defines the crop behavior. When uploading images, your users can select a crop area with a defined aspect ratio.
|
|
577
|
-
*/
|
|
578
|
-
cropPreset: string;
|
|
579
|
-
/**
|
|
580
|
-
* Image shrink options.
|
|
581
|
-
*/
|
|
582
|
-
imageShrink: string;
|
|
583
|
-
/**
|
|
584
|
-
* Lock scroll when modal is open.
|
|
585
|
-
*/
|
|
586
|
-
modalScrollLock: boolean;
|
|
587
|
-
/**
|
|
588
|
-
* Show strokes on modal backdrop.
|
|
589
|
-
*/
|
|
590
|
-
modalBackdropStrokes: boolean;
|
|
591
|
-
/**
|
|
592
|
-
* Wrap the source list.
|
|
593
|
-
*/
|
|
594
|
-
sourceListWrap: boolean;
|
|
595
|
-
/**
|
|
596
|
-
* Key to revoke Custom OAuth access. See [OAuth docs](https://uploadcare.com/docs/upload-sources/#oauth) for details.
|
|
597
|
-
*/
|
|
598
|
-
remoteTabSessionKey: string;
|
|
599
|
-
/**
|
|
600
|
-
* Set custom CNAME.
|
|
601
|
-
*/
|
|
602
|
-
cdnCname: string;
|
|
603
|
-
/**
|
|
604
|
-
* Set CNAME base domain for prefixed CDN URLs.
|
|
605
|
-
*/
|
|
606
|
-
cdnCnamePrefixed: string;
|
|
607
|
-
/**
|
|
608
|
-
* Set a custom upload URL.
|
|
609
|
-
*/
|
|
610
|
-
baseUrl: string;
|
|
611
|
-
/**
|
|
612
|
-
* Set a custom social sources URL.
|
|
613
|
-
*/
|
|
614
|
-
socialBaseUrl: string;
|
|
615
|
-
/**
|
|
616
|
-
* Secure signature for uploads.
|
|
617
|
-
*/
|
|
618
|
-
secureSignature: string;
|
|
619
|
-
/**
|
|
620
|
-
* Expiry time for secure uploads.
|
|
621
|
-
*/
|
|
622
|
-
secureExpire: string;
|
|
623
|
-
/**
|
|
624
|
-
* Proxy URL for secure delivery.
|
|
625
|
-
*/
|
|
626
|
-
secureDeliveryProxy: string;
|
|
627
|
-
/**
|
|
628
|
-
* Maximum number of retry attempts for throttled requests.
|
|
629
|
-
*/
|
|
630
|
-
retryThrottledRequestMaxTimes: number;
|
|
631
|
-
/**
|
|
632
|
-
* Maximum number of retry attempts for network errors.
|
|
633
|
-
*/
|
|
634
|
-
retryNetworkErrorMaxTimes: number;
|
|
635
|
-
/**
|
|
636
|
-
* Minimum file size for multipart uploads.
|
|
637
|
-
*/
|
|
638
|
-
multipartMinFileSize: number;
|
|
639
|
-
/**
|
|
640
|
-
* Chunk size for multipart uploads.
|
|
641
|
-
*/
|
|
642
|
-
multipartChunkSize: number;
|
|
643
|
-
/**
|
|
644
|
-
* Maximum number of concurrent requests.
|
|
645
|
-
*/
|
|
646
|
-
maxConcurrentRequests: number;
|
|
647
|
-
/**
|
|
648
|
-
* Maximum number of concurrent multipart requests.
|
|
649
|
-
*/
|
|
650
|
-
multipartMaxConcurrentRequests: number;
|
|
651
|
-
/**
|
|
652
|
-
* Maximum number of attempts for multipart uploads.
|
|
653
|
-
*/
|
|
654
|
-
multipartMaxAttempts: number;
|
|
655
|
-
/**
|
|
656
|
-
* Check for URL duplicates.
|
|
657
|
-
*/
|
|
658
|
-
checkForUrlDuplicates: boolean;
|
|
659
|
-
/**
|
|
660
|
-
* Save URL for recurrent uploads.
|
|
661
|
-
*/
|
|
662
|
-
saveUrlForRecurrentUploads: boolean;
|
|
663
|
-
/**
|
|
664
|
-
* Group output files.
|
|
665
|
-
*/
|
|
666
|
-
groupOutput: boolean;
|
|
667
|
-
/**
|
|
668
|
-
* User agent integration string.
|
|
669
|
-
*/
|
|
670
|
-
userAgentIntegration: string;
|
|
671
|
-
/**
|
|
672
|
-
* Enable debug mode.
|
|
673
|
-
*/
|
|
674
|
-
debug: boolean;
|
|
520
|
+
declare class PresenceToggle extends LitBlock {
|
|
521
|
+
private _visible;
|
|
522
|
+
private _styles;
|
|
523
|
+
private _visibleStyle;
|
|
524
|
+
private _hiddenStyle;
|
|
525
|
+
private _externalTransitions;
|
|
526
|
+
private _initialRenderComplete;
|
|
527
|
+
set visible(value: boolean);
|
|
528
|
+
get visible(): boolean;
|
|
529
|
+
set styles(styles: PresenceToggleStyle);
|
|
530
|
+
get styles(): PresenceToggleStyle;
|
|
531
|
+
private _handleVisible;
|
|
532
|
+
private _dispatchInitialRenderEvent;
|
|
533
|
+
initCallback(): void;
|
|
534
|
+
}
|
|
535
|
+
declare global {
|
|
536
|
+
interface HTMLElementTagNameMap {
|
|
537
|
+
'uc-presence-toggle': PresenceToggle;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
declare class LineLoaderUi extends LitBlock {
|
|
542
|
+
active: boolean;
|
|
543
|
+
private readonly _lineRef;
|
|
544
|
+
private _isAnimating;
|
|
545
|
+
private readonly _handleTransitionEndRight;
|
|
546
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
547
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
548
|
+
private _start;
|
|
549
|
+
private _stop;
|
|
550
|
+
private _resetLine;
|
|
551
|
+
render(): lit_html.TemplateResult<1>;
|
|
552
|
+
}
|
|
553
|
+
declare global {
|
|
554
|
+
interface HTMLElementTagNameMap {
|
|
555
|
+
'uc-line-loader-ui': LineLoaderUi;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
declare class Icon extends LitBlock {
|
|
560
|
+
name: string;
|
|
561
|
+
private _resolvedHref;
|
|
562
|
+
private _iconHrefResolver;
|
|
563
|
+
initCallback(): void;
|
|
564
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
565
|
+
private _updateResolvedHref;
|
|
566
|
+
render(): lit_html.TemplateResult<1>;
|
|
567
|
+
}
|
|
568
|
+
declare global {
|
|
569
|
+
interface HTMLElementTagNameMap {
|
|
570
|
+
'uc-icon': Icon;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
type AriaRole = 'alert' | 'alertdialog' | 'button' | 'checkbox' | 'dialog' | 'gridcell' | 'link' | 'log' | 'marquee' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'option' | 'progressbar' | 'radio' | 'scrollbar' | 'searchbox' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'tabpanel' | 'textbox' | 'timer' | 'tooltip' | 'treeitem' | 'combobox' | 'grid' | 'listbox' | 'menu' | 'menubar' | 'radiogroup' | 'tablist' | 'tree' | 'treegrid' | 'application' | 'article' | 'cell' | 'columnheader' | 'definition' | 'directory' | 'document' | 'feed' | 'figure' | 'group' | 'heading' | 'img' | 'list' | 'listitem' | 'math' | 'none' | 'note' | 'presentation' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'separator' | 'table' | 'term' | 'text' | 'toolbar' | 'banner' | 'complementary' | 'contentinfo' | 'form' | 'main' | 'navigation' | 'region' | 'search' | 'doc-abstract' | 'doc-acknowledgments' | 'doc-afterword' | 'doc-appendix' | 'doc-backlink' | 'doc-biblioentry' | 'doc-bibliography' | 'doc-biblioref' | 'doc-chapter' | 'doc-colophon' | 'doc-conclusion' | 'doc-cover' | 'doc-credit' | 'doc-credits' | 'doc-dedication' | 'doc-endnote' | 'doc-endnotes' | 'doc-epigraph' | 'doc-epilogue' | 'doc-errata' | 'doc-example' | 'doc-footnote' | 'doc-foreword' | 'doc-glossary' | 'doc-glossref' | 'doc-index' | 'doc-introduction' | 'doc-noteref' | 'doc-notice' | 'doc-pagebreak' | 'doc-pagelist' | 'doc-part' | 'doc-preface' | 'doc-prologue' | 'doc-pullquote' | 'doc-qna' | 'doc-subtitle' | 'doc-tip' | 'doc-toc';
|
|
575
|
+
|
|
576
|
+
type Theme = string | null;
|
|
577
|
+
declare class BtnUi extends LitBlock {
|
|
578
|
+
text: string;
|
|
579
|
+
icon: string;
|
|
580
|
+
reverse: boolean;
|
|
581
|
+
theme: Theme;
|
|
582
|
+
ariaRole: AriaRole | undefined;
|
|
583
|
+
ariaControls: string;
|
|
584
|
+
titleProp: string;
|
|
675
585
|
/**
|
|
676
|
-
*
|
|
586
|
+
* CSS-only attribute
|
|
677
587
|
*/
|
|
678
|
-
|
|
588
|
+
active: boolean;
|
|
589
|
+
protected firstUpdated(changed: PropertyValues<this>): void;
|
|
590
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
591
|
+
private _applyReverse;
|
|
592
|
+
private _applyThemeClass;
|
|
593
|
+
private get _iconClassMap();
|
|
594
|
+
private get _computedIconHidden();
|
|
595
|
+
private get _computedIconSingle();
|
|
596
|
+
render(): lit_html.TemplateResult<1>;
|
|
597
|
+
}
|
|
598
|
+
declare global {
|
|
599
|
+
interface HTMLElementTagNameMap {
|
|
600
|
+
'uc-btn-ui': BtnUi;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
declare class CropFrame extends LitBlock {
|
|
605
|
+
private _backdropMask?;
|
|
606
|
+
private _backdropMaskInner?;
|
|
607
|
+
private readonly _backdropMaskId;
|
|
608
|
+
private _frameThumbs?;
|
|
609
|
+
private _frameGuides?;
|
|
610
|
+
private _draggingThumb?;
|
|
611
|
+
private _hoverThumb?;
|
|
612
|
+
private _dragStartPoint?;
|
|
613
|
+
private _dragStartCrop?;
|
|
614
|
+
private _frameImage?;
|
|
615
|
+
private _guidesHidden;
|
|
616
|
+
private _draggingValue;
|
|
617
|
+
private readonly _svgRef;
|
|
618
|
+
private _svgReady;
|
|
619
|
+
private _pendingMaskHref;
|
|
620
|
+
private get _svgElement();
|
|
621
|
+
private get _dragging();
|
|
622
|
+
private set _dragging(value);
|
|
623
|
+
private _applyGuidesDragState;
|
|
624
|
+
private _shouldThumbBeDisabled;
|
|
625
|
+
private _createBackdrop;
|
|
679
626
|
/**
|
|
680
|
-
*
|
|
627
|
+
* @private Super Tricky workaround for the chromium bug See
|
|
628
|
+
* https://bugs.chromium.org/p/chromium/issues/detail?id=330815
|
|
681
629
|
*/
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* The number of files to validate concurrently.
|
|
717
|
-
*/
|
|
718
|
-
validationConcurrency: number;
|
|
719
|
-
/**
|
|
720
|
-
* The camera modes to enable in the camera modal,
|
|
721
|
-
* it is possible to select photo or video capture.
|
|
722
|
-
* The first mode is the default mode.
|
|
723
|
-
* @default 'photo,video'
|
|
724
|
-
*/
|
|
725
|
-
cameraModes: string;
|
|
726
|
-
/**
|
|
727
|
-
* The default tab to open in the camera modal,
|
|
728
|
-
* it is possible to select video or photo capture
|
|
729
|
-
* @default 'null'
|
|
730
|
-
* @deprecated - use `cameraModes` instead
|
|
731
|
-
*/
|
|
732
|
-
defaultCameraMode: CameraMode | null;
|
|
733
|
-
/**
|
|
734
|
-
* Enable audio recording.
|
|
735
|
-
* @default true
|
|
736
|
-
*/
|
|
737
|
-
enableAudioRecording: boolean;
|
|
738
|
-
/**
|
|
739
|
-
* Enable video recording.
|
|
740
|
-
* @deprecated - use `cameraModes` instead
|
|
741
|
-
* @default null
|
|
742
|
-
*/
|
|
743
|
-
enableVideoRecording: boolean | null;
|
|
744
|
-
/**
|
|
745
|
-
* The maximum duration of the video recording in seconds
|
|
746
|
-
* @default null
|
|
747
|
-
*/
|
|
748
|
-
maxVideoRecordingDuration: number | null;
|
|
749
|
-
/**
|
|
750
|
-
* A dictionary object that can contain
|
|
751
|
-
* the following properties from MediaRecorderOptions
|
|
752
|
-
*/
|
|
753
|
-
mediaRecorderOptions: MediaRecorderOptions | null;
|
|
754
|
-
filesViewMode: FilesViewMode;
|
|
755
|
-
gridShowFileNames: boolean;
|
|
756
|
-
cloudImageEditorAutoOpen: boolean;
|
|
757
|
-
qualityInsights: boolean;
|
|
758
|
-
cloudImageEditorMaskHref: string | null;
|
|
759
|
-
/**
|
|
760
|
-
* Adds data-testid attributes to the each block. Needed for testing purposes.
|
|
761
|
-
* @default false
|
|
762
|
-
*/
|
|
763
|
-
testMode: boolean;
|
|
764
|
-
};
|
|
765
|
-
type ConfigComplexType = Pick<ConfigType, (typeof complexConfigKeys)[number]>;
|
|
766
|
-
type ConfigPlainType = Omit<ConfigType, keyof ConfigComplexType>;
|
|
767
|
-
type ConfigAttributesType = KebabCaseKeys<ConfigPlainType> & LowerCaseKeys<ConfigPlainType>;
|
|
768
|
-
type KebabCase$1<S extends string> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase$1<T>}` : `${Uncapitalize<C>}-${KebabCase$1<T>}` : S;
|
|
769
|
-
type KebabCaseKeys<T extends Record<string, unknown>> = {
|
|
770
|
-
[Key in keyof T as KebabCase$1<Key & string>]: T[Key];
|
|
771
|
-
};
|
|
772
|
-
type LowerCase<S extends string> = Lowercase<S>;
|
|
773
|
-
type LowerCaseKeys<T extends Record<string, unknown>> = {
|
|
774
|
-
[Key in keyof T as Lowercase<Key & string>]: T[Key];
|
|
775
|
-
};
|
|
776
|
-
type OutputFileStatus = 'idle' | 'uploading' | 'success' | 'failed' | 'removed';
|
|
777
|
-
type OutputCustomErrorType = 'CUSTOM_ERROR';
|
|
778
|
-
type OutputFileErrorType = OutputCustomErrorType | 'NOT_AN_IMAGE' | 'FORBIDDEN_FILE_TYPE' | 'FILE_SIZE_EXCEEDED' | 'UPLOAD_ERROR' | 'NETWORK_ERROR' | 'UNKNOWN_ERROR';
|
|
779
|
-
type OutputCollectionErrorType = OutputCustomErrorType | 'SOME_FILES_HAS_ERRORS' | 'TOO_MANY_FILES' | 'TOO_FEW_FILES';
|
|
780
|
-
type OutputFileErrorPayload = {
|
|
781
|
-
entry: OutputFileEntry;
|
|
630
|
+
private _resizeBackdrop;
|
|
631
|
+
private _updateBackdrop;
|
|
632
|
+
private _updateFrame;
|
|
633
|
+
private _createThumb;
|
|
634
|
+
private _createThumbs;
|
|
635
|
+
private _createGuides;
|
|
636
|
+
private _createFrame;
|
|
637
|
+
private _handlePointerDown;
|
|
638
|
+
private readonly _handlePointerUp;
|
|
639
|
+
private readonly _handlePointerMove;
|
|
640
|
+
private _calcCropBox;
|
|
641
|
+
private readonly _handleSvgPointerMove;
|
|
642
|
+
private _updateCursor;
|
|
643
|
+
private _createMask;
|
|
644
|
+
private _updateMask;
|
|
645
|
+
private _render;
|
|
646
|
+
toggleThumbs(visible: boolean): void;
|
|
647
|
+
initCallback(): void;
|
|
648
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
649
|
+
private _initializeSvg;
|
|
650
|
+
disconnectedCallback(): void;
|
|
651
|
+
render(): TemplateResult;
|
|
652
|
+
}
|
|
653
|
+
declare global {
|
|
654
|
+
interface HTMLElementTagNameMap {
|
|
655
|
+
'uc-crop-frame': CropFrame;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
type Operations = {
|
|
660
|
+
flip: boolean;
|
|
661
|
+
mirror: boolean;
|
|
662
|
+
rotate: number;
|
|
782
663
|
};
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
664
|
+
declare class EditorImageCropper extends LitBlock {
|
|
665
|
+
ctxOwner: boolean;
|
|
666
|
+
private _commitDebounced;
|
|
667
|
+
private _handleResizeThrottled;
|
|
668
|
+
private _imageSize;
|
|
669
|
+
private _canvas?;
|
|
670
|
+
private _ctx;
|
|
671
|
+
private _isActive;
|
|
672
|
+
private _observer?;
|
|
673
|
+
private _image;
|
|
674
|
+
private _cancelPreload?;
|
|
675
|
+
private readonly _canvasRef;
|
|
676
|
+
private readonly _frameRef;
|
|
677
|
+
constructor();
|
|
678
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
679
|
+
private _syncTransformations;
|
|
680
|
+
private _initCanvas;
|
|
681
|
+
private _alignImage;
|
|
682
|
+
private _alignCrop;
|
|
683
|
+
private _drawImage;
|
|
684
|
+
private _draw;
|
|
685
|
+
private _animateIn;
|
|
686
|
+
private _getCropDimensions;
|
|
687
|
+
private _getCropTransformation;
|
|
688
|
+
private _commit;
|
|
689
|
+
setValue<K extends keyof Operations>(operation: K, value: Operations[K]): void;
|
|
690
|
+
getValue<K extends keyof Operations>(operation: K): Operations[K];
|
|
691
|
+
activate(imageSize: ImageSize, { fromViewer }?: {
|
|
692
|
+
fromViewer?: boolean;
|
|
693
|
+
}): Promise<void>;
|
|
694
|
+
deactivate({ reset }?: {
|
|
695
|
+
reset?: boolean;
|
|
696
|
+
}): void;
|
|
697
|
+
private _transitionToCrop;
|
|
698
|
+
private _transitionToImage;
|
|
699
|
+
private _reset;
|
|
700
|
+
private _waitForImage;
|
|
701
|
+
private _handleImageLoading;
|
|
702
|
+
initCallback(): void;
|
|
703
|
+
disconnectedCallback(): void;
|
|
704
|
+
render(): TemplateResult;
|
|
705
|
+
}
|
|
706
|
+
declare global {
|
|
707
|
+
interface HTMLElementTagNameMap {
|
|
708
|
+
'uc-editor-image-cropper': EditorImageCropper;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
declare const TabId: Readonly<{
|
|
713
|
+
readonly CROP: "crop";
|
|
714
|
+
readonly TUNING: "tuning";
|
|
715
|
+
readonly FILTERS: "filters";
|
|
716
|
+
}>;
|
|
717
|
+
type TabIdValue$1 = (typeof TabId)[keyof typeof TabId];
|
|
718
|
+
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
719
|
+
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
720
|
+
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"];
|
|
721
|
+
type FilterId = (typeof ALL_FILTERS)[number];
|
|
722
|
+
declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
723
|
+
type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
724
|
+
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
725
|
+
declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
726
|
+
brightness: {
|
|
727
|
+
zero: number;
|
|
728
|
+
range: readonly [-100, 100];
|
|
729
|
+
keypointsNumber: number;
|
|
789
730
|
};
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
731
|
+
exposure: {
|
|
732
|
+
zero: number;
|
|
733
|
+
range: readonly [-500, 500];
|
|
734
|
+
keypointsNumber: number;
|
|
794
735
|
};
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
736
|
+
gamma: {
|
|
737
|
+
zero: number;
|
|
738
|
+
range: readonly [0, 1000];
|
|
739
|
+
keypointsNumber: number;
|
|
799
740
|
};
|
|
800
|
-
|
|
801
|
-
|
|
741
|
+
contrast: {
|
|
742
|
+
zero: number;
|
|
743
|
+
range: readonly [-100, 500];
|
|
744
|
+
keypointsNumber: number;
|
|
802
745
|
};
|
|
803
|
-
|
|
804
|
-
|
|
746
|
+
saturation: {
|
|
747
|
+
zero: number;
|
|
748
|
+
range: readonly [-100, 500];
|
|
749
|
+
keypointsNumber: number;
|
|
805
750
|
};
|
|
806
|
-
|
|
807
|
-
|
|
751
|
+
vibrance: {
|
|
752
|
+
zero: number;
|
|
753
|
+
range: readonly [-100, 500];
|
|
754
|
+
keypointsNumber: number;
|
|
808
755
|
};
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
name: string;
|
|
826
|
-
size: number;
|
|
827
|
-
isImage: boolean;
|
|
828
|
-
mimeType: string;
|
|
829
|
-
metadata: Metadata | null;
|
|
830
|
-
file: File | Blob | null;
|
|
831
|
-
externalUrl: string | null;
|
|
832
|
-
uploadProgress: number;
|
|
833
|
-
fullPath: string | null;
|
|
834
|
-
source: SourceTypes | null;
|
|
835
|
-
isValidationPending: boolean;
|
|
836
|
-
} & ({
|
|
837
|
-
status: 'success';
|
|
838
|
-
fileInfo: UploadcareFile;
|
|
839
|
-
uuid: string;
|
|
840
|
-
cdnUrl: string;
|
|
841
|
-
cdnUrlModifiers: string;
|
|
842
|
-
isUploading: false;
|
|
843
|
-
isSuccess: true;
|
|
844
|
-
isFailed: false;
|
|
845
|
-
isRemoved: false;
|
|
846
|
-
errors: [];
|
|
847
|
-
} | {
|
|
848
|
-
status: 'failed';
|
|
849
|
-
fileInfo: UploadcareFile | null;
|
|
850
|
-
uuid: string | null;
|
|
851
|
-
cdnUrl: string | null;
|
|
852
|
-
cdnUrlModifiers: string | null;
|
|
853
|
-
isUploading: false;
|
|
854
|
-
isSuccess: false;
|
|
855
|
-
isFailed: true;
|
|
856
|
-
isRemoved: false;
|
|
857
|
-
errors: OutputError<OutputFileErrorType>[];
|
|
858
|
-
} | {
|
|
859
|
-
status: 'uploading';
|
|
860
|
-
fileInfo: null;
|
|
861
|
-
uuid: null;
|
|
862
|
-
cdnUrl: null;
|
|
863
|
-
cdnUrlModifiers: null;
|
|
864
|
-
isUploading: true;
|
|
865
|
-
isSuccess: false;
|
|
866
|
-
isFailed: false;
|
|
867
|
-
isRemoved: false;
|
|
868
|
-
errors: [];
|
|
869
|
-
} | {
|
|
870
|
-
status: 'removed';
|
|
871
|
-
fileInfo: UploadcareFile | null;
|
|
872
|
-
uuid: string | null;
|
|
873
|
-
cdnUrl: string | null;
|
|
874
|
-
cdnUrlModifiers: string | null;
|
|
875
|
-
isUploading: false;
|
|
876
|
-
isSuccess: false;
|
|
877
|
-
isFailed: false;
|
|
878
|
-
isRemoved: true;
|
|
879
|
-
errors: OutputError<OutputFileErrorType>[];
|
|
880
|
-
} | {
|
|
881
|
-
status: 'idle';
|
|
882
|
-
fileInfo: null;
|
|
883
|
-
uuid: null;
|
|
884
|
-
cdnUrl: null;
|
|
885
|
-
cdnUrlModifiers: null;
|
|
886
|
-
isUploading: false;
|
|
887
|
-
isSuccess: false;
|
|
888
|
-
isFailed: false;
|
|
889
|
-
isRemoved: false;
|
|
890
|
-
errors: [];
|
|
891
|
-
});
|
|
892
|
-
type OutputCollectionStatus = 'idle' | 'uploading' | 'success' | 'failed';
|
|
893
|
-
type GroupFlag = 'has-group' | 'maybe-has-group';
|
|
894
|
-
type OutputCollectionState<TStatus extends OutputCollectionStatus = OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'> = {
|
|
895
|
-
status: TStatus;
|
|
896
|
-
totalCount: number;
|
|
897
|
-
successCount: number;
|
|
898
|
-
failedCount: number;
|
|
899
|
-
uploadingCount: number;
|
|
900
|
-
progress: number;
|
|
901
|
-
successEntries: OutputFileEntry<'success'>[];
|
|
902
|
-
failedEntries: OutputFileEntry<'failed'>[];
|
|
903
|
-
uploadingEntries: OutputFileEntry<'uploading'>[];
|
|
904
|
-
idleEntries: OutputFileEntry<'idle'>[];
|
|
905
|
-
} & (TGroupFlag extends 'has-group' ? {
|
|
906
|
-
group: UploadcareGroup;
|
|
907
|
-
} : TGroupFlag extends 'maybe-has-group' ? {
|
|
908
|
-
group: UploadcareGroup | null;
|
|
909
|
-
} : never) & ({
|
|
910
|
-
status: 'idle';
|
|
911
|
-
isFailed: false;
|
|
912
|
-
isUploading: false;
|
|
913
|
-
isSuccess: false;
|
|
914
|
-
errors: [];
|
|
915
|
-
allEntries: OutputFileEntry<'idle' | 'success'>[];
|
|
916
|
-
} | {
|
|
917
|
-
status: 'uploading';
|
|
918
|
-
isFailed: false;
|
|
919
|
-
isUploading: true;
|
|
920
|
-
isSuccess: false;
|
|
921
|
-
errors: [];
|
|
922
|
-
allEntries: OutputFileEntry[];
|
|
923
|
-
} | {
|
|
924
|
-
status: 'success';
|
|
925
|
-
isFailed: false;
|
|
926
|
-
isUploading: false;
|
|
927
|
-
isSuccess: true;
|
|
928
|
-
errors: [];
|
|
929
|
-
allEntries: OutputFileEntry<'success'>[];
|
|
930
|
-
} | {
|
|
931
|
-
status: 'failed';
|
|
932
|
-
isFailed: true;
|
|
933
|
-
isUploading: false;
|
|
934
|
-
isSuccess: false;
|
|
935
|
-
errors: OutputError<OutputCollectionErrorType>[];
|
|
936
|
-
allEntries: OutputFileEntry[];
|
|
937
|
-
});
|
|
756
|
+
warmth: {
|
|
757
|
+
zero: number;
|
|
758
|
+
range: readonly [-100, 100];
|
|
759
|
+
keypointsNumber: number;
|
|
760
|
+
};
|
|
761
|
+
enhance: {
|
|
762
|
+
zero: number;
|
|
763
|
+
range: readonly [0, 100];
|
|
764
|
+
keypointsNumber: number;
|
|
765
|
+
};
|
|
766
|
+
filter: {
|
|
767
|
+
zero: number;
|
|
768
|
+
range: readonly [0, 100];
|
|
769
|
+
keypointsNumber: number;
|
|
770
|
+
};
|
|
771
|
+
}>;
|
|
938
772
|
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
private
|
|
942
|
-
|
|
943
|
-
private
|
|
944
|
-
|
|
773
|
+
type OperationKey = keyof typeof COLOR_OPERATIONS_CONFIG;
|
|
774
|
+
declare class EditorImageFader extends LitBlock {
|
|
775
|
+
private _isActive;
|
|
776
|
+
private _hidden;
|
|
777
|
+
private _operation;
|
|
778
|
+
private _filter;
|
|
779
|
+
private _value?;
|
|
780
|
+
private _transformations;
|
|
781
|
+
private _keypoints;
|
|
782
|
+
private _previewImage?;
|
|
783
|
+
private _cancelLastImages?;
|
|
784
|
+
private _cancelBatchPreload?;
|
|
785
|
+
private _url?;
|
|
786
|
+
private _fromViewer?;
|
|
787
|
+
private _raf;
|
|
788
|
+
private _addKeypointDebounced;
|
|
789
|
+
private readonly _previewHostRef;
|
|
790
|
+
private readonly _layersHostRef;
|
|
791
|
+
constructor();
|
|
792
|
+
private _handleImageLoading;
|
|
793
|
+
private _flush;
|
|
794
|
+
private _imageSrc;
|
|
795
|
+
private _constructKeypoint;
|
|
796
|
+
/**
|
|
797
|
+
* Check if current operation and filter equals passed ones
|
|
798
|
+
*/
|
|
799
|
+
private _isSame;
|
|
800
|
+
set(value: string | number): void;
|
|
801
|
+
private _update;
|
|
802
|
+
private _createPreviewImage;
|
|
803
|
+
private _initNodes;
|
|
804
|
+
setTransformations(transformations: Transformations): Promise<void>;
|
|
805
|
+
preload({ url, filter, operation, value, }: {
|
|
806
|
+
url: string;
|
|
807
|
+
filter?: string;
|
|
808
|
+
operation?: OperationKey;
|
|
809
|
+
value?: number;
|
|
810
|
+
}): Promise<void>;
|
|
811
|
+
private _setOriginalSrc;
|
|
812
|
+
activate({ url, operation, value, filter, fromViewer, }: {
|
|
813
|
+
url: string;
|
|
814
|
+
operation?: OperationKey;
|
|
815
|
+
value?: number;
|
|
816
|
+
filter?: string;
|
|
817
|
+
fromViewer?: boolean;
|
|
818
|
+
}): Promise<void>;
|
|
819
|
+
deactivate({ hide }?: {
|
|
820
|
+
hide?: boolean;
|
|
821
|
+
}): void;
|
|
822
|
+
private _ensurePreviewAttached;
|
|
823
|
+
private _clearLayersHost;
|
|
824
|
+
render(): TemplateResult;
|
|
825
|
+
}
|
|
826
|
+
declare global {
|
|
827
|
+
interface HTMLElementTagNameMap {
|
|
828
|
+
'uc-editor-image-fader': EditorImageFader;
|
|
829
|
+
}
|
|
945
830
|
}
|
|
946
831
|
|
|
947
|
-
declare class
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
protected
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
private
|
|
954
|
-
|
|
955
|
-
'*commonProgress': number;
|
|
956
|
-
'*uploadList': never[];
|
|
957
|
-
'*uploadQueue': _uploadcare_upload_client.Queue;
|
|
958
|
-
'*collectionErrors': OutputErrorCollection[];
|
|
959
|
-
'*collectionState': OutputCollectionState | null;
|
|
960
|
-
'*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
|
|
961
|
-
'*uploadTrigger': Set<string>;
|
|
962
|
-
'*currentActivity': null;
|
|
963
|
-
'*currentActivityParams': {};
|
|
964
|
-
'*history': never[];
|
|
965
|
-
'*historyBack': null;
|
|
966
|
-
'*closeModal': () => void;
|
|
967
|
-
};
|
|
968
|
-
private get _hasCtxOwner();
|
|
969
|
-
initCallback(): void;
|
|
970
|
-
protected get validationManager(): ValidationManager;
|
|
971
|
-
get api(): UploaderPublicApi;
|
|
972
|
-
getAPI(): UploaderPublicApi;
|
|
973
|
-
get uploadCollection(): TypedCollection<UploadEntryData>;
|
|
974
|
-
get secureUploadsManager(): SecureUploadsManager;
|
|
975
|
-
disconnectedCallback(): void;
|
|
832
|
+
declare class EditorButtonControl extends LitBlock {
|
|
833
|
+
active: boolean;
|
|
834
|
+
title: string;
|
|
835
|
+
protected icon: string;
|
|
836
|
+
protected titleProp: string;
|
|
837
|
+
protected get buttonClasses(): Record<string, boolean>;
|
|
838
|
+
private _updateHostStateClasses;
|
|
839
|
+
protected onClick(_event: MouseEvent): void;
|
|
976
840
|
connectedCallback(): void;
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
private _unobserveUploadCollection;
|
|
980
|
-
private _createGroup;
|
|
981
|
-
private _flushOutputItems;
|
|
982
|
-
private _handleCollectionUpdate;
|
|
983
|
-
private _handleCollectionPropertiesUpdate;
|
|
984
|
-
private _flushCommonUploadProgress;
|
|
985
|
-
private _openCloudImageEditor;
|
|
986
|
-
private _setInitialCrop;
|
|
987
|
-
protected getMetadataFor(entryId: string): Promise<_uploadcare_upload_client.Metadata | undefined>;
|
|
988
|
-
protected getUploadClientOptions(): Promise<FileFromOptions>;
|
|
989
|
-
getOutputData(): OutputFileEntry[];
|
|
841
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
842
|
+
render(): lit_html.TemplateResult<1>;
|
|
990
843
|
}
|
|
991
844
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
* Image size
|
|
998
|
-
*/
|
|
999
|
-
interface ImageSize {
|
|
1000
|
-
width: number;
|
|
1001
|
-
height: number;
|
|
845
|
+
declare class EditorFreeformButtonControl extends EditorButtonControl {
|
|
846
|
+
initCallback(): void;
|
|
847
|
+
onClick(): void;
|
|
848
|
+
private _computeTitle;
|
|
849
|
+
render(): lit_html.TemplateResult<1>;
|
|
1002
850
|
}
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
rotate?: number;
|
|
1013
|
-
mirror?: boolean;
|
|
1014
|
-
flip?: boolean;
|
|
1015
|
-
filter?: {
|
|
1016
|
-
name: string;
|
|
1017
|
-
amount: number;
|
|
1018
|
-
};
|
|
1019
|
-
crop?: {
|
|
1020
|
-
dimensions: [number, number];
|
|
1021
|
-
coords: [number, number];
|
|
1022
|
-
};
|
|
851
|
+
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
852
|
+
private _aspectRatio;
|
|
853
|
+
get aspectRatio(): CropAspectRatio | null;
|
|
854
|
+
set aspectRatio(value: CropAspectRatio | null);
|
|
855
|
+
initCallback(): void;
|
|
856
|
+
protected onClick(): void;
|
|
857
|
+
private _updateAspectRatioPresentation;
|
|
858
|
+
private _renderIcon;
|
|
859
|
+
render(): lit_html.TemplateResult<1>;
|
|
1023
860
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
861
|
+
declare global {
|
|
862
|
+
interface HTMLElementTagNameMap {
|
|
863
|
+
'uc-editor-freeform-button-control': EditorFreeformButtonControl;
|
|
864
|
+
'uc-editor-aspect-ratio-button-control': EditorAspectRatioButtonControl;
|
|
865
|
+
}
|
|
1029
866
|
}
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
867
|
+
|
|
868
|
+
declare class EditorCropButtonControl extends EditorButtonControl {
|
|
869
|
+
operation: CropOperation | undefined;
|
|
870
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
871
|
+
protected onClick(e: MouseEvent): void;
|
|
872
|
+
}
|
|
873
|
+
declare global {
|
|
874
|
+
interface HTMLElementTagNameMap {
|
|
875
|
+
'uc-editor-crop-button-control': EditorCropButtonControl;
|
|
876
|
+
}
|
|
1037
877
|
}
|
|
1038
|
-
type CropPresetList = CropAspectRatio[];
|
|
1039
878
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
private
|
|
1047
|
-
private
|
|
1048
|
-
|
|
879
|
+
declare class EditorFilterControl extends EditorButtonControl {
|
|
880
|
+
private _operation;
|
|
881
|
+
private _filter;
|
|
882
|
+
private _originalUrl;
|
|
883
|
+
private _observer?;
|
|
884
|
+
private _cancelPreload?;
|
|
885
|
+
private _lastPreviewRequestId;
|
|
886
|
+
private _previewVisibilityCheckRaf?;
|
|
887
|
+
private _previewVisibilityCheckTimeout?;
|
|
888
|
+
private _previewImage;
|
|
889
|
+
private _previewLoaded;
|
|
890
|
+
isOriginal: boolean;
|
|
891
|
+
private _iconSize;
|
|
892
|
+
get filter(): string;
|
|
893
|
+
set filter(value: string);
|
|
894
|
+
onClick(e: MouseEvent): void;
|
|
895
|
+
private _previewSrc;
|
|
896
|
+
private _observerCallback;
|
|
1049
897
|
initCallback(): void;
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
private
|
|
1054
|
-
private
|
|
1055
|
-
|
|
1056
|
-
private
|
|
898
|
+
disconnectedCallback(): void;
|
|
899
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
900
|
+
private _updateFilterLabels;
|
|
901
|
+
private _loadPreview;
|
|
902
|
+
private _schedulePreviewVisibilityCheck;
|
|
903
|
+
private _clearPreviewVisibilityChecks;
|
|
904
|
+
private get _shouldShowPreview();
|
|
905
|
+
render(): lit_html.TemplateResult<1>;
|
|
906
|
+
}
|
|
907
|
+
declare global {
|
|
908
|
+
interface HTMLElementTagNameMap {
|
|
909
|
+
'uc-editor-filter-control': EditorFilterControl;
|
|
910
|
+
}
|
|
1057
911
|
}
|
|
1058
912
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
activityType: "external";
|
|
1065
|
-
private _messageBridge?;
|
|
1066
|
-
private _iframeRef;
|
|
1067
|
-
private _latestSelectionSummary;
|
|
1068
|
-
private _selectedList;
|
|
1069
|
-
private _isSelectionReady;
|
|
1070
|
-
private _isDoneBtnEnabled;
|
|
1071
|
-
private _couldSelectAll;
|
|
1072
|
-
private _couldDeselectAll;
|
|
1073
|
-
private _showSelectionStatus;
|
|
1074
|
-
private _showDoneBtn;
|
|
1075
|
-
private _doneBtnTextClass;
|
|
1076
|
-
private _toolbarVisible;
|
|
1077
|
-
private get _counterText();
|
|
1078
|
-
get activityParams(): ActivityParams;
|
|
913
|
+
declare class EditorOperationControl extends EditorButtonControl {
|
|
914
|
+
private _operation;
|
|
915
|
+
get operation(): ColorOperation | '';
|
|
916
|
+
set operation(value: ColorOperation | '');
|
|
917
|
+
private _updateOperationMetadata;
|
|
1079
918
|
initCallback(): void;
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
private
|
|
1094
|
-
|
|
1095
|
-
|
|
919
|
+
protected onClick(e: MouseEvent): void;
|
|
920
|
+
}
|
|
921
|
+
declare global {
|
|
922
|
+
interface HTMLElementTagNameMap {
|
|
923
|
+
'uc-editor-operation-control': EditorOperationControl;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
declare class EditorScroller extends LitBlock {
|
|
928
|
+
/**
|
|
929
|
+
* CSS-only attribute
|
|
930
|
+
*/
|
|
931
|
+
hiddenScrollbar: boolean;
|
|
932
|
+
private readonly _handleWheel;
|
|
933
|
+
connectedCallback(): void;
|
|
934
|
+
disconnectedCallback(): void;
|
|
935
|
+
}
|
|
936
|
+
declare global {
|
|
937
|
+
interface HTMLElementTagNameMap {
|
|
938
|
+
'uc-editor-scroller': EditorScroller;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
declare class SliderUi extends LitBlock {
|
|
943
|
+
private _observer?;
|
|
944
|
+
private _thumbSize;
|
|
945
|
+
private _zeroDotEl?;
|
|
946
|
+
private _stepsCount?;
|
|
947
|
+
private readonly _inputRef;
|
|
948
|
+
private readonly _thumbRef;
|
|
949
|
+
private readonly _stepsRef;
|
|
950
|
+
disabled: boolean;
|
|
951
|
+
min: number;
|
|
952
|
+
max: number;
|
|
953
|
+
defaultValue: number;
|
|
954
|
+
zero: number;
|
|
955
|
+
private _currentValue;
|
|
956
|
+
constructor();
|
|
957
|
+
private _emitSliderEvent;
|
|
958
|
+
private readonly _handleSliderInput;
|
|
959
|
+
private readonly _handleSliderChange;
|
|
960
|
+
private readonly _handleInputFocus;
|
|
961
|
+
private readonly _handleInputBlur;
|
|
962
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
963
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
964
|
+
private _updateValue;
|
|
965
|
+
private _updateZeroDot;
|
|
966
|
+
private _updateSteps;
|
|
1096
967
|
disconnectedCallback(): void;
|
|
968
|
+
private _setCurrentValue;
|
|
969
|
+
private _syncInputValue;
|
|
970
|
+
private _extractEventValue;
|
|
1097
971
|
render(): lit_html.TemplateResult<1>;
|
|
1098
972
|
}
|
|
973
|
+
declare global {
|
|
974
|
+
interface HTMLElementTagNameMap {
|
|
975
|
+
'uc-slider-ui': SliderUi;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
1099
978
|
|
|
1100
|
-
|
|
1101
|
-
type
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
979
|
+
type SliderOperation = ColorOperation | 'filter';
|
|
980
|
+
type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
|
|
981
|
+
declare const FAKE_ORIGINAL_FILTER = "original";
|
|
982
|
+
declare class EditorSlider extends LitBlock {
|
|
983
|
+
state: {
|
|
984
|
+
operation: SliderOperation;
|
|
985
|
+
filter: SliderFilter | undefined;
|
|
986
|
+
originalUrl: string;
|
|
987
|
+
disabled: boolean;
|
|
988
|
+
min: number;
|
|
989
|
+
max: number;
|
|
990
|
+
value: number;
|
|
991
|
+
defaultValue: number;
|
|
992
|
+
zero: number;
|
|
1114
993
|
};
|
|
1115
|
-
private
|
|
1116
|
-
|
|
1117
|
-
private
|
|
994
|
+
private _handleInput;
|
|
995
|
+
setOperation(operation: SliderOperation, filter?: SliderFilter): void;
|
|
996
|
+
private _initializeValues;
|
|
997
|
+
apply(): void;
|
|
998
|
+
cancel(): void;
|
|
1118
999
|
initCallback(): void;
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
UPLOAD_LIST: 'upload-list';
|
|
1127
|
-
URL: 'url';
|
|
1128
|
-
CLOUD_IMG_EDIT: 'cloud-image-edit';
|
|
1129
|
-
EXTERNAL: 'external';
|
|
1130
|
-
}>;
|
|
1131
|
-
protected get isActivityActive(): boolean;
|
|
1132
|
-
get couldOpenActivity(): boolean;
|
|
1133
|
-
/** TODO: remove name argument */
|
|
1134
|
-
protected registerActivity(_name: string, options?: {
|
|
1135
|
-
onActivate?: () => void;
|
|
1136
|
-
onDeactivate?: () => void;
|
|
1137
|
-
}): void;
|
|
1138
|
-
private _unregisterActivity;
|
|
1139
|
-
disconnectedCallback(): void;
|
|
1140
|
-
get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
|
|
1141
|
-
get initActivity(): string | null;
|
|
1142
|
-
get doneActivity(): string | null;
|
|
1143
|
-
historyBack(): void;
|
|
1000
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1001
|
+
render(): lit_html.TemplateResult<1>;
|
|
1002
|
+
}
|
|
1003
|
+
declare global {
|
|
1004
|
+
interface HTMLElementTagNameMap {
|
|
1005
|
+
'uc-editor-slider': EditorSlider;
|
|
1006
|
+
}
|
|
1144
1007
|
}
|
|
1145
|
-
type RegisteredActivityType = (typeof LitActivityBlock)['activities'][keyof (typeof LitActivityBlock)['activities']];
|
|
1146
|
-
type ActivityType = RegisteredActivityType | (string & {}) | null;
|
|
1147
1008
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
readonly
|
|
1162
|
-
readonly
|
|
1163
|
-
readonly
|
|
1164
|
-
readonly
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
readonly
|
|
1168
|
-
readonly
|
|
1169
|
-
readonly
|
|
1170
|
-
readonly
|
|
1171
|
-
readonly
|
|
1172
|
-
readonly
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
private _targets;
|
|
1206
|
-
private _debugPrint;
|
|
1207
|
-
constructor(debugPrint: (...args: unknown[]) => void);
|
|
1208
|
-
bindTarget(target: LitBlock): () => void;
|
|
1209
|
-
private _dispatch;
|
|
1210
|
-
emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
|
|
1211
|
-
debounce?: TDebounce;
|
|
1212
|
-
}): void;
|
|
1009
|
+
type TabIdValue = (typeof TabId)[keyof typeof TabId];
|
|
1010
|
+
declare class EditorToolbar extends LitBlock {
|
|
1011
|
+
private _showLoader;
|
|
1012
|
+
showMainToolbar: boolean;
|
|
1013
|
+
showSubToolbar: boolean;
|
|
1014
|
+
private _showTabToggles;
|
|
1015
|
+
tabList: readonly TabIdValue[];
|
|
1016
|
+
activeTab: TabIdValue;
|
|
1017
|
+
private _useSliderPanel;
|
|
1018
|
+
private _tooltipVisible;
|
|
1019
|
+
private _operationTooltip;
|
|
1020
|
+
private _tabIndicatorOffset;
|
|
1021
|
+
private _tabIndicatorWidth;
|
|
1022
|
+
private readonly _sliderRef;
|
|
1023
|
+
private readonly _tabIndicatorRef;
|
|
1024
|
+
protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
|
|
1025
|
+
private readonly _handleWindowResize;
|
|
1026
|
+
private _cropPresets;
|
|
1027
|
+
private _cancelPreload?;
|
|
1028
|
+
private readonly _debouncedShowLoader;
|
|
1029
|
+
private readonly _updateInfoTooltip;
|
|
1030
|
+
private readonly _subTopToolbarStyles;
|
|
1031
|
+
private readonly _subBottomToolbarStyles;
|
|
1032
|
+
private readonly _tabToggleStyles;
|
|
1033
|
+
private readonly _tabTogglesStyles;
|
|
1034
|
+
init$: Record<string, unknown>;
|
|
1035
|
+
private _onSliderClose;
|
|
1036
|
+
private _activateTab;
|
|
1037
|
+
private _applyTabState;
|
|
1038
|
+
private _syncTabIndicator;
|
|
1039
|
+
private get _hasAspectRatioPicker();
|
|
1040
|
+
private _renderControlsByTab;
|
|
1041
|
+
private _renderCropTabControls;
|
|
1042
|
+
private _renderFilterTabControls;
|
|
1043
|
+
private _renderTuningTabControls;
|
|
1044
|
+
private _renderControlGroup;
|
|
1045
|
+
private _renderFreeformControl;
|
|
1046
|
+
private _renderAspectRatioControl;
|
|
1047
|
+
private _renderCropOperationControl;
|
|
1048
|
+
private _renderFilterControl;
|
|
1049
|
+
private _renderOperationControl;
|
|
1050
|
+
private _renderAspectRatioList;
|
|
1051
|
+
private _preloadEditedImage;
|
|
1052
|
+
initCallback(): void;
|
|
1053
|
+
connectedCallback(): void;
|
|
1054
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1055
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1056
|
+
disconnectedCallback(): void;
|
|
1057
|
+
private _assignSharedElements;
|
|
1058
|
+
private readonly _handleCancel;
|
|
1059
|
+
private readonly _handleApply;
|
|
1060
|
+
private readonly _handleApplySlider;
|
|
1061
|
+
private readonly _handleCancelSlider;
|
|
1062
|
+
private readonly _handleTabClick;
|
|
1063
|
+
private _renderTabToggle;
|
|
1064
|
+
private _renderTabContent;
|
|
1065
|
+
render(): TemplateResult<1>;
|
|
1213
1066
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
location: string;
|
|
1219
|
-
};
|
|
1220
|
-
type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
|
|
1221
|
-
modalId?: string;
|
|
1222
|
-
eventType?: CommonEventType;
|
|
1223
|
-
};
|
|
1224
|
-
interface ITelemetryManager {
|
|
1225
|
-
sendEvent(body: TelemetryEventBody): void;
|
|
1226
|
-
sendEventError(error: unknown, context?: string): void;
|
|
1227
|
-
sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
|
|
1067
|
+
declare global {
|
|
1068
|
+
interface HTMLElementTagNameMap {
|
|
1069
|
+
'uc-editor-toolbar': EditorToolbar;
|
|
1070
|
+
}
|
|
1228
1071
|
}
|
|
1229
1072
|
|
|
1230
|
-
declare
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
1241
|
-
type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
1242
|
-
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
1243
|
-
declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
1244
|
-
brightness: {
|
|
1245
|
-
zero: number;
|
|
1246
|
-
range: readonly [-100, 100];
|
|
1247
|
-
keypointsNumber: number;
|
|
1248
|
-
};
|
|
1249
|
-
exposure: {
|
|
1250
|
-
zero: number;
|
|
1251
|
-
range: readonly [-500, 500];
|
|
1252
|
-
keypointsNumber: number;
|
|
1253
|
-
};
|
|
1254
|
-
gamma: {
|
|
1255
|
-
zero: number;
|
|
1256
|
-
range: readonly [0, 1000];
|
|
1257
|
-
keypointsNumber: number;
|
|
1258
|
-
};
|
|
1259
|
-
contrast: {
|
|
1260
|
-
zero: number;
|
|
1261
|
-
range: readonly [-100, 500];
|
|
1262
|
-
keypointsNumber: number;
|
|
1263
|
-
};
|
|
1264
|
-
saturation: {
|
|
1265
|
-
zero: number;
|
|
1266
|
-
range: readonly [-100, 500];
|
|
1267
|
-
keypointsNumber: number;
|
|
1268
|
-
};
|
|
1269
|
-
vibrance: {
|
|
1270
|
-
zero: number;
|
|
1271
|
-
range: readonly [-100, 500];
|
|
1272
|
-
keypointsNumber: number;
|
|
1273
|
-
};
|
|
1274
|
-
warmth: {
|
|
1275
|
-
zero: number;
|
|
1276
|
-
range: readonly [-100, 100];
|
|
1277
|
-
keypointsNumber: number;
|
|
1278
|
-
};
|
|
1279
|
-
enhance: {
|
|
1280
|
-
zero: number;
|
|
1281
|
-
range: readonly [0, 100];
|
|
1282
|
-
keypointsNumber: number;
|
|
1283
|
-
};
|
|
1284
|
-
filter: {
|
|
1285
|
-
zero: number;
|
|
1286
|
-
range: readonly [0, 100];
|
|
1287
|
-
keypointsNumber: number;
|
|
1073
|
+
declare class CloudImageEditorBlock extends LitBlock {
|
|
1074
|
+
attributesMeta: ({
|
|
1075
|
+
uuid: string;
|
|
1076
|
+
} | {
|
|
1077
|
+
'cdn-url': string;
|
|
1078
|
+
}) & Partial<{
|
|
1079
|
+
tabs: string;
|
|
1080
|
+
'crop-preset': string;
|
|
1081
|
+
}> & {
|
|
1082
|
+
'ctx-name': string;
|
|
1288
1083
|
};
|
|
1289
|
-
|
|
1084
|
+
ctxOwner: boolean;
|
|
1085
|
+
static styleAttrs: string[];
|
|
1086
|
+
private _statusMessage;
|
|
1087
|
+
private _imageSrc;
|
|
1088
|
+
private _fileType;
|
|
1089
|
+
private _showLoader;
|
|
1090
|
+
uuid: string | null;
|
|
1091
|
+
cdnUrl: string | null;
|
|
1092
|
+
cropPreset: string;
|
|
1093
|
+
tabs: string | null;
|
|
1094
|
+
private _hasNetworkProblems;
|
|
1095
|
+
private _isInitialized;
|
|
1096
|
+
private _pendingInitUpdate;
|
|
1097
|
+
private readonly _debouncedShowLoader;
|
|
1098
|
+
private readonly _imgRef;
|
|
1099
|
+
private readonly _cropperRef;
|
|
1100
|
+
private readonly _faderRef;
|
|
1101
|
+
private readonly _imgContainerRef;
|
|
1102
|
+
private readonly _handleImageLoad;
|
|
1103
|
+
private readonly _handleImageError;
|
|
1104
|
+
private readonly _handleRetryNetwork;
|
|
1105
|
+
private _scheduleInitialization;
|
|
1106
|
+
init$: ReturnType<typeof initState>;
|
|
1107
|
+
initCallback(): void;
|
|
1108
|
+
private _assignSharedElements;
|
|
1109
|
+
private _attachImageListeners;
|
|
1110
|
+
private _detachImageListeners;
|
|
1111
|
+
private get _imageClassName();
|
|
1112
|
+
/**
|
|
1113
|
+
* To proper work, we need non-zero size the element. So, we'll wait for it.
|
|
1114
|
+
*/
|
|
1115
|
+
private _waitForSize;
|
|
1116
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1117
|
+
disconnectedCallback(): void;
|
|
1118
|
+
render(): lit_html.TemplateResult<1>;
|
|
1119
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1120
|
+
private _syncTabListFromProp;
|
|
1121
|
+
private _syncCropPresetState;
|
|
1122
|
+
updateImage(): Promise<void>;
|
|
1123
|
+
initEditor(): Promise<void>;
|
|
1124
|
+
}
|
|
1125
|
+
declare global {
|
|
1126
|
+
interface HTMLElementTagNameMap {
|
|
1127
|
+
'uc-cloud-image-editor-block': CloudImageEditorBlock;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1290
1130
|
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1131
|
+
declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
1132
|
+
static styleAttrs: string[];
|
|
1133
|
+
constructor();
|
|
1134
|
+
initCallback(): void;
|
|
1135
|
+
}
|
|
1136
|
+
declare global {
|
|
1137
|
+
interface HTMLElementTagNameMap {
|
|
1138
|
+
'uc-cloud-image-editor': CloudImageEditor;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
type ActivityParams$1 = {
|
|
1143
|
+
internalId: string;
|
|
1301
1144
|
};
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
'*collectionErrors': OutputErrorCollection[];
|
|
1309
|
-
'*collectionState': OutputCollectionState | null;
|
|
1310
|
-
'*groupInfo': UploadcareGroup | null;
|
|
1311
|
-
'*uploadTrigger': Set<Uid>;
|
|
1312
|
-
};
|
|
1313
|
-
type SolutionBlockCtxState = UploaderBlockCtxState & {
|
|
1314
|
-
'*solution': string | null;
|
|
1315
|
-
};
|
|
1316
|
-
type CloudImageEditorState = {
|
|
1317
|
-
'*originalUrl': string | null;
|
|
1318
|
-
'*loadingOperations': LoadingOperations;
|
|
1319
|
-
'*faderEl': EditorImageFader | null;
|
|
1320
|
-
'*cropperEl': EditorImageCropper | null;
|
|
1321
|
-
'*imgEl': HTMLImageElement | null;
|
|
1322
|
-
'*imgContainerEl': HTMLElement | null;
|
|
1323
|
-
'*networkProblems': boolean;
|
|
1324
|
-
'*imageSize': {
|
|
1325
|
-
width: number;
|
|
1326
|
-
height: number;
|
|
1327
|
-
} | null;
|
|
1328
|
-
'*editorTransformations': Transformations;
|
|
1329
|
-
'*cropPresetList': CropPresetList;
|
|
1330
|
-
'*currentAspectRatio': CropAspectRatio | null;
|
|
1331
|
-
'*tabList': readonly TabIdValue$1[];
|
|
1332
|
-
'*tabId': TabIdValue$1;
|
|
1333
|
-
'*on.retryNetwork': () => void;
|
|
1334
|
-
'*on.apply': (transformations: Transformations) => void;
|
|
1335
|
-
'*on.cancel': () => void;
|
|
1336
|
-
};
|
|
1337
|
-
type EditorImageCropperState = {
|
|
1338
|
-
'*padding': number;
|
|
1339
|
-
'*operations': {
|
|
1340
|
-
rotate: number;
|
|
1341
|
-
mirror: boolean;
|
|
1342
|
-
flip: boolean;
|
|
1343
|
-
};
|
|
1344
|
-
'*imageBox': {
|
|
1345
|
-
x: number;
|
|
1346
|
-
y: number;
|
|
1347
|
-
width: number;
|
|
1348
|
-
height: number;
|
|
1349
|
-
};
|
|
1350
|
-
'*cropBox': {
|
|
1351
|
-
x: number;
|
|
1352
|
-
y: number;
|
|
1353
|
-
width: number;
|
|
1354
|
-
height: number;
|
|
1355
|
-
};
|
|
1356
|
-
};
|
|
1357
|
-
type EditorToolbarState = {
|
|
1358
|
-
'*showListAspectRatio': boolean;
|
|
1359
|
-
'*sliderEl': EditorSlider | null;
|
|
1360
|
-
'*showSlider': boolean;
|
|
1361
|
-
'*currentFilter': string;
|
|
1362
|
-
'*currentOperation': string | null;
|
|
1363
|
-
'*operationTooltip': string | null;
|
|
1364
|
-
};
|
|
1365
|
-
type DynamicBlockState = {
|
|
1366
|
-
'*blocksRegistry': BlocksRegistry;
|
|
1367
|
-
'*eventEmitter': EventEmitter;
|
|
1368
|
-
'*localeManager': LocaleManager;
|
|
1369
|
-
'*telemetryManager': ITelemetryManager;
|
|
1370
|
-
'*a11y': A11y;
|
|
1371
|
-
'*modalManager': ModalManager | null;
|
|
1372
|
-
};
|
|
1373
|
-
type DynamicUploaderBlockState = {
|
|
1374
|
-
'*uploadCollection': TypedCollection<UploadEntryData>;
|
|
1375
|
-
'*publicApi': UploaderPublicApi;
|
|
1376
|
-
'*validationManager': ValidationManager;
|
|
1377
|
-
'*secureUploadsManager': SecureUploadsManager;
|
|
1378
|
-
};
|
|
1379
|
-
type LocaleState = {
|
|
1380
|
-
[K in keyof LocaleDefinition as `*l10n/${K}`]: string;
|
|
1381
|
-
};
|
|
1382
|
-
type SharedState = SolutionBlockCtxState & SharedConfigState & CloudImageEditorState & EditorImageCropperState & EditorToolbarState & DynamicBlockState & DynamicUploaderBlockState & LocaleState;
|
|
1383
|
-
|
|
1384
|
-
declare const LitBlockBase: typeof LitElement & Constructor<{
|
|
1385
|
-
willYield: boolean;
|
|
1386
|
-
yield(slot: string, defaultContent?: unknown): unknown;
|
|
1387
|
-
}> & Constructor<{
|
|
1388
|
-
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
1389
|
-
}> & Constructor<SymbioteComponent<SharedState>> & Constructor<LitElement> & {
|
|
1390
|
-
reg(tagName: string): void;
|
|
1391
|
-
};
|
|
1392
|
-
declare class LitBlock extends LitBlockBase {
|
|
1393
|
-
private _cfgProxy;
|
|
1394
|
-
private _sharedContextInstances;
|
|
1395
|
-
static styleAttrs: string[];
|
|
1396
|
-
activityType: ActivityType;
|
|
1397
|
-
init$: {};
|
|
1398
|
-
constructor();
|
|
1399
|
-
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
1400
|
-
private _pluralize;
|
|
1401
|
-
emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
|
|
1402
|
-
hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
|
|
1403
|
-
connectedCallback(): void;
|
|
1145
|
+
declare class CloudImageEditorActivity extends LitUploaderBlock {
|
|
1146
|
+
couldBeCtxOwner: boolean;
|
|
1147
|
+
activityType: "cloud-image-edit";
|
|
1148
|
+
private _entry?;
|
|
1149
|
+
private _editorConfig;
|
|
1150
|
+
get activityParams(): ActivityParams$1;
|
|
1404
1151
|
initCallback(): void;
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
disconnectedCallback(): void;
|
|
1413
|
-
/**
|
|
1414
|
-
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
1415
|
-
*/
|
|
1416
|
-
protected destroyCtxCallback(): void;
|
|
1417
|
-
/**
|
|
1418
|
-
* Adds a shared context instance if it does not exist yet.
|
|
1419
|
-
* @param key The shared state key.
|
|
1420
|
-
* @param resolver The resolver function that creates the instance.
|
|
1421
|
-
* @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.
|
|
1422
|
-
*/
|
|
1423
|
-
protected addSharedContextInstance<TKey extends keyof SharedState>(key: TKey, resolver: () => SharedState[TKey], { persist }?: {
|
|
1424
|
-
persist?: boolean | undefined;
|
|
1425
|
-
}): void;
|
|
1426
|
-
private _destroySharedContextInstances;
|
|
1427
|
-
protected getSharedContextInstance<TKey extends keyof SharedState, TRequired extends boolean = true>(key: TKey, isRequired?: TRequired): TRequired extends true ? NonNullable<SharedState[TKey]> : SharedState[TKey];
|
|
1428
|
-
protected proxyUrl(url: string): Promise<string>;
|
|
1429
|
-
get cfg(): ConfigType;
|
|
1430
|
-
subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): () => void;
|
|
1431
|
-
debugPrint(...args: unknown[]): void;
|
|
1152
|
+
private _handleApply;
|
|
1153
|
+
private _handleCancel;
|
|
1154
|
+
handleChange(event: CustomEvent<ChangeResult>): void;
|
|
1155
|
+
private _mountEditor;
|
|
1156
|
+
private _unmountEditor;
|
|
1157
|
+
render(): lit_html.TemplateResult<1> | typeof nothing;
|
|
1158
|
+
private _createEditorConfig;
|
|
1432
1159
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
1438
|
-
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
1439
|
-
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
1440
|
-
protected closeDialog: () => void;
|
|
1441
|
-
private _handleDialogClose;
|
|
1442
|
-
private _handleDialogMouseDown;
|
|
1443
|
-
private _handleDialogMouseUp;
|
|
1444
|
-
show(): void;
|
|
1445
|
-
hide(): void;
|
|
1446
|
-
private _handleModalOpen;
|
|
1447
|
-
private _handleModalClose;
|
|
1448
|
-
private _handleModalCloseAll;
|
|
1449
|
-
initCallback(): void;
|
|
1450
|
-
disconnectedCallback(): void;
|
|
1451
|
-
private _handleDialogRef;
|
|
1452
|
-
render(): lit_html.TemplateResult<1>;
|
|
1160
|
+
declare global {
|
|
1161
|
+
interface HTMLElementTagNameMap {
|
|
1162
|
+
'uc-cloud-image-editor-activity': CloudImageEditorActivity;
|
|
1163
|
+
}
|
|
1453
1164
|
}
|
|
1454
1165
|
|
|
1455
|
-
declare
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
readonly DESTROY: "modal:destroy";
|
|
1462
|
-
}>;
|
|
1463
|
-
type ModalId = ActivityType;
|
|
1464
|
-
type ModalCb = (data: {
|
|
1465
|
-
id: ModalId;
|
|
1466
|
-
modal: Modal;
|
|
1467
|
-
}) => void;
|
|
1468
|
-
type ModalEventType = (typeof ModalEvents)[keyof typeof ModalEvents];
|
|
1469
|
-
declare class ModalManager {
|
|
1470
|
-
private _modals;
|
|
1471
|
-
private _activeModals;
|
|
1472
|
-
private _subscribers;
|
|
1473
|
-
private _block;
|
|
1474
|
-
constructor(block: LitBlock);
|
|
1475
|
-
private _debugPrint;
|
|
1476
|
-
/**
|
|
1477
|
-
* Register a modal with the manager
|
|
1478
|
-
* @param id Unique identifier for the modal
|
|
1479
|
-
* @param modal Modal component instance
|
|
1480
|
-
*/
|
|
1481
|
-
registerModal(id: ModalId, modal: Modal): void;
|
|
1482
|
-
/** Remove a modal by ID. */
|
|
1483
|
-
deleteModal(id: ModalId): boolean;
|
|
1484
|
-
/** Open a modal by its ID. */
|
|
1485
|
-
open(id: ModalId): boolean;
|
|
1486
|
-
/** Close a specific modal by ID. */
|
|
1487
|
-
close(id: ModalId): boolean;
|
|
1488
|
-
/** Toggle a modal - open if closed, close if open. */
|
|
1489
|
-
toggle(id: ModalId): boolean;
|
|
1490
|
-
/** True if there are any active modals. */
|
|
1491
|
-
get hasActiveModals(): boolean;
|
|
1492
|
-
/** Close the most recently opened modal and return to the previous one. */
|
|
1493
|
-
back(): boolean;
|
|
1494
|
-
/** Close all open modals. */
|
|
1495
|
-
closeAll(): number;
|
|
1496
|
-
/**
|
|
1497
|
-
* Subscribe to modal events
|
|
1498
|
-
* @returns Unsubscribe function
|
|
1499
|
-
*/
|
|
1500
|
-
subscribe(event: ModalEventType, callback: ModalCb): () => void;
|
|
1501
|
-
/** Unsubscribe from modal events */
|
|
1502
|
-
unsubscribe(event: ModalEventType, callback: ModalCb | undefined): void;
|
|
1503
|
-
/** Notify all subscribers of a modal event. */
|
|
1504
|
-
private _notify;
|
|
1505
|
-
/** Destroy the modal manager, clean up resources */
|
|
1506
|
-
destroy(): void;
|
|
1166
|
+
declare class ActivityHeader extends LitActivityBlock {
|
|
1167
|
+
}
|
|
1168
|
+
declare global {
|
|
1169
|
+
interface HTMLElementTagNameMap {
|
|
1170
|
+
'uc-activity-header': ActivityHeader;
|
|
1171
|
+
}
|
|
1507
1172
|
}
|
|
1508
1173
|
|
|
1509
|
-
|
|
1510
|
-
declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
|
|
1511
|
-
|
|
1512
|
-
declare class Icon extends LitBlock {
|
|
1513
|
-
name: string;
|
|
1514
|
-
private _resolvedHref;
|
|
1515
|
-
private _iconHrefResolver;
|
|
1516
|
-
initCallback(): void;
|
|
1517
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1518
|
-
private _updateResolvedHref;
|
|
1174
|
+
declare class Spinner extends LitBlock {
|
|
1519
1175
|
render(): lit_html.TemplateResult<1>;
|
|
1520
1176
|
}
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
} & Constructor<{
|
|
1526
|
-
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
1527
|
-
}>;
|
|
1528
|
-
declare class ImgConfig extends ImgConfig_base {
|
|
1529
|
-
private _state;
|
|
1530
|
-
private _subscribers;
|
|
1531
|
-
private _isnObserver;
|
|
1532
|
-
private _observed;
|
|
1533
|
-
createRenderRoot(): HTMLElement | ShadowRoot;
|
|
1534
|
-
constructor();
|
|
1535
|
-
protected $$(key: string): unknown;
|
|
1536
|
-
protected set$$(kvObj: Record<string, CssPropValue>): void;
|
|
1537
|
-
protected sub$$<T = unknown>(key: string, kbFn: (val: T) => void): void;
|
|
1538
|
-
private _notify;
|
|
1539
|
-
protected analyticsParams(): string;
|
|
1540
|
-
protected initAttributes(el: HTMLElement): void;
|
|
1541
|
-
protected initIntersection(el: HTMLElement, cbkFn: () => void): void;
|
|
1542
|
-
connectedCallback(): void;
|
|
1543
|
-
private _initCssProperties;
|
|
1544
|
-
disconnectedCallback(): void;
|
|
1545
|
-
static get observedAttributes(): string[];
|
|
1546
|
-
attributeChangedCallback(name: string, _oldVal: string | null, newVal: string | null): void;
|
|
1177
|
+
declare global {
|
|
1178
|
+
interface HTMLElementTagNameMap {
|
|
1179
|
+
'uc-spinner': Spinner;
|
|
1180
|
+
}
|
|
1547
1181
|
}
|
|
1548
1182
|
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
private
|
|
1556
|
-
private
|
|
1557
|
-
private
|
|
1558
|
-
|
|
1559
|
-
private
|
|
1560
|
-
|
|
1561
|
-
private
|
|
1562
|
-
private
|
|
1563
|
-
private
|
|
1564
|
-
private
|
|
1565
|
-
private
|
|
1566
|
-
private
|
|
1567
|
-
private
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
private
|
|
1571
|
-
private
|
|
1572
|
-
private
|
|
1573
|
-
private
|
|
1574
|
-
private
|
|
1575
|
-
|
|
1183
|
+
type ActivityParams = {
|
|
1184
|
+
externalSourceType: string;
|
|
1185
|
+
};
|
|
1186
|
+
declare class ExternalSource extends LitUploaderBlock {
|
|
1187
|
+
couldBeCtxOwner: boolean;
|
|
1188
|
+
activityType: "external";
|
|
1189
|
+
private _messageBridge?;
|
|
1190
|
+
private _iframeRef;
|
|
1191
|
+
private _latestSelectionSummary;
|
|
1192
|
+
private _selectedList;
|
|
1193
|
+
private _isSelectionReady;
|
|
1194
|
+
private _isDoneBtnEnabled;
|
|
1195
|
+
private _couldSelectAll;
|
|
1196
|
+
private _couldDeselectAll;
|
|
1197
|
+
private _showSelectionStatus;
|
|
1198
|
+
private _showDoneBtn;
|
|
1199
|
+
private _doneBtnTextClass;
|
|
1200
|
+
private _toolbarVisible;
|
|
1201
|
+
private get _counterText();
|
|
1202
|
+
get activityParams(): ActivityParams;
|
|
1203
|
+
initCallback(): void;
|
|
1204
|
+
private _extractUrlFromSelectedFile;
|
|
1205
|
+
private _handleToolbarStateChange;
|
|
1206
|
+
private _handleSelectedFilesChange;
|
|
1207
|
+
private _handleIframeLoad;
|
|
1208
|
+
private _applyTheme;
|
|
1209
|
+
private _applyEmbedCss;
|
|
1210
|
+
private _setupL10n;
|
|
1211
|
+
private _remoteUrl;
|
|
1212
|
+
private _handleDone;
|
|
1213
|
+
private _handleCancel;
|
|
1214
|
+
private _handleSelectAll;
|
|
1215
|
+
private _handleDeselectAll;
|
|
1216
|
+
private _setSelectionSummary;
|
|
1217
|
+
private _mountIframe;
|
|
1218
|
+
private _unmountIframe;
|
|
1219
|
+
private _resetSelectionStatus;
|
|
1220
|
+
disconnectedCallback(): void;
|
|
1221
|
+
render(): lit_html.TemplateResult<1>;
|
|
1576
1222
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
} | {
|
|
1582
|
-
uuid: string;
|
|
1583
|
-
};
|
|
1584
|
-
connectedCallback(): void;
|
|
1223
|
+
declare global {
|
|
1224
|
+
interface HTMLElementTagNameMap {
|
|
1225
|
+
'uc-external-source': ExternalSource;
|
|
1226
|
+
}
|
|
1585
1227
|
}
|
|
1586
1228
|
|
|
1587
|
-
declare
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
}
|
|
1229
|
+
declare const ACTIVITY_TYPES: Readonly<{
|
|
1230
|
+
START_FROM: "start-from";
|
|
1231
|
+
CAMERA: "camera";
|
|
1232
|
+
DRAW: "draw";
|
|
1233
|
+
UPLOAD_LIST: "upload-list";
|
|
1234
|
+
URL: "url";
|
|
1235
|
+
CLOUD_IMG_EDIT: "cloud-image-edit";
|
|
1236
|
+
EXTERNAL: "external";
|
|
1237
|
+
}>;
|
|
1238
|
+
type RegisteredActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
1239
|
+
type ActivityType = RegisteredActivityType | (string & {}) | null;
|
|
1596
1240
|
|
|
1597
|
-
declare
|
|
1241
|
+
declare const ACTIVE_PROP = "___ACTIVITY_IS_ACTIVE___";
|
|
1242
|
+
type ActivityParamsMap = {
|
|
1243
|
+
'cloud-image-edit': ActivityParams$1;
|
|
1244
|
+
external: ActivityParams;
|
|
1245
|
+
};
|
|
1246
|
+
declare class LitActivityBlock extends LitBlock {
|
|
1247
|
+
protected historyTracked: boolean;
|
|
1248
|
+
private [ACTIVE_PROP]?;
|
|
1249
|
+
init$: {
|
|
1250
|
+
'*currentActivity': null;
|
|
1251
|
+
'*currentActivityParams': {};
|
|
1252
|
+
'*history': never[];
|
|
1253
|
+
'*historyBack': null;
|
|
1254
|
+
'*closeModal': () => void;
|
|
1255
|
+
};
|
|
1256
|
+
private _debouncedHistoryFlush;
|
|
1257
|
+
private _deactivate;
|
|
1258
|
+
private _activate;
|
|
1598
1259
|
initCallback(): void;
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1260
|
+
private _historyFlush;
|
|
1261
|
+
private _isActivityRegistered;
|
|
1262
|
+
private static _activityCallbacks;
|
|
1263
|
+
static activities: Readonly<{
|
|
1264
|
+
START_FROM: 'start-from';
|
|
1265
|
+
CAMERA: 'camera';
|
|
1266
|
+
DRAW: 'draw';
|
|
1267
|
+
UPLOAD_LIST: 'upload-list';
|
|
1268
|
+
URL: 'url';
|
|
1269
|
+
CLOUD_IMG_EDIT: 'cloud-image-edit';
|
|
1270
|
+
EXTERNAL: 'external';
|
|
1271
|
+
}>;
|
|
1272
|
+
protected get isActivityActive(): boolean;
|
|
1273
|
+
get couldOpenActivity(): boolean;
|
|
1274
|
+
/** TODO: remove name argument */
|
|
1275
|
+
protected registerActivity(_name: string, options?: {
|
|
1276
|
+
onActivate?: () => void;
|
|
1277
|
+
onDeactivate?: () => void;
|
|
1278
|
+
}): void;
|
|
1279
|
+
private _unregisterActivity;
|
|
1610
1280
|
disconnectedCallback(): void;
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1281
|
+
get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
|
|
1282
|
+
get initActivity(): string | null;
|
|
1283
|
+
get doneActivity(): string | null;
|
|
1284
|
+
historyBack(): void;
|
|
1614
1285
|
}
|
|
1615
1286
|
|
|
1616
|
-
declare
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1287
|
+
declare const InternalEventType: Readonly<{
|
|
1288
|
+
readonly INIT_SOLUTION: "init-solution";
|
|
1289
|
+
readonly CHANGE_CONFIG: "change-config";
|
|
1290
|
+
readonly ACTION_EVENT: "action-event";
|
|
1291
|
+
readonly ERROR_EVENT: "error-event";
|
|
1292
|
+
}>;
|
|
1293
|
+
declare const EventType: Readonly<{
|
|
1294
|
+
readonly FILE_ADDED: "file-added";
|
|
1295
|
+
readonly FILE_REMOVED: "file-removed";
|
|
1296
|
+
readonly FILE_UPLOAD_START: "file-upload-start";
|
|
1297
|
+
readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
|
|
1298
|
+
readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
|
|
1299
|
+
readonly FILE_UPLOAD_FAILED: "file-upload-failed";
|
|
1300
|
+
readonly FILE_URL_CHANGED: "file-url-changed";
|
|
1301
|
+
readonly MODAL_OPEN: "modal-open";
|
|
1302
|
+
readonly MODAL_CLOSE: "modal-close";
|
|
1303
|
+
readonly DONE_CLICK: "done-click";
|
|
1304
|
+
readonly UPLOAD_CLICK: "upload-click";
|
|
1305
|
+
readonly ACTIVITY_CHANGE: "activity-change";
|
|
1306
|
+
readonly COMMON_UPLOAD_START: "common-upload-start";
|
|
1307
|
+
readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
|
|
1308
|
+
readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
|
|
1309
|
+
readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
|
|
1310
|
+
readonly CHANGE: "change";
|
|
1311
|
+
readonly GROUP_CREATED: "group-created";
|
|
1312
|
+
}>;
|
|
1313
|
+
type EventKey = (typeof EventType)[keyof typeof EventType];
|
|
1314
|
+
type InternalEventKey = (typeof InternalEventType)[keyof typeof InternalEventType];
|
|
1315
|
+
type EventPayload = {
|
|
1316
|
+
[EventType.FILE_ADDED]: OutputFileEntry<'idle'>;
|
|
1317
|
+
[EventType.FILE_REMOVED]: OutputFileEntry<'removed'>;
|
|
1318
|
+
[EventType.FILE_UPLOAD_START]: OutputFileEntry<'uploading'>;
|
|
1319
|
+
[EventType.FILE_UPLOAD_PROGRESS]: OutputFileEntry<'uploading'>;
|
|
1320
|
+
[EventType.FILE_UPLOAD_SUCCESS]: OutputFileEntry<'success'>;
|
|
1321
|
+
[EventType.FILE_UPLOAD_FAILED]: OutputFileEntry<'failed'>;
|
|
1322
|
+
[EventType.FILE_URL_CHANGED]: OutputFileEntry<'success'>;
|
|
1323
|
+
[EventType.MODAL_OPEN]: {
|
|
1324
|
+
modalId: ModalId;
|
|
1325
|
+
};
|
|
1326
|
+
[EventType.MODAL_CLOSE]: {
|
|
1327
|
+
modalId: ModalId;
|
|
1328
|
+
hasActiveModals: boolean;
|
|
1329
|
+
};
|
|
1330
|
+
[EventType.ACTIVITY_CHANGE]: {
|
|
1331
|
+
activity: ActivityType;
|
|
1332
|
+
};
|
|
1333
|
+
[EventType.UPLOAD_CLICK]: undefined;
|
|
1334
|
+
[EventType.DONE_CLICK]: OutputCollectionState;
|
|
1335
|
+
[EventType.COMMON_UPLOAD_START]: OutputCollectionState<'uploading'>;
|
|
1336
|
+
[EventType.COMMON_UPLOAD_PROGRESS]: OutputCollectionState<'uploading'>;
|
|
1337
|
+
[EventType.COMMON_UPLOAD_SUCCESS]: OutputCollectionState<'success'>;
|
|
1338
|
+
[EventType.COMMON_UPLOAD_FAILED]: OutputCollectionState<'failed'>;
|
|
1339
|
+
[EventType.CHANGE]: OutputCollectionState;
|
|
1340
|
+
[EventType.GROUP_CREATED]: OutputCollectionState<'success', 'has-group'>;
|
|
1341
|
+
};
|
|
1342
|
+
declare class EventEmitter extends SharedInstance {
|
|
1343
|
+
private _timeoutStore;
|
|
1344
|
+
private _targets;
|
|
1345
|
+
bindTarget(target: LitBlock): () => void;
|
|
1346
|
+
private _dispatch;
|
|
1347
|
+
emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
|
|
1348
|
+
debounce?: TDebounce;
|
|
1349
|
+
}): void;
|
|
1350
|
+
destroy(): void;
|
|
1625
1351
|
}
|
|
1626
1352
|
|
|
1353
|
+
type EventMap = {
|
|
1354
|
+
[T in keyof EventPayload]: CustomEvent<EventPayload[T]>;
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1627
1357
|
type SelectOption = {
|
|
1628
1358
|
text: string;
|
|
1629
1359
|
value: string;
|
|
@@ -1635,57 +1365,182 @@ declare class Select extends LitBlock {
|
|
|
1635
1365
|
render(): lit_html.TemplateResult<1>;
|
|
1636
1366
|
private _handleChange;
|
|
1637
1367
|
}
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
type?: string;
|
|
1643
|
-
private _iconName;
|
|
1644
|
-
private _srcTypeKey;
|
|
1645
|
-
private _initTypes;
|
|
1646
|
-
initCallback(): void;
|
|
1647
|
-
private _registerType;
|
|
1648
|
-
activate(): void;
|
|
1649
|
-
private _applyType;
|
|
1650
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1651
|
-
render(): lit_html.TemplateResult<1>;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
declare class SourceList extends LitBlock {
|
|
1655
|
-
private _rawSourceList;
|
|
1656
|
-
private _cameraModes;
|
|
1657
|
-
initCallback(): void;
|
|
1658
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1659
|
-
private _updateSources;
|
|
1660
|
-
private _sources;
|
|
1661
|
-
render(): lit_html.TemplateResult<1>;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
declare class Spinner extends LitBlock {
|
|
1665
|
-
render(): lit_html.TemplateResult<1>;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
declare class FileItemConfig extends LitUploaderBlock {
|
|
1669
|
-
private _entrySubs;
|
|
1670
|
-
protected entry: UploadEntryTypedData | null;
|
|
1671
|
-
protected withEntry<A extends unknown[], R>(fn: (entry: UploadEntryTypedData, ...args: A) => R): (...args: A) => R | undefined;
|
|
1672
|
-
protected subEntry<K extends UploadEntryKeys>(prop: K, handler: (value: UploadEntryData[K]) => void): void;
|
|
1673
|
-
protected reset(): void;
|
|
1674
|
-
disconnectedCallback(): void;
|
|
1368
|
+
declare global {
|
|
1369
|
+
interface HTMLElementTagNameMap {
|
|
1370
|
+
'uc-select': Select;
|
|
1371
|
+
}
|
|
1675
1372
|
}
|
|
1676
1373
|
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
private
|
|
1682
|
-
private
|
|
1683
|
-
private
|
|
1684
|
-
private
|
|
1685
|
-
private
|
|
1686
|
-
private
|
|
1687
|
-
private
|
|
1688
|
-
private
|
|
1374
|
+
type CameraMode = 'photo' | 'video';
|
|
1375
|
+
declare class CameraSource extends LitUploaderBlock {
|
|
1376
|
+
couldBeCtxOwner: boolean;
|
|
1377
|
+
activityType: "camera";
|
|
1378
|
+
private _unsubPermissions;
|
|
1379
|
+
private _capturing;
|
|
1380
|
+
private _chunks;
|
|
1381
|
+
private _mediaRecorder;
|
|
1382
|
+
private _stream;
|
|
1383
|
+
private _selectedAudioId;
|
|
1384
|
+
private _selectedCameraId;
|
|
1385
|
+
private _activeTab;
|
|
1386
|
+
private _options;
|
|
1387
|
+
private _canvas;
|
|
1388
|
+
private _ctx;
|
|
1389
|
+
private _cameraDevices;
|
|
1390
|
+
private _audioDevices;
|
|
1391
|
+
private _permissionResponses;
|
|
1392
|
+
private _permissionCleanupFns;
|
|
1393
|
+
private _currentVideoSource;
|
|
1394
|
+
private readonly _handlePreviewPlay;
|
|
1395
|
+
private readonly _handlePreviewPause;
|
|
1396
|
+
private _timerRef;
|
|
1397
|
+
private _lineRef;
|
|
1398
|
+
private _videoRef;
|
|
1399
|
+
private _switcherRef;
|
|
1400
|
+
private _startTime;
|
|
1401
|
+
private _elapsedTime;
|
|
1402
|
+
private _videoTransformCss;
|
|
1403
|
+
private _videoHidden;
|
|
1404
|
+
private _messageHidden;
|
|
1405
|
+
private _requestBtnHidden;
|
|
1406
|
+
private _cameraSelectOptions;
|
|
1407
|
+
private _cameraSelectHidden;
|
|
1408
|
+
private _l10nMessage;
|
|
1409
|
+
private _timerHidden;
|
|
1410
|
+
private _cameraHidden;
|
|
1411
|
+
private _cameraActionsHidden;
|
|
1412
|
+
private _audioSelectOptions;
|
|
1413
|
+
private _audioSelectHidden;
|
|
1414
|
+
private _audioSelectDisabled;
|
|
1415
|
+
private _audioToggleMicrophoneHidden;
|
|
1416
|
+
private _tabCameraHidden;
|
|
1417
|
+
private _tabVideoHidden;
|
|
1418
|
+
private _currentIcon;
|
|
1419
|
+
private _currentTimelineIcon;
|
|
1420
|
+
private _toggleMicrophoneIcon;
|
|
1421
|
+
private _mutableClassButton;
|
|
1422
|
+
private _chooseActionWithCamera;
|
|
1423
|
+
private _handleCameraSelectChange;
|
|
1424
|
+
private _handleAudioSelectChange;
|
|
1425
|
+
private _handleRequestPermissions;
|
|
1426
|
+
private _handleStartCamera;
|
|
1427
|
+
private _handleToggleRecording;
|
|
1428
|
+
private _handleToggleAudio;
|
|
1429
|
+
private _handleRetake;
|
|
1430
|
+
private _handleAccept;
|
|
1431
|
+
private _handleClickTab;
|
|
1432
|
+
private _updateTimer;
|
|
1433
|
+
private _startTimer;
|
|
1434
|
+
private _stopTimer;
|
|
1435
|
+
private _startTimeline;
|
|
1436
|
+
private _stopTimeline;
|
|
1437
|
+
private _animationFrameId;
|
|
1438
|
+
private _startRecording;
|
|
1439
|
+
private _stopRecording;
|
|
1440
|
+
/** This method is used to toggle recording pause/resume */
|
|
1441
|
+
private _toggleRecording;
|
|
1442
|
+
private _toggleEnableAudio;
|
|
1443
|
+
/**
|
|
1444
|
+
* Previewing the video that was recorded on the camera
|
|
1445
|
+
*/
|
|
1446
|
+
private _previewVideo;
|
|
1447
|
+
private _attachPreviewListeners;
|
|
1448
|
+
private _detachPreviewListeners;
|
|
1449
|
+
private _setVideoSource;
|
|
1450
|
+
/**
|
|
1451
|
+
* Do not bind srcObject directly in the template, because it stops video pausing on shot.
|
|
1452
|
+
* I really don'y know why but that's how it is. Assigning srcObject manually fixes the issue.
|
|
1453
|
+
*/
|
|
1454
|
+
private _applyVideoSource;
|
|
1455
|
+
private _retake;
|
|
1456
|
+
private _accept;
|
|
1457
|
+
private _handlePhoto;
|
|
1458
|
+
private _handleVideo;
|
|
1459
|
+
private _setCameraState;
|
|
1460
|
+
private _shot;
|
|
1461
|
+
private _handleActiveTab;
|
|
1462
|
+
private _createFile;
|
|
1463
|
+
private _guessExtensionByMime;
|
|
1464
|
+
/**
|
|
1465
|
+
* The send file to the server
|
|
1466
|
+
*/
|
|
1467
|
+
private _toSend;
|
|
1468
|
+
private get _cameraModes();
|
|
1469
|
+
private _setPermissionsState;
|
|
1470
|
+
private _makeStreamInactive;
|
|
1471
|
+
private _stopCapture;
|
|
1472
|
+
private _capture;
|
|
1473
|
+
private _handlePermissionsChange;
|
|
1474
|
+
private _permissionAccess;
|
|
1475
|
+
private _teardownPermissionListeners;
|
|
1476
|
+
private _requestDeviceAccess;
|
|
1477
|
+
private _getDevices;
|
|
1478
|
+
private _onActivate;
|
|
1479
|
+
private _onDeactivate;
|
|
1480
|
+
private _handleCameraModes;
|
|
1481
|
+
initCallback(): void;
|
|
1482
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1483
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
1484
|
+
private _destroy;
|
|
1485
|
+
disconnectedCallback(): void;
|
|
1486
|
+
render(): lit_html.TemplateResult<1>;
|
|
1487
|
+
}
|
|
1488
|
+
declare global {
|
|
1489
|
+
interface HTMLElementTagNameMap {
|
|
1490
|
+
'uc-camera-source': CameraSource;
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Config keys that can't be passed as attribute (because they are object or function)
|
|
1496
|
+
*/
|
|
1497
|
+
declare const complexConfigKeys: readonly ["metadata", "localeDefinitionOverride", "secureUploadsSignatureResolver", "secureDeliveryProxyUrlResolver", "iconHrefResolver", "fileValidators", "collectionValidators", "mediaRecorderOptions"];
|
|
1498
|
+
/** Mapping of attribute names to state */
|
|
1499
|
+
declare const attrStateMapping: Record<string, string>;
|
|
1500
|
+
declare class Config extends LitBlock {
|
|
1501
|
+
attributesMeta: Partial<ConfigPlainType> & {
|
|
1502
|
+
'ctx-name': string;
|
|
1503
|
+
};
|
|
1504
|
+
init$: LitBlock["init$"] & ConfigType;
|
|
1505
|
+
private _computationControllers;
|
|
1506
|
+
private _flushValueToAttribute;
|
|
1507
|
+
private _flushValueToState;
|
|
1508
|
+
private _setValue;
|
|
1509
|
+
private _getValue;
|
|
1510
|
+
private _assertSameValueDifferentReference;
|
|
1511
|
+
initCallback(): void;
|
|
1512
|
+
attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
|
|
1513
|
+
static get observedAttributes(): string[];
|
|
1514
|
+
}
|
|
1515
|
+
interface Config extends ConfigType {
|
|
1516
|
+
}
|
|
1517
|
+
declare global {
|
|
1518
|
+
interface HTMLElementTagNameMap {
|
|
1519
|
+
'uc-config': Config;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
declare class FileItemConfig extends LitUploaderBlock {
|
|
1524
|
+
private _entrySubs;
|
|
1525
|
+
protected entry: UploadEntryTypedData | null;
|
|
1526
|
+
protected withEntry<A extends unknown[], R>(fn: (entry: UploadEntryTypedData, ...args: A) => R): (...args: A) => R | undefined;
|
|
1527
|
+
protected subEntry<K extends UploadEntryKeys>(prop: K, handler: (value: UploadEntryData[K]) => void): void;
|
|
1528
|
+
protected reset(): void;
|
|
1529
|
+
disconnectedCallback(): void;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
declare class Thumb extends FileItemConfig {
|
|
1533
|
+
badgeIcon: string;
|
|
1534
|
+
uid: Uid;
|
|
1535
|
+
private _thumbUrl;
|
|
1536
|
+
private _renderedGridOnce;
|
|
1537
|
+
private _thumbRect;
|
|
1538
|
+
private _isIntersecting;
|
|
1539
|
+
private _firstViewMode;
|
|
1540
|
+
private _observer?;
|
|
1541
|
+
private _pendingThumbUpdate?;
|
|
1542
|
+
private _calculateThumbSize;
|
|
1543
|
+
private _generateThumbnail;
|
|
1689
1544
|
private _debouncedGenerateThumb;
|
|
1690
1545
|
private _decodeImage;
|
|
1691
1546
|
private _cancelPendingThumbUpdate;
|
|
@@ -1701,610 +1556,1208 @@ declare class Thumb extends FileItemConfig {
|
|
|
1701
1556
|
disconnectedCallback(): void;
|
|
1702
1557
|
render(): lit_html.TemplateResult<1>;
|
|
1703
1558
|
}
|
|
1559
|
+
declare global {
|
|
1560
|
+
interface HTMLElementTagNameMap {
|
|
1561
|
+
'uc-thumb': Thumb;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1704
1564
|
|
|
1705
|
-
declare class
|
|
1565
|
+
declare class ProgressBar extends LitBlock {
|
|
1566
|
+
hasFileName: boolean;
|
|
1567
|
+
value: number;
|
|
1568
|
+
visible: boolean;
|
|
1569
|
+
private _progressValue;
|
|
1570
|
+
private readonly _fakeProgressLineRef;
|
|
1571
|
+
private readonly _handleFakeProgressAnimation;
|
|
1572
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1573
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1574
|
+
disconnectedCallback(): void;
|
|
1575
|
+
private _normalizeProgressValue;
|
|
1576
|
+
private _updateProgressValueStyle;
|
|
1577
|
+
render(): lit_html.TemplateResult<1>;
|
|
1578
|
+
}
|
|
1579
|
+
declare global {
|
|
1580
|
+
interface HTMLElementTagNameMap {
|
|
1581
|
+
'uc-progress-bar': ProgressBar;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
declare class FileItem extends FileItemConfig {
|
|
1586
|
+
protected couldBeCtxOwner: boolean;
|
|
1587
|
+
private _pauseRender;
|
|
1588
|
+
uid: Uid;
|
|
1589
|
+
private _itemName;
|
|
1590
|
+
private _errorText;
|
|
1591
|
+
private _hint;
|
|
1592
|
+
private _progressValue;
|
|
1593
|
+
private _progressVisible;
|
|
1594
|
+
private _badgeIcon;
|
|
1595
|
+
private _isFinished;
|
|
1596
|
+
private _isFailed;
|
|
1597
|
+
private _isUploading;
|
|
1598
|
+
private _isFocused;
|
|
1599
|
+
private _isEditable;
|
|
1600
|
+
private _showFileNames;
|
|
1601
|
+
private _ariaLabelStatusFile;
|
|
1602
|
+
private _renderedOnce;
|
|
1603
|
+
private _observer?;
|
|
1604
|
+
private _handleEdit;
|
|
1605
|
+
private _handleRemove;
|
|
1606
|
+
private _handleUploadClick;
|
|
1607
|
+
private _calculateState;
|
|
1608
|
+
private _debouncedCalculateState;
|
|
1609
|
+
private _updateHintAndProgress;
|
|
1610
|
+
private _handleState;
|
|
1611
|
+
protected reset(): void;
|
|
1612
|
+
private _observerCallback;
|
|
1613
|
+
private _handleEntryId;
|
|
1614
|
+
private _updateShowFileNames;
|
|
1615
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1616
|
+
initCallback(): void;
|
|
1617
|
+
connectedCallback(): void;
|
|
1618
|
+
disconnectedCallback(): void;
|
|
1619
|
+
private _upload;
|
|
1620
|
+
static activeInstances: Set<FileItem>;
|
|
1621
|
+
protected shouldUpdate(changedProperties: PropertyValues<this>): boolean;
|
|
1622
|
+
render(): lit_html.TemplateResult<1>;
|
|
1623
|
+
}
|
|
1624
|
+
declare global {
|
|
1625
|
+
interface HTMLElementTagNameMap {
|
|
1626
|
+
'uc-file-item': FileItem;
|
|
1627
|
+
}
|
|
1706
1628
|
}
|
|
1707
1629
|
|
|
1708
|
-
declare class
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1630
|
+
declare class DropArea extends LitUploaderBlock {
|
|
1631
|
+
static styleAttrs: string[];
|
|
1632
|
+
/**
|
|
1633
|
+
* CSS-only attribute
|
|
1634
|
+
*/
|
|
1635
|
+
single: boolean;
|
|
1636
|
+
/**
|
|
1637
|
+
* CSS-only attribute
|
|
1638
|
+
*/
|
|
1639
|
+
ghost: boolean;
|
|
1640
|
+
disabled: boolean;
|
|
1641
|
+
clickable: boolean;
|
|
1642
|
+
withIcon: boolean;
|
|
1643
|
+
fullscreen: boolean;
|
|
1644
|
+
initflow: boolean;
|
|
1645
|
+
text?: string;
|
|
1646
|
+
private _isEnabled;
|
|
1647
|
+
private _isVisible;
|
|
1648
|
+
private get _localizedText();
|
|
1649
|
+
private _destroyDropzone;
|
|
1650
|
+
private _destroyContentWrapperDropzone;
|
|
1651
|
+
private _contentWrapperRef;
|
|
1652
|
+
private readonly _handleAreaInteraction;
|
|
1653
|
+
private _sourceListAllowsLocal;
|
|
1654
|
+
private _clickableListenersAttached;
|
|
1655
|
+
isActive(): boolean;
|
|
1656
|
+
initCallback(): void;
|
|
1657
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1658
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1659
|
+
/** Ignore drop events if there are other visible drop areas on the page. */
|
|
1660
|
+
private _shouldIgnore;
|
|
1661
|
+
private _couldHandleFiles;
|
|
1662
|
+
private _updateIsEnabled;
|
|
1663
|
+
private _updateVisibility;
|
|
1664
|
+
private _updateDragStateAttribute;
|
|
1665
|
+
private _updateClickableListeners;
|
|
1666
|
+
disconnectedCallback(): void;
|
|
1667
|
+
render(): lit_html.TemplateResult<1>;
|
|
1668
|
+
}
|
|
1669
|
+
declare global {
|
|
1670
|
+
interface HTMLElementTagNameMap {
|
|
1671
|
+
'uc-drop-area': DropArea;
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
type FilesViewMode = 'grid' | 'list';
|
|
1676
|
+
declare class UploadList extends LitUploaderBlock {
|
|
1677
|
+
couldBeCtxOwner: boolean;
|
|
1678
|
+
protected historyTracked: boolean;
|
|
1679
|
+
activityType: "upload-list";
|
|
1680
|
+
private _doneBtnVisible;
|
|
1681
|
+
private _doneBtnEnabled;
|
|
1682
|
+
private _uploadBtnVisible;
|
|
1683
|
+
private _addMoreBtnVisible;
|
|
1684
|
+
private _addMoreBtnEnabled;
|
|
1685
|
+
private _commonErrorMessage;
|
|
1686
|
+
private _hasFiles;
|
|
1687
|
+
private _latestSummary;
|
|
1688
|
+
private get _headerText();
|
|
1689
|
+
private _handleAdd;
|
|
1690
|
+
private _handleUpload;
|
|
1691
|
+
private _handleDone;
|
|
1692
|
+
private _handleCancel;
|
|
1693
|
+
private _throttledHandleCollectionUpdate;
|
|
1694
|
+
private _updateUploadsState;
|
|
1695
|
+
private _getHeaderText;
|
|
1696
|
+
get couldOpenActivity(): boolean;
|
|
1697
|
+
initCallback(): void;
|
|
1698
|
+
disconnectedCallback(): void;
|
|
1699
|
+
render(): lit_html.TemplateResult<1>;
|
|
1700
|
+
}
|
|
1701
|
+
declare global {
|
|
1702
|
+
interface HTMLElementTagNameMap {
|
|
1703
|
+
'uc-upload-list': UploadList;
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
type MetadataCallback = (fileEntry: OutputFileEntry) => Promise<Metadata> | Metadata;
|
|
1708
|
+
type LocaleDefinitionOverride = Record<string, Partial<LocaleDefinition>>;
|
|
1709
|
+
type SecureDeliveryProxyUrlResolver = (previewUrl: string, urlParts: {
|
|
1710
|
+
uuid: string;
|
|
1711
|
+
cdnUrlModifiers: string;
|
|
1712
|
+
fileName: string;
|
|
1713
|
+
}) => Promise<string> | string;
|
|
1714
|
+
type SecureUploadsSignatureAndExpire = {
|
|
1715
|
+
secureSignature: string;
|
|
1716
|
+
secureExpire: string;
|
|
1717
|
+
};
|
|
1718
|
+
type SecureUploadsSignatureResolver = () => Promise<SecureUploadsSignatureAndExpire | null>;
|
|
1719
|
+
type IconHrefResolver = (iconName: string) => string;
|
|
1720
|
+
type FileValidators = FileValidator[];
|
|
1721
|
+
type CollectionValidators = FuncCollectionValidator[];
|
|
1722
|
+
type ConfigType = {
|
|
1723
|
+
/**
|
|
1724
|
+
* Your project’s Public Key.
|
|
1725
|
+
*/
|
|
1726
|
+
pubkey: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Allow multiple file uploads.
|
|
1729
|
+
*/
|
|
1730
|
+
multiple: boolean;
|
|
1731
|
+
/**
|
|
1732
|
+
* Minimum number of files to upload.
|
|
1733
|
+
*/
|
|
1734
|
+
multipleMin: number;
|
|
1735
|
+
/**
|
|
1736
|
+
* Maximum number of files to upload.
|
|
1737
|
+
*/
|
|
1738
|
+
multipleMax: number;
|
|
1739
|
+
/**
|
|
1740
|
+
* Require user confirmation before uploading.
|
|
1741
|
+
*/
|
|
1742
|
+
confirmUpload: boolean;
|
|
1743
|
+
/**
|
|
1744
|
+
* Allow only image files.
|
|
1745
|
+
*/
|
|
1746
|
+
imgOnly: boolean;
|
|
1747
|
+
/**
|
|
1748
|
+
* Native file input accept attribute value. Also affects client validation settings.
|
|
1749
|
+
*/
|
|
1750
|
+
accept: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* Preferred types for external sources.
|
|
1753
|
+
* See [here](https://uploadcare.com/docs/file-uploader/options/#external-sources-preferred-types)
|
|
1754
|
+
*/
|
|
1755
|
+
externalSourcesPreferredTypes: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* Provide custom CSS to the social sources iframe
|
|
1758
|
+
*/
|
|
1759
|
+
externalSourcesEmbedCss: string;
|
|
1760
|
+
/**
|
|
1761
|
+
* Store uploaded files.
|
|
1762
|
+
*/
|
|
1763
|
+
store: boolean | 'auto';
|
|
1764
|
+
/**
|
|
1765
|
+
* Mirror the camera view.
|
|
1766
|
+
*/
|
|
1767
|
+
cameraMirror: boolean;
|
|
1768
|
+
/**
|
|
1769
|
+
* Default camera capture mode.
|
|
1770
|
+
*/
|
|
1771
|
+
cameraCapture: 'user' | 'environment' | '';
|
|
1772
|
+
/**
|
|
1773
|
+
* List of sources for file uploads.
|
|
1774
|
+
*/
|
|
1775
|
+
sourceList: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* Top-level origin for the uploader.
|
|
1778
|
+
* This is used for Google Drive Picker if there is no access to the origin due to the cross-origin policy.
|
|
1779
|
+
*/
|
|
1780
|
+
topLevelOrigin: string;
|
|
1781
|
+
/**
|
|
1782
|
+
* Maximum size of local files in bytes.
|
|
1783
|
+
*/
|
|
1784
|
+
maxLocalFileSizeBytes: number;
|
|
1785
|
+
/**
|
|
1786
|
+
* Thumbnail size.
|
|
1787
|
+
*/
|
|
1788
|
+
thumbSize: number;
|
|
1789
|
+
/**
|
|
1790
|
+
* Show the upload list even if it is empty.
|
|
1791
|
+
*/
|
|
1792
|
+
showEmptyList: boolean;
|
|
1793
|
+
/**
|
|
1794
|
+
* Use local image editor.
|
|
1795
|
+
*/
|
|
1796
|
+
useLocalImageEditor: boolean;
|
|
1797
|
+
/**
|
|
1798
|
+
* Enable cloud image editing.
|
|
1799
|
+
*/
|
|
1800
|
+
useCloudImageEditor: boolean;
|
|
1801
|
+
/**
|
|
1802
|
+
* Tabs to show in the cloud image editor.
|
|
1803
|
+
*
|
|
1804
|
+
* @default 'crop, tuning, filters'
|
|
1805
|
+
*/
|
|
1806
|
+
cloudImageEditorTabs: string;
|
|
1807
|
+
/**
|
|
1808
|
+
* Remove copyright information.
|
|
1809
|
+
*/
|
|
1810
|
+
removeCopyright: boolean;
|
|
1811
|
+
/**
|
|
1812
|
+
* Defines the crop behavior. When uploading images, your users can select a crop area with a defined aspect ratio.
|
|
1813
|
+
*/
|
|
1814
|
+
cropPreset: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* Image shrink options.
|
|
1817
|
+
*/
|
|
1818
|
+
imageShrink: string;
|
|
1819
|
+
/**
|
|
1820
|
+
* Lock scroll when modal is open.
|
|
1821
|
+
*/
|
|
1822
|
+
modalScrollLock: boolean;
|
|
1823
|
+
/**
|
|
1824
|
+
* Show strokes on modal backdrop.
|
|
1825
|
+
*/
|
|
1826
|
+
modalBackdropStrokes: boolean;
|
|
1827
|
+
/**
|
|
1828
|
+
* Wrap the source list.
|
|
1829
|
+
*/
|
|
1830
|
+
sourceListWrap: boolean;
|
|
1831
|
+
/**
|
|
1832
|
+
* Key to revoke Custom OAuth access. See [OAuth docs](https://uploadcare.com/docs/upload-sources/#oauth) for details.
|
|
1833
|
+
*/
|
|
1834
|
+
remoteTabSessionKey: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* Set custom CNAME.
|
|
1837
|
+
*/
|
|
1838
|
+
cdnCname: string;
|
|
1839
|
+
/**
|
|
1840
|
+
* Set CNAME base domain for prefixed CDN URLs.
|
|
1841
|
+
*/
|
|
1842
|
+
cdnCnamePrefixed: string;
|
|
1843
|
+
/**
|
|
1844
|
+
* Set a custom upload URL.
|
|
1845
|
+
*/
|
|
1846
|
+
baseUrl: string;
|
|
1847
|
+
/**
|
|
1848
|
+
* Set a custom social sources URL.
|
|
1849
|
+
*/
|
|
1850
|
+
socialBaseUrl: string;
|
|
1851
|
+
/**
|
|
1852
|
+
* Secure signature for uploads.
|
|
1853
|
+
*/
|
|
1854
|
+
secureSignature: string;
|
|
1855
|
+
/**
|
|
1856
|
+
* Expiry time for secure uploads.
|
|
1857
|
+
*/
|
|
1858
|
+
secureExpire: string;
|
|
1859
|
+
/**
|
|
1860
|
+
* Proxy URL for secure delivery.
|
|
1861
|
+
*/
|
|
1862
|
+
secureDeliveryProxy: string;
|
|
1863
|
+
/**
|
|
1864
|
+
* Maximum number of retry attempts for throttled requests.
|
|
1865
|
+
*/
|
|
1866
|
+
retryThrottledRequestMaxTimes: number;
|
|
1867
|
+
/**
|
|
1868
|
+
* Maximum number of retry attempts for network errors.
|
|
1869
|
+
*/
|
|
1870
|
+
retryNetworkErrorMaxTimes: number;
|
|
1871
|
+
/**
|
|
1872
|
+
* Minimum file size for multipart uploads.
|
|
1873
|
+
*/
|
|
1874
|
+
multipartMinFileSize: number;
|
|
1875
|
+
/**
|
|
1876
|
+
* Chunk size for multipart uploads.
|
|
1877
|
+
*/
|
|
1878
|
+
multipartChunkSize: number;
|
|
1879
|
+
/**
|
|
1880
|
+
* Maximum number of concurrent requests.
|
|
1881
|
+
*/
|
|
1882
|
+
maxConcurrentRequests: number;
|
|
1883
|
+
/**
|
|
1884
|
+
* Maximum number of concurrent multipart requests.
|
|
1885
|
+
*/
|
|
1886
|
+
multipartMaxConcurrentRequests: number;
|
|
1887
|
+
/**
|
|
1888
|
+
* Maximum number of attempts for multipart uploads.
|
|
1889
|
+
*/
|
|
1890
|
+
multipartMaxAttempts: number;
|
|
1891
|
+
/**
|
|
1892
|
+
* Check for URL duplicates.
|
|
1893
|
+
*/
|
|
1894
|
+
checkForUrlDuplicates: boolean;
|
|
1895
|
+
/**
|
|
1896
|
+
* Save URL for recurrent uploads.
|
|
1897
|
+
*/
|
|
1898
|
+
saveUrlForRecurrentUploads: boolean;
|
|
1899
|
+
/**
|
|
1900
|
+
* Group output files.
|
|
1901
|
+
*/
|
|
1902
|
+
groupOutput: boolean;
|
|
1903
|
+
/**
|
|
1904
|
+
* User agent integration string.
|
|
1905
|
+
*/
|
|
1906
|
+
userAgentIntegration: string;
|
|
1907
|
+
/**
|
|
1908
|
+
* Enable debug mode.
|
|
1909
|
+
*/
|
|
1910
|
+
debug: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* Locale name for the uploader.
|
|
1913
|
+
*/
|
|
1914
|
+
localeName: string;
|
|
1915
|
+
/**
|
|
1916
|
+
* Expiry threshold for secure uploads.
|
|
1917
|
+
*/
|
|
1918
|
+
secureUploadsExpireThreshold: number;
|
|
1919
|
+
/**
|
|
1920
|
+
* Metadata for the file.
|
|
1921
|
+
*/
|
|
1922
|
+
metadata: Metadata | MetadataCallback | null;
|
|
1923
|
+
/**
|
|
1924
|
+
* Override locale definitions.
|
|
1925
|
+
*/
|
|
1926
|
+
localeDefinitionOverride: LocaleDefinitionOverride | null;
|
|
1927
|
+
/**
|
|
1928
|
+
* Resolver for secure uploads signature.
|
|
1929
|
+
*/
|
|
1930
|
+
secureUploadsSignatureResolver: SecureUploadsSignatureResolver | null;
|
|
1931
|
+
/**
|
|
1932
|
+
* Resolver for secure delivery proxy URL.
|
|
1933
|
+
*/
|
|
1934
|
+
secureDeliveryProxyUrlResolver: SecureDeliveryProxyUrlResolver | null;
|
|
1935
|
+
/**
|
|
1936
|
+
* Resolver for icon href.
|
|
1937
|
+
*/
|
|
1938
|
+
iconHrefResolver: IconHrefResolver | null;
|
|
1939
|
+
/**
|
|
1940
|
+
* Validators for individual files.
|
|
1941
|
+
*/
|
|
1942
|
+
fileValidators: FileValidators;
|
|
1943
|
+
/**
|
|
1944
|
+
* Validators for file collections.
|
|
1945
|
+
*/
|
|
1946
|
+
collectionValidators: CollectionValidators;
|
|
1947
|
+
/**
|
|
1948
|
+
* Timeout for async validation functions, in milliseconds.
|
|
1949
|
+
*/
|
|
1950
|
+
validationTimeout: number;
|
|
1951
|
+
/**
|
|
1952
|
+
* The number of files to validate concurrently.
|
|
1953
|
+
*/
|
|
1954
|
+
validationConcurrency: number;
|
|
1955
|
+
/**
|
|
1956
|
+
* The camera modes to enable in the camera modal,
|
|
1957
|
+
* it is possible to select photo or video capture.
|
|
1958
|
+
* The first mode is the default mode.
|
|
1959
|
+
* @default 'photo,video'
|
|
1960
|
+
*/
|
|
1961
|
+
cameraModes: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* The default tab to open in the camera modal,
|
|
1964
|
+
* it is possible to select video or photo capture
|
|
1965
|
+
* @default 'null'
|
|
1966
|
+
* @deprecated - use `cameraModes` instead
|
|
1967
|
+
*/
|
|
1968
|
+
defaultCameraMode: CameraMode | null;
|
|
1969
|
+
/**
|
|
1970
|
+
* Enable audio recording.
|
|
1971
|
+
* @default true
|
|
1972
|
+
*/
|
|
1973
|
+
enableAudioRecording: boolean;
|
|
1974
|
+
/**
|
|
1975
|
+
* Enable video recording.
|
|
1976
|
+
* @deprecated - use `cameraModes` instead
|
|
1977
|
+
* @default null
|
|
1978
|
+
*/
|
|
1979
|
+
enableVideoRecording: boolean | null;
|
|
1980
|
+
/**
|
|
1981
|
+
* The maximum duration of the video recording in seconds
|
|
1982
|
+
* @default null
|
|
1983
|
+
*/
|
|
1984
|
+
maxVideoRecordingDuration: number | null;
|
|
1985
|
+
/**
|
|
1986
|
+
* A dictionary object that can contain
|
|
1987
|
+
* the following properties from MediaRecorderOptions
|
|
1988
|
+
*/
|
|
1989
|
+
mediaRecorderOptions: MediaRecorderOptions | null;
|
|
1990
|
+
filesViewMode: FilesViewMode;
|
|
1991
|
+
gridShowFileNames: boolean;
|
|
1992
|
+
cloudImageEditorAutoOpen: boolean;
|
|
1993
|
+
qualityInsights: boolean;
|
|
1994
|
+
cloudImageEditorMaskHref: string | null;
|
|
1995
|
+
/**
|
|
1996
|
+
* Adds data-testid attributes to the each block. Needed for testing purposes.
|
|
1997
|
+
* @default false
|
|
1998
|
+
*/
|
|
1999
|
+
testMode: boolean;
|
|
2000
|
+
};
|
|
2001
|
+
type ConfigComplexType = Pick<ConfigType, (typeof complexConfigKeys)[number]>;
|
|
2002
|
+
type ConfigPlainType = Omit<ConfigType, keyof ConfigComplexType>;
|
|
2003
|
+
type ConfigAttributesType = KebabCaseKeys<ConfigPlainType> & LowerCaseKeys<ConfigPlainType>;
|
|
2004
|
+
type KebabCase$1<S extends string> = S extends `${infer C}${infer T}` ? T extends Uncapitalize<T> ? `${Uncapitalize<C>}${KebabCase$1<T>}` : `${Uncapitalize<C>}-${KebabCase$1<T>}` : S;
|
|
2005
|
+
type KebabCaseKeys<T extends Record<string, unknown>> = {
|
|
2006
|
+
[Key in keyof T as KebabCase$1<Key & string>]: T[Key];
|
|
2007
|
+
};
|
|
2008
|
+
type LowerCase<S extends string> = Lowercase<S>;
|
|
2009
|
+
type LowerCaseKeys<T extends Record<string, unknown>> = {
|
|
2010
|
+
[Key in keyof T as Lowercase<Key & string>]: T[Key];
|
|
2011
|
+
};
|
|
2012
|
+
type OutputFileStatus = 'idle' | 'uploading' | 'success' | 'failed' | 'removed';
|
|
2013
|
+
type OutputCustomErrorType = 'CUSTOM_ERROR';
|
|
2014
|
+
type OutputFileErrorType = OutputCustomErrorType | 'NOT_AN_IMAGE' | 'FORBIDDEN_FILE_TYPE' | 'FILE_SIZE_EXCEEDED' | 'UPLOAD_ERROR' | 'NETWORK_ERROR' | 'UNKNOWN_ERROR';
|
|
2015
|
+
type OutputCollectionErrorType = OutputCustomErrorType | 'SOME_FILES_HAS_ERRORS' | 'TOO_MANY_FILES' | 'TOO_FEW_FILES';
|
|
2016
|
+
type OutputFileErrorPayload = {
|
|
2017
|
+
entry: OutputFileEntry;
|
|
2018
|
+
};
|
|
2019
|
+
type OutputErrorTypePayload = {
|
|
2020
|
+
NOT_AN_IMAGE: OutputFileErrorPayload;
|
|
2021
|
+
FORBIDDEN_FILE_TYPE: OutputFileErrorPayload;
|
|
2022
|
+
FILE_SIZE_EXCEEDED: OutputFileErrorPayload;
|
|
2023
|
+
SOME_FILES_HAS_ERRORS: {
|
|
2024
|
+
[k: string]: never;
|
|
2025
|
+
};
|
|
2026
|
+
TOO_MANY_FILES: {
|
|
2027
|
+
min: number;
|
|
2028
|
+
max: number;
|
|
2029
|
+
total: number;
|
|
2030
|
+
};
|
|
2031
|
+
TOO_FEW_FILES: {
|
|
2032
|
+
min: number;
|
|
2033
|
+
max: number;
|
|
2034
|
+
total: number;
|
|
2035
|
+
};
|
|
2036
|
+
UPLOAD_ERROR: OutputFileErrorPayload & {
|
|
2037
|
+
error: UploadError;
|
|
2038
|
+
};
|
|
2039
|
+
NETWORK_ERROR: OutputFileErrorPayload & {
|
|
2040
|
+
error: NetworkError;
|
|
2041
|
+
};
|
|
2042
|
+
UNKNOWN_ERROR: OutputFileErrorPayload & {
|
|
2043
|
+
error?: Error;
|
|
2044
|
+
};
|
|
2045
|
+
CUSTOM_ERROR: Record<string, unknown>;
|
|
2046
|
+
};
|
|
2047
|
+
type OutputError<T extends OutputFileErrorType | OutputCollectionErrorType> = T extends OutputCustomErrorType ? {
|
|
2048
|
+
type?: T;
|
|
2049
|
+
message: string;
|
|
2050
|
+
payload?: OutputErrorTypePayload[T];
|
|
2051
|
+
} : T extends keyof OutputErrorTypePayload ? {
|
|
2052
|
+
type: T;
|
|
2053
|
+
message: string;
|
|
2054
|
+
payload?: OutputErrorTypePayload[T];
|
|
2055
|
+
} : never;
|
|
2056
|
+
type OutputErrorFile = OutputError<OutputFileErrorType>;
|
|
2057
|
+
type OutputErrorCollection = OutputError<OutputCollectionErrorType>;
|
|
2058
|
+
type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus> = {
|
|
2059
|
+
status: TStatus;
|
|
2060
|
+
internalId: string;
|
|
2061
|
+
name: string;
|
|
2062
|
+
size: number;
|
|
2063
|
+
isImage: boolean;
|
|
2064
|
+
mimeType: string;
|
|
2065
|
+
metadata: Metadata | null;
|
|
2066
|
+
file: File | Blob | null;
|
|
2067
|
+
externalUrl: string | null;
|
|
2068
|
+
uploadProgress: number;
|
|
2069
|
+
fullPath: string | null;
|
|
2070
|
+
source: SourceTypes | null;
|
|
2071
|
+
isValidationPending: boolean;
|
|
2072
|
+
} & ({
|
|
2073
|
+
status: 'success';
|
|
2074
|
+
fileInfo: UploadcareFile;
|
|
2075
|
+
uuid: string;
|
|
2076
|
+
cdnUrl: string;
|
|
2077
|
+
cdnUrlModifiers: string;
|
|
2078
|
+
isUploading: false;
|
|
2079
|
+
isSuccess: true;
|
|
2080
|
+
isFailed: false;
|
|
2081
|
+
isRemoved: false;
|
|
2082
|
+
errors: [];
|
|
2083
|
+
} | {
|
|
2084
|
+
status: 'failed';
|
|
2085
|
+
fileInfo: UploadcareFile | null;
|
|
2086
|
+
uuid: string | null;
|
|
2087
|
+
cdnUrl: string | null;
|
|
2088
|
+
cdnUrlModifiers: string | null;
|
|
2089
|
+
isUploading: false;
|
|
2090
|
+
isSuccess: false;
|
|
2091
|
+
isFailed: true;
|
|
2092
|
+
isRemoved: false;
|
|
2093
|
+
errors: OutputError<OutputFileErrorType>[];
|
|
2094
|
+
} | {
|
|
2095
|
+
status: 'uploading';
|
|
2096
|
+
fileInfo: null;
|
|
2097
|
+
uuid: null;
|
|
2098
|
+
cdnUrl: null;
|
|
2099
|
+
cdnUrlModifiers: null;
|
|
2100
|
+
isUploading: true;
|
|
2101
|
+
isSuccess: false;
|
|
2102
|
+
isFailed: false;
|
|
2103
|
+
isRemoved: false;
|
|
2104
|
+
errors: [];
|
|
2105
|
+
} | {
|
|
2106
|
+
status: 'removed';
|
|
2107
|
+
fileInfo: UploadcareFile | null;
|
|
2108
|
+
uuid: string | null;
|
|
2109
|
+
cdnUrl: string | null;
|
|
2110
|
+
cdnUrlModifiers: string | null;
|
|
2111
|
+
isUploading: false;
|
|
2112
|
+
isSuccess: false;
|
|
2113
|
+
isFailed: false;
|
|
2114
|
+
isRemoved: true;
|
|
2115
|
+
errors: OutputError<OutputFileErrorType>[];
|
|
2116
|
+
} | {
|
|
2117
|
+
status: 'idle';
|
|
2118
|
+
fileInfo: null;
|
|
2119
|
+
uuid: null;
|
|
2120
|
+
cdnUrl: null;
|
|
2121
|
+
cdnUrlModifiers: null;
|
|
2122
|
+
isUploading: false;
|
|
2123
|
+
isSuccess: false;
|
|
2124
|
+
isFailed: false;
|
|
2125
|
+
isRemoved: false;
|
|
2126
|
+
errors: [];
|
|
2127
|
+
});
|
|
2128
|
+
type OutputCollectionStatus = 'idle' | 'uploading' | 'success' | 'failed';
|
|
2129
|
+
type GroupFlag = 'has-group' | 'maybe-has-group';
|
|
2130
|
+
type OutputCollectionState<TStatus extends OutputCollectionStatus = OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'> = {
|
|
2131
|
+
status: TStatus;
|
|
2132
|
+
totalCount: number;
|
|
2133
|
+
successCount: number;
|
|
2134
|
+
failedCount: number;
|
|
2135
|
+
uploadingCount: number;
|
|
2136
|
+
progress: number;
|
|
2137
|
+
successEntries: OutputFileEntry<'success'>[];
|
|
2138
|
+
failedEntries: OutputFileEntry<'failed'>[];
|
|
2139
|
+
uploadingEntries: OutputFileEntry<'uploading'>[];
|
|
2140
|
+
idleEntries: OutputFileEntry<'idle'>[];
|
|
2141
|
+
} & (TGroupFlag extends 'has-group' ? {
|
|
2142
|
+
group: UploadcareGroup;
|
|
2143
|
+
} : TGroupFlag extends 'maybe-has-group' ? {
|
|
2144
|
+
group: UploadcareGroup | null;
|
|
2145
|
+
} : never) & ({
|
|
2146
|
+
status: 'idle';
|
|
2147
|
+
isFailed: false;
|
|
2148
|
+
isUploading: false;
|
|
2149
|
+
isSuccess: false;
|
|
2150
|
+
errors: [];
|
|
2151
|
+
allEntries: OutputFileEntry<'idle' | 'success'>[];
|
|
2152
|
+
} | {
|
|
2153
|
+
status: 'uploading';
|
|
2154
|
+
isFailed: false;
|
|
2155
|
+
isUploading: true;
|
|
2156
|
+
isSuccess: false;
|
|
2157
|
+
errors: [];
|
|
2158
|
+
allEntries: OutputFileEntry[];
|
|
2159
|
+
} | {
|
|
2160
|
+
status: 'success';
|
|
2161
|
+
isFailed: false;
|
|
2162
|
+
isUploading: false;
|
|
2163
|
+
isSuccess: true;
|
|
2164
|
+
errors: [];
|
|
2165
|
+
allEntries: OutputFileEntry<'success'>[];
|
|
2166
|
+
} | {
|
|
2167
|
+
status: 'failed';
|
|
2168
|
+
isFailed: true;
|
|
2169
|
+
isUploading: false;
|
|
2170
|
+
isSuccess: false;
|
|
2171
|
+
errors: OutputError<OutputCollectionErrorType>[];
|
|
2172
|
+
allEntries: OutputFileEntry[];
|
|
2173
|
+
});
|
|
2174
|
+
|
|
2175
|
+
declare class SecureUploadsManager extends SharedInstance {
|
|
2176
|
+
private _secureToken;
|
|
2177
|
+
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
2178
|
+
destroy(): void;
|
|
1713
2179
|
}
|
|
1714
2180
|
|
|
1715
|
-
type
|
|
1716
|
-
|
|
2181
|
+
type CommonEventType = InternalEventKey | EventKey;
|
|
2182
|
+
type TelemetryState = TelemetryRequest & {
|
|
2183
|
+
eventTimestamp: number;
|
|
2184
|
+
location: string;
|
|
1717
2185
|
};
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
};
|
|
1722
|
-
static styleAttrs: string[];
|
|
1723
|
-
static EventType: Readonly<{
|
|
1724
|
-
readonly FILE_ADDED: "file-added";
|
|
1725
|
-
readonly FILE_REMOVED: "file-removed";
|
|
1726
|
-
readonly FILE_UPLOAD_START: "file-upload-start";
|
|
1727
|
-
readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
|
|
1728
|
-
readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
|
|
1729
|
-
readonly FILE_UPLOAD_FAILED: "file-upload-failed";
|
|
1730
|
-
readonly FILE_URL_CHANGED: "file-url-changed";
|
|
1731
|
-
readonly MODAL_OPEN: "modal-open";
|
|
1732
|
-
readonly MODAL_CLOSE: "modal-close";
|
|
1733
|
-
readonly DONE_CLICK: "done-click";
|
|
1734
|
-
readonly UPLOAD_CLICK: "upload-click";
|
|
1735
|
-
readonly ACTIVITY_CHANGE: "activity-change";
|
|
1736
|
-
readonly COMMON_UPLOAD_START: "common-upload-start";
|
|
1737
|
-
readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
|
|
1738
|
-
readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
|
|
1739
|
-
readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
|
|
1740
|
-
readonly CHANGE: "change";
|
|
1741
|
-
readonly GROUP_CREATED: "group-created";
|
|
1742
|
-
}>;
|
|
1743
|
-
private _unbindEventEmitter;
|
|
1744
|
-
initCallback(): void;
|
|
1745
|
-
disconnectedCallback(): void;
|
|
1746
|
-
}
|
|
1747
|
-
interface UploadCtxProvider extends LitUploaderBlock {
|
|
1748
|
-
addEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | AddEventListenerOptions): void;
|
|
1749
|
-
removeEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | EventListenerOptions): void;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
declare class UrlSource extends LitUploaderBlock {
|
|
1753
|
-
couldBeCtxOwner: boolean;
|
|
1754
|
-
activityType: ActivityType;
|
|
1755
|
-
private _formState;
|
|
1756
|
-
initCallback(): void;
|
|
1757
|
-
private _inputRef;
|
|
1758
|
-
private _handleInput;
|
|
1759
|
-
private _handleUpload;
|
|
1760
|
-
render(): lit_html.TemplateResult<1>;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
declare function initState(fnCtx: CloudImageEditorBlock): {
|
|
1764
|
-
'*originalUrl': null;
|
|
1765
|
-
'*loadingOperations': LoadingOperations;
|
|
1766
|
-
'*faderEl': null;
|
|
1767
|
-
'*cropperEl': null;
|
|
1768
|
-
'*imgEl': null;
|
|
1769
|
-
'*imgContainerEl': null;
|
|
1770
|
-
'*networkProblems': boolean;
|
|
1771
|
-
'*imageSize': null;
|
|
1772
|
-
'*editorTransformations': {};
|
|
1773
|
-
'*cropPresetList': never[];
|
|
1774
|
-
'*currentAspectRatio': null;
|
|
1775
|
-
'*tabList': readonly ["crop", "tuning", "filters"];
|
|
1776
|
-
'*tabId': "crop";
|
|
1777
|
-
'*on.retryNetwork': () => void;
|
|
1778
|
-
'*on.apply': (transformations: Transformations) => void;
|
|
1779
|
-
'*on.cancel': () => void;
|
|
2186
|
+
type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
|
|
2187
|
+
modalId?: string;
|
|
2188
|
+
eventType?: CommonEventType;
|
|
1780
2189
|
};
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
private _imageSrc;
|
|
1797
|
-
private _fileType;
|
|
1798
|
-
private _showLoader;
|
|
1799
|
-
uuid: string | null;
|
|
1800
|
-
cdnUrl: string | null;
|
|
1801
|
-
cropPreset: string;
|
|
1802
|
-
tabs: string | null;
|
|
1803
|
-
private _hasNetworkProblems;
|
|
1804
|
-
private _isInitialized;
|
|
1805
|
-
private _pendingInitUpdate;
|
|
1806
|
-
private readonly _debouncedShowLoader;
|
|
1807
|
-
private readonly _imgRef;
|
|
1808
|
-
private readonly _cropperRef;
|
|
1809
|
-
private readonly _faderRef;
|
|
1810
|
-
private readonly _imgContainerRef;
|
|
1811
|
-
private readonly _handleImageLoad;
|
|
1812
|
-
private readonly _handleImageError;
|
|
1813
|
-
private readonly _handleRetryNetwork;
|
|
1814
|
-
private _scheduleInitialization;
|
|
1815
|
-
init$: ReturnType<typeof initState>;
|
|
1816
|
-
initCallback(): void;
|
|
1817
|
-
private _assignSharedElements;
|
|
1818
|
-
private _attachImageListeners;
|
|
1819
|
-
private _detachImageListeners;
|
|
1820
|
-
private get _imageClassName();
|
|
2190
|
+
declare class TelemetryManager extends SharedInstance {
|
|
2191
|
+
private readonly _sessionId;
|
|
2192
|
+
private readonly _telemetryInstance;
|
|
2193
|
+
private _config;
|
|
2194
|
+
private _initialized;
|
|
2195
|
+
private _lastPayload;
|
|
2196
|
+
private readonly _queue;
|
|
2197
|
+
private _isEnabled;
|
|
2198
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
2199
|
+
private _init;
|
|
2200
|
+
private _setConfig;
|
|
2201
|
+
private _formattingPayload;
|
|
2202
|
+
private _excludedEvents;
|
|
2203
|
+
sendEvent(body: TelemetryEventBody): void;
|
|
2204
|
+
sendEventError(error: unknown, context?: string): void;
|
|
1821
2205
|
/**
|
|
1822
|
-
*
|
|
2206
|
+
* Method to send telemetry event for Cloud Image Editor.
|
|
1823
2207
|
*/
|
|
1824
|
-
|
|
1825
|
-
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1826
|
-
disconnectedCallback(): void;
|
|
1827
|
-
render(): lit_html.TemplateResult<1>;
|
|
1828
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1829
|
-
private _syncTabListFromProp;
|
|
1830
|
-
private _syncCropPresetState;
|
|
1831
|
-
updateImage(): Promise<void>;
|
|
1832
|
-
initEditor(): Promise<void>;
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
declare class CropFrame extends LitBlock {
|
|
1836
|
-
private _backdropMask?;
|
|
1837
|
-
private _backdropMaskInner?;
|
|
1838
|
-
private readonly _backdropMaskId;
|
|
1839
|
-
private _frameThumbs?;
|
|
1840
|
-
private _frameGuides?;
|
|
1841
|
-
private _draggingThumb?;
|
|
1842
|
-
private _hoverThumb?;
|
|
1843
|
-
private _dragStartPoint?;
|
|
1844
|
-
private _dragStartCrop?;
|
|
1845
|
-
private _frameImage?;
|
|
1846
|
-
private _guidesHidden;
|
|
1847
|
-
private _draggingValue;
|
|
1848
|
-
private readonly _svgRef;
|
|
1849
|
-
private _svgReady;
|
|
1850
|
-
private _pendingMaskHref;
|
|
1851
|
-
private get _svgElement();
|
|
1852
|
-
private get _dragging();
|
|
1853
|
-
private set _dragging(value);
|
|
1854
|
-
private _applyGuidesDragState;
|
|
1855
|
-
private _shouldThumbBeDisabled;
|
|
1856
|
-
private _createBackdrop;
|
|
2208
|
+
sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
|
|
1857
2209
|
/**
|
|
1858
|
-
*
|
|
1859
|
-
* https://bugs.chromium.org/p/chromium/issues/detail?id=330815
|
|
2210
|
+
* Deeply compares two objects and returns true if they are equal, false otherwise.
|
|
1860
2211
|
*/
|
|
1861
|
-
private
|
|
1862
|
-
private
|
|
1863
|
-
private
|
|
1864
|
-
private
|
|
1865
|
-
private
|
|
1866
|
-
private _createGuides;
|
|
1867
|
-
private _createFrame;
|
|
1868
|
-
private _handlePointerDown;
|
|
1869
|
-
private readonly _handlePointerUp;
|
|
1870
|
-
private readonly _handlePointerMove;
|
|
1871
|
-
private _calcCropBox;
|
|
1872
|
-
private readonly _handleSvgPointerMove;
|
|
1873
|
-
private _updateCursor;
|
|
1874
|
-
private _createMask;
|
|
1875
|
-
private _updateMask;
|
|
1876
|
-
private _render;
|
|
1877
|
-
toggleThumbs(visible: boolean): void;
|
|
1878
|
-
initCallback(): void;
|
|
1879
|
-
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1880
|
-
private _initializeSvg;
|
|
1881
|
-
disconnectedCallback(): void;
|
|
1882
|
-
render(): TemplateResult;
|
|
2212
|
+
private _checkObj;
|
|
2213
|
+
private get _timestamp();
|
|
2214
|
+
private get _solution();
|
|
2215
|
+
private get _activity();
|
|
2216
|
+
private get _location();
|
|
1883
2217
|
}
|
|
1884
2218
|
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
2219
|
+
type SharedConfigState = {
|
|
2220
|
+
[K in keyof ConfigType as `*cfg/${K}`]: ConfigType[K];
|
|
2221
|
+
};
|
|
2222
|
+
type BlocksRegistry = Set<LitBlock>;
|
|
2223
|
+
type ActivityBlockCtxState = {
|
|
2224
|
+
'*currentActivity': string | null;
|
|
2225
|
+
'*currentActivityParams': Record<string, unknown>;
|
|
2226
|
+
'*history': (string | null)[];
|
|
2227
|
+
'*historyBack': (() => void) | null;
|
|
2228
|
+
'*closeModal': () => void;
|
|
2229
|
+
};
|
|
2230
|
+
type UploaderBlockCtxState = ActivityBlockCtxState & {
|
|
2231
|
+
'*commonProgress': number;
|
|
2232
|
+
'*uploadList': {
|
|
2233
|
+
uid: Uid;
|
|
2234
|
+
}[];
|
|
2235
|
+
'*uploadQueue': Queue;
|
|
2236
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
2237
|
+
'*collectionState': OutputCollectionState | null;
|
|
2238
|
+
'*groupInfo': UploadcareGroup | null;
|
|
2239
|
+
'*uploadTrigger': Set<Uid>;
|
|
2240
|
+
};
|
|
2241
|
+
type SolutionBlockCtxState = UploaderBlockCtxState & {
|
|
2242
|
+
'*solution': string | null;
|
|
2243
|
+
};
|
|
2244
|
+
type CloudImageEditorState = {
|
|
2245
|
+
'*originalUrl': string | null;
|
|
2246
|
+
'*loadingOperations': LoadingOperations;
|
|
2247
|
+
'*faderEl': EditorImageFader | null;
|
|
2248
|
+
'*cropperEl': EditorImageCropper | null;
|
|
2249
|
+
'*imgEl': HTMLImageElement | null;
|
|
2250
|
+
'*imgContainerEl': HTMLElement | null;
|
|
2251
|
+
'*networkProblems': boolean;
|
|
2252
|
+
'*imageSize': {
|
|
2253
|
+
width: number;
|
|
2254
|
+
height: number;
|
|
2255
|
+
} | null;
|
|
2256
|
+
'*editorTransformations': Transformations;
|
|
2257
|
+
'*cropPresetList': CropPresetList;
|
|
2258
|
+
'*currentAspectRatio': CropAspectRatio | null;
|
|
2259
|
+
'*tabList': readonly TabIdValue$1[];
|
|
2260
|
+
'*tabId': TabIdValue$1;
|
|
2261
|
+
'*on.retryNetwork': () => void;
|
|
2262
|
+
'*on.apply': (transformations: Transformations) => void;
|
|
2263
|
+
'*on.cancel': () => void;
|
|
2264
|
+
};
|
|
2265
|
+
type EditorImageCropperState = {
|
|
2266
|
+
'*padding': number;
|
|
2267
|
+
'*operations': {
|
|
2268
|
+
rotate: number;
|
|
2269
|
+
mirror: boolean;
|
|
2270
|
+
flip: boolean;
|
|
2271
|
+
};
|
|
2272
|
+
'*imageBox': {
|
|
2273
|
+
x: number;
|
|
2274
|
+
y: number;
|
|
2275
|
+
width: number;
|
|
2276
|
+
height: number;
|
|
2277
|
+
};
|
|
2278
|
+
'*cropBox': {
|
|
2279
|
+
x: number;
|
|
2280
|
+
y: number;
|
|
2281
|
+
width: number;
|
|
2282
|
+
height: number;
|
|
2283
|
+
};
|
|
2284
|
+
};
|
|
2285
|
+
type EditorToolbarState = {
|
|
2286
|
+
'*showListAspectRatio': boolean;
|
|
2287
|
+
'*sliderEl': EditorSlider | null;
|
|
2288
|
+
'*showSlider': boolean;
|
|
2289
|
+
'*currentFilter': string;
|
|
2290
|
+
'*currentOperation': string | null;
|
|
2291
|
+
'*operationTooltip': string | null;
|
|
2292
|
+
};
|
|
2293
|
+
type DynamicBlockState = {
|
|
2294
|
+
'*blocksRegistry': BlocksRegistry;
|
|
2295
|
+
'*eventEmitter': EventEmitter;
|
|
2296
|
+
'*localeManager': LocaleManager;
|
|
2297
|
+
'*telemetryManager': TelemetryManager;
|
|
2298
|
+
'*a11y': A11y;
|
|
2299
|
+
'*modalManager': ModalManager | null;
|
|
2300
|
+
};
|
|
2301
|
+
type DynamicUploaderBlockState = {
|
|
2302
|
+
'*uploadCollection': TypedCollection<UploadEntryData>;
|
|
2303
|
+
'*publicApi': UploaderPublicApi;
|
|
2304
|
+
'*validationManager': ValidationManager;
|
|
2305
|
+
'*secureUploadsManager': SecureUploadsManager;
|
|
2306
|
+
};
|
|
2307
|
+
type LocaleState = {
|
|
2308
|
+
[K in keyof LocaleDefinition as `*l10n/${K}`]: string;
|
|
2309
|
+
};
|
|
2310
|
+
type SharedState = SolutionBlockCtxState & SharedConfigState & CloudImageEditorState & EditorImageCropperState & EditorToolbarState & DynamicBlockState & DynamicUploaderBlockState & LocaleState;
|
|
1897
2311
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
onClick(): void;
|
|
1901
|
-
private _computeTitle;
|
|
1902
|
-
render(): lit_html.TemplateResult<1>;
|
|
2312
|
+
interface ISharedInstance {
|
|
2313
|
+
destroy?(): void;
|
|
1903
2314
|
}
|
|
1904
|
-
declare class
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
protected
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
2315
|
+
declare class SharedInstance {
|
|
2316
|
+
protected _ctx: PubSub<SharedState>;
|
|
2317
|
+
protected _sharedInstancesBag: SharedInstancesBag;
|
|
2318
|
+
private _subscriptions;
|
|
2319
|
+
private _cfgProxy;
|
|
2320
|
+
protected _debugPrint: (...args: unknown[]) => void;
|
|
2321
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
2322
|
+
protected addSub(unsub: () => void): void;
|
|
2323
|
+
protected get _cfg(): Readonly<ConfigType>;
|
|
2324
|
+
destroy(): void;
|
|
1913
2325
|
}
|
|
2326
|
+
type SharedInstancesState = Pick<SharedState, '*blocksRegistry' | '*eventEmitter' | '*localeManager' | '*telemetryManager' | '*a11y' | '*modalManager' | '*uploadCollection' | '*publicApi' | '*validationManager' | '*secureUploadsManager'>;
|
|
2327
|
+
type SharedInstancesBag = ReturnType<typeof createSharedInstancesBag>;
|
|
2328
|
+
declare const createSharedInstancesBag: (getCtx: () => PubSub<SharedState>) => {
|
|
2329
|
+
readonly ctx: PubSub<SharedState>;
|
|
2330
|
+
readonly modalManager: ModalManager | null;
|
|
2331
|
+
readonly telemetryManager: TelemetryManager;
|
|
2332
|
+
readonly localeManager: LocaleManager;
|
|
2333
|
+
readonly a11y: A11y;
|
|
2334
|
+
readonly blocksRegistry: Set<LitBlock>;
|
|
2335
|
+
readonly eventEmitter: EventEmitter;
|
|
2336
|
+
readonly uploadCollection: TypedCollection<UploadEntryData>;
|
|
2337
|
+
readonly secureUploadsManager: SecureUploadsManager;
|
|
2338
|
+
readonly api: UploaderPublicApi;
|
|
2339
|
+
readonly validationManager: ValidationManager;
|
|
2340
|
+
};
|
|
1914
2341
|
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
2342
|
+
type FuncFileValidator = (outputEntry: OutputFileEntry, api: UploaderPublicApi, options?: {
|
|
2343
|
+
signal?: AbortSignal;
|
|
2344
|
+
}) => undefined | OutputErrorFile | Promise<undefined | OutputErrorFile>;
|
|
2345
|
+
type FileValidatorDescriptor = {
|
|
2346
|
+
runOn: 'add' | 'upload' | 'change';
|
|
2347
|
+
validator: FuncFileValidator;
|
|
2348
|
+
};
|
|
2349
|
+
type FileValidator = FileValidatorDescriptor | FuncFileValidator;
|
|
2350
|
+
type FuncCollectionValidator = (collection: ReturnType<typeof buildOutputCollectionState<OutputCollectionStatus>>, api: UploaderPublicApi) => undefined | OutputErrorCollection;
|
|
2351
|
+
declare class ValidationManager extends SharedInstance {
|
|
2352
|
+
private get _uploadCollection();
|
|
2353
|
+
private _commonFileValidators;
|
|
2354
|
+
private _commonCollectionValidators;
|
|
2355
|
+
private _queue;
|
|
2356
|
+
private _runQueueDebounced;
|
|
2357
|
+
private _isDestroyed;
|
|
2358
|
+
private _entryValidationState;
|
|
2359
|
+
constructor(sharedInstancesBag: SharedInstancesBag);
|
|
2360
|
+
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: Uid[]): void;
|
|
2361
|
+
runCollectionValidators(): void;
|
|
2362
|
+
cleanupValidationForEntry(entry: TypedData<UploadEntryData>): void;
|
|
2363
|
+
private _runFileValidatorsForEntry;
|
|
2364
|
+
private _addCustomTypeToValidationError;
|
|
2365
|
+
private _getEntryValidationState;
|
|
2366
|
+
private _getValidatorDescriptors;
|
|
2367
|
+
private _getValidatorDescriptorsForEntry;
|
|
2368
|
+
destroy(): void;
|
|
1919
2369
|
}
|
|
1920
2370
|
|
|
1921
|
-
declare
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
private
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
2371
|
+
declare const LitBlockBase: typeof LitElement & Constructor<{
|
|
2372
|
+
willYield: boolean;
|
|
2373
|
+
yield(slot: string, defaultContent?: unknown): unknown;
|
|
2374
|
+
}> & Constructor<{
|
|
2375
|
+
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
2376
|
+
}> & Constructor<SymbioteComponent<SharedState>> & Constructor<LitElement> & {
|
|
2377
|
+
reg(tagName: string): void;
|
|
2378
|
+
};
|
|
2379
|
+
declare class LitBlock extends LitBlockBase {
|
|
2380
|
+
private _cfgProxy;
|
|
2381
|
+
protected _sharedContextInstances: Map<keyof SharedInstancesState, ISharedInstance>;
|
|
2382
|
+
static styleAttrs: string[];
|
|
2383
|
+
activityType: ActivityType;
|
|
2384
|
+
init$: {};
|
|
2385
|
+
constructor();
|
|
2386
|
+
l10n: (str: string, variables?: Record<string, string | number>) => string;
|
|
2387
|
+
debugPrint: (...args: unknown[]) => void;
|
|
2388
|
+
protected _sharedInstancesBag: {
|
|
2389
|
+
readonly ctx: PubSub<SharedState>;
|
|
2390
|
+
readonly modalManager: ModalManager | null;
|
|
2391
|
+
readonly telemetryManager: TelemetryManager;
|
|
2392
|
+
readonly localeManager: LocaleManager;
|
|
2393
|
+
readonly a11y: A11y;
|
|
2394
|
+
readonly blocksRegistry: Set<LitBlock>;
|
|
2395
|
+
readonly eventEmitter: EventEmitter;
|
|
2396
|
+
readonly uploadCollection: TypedCollection<UploadEntryData>;
|
|
2397
|
+
readonly secureUploadsManager: SecureUploadsManager;
|
|
2398
|
+
readonly api: UploaderPublicApi;
|
|
2399
|
+
readonly validationManager: ValidationManager;
|
|
2400
|
+
};
|
|
2401
|
+
emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
|
|
2402
|
+
hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
|
|
2403
|
+
connectedCallback(): void;
|
|
1939
2404
|
initCallback(): void;
|
|
2405
|
+
get testId(): string;
|
|
2406
|
+
get modalManager(): ModalManager | null;
|
|
2407
|
+
get telemetryManager(): TelemetryManager;
|
|
2408
|
+
get localeManager(): LocaleManager;
|
|
2409
|
+
get a11y(): A11y;
|
|
2410
|
+
get blocksRegistry(): Set<LitBlock>;
|
|
2411
|
+
get eventEmitter(): EventEmitter;
|
|
1940
2412
|
disconnectedCallback(): void;
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
private
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2413
|
+
/**
|
|
2414
|
+
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
2415
|
+
*/
|
|
2416
|
+
private destroyCtxCallback;
|
|
2417
|
+
/**
|
|
2418
|
+
* Adds a shared context instance if it does not exist yet.
|
|
2419
|
+
* @param key The shared state key.
|
|
2420
|
+
* @param resolver The resolver function that creates the instance.
|
|
2421
|
+
*/
|
|
2422
|
+
protected _addSharedContextInstance<TKey extends keyof SharedInstancesState>(key: TKey, resolver: (sharedInstancesBag: SharedInstancesBag) => NonNullable<SharedInstancesState[TKey]>): void;
|
|
2423
|
+
private _destroySharedContextInstances;
|
|
2424
|
+
protected _getSharedContextInstance<TKey extends keyof SharedState, TRequired extends boolean = true>(key: TKey, isRequired?: TRequired): TRequired extends true ? NonNullable<SharedState[TKey]> : SharedState[TKey];
|
|
2425
|
+
protected proxyUrl(url: string): Promise<string>;
|
|
2426
|
+
get cfg(): ConfigType;
|
|
2427
|
+
subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): () => void;
|
|
1948
2428
|
}
|
|
1949
2429
|
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
private
|
|
1966
|
-
private
|
|
1967
|
-
private
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
private
|
|
1971
|
-
private
|
|
1972
|
-
private
|
|
1973
|
-
private _alignCrop;
|
|
1974
|
-
private _drawImage;
|
|
1975
|
-
private _draw;
|
|
1976
|
-
private _animateIn;
|
|
1977
|
-
private _getCropDimensions;
|
|
1978
|
-
private _getCropTransformation;
|
|
1979
|
-
private _commit;
|
|
1980
|
-
setValue<K extends keyof Operations>(operation: K, value: Operations[K]): void;
|
|
1981
|
-
getValue<K extends keyof Operations>(operation: K): Operations[K];
|
|
1982
|
-
activate(imageSize: ImageSize, { fromViewer }?: {
|
|
1983
|
-
fromViewer?: boolean;
|
|
1984
|
-
}): Promise<void>;
|
|
1985
|
-
deactivate({ reset }?: {
|
|
1986
|
-
reset?: boolean;
|
|
1987
|
-
}): void;
|
|
1988
|
-
private _transitionToCrop;
|
|
1989
|
-
private _transitionToImage;
|
|
1990
|
-
private _reset;
|
|
1991
|
-
private _waitForImage;
|
|
1992
|
-
private _handleImageLoading;
|
|
2430
|
+
declare class Modal extends LitBlock {
|
|
2431
|
+
static styleAttrs: string[];
|
|
2432
|
+
private _mouseDownTarget;
|
|
2433
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
2434
|
+
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
2435
|
+
/**
|
|
2436
|
+
* CSS-only attribute
|
|
2437
|
+
*/
|
|
2438
|
+
strokes: boolean;
|
|
2439
|
+
/**
|
|
2440
|
+
* CSS-only attribute
|
|
2441
|
+
*/
|
|
2442
|
+
blockBodyScrolling: boolean;
|
|
2443
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
2444
|
+
protected closeDialog: () => void;
|
|
2445
|
+
private _handleDialogClose;
|
|
2446
|
+
private _handleDialogMouseDown;
|
|
2447
|
+
private _handleDialogMouseUp;
|
|
2448
|
+
show(): void;
|
|
2449
|
+
hide(): void;
|
|
2450
|
+
private _handleModalOpen;
|
|
2451
|
+
private _handleModalClose;
|
|
2452
|
+
private _handleModalCloseAll;
|
|
1993
2453
|
initCallback(): void;
|
|
1994
2454
|
disconnectedCallback(): void;
|
|
1995
|
-
|
|
2455
|
+
private _handleDialogRef;
|
|
2456
|
+
render(): lit_html.TemplateResult<1>;
|
|
2457
|
+
}
|
|
2458
|
+
declare global {
|
|
2459
|
+
interface HTMLElementTagNameMap {
|
|
2460
|
+
'uc-modal': Modal;
|
|
2461
|
+
}
|
|
1996
2462
|
}
|
|
1997
2463
|
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
private
|
|
2014
|
-
private
|
|
2015
|
-
private
|
|
2016
|
-
constructor();
|
|
2017
|
-
private _handleImageLoading;
|
|
2018
|
-
private _flush;
|
|
2019
|
-
private _imageSrc;
|
|
2020
|
-
private _constructKeypoint;
|
|
2464
|
+
declare const ModalEvents: Readonly<{
|
|
2465
|
+
readonly ADD: "modal:add";
|
|
2466
|
+
readonly DELETE: "modal:delete";
|
|
2467
|
+
readonly OPEN: "modal:open";
|
|
2468
|
+
readonly CLOSE: "modal:close";
|
|
2469
|
+
readonly CLOSE_ALL: "modal:closeAll";
|
|
2470
|
+
readonly DESTROY: "modal:destroy";
|
|
2471
|
+
}>;
|
|
2472
|
+
type ModalId = ActivityType;
|
|
2473
|
+
type ModalCb = (data: {
|
|
2474
|
+
id: ModalId;
|
|
2475
|
+
modal: Modal;
|
|
2476
|
+
}) => void;
|
|
2477
|
+
type ModalEventType = (typeof ModalEvents)[keyof typeof ModalEvents];
|
|
2478
|
+
declare class ModalManager extends SharedInstance {
|
|
2479
|
+
private _modals;
|
|
2480
|
+
private _activeModals;
|
|
2481
|
+
private _subscribers;
|
|
2021
2482
|
/**
|
|
2022
|
-
*
|
|
2483
|
+
* Register a modal with the manager
|
|
2484
|
+
* @param id Unique identifier for the modal
|
|
2485
|
+
* @param modal Modal component instance
|
|
2023
2486
|
*/
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
private
|
|
2048
|
-
|
|
2049
|
-
|
|
2487
|
+
registerModal(id: ModalId, modal: Modal): void;
|
|
2488
|
+
/** Remove a modal by ID. */
|
|
2489
|
+
deleteModal(id: ModalId): boolean;
|
|
2490
|
+
/** Open a modal by its ID. */
|
|
2491
|
+
open(id: ModalId): boolean;
|
|
2492
|
+
/** Close a specific modal by ID. */
|
|
2493
|
+
close(id: ModalId): boolean;
|
|
2494
|
+
/** Toggle a modal - open if closed, close if open. */
|
|
2495
|
+
toggle(id: ModalId): boolean;
|
|
2496
|
+
/** True if there are any active modals. */
|
|
2497
|
+
get hasActiveModals(): boolean;
|
|
2498
|
+
/** Close the most recently opened modal and return to the previous one. */
|
|
2499
|
+
back(): boolean;
|
|
2500
|
+
/** Close all open modals. */
|
|
2501
|
+
closeAll(): number;
|
|
2502
|
+
/**
|
|
2503
|
+
* Subscribe to modal events
|
|
2504
|
+
* @returns Unsubscribe function
|
|
2505
|
+
*/
|
|
2506
|
+
subscribe(event: ModalEventType, callback: ModalCb): () => void;
|
|
2507
|
+
/** Unsubscribe from modal events */
|
|
2508
|
+
unsubscribe(event: ModalEventType, callback: ModalCb | undefined): void;
|
|
2509
|
+
/** Notify all subscribers of a modal event. */
|
|
2510
|
+
private _notify;
|
|
2511
|
+
/** Destroy the modal manager, clean up resources */
|
|
2512
|
+
destroy(): void;
|
|
2050
2513
|
}
|
|
2051
2514
|
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2515
|
+
type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
|
|
2516
|
+
declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
|
|
2517
|
+
|
|
2518
|
+
declare class LitSolutionBlock extends LitBlock {
|
|
2519
|
+
static styleAttrs: string[];
|
|
2520
|
+
init$: {
|
|
2521
|
+
'*solution': string | null;
|
|
2522
|
+
'*commonProgress': number;
|
|
2523
|
+
'*uploadList': never[];
|
|
2524
|
+
'*uploadQueue': _uploadcare_upload_client.Queue;
|
|
2525
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
2526
|
+
'*collectionState': OutputCollectionState | null;
|
|
2527
|
+
'*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
|
|
2528
|
+
'*uploadTrigger': Set<string>;
|
|
2529
|
+
'*currentActivity': null;
|
|
2530
|
+
'*currentActivityParams': {};
|
|
2531
|
+
'*history': never[];
|
|
2532
|
+
'*historyBack': null;
|
|
2533
|
+
'*closeModal': () => void;
|
|
2534
|
+
};
|
|
2057
2535
|
initCallback(): void;
|
|
2058
|
-
|
|
2536
|
+
render(): lit_html.TemplateResult<1>;
|
|
2059
2537
|
}
|
|
2060
2538
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2539
|
+
type CssPropValue = string | number | undefined | null;
|
|
2540
|
+
declare const ImgConfig_base: typeof LitElement & Constructor<LitElement> & {
|
|
2541
|
+
reg(tagName: string): void;
|
|
2542
|
+
} & Constructor<{
|
|
2543
|
+
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
2544
|
+
}>;
|
|
2545
|
+
declare class ImgConfig extends ImgConfig_base {
|
|
2546
|
+
private _state;
|
|
2547
|
+
private _subscribers;
|
|
2548
|
+
private _isnObserver;
|
|
2549
|
+
private _observed;
|
|
2550
|
+
createRenderRoot(): HTMLElement | ShadowRoot;
|
|
2551
|
+
constructor();
|
|
2552
|
+
protected $$(key: string): unknown;
|
|
2553
|
+
protected set$$(kvObj: Record<string, CssPropValue>): void;
|
|
2554
|
+
protected sub$$<T = unknown>(key: string, kbFn: (val: T) => void): void;
|
|
2555
|
+
private _notify;
|
|
2556
|
+
protected analyticsParams(): string;
|
|
2557
|
+
protected initAttributes(el: HTMLElement): void;
|
|
2558
|
+
protected initIntersection(el: HTMLElement, cbkFn: () => void): void;
|
|
2063
2559
|
connectedCallback(): void;
|
|
2560
|
+
private _initCssProperties;
|
|
2064
2561
|
disconnectedCallback(): void;
|
|
2562
|
+
static get observedAttributes(): string[];
|
|
2563
|
+
attributeChangedCallback(name: string, _oldVal: string | null, newVal: string | null): void;
|
|
2065
2564
|
}
|
|
2066
2565
|
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
private
|
|
2083
|
-
|
|
2084
|
-
private
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2566
|
+
declare class ImgBase extends ImgConfig {
|
|
2567
|
+
private _img;
|
|
2568
|
+
private _imgPreview;
|
|
2569
|
+
private _fmtAbs;
|
|
2570
|
+
private _validateSize;
|
|
2571
|
+
private _getCdnModifiers;
|
|
2572
|
+
private _getTypedCssValue;
|
|
2573
|
+
private _getUrlBase;
|
|
2574
|
+
private _proxyUrl;
|
|
2575
|
+
protected _getElSize(el: HTMLElement, k?: number, wOnly?: boolean): string | null;
|
|
2576
|
+
private _setupEventProxy;
|
|
2577
|
+
protected get img(): HTMLImageElement;
|
|
2578
|
+
private get _currentImg();
|
|
2579
|
+
private get _hasPreviewImage();
|
|
2580
|
+
private get _bgSelector();
|
|
2581
|
+
private get _breakpoints();
|
|
2582
|
+
private get _hasFormatJPG();
|
|
2583
|
+
private _renderBg;
|
|
2584
|
+
private _getSrcset;
|
|
2585
|
+
private _getSrc;
|
|
2586
|
+
private get _srcUrlPreview();
|
|
2587
|
+
private _renderBackground;
|
|
2588
|
+
private _appendURL;
|
|
2589
|
+
private _setupConfigForImage;
|
|
2590
|
+
private _loaderImage;
|
|
2591
|
+
private _renderImage;
|
|
2592
|
+
protected init(): void;
|
|
2090
2593
|
}
|
|
2091
2594
|
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
tabList: readonly TabIdValue[];
|
|
2099
|
-
activeTab: TabIdValue;
|
|
2100
|
-
private _useSliderPanel;
|
|
2101
|
-
private _tooltipVisible;
|
|
2102
|
-
private _operationTooltip;
|
|
2103
|
-
private _tabIndicatorOffset;
|
|
2104
|
-
private _tabIndicatorWidth;
|
|
2105
|
-
private readonly _sliderRef;
|
|
2106
|
-
private readonly _tabIndicatorRef;
|
|
2107
|
-
protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
|
|
2108
|
-
private readonly _handleWindowResize;
|
|
2109
|
-
private _cropPresets;
|
|
2110
|
-
private _cancelPreload?;
|
|
2111
|
-
private readonly _debouncedShowLoader;
|
|
2112
|
-
private readonly _updateInfoTooltip;
|
|
2113
|
-
private readonly _subTopToolbarStyles;
|
|
2114
|
-
private readonly _subBottomToolbarStyles;
|
|
2115
|
-
private readonly _tabContentStyles;
|
|
2116
|
-
private readonly _tabToggleStyles;
|
|
2117
|
-
private readonly _tabTogglesStyles;
|
|
2118
|
-
init$: Record<string, unknown>;
|
|
2119
|
-
private _onSliderClose;
|
|
2120
|
-
private _activateTab;
|
|
2121
|
-
private _applyTabState;
|
|
2122
|
-
private _syncTabIndicator;
|
|
2123
|
-
private get _hasAspectRatioPicker();
|
|
2124
|
-
private _renderControlsByTab;
|
|
2125
|
-
private _renderCropTabControls;
|
|
2126
|
-
private _renderFilterTabControls;
|
|
2127
|
-
private _renderTuningTabControls;
|
|
2128
|
-
private _renderControlGroup;
|
|
2129
|
-
private _renderFreeformControl;
|
|
2130
|
-
private _renderAspectRatioControl;
|
|
2131
|
-
private _renderCropOperationControl;
|
|
2132
|
-
private _renderFilterControl;
|
|
2133
|
-
private _renderOperationControl;
|
|
2134
|
-
private _renderAspectRatioList;
|
|
2135
|
-
private _preloadEditedImage;
|
|
2136
|
-
initCallback(): void;
|
|
2595
|
+
declare class Img extends ImgBase {
|
|
2596
|
+
attributesMeta: {
|
|
2597
|
+
src: string;
|
|
2598
|
+
} | {
|
|
2599
|
+
uuid: string;
|
|
2600
|
+
};
|
|
2137
2601
|
connectedCallback(): void;
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
private readonly _handleApply;
|
|
2144
|
-
private readonly _handleApplySlider;
|
|
2145
|
-
private readonly _handleCancelSlider;
|
|
2146
|
-
private readonly _handleTabClick;
|
|
2147
|
-
private _renderTabToggle;
|
|
2148
|
-
private _renderTabContent;
|
|
2149
|
-
render(): TemplateResult<1>;
|
|
2602
|
+
}
|
|
2603
|
+
declare global {
|
|
2604
|
+
interface HTMLElementTagNameMap {
|
|
2605
|
+
'uc-img': Img;
|
|
2606
|
+
}
|
|
2150
2607
|
}
|
|
2151
2608
|
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
render(): lit_html.TemplateResult<1>;
|
|
2609
|
+
declare class FormInput extends LitUploaderBlock {
|
|
2610
|
+
attributesMeta: {
|
|
2611
|
+
'ctx-name': string;
|
|
2612
|
+
name?: string;
|
|
2613
|
+
};
|
|
2614
|
+
private _validationInputElement;
|
|
2615
|
+
private _dynamicInputsContainer;
|
|
2616
|
+
nameAttrValue?: string;
|
|
2617
|
+
private get _inputName();
|
|
2618
|
+
private _createValidationInput;
|
|
2619
|
+
initCallback(): void;
|
|
2620
|
+
}
|
|
2621
|
+
declare global {
|
|
2622
|
+
interface HTMLElementTagNameMap {
|
|
2623
|
+
'uc-form-input': FormInput;
|
|
2624
|
+
}
|
|
2169
2625
|
}
|
|
2170
2626
|
|
|
2171
|
-
declare class
|
|
2172
|
-
|
|
2173
|
-
private readonly _lineRef;
|
|
2174
|
-
private _isAnimating;
|
|
2175
|
-
private readonly _handleTransitionEndRight;
|
|
2176
|
-
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
2177
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
2178
|
-
private _start;
|
|
2179
|
-
private _stop;
|
|
2180
|
-
private _resetLine;
|
|
2627
|
+
declare class Copyright extends LitBlock {
|
|
2628
|
+
initCallback(): void;
|
|
2181
2629
|
render(): lit_html.TemplateResult<1>;
|
|
2182
2630
|
}
|
|
2631
|
+
declare global {
|
|
2632
|
+
interface HTMLElementTagNameMap {
|
|
2633
|
+
'uc-copyright': Copyright;
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2183
2636
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
visible?: string;
|
|
2187
|
-
hidden?: string;
|
|
2188
|
-
};
|
|
2189
|
-
declare class PresenceToggle extends LitBlock {
|
|
2637
|
+
declare class ProgressBarCommon extends LitUploaderBlock {
|
|
2638
|
+
private _unobserveCollectionCb?;
|
|
2190
2639
|
private _visible;
|
|
2191
|
-
private
|
|
2192
|
-
|
|
2193
|
-
private _hiddenStyle;
|
|
2194
|
-
private _externalTransitions;
|
|
2195
|
-
private _initialRenderComplete;
|
|
2196
|
-
set visible(value: boolean);
|
|
2197
|
-
get visible(): boolean;
|
|
2198
|
-
set styles(styles: PresenceToggleStyle);
|
|
2199
|
-
get styles(): PresenceToggleStyle;
|
|
2200
|
-
private _handleVisible;
|
|
2201
|
-
private _dispatchInitialRenderEvent;
|
|
2640
|
+
private _value;
|
|
2641
|
+
constructor();
|
|
2202
2642
|
initCallback(): void;
|
|
2643
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
2644
|
+
disconnectedCallback(): void;
|
|
2645
|
+
render(): lit_html.TemplateResult<1>;
|
|
2646
|
+
}
|
|
2647
|
+
declare global {
|
|
2648
|
+
interface HTMLElementTagNameMap {
|
|
2649
|
+
'uc-progress-bar-common': ProgressBarCommon;
|
|
2650
|
+
}
|
|
2203
2651
|
}
|
|
2204
2652
|
|
|
2205
|
-
declare class
|
|
2206
|
-
|
|
2207
|
-
private
|
|
2208
|
-
|
|
2209
|
-
private
|
|
2210
|
-
private
|
|
2211
|
-
private
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
defaultValue: number;
|
|
2217
|
-
zero: number;
|
|
2218
|
-
private _currentValue;
|
|
2219
|
-
constructor();
|
|
2220
|
-
private _emitSliderEvent;
|
|
2221
|
-
private readonly _handleSliderInput;
|
|
2222
|
-
private readonly _handleSliderChange;
|
|
2223
|
-
private readonly _handleInputFocus;
|
|
2224
|
-
private readonly _handleInputBlur;
|
|
2225
|
-
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
2653
|
+
declare class SourceBtn extends LitUploaderBlock {
|
|
2654
|
+
couldBeCtxOwner: boolean;
|
|
2655
|
+
private _registeredTypes;
|
|
2656
|
+
type?: string;
|
|
2657
|
+
private _iconName;
|
|
2658
|
+
private _srcTypeKey;
|
|
2659
|
+
private _initTypes;
|
|
2660
|
+
initCallback(): void;
|
|
2661
|
+
private _registerType;
|
|
2662
|
+
activate(): void;
|
|
2663
|
+
private _applyType;
|
|
2226
2664
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
2227
|
-
private _updateValue;
|
|
2228
|
-
private _updateZeroDot;
|
|
2229
|
-
private _updateSteps;
|
|
2230
|
-
disconnectedCallback(): void;
|
|
2231
|
-
private _setCurrentValue;
|
|
2232
|
-
private _syncInputValue;
|
|
2233
|
-
private _extractEventValue;
|
|
2234
2665
|
render(): lit_html.TemplateResult<1>;
|
|
2235
2666
|
}
|
|
2667
|
+
declare global {
|
|
2668
|
+
interface HTMLElementTagNameMap {
|
|
2669
|
+
'uc-source-btn': SourceBtn;
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2236
2672
|
|
|
2237
|
-
declare class
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
text?: string;
|
|
2245
|
-
private _isEnabled;
|
|
2246
|
-
private _isVisible;
|
|
2247
|
-
private get _localizedText();
|
|
2248
|
-
private _destroyDropzone;
|
|
2249
|
-
private _destroyContentWrapperDropzone;
|
|
2250
|
-
private _contentWrapperRef;
|
|
2251
|
-
private readonly _handleAreaInteraction;
|
|
2252
|
-
private _sourceListAllowsLocal;
|
|
2253
|
-
private _clickableListenersAttached;
|
|
2254
|
-
isActive(): boolean;
|
|
2673
|
+
declare class SourceList extends LitBlock {
|
|
2674
|
+
private _rawSourceList;
|
|
2675
|
+
private _cameraModes;
|
|
2676
|
+
/**
|
|
2677
|
+
* CSS-only attribute
|
|
2678
|
+
*/
|
|
2679
|
+
wrap: boolean;
|
|
2255
2680
|
initCallback(): void;
|
|
2256
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
2257
2681
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
2258
|
-
|
|
2259
|
-
private
|
|
2260
|
-
private _couldHandleFiles;
|
|
2261
|
-
private _updateIsEnabled;
|
|
2262
|
-
private _updateVisibility;
|
|
2263
|
-
private _updateDragStateAttribute;
|
|
2264
|
-
private _updateClickableListeners;
|
|
2265
|
-
disconnectedCallback(): void;
|
|
2682
|
+
private _updateSources;
|
|
2683
|
+
private _sources;
|
|
2266
2684
|
render(): lit_html.TemplateResult<1>;
|
|
2267
2685
|
}
|
|
2686
|
+
declare global {
|
|
2687
|
+
interface HTMLElementTagNameMap {
|
|
2688
|
+
'uc-source-list': SourceList;
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2268
2691
|
|
|
2269
|
-
declare class
|
|
2270
|
-
protected
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2692
|
+
declare class StartFrom extends LitActivityBlock {
|
|
2693
|
+
protected historyTracked: boolean;
|
|
2694
|
+
activityType: ActivityType;
|
|
2695
|
+
initCallback(): void;
|
|
2696
|
+
render(): lit_html.TemplateResult<1>;
|
|
2697
|
+
}
|
|
2698
|
+
declare global {
|
|
2699
|
+
interface HTMLElementTagNameMap {
|
|
2700
|
+
'uc-start-from': StartFrom;
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
type EventListenerMap = {
|
|
2705
|
+
[K in (typeof EventType)[keyof typeof EventType]]: (e: CustomEvent<EventPayload[K]>) => void;
|
|
2706
|
+
};
|
|
2707
|
+
declare class UploadCtxProvider extends LitUploaderBlock {
|
|
2708
|
+
attributesMeta: {
|
|
2709
|
+
'ctx-name': string;
|
|
2710
|
+
};
|
|
2711
|
+
static styleAttrs: string[];
|
|
2712
|
+
static EventType: Readonly<{
|
|
2713
|
+
readonly FILE_ADDED: "file-added";
|
|
2714
|
+
readonly FILE_REMOVED: "file-removed";
|
|
2715
|
+
readonly FILE_UPLOAD_START: "file-upload-start";
|
|
2716
|
+
readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
|
|
2717
|
+
readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
|
|
2718
|
+
readonly FILE_UPLOAD_FAILED: "file-upload-failed";
|
|
2719
|
+
readonly FILE_URL_CHANGED: "file-url-changed";
|
|
2720
|
+
readonly MODAL_OPEN: "modal-open";
|
|
2721
|
+
readonly MODAL_CLOSE: "modal-close";
|
|
2722
|
+
readonly DONE_CLICK: "done-click";
|
|
2723
|
+
readonly UPLOAD_CLICK: "upload-click";
|
|
2724
|
+
readonly ACTIVITY_CHANGE: "activity-change";
|
|
2725
|
+
readonly COMMON_UPLOAD_START: "common-upload-start";
|
|
2726
|
+
readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
|
|
2727
|
+
readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
|
|
2728
|
+
readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
|
|
2729
|
+
readonly CHANGE: "change";
|
|
2730
|
+
readonly GROUP_CREATED: "group-created";
|
|
2731
|
+
}>;
|
|
2732
|
+
private _unbindEventEmitter;
|
|
2300
2733
|
initCallback(): void;
|
|
2301
|
-
connectedCallback(): void;
|
|
2302
2734
|
disconnectedCallback(): void;
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2735
|
+
}
|
|
2736
|
+
interface UploadCtxProvider extends LitUploaderBlock {
|
|
2737
|
+
addEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | AddEventListenerOptions): void;
|
|
2738
|
+
removeEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | EventListenerOptions): void;
|
|
2739
|
+
}
|
|
2740
|
+
declare global {
|
|
2741
|
+
interface HTMLElementTagNameMap {
|
|
2742
|
+
'uc-upload-ctx-provider': UploadCtxProvider;
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
declare class UrlSource extends LitUploaderBlock {
|
|
2747
|
+
couldBeCtxOwner: boolean;
|
|
2748
|
+
activityType: ActivityType;
|
|
2749
|
+
private _formState;
|
|
2750
|
+
initCallback(): void;
|
|
2751
|
+
private _inputRef;
|
|
2752
|
+
private _handleInput;
|
|
2753
|
+
private _handleUpload;
|
|
2306
2754
|
render(): lit_html.TemplateResult<1>;
|
|
2307
2755
|
}
|
|
2756
|
+
declare global {
|
|
2757
|
+
interface HTMLElementTagNameMap {
|
|
2758
|
+
'uc-url-source': UrlSource;
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2308
2761
|
|
|
2309
2762
|
declare class SimpleBtn extends LitUploaderBlock {
|
|
2310
2763
|
static styleAttrs: string[];
|
|
@@ -2315,26 +2768,10 @@ declare class SimpleBtn extends LitUploaderBlock {
|
|
|
2315
2768
|
initCallback(): void;
|
|
2316
2769
|
render(): lit_html.TemplateResult<1>;
|
|
2317
2770
|
}
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
'*solution': string | null;
|
|
2323
|
-
'*commonProgress': number;
|
|
2324
|
-
'*uploadList': never[];
|
|
2325
|
-
'*uploadQueue': _uploadcare_upload_client.Queue;
|
|
2326
|
-
'*collectionErrors': OutputErrorCollection[];
|
|
2327
|
-
'*collectionState': OutputCollectionState | null;
|
|
2328
|
-
'*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
|
|
2329
|
-
'*uploadTrigger': Set<string>;
|
|
2330
|
-
'*currentActivity': null;
|
|
2331
|
-
'*currentActivityParams': {};
|
|
2332
|
-
'*history': never[];
|
|
2333
|
-
'*historyBack': null;
|
|
2334
|
-
'*closeModal': () => void;
|
|
2335
|
-
};
|
|
2336
|
-
initCallback(): void;
|
|
2337
|
-
render(): lit_html.TemplateResult<1>;
|
|
2771
|
+
declare global {
|
|
2772
|
+
interface HTMLElementTagNameMap {
|
|
2773
|
+
'uc-simple-btn': SimpleBtn;
|
|
2774
|
+
}
|
|
2338
2775
|
}
|
|
2339
2776
|
|
|
2340
2777
|
declare class FileUploaderRegular extends LitSolutionBlock {
|
|
@@ -2348,15 +2785,14 @@ declare class FileUploaderRegular extends LitSolutionBlock {
|
|
|
2348
2785
|
initCallback(): void;
|
|
2349
2786
|
render(): lit_html.TemplateResult<1>;
|
|
2350
2787
|
}
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
initCallback(): void;
|
|
2788
|
+
declare global {
|
|
2789
|
+
interface HTMLElementTagNameMap {
|
|
2790
|
+
'uc-file-uploader-regular': FileUploaderRegular;
|
|
2791
|
+
}
|
|
2356
2792
|
}
|
|
2357
2793
|
|
|
2358
2794
|
declare class FileUploaderInline extends LitSolutionBlock {
|
|
2359
|
-
|
|
2795
|
+
attributesMeta: {
|
|
2360
2796
|
'ctx-name': string;
|
|
2361
2797
|
};
|
|
2362
2798
|
static styleAttrs: string[];
|
|
@@ -2369,9 +2805,14 @@ declare class FileUploaderInline extends LitSolutionBlock {
|
|
|
2369
2805
|
initCallback(): void;
|
|
2370
2806
|
render(): lit_html.TemplateResult<1>;
|
|
2371
2807
|
}
|
|
2808
|
+
declare global {
|
|
2809
|
+
interface HTMLElementTagNameMap {
|
|
2810
|
+
'uc-file-uploader-inline': FileUploaderInline;
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2372
2813
|
|
|
2373
2814
|
declare class FileUploaderMinimal extends LitSolutionBlock {
|
|
2374
|
-
|
|
2815
|
+
attributesMeta: {
|
|
2375
2816
|
'ctx-name': string;
|
|
2376
2817
|
};
|
|
2377
2818
|
static styleAttrs: string[];
|
|
@@ -2387,6 +2828,11 @@ declare class FileUploaderMinimal extends LitSolutionBlock {
|
|
|
2387
2828
|
disconnectedCallback(): void;
|
|
2388
2829
|
render(): lit_html.TemplateResult<1>;
|
|
2389
2830
|
}
|
|
2831
|
+
declare global {
|
|
2832
|
+
interface HTMLElementTagNameMap {
|
|
2833
|
+
'uc-file-uploader-minimal': FileUploaderMinimal;
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2390
2836
|
|
|
2391
2837
|
declare const PACKAGE_NAME = "blocks";
|
|
2392
2838
|
declare const PACKAGE_VERSION: string;
|