@epam/ai-dial-ui-kit 0.5.0-rc.94 → 0.5.0-rc.96
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/dial-ui-kit.cjs.js +27 -27
- package/dist/dial-ui-kit.es.js +6719 -6678
- package/dist/src/components/FileManager/FileManager.d.ts +6 -3
- package/dist/src/components/FileManager/FileManagerContext.d.ts +4 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/models/file-manager.d.ts +3 -0
- package/dist/src/models/file.d.ts +1 -0
- package/dist/src/types/file-manager.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
1
|
+
import { FC, ReactNode, Ref } from 'react';
|
|
2
2
|
import { ColDef } from 'ag-grid-community';
|
|
3
3
|
import { DialFile, DialRootFolder } from '../../models/file';
|
|
4
4
|
import { DialFoldersTreeProps } from './components/FoldersTree/FoldersTree';
|
|
@@ -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 { DialCopiedItem, DialDeletedItem, DialUploadFileItem } from '../../models/file-manager';
|
|
9
|
+
import { DialCopiedItem, DialDeletedItem, DialUploadFileItem, DialFileManagerActionsRef } from '../../models/file-manager';
|
|
10
10
|
import { FileManagerGridRow } from './FileManagerContext';
|
|
11
11
|
import { DestinationFolderPopupProps } from './components/DestinationFolderPopup/DestinationFolderPopup';
|
|
12
12
|
import { FileUploadValidationResult, FileUploadValidationMessages } from './hooks/use-file-upload';
|
|
@@ -16,7 +16,7 @@ import { ConflictResolutionPopupProps } from './components/ConflictResolutionPop
|
|
|
16
16
|
import { RenameValidationMessages } from './hooks/use-item-renaming';
|
|
17
17
|
type GridRow = FileManagerGridRow;
|
|
18
18
|
export type DialFileManagerConflictResolutionPopupOptions = Omit<ConflictResolutionPopupProps, 'open' | 'onClose' | 'onReplace' | 'onDuplicate' | 'conflictingFiles'>;
|
|
19
|
-
export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'title'> & {
|
|
19
|
+
export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'title' | 'onCreateFolder' | 'onCreateFolderValidate' | 'folderCreationValidationMessages'> & {
|
|
20
20
|
getCopyHeader?: (itemsCount: number, itemName?: string) => string;
|
|
21
21
|
getMoveHeader?: (itemsCount: number, itemName?: string) => string;
|
|
22
22
|
};
|
|
@@ -129,6 +129,7 @@ export interface DialFileManagerProps {
|
|
|
129
129
|
onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
|
|
130
130
|
fileMetadataPopupOptions?: FileMetadataPopupOptions;
|
|
131
131
|
onGetInfo?: (file: DialFile) => void | Promise<void>;
|
|
132
|
+
actionsRef?: Ref<DialFileManagerActionsRef>;
|
|
132
133
|
}
|
|
133
134
|
/**
|
|
134
135
|
* File Manager layout with a collapsible folders tree, breadcrumb/search header, and a data grid.
|
|
@@ -200,6 +201,8 @@ export interface DialFileManagerProps {
|
|
|
200
201
|
* @param [onDownloadFiles] - Callback fired when files are downloaded
|
|
201
202
|
*
|
|
202
203
|
* @param [onUploadArchive] - Callback fired when archive files are uploaded
|
|
204
|
+
*
|
|
205
|
+
* @param [actionsRef] - Ref exposing a limited set of imperative File Manager actions (e.g., creating a folder). Allows parent components to trigger internal behaviors programmatically. This ref is not a DOM ref and should be used only for invoking the component’s public actions API.
|
|
203
206
|
*/
|
|
204
207
|
export declare const DialFileManager: FC<DialFileManagerProps>;
|
|
205
208
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { DragEvent, RefObject } from 'react';
|
|
1
|
+
import { DragEvent, Ref, RefObject } from 'react';
|
|
2
2
|
import { DialFile, DialRootFolder, DialFileNodeType } from '../../models/file';
|
|
3
3
|
import { FileTreeOptions, NavigationPanelOptions, GridOptions, ToolbarOptions, BulkActionsToolbarOptions, DialFileManagerProps, DeleteConfirmationOptions, DialFileManagerDestinationFolderPopupOptions, DialFileManagerConflictResolutionPopupOptions, FileMetadataPopupOptions } from './FileManager';
|
|
4
4
|
import { FileUploadValidationMessages } from './hooks/use-file-upload';
|
|
5
5
|
import { DropdownItem } from '../../models/dropdown';
|
|
6
6
|
import { FileConflictDecision } from './components/ConflictResolutionPopup/ConflictResolutionPopup';
|
|
7
7
|
import { DestinationFolderMode } from '../../types/file-manager';
|
|
8
|
+
import { DialFileManagerActionsRef } from '../../models/file-manager';
|
|
8
9
|
export interface FileManagerGridRow {
|
|
9
10
|
id: string;
|
|
10
11
|
name: string;
|
|
@@ -15,6 +16,7 @@ export interface FileManagerGridRow {
|
|
|
15
16
|
nodeType: DialFileNodeType;
|
|
16
17
|
extension?: string;
|
|
17
18
|
isTemporary?: boolean;
|
|
19
|
+
owner?: string;
|
|
18
20
|
}
|
|
19
21
|
export interface FileManagerContextValue {
|
|
20
22
|
className?: string;
|
|
@@ -114,5 +116,6 @@ export interface FileManagerContextValue {
|
|
|
114
116
|
openMetadataPopup: (file: DialFile) => void;
|
|
115
117
|
closeMetadataPopup: () => void;
|
|
116
118
|
onGetInfo?: (file: DialFile) => void | Promise<void>;
|
|
119
|
+
actionsRef?: Ref<DialFileManagerActionsRef>;
|
|
117
120
|
}
|
|
118
121
|
export declare const FileManagerContext: import('react').Context<FileManagerContextValue | undefined>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -83,5 +83,5 @@ export type { DropdownItem } from './models/dropdown';
|
|
|
83
83
|
export type { DialModifiedEntity } from './models/base-entity';
|
|
84
84
|
export type { DialFile } from './models/file';
|
|
85
85
|
export { DialFileNodeType, DialFilePermission, DialFileResourceType, } from './models/file';
|
|
86
|
-
export { type DialCopiedItem, type DialDeletedItem, type DialUploadFileItem, } from './models/file-manager';
|
|
86
|
+
export { type DialCopiedItem, type DialDeletedItem, type DialUploadFileItem, type DialFileManagerActionsRef, } from './models/file-manager';
|
|
87
87
|
export { mergeClasses } from './utils/merge-classes';
|