@epam/ai-dial-ui-kit 0.4.0-rc.60 → 0.4.0-rc.62

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.
@@ -6,7 +6,7 @@ import { DialFileManagerNavigationPanelProps } from './components/FileManagerNav
6
6
  import { DialGridProps } from '../Grid/Grid';
7
7
  import { DialFileManagerToolbarProps } from './components/FileManagerToolbar/DialFileManagerToolbar';
8
8
  import { DialFileManagerBulkActionsToolbarProps } from './components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar';
9
- import { DialFileManagerActions, DialCopiedItem } from '../../types/file-manager';
9
+ import { DialFileManagerActions, DialCopiedItem, DialDeletedItem } from '../../types/file-manager';
10
10
  import { FileManagerGridRow } from './FileManagerContext';
11
11
  type GridRow = FileManagerGridRow;
12
12
  export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 'selectedPath' | 'onItemClick'> {
@@ -21,6 +21,7 @@ export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 's
21
21
  [DialFileManagerActions.Cut]?: string;
22
22
  [DialFileManagerActions.Paste]?: string;
23
23
  [DialFileManagerActions.Rename]?: string;
24
+ [DialFileManagerActions.Download]?: string;
24
25
  [DialFileManagerActions.Delete]?: string;
25
26
  };
26
27
  }
@@ -52,9 +53,10 @@ export interface DialFileManagerProps {
52
53
  deleteConfirmationOptions?: DeleteConfirmationOptions;
53
54
  onPathChange?: (nextPath?: string) => void;
54
55
  onTableFileClick?: (file: GridRow) => void;
55
- onCopyFiles?: (items: DialCopiedItem[]) => void;
56
- onMoveToFiles?: (items: DialCopiedItem[]) => void;
57
- onDeleteFiles?: (items: DialFile[], sourceFolder: string) => void;
56
+ onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
57
+ onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
58
+ onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
59
+ onDownloadFiles?: (items: DialFile[]) => void;
58
60
  onRename?: (itemPath: string) => void;
59
61
  onRenameSave?: (value: string) => void;
60
62
  onRenameCancel?: () => void;
@@ -48,7 +48,7 @@ export interface FileManagerContextValue {
48
48
  onRenameSave: (value: string) => void;
49
49
  onRenameCancel: () => void;
50
50
  onRenameValidate: (value: string, item: DialFile) => string | null;
51
- openDeleteConfirmation: (items: DialFile[]) => void;
51
+ openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
52
52
  closeDeleteConfirmation: () => void;
53
53
  confirmDelete: () => void;
54
54
  deleteConfirmationOpen: boolean;
@@ -59,5 +59,6 @@ export interface FileManagerContextValue {
59
59
  handleSearchChange: (value?: string) => void;
60
60
  handleTableRowClick: (row: FileManagerGridRow) => void;
61
61
  onTableFileClick?: DialFileManagerProps['onTableFileClick'];
62
+ downloadFiles: (items: DialFile[]) => void;
62
63
  }
63
64
  export declare const FileManagerContext: import('react').Context<FileManagerContextValue | undefined>;
@@ -4,8 +4,8 @@ export interface UseFileClipboardOptions {
4
4
  getDestination: () => string;
5
5
  getDestinationFiles: () => DialFile[];
6
6
  getSourceFiles: () => DialFile[];
7
- onCopyFiles?: (items: DialCopiedItem[]) => void;
8
- onMoveToFiles?: (items: DialCopiedItem[]) => void;
7
+ onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
8
+ onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
9
9
  }
10
10
  export declare const useFileClipboard: ({ getDestination, getDestinationFiles, getSourceFiles, onCopyFiles, onMoveToFiles, }: UseFileClipboardOptions) => {
11
11
  state: {
@@ -2,12 +2,11 @@ import { DialFile } from '../../../models/file';
2
2
  import { DialDeletedItem } from '../../../types/file-manager';
3
3
  export interface UseFileDeleteOptions {
4
4
  onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
5
- getCurrentPath: () => string;
6
5
  }
7
- export declare const useFileDelete: ({ onDeleteFiles, getCurrentPath, }: UseFileDeleteOptions) => {
6
+ export declare const useFileDelete: ({ onDeleteFiles }: UseFileDeleteOptions) => {
8
7
  deleteConfirmationOpen: boolean;
9
8
  itemsToDelete: DialFile[];
10
- openDeleteConfirmation: (items: DialFile[]) => void;
9
+ openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
11
10
  closeDeleteConfirmation: () => void;
12
11
  confirmDelete: () => void;
13
12
  };
@@ -0,0 +1,7 @@
1
+ import { DialFile } from '../../../models/file';
2
+ export interface UseFileDownloadOptions {
3
+ onDownloadFiles?: (items: DialFile[]) => void;
4
+ }
5
+ export declare const useFileDownload: ({ onDownloadFiles, }: UseFileDownloadOptions) => {
6
+ downloadFiles: (items: DialFile[]) => void;
7
+ };
@@ -9,6 +9,7 @@ export declare enum DialFileManagerActions {
9
9
  Cut = "cut",
10
10
  Paste = "paste",
11
11
  Rename = "rename",
12
+ Download = "download",
12
13
  Delete = "delete"
13
14
  }
14
15
  export interface DialCopiedItem {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.4.0-rc.60",
3
+ "version": "0.4.0-rc.62",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",