@emailmaker/filemanager 0.10.50 → 0.10.51

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.
@@ -26,7 +26,7 @@ export interface UseFilesAPIActions {
26
26
  }>;
27
27
  }) => void;
28
28
  }) => Promise<void>;
29
- handleAddFileByUrl: (url?: string | null, noFolder?: boolean, suppressNotifications?: boolean) => Promise<AppFile | void>;
29
+ handleAddFileByUrl: (url?: string | null, noFolder?: boolean, suppressNotifications?: boolean, eventSource?: 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif') => Promise<AppFile | void>;
30
30
  handleDroppedFiles: (droppedFiles: globalThis.File[]) => Promise<void>;
31
31
  getFileData: (fileId: string, silent?: boolean) => Promise<Blob | undefined>;
32
32
  uploadFileWithProvider: (file: globalThis.File, targetFolderId?: string, suppressNotifications?: boolean) => Promise<AppFile | undefined>;
@@ -35,7 +35,7 @@ export interface UseFilesActions {
35
35
  }>;
36
36
  }) => void;
37
37
  }) => Promise<void>;
38
- handleAddFileByUrl: (url?: string | null, noFolder?: boolean, suppressNotifications?: boolean) => Promise<AppFile | void>;
38
+ handleAddFileByUrl: (url?: string | null, noFolder?: boolean, suppressNotifications?: boolean, eventSource?: 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif') => Promise<AppFile | void>;
39
39
  toggleFileSelection: (fileId: string, opts?: {
40
40
  metaKey?: boolean;
41
41
  ctrlKey?: boolean;
package/notification.d.ts CHANGED
@@ -278,7 +278,7 @@ declare namespace Notify {
278
278
  /**
279
279
  * Source of the upload event: 'upload' for file picker/drag-drop, 'uploadByUrl' for URL upload.
280
280
  */
281
- export type UploadEventSource = 'upload' | 'uploadByUrl';
281
+ export type UploadEventSource = 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif';
282
282
 
283
283
  /**
284
284
  * Payload for file upload operations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.50",
3
+ "version": "0.10.51",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
package/types.d.ts CHANGED
@@ -245,6 +245,8 @@ export interface FileManagerDataProviders {
245
245
  folderId?: string | null;
246
246
  noFolder?: boolean;
247
247
  name?: string;
248
+ /** Источник события загрузки для аналитики */
249
+ eventSource?: 'upload' | 'uploadByUrl' | 'pixie' | 'iconStock' | 'imageStock' | 'gif';
248
250
  }) => Promise<File>;
249
251
  deleteItems?: (items: string[], options?: {
250
252
  permanent?: boolean;
@@ -48,6 +48,7 @@ export declare class JSONDataProvider implements FileManagerDataProviders {
48
48
  folderId?: string | null;
49
49
  noFolder?: boolean;
50
50
  name?: string;
51
+ eventSource?: "upload" | "uploadByUrl" | "pixie" | "iconStock" | "imageStock" | "gif";
51
52
  }) => Promise<File>;
52
53
  updateFile: (fileId: string, updates: {
53
54
  name?: string;