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