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