@uploadcare/file-uploader 1.24.0 → 1.24.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.24.0",
3
+ "version": "1.24.2",
4
4
  "description": "Building blocks for Uploadcare products integration",
5
5
  "keywords": [
6
6
  "web components",
@@ -102,12 +102,13 @@ declare class ModalManager {
102
102
  destroy(): void;
103
103
  }
104
104
 
105
+ type CommonEventType = InternalEventKey | EventKey;
105
106
  type TelemetryState = TelemetryRequest & {
106
107
  eventTimestamp: number;
107
108
  };
108
109
  type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
109
110
  modalId?: string;
110
- eventType?: EventKey;
111
+ eventType?: CommonEventType;
111
112
  };
112
113
  declare class TelemetryManager {
113
114
  private readonly _sessionId;
@@ -179,9 +180,13 @@ declare class Block extends BaseComponent<any> {
179
180
  static reg(name?: string): void;
180
181
  }
181
182
 
182
- declare const EventType: Readonly<{
183
+ declare const InternalEventType: Readonly<{
183
184
  readonly INIT_SOLUTION: "init-solution";
184
185
  readonly CHANGE_CONFIG: "change-config";
186
+ readonly ACTION_EVENT: "action-event";
187
+ readonly ERROR_EVENT: "error-event";
188
+ }>;
189
+ declare const EventType: Readonly<{
185
190
  readonly FILE_ADDED: "file-added";
186
191
  readonly FILE_REMOVED: "file-removed";
187
192
  readonly FILE_UPLOAD_START: "file-upload-start";
@@ -202,6 +207,7 @@ declare const EventType: Readonly<{
202
207
  readonly GROUP_CREATED: "group-created";
203
208
  }>;
204
209
  type EventKey = (typeof EventType)[keyof typeof EventType];
210
+ type InternalEventKey = (typeof InternalEventType)[keyof typeof InternalEventType];
205
211
  type EventPayload = {
206
212
  [EventType.FILE_ADDED]: OutputFileEntry<'idle'>;
207
213
  [EventType.FILE_REMOVED]: OutputFileEntry<'removed'>;
@@ -228,8 +234,6 @@ type EventPayload = {
228
234
  [EventType.COMMON_UPLOAD_FAILED]: OutputCollectionState<'failed'>;
229
235
  [EventType.CHANGE]: OutputCollectionState;
230
236
  [EventType.GROUP_CREATED]: OutputCollectionState<'success', 'has-group'>;
231
- [EventType.INIT_SOLUTION]: void;
232
- [EventType.CHANGE_CONFIG]: void;
233
237
  };
234
238
  declare class EventEmitter {
235
239
  private _timeoutStore;
@@ -525,6 +529,7 @@ declare class Config extends Block {
525
529
  _assertSameValueDifferentReference(key: string, previousValue: unknown, nextValue: unknown): void;
526
530
  initCallback(): void;
527
531
  attributeChangedCallback(name: keyof typeof attrStateMapping, oldVal: string, newVal: string): void;
532
+ get computationControllers(): any;
528
533
  }
529
534
  interface Config extends ConfigType {
530
535
  }
@@ -1970,8 +1975,6 @@ type EventListenerMap = {
1970
1975
  declare class UploadCtxProvider extends UploaderBlock {
1971
1976
  static styleAttrs: string[];
1972
1977
  static EventType: Readonly<{
1973
- readonly INIT_SOLUTION: "init-solution";
1974
- readonly CHANGE_CONFIG: "change-config";
1975
1978
  readonly FILE_ADDED: "file-added";
1976
1979
  readonly FILE_REMOVED: "file-removed";
1977
1980
  readonly FILE_UPLOAD_START: "file-upload-start";