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