@uploadcare/file-uploader 1.25.0-alpha.1 → 1.25.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract/loadFileUploaderFrom.js +4 -79
- package/dist/env.js +4 -33
- package/dist/index.css +5 -2664
- package/dist/index.d.ts +974 -962
- package/dist/index.js +6 -13566
- package/dist/index.layered.css +4 -2720
- package/dist/index.ssr.js +17 -18
- package/dist/locales/file-uploader/ar.js +4 -165
- package/dist/locales/file-uploader/az.js +4 -157
- package/dist/locales/file-uploader/ca.js +4 -159
- package/dist/locales/file-uploader/cs.js +4 -161
- package/dist/locales/file-uploader/da.js +4 -157
- package/dist/locales/file-uploader/de.js +4 -157
- package/dist/locales/file-uploader/el.js +4 -157
- package/dist/locales/file-uploader/en.js +4 -157
- package/dist/locales/file-uploader/es.js +4 -159
- package/dist/locales/file-uploader/et.js +4 -157
- package/dist/locales/file-uploader/fi.js +4 -157
- package/dist/locales/file-uploader/fr.js +4 -159
- package/dist/locales/file-uploader/he.js +4 -159
- package/dist/locales/file-uploader/hy.js +4 -157
- package/dist/locales/file-uploader/is.js +4 -157
- package/dist/locales/file-uploader/it.js +4 -159
- package/dist/locales/file-uploader/ja.js +4 -157
- package/dist/locales/file-uploader/ka.js +4 -157
- package/dist/locales/file-uploader/kk.js +4 -157
- package/dist/locales/file-uploader/ko.js +4 -157
- package/dist/locales/file-uploader/lv.js +4 -159
- package/dist/locales/file-uploader/nb.js +4 -157
- package/dist/locales/file-uploader/nl.js +4 -157
- package/dist/locales/file-uploader/pl.js +4 -161
- package/dist/locales/file-uploader/pt.js +4 -159
- package/dist/locales/file-uploader/ro.js +4 -159
- package/dist/locales/file-uploader/ru.js +4 -161
- package/dist/locales/file-uploader/sk.js +4 -161
- package/dist/locales/file-uploader/sr.js +4 -159
- package/dist/locales/file-uploader/sv.js +4 -157
- package/dist/locales/file-uploader/tr.js +4 -157
- package/dist/locales/file-uploader/uk.js +4 -161
- package/dist/locales/file-uploader/vi.js +4 -157
- package/dist/locales/file-uploader/zh-TW.js +4 -157
- package/dist/locales/file-uploader/zh.js +4 -157
- package/package.json +13 -13
- package/types/jsx.d.ts +75 -48
- package/web/file-uploader.iife.min.d.ts +976 -964
- package/web/file-uploader.iife.min.js +6 -31
- package/web/file-uploader.iife.min.js.LEGAL.txt +71 -0
- package/web/file-uploader.min.d.ts +976 -964
- package/web/file-uploader.min.js +5 -29
- package/web/file-uploader.min.js.LEGAL.txt +71 -0
- package/web/uc-basic.layered.min.css +4 -23
- package/web/uc-basic.min.css +4 -23
- package/web/uc-cloud-image-editor.layered.min.css +4 -23
- package/web/uc-cloud-image-editor.min.css +4 -23
- package/web/uc-cloud-image-editor.min.d.ts +509 -508
- package/web/uc-cloud-image-editor.min.js +5 -29
- package/web/uc-cloud-image-editor.min.js.LEGAL.txt +70 -0
- package/web/uc-file-uploader-inline.layered.min.css +4 -23
- package/web/uc-file-uploader-inline.min.css +4 -23
- package/web/uc-file-uploader-inline.min.d.ts +976 -964
- package/web/uc-file-uploader-inline.min.js +5 -29
- package/web/uc-file-uploader-inline.min.js.LEGAL.txt +71 -0
- package/web/uc-file-uploader-minimal.layered.min.css +4 -23
- package/web/uc-file-uploader-minimal.min.css +4 -23
- package/web/uc-file-uploader-minimal.min.d.ts +976 -964
- package/web/uc-file-uploader-minimal.min.js +5 -29
- package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +71 -0
- package/web/uc-file-uploader-regular.layered.min.css +4 -23
- package/web/uc-file-uploader-regular.min.css +4 -23
- package/web/uc-file-uploader-regular.min.d.ts +976 -964
- package/web/uc-file-uploader-regular.min.js +5 -29
- package/web/uc-file-uploader-regular.min.js.LEGAL.txt +71 -0
- package/web/uc-img.min.d.ts +28 -38
- package/web/uc-img.min.js +5 -25
- package/web/uc-img.min.js.LEGAL.txt +24 -0
- package/dist/lit.d.ts +0 -1
- package/dist/lit.js +0 -28
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { PubSub as Data, PubSub, UID } from '@symbiotejs/symbiote';
|
|
1
|
+
import { LitElement, PropertyValues, nothing, TemplateResult } from 'lit';
|
|
3
2
|
export { loadFileUploaderFrom } from './abstract/loadFileUploaderFrom.js';
|
|
4
3
|
import * as lit_html from 'lit-html';
|
|
5
4
|
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
6
|
-
import { nothing, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
7
5
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
8
6
|
import * as _uploadcare_upload_client from '@uploadcare/upload-client';
|
|
9
|
-
import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, FileFromOptions } from '@uploadcare/upload-client';
|
|
7
|
+
import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, FileFromOptions, Queue } from '@uploadcare/upload-client';
|
|
10
8
|
export { Metadata, NetworkError, UploadError, UploadcareError, UploadcareFile, UploadcareGroup } from '@uploadcare/upload-client';
|
|
11
9
|
import { Ref } from 'lit/directives/ref.js';
|
|
12
10
|
export { PACKAGE_NAME, PACKAGE_VERSION } from './env.js';
|
|
13
11
|
|
|
12
|
+
type Subscription = {
|
|
13
|
+
remove: () => void;
|
|
14
|
+
};
|
|
15
|
+
declare class PubSub<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
16
|
+
private static _contexts;
|
|
17
|
+
private _store;
|
|
18
|
+
private constructor();
|
|
19
|
+
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): Subscription;
|
|
21
|
+
read<K extends keyof T>(key: K): T[K];
|
|
22
|
+
add<K extends keyof T>(key: K, value: T[K], rewrite?: boolean): void;
|
|
23
|
+
has(key: keyof T): boolean;
|
|
24
|
+
get store(): T;
|
|
25
|
+
static registerCtx<T extends Record<string, unknown>>(initialValue: T, ctxId: string): PubSub<T>;
|
|
26
|
+
static deleteCtx(ctxId: string): void;
|
|
27
|
+
static getCtx<T extends Record<string, unknown> = Record<string, unknown>>(ctxId: string): PubSub<T> | null;
|
|
28
|
+
static hasCtx(ctxId: string): boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type Constructor<T = unknown> = new (...args: any[]) => T;
|
|
32
|
+
|
|
33
|
+
type SymbioteStateBag<T extends Record<string, unknown>> = T;
|
|
34
|
+
/**
|
|
35
|
+
* Interface for components using SymbioteMixin
|
|
36
|
+
*/
|
|
37
|
+
declare class SymbioteComponent<TState extends Record<string, unknown> = Record<string, unknown>> {
|
|
38
|
+
$: SymbioteStateBag<TState>;
|
|
39
|
+
sub<TKey extends keyof TState>(key: TKey, callback: (value: TState[TKey]) => void, init?: boolean): () => void;
|
|
40
|
+
pub<TKey extends keyof TState>(key: TKey, value: TState[TKey]): void;
|
|
41
|
+
set$<T extends {
|
|
42
|
+
[K in keyof T]: K extends keyof TState ? TState[K] : never;
|
|
43
|
+
}>(obj: T): void;
|
|
44
|
+
has<TKey extends keyof TState>(key: TKey): boolean;
|
|
45
|
+
add<TKey extends keyof TState>(key: TKey, val: TState[TKey], rewrite?: boolean): void;
|
|
46
|
+
add$<T extends {
|
|
47
|
+
[K in keyof T]: K extends keyof TState ? TState[K] : never;
|
|
48
|
+
}>(obj: T, rewrite?: boolean): void;
|
|
49
|
+
initCallback(): void;
|
|
50
|
+
ctxName: string;
|
|
51
|
+
ctxOwner: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare const BaseComponent_base: typeof LitElement & Constructor<{
|
|
55
|
+
willYield: boolean;
|
|
56
|
+
yield(slot: string, defaultContent?: unknown): unknown;
|
|
57
|
+
}> & Constructor<{
|
|
58
|
+
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
59
|
+
}> & Constructor<SymbioteComponent<Record<string, unknown>>> & Constructor<LitElement> & {
|
|
60
|
+
reg(tagName: string): void;
|
|
61
|
+
};
|
|
62
|
+
declare class BaseComponent extends BaseComponent_base {
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type Uid = string & {
|
|
66
|
+
__uid: true;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
declare class UID {
|
|
70
|
+
static generateFastUid(): Uid;
|
|
71
|
+
static generateRandomUUID(): string;
|
|
72
|
+
}
|
|
73
|
+
|
|
14
74
|
declare function defineComponents(blockExports: Record<string, any>): void;
|
|
15
75
|
|
|
16
76
|
type LocaleDefinition = Record<string, string>;
|
|
17
77
|
type LocaleDefinitionResolver = () => Promise<LocaleDefinition>;
|
|
18
78
|
declare const defineLocale: (localeName: string, definitionOrResolver: LocaleDefinition | LocaleDefinitionResolver) => void;
|
|
19
79
|
|
|
20
|
-
type Constructor$1<T = {}> = new (...args: any[]) => T;
|
|
21
|
-
|
|
22
80
|
declare class A11y {
|
|
23
81
|
private _destroyKeyUX;
|
|
24
82
|
private readonly _scopedWindow;
|
|
@@ -39,165 +97,48 @@ type EventMap = {
|
|
|
39
97
|
|
|
40
98
|
declare function buildOutputCollectionState<TCollectionStatus extends OutputCollectionStatus, TGroupFlag extends GroupFlag = 'maybe-has-group'>(uploaderBlock: LitUploaderBlock): OutputCollectionState<TCollectionStatus, TGroupFlag>;
|
|
41
99
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
type ExtractKeysFromSchema<T extends TypedSchema> = Extract<keyof T, string>;
|
|
53
|
-
declare class TypedData<T extends TypedSchema> {
|
|
54
|
-
private __typedSchema;
|
|
55
|
-
private __ctxId;
|
|
56
|
-
private __schema;
|
|
57
|
-
private __data;
|
|
58
|
-
constructor(typedSchema: T, ctxName?: string);
|
|
59
|
-
get uid(): string;
|
|
60
|
-
setValue<K extends ExtractKeysFromSchema<T>>(prop: K, value: ExtractDataFromSchema<T>[K]): void;
|
|
61
|
-
setMultipleValues(updObj: Partial<ExtractDataFromSchema<T>>): void;
|
|
62
|
-
getValue<K extends ExtractKeysFromSchema<T>>(prop: K): ExtractDataFromSchema<T>[K];
|
|
63
|
-
subscribe<K extends ExtractKeysFromSchema<T>>(prop: K, handler: (newVal: ExtractDataFromSchema<T>[K]) => void): {
|
|
64
|
-
remove: () => void;
|
|
65
|
-
callback: (val: unknown) => void;
|
|
66
|
-
};
|
|
67
|
-
remove(): void;
|
|
100
|
+
declare class TypedData<T extends Record<string, unknown>> {
|
|
101
|
+
private _ctxId;
|
|
102
|
+
private _data;
|
|
103
|
+
constructor(initialValue: T);
|
|
104
|
+
get uid(): Uid;
|
|
105
|
+
setValue<K extends keyof T>(prop: K, value: T[K]): void;
|
|
106
|
+
setMultipleValues(updObj: Partial<T>): void;
|
|
107
|
+
getValue<K extends keyof T>(prop: K): T[K];
|
|
108
|
+
subscribe<K extends keyof T>(prop: K, handler: (newVal: T[K]) => void): Subscription;
|
|
109
|
+
destroy(): void;
|
|
68
110
|
}
|
|
69
111
|
|
|
70
|
-
|
|
71
|
-
file:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
value: 0;
|
|
101
|
-
}>;
|
|
102
|
-
uuid: Readonly<{
|
|
103
|
-
type: StringConstructor;
|
|
104
|
-
value: null;
|
|
105
|
-
nullable: true;
|
|
106
|
-
}>;
|
|
107
|
-
isImage: Readonly<{
|
|
108
|
-
type: BooleanConstructor;
|
|
109
|
-
value: false;
|
|
110
|
-
}>;
|
|
111
|
-
mimeType: Readonly<{
|
|
112
|
-
type: StringConstructor;
|
|
113
|
-
value: null;
|
|
114
|
-
nullable: true;
|
|
115
|
-
}>;
|
|
116
|
-
ctxName: Readonly<{
|
|
117
|
-
type: StringConstructor;
|
|
118
|
-
value: null;
|
|
119
|
-
nullable: true;
|
|
120
|
-
}>;
|
|
121
|
-
cdnUrl: Readonly<{
|
|
122
|
-
type: StringConstructor;
|
|
123
|
-
value: null;
|
|
124
|
-
nullable: true;
|
|
125
|
-
}>;
|
|
126
|
-
cdnUrlModifiers: Readonly<{
|
|
127
|
-
type: StringConstructor;
|
|
128
|
-
value: null;
|
|
129
|
-
nullable: true;
|
|
130
|
-
}>;
|
|
131
|
-
fileInfo: Readonly<{
|
|
132
|
-
type: typeof UploadcareFile;
|
|
133
|
-
value: null;
|
|
134
|
-
nullable: true;
|
|
135
|
-
}>;
|
|
136
|
-
isUploading: Readonly<{
|
|
137
|
-
type: BooleanConstructor;
|
|
138
|
-
value: false;
|
|
139
|
-
}>;
|
|
140
|
-
abortController: Readonly<{
|
|
141
|
-
type: {
|
|
142
|
-
new (): AbortController;
|
|
143
|
-
prototype: AbortController;
|
|
144
|
-
};
|
|
145
|
-
value: null;
|
|
146
|
-
nullable: true;
|
|
147
|
-
}>;
|
|
148
|
-
thumbUrl: Readonly<{
|
|
149
|
-
type: StringConstructor;
|
|
150
|
-
value: null;
|
|
151
|
-
nullable: true;
|
|
152
|
-
}>;
|
|
153
|
-
silent: Readonly<{
|
|
154
|
-
type: BooleanConstructor;
|
|
155
|
-
value: false;
|
|
156
|
-
}>;
|
|
157
|
-
source: Readonly<{
|
|
158
|
-
type: StringConstructor;
|
|
159
|
-
value: null;
|
|
160
|
-
nullable: true;
|
|
161
|
-
}>;
|
|
162
|
-
fullPath: Readonly<{
|
|
163
|
-
type: StringConstructor;
|
|
164
|
-
value: null;
|
|
165
|
-
nullable: true;
|
|
166
|
-
}>;
|
|
167
|
-
metadata: Readonly<{
|
|
168
|
-
type: ObjectConstructor;
|
|
169
|
-
value: null;
|
|
170
|
-
nullable: true;
|
|
171
|
-
}>;
|
|
172
|
-
errors: Readonly<{
|
|
173
|
-
type: ArrayConstructor;
|
|
174
|
-
value: OutputErrorFile[];
|
|
175
|
-
}>;
|
|
176
|
-
uploadError: Readonly<{
|
|
177
|
-
type: ErrorConstructor;
|
|
178
|
-
value: null;
|
|
179
|
-
nullable: true;
|
|
180
|
-
}>;
|
|
181
|
-
isRemoved: Readonly<{
|
|
182
|
-
type: BooleanConstructor;
|
|
183
|
-
value: false;
|
|
184
|
-
}>;
|
|
185
|
-
isQueuedForUploading: Readonly<{
|
|
186
|
-
type: BooleanConstructor;
|
|
187
|
-
value: false;
|
|
188
|
-
}>;
|
|
189
|
-
isValidationPending: Readonly<{
|
|
190
|
-
type: BooleanConstructor;
|
|
191
|
-
value: false;
|
|
192
|
-
}>;
|
|
193
|
-
isQueuedForValidation: Readonly<{
|
|
194
|
-
type: BooleanConstructor;
|
|
195
|
-
value: false;
|
|
196
|
-
}>;
|
|
197
|
-
}>;
|
|
198
|
-
type UploadEntryData = ExtractDataFromSchema<typeof uploadEntrySchema>;
|
|
199
|
-
type UploadEntryTypedData = TypedData<typeof uploadEntrySchema>;
|
|
200
|
-
type UploadEntryKeys = ExtractKeysFromSchema<typeof uploadEntrySchema>;
|
|
112
|
+
interface UploadEntryData extends Record<string, unknown> {
|
|
113
|
+
file: File | null;
|
|
114
|
+
externalUrl: string | null;
|
|
115
|
+
fileName: string | null;
|
|
116
|
+
fileSize: number | null;
|
|
117
|
+
lastModified: number;
|
|
118
|
+
uploadProgress: number;
|
|
119
|
+
uuid: string | null;
|
|
120
|
+
isImage: boolean;
|
|
121
|
+
mimeType: string | null;
|
|
122
|
+
ctxName: string | null;
|
|
123
|
+
cdnUrl: string | null;
|
|
124
|
+
cdnUrlModifiers: string | null;
|
|
125
|
+
fileInfo: UploadcareFile | null;
|
|
126
|
+
isUploading: boolean;
|
|
127
|
+
abortController: AbortController | null;
|
|
128
|
+
thumbUrl: string | null;
|
|
129
|
+
silent: boolean;
|
|
130
|
+
source: string | null;
|
|
131
|
+
fullPath: string | null;
|
|
132
|
+
metadata: Metadata | null;
|
|
133
|
+
errors: OutputErrorFile[];
|
|
134
|
+
uploadError: Error | null;
|
|
135
|
+
isRemoved: boolean;
|
|
136
|
+
isQueuedForUploading: boolean;
|
|
137
|
+
isValidationPending: boolean;
|
|
138
|
+
isQueuedForValidation: boolean;
|
|
139
|
+
}
|
|
140
|
+
type UploadEntryTypedData = TypedData<UploadEntryData>;
|
|
141
|
+
type UploadEntryKeys = keyof UploadEntryData;
|
|
201
142
|
|
|
202
143
|
type FuncFileValidator = (outputEntry: OutputFileEntry, api: UploaderPublicApi, options?: {
|
|
203
144
|
signal?: AbortSignal;
|
|
@@ -217,9 +158,9 @@ declare class ValidationManager {
|
|
|
217
158
|
private _runQueueDebounced;
|
|
218
159
|
private _entryValidationState;
|
|
219
160
|
constructor(blockInstance: LitUploaderBlock);
|
|
220
|
-
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?:
|
|
161
|
+
runFileValidators(runOn: FileValidatorDescriptor['runOn'], entryIds?: Uid[]): void;
|
|
221
162
|
runCollectionValidators(): void;
|
|
222
|
-
cleanupValidationForEntry(entry: TypedData<
|
|
163
|
+
cleanupValidationForEntry(entry: TypedData<UploadEntryData>): void;
|
|
223
164
|
private _runFileValidatorsForEntry;
|
|
224
165
|
private _addCustomTypeToValidationError;
|
|
225
166
|
private _getEntryValidationState;
|
|
@@ -227,16 +168,7 @@ declare class ValidationManager {
|
|
|
227
168
|
private _getValidatorDescriptorsForEntry;
|
|
228
169
|
}
|
|
229
170
|
|
|
230
|
-
type CameraDeviceOption = {
|
|
231
|
-
text: string;
|
|
232
|
-
value: string;
|
|
233
|
-
};
|
|
234
|
-
type AudioDeviceOption = {
|
|
235
|
-
text: string;
|
|
236
|
-
value: string;
|
|
237
|
-
};
|
|
238
171
|
type CameraMode = 'photo' | 'video';
|
|
239
|
-
type CameraStatus = 'shot' | 'retake' | 'accept' | 'play' | 'stop' | 'pause' | 'resume';
|
|
240
172
|
declare class CameraSource extends LitUploaderBlock {
|
|
241
173
|
couldBeCtxOwner: boolean;
|
|
242
174
|
activityType: "camera";
|
|
@@ -254,34 +186,37 @@ declare class CameraSource extends LitUploaderBlock {
|
|
|
254
186
|
private _cameraDevices;
|
|
255
187
|
private _audioDevices;
|
|
256
188
|
private _permissionResponses;
|
|
257
|
-
private
|
|
258
|
-
private
|
|
259
|
-
private
|
|
260
|
-
private
|
|
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;
|
|
261
197
|
private _startTime;
|
|
262
198
|
private _elapsedTime;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
_chooseActionWithCamera: () => void;
|
|
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;
|
|
285
220
|
private _handleCameraSelectChange;
|
|
286
221
|
private _handleAudioSelectChange;
|
|
287
222
|
private _handleRequestPermissions;
|
|
@@ -291,49 +226,59 @@ declare class CameraSource extends LitUploaderBlock {
|
|
|
291
226
|
private _handleRetake;
|
|
292
227
|
private _handleAccept;
|
|
293
228
|
private _handleClickTab;
|
|
294
|
-
_updateTimer
|
|
295
|
-
_startTimer
|
|
296
|
-
_stopTimer
|
|
297
|
-
_startTimeline
|
|
298
|
-
_stopTimeline
|
|
299
|
-
_animationFrameId
|
|
300
|
-
_startRecording
|
|
229
|
+
private _updateTimer;
|
|
230
|
+
private _startTimer;
|
|
231
|
+
private _stopTimer;
|
|
232
|
+
private _startTimeline;
|
|
233
|
+
private _stopTimeline;
|
|
234
|
+
private _animationFrameId;
|
|
235
|
+
private _startRecording;
|
|
301
236
|
private _stopRecording;
|
|
302
237
|
/** This method is used to toggle recording pause/resume */
|
|
303
|
-
_toggleRecording
|
|
304
|
-
_toggleEnableAudio
|
|
238
|
+
private _toggleRecording;
|
|
239
|
+
private _toggleEnableAudio;
|
|
305
240
|
/**
|
|
306
241
|
* Previewing the video that was recorded on the camera
|
|
307
242
|
*/
|
|
308
243
|
private _previewVideo;
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
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;
|
|
313
256
|
private _setCameraState;
|
|
314
257
|
private _shot;
|
|
315
258
|
private _handleActiveTab;
|
|
316
259
|
private _createFile;
|
|
317
|
-
_guessExtensionByMime
|
|
260
|
+
private _guessExtensionByMime;
|
|
318
261
|
/**
|
|
319
262
|
* The send file to the server
|
|
320
263
|
*/
|
|
321
|
-
_toSend
|
|
264
|
+
private _toSend;
|
|
322
265
|
private get _cameraModes();
|
|
323
266
|
private _setPermissionsState;
|
|
324
|
-
_makeStreamInactive
|
|
325
|
-
_stopCapture
|
|
326
|
-
_capture
|
|
327
|
-
_handlePermissionsChange
|
|
328
|
-
_permissionAccess
|
|
329
|
-
|
|
330
|
-
_requestDeviceAccess
|
|
331
|
-
_getDevices
|
|
332
|
-
_onActivate
|
|
333
|
-
_onDeactivate
|
|
334
|
-
_handleCameraModes
|
|
267
|
+
private _makeStreamInactive;
|
|
268
|
+
private _stopCapture;
|
|
269
|
+
private _capture;
|
|
270
|
+
private _handlePermissionsChange;
|
|
271
|
+
private _permissionAccess;
|
|
272
|
+
private _teardownPermissionListeners;
|
|
273
|
+
private _requestDeviceAccess;
|
|
274
|
+
private _getDevices;
|
|
275
|
+
private _onActivate;
|
|
276
|
+
private _onDeactivate;
|
|
277
|
+
private _handleCameraModes;
|
|
335
278
|
initCallback(): void;
|
|
336
|
-
|
|
279
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
280
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
281
|
+
private _destroy;
|
|
337
282
|
disconnectedCallback(): void;
|
|
338
283
|
render(): lit_html.TemplateResult<1>;
|
|
339
284
|
}
|
|
@@ -345,13 +290,16 @@ declare const complexConfigKeys: readonly ["metadata", "localeDefinitionOverride
|
|
|
345
290
|
/** Mapping of attribute names to state */
|
|
346
291
|
declare const attrStateMapping: Record<string, string>;
|
|
347
292
|
declare class Config extends LitBlock {
|
|
293
|
+
attributesMeta: Partial<ConfigPlainType> & {
|
|
294
|
+
'ctx-name': string;
|
|
295
|
+
};
|
|
348
296
|
init$: LitBlock["init$"] & ConfigType;
|
|
349
|
-
private
|
|
297
|
+
private _computationControllers;
|
|
350
298
|
private _flushValueToAttribute;
|
|
351
299
|
private _flushValueToState;
|
|
352
300
|
private _setValue;
|
|
353
301
|
private _getValue;
|
|
354
|
-
_assertSameValueDifferentReference
|
|
302
|
+
private _assertSameValueDifferentReference;
|
|
355
303
|
initCallback(): void;
|
|
356
304
|
attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
|
|
357
305
|
static get observedAttributes(): string[];
|
|
@@ -362,23 +310,23 @@ interface Config extends ConfigType {
|
|
|
362
310
|
type FilesViewMode = 'grid' | 'list';
|
|
363
311
|
declare class UploadList extends LitUploaderBlock {
|
|
364
312
|
couldBeCtxOwner: boolean;
|
|
365
|
-
historyTracked: boolean;
|
|
313
|
+
protected historyTracked: boolean;
|
|
366
314
|
activityType: "upload-list";
|
|
367
|
-
private
|
|
368
|
-
private
|
|
369
|
-
private
|
|
370
|
-
private
|
|
371
|
-
private
|
|
372
|
-
private
|
|
373
|
-
private
|
|
315
|
+
private _doneBtnVisible;
|
|
316
|
+
private _doneBtnEnabled;
|
|
317
|
+
private _uploadBtnVisible;
|
|
318
|
+
private _addMoreBtnVisible;
|
|
319
|
+
private _addMoreBtnEnabled;
|
|
320
|
+
private _commonErrorMessage;
|
|
321
|
+
private _hasFiles;
|
|
374
322
|
private _latestSummary;
|
|
375
|
-
|
|
323
|
+
private get _headerText();
|
|
376
324
|
private _handleAdd;
|
|
377
325
|
private _handleUpload;
|
|
378
326
|
private _handleDone;
|
|
379
327
|
private _handleCancel;
|
|
380
328
|
private _throttledHandleCollectionUpdate;
|
|
381
|
-
|
|
329
|
+
private _updateUploadsState;
|
|
382
330
|
private _getHeaderText;
|
|
383
331
|
get couldOpenActivity(): boolean;
|
|
384
332
|
initCallback(): void;
|
|
@@ -421,6 +369,51 @@ declare const UploadSource: Readonly<{
|
|
|
421
369
|
}>;
|
|
422
370
|
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
423
371
|
|
|
372
|
+
type ChangeMap<T extends Record<string, unknown>> = Record<keyof T, Set<Uid>>;
|
|
373
|
+
type TypedCollectionPropertyObserver<T extends Record<string, unknown>> = (changeMap: ChangeMap<T>) => void;
|
|
374
|
+
type TypedCollectionObserverHandler<T extends Record<string, unknown>> = (list: Uid[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
375
|
+
type TypedCollectionOptions<T extends Record<string, unknown>> = {
|
|
376
|
+
initialValue: T;
|
|
377
|
+
watchList?: (keyof T)[];
|
|
378
|
+
handler?: TypedCollectionObserverHandler<T>;
|
|
379
|
+
};
|
|
380
|
+
declare class TypedCollection<T extends Record<string, unknown>> {
|
|
381
|
+
private static readonly _destroyDelayMs;
|
|
382
|
+
private _ctxId;
|
|
383
|
+
private _data;
|
|
384
|
+
private _watchList;
|
|
385
|
+
private _subsMap;
|
|
386
|
+
private _propertyObservers;
|
|
387
|
+
private _collectionObservers;
|
|
388
|
+
private _items;
|
|
389
|
+
private _removed;
|
|
390
|
+
private _added;
|
|
391
|
+
private _markedToDestroy;
|
|
392
|
+
private _observeTimeout?;
|
|
393
|
+
private _notifyTimeout?;
|
|
394
|
+
private _destroyTimeout?;
|
|
395
|
+
private _notifyObservers;
|
|
396
|
+
private _initialValue;
|
|
397
|
+
constructor(options: TypedCollectionOptions<T>);
|
|
398
|
+
private _notify;
|
|
399
|
+
private _scheduleDestroyMarkedItems;
|
|
400
|
+
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
401
|
+
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
402
|
+
add(init: Partial<T>): Uid;
|
|
403
|
+
hasItem(id: Uid): boolean;
|
|
404
|
+
read(id: Uid): TypedData<T> | null;
|
|
405
|
+
readProp<K extends keyof T>(id: Uid, propName: K): T[K];
|
|
406
|
+
publishProp<K extends keyof T>(id: Uid, propName: K, value: T[K]): void;
|
|
407
|
+
remove(id: Uid): void;
|
|
408
|
+
clearAll(): void;
|
|
409
|
+
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
410
|
+
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
411
|
+
findItems(checkFn: (item: TypedData<T>) => boolean): Uid[];
|
|
412
|
+
items(): Uid[];
|
|
413
|
+
get size(): number;
|
|
414
|
+
destroy(): void;
|
|
415
|
+
}
|
|
416
|
+
|
|
424
417
|
declare const CameraSourceTypes: Readonly<{
|
|
425
418
|
PHOTO: "photo";
|
|
426
419
|
VIDEO: "video";
|
|
@@ -435,7 +428,7 @@ type ApiAddFileCommonOptions = {
|
|
|
435
428
|
declare class UploaderPublicApi {
|
|
436
429
|
private _ctx;
|
|
437
430
|
constructor(ctx: LitUploaderBlock);
|
|
438
|
-
|
|
431
|
+
get _uploadCollection(): TypedCollection<UploadEntryData>;
|
|
439
432
|
get cfg(): ConfigType;
|
|
440
433
|
get l10n(): (str: string, variables?: Record<string, string | number>) => string;
|
|
441
434
|
/**
|
|
@@ -458,7 +451,7 @@ declare class UploaderPublicApi {
|
|
|
458
451
|
getOutputCollectionState<TStatus extends OutputCollectionStatus>(): ReturnType<typeof buildOutputCollectionState<TStatus>>;
|
|
459
452
|
initFlow: (force?: boolean) => void;
|
|
460
453
|
doneFlow: () => void;
|
|
461
|
-
setCurrentActivity: <T extends
|
|
454
|
+
setCurrentActivity: <T extends RegisteredActivityType>(activityType: T, ...params: T extends keyof ActivityParamsMap ? [ActivityParamsMap[T]] : T extends RegisteredActivityType ? [undefined?] : [never]) => void;
|
|
462
455
|
getCurrentActivity: () => ActivityType;
|
|
463
456
|
setModalState: (opened: boolean) => void;
|
|
464
457
|
private get _sourceList();
|
|
@@ -780,7 +773,9 @@ type OutputErrorTypePayload = {
|
|
|
780
773
|
NOT_AN_IMAGE: OutputFileErrorPayload;
|
|
781
774
|
FORBIDDEN_FILE_TYPE: OutputFileErrorPayload;
|
|
782
775
|
FILE_SIZE_EXCEEDED: OutputFileErrorPayload;
|
|
783
|
-
SOME_FILES_HAS_ERRORS: {
|
|
776
|
+
SOME_FILES_HAS_ERRORS: {
|
|
777
|
+
[k: string]: never;
|
|
778
|
+
};
|
|
784
779
|
TOO_MANY_FILES: {
|
|
785
780
|
min: number;
|
|
786
781
|
max: number;
|
|
@@ -938,52 +933,11 @@ declare class SecureUploadsManager {
|
|
|
938
933
|
getSecureToken(): Promise<SecureUploadsSignatureAndExpire | null>;
|
|
939
934
|
}
|
|
940
935
|
|
|
941
|
-
type ChangeMap<T extends TypedSchema> = Record<keyof T, Set<string>>;
|
|
942
|
-
type TypedCollectionPropertyObserver<T extends TypedSchema> = (changeMap: ChangeMap<T>) => void;
|
|
943
|
-
type TypedCollectionObserverHandler<T extends TypedSchema> = (list: string[], added: Set<TypedData<T>>, removed: Set<TypedData<T>>) => void;
|
|
944
|
-
type TypedCollectionOptions<T extends TypedSchema> = {
|
|
945
|
-
typedSchema: T;
|
|
946
|
-
watchList?: ExtractKeysFromSchema<T>[];
|
|
947
|
-
handler?: TypedCollectionObserverHandler<T>;
|
|
948
|
-
ctxName?: string;
|
|
949
|
-
};
|
|
950
|
-
declare class TypedCollection<T extends TypedSchema> {
|
|
951
|
-
private __typedSchema;
|
|
952
|
-
private __ctxId;
|
|
953
|
-
private __data;
|
|
954
|
-
private __watchList;
|
|
955
|
-
private __subsMap;
|
|
956
|
-
private __propertyObservers;
|
|
957
|
-
private __collectionObservers;
|
|
958
|
-
private __items;
|
|
959
|
-
private __removed;
|
|
960
|
-
private __added;
|
|
961
|
-
private __observeTimeout?;
|
|
962
|
-
private __notifyTimeout?;
|
|
963
|
-
private __notifyObservers;
|
|
964
|
-
constructor(options: TypedCollectionOptions<T>);
|
|
965
|
-
notify(): void;
|
|
966
|
-
observeCollection(handler: TypedCollectionObserverHandler<T>): () => void;
|
|
967
|
-
unobserveCollection(handler: TypedCollectionObserverHandler<T>): void;
|
|
968
|
-
add(init: Partial<ExtractDataFromSchema<T>>): string;
|
|
969
|
-
read(id: string): TypedData<T> | null;
|
|
970
|
-
readProp<K extends ExtractKeysFromSchema<T>>(id: string, propName: K): ExtractDataFromSchema<T>[K] | null;
|
|
971
|
-
publishProp<K extends ExtractKeysFromSchema<T>>(id: string, propName: K, value: ExtractDataFromSchema<T>[K]): void;
|
|
972
|
-
remove(id: string): void;
|
|
973
|
-
clearAll(): void;
|
|
974
|
-
observeProperties(handler: TypedCollectionPropertyObserver<T>): () => void;
|
|
975
|
-
unobserveProperties(handler: TypedCollectionPropertyObserver<T>): void;
|
|
976
|
-
findItems(checkFn: (item: TypedData<T>) => boolean): string[];
|
|
977
|
-
items(): string[];
|
|
978
|
-
get size(): number;
|
|
979
|
-
destroy(): void;
|
|
980
|
-
}
|
|
981
|
-
|
|
982
936
|
declare class LitUploaderBlock extends LitActivityBlock {
|
|
983
937
|
static extSrcList: Readonly<typeof ExternalUploadSource>;
|
|
984
938
|
static sourceTypes: Readonly<typeof UploadSource>;
|
|
985
939
|
protected couldBeCtxOwner: boolean;
|
|
986
|
-
private
|
|
940
|
+
private _isCtxOwner;
|
|
987
941
|
private _unobserveCollection?;
|
|
988
942
|
private _unobserveCollectionProperties?;
|
|
989
943
|
init$: {
|
|
@@ -994,20 +948,19 @@ declare class LitUploaderBlock extends LitActivityBlock {
|
|
|
994
948
|
'*collectionState': OutputCollectionState | null;
|
|
995
949
|
'*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
|
|
996
950
|
'*uploadTrigger': Set<string>;
|
|
997
|
-
'*secureUploadsManager': SecureUploadsManager | null;
|
|
998
951
|
'*currentActivity': null;
|
|
999
952
|
'*currentActivityParams': {};
|
|
1000
953
|
'*history': never[];
|
|
1001
954
|
'*historyBack': null;
|
|
1002
955
|
'*closeModal': () => void;
|
|
1003
956
|
};
|
|
1004
|
-
private get
|
|
957
|
+
private get _hasCtxOwner();
|
|
1005
958
|
initCallback(): void;
|
|
1006
959
|
protected get validationManager(): ValidationManager;
|
|
1007
960
|
get api(): UploaderPublicApi;
|
|
1008
961
|
getAPI(): UploaderPublicApi;
|
|
1009
|
-
get uploadCollection(): TypedCollection<
|
|
1010
|
-
|
|
962
|
+
get uploadCollection(): TypedCollection<UploadEntryData>;
|
|
963
|
+
get secureUploadsManager(): SecureUploadsManager;
|
|
1011
964
|
disconnectedCallback(): void;
|
|
1012
965
|
connectedCallback(): void;
|
|
1013
966
|
private _initCtxOwner;
|
|
@@ -1018,8 +971,8 @@ declare class LitUploaderBlock extends LitActivityBlock {
|
|
|
1018
971
|
private _handleCollectionUpdate;
|
|
1019
972
|
private _handleCollectionPropertiesUpdate;
|
|
1020
973
|
private _flushCommonUploadProgress;
|
|
1021
|
-
|
|
1022
|
-
private
|
|
974
|
+
private _openCloudImageEditor;
|
|
975
|
+
private _setInitialCrop;
|
|
1023
976
|
protected getMetadataFor(entryId: string): Promise<_uploadcare_upload_client.Metadata | undefined>;
|
|
1024
977
|
protected getUploadClientOptions(): Promise<FileFromOptions>;
|
|
1025
978
|
getOutputData(): OutputFileEntry[];
|
|
@@ -1071,6 +1024,7 @@ interface CropAspectRatio {
|
|
|
1071
1024
|
id: string;
|
|
1072
1025
|
hasFreeform?: boolean;
|
|
1073
1026
|
}
|
|
1027
|
+
type CropPresetList = CropAspectRatio[];
|
|
1074
1028
|
|
|
1075
1029
|
type ActivityParams$1 = {
|
|
1076
1030
|
internalId: string;
|
|
@@ -1079,14 +1033,14 @@ declare class CloudImageEditorActivity extends LitUploaderBlock {
|
|
|
1079
1033
|
couldBeCtxOwner: boolean;
|
|
1080
1034
|
activityType: "cloud-image-edit";
|
|
1081
1035
|
private _entry?;
|
|
1082
|
-
private
|
|
1036
|
+
private _editorConfig;
|
|
1083
1037
|
get activityParams(): ActivityParams$1;
|
|
1084
1038
|
initCallback(): void;
|
|
1085
|
-
|
|
1086
|
-
|
|
1039
|
+
private _handleApply;
|
|
1040
|
+
private _handleCancel;
|
|
1087
1041
|
handleChange(event: CustomEvent<ChangeResult>): void;
|
|
1088
|
-
|
|
1089
|
-
|
|
1042
|
+
private _mountEditor;
|
|
1043
|
+
private _unmountEditor;
|
|
1090
1044
|
render(): lit_html.TemplateResult<1> | typeof nothing;
|
|
1091
1045
|
private _createEditorConfig;
|
|
1092
1046
|
}
|
|
@@ -1098,36 +1052,37 @@ declare class ExternalSource extends LitUploaderBlock {
|
|
|
1098
1052
|
couldBeCtxOwner: boolean;
|
|
1099
1053
|
activityType: "external";
|
|
1100
1054
|
private _messageBridge?;
|
|
1101
|
-
private
|
|
1055
|
+
private _iframeRef;
|
|
1102
1056
|
private _latestSelectionSummary;
|
|
1103
|
-
private
|
|
1104
|
-
private
|
|
1105
|
-
private
|
|
1106
|
-
private
|
|
1107
|
-
private
|
|
1108
|
-
private
|
|
1109
|
-
private
|
|
1110
|
-
private
|
|
1111
|
-
private
|
|
1112
|
-
private get
|
|
1057
|
+
private _selectedList;
|
|
1058
|
+
private _isSelectionReady;
|
|
1059
|
+
private _isDoneBtnEnabled;
|
|
1060
|
+
private _couldSelectAll;
|
|
1061
|
+
private _couldDeselectAll;
|
|
1062
|
+
private _showSelectionStatus;
|
|
1063
|
+
private _showDoneBtn;
|
|
1064
|
+
private _doneBtnTextClass;
|
|
1065
|
+
private _toolbarVisible;
|
|
1066
|
+
private get _counterText();
|
|
1113
1067
|
get activityParams(): ActivityParams;
|
|
1114
1068
|
initCallback(): void;
|
|
1115
|
-
private
|
|
1116
|
-
private
|
|
1117
|
-
private
|
|
1118
|
-
private
|
|
1119
|
-
private
|
|
1120
|
-
private
|
|
1121
|
-
private
|
|
1122
|
-
private
|
|
1069
|
+
private _extractUrlFromSelectedFile;
|
|
1070
|
+
private _handleToolbarStateChange;
|
|
1071
|
+
private _handleSelectedFilesChange;
|
|
1072
|
+
private _handleIframeLoad;
|
|
1073
|
+
private _applyTheme;
|
|
1074
|
+
private _applyEmbedCss;
|
|
1075
|
+
private _setupL10n;
|
|
1076
|
+
private _remoteUrl;
|
|
1123
1077
|
private _handleDone;
|
|
1124
1078
|
private _handleCancel;
|
|
1125
1079
|
private _handleSelectAll;
|
|
1126
1080
|
private _handleDeselectAll;
|
|
1127
1081
|
private _setSelectionSummary;
|
|
1128
|
-
private
|
|
1129
|
-
private
|
|
1130
|
-
private
|
|
1082
|
+
private _mountIframe;
|
|
1083
|
+
private _unmountIframe;
|
|
1084
|
+
private _resetSelectionStatus;
|
|
1085
|
+
disconnectedCallback(): void;
|
|
1131
1086
|
render(): lit_html.TemplateResult<1>;
|
|
1132
1087
|
}
|
|
1133
1088
|
|
|
@@ -1146,9 +1101,7 @@ declare class LitActivityBlock extends LitBlock {
|
|
|
1146
1101
|
'*historyBack': null;
|
|
1147
1102
|
'*closeModal': () => void;
|
|
1148
1103
|
};
|
|
1149
|
-
_debouncedHistoryFlush
|
|
1150
|
-
cancel: () => void;
|
|
1151
|
-
};
|
|
1104
|
+
private _debouncedHistoryFlush;
|
|
1152
1105
|
private _deactivate;
|
|
1153
1106
|
private _activate;
|
|
1154
1107
|
initCallback(): void;
|
|
@@ -1164,16 +1117,15 @@ declare class LitActivityBlock extends LitBlock {
|
|
|
1164
1117
|
CLOUD_IMG_EDIT: 'cloud-image-edit';
|
|
1165
1118
|
EXTERNAL: 'external';
|
|
1166
1119
|
}>;
|
|
1167
|
-
get isActivityActive(): boolean;
|
|
1120
|
+
protected get isActivityActive(): boolean;
|
|
1168
1121
|
get couldOpenActivity(): boolean;
|
|
1169
1122
|
/** TODO: remove name argument */
|
|
1170
|
-
registerActivity(_name: string, options?: {
|
|
1123
|
+
protected registerActivity(_name: string, options?: {
|
|
1171
1124
|
onActivate?: () => void;
|
|
1172
1125
|
onDeactivate?: () => void;
|
|
1173
1126
|
}): void;
|
|
1174
|
-
|
|
1127
|
+
private _unregisterActivity;
|
|
1175
1128
|
disconnectedCallback(): void;
|
|
1176
|
-
get activityKey(): string;
|
|
1177
1129
|
get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
|
|
1178
1130
|
get initActivity(): string | null;
|
|
1179
1131
|
get doneActivity(): string | null;
|
|
@@ -1242,8 +1194,7 @@ declare class EventEmitter {
|
|
|
1242
1194
|
private _targets;
|
|
1243
1195
|
private _debugPrint;
|
|
1244
1196
|
constructor(debugPrint: (...args: unknown[]) => void);
|
|
1245
|
-
bindTarget(target: LitBlock): void;
|
|
1246
|
-
unbindTarget(target: LitBlock): void;
|
|
1197
|
+
bindTarget(target: LitBlock): () => void;
|
|
1247
1198
|
private _dispatch;
|
|
1248
1199
|
emit<T extends EventKey, TDebounce extends boolean | number | undefined = undefined>(type: T, payload?: TDebounce extends false | undefined ? EventPayload[T] : () => EventPayload[T], options?: {
|
|
1249
1200
|
debounce?: TDebounce;
|
|
@@ -1259,87 +1210,210 @@ type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> &
|
|
|
1259
1210
|
modalId?: string;
|
|
1260
1211
|
eventType?: CommonEventType;
|
|
1261
1212
|
};
|
|
1262
|
-
|
|
1263
|
-
private readonly _sessionId;
|
|
1264
|
-
private readonly _telemetryInstance;
|
|
1265
|
-
private readonly _block;
|
|
1266
|
-
private _config;
|
|
1267
|
-
private _initialized;
|
|
1268
|
-
private _lastPayload;
|
|
1269
|
-
private readonly _queue;
|
|
1270
|
-
constructor(block: LitBlock);
|
|
1271
|
-
private _init;
|
|
1272
|
-
private _setConfig;
|
|
1273
|
-
private _formattingPayload;
|
|
1274
|
-
private _excludedEvents;
|
|
1213
|
+
interface ITelemetryManager {
|
|
1275
1214
|
sendEvent(body: TelemetryEventBody): void;
|
|
1276
1215
|
sendEventError(error: unknown, context?: string): void;
|
|
1277
|
-
/**
|
|
1278
|
-
* Method to send telemetry event for Cloud Image Editor.
|
|
1279
|
-
*/
|
|
1280
1216
|
sendEventCloudImageEditor(e: MouseEvent, tabId: string, options?: Record<string, unknown>): void;
|
|
1281
|
-
/**
|
|
1282
|
-
* Deeply compares two objects and returns true if they are equal, false otherwise.
|
|
1283
|
-
*/
|
|
1284
|
-
private _checkObj;
|
|
1285
|
-
private get _timestamp();
|
|
1286
|
-
private get _solution();
|
|
1287
|
-
private get _activity();
|
|
1288
|
-
private get _location();
|
|
1289
1217
|
}
|
|
1290
1218
|
|
|
1291
|
-
declare const
|
|
1219
|
+
declare const TabId: Readonly<{
|
|
1220
|
+
readonly CROP: "crop";
|
|
1221
|
+
readonly TUNING: "tuning";
|
|
1222
|
+
readonly FILTERS: "filters";
|
|
1223
|
+
}>;
|
|
1224
|
+
type TabIdValue$1 = (typeof TabId)[keyof typeof TabId];
|
|
1225
|
+
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
1226
|
+
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
1227
|
+
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"];
|
|
1228
|
+
type FilterId = (typeof ALL_FILTERS)[number];
|
|
1229
|
+
declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
1230
|
+
type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
1231
|
+
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
1232
|
+
declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
1233
|
+
brightness: {
|
|
1234
|
+
zero: number;
|
|
1235
|
+
range: readonly [-100, 100];
|
|
1236
|
+
keypointsNumber: number;
|
|
1237
|
+
};
|
|
1238
|
+
exposure: {
|
|
1239
|
+
zero: number;
|
|
1240
|
+
range: readonly [-500, 500];
|
|
1241
|
+
keypointsNumber: number;
|
|
1242
|
+
};
|
|
1243
|
+
gamma: {
|
|
1244
|
+
zero: number;
|
|
1245
|
+
range: readonly [0, 1000];
|
|
1246
|
+
keypointsNumber: number;
|
|
1247
|
+
};
|
|
1248
|
+
contrast: {
|
|
1249
|
+
zero: number;
|
|
1250
|
+
range: readonly [-100, 500];
|
|
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
|
+
}>;
|
|
1279
|
+
|
|
1280
|
+
type SharedConfigState = {
|
|
1281
|
+
[K in keyof ConfigType as `*cfg/${K}`]: ConfigType[K];
|
|
1282
|
+
};
|
|
1283
|
+
type BlocksRegistry = Set<LitBlock>;
|
|
1284
|
+
type ActivityBlockCtxState = {
|
|
1285
|
+
'*currentActivity': string | null;
|
|
1286
|
+
'*currentActivityParams': Record<string, unknown>;
|
|
1287
|
+
'*history': (string | null)[];
|
|
1288
|
+
'*historyBack': (() => void) | null;
|
|
1289
|
+
'*closeModal': () => void;
|
|
1290
|
+
};
|
|
1291
|
+
type UploaderBlockCtxState = ActivityBlockCtxState & {
|
|
1292
|
+
'*commonProgress': number;
|
|
1293
|
+
'*uploadList': {
|
|
1294
|
+
uid: Uid;
|
|
1295
|
+
}[];
|
|
1296
|
+
'*uploadQueue': Queue;
|
|
1297
|
+
'*collectionErrors': OutputErrorCollection[];
|
|
1298
|
+
'*collectionState': OutputCollectionState | null;
|
|
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;
|
|
1372
|
+
|
|
1373
|
+
declare const LitBlockBase: typeof LitElement & Constructor<{
|
|
1374
|
+
willYield: boolean;
|
|
1292
1375
|
yield(slot: string, defaultContent?: unknown): unknown;
|
|
1293
|
-
}> & Constructor
|
|
1376
|
+
}> & Constructor<{
|
|
1294
1377
|
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
1295
|
-
}> & Constructor
|
|
1296
|
-
$: {
|
|
1297
|
-
[x: string]: any;
|
|
1298
|
-
};
|
|
1299
|
-
sub<T = unknown>(key: string, callback: (value: T) => void, init?: boolean): () => void;
|
|
1300
|
-
pub(key: string, value: unknown): void;
|
|
1301
|
-
set$(obj: {
|
|
1302
|
-
[x: string]: any;
|
|
1303
|
-
}): void;
|
|
1304
|
-
has(key: string): boolean;
|
|
1305
|
-
add(key: string, val: unknown, rewrite?: boolean): void;
|
|
1306
|
-
add$(obj: {
|
|
1307
|
-
[x: string]: any;
|
|
1308
|
-
}, rewrite?: boolean): void;
|
|
1309
|
-
initCallback(): void;
|
|
1310
|
-
sharedCtx: PubSub<Record<string, unknown>>;
|
|
1311
|
-
ctxName: string;
|
|
1312
|
-
}> & Constructor$1<LitElement> & {
|
|
1378
|
+
}> & Constructor<SymbioteComponent<SharedState>> & Constructor<LitElement> & {
|
|
1313
1379
|
reg(tagName: string): void;
|
|
1314
1380
|
};
|
|
1315
1381
|
declare class LitBlock extends LitBlockBase {
|
|
1316
|
-
private
|
|
1382
|
+
private _cfgProxy;
|
|
1383
|
+
private _sharedContextInstances;
|
|
1317
1384
|
static styleAttrs: string[];
|
|
1318
1385
|
activityType: ActivityType;
|
|
1319
1386
|
init$: {};
|
|
1320
1387
|
constructor();
|
|
1321
1388
|
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
1322
|
-
private
|
|
1389
|
+
private _pluralize;
|
|
1323
1390
|
emit(type: Parameters<EventEmitter['emit']>[0], payload?: Parameters<EventEmitter['emit']>[1], options?: Parameters<EventEmitter['emit']>[2]): void;
|
|
1324
1391
|
hasBlockInCtx(callback: (block: LitBlock) => boolean): boolean;
|
|
1325
|
-
setOrAddState(prop: string, newVal: unknown): void;
|
|
1326
1392
|
connectedCallback(): void;
|
|
1327
1393
|
initCallback(): void;
|
|
1328
1394
|
get testId(): string;
|
|
1329
|
-
get modalManager(): ModalManager |
|
|
1330
|
-
get telemetryManager():
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
protected get localeManager(): LocaleManager | null;
|
|
1336
|
-
protected get a11y(): A11y | null;
|
|
1337
|
-
protected get blocksRegistry(): Set<LitBlock>;
|
|
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;
|
|
1338
1401
|
disconnectedCallback(): void;
|
|
1339
1402
|
/**
|
|
1340
1403
|
* Called when the last block is removed from the context. Note that inheritors must run their callback before that.
|
|
1341
1404
|
*/
|
|
1342
1405
|
protected destroyCtxCallback(): void;
|
|
1406
|
+
/**
|
|
1407
|
+
* Adds a shared context instance if it does not exist yet.
|
|
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.
|
|
1411
|
+
*/
|
|
1412
|
+
protected addSharedContextInstance<TKey extends keyof SharedState>(key: TKey, resolver: () => SharedState[TKey], { persist }?: {
|
|
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];
|
|
1343
1417
|
protected proxyUrl(url: string): Promise<string>;
|
|
1344
1418
|
get cfg(): ConfigType;
|
|
1345
1419
|
subConfigValue<T extends keyof ConfigType>(key: T, callback: (value: ConfigType[T]) => void): () => void;
|
|
@@ -1349,15 +1423,13 @@ declare class LitBlock extends LitBlockBase {
|
|
|
1349
1423
|
declare class Modal extends LitBlock {
|
|
1350
1424
|
static styleAttrs: string[];
|
|
1351
1425
|
private _mouseDownTarget;
|
|
1426
|
+
/** WARNING: Do not rename/change this, it's used in dashboard */
|
|
1352
1427
|
protected dialogEl: lit_html_directives_ref_js.Ref<HTMLDialogElement>;
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
_handleDialogClose: () => void;
|
|
1359
|
-
_handleDialogMouseDown: (e: MouseEvent) => void;
|
|
1360
|
-
_handleDialogMouseUp: (e: MouseEvent) => void;
|
|
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;
|
|
1361
1433
|
show(): void;
|
|
1362
1434
|
hide(): void;
|
|
1363
1435
|
private _handleModalOpen;
|
|
@@ -1365,7 +1437,7 @@ declare class Modal extends LitBlock {
|
|
|
1365
1437
|
private _handleModalCloseAll;
|
|
1366
1438
|
initCallback(): void;
|
|
1367
1439
|
disconnectedCallback(): void;
|
|
1368
|
-
private
|
|
1440
|
+
private _handleDialogRef;
|
|
1369
1441
|
render(): lit_html.TemplateResult<1>;
|
|
1370
1442
|
}
|
|
1371
1443
|
|
|
@@ -1423,103 +1495,357 @@ declare class ModalManager {
|
|
|
1423
1495
|
destroy(): void;
|
|
1424
1496
|
}
|
|
1425
1497
|
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
declare function initState(fnCtx: CloudImageEditorBlock): {
|
|
1430
|
-
'*originalUrl': null;
|
|
1431
|
-
'*loadingOperations': LoadingOperations;
|
|
1432
|
-
'*faderEl': null;
|
|
1433
|
-
'*cropperEl': null;
|
|
1434
|
-
'*imgEl': null;
|
|
1435
|
-
'*imgContainerEl': null;
|
|
1436
|
-
'*networkProblems': boolean;
|
|
1437
|
-
'*imageSize': null;
|
|
1438
|
-
'*editorTransformations': {};
|
|
1439
|
-
'*cropPresetList': never[];
|
|
1440
|
-
'*currentAspectRatio': null;
|
|
1441
|
-
'*tabList': readonly ["crop", "tuning", "filters"];
|
|
1442
|
-
'*tabId': "crop";
|
|
1443
|
-
'*on.retryNetwork': () => void;
|
|
1444
|
-
'*on.apply': (transformations: Transformations) => void;
|
|
1445
|
-
'*on.cancel': () => void;
|
|
1446
|
-
};
|
|
1498
|
+
type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
|
|
1499
|
+
declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
|
|
1447
1500
|
|
|
1448
|
-
declare class
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
extension: string | null;
|
|
1453
|
-
editorMode: boolean;
|
|
1454
|
-
modalCaption: string;
|
|
1455
|
-
isImage: boolean;
|
|
1456
|
-
msg: string;
|
|
1457
|
-
src: string;
|
|
1458
|
-
fileType: string;
|
|
1459
|
-
showLoader: boolean;
|
|
1460
|
-
uuid: string | null;
|
|
1461
|
-
cdnUrl: string | null;
|
|
1462
|
-
cropPreset: string;
|
|
1463
|
-
tabs: string | null;
|
|
1464
|
-
presenceNetworkProblems: boolean;
|
|
1465
|
-
presenceModalCaption: boolean;
|
|
1466
|
-
presenceEditorToolbar: boolean;
|
|
1467
|
-
presenceViewerToolbar: boolean;
|
|
1468
|
-
private isInitialized;
|
|
1469
|
-
private pendingInitUpdate;
|
|
1470
|
-
private readonly _debouncedShowLoader;
|
|
1471
|
-
private readonly imgRef;
|
|
1472
|
-
private readonly cropperRef;
|
|
1473
|
-
private readonly faderRef;
|
|
1474
|
-
private readonly imgContainerRef;
|
|
1475
|
-
private readonly handleImageLoad;
|
|
1476
|
-
private readonly handleImageError;
|
|
1477
|
-
private readonly handleRetryNetwork;
|
|
1478
|
-
private scheduleInitialization;
|
|
1479
|
-
init$: ReturnType<typeof initState>;
|
|
1501
|
+
declare class Icon extends LitBlock {
|
|
1502
|
+
name: string;
|
|
1503
|
+
private _resolvedHref;
|
|
1504
|
+
private _iconHrefResolver;
|
|
1480
1505
|
initCallback(): void;
|
|
1481
|
-
|
|
1482
|
-
private
|
|
1483
|
-
private detachImageListeners;
|
|
1484
|
-
private get imageClassName();
|
|
1485
|
-
/**
|
|
1486
|
-
* To proper work, we need non-zero size the element. So, we'll wait for it.
|
|
1487
|
-
*/
|
|
1488
|
-
private _waitForSize;
|
|
1489
|
-
firstUpdated(_changedProperties: Map<PropertyKey, unknown>): void;
|
|
1490
|
-
disconnectedCallback(): void;
|
|
1506
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1507
|
+
private _updateResolvedHref;
|
|
1491
1508
|
render(): lit_html.TemplateResult<1>;
|
|
1492
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1493
|
-
private syncTabListFromProp;
|
|
1494
|
-
private syncCropPresetState;
|
|
1495
|
-
updateImage(): Promise<void>;
|
|
1496
|
-
initEditor(): Promise<void>;
|
|
1497
1509
|
}
|
|
1498
1510
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
private
|
|
1507
|
-
private
|
|
1508
|
-
private
|
|
1509
|
-
private
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
private
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1511
|
+
type CssPropValue = string | number | undefined | null;
|
|
1512
|
+
declare const ImgConfig_base: typeof LitElement & Constructor<LitElement> & {
|
|
1513
|
+
reg(tagName: string): void;
|
|
1514
|
+
} & Constructor<{
|
|
1515
|
+
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
1516
|
+
}>;
|
|
1517
|
+
declare class ImgConfig extends ImgConfig_base {
|
|
1518
|
+
private _state;
|
|
1519
|
+
private _subscribers;
|
|
1520
|
+
private _isnObserver;
|
|
1521
|
+
private _observed;
|
|
1522
|
+
createRenderRoot(): HTMLElement | ShadowRoot;
|
|
1523
|
+
constructor();
|
|
1524
|
+
protected $$(key: string): unknown;
|
|
1525
|
+
protected set$$(kvObj: Record<string, CssPropValue>): void;
|
|
1526
|
+
protected sub$$<T = unknown>(key: string, kbFn: (val: T) => void): void;
|
|
1527
|
+
private _notify;
|
|
1528
|
+
protected analyticsParams(): string;
|
|
1529
|
+
protected initAttributes(el: HTMLElement): void;
|
|
1530
|
+
protected initIntersection(el: HTMLElement, cbkFn: () => void): void;
|
|
1531
|
+
connectedCallback(): void;
|
|
1532
|
+
private _initCssProperties;
|
|
1533
|
+
disconnectedCallback(): void;
|
|
1534
|
+
static get observedAttributes(): string[];
|
|
1535
|
+
attributeChangedCallback(name: string, _oldVal: string | null, newVal: string | null): void;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
declare class ImgBase extends ImgConfig {
|
|
1539
|
+
private _img;
|
|
1540
|
+
private _imgPreview;
|
|
1541
|
+
private _fmtAbs;
|
|
1542
|
+
private _validateSize;
|
|
1543
|
+
private _getCdnModifiers;
|
|
1544
|
+
private _getTypedCssValue;
|
|
1545
|
+
private _getUrlBase;
|
|
1546
|
+
private _proxyUrl;
|
|
1547
|
+
protected _getElSize(el: HTMLElement, k?: number, wOnly?: boolean): string | null;
|
|
1548
|
+
private _setupEventProxy;
|
|
1549
|
+
protected get img(): HTMLImageElement;
|
|
1550
|
+
private get _currentImg();
|
|
1551
|
+
private get _hasPreviewImage();
|
|
1552
|
+
private get _bgSelector();
|
|
1553
|
+
private get _breakpoints();
|
|
1554
|
+
private get _hasFormatJPG();
|
|
1555
|
+
private _renderBg;
|
|
1556
|
+
private _getSrcset;
|
|
1557
|
+
private _getSrc;
|
|
1558
|
+
private get _srcUrlPreview();
|
|
1559
|
+
private _renderBackground;
|
|
1560
|
+
private _appendURL;
|
|
1561
|
+
private _setupConfigForImage;
|
|
1562
|
+
private _loaderImage;
|
|
1563
|
+
private _renderImage;
|
|
1564
|
+
protected init(): void;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
declare class Img extends ImgBase {
|
|
1568
|
+
attributesMeta: {
|
|
1569
|
+
src: string;
|
|
1570
|
+
} | {
|
|
1571
|
+
uuid: string;
|
|
1572
|
+
};
|
|
1573
|
+
connectedCallback(): void;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
declare class FormInput extends LitUploaderBlock {
|
|
1577
|
+
propertiesMeta: {
|
|
1578
|
+
'ctx-name': string;
|
|
1579
|
+
};
|
|
1580
|
+
private _validationInputElement;
|
|
1581
|
+
private _dynamicInputsContainer;
|
|
1582
|
+
private _createValidationInput;
|
|
1583
|
+
initCallback(): void;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
declare class Copyright extends LitBlock {
|
|
1587
|
+
initCallback(): void;
|
|
1588
|
+
render(): lit_html.TemplateResult<1>;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
declare class ProgressBar extends LitBlock {
|
|
1592
|
+
value: number;
|
|
1593
|
+
visible: boolean;
|
|
1594
|
+
private _progressValue;
|
|
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;
|
|
1619
|
+
};
|
|
1620
|
+
declare class Select extends LitBlock {
|
|
1621
|
+
value: string;
|
|
1622
|
+
disabled: boolean;
|
|
1623
|
+
options: SelectOption[];
|
|
1624
|
+
render(): lit_html.TemplateResult<1>;
|
|
1625
|
+
private _handleChange;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
declare class SourceBtn extends LitUploaderBlock {
|
|
1629
|
+
couldBeCtxOwner: boolean;
|
|
1630
|
+
private _registeredTypes;
|
|
1631
|
+
type?: string;
|
|
1632
|
+
private _iconName;
|
|
1633
|
+
private _srcTypeKey;
|
|
1634
|
+
private _initTypes;
|
|
1635
|
+
initCallback(): void;
|
|
1636
|
+
private _registerType;
|
|
1637
|
+
activate(): void;
|
|
1638
|
+
private _applyType;
|
|
1639
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1640
|
+
render(): lit_html.TemplateResult<1>;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
declare class SourceList extends LitBlock {
|
|
1644
|
+
private _rawSourceList;
|
|
1645
|
+
private _cameraModes;
|
|
1646
|
+
initCallback(): void;
|
|
1647
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1648
|
+
private _updateSources;
|
|
1649
|
+
private _sources;
|
|
1650
|
+
render(): lit_html.TemplateResult<1>;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
declare class Spinner extends LitBlock {
|
|
1654
|
+
render(): lit_html.TemplateResult<1>;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
declare class FileItemConfig extends LitUploaderBlock {
|
|
1658
|
+
private _entrySubs;
|
|
1659
|
+
protected entry: UploadEntryTypedData | null;
|
|
1660
|
+
protected withEntry<A extends unknown[], R>(fn: (entry: UploadEntryTypedData, ...args: A) => R): (...args: A) => R | undefined;
|
|
1661
|
+
protected subEntry<K extends UploadEntryKeys>(prop: K, handler: (value: UploadEntryData[K]) => void): void;
|
|
1662
|
+
protected reset(): void;
|
|
1663
|
+
disconnectedCallback(): void;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
declare class Thumb extends FileItemConfig {
|
|
1667
|
+
badgeIcon: string;
|
|
1668
|
+
uid: Uid;
|
|
1669
|
+
private _thumbUrl;
|
|
1670
|
+
private _renderedGridOnce;
|
|
1671
|
+
private _thumbRect;
|
|
1672
|
+
private _isIntersecting;
|
|
1673
|
+
private _firstViewMode;
|
|
1674
|
+
private _observer?;
|
|
1675
|
+
private _pendingThumbUpdate?;
|
|
1676
|
+
private _calculateThumbSize;
|
|
1677
|
+
private _generateThumbnail;
|
|
1678
|
+
private _debouncedGenerateThumb;
|
|
1679
|
+
private _decodeImage;
|
|
1680
|
+
private _cancelPendingThumbUpdate;
|
|
1681
|
+
private _scheduleThumbUpdate;
|
|
1682
|
+
private _requestThumbGeneration;
|
|
1683
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1684
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1685
|
+
private _observerCallback;
|
|
1686
|
+
protected reset(): void;
|
|
1687
|
+
private _bindToEntry;
|
|
1688
|
+
initCallback(): void;
|
|
1689
|
+
connectedCallback(): void;
|
|
1690
|
+
disconnectedCallback(): void;
|
|
1691
|
+
render(): lit_html.TemplateResult<1>;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
declare class ActivityHeader extends LitActivityBlock {
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
declare class StartFrom extends LitActivityBlock {
|
|
1698
|
+
protected historyTracked: boolean;
|
|
1699
|
+
activityType: ActivityType;
|
|
1700
|
+
initCallback(): void;
|
|
1701
|
+
render(): lit_html.TemplateResult<1>;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
type EventListenerMap = {
|
|
1705
|
+
[K in (typeof EventType)[keyof typeof EventType]]: (e: CustomEvent<EventPayload[K]>) => void;
|
|
1706
|
+
};
|
|
1707
|
+
declare class UploadCtxProvider extends LitUploaderBlock {
|
|
1708
|
+
propertiesMeta: {
|
|
1709
|
+
'ctx-name': string;
|
|
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;
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
declare class CloudImageEditorBlock extends LitBlock {
|
|
1772
|
+
attributesMeta: ({
|
|
1773
|
+
uuid: string;
|
|
1774
|
+
} | {
|
|
1775
|
+
'cdn-url': string;
|
|
1776
|
+
}) & Partial<{
|
|
1777
|
+
tabs: string;
|
|
1778
|
+
'crop-preset': string;
|
|
1779
|
+
}> & {
|
|
1780
|
+
'ctx-name': string;
|
|
1781
|
+
};
|
|
1782
|
+
ctxOwner: boolean;
|
|
1783
|
+
static styleAttrs: string[];
|
|
1784
|
+
private _statusMessage;
|
|
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();
|
|
1810
|
+
/**
|
|
1811
|
+
* To proper work, we need non-zero size the element. So, we'll wait for it.
|
|
1812
|
+
*/
|
|
1813
|
+
private _waitForSize;
|
|
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;
|
|
1846
|
+
/**
|
|
1847
|
+
* @private Super Tricky workaround for the chromium bug See
|
|
1848
|
+
* https://bugs.chromium.org/p/chromium/issues/detail?id=330815
|
|
1523
1849
|
*/
|
|
1524
1850
|
private _resizeBackdrop;
|
|
1525
1851
|
private _updateBackdrop;
|
|
@@ -1539,7 +1865,7 @@ declare class CropFrame extends LitBlock {
|
|
|
1539
1865
|
private _render;
|
|
1540
1866
|
toggleThumbs(visible: boolean): void;
|
|
1541
1867
|
initCallback(): void;
|
|
1542
|
-
protected firstUpdated(
|
|
1868
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1543
1869
|
private _initializeSvg;
|
|
1544
1870
|
disconnectedCallback(): void;
|
|
1545
1871
|
render(): TemplateResult;
|
|
@@ -1548,97 +1874,37 @@ declare class CropFrame extends LitBlock {
|
|
|
1548
1874
|
declare class EditorButtonControl extends LitBlock {
|
|
1549
1875
|
active: boolean;
|
|
1550
1876
|
title: string;
|
|
1551
|
-
icon: string;
|
|
1552
|
-
titleProp: string;
|
|
1877
|
+
protected icon: string;
|
|
1878
|
+
protected titleProp: string;
|
|
1553
1879
|
protected get buttonClasses(): Record<string, boolean>;
|
|
1554
|
-
private
|
|
1880
|
+
private _updateHostStateClasses;
|
|
1555
1881
|
protected onClick(_event: MouseEvent): void;
|
|
1556
1882
|
connectedCallback(): void;
|
|
1557
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
1883
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1558
1884
|
render(): lit_html.TemplateResult<1>;
|
|
1559
1885
|
}
|
|
1560
1886
|
|
|
1561
1887
|
declare class EditorFreeformButtonControl extends EditorButtonControl {
|
|
1562
1888
|
initCallback(): void;
|
|
1563
1889
|
onClick(): void;
|
|
1564
|
-
private
|
|
1890
|
+
private _computeTitle;
|
|
1565
1891
|
render(): lit_html.TemplateResult<1>;
|
|
1566
1892
|
}
|
|
1567
1893
|
declare class EditorAspectRatioButtonControl extends EditorButtonControl {
|
|
1568
|
-
private _aspectRatio
|
|
1569
|
-
get aspectRatio(): CropAspectRatio |
|
|
1570
|
-
set aspectRatio(value: CropAspectRatio |
|
|
1894
|
+
private _aspectRatio;
|
|
1895
|
+
get aspectRatio(): CropAspectRatio | null;
|
|
1896
|
+
set aspectRatio(value: CropAspectRatio | null);
|
|
1571
1897
|
initCallback(): void;
|
|
1572
|
-
onClick(): void;
|
|
1573
|
-
private
|
|
1574
|
-
private
|
|
1898
|
+
protected onClick(): void;
|
|
1899
|
+
private _updateAspectRatioPresentation;
|
|
1900
|
+
private _renderIcon;
|
|
1575
1901
|
render(): lit_html.TemplateResult<1>;
|
|
1576
1902
|
}
|
|
1577
1903
|
|
|
1578
|
-
declare const TabId: Readonly<{
|
|
1579
|
-
readonly CROP: "crop";
|
|
1580
|
-
readonly TUNING: "tuning";
|
|
1581
|
-
readonly FILTERS: "filters";
|
|
1582
|
-
}>;
|
|
1583
|
-
declare const ALL_COLOR_OPERATIONS: readonly ["brightness", "exposure", "gamma", "contrast", "saturation", "vibrance", "warmth", "enhance"];
|
|
1584
|
-
type ColorOperation = (typeof ALL_COLOR_OPERATIONS)[number];
|
|
1585
|
-
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"];
|
|
1586
|
-
type FilterId = (typeof ALL_FILTERS)[number];
|
|
1587
|
-
declare const ALL_CROP_OPERATIONS: readonly ["rotate", "mirror", "flip"];
|
|
1588
|
-
type CropOperation = (typeof ALL_CROP_OPERATIONS)[number];
|
|
1589
|
-
/** KeypointsNumber is the number of keypoints loaded from each side of zero, not total number */
|
|
1590
|
-
declare const COLOR_OPERATIONS_CONFIG: Readonly<{
|
|
1591
|
-
brightness: {
|
|
1592
|
-
zero: number;
|
|
1593
|
-
range: readonly [-100, 100];
|
|
1594
|
-
keypointsNumber: number;
|
|
1595
|
-
};
|
|
1596
|
-
exposure: {
|
|
1597
|
-
zero: number;
|
|
1598
|
-
range: readonly [-500, 500];
|
|
1599
|
-
keypointsNumber: number;
|
|
1600
|
-
};
|
|
1601
|
-
gamma: {
|
|
1602
|
-
zero: number;
|
|
1603
|
-
range: readonly [0, 1000];
|
|
1604
|
-
keypointsNumber: number;
|
|
1605
|
-
};
|
|
1606
|
-
contrast: {
|
|
1607
|
-
zero: number;
|
|
1608
|
-
range: readonly [-100, 500];
|
|
1609
|
-
keypointsNumber: number;
|
|
1610
|
-
};
|
|
1611
|
-
saturation: {
|
|
1612
|
-
zero: number;
|
|
1613
|
-
range: readonly [-100, 500];
|
|
1614
|
-
keypointsNumber: number;
|
|
1615
|
-
};
|
|
1616
|
-
vibrance: {
|
|
1617
|
-
zero: number;
|
|
1618
|
-
range: readonly [-100, 500];
|
|
1619
|
-
keypointsNumber: number;
|
|
1620
|
-
};
|
|
1621
|
-
warmth: {
|
|
1622
|
-
zero: number;
|
|
1623
|
-
range: readonly [-100, 100];
|
|
1624
|
-
keypointsNumber: number;
|
|
1625
|
-
};
|
|
1626
|
-
enhance: {
|
|
1627
|
-
zero: number;
|
|
1628
|
-
range: readonly [0, 100];
|
|
1629
|
-
keypointsNumber: number;
|
|
1630
|
-
};
|
|
1631
|
-
filter: {
|
|
1632
|
-
zero: number;
|
|
1633
|
-
range: readonly [0, 100];
|
|
1634
|
-
keypointsNumber: number;
|
|
1635
|
-
};
|
|
1636
|
-
}>;
|
|
1637
|
-
|
|
1638
1904
|
declare class EditorCropButtonControl extends EditorButtonControl {
|
|
1639
1905
|
operation: CropOperation | undefined;
|
|
1640
|
-
protected willUpdate(
|
|
1641
|
-
onClick(e: MouseEvent): void;
|
|
1906
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1907
|
+
protected onClick(e: MouseEvent): void;
|
|
1642
1908
|
}
|
|
1643
1909
|
|
|
1644
1910
|
declare class EditorFilterControl extends EditorButtonControl {
|
|
@@ -1648,12 +1914,12 @@ declare class EditorFilterControl extends EditorButtonControl {
|
|
|
1648
1914
|
private _observer?;
|
|
1649
1915
|
private _cancelPreload?;
|
|
1650
1916
|
private _lastPreviewRequestId;
|
|
1651
|
-
private
|
|
1652
|
-
private
|
|
1653
|
-
private
|
|
1654
|
-
private
|
|
1917
|
+
private _previewVisibilityCheckRaf?;
|
|
1918
|
+
private _previewVisibilityCheckTimeout?;
|
|
1919
|
+
private _previewImage;
|
|
1920
|
+
private _previewLoaded;
|
|
1655
1921
|
isOriginal: boolean;
|
|
1656
|
-
|
|
1922
|
+
private _iconSize;
|
|
1657
1923
|
get filter(): string;
|
|
1658
1924
|
set filter(value: string);
|
|
1659
1925
|
onClick(e: MouseEvent): void;
|
|
@@ -1662,11 +1928,11 @@ declare class EditorFilterControl extends EditorButtonControl {
|
|
|
1662
1928
|
initCallback(): void;
|
|
1663
1929
|
disconnectedCallback(): void;
|
|
1664
1930
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1665
|
-
private
|
|
1666
|
-
private
|
|
1667
|
-
private
|
|
1668
|
-
private
|
|
1669
|
-
private get
|
|
1931
|
+
private _updateFilterLabels;
|
|
1932
|
+
private _loadPreview;
|
|
1933
|
+
private _schedulePreviewVisibilityCheck;
|
|
1934
|
+
private _clearPreviewVisibilityChecks;
|
|
1935
|
+
private get _shouldShowPreview();
|
|
1670
1936
|
render(): lit_html.TemplateResult<1>;
|
|
1671
1937
|
}
|
|
1672
1938
|
|
|
@@ -1686,10 +1952,10 @@ declare class EditorImageCropper extends LitBlock {
|
|
|
1686
1952
|
private _observer?;
|
|
1687
1953
|
private _image;
|
|
1688
1954
|
private _cancelPreload?;
|
|
1689
|
-
private readonly
|
|
1690
|
-
private readonly
|
|
1955
|
+
private readonly _canvasRef;
|
|
1956
|
+
private readonly _frameRef;
|
|
1691
1957
|
constructor();
|
|
1692
|
-
protected firstUpdated(
|
|
1958
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1693
1959
|
private _syncTransformations;
|
|
1694
1960
|
private _initCanvas;
|
|
1695
1961
|
private _alignImage;
|
|
@@ -1776,13 +2042,13 @@ declare class EditorOperationControl extends EditorButtonControl {
|
|
|
1776
2042
|
private _operation;
|
|
1777
2043
|
get operation(): ColorOperation | '';
|
|
1778
2044
|
set operation(value: ColorOperation | '');
|
|
1779
|
-
private
|
|
2045
|
+
private _updateOperationMetadata;
|
|
1780
2046
|
initCallback(): void;
|
|
1781
|
-
onClick(e: MouseEvent): void;
|
|
2047
|
+
protected onClick(e: MouseEvent): void;
|
|
1782
2048
|
}
|
|
1783
2049
|
|
|
1784
2050
|
declare class EditorScroller extends LitBlock {
|
|
1785
|
-
private readonly
|
|
2051
|
+
private readonly _handleWheel;
|
|
1786
2052
|
connectedCallback(): void;
|
|
1787
2053
|
disconnectedCallback(): void;
|
|
1788
2054
|
}
|
|
@@ -1791,76 +2057,83 @@ type SliderOperation = ColorOperation | 'filter';
|
|
|
1791
2057
|
type SliderFilter = FilterId | typeof FAKE_ORIGINAL_FILTER;
|
|
1792
2058
|
declare const FAKE_ORIGINAL_FILTER = "original";
|
|
1793
2059
|
declare class EditorSlider extends LitBlock {
|
|
1794
|
-
|
|
1795
|
-
|
|
2060
|
+
state: {
|
|
2061
|
+
operation: SliderOperation;
|
|
2062
|
+
filter: SliderFilter | undefined;
|
|
2063
|
+
originalUrl: string;
|
|
2064
|
+
disabled: boolean;
|
|
2065
|
+
min: number;
|
|
2066
|
+
max: number;
|
|
1796
2067
|
value: number;
|
|
1797
|
-
|
|
2068
|
+
defaultValue: number;
|
|
2069
|
+
zero: number;
|
|
2070
|
+
};
|
|
2071
|
+
private _handleInput;
|
|
1798
2072
|
setOperation(operation: SliderOperation, filter?: SliderFilter): void;
|
|
1799
2073
|
private _initializeValues;
|
|
1800
2074
|
apply(): void;
|
|
1801
2075
|
cancel(): void;
|
|
1802
2076
|
initCallback(): void;
|
|
1803
|
-
protected updated(changedProperties:
|
|
2077
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1804
2078
|
render(): lit_html.TemplateResult<1>;
|
|
1805
2079
|
}
|
|
1806
2080
|
|
|
1807
2081
|
type TabIdValue = (typeof TabId)[keyof typeof TabId];
|
|
1808
2082
|
declare class EditorToolbar extends LitBlock {
|
|
1809
|
-
private
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
private
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
private
|
|
1816
|
-
private
|
|
1817
|
-
private
|
|
1818
|
-
private
|
|
1819
|
-
private
|
|
1820
|
-
private readonly
|
|
1821
|
-
private readonly
|
|
2083
|
+
private _showLoader;
|
|
2084
|
+
showMainToolbar: boolean;
|
|
2085
|
+
showSubToolbar: boolean;
|
|
2086
|
+
private _showTabToggles;
|
|
2087
|
+
tabList: readonly TabIdValue[];
|
|
2088
|
+
activeTab: TabIdValue;
|
|
2089
|
+
private _useSliderPanel;
|
|
2090
|
+
private _tooltipVisible;
|
|
2091
|
+
private _operationTooltip;
|
|
2092
|
+
private _tabIndicatorOffset;
|
|
2093
|
+
private _tabIndicatorWidth;
|
|
2094
|
+
private readonly _sliderRef;
|
|
2095
|
+
private readonly _tabIndicatorRef;
|
|
1822
2096
|
protected readonly tabToggleRefs: Record<TabIdValue, Ref<HTMLElement>>;
|
|
1823
|
-
private readonly
|
|
1824
|
-
private
|
|
2097
|
+
private readonly _handleWindowResize;
|
|
2098
|
+
private _cropPresets;
|
|
1825
2099
|
private _cancelPreload?;
|
|
1826
2100
|
private readonly _debouncedShowLoader;
|
|
1827
2101
|
private readonly _updateInfoTooltip;
|
|
1828
|
-
private readonly
|
|
1829
|
-
private readonly
|
|
1830
|
-
private readonly
|
|
1831
|
-
private readonly
|
|
1832
|
-
private readonly tabTogglesStyles;
|
|
2102
|
+
private readonly _subTopToolbarStyles;
|
|
2103
|
+
private readonly _subBottomToolbarStyles;
|
|
2104
|
+
private readonly _tabToggleStyles;
|
|
2105
|
+
private readonly _tabTogglesStyles;
|
|
1833
2106
|
init$: Record<string, unknown>;
|
|
1834
2107
|
private _onSliderClose;
|
|
1835
2108
|
private _activateTab;
|
|
1836
|
-
private
|
|
2109
|
+
private _applyTabState;
|
|
1837
2110
|
private _syncTabIndicator;
|
|
1838
|
-
private get
|
|
1839
|
-
private
|
|
1840
|
-
private
|
|
1841
|
-
private
|
|
1842
|
-
private
|
|
1843
|
-
private
|
|
1844
|
-
private
|
|
1845
|
-
private
|
|
1846
|
-
private
|
|
1847
|
-
private
|
|
1848
|
-
private
|
|
1849
|
-
private
|
|
2111
|
+
private get _hasAspectRatioPicker();
|
|
2112
|
+
private _renderControlsByTab;
|
|
2113
|
+
private _renderCropTabControls;
|
|
2114
|
+
private _renderFilterTabControls;
|
|
2115
|
+
private _renderTuningTabControls;
|
|
2116
|
+
private _renderControlGroup;
|
|
2117
|
+
private _renderFreeformControl;
|
|
2118
|
+
private _renderAspectRatioControl;
|
|
2119
|
+
private _renderCropOperationControl;
|
|
2120
|
+
private _renderFilterControl;
|
|
2121
|
+
private _renderOperationControl;
|
|
2122
|
+
private _renderAspectRatioList;
|
|
1850
2123
|
private _preloadEditedImage;
|
|
1851
2124
|
initCallback(): void;
|
|
1852
2125
|
connectedCallback(): void;
|
|
1853
|
-
firstUpdated(
|
|
1854
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
2126
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
2127
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1855
2128
|
disconnectedCallback(): void;
|
|
1856
|
-
private
|
|
1857
|
-
private
|
|
1858
|
-
private
|
|
1859
|
-
private
|
|
1860
|
-
private
|
|
1861
|
-
private
|
|
1862
|
-
private
|
|
1863
|
-
private
|
|
2129
|
+
private _assignSharedElements;
|
|
2130
|
+
private readonly _handleCancel;
|
|
2131
|
+
private readonly _handleApply;
|
|
2132
|
+
private readonly _handleApplySlider;
|
|
2133
|
+
private readonly _handleCancelSlider;
|
|
2134
|
+
private readonly _handleTabClick;
|
|
2135
|
+
private _renderTabToggle;
|
|
2136
|
+
private _renderTabContent;
|
|
1864
2137
|
render(): TemplateResult<1>;
|
|
1865
2138
|
}
|
|
1866
2139
|
|
|
@@ -1868,32 +2141,31 @@ type Theme = string | null;
|
|
|
1868
2141
|
declare class BtnUi extends LitBlock {
|
|
1869
2142
|
text: string;
|
|
1870
2143
|
icon: string;
|
|
1871
|
-
active: boolean;
|
|
1872
2144
|
reverse: boolean;
|
|
1873
2145
|
theme: Theme;
|
|
1874
2146
|
ariaRole: string;
|
|
1875
2147
|
ariaControls: string;
|
|
1876
2148
|
titleProp: string;
|
|
1877
|
-
protected firstUpdated(
|
|
2149
|
+
protected firstUpdated(changed: PropertyValues<this>): void;
|
|
1878
2150
|
protected updated(changed: PropertyValues<this>): void;
|
|
1879
|
-
private
|
|
1880
|
-
private
|
|
1881
|
-
private get
|
|
1882
|
-
private get
|
|
1883
|
-
private get
|
|
2151
|
+
private _applyReverse;
|
|
2152
|
+
private _applyThemeClass;
|
|
2153
|
+
private get _iconClassMap();
|
|
2154
|
+
private get _computedIconHidden();
|
|
2155
|
+
private get _computedIconSingle();
|
|
1884
2156
|
render(): lit_html.TemplateResult<1>;
|
|
1885
2157
|
}
|
|
1886
2158
|
|
|
1887
2159
|
declare class LineLoaderUi extends LitBlock {
|
|
1888
2160
|
active: boolean;
|
|
1889
|
-
private readonly
|
|
2161
|
+
private readonly _lineRef;
|
|
1890
2162
|
private _isAnimating;
|
|
1891
|
-
private readonly
|
|
1892
|
-
protected firstUpdated(
|
|
2163
|
+
private readonly _handleTransitionEndRight;
|
|
2164
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1893
2165
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
1894
|
-
private
|
|
1895
|
-
private
|
|
1896
|
-
private
|
|
2166
|
+
private _start;
|
|
2167
|
+
private _stop;
|
|
2168
|
+
private _resetLine;
|
|
1897
2169
|
render(): lit_html.TemplateResult<1>;
|
|
1898
2170
|
}
|
|
1899
2171
|
|
|
@@ -1908,13 +2180,13 @@ declare class PresenceToggle extends LitBlock {
|
|
|
1908
2180
|
private _visibleStyle;
|
|
1909
2181
|
private _hiddenStyle;
|
|
1910
2182
|
private _externalTransitions;
|
|
1911
|
-
private
|
|
2183
|
+
private _initialRenderComplete;
|
|
1912
2184
|
set visible(value: boolean);
|
|
1913
2185
|
get visible(): boolean;
|
|
1914
2186
|
set styles(styles: PresenceToggleStyle);
|
|
1915
2187
|
get styles(): PresenceToggleStyle;
|
|
1916
2188
|
private _handleVisible;
|
|
1917
|
-
private
|
|
2189
|
+
private _dispatchInitialRenderEvent;
|
|
1918
2190
|
initCallback(): void;
|
|
1919
2191
|
}
|
|
1920
2192
|
|
|
@@ -1923,9 +2195,9 @@ declare class SliderUi extends LitBlock {
|
|
|
1923
2195
|
private _thumbSize;
|
|
1924
2196
|
private _zeroDotEl?;
|
|
1925
2197
|
private _stepsCount?;
|
|
1926
|
-
private readonly
|
|
1927
|
-
private readonly
|
|
1928
|
-
private readonly
|
|
2198
|
+
private readonly _inputRef;
|
|
2199
|
+
private readonly _thumbRef;
|
|
2200
|
+
private readonly _stepsRef;
|
|
1929
2201
|
disabled: boolean;
|
|
1930
2202
|
min: number;
|
|
1931
2203
|
max: number;
|
|
@@ -1933,12 +2205,12 @@ declare class SliderUi extends LitBlock {
|
|
|
1933
2205
|
zero: number;
|
|
1934
2206
|
private _currentValue;
|
|
1935
2207
|
constructor();
|
|
1936
|
-
private
|
|
1937
|
-
private readonly
|
|
1938
|
-
private readonly
|
|
1939
|
-
private readonly
|
|
1940
|
-
private readonly
|
|
1941
|
-
protected firstUpdated(changedProperties:
|
|
2208
|
+
private _emitSliderEvent;
|
|
2209
|
+
private readonly _handleSliderInput;
|
|
2210
|
+
private readonly _handleSliderChange;
|
|
2211
|
+
private readonly _handleInputFocus;
|
|
2212
|
+
private readonly _handleInputBlur;
|
|
2213
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
1942
2214
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1943
2215
|
private _updateValue;
|
|
1944
2216
|
private _updateZeroDot;
|
|
@@ -1950,11 +2222,6 @@ declare class SliderUi extends LitBlock {
|
|
|
1950
2222
|
render(): lit_html.TemplateResult<1>;
|
|
1951
2223
|
}
|
|
1952
2224
|
|
|
1953
|
-
declare class Copyright extends LitBlock {
|
|
1954
|
-
initCallback(): void;
|
|
1955
|
-
render(): lit_html.TemplateResult<1>;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
2225
|
declare class DropArea extends LitUploaderBlock {
|
|
1959
2226
|
static styleAttrs: string[];
|
|
1960
2227
|
disabled: boolean;
|
|
@@ -1963,15 +2230,15 @@ declare class DropArea extends LitUploaderBlock {
|
|
|
1963
2230
|
fullscreen: boolean;
|
|
1964
2231
|
initflow: boolean;
|
|
1965
2232
|
text?: string;
|
|
1966
|
-
private
|
|
1967
|
-
private
|
|
1968
|
-
private get
|
|
2233
|
+
private _isEnabled;
|
|
2234
|
+
private _isVisible;
|
|
2235
|
+
private get _localizedText();
|
|
1969
2236
|
private _destroyDropzone;
|
|
1970
2237
|
private _destroyContentWrapperDropzone;
|
|
1971
|
-
private
|
|
1972
|
-
private readonly
|
|
1973
|
-
private
|
|
1974
|
-
private
|
|
2238
|
+
private _contentWrapperRef;
|
|
2239
|
+
private readonly _handleAreaInteraction;
|
|
2240
|
+
private _sourceListAllowsLocal;
|
|
2241
|
+
private _clickableListenersAttached;
|
|
1975
2242
|
isActive(): boolean;
|
|
1976
2243
|
initCallback(): void;
|
|
1977
2244
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
@@ -1979,45 +2246,33 @@ declare class DropArea extends LitUploaderBlock {
|
|
|
1979
2246
|
/** Ignore drop events if there are other visible drop areas on the page. */
|
|
1980
2247
|
private _shouldIgnore;
|
|
1981
2248
|
private _couldHandleFiles;
|
|
1982
|
-
private
|
|
1983
|
-
private
|
|
1984
|
-
private
|
|
1985
|
-
private
|
|
2249
|
+
private _updateIsEnabled;
|
|
2250
|
+
private _updateVisibility;
|
|
2251
|
+
private _updateDragStateAttribute;
|
|
2252
|
+
private _updateClickableListeners;
|
|
1986
2253
|
disconnectedCallback(): void;
|
|
1987
2254
|
render(): lit_html.TemplateResult<1>;
|
|
1988
2255
|
}
|
|
1989
2256
|
|
|
1990
|
-
type EntrySubscription = ReturnType<UploadEntryTypedData['subscribe']>;
|
|
1991
|
-
declare class FileItemConfig extends LitUploaderBlock {
|
|
1992
|
-
protected _entrySubs: Set<EntrySubscription>;
|
|
1993
|
-
protected _entry: UploadEntryTypedData | null;
|
|
1994
|
-
protected _withEntry<A extends unknown[], R>(fn: (entry: UploadEntryTypedData, ...args: A) => R): (...args: A) => R | undefined;
|
|
1995
|
-
protected _subEntry<K extends UploadEntryKeys>(prop: K, handler: (value: UploadEntryData[K]) => void): void;
|
|
1996
|
-
protected _reset(): void;
|
|
1997
|
-
disconnectedCallback(): void;
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
2257
|
declare class FileItem extends FileItemConfig {
|
|
2001
|
-
couldBeCtxOwner: boolean;
|
|
2002
|
-
|
|
2003
|
-
uid:
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2258
|
+
protected couldBeCtxOwner: boolean;
|
|
2259
|
+
private _pauseRender;
|
|
2260
|
+
uid: Uid;
|
|
2261
|
+
private _itemName;
|
|
2262
|
+
private _errorText;
|
|
2263
|
+
private _hint;
|
|
2264
|
+
private _progressValue;
|
|
2265
|
+
private _progressVisible;
|
|
2266
|
+
private _badgeIcon;
|
|
2267
|
+
private _isFinished;
|
|
2268
|
+
private _isFailed;
|
|
2269
|
+
private _isUploading;
|
|
2270
|
+
private _isFocused;
|
|
2271
|
+
private _isEditable;
|
|
2272
|
+
private _showFileNames;
|
|
2273
|
+
private _ariaLabelStatusFile;
|
|
2017
2274
|
private _renderedOnce;
|
|
2018
2275
|
private _observer?;
|
|
2019
|
-
protected _isIntersecting: boolean;
|
|
2020
|
-
protected _thumbRect?: DOMRectReadOnly;
|
|
2021
2276
|
private _handleEdit;
|
|
2022
2277
|
private _handleRemove;
|
|
2023
2278
|
private _handleUploadClick;
|
|
@@ -2025,7 +2280,7 @@ declare class FileItem extends FileItemConfig {
|
|
|
2025
2280
|
private _debouncedCalculateState;
|
|
2026
2281
|
private _updateHintAndProgress;
|
|
2027
2282
|
private _handleState;
|
|
2028
|
-
|
|
2283
|
+
protected reset(): void;
|
|
2029
2284
|
private _observerCallback;
|
|
2030
2285
|
private _handleEntryId;
|
|
2031
2286
|
private _updateShowFileNames;
|
|
@@ -2033,266 +2288,19 @@ declare class FileItem extends FileItemConfig {
|
|
|
2033
2288
|
initCallback(): void;
|
|
2034
2289
|
connectedCallback(): void;
|
|
2035
2290
|
disconnectedCallback(): void;
|
|
2036
|
-
|
|
2291
|
+
private _upload;
|
|
2037
2292
|
static activeInstances: Set<FileItem>;
|
|
2038
|
-
protected shouldUpdate(
|
|
2039
|
-
render(): lit_html.TemplateResult<1>;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
declare class FormInput extends LitUploaderBlock {
|
|
2043
|
-
_validationInputElement: HTMLInputElement | null;
|
|
2044
|
-
_dynamicInputsContainer: HTMLDivElement | null;
|
|
2045
|
-
_createValidationInput(): HTMLInputElement;
|
|
2046
|
-
initCallback(): void;
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
declare class Icon extends LitBlock {
|
|
2050
|
-
name: string;
|
|
2051
|
-
private resolvedHref;
|
|
2052
|
-
private iconHrefResolver;
|
|
2053
|
-
initCallback(): void;
|
|
2054
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
2055
|
-
private updateResolvedHref;
|
|
2293
|
+
protected shouldUpdate(changedProperties: PropertyValues<this>): boolean;
|
|
2056
2294
|
render(): lit_html.TemplateResult<1>;
|
|
2057
2295
|
}
|
|
2058
2296
|
|
|
2059
|
-
declare const ImgTypeEnum: Readonly<{
|
|
2060
|
-
PREVIEW: "PREVIEW";
|
|
2061
|
-
MAIN: "MAIN";
|
|
2062
|
-
}>;
|
|
2063
|
-
|
|
2064
|
-
type CssPropValue = string | number | undefined | null;
|
|
2065
|
-
declare const ImgConfig_base: typeof LitElement & Constructor$1<LitElement> & {
|
|
2066
|
-
reg(tagName: string): void;
|
|
2067
|
-
} & Constructor$1<{
|
|
2068
|
-
getCssData(propName: string, silentCheck?: boolean): string | number | boolean | null | undefined;
|
|
2069
|
-
}>;
|
|
2070
|
-
declare class ImgConfig extends ImgConfig_base {
|
|
2071
|
-
private _state;
|
|
2072
|
-
private _subscribers;
|
|
2073
|
-
private _isnObserver;
|
|
2074
|
-
private _observed;
|
|
2075
|
-
createRenderRoot(): HTMLElement | ShadowRoot;
|
|
2076
|
-
constructor();
|
|
2077
|
-
$$(key: string): unknown;
|
|
2078
|
-
set$$(kvObj: Record<string, CssPropValue>): void;
|
|
2079
|
-
sub$$<T = unknown>(key: string, kbFn: (val: T) => void): void;
|
|
2080
|
-
private _notify;
|
|
2081
|
-
analyticsParams(): string;
|
|
2082
|
-
initAttributes(el: HTMLElement): void;
|
|
2083
|
-
initIntersection(el: HTMLElement, cbkFn: () => void): void;
|
|
2084
|
-
connectedCallback(): void;
|
|
2085
|
-
private _initCssProperties;
|
|
2086
|
-
disconnectedCallback(): void;
|
|
2087
|
-
static get observedAttributes(): string[];
|
|
2088
|
-
attributeChangedCallback(name: string, _oldVal: string | null, newVal: string | null): void;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
type ImgType = (typeof ImgTypeEnum)[keyof typeof ImgTypeEnum];
|
|
2092
|
-
type LoaderParams = {
|
|
2093
|
-
src?: string;
|
|
2094
|
-
srcset?: string;
|
|
2095
|
-
elNode: HTMLImageElement;
|
|
2096
|
-
};
|
|
2097
|
-
type CurrentImg = {
|
|
2098
|
-
type: ImgType;
|
|
2099
|
-
img: HTMLImageElement;
|
|
2100
|
-
};
|
|
2101
|
-
declare class ImgBase extends ImgConfig {
|
|
2102
|
-
protected _img: HTMLImageElement;
|
|
2103
|
-
protected _imgPreview: HTMLImageElement;
|
|
2104
|
-
private _fmtAbs;
|
|
2105
|
-
private _validateSize;
|
|
2106
|
-
private _getCdnModifiers;
|
|
2107
|
-
private _getTypedCssValue;
|
|
2108
|
-
private _getUrlBase;
|
|
2109
|
-
private _proxyUrl;
|
|
2110
|
-
protected _getElSize(el: HTMLElement, k?: number, wOnly?: boolean): string | null;
|
|
2111
|
-
private _setupEventProxy;
|
|
2112
|
-
get img(): HTMLImageElement;
|
|
2113
|
-
get currentImg(): CurrentImg;
|
|
2114
|
-
get hasPreviewImage(): string | number | boolean | undefined;
|
|
2115
|
-
get bgSelector(): string | undefined;
|
|
2116
|
-
get breakpoints(): number[] | null;
|
|
2117
|
-
get hasFormatJPG(): boolean;
|
|
2118
|
-
renderBg(el: HTMLElement): void;
|
|
2119
|
-
getSrcset(): string;
|
|
2120
|
-
getSrc(): string | undefined;
|
|
2121
|
-
get srcUrlPreview(): string | undefined;
|
|
2122
|
-
renderBackground(): void;
|
|
2123
|
-
private _appendURL;
|
|
2124
|
-
private _setupConfigForImage;
|
|
2125
|
-
loaderImage({ src, srcset, elNode }: LoaderParams): Promise<HTMLImageElement>;
|
|
2126
|
-
renderImage(): Promise<void>;
|
|
2127
|
-
init(): void;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
declare class Img extends ImgBase {
|
|
2131
|
-
connectedCallback(): void;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
declare class ProgressBar extends LitBlock {
|
|
2135
|
-
value: number;
|
|
2136
|
-
visible: boolean;
|
|
2137
|
-
private _progressValue;
|
|
2138
|
-
private readonly fakeProgressLineRef;
|
|
2139
|
-
private readonly handleFakeProgressAnimation;
|
|
2140
|
-
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
2141
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
2142
|
-
disconnectedCallback(): void;
|
|
2143
|
-
private normalizeProgressValue;
|
|
2144
|
-
private updateProgressValueStyle;
|
|
2145
|
-
render(): lit_html.TemplateResult<1>;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
declare class ProgressBarCommon extends LitUploaderBlock {
|
|
2149
|
-
private _unobserveCollectionCb?;
|
|
2150
|
-
protected visible: boolean;
|
|
2151
|
-
protected value: number;
|
|
2152
|
-
constructor();
|
|
2153
|
-
initCallback(): void;
|
|
2154
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
2155
|
-
disconnectedCallback(): void;
|
|
2156
|
-
render(): lit_html.TemplateResult<1>;
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
type SelectOption = {
|
|
2160
|
-
text: string;
|
|
2161
|
-
value: string;
|
|
2162
|
-
};
|
|
2163
|
-
declare class Select extends LitBlock {
|
|
2164
|
-
value: string;
|
|
2165
|
-
disabled: boolean;
|
|
2166
|
-
options: SelectOption[];
|
|
2167
|
-
render(): lit_html.TemplateResult<1>;
|
|
2168
|
-
private _handleChange;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
2297
|
declare class SimpleBtn extends LitUploaderBlock {
|
|
2172
2298
|
static styleAttrs: string[];
|
|
2173
2299
|
couldBeCtxOwner: boolean;
|
|
2174
2300
|
dropzone: boolean;
|
|
2175
|
-
private
|
|
2176
|
-
private readonly
|
|
2177
|
-
initCallback(): void;
|
|
2178
|
-
render(): lit_html.TemplateResult<1>;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
type SourceTypeConfig = {
|
|
2182
|
-
type: string;
|
|
2183
|
-
activity?: ActivityType | null;
|
|
2184
|
-
textKey?: string;
|
|
2185
|
-
icon?: string;
|
|
2186
|
-
activate?: () => boolean;
|
|
2187
|
-
activityParams?: Record<string, unknown>;
|
|
2188
|
-
};
|
|
2189
|
-
declare class SourceBtn extends LitUploaderBlock {
|
|
2190
|
-
couldBeCtxOwner: boolean;
|
|
2191
|
-
private _registeredTypes;
|
|
2192
|
-
type?: string;
|
|
2193
|
-
private iconName;
|
|
2194
|
-
private srcTypeKey;
|
|
2195
|
-
initTypes(): void;
|
|
2196
|
-
initCallback(): void;
|
|
2197
|
-
registerType(typeConfig: SourceTypeConfig): void;
|
|
2198
|
-
getType(type: string): SourceTypeConfig | undefined;
|
|
2199
|
-
activate(): void;
|
|
2200
|
-
applyType(type: string): void;
|
|
2201
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
2202
|
-
render(): lit_html.TemplateResult<1>;
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
declare class SourceList extends LitBlock {
|
|
2206
|
-
private _rawSourceList;
|
|
2207
|
-
private _cameraModes;
|
|
2208
|
-
private _resolvedSources;
|
|
2209
|
-
initCallback(): void;
|
|
2210
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
2211
|
-
private _updateSources;
|
|
2212
|
-
sources: string[];
|
|
2213
|
-
render(): lit_html.TemplateResult<1>;
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
declare class Spinner extends LitBlock {
|
|
2217
|
-
render(): lit_html.TemplateResult<1>;
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
declare class StartFrom extends LitActivityBlock {
|
|
2221
|
-
historyTracked: boolean;
|
|
2222
|
-
activityType: ActivityType;
|
|
2223
|
-
initCallback(): void;
|
|
2224
|
-
render(): lit_html.TemplateResult<1>;
|
|
2225
|
-
}
|
|
2226
|
-
|
|
2227
|
-
declare class Thumb extends FileItemConfig {
|
|
2228
|
-
badgeIcon: string;
|
|
2229
|
-
uid: string;
|
|
2230
|
-
private thumbUrl;
|
|
2231
|
-
private renderedGridOnce;
|
|
2232
|
-
private thumbRect;
|
|
2233
|
-
private isIntersecting;
|
|
2234
|
-
private firstViewMode;
|
|
2235
|
-
private observer?;
|
|
2236
|
-
private pendingThumbUpdate?;
|
|
2237
|
-
private calculateThumbSize;
|
|
2238
|
-
private generateThumbnail;
|
|
2239
|
-
private debouncedGenerateThumb;
|
|
2240
|
-
private decodeImage;
|
|
2241
|
-
private cancelPendingThumbUpdate;
|
|
2242
|
-
private scheduleThumbUpdate;
|
|
2243
|
-
private requestThumbGeneration;
|
|
2244
|
-
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
2245
|
-
protected updated(changedProperties: PropertyValues<this>): void;
|
|
2246
|
-
private _observerCallback;
|
|
2247
|
-
protected _reset(): void;
|
|
2248
|
-
private bindToEntry;
|
|
2249
|
-
initCallback(): void;
|
|
2250
|
-
connectedCallback(): void;
|
|
2251
|
-
disconnectedCallback(): void;
|
|
2252
|
-
render(): lit_html.TemplateResult<1>;
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
type EventListenerMap = {
|
|
2256
|
-
[K in (typeof EventType)[keyof typeof EventType]]: (e: CustomEvent<EventPayload[K]>) => void;
|
|
2257
|
-
};
|
|
2258
|
-
declare class UploadCtxProvider extends LitUploaderBlock {
|
|
2259
|
-
static styleAttrs: string[];
|
|
2260
|
-
static EventType: Readonly<{
|
|
2261
|
-
readonly FILE_ADDED: "file-added";
|
|
2262
|
-
readonly FILE_REMOVED: "file-removed";
|
|
2263
|
-
readonly FILE_UPLOAD_START: "file-upload-start";
|
|
2264
|
-
readonly FILE_UPLOAD_PROGRESS: "file-upload-progress";
|
|
2265
|
-
readonly FILE_UPLOAD_SUCCESS: "file-upload-success";
|
|
2266
|
-
readonly FILE_UPLOAD_FAILED: "file-upload-failed";
|
|
2267
|
-
readonly FILE_URL_CHANGED: "file-url-changed";
|
|
2268
|
-
readonly MODAL_OPEN: "modal-open";
|
|
2269
|
-
readonly MODAL_CLOSE: "modal-close";
|
|
2270
|
-
readonly DONE_CLICK: "done-click";
|
|
2271
|
-
readonly UPLOAD_CLICK: "upload-click";
|
|
2272
|
-
readonly ACTIVITY_CHANGE: "activity-change";
|
|
2273
|
-
readonly COMMON_UPLOAD_START: "common-upload-start";
|
|
2274
|
-
readonly COMMON_UPLOAD_PROGRESS: "common-upload-progress";
|
|
2275
|
-
readonly COMMON_UPLOAD_SUCCESS: "common-upload-success";
|
|
2276
|
-
readonly COMMON_UPLOAD_FAILED: "common-upload-failed";
|
|
2277
|
-
readonly CHANGE: "change";
|
|
2278
|
-
readonly GROUP_CREATED: "group-created";
|
|
2279
|
-
}>;
|
|
2301
|
+
private _buttonTextKey;
|
|
2302
|
+
private readonly _handleClick;
|
|
2280
2303
|
initCallback(): void;
|
|
2281
|
-
disconnectedCallback(): void;
|
|
2282
|
-
}
|
|
2283
|
-
interface UploadCtxProvider extends LitUploaderBlock {
|
|
2284
|
-
addEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | AddEventListenerOptions): void;
|
|
2285
|
-
removeEventListener<T extends keyof EventListenerMap>(type: T, listener: EventListenerMap[T], options?: boolean | EventListenerOptions): void;
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
declare class UrlSource extends LitUploaderBlock {
|
|
2289
|
-
couldBeCtxOwner: boolean;
|
|
2290
|
-
activityType: ActivityType;
|
|
2291
|
-
private formState;
|
|
2292
|
-
initCallback(): void;
|
|
2293
|
-
private inputRef;
|
|
2294
|
-
private handleInput;
|
|
2295
|
-
private handleUpload;
|
|
2296
2304
|
render(): lit_html.TemplateResult<1>;
|
|
2297
2305
|
}
|
|
2298
2306
|
|
|
@@ -2307,7 +2315,6 @@ declare class LitSolutionBlock extends LitBlock {
|
|
|
2307
2315
|
'*collectionState': OutputCollectionState | null;
|
|
2308
2316
|
'*groupInfo': _uploadcare_upload_client.UploadcareGroup | null;
|
|
2309
2317
|
'*uploadTrigger': Set<string>;
|
|
2310
|
-
'*secureUploadsManager': SecureUploadsManager | null;
|
|
2311
2318
|
'*currentActivity': null;
|
|
2312
2319
|
'*currentActivityParams': {};
|
|
2313
2320
|
'*history': never[];
|
|
@@ -2318,6 +2325,18 @@ declare class LitSolutionBlock extends LitBlock {
|
|
|
2318
2325
|
render(): lit_html.TemplateResult<1>;
|
|
2319
2326
|
}
|
|
2320
2327
|
|
|
2328
|
+
declare class FileUploaderRegular extends LitSolutionBlock {
|
|
2329
|
+
attributesMeta: {
|
|
2330
|
+
headless?: boolean;
|
|
2331
|
+
'ctx-name': string;
|
|
2332
|
+
};
|
|
2333
|
+
static styleAttrs: string[];
|
|
2334
|
+
headless: boolean;
|
|
2335
|
+
constructor();
|
|
2336
|
+
initCallback(): void;
|
|
2337
|
+
render(): lit_html.TemplateResult<1>;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2321
2340
|
declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
2322
2341
|
static styleAttrs: string[];
|
|
2323
2342
|
constructor();
|
|
@@ -2325,25 +2344,29 @@ declare class CloudImageEditor extends CloudImageEditorBlock {
|
|
|
2325
2344
|
}
|
|
2326
2345
|
|
|
2327
2346
|
declare class FileUploaderInline extends LitSolutionBlock {
|
|
2347
|
+
propertiesMeta: {
|
|
2348
|
+
'ctx-name': string;
|
|
2349
|
+
};
|
|
2328
2350
|
static styleAttrs: string[];
|
|
2329
|
-
private
|
|
2351
|
+
private _couldCancel;
|
|
2330
2352
|
constructor();
|
|
2331
2353
|
private _handleCancel;
|
|
2332
|
-
get
|
|
2333
|
-
get
|
|
2354
|
+
private get _couldHistoryBack();
|
|
2355
|
+
private get _couldShowList();
|
|
2334
2356
|
private _getInitActivity;
|
|
2335
2357
|
initCallback(): void;
|
|
2336
2358
|
render(): lit_html.TemplateResult<1>;
|
|
2337
2359
|
}
|
|
2338
2360
|
|
|
2339
2361
|
declare class FileUploaderMinimal extends LitSolutionBlock {
|
|
2362
|
+
propertiesMeta: {
|
|
2363
|
+
'ctx-name': string;
|
|
2364
|
+
};
|
|
2340
2365
|
static styleAttrs: string[];
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
private handleModalOpen?;
|
|
2346
|
-
private handleModalClose?;
|
|
2366
|
+
private _singleUpload;
|
|
2367
|
+
private _isHiddenStartFrom;
|
|
2368
|
+
private _classUploadList;
|
|
2369
|
+
private _classStartFrom;
|
|
2347
2370
|
private _getInitActivity;
|
|
2348
2371
|
constructor();
|
|
2349
2372
|
private _handleModalOpen;
|
|
@@ -2353,15 +2376,4 @@ declare class FileUploaderMinimal extends LitSolutionBlock {
|
|
|
2353
2376
|
render(): lit_html.TemplateResult<1>;
|
|
2354
2377
|
}
|
|
2355
2378
|
|
|
2356
|
-
|
|
2357
|
-
static styleAttrs: string[];
|
|
2358
|
-
headless: boolean;
|
|
2359
|
-
constructor();
|
|
2360
|
-
initCallback(): void;
|
|
2361
|
-
render(): lit_html.TemplateResult<1>;
|
|
2362
|
-
}
|
|
2363
|
-
|
|
2364
|
-
type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
|
|
2365
|
-
declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
|
|
2366
|
-
|
|
2367
|
-
export { LitActivityBlock as ActivityBlock, ActivityHeader, type ApiAddFileCommonOptions, LitBlock as Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, 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, UploadCtxProvider, UploadList, UploadSource, LitUploaderBlock as UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, toKebabCase };
|
|
2379
|
+
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 };
|