@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.
@@ -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>;
@@ -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';
@@ -13,3 +13,6 @@ export interface DialUploadFileItem {
13
13
  fileContent: File;
14
14
  name: string;
15
15
  }
16
+ export interface DialFileManagerActionsRef {
17
+ createFolder: () => void;
18
+ }
@@ -11,6 +11,7 @@ export interface DialFile extends DialModifiedEntity {
11
11
  path: string;
12
12
  name: string;
13
13
  folderId: string;
14
+ owner?: string;
14
15
  author?: string;
15
16
  nextToken?: string;
16
17
  extension?: string;
@@ -35,5 +35,6 @@ export declare enum FileManagerColumnKey {
35
35
  UpdatedAt = "updatedAt",
36
36
  Size = "size",
37
37
  Author = "author",
38
+ Owner = "owner",
38
39
  Actions = "__actions"
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.5.0-rc.94",
3
+ "version": "0.5.0-rc.96",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",