@emailmaker/filemanager 0.10.49 → 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.49",
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;
@@ -392,7 +394,7 @@ export interface Config {
392
394
  customTheme?: CustomTheme;
393
395
  UNSPLASH_KEY?: string;
394
396
  APP_NAME_UNSPLASH?: string;
395
- /** Ключ Streamline API (добавляется на прокси, не передаётся с клиента). При использовании транзитного прокси передаётся в заголовке x-api-key. */
397
+ /** Ключ Streamline API. При транзитном и сервисном прокси передаётся в заголовке x-api-key с клиента. */
396
398
  STREAMLINE_API_KEY?: string;
397
399
  /** Переопределение URL прокси Streamline (по умолчанию /streamline). Ключ добавляется на прокси. */
398
400
  STREAMLINE_BASE_URL?: string;
@@ -408,6 +410,12 @@ export interface Config {
408
410
  locale?: string;
409
411
  }) => Promise<string>;
410
412
  UNSLASH_PROXY_URL?: string;
413
+ /** Service proxy URL for Unsplash (stock images). Direct proxy, no proxy_url param. */
414
+ stockImagesProxyUrl?: string;
415
+ /** Service proxy URL for Giphy (stock GIFs). Direct proxy, no proxy_url param. */
416
+ stockGifsProxyUrl?: string;
417
+ /** Service proxy URL for Streamline (stock icons). Direct proxy, no proxy_url param. */
418
+ stockIconsProxyUrl?: string;
411
419
  pushToGTM?: boolean;
412
420
  projectId?: string;
413
421
  elementId?: string;
@@ -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;