@epam/ai-dial-ui-kit 0.5.0-rc.9 → 0.5.0-rc.91

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.
Files changed (113) hide show
  1. package/README.md +3 -3
  2. package/dist/dial-ui-kit.cjs.js +29 -29
  3. package/dist/dial-ui-kit.es.js +26744 -24516
  4. package/dist/index.css +2 -2
  5. package/dist/src/components/Alert/Alert.d.ts +7 -3
  6. package/dist/src/components/Alert/constants.d.ts +7 -4
  7. package/dist/src/components/AutocompleteInput/AutocompleteInput.d.ts +10 -10
  8. package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +6 -6
  9. package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +8 -8
  10. package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  11. package/dist/src/components/Breadcrumb/constants.d.ts +10 -10
  12. package/dist/src/components/Button/Button.d.ts +10 -18
  13. package/dist/src/components/Checkbox/Checkbox.d.ts +2 -2
  14. package/dist/src/components/CloseButton/CloseButton.d.ts +5 -3
  15. package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +6 -6
  16. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +3 -3
  17. package/dist/src/components/ConfirmationPopup/constants.d.ts +3 -3
  18. package/dist/src/components/DraggableItem/DraggableItem.d.ts +8 -8
  19. package/dist/src/components/DraggableItem/constants.d.ts +2 -2
  20. package/dist/src/components/Dropdown/Dropdown.d.ts +4 -2
  21. package/dist/src/components/Dropdown/constants.d.ts +7 -7
  22. package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +4 -4
  23. package/dist/src/components/EllipsisTooltip/constants.d.ts +1 -1
  24. package/dist/src/components/Field/Field.d.ts +4 -6
  25. package/dist/src/components/FileIcon/FileIcon.d.ts +2 -2
  26. package/dist/src/components/FileManager/FileManager.d.ts +50 -12
  27. package/dist/src/components/FileManager/FileManagerContext.d.ts +47 -4
  28. package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
  29. package/dist/src/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.d.ts +92 -0
  30. package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +4 -1
  31. package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.d.ts +55 -0
  32. package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.test.d.ts +1 -0
  33. package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.d.ts +5 -3
  34. package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +1 -1
  35. package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +2 -1
  36. package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +4 -2
  37. package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +13 -11
  38. package/dist/src/components/FileManager/components/FileManagerNavigationPanel/constants.d.ts +3 -3
  39. package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +13 -13
  40. package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +7 -1
  41. package/dist/src/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.d.ts +13 -0
  42. package/dist/src/components/FileManager/constants.d.ts +14 -7
  43. package/dist/src/components/FileManager/hooks/__tests__/use-conflict-resolution.spec.d.ts +1 -0
  44. package/dist/src/components/FileManager/hooks/__tests__/use-file-upload.spec.d.ts +1 -0
  45. package/dist/src/components/FileManager/hooks/__tests__/use-trigger-view-rename.spec.d.ts +1 -0
  46. package/dist/src/components/FileManager/hooks/use-conflict-resolution.d.ts +26 -0
  47. package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +18 -4
  48. package/dist/src/components/FileManager/hooks/use-file-delete.d.ts +3 -2
  49. package/dist/src/components/FileManager/hooks/use-file-download.d.ts +2 -1
  50. package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +43 -0
  51. package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +21 -0
  52. package/dist/src/components/FileManager/hooks/use-grid-actions-column.d.ts +10 -0
  53. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +20 -0
  54. package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +9 -5
  55. package/dist/src/components/FileManager/hooks/use-new-actions.d.ts +16 -0
  56. package/dist/src/components/FileManager/hooks/use-tree-additional-buttons.d.ts +22 -0
  57. package/dist/src/components/FileManager/hooks/use-trigger-view-rename.d.ts +20 -0
  58. package/dist/src/components/FileManager/utils.d.ts +1 -1
  59. package/dist/src/components/FileName/FileName.d.ts +17 -5
  60. package/dist/src/components/FolderName/FolderName.d.ts +2 -2
  61. package/dist/src/components/FormItem/FormItem.d.ts +9 -9
  62. package/dist/src/components/FormItem/constants.d.ts +1 -1
  63. package/dist/src/components/FormPopup/FormPopup.d.ts +1 -1
  64. package/dist/src/components/FormPopup/constants.d.ts +1 -1
  65. package/dist/src/components/Grid/Grid.d.ts +10 -3
  66. package/dist/src/components/Grid/constants.d.ts +1 -1
  67. package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +3 -3
  68. package/dist/src/components/Grid/renderers/constants.d.ts +1 -1
  69. package/dist/src/components/Icon/Icon.d.ts +0 -1
  70. package/dist/src/components/Input/Input.d.ts +4 -4
  71. package/dist/src/components/InputField/InputField.d.ts +3 -3
  72. package/dist/src/components/InputPopup/InputPopup.d.ts +6 -6
  73. package/dist/src/components/Loader/Loader.d.ts +5 -5
  74. package/dist/src/components/Loader/constants.d.ts +2 -2
  75. package/dist/src/components/NoDataContent/NoDataContent.d.ts +6 -3
  76. package/dist/src/components/PasswordInput/PasswordInputField.d.ts +1 -1
  77. package/dist/src/components/Popup/Popup.d.ts +6 -6
  78. package/dist/src/components/Popup/constants.d.ts +3 -3
  79. package/dist/src/components/RadioButton/RadioButton.d.ts +6 -6
  80. package/dist/src/components/RadioGroup/RadioGroup.d.ts +20 -20
  81. package/dist/src/components/RadioGroup/constants.d.ts +3 -3
  82. package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +2 -2
  83. package/dist/src/components/RemoveButton/RemoveButton.d.ts +6 -8
  84. package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +33 -0
  85. package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +69 -0
  86. package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +10 -0
  87. package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +8 -0
  88. package/dist/src/components/Search/Search.d.ts +4 -4
  89. package/dist/src/components/Search/constants.d.ts +4 -4
  90. package/dist/src/components/Select/Select.d.ts +9 -3
  91. package/dist/src/components/Select/constants.d.ts +7 -6
  92. package/dist/src/components/SelectField/SelectField.d.ts +6 -6
  93. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +2 -2
  94. package/dist/src/components/Skeleton/Skeleton.d.ts +77 -0
  95. package/dist/src/components/Skeleton/utils.d.ts +2 -0
  96. package/dist/src/components/Tab/Tab.d.ts +4 -4
  97. package/dist/src/components/Tabs/Tabs.d.ts +9 -9
  98. package/dist/src/components/Tag/Tag.d.ts +2 -2
  99. package/dist/src/components/TextAreaField/TextAreaField.d.ts +3 -3
  100. package/dist/src/components/Textarea/Textarea.d.ts +4 -4
  101. package/dist/src/hooks/use-width-breakpoint.d.ts +23 -0
  102. package/dist/src/index.d.ts +8 -2
  103. package/dist/src/models/breadcrumb.d.ts +1 -1
  104. package/dist/src/models/dropdown.d.ts +1 -0
  105. package/dist/src/models/file-manager.d.ts +15 -0
  106. package/dist/src/models/file.d.ts +1 -1
  107. package/dist/src/models/tab.d.ts +2 -1
  108. package/dist/src/types/dropdown.d.ts +2 -1
  109. package/dist/src/types/file-manager.d.ts +23 -9
  110. package/dist/src/types/resizable-container.d.ts +4 -0
  111. package/dist/src/types/skeleton.d.ts +15 -0
  112. package/dist/src/types/tab.d.ts +1 -1
  113. package/package.json +5 -4
@@ -10,10 +10,10 @@ export interface DialFileManagerToolbarProps {
10
10
  hiddenFilesSwitcherLabel?: string;
11
11
  showHiddenFilesLabel?: string;
12
12
  hideHiddenFilesLabel?: string;
13
- isCreateButtonVisible?: boolean;
14
- createButtonVariant?: ButtonVariant;
15
- createButtonDropdownItems?: DropdownItem[];
16
- createButtonLabel?: string;
13
+ isNewButtonVisible?: boolean;
14
+ newButtonVariant?: ButtonVariant;
15
+ newButtonDropdownItems?: DropdownItem[];
16
+ newButtonLabel?: string;
17
17
  onTabChange?: (id: DialFileManagerTabs) => void;
18
18
  onToggleHiddenFiles?: (value: boolean) => void;
19
19
  }
@@ -24,7 +24,7 @@ export interface DialFileManagerToolbarProps {
24
24
  * - Tab navigation for switching between file sections or views
25
25
  * - A toggle for showing or hiding hidden files
26
26
  * - A refresh button for reloading content
27
- * - An optional "Create" button or dropdown for creating new files or folders
27
+ * - An optional "New" button or dropdown for creating new files or folders
28
28
  *
29
29
  * @example
30
30
  * ```tsx
@@ -40,8 +40,8 @@ export interface DialFileManagerToolbarProps {
40
40
  * onTabChange={(id) => console.log('Switched to tab:', id)}
41
41
  * onToggleHiddenFiles={(visible) => console.log('Hidden files visible:', visible)}
42
42
  * onRefresh={() => console.log('Refreshed')}
43
- * isCreateButtonVisible
44
- * createButtonDropdownItems={[
43
+ * isNewButtonVisible
44
+ * newButtonDropdownItems={[
45
45
  * { key: 'folder', label: 'New Folder' },
46
46
  * { key: 'file', label: 'Upload File' },
47
47
  * ]}
@@ -56,16 +56,16 @@ export interface DialFileManagerToolbarProps {
56
56
  * @param [hideHiddenFilesLabel='Hide hidden'] - Label shown when hidden files are visible.
57
57
  * @param [onTabChange] - Callback fired when the user switches between tabs. Receives the selected tab ID.
58
58
  * @param [onToggleHiddenFiles] - Callback fired when the hidden files visibility is toggled. Receives the new visibility state.
59
- * @param [isCreateButtonVisible] - Whether the "Create" button or dropdown should be displayed.
60
- * @param [createButtonVariant=ButtonVariant.Secondary] - Visual style variant for the create button.
61
- * @param [createButtonDropdownItems=[]] - Dropdown items available under the create button. If empty, a single create button is shown instead.
62
- * @param [createButtonLabel='Create'] - Label text for the create button.
59
+ * @param [isNewButtonVisible] - Whether the "New" button or dropdown should be displayed.
60
+ * @param [newButtonVariant=ButtonVariant.Secondary] - Visual style variant for the new button.
61
+ * @param [newButtonDropdownItems=[]] - Dropdown items available under the new button. If empty, a single new button is shown instead.
62
+ * @param [newButtonLabel='New'] - Label text for the new button.
63
63
  *
64
64
  * @remarks
65
65
  * - Tabs are rendered via `DialTabs`.
66
66
  * - The hidden files toggle uses `DialSwitch`.
67
- * - The refresh and create actions use `DialButton` or dropdown variants for consistency.
67
+ * - The refresh and new actions use `DialButton` or dropdown variants for consistency.
68
68
  * - The toolbar automatically adapts its layout for different screen sizes.
69
- * - When `createButtonDropdownItems` is provided, the create button becomes a dropdown menu.
69
+ * - When `newButtonDropdownItems` is provided, the new button becomes a dropdown menu.
70
70
  */
71
71
  export declare const DialFileManagerToolbar: FC<DialFileManagerToolbarProps>;
@@ -5,9 +5,12 @@ export interface DialFoldersTreeProps {
5
5
  items: DialFile[];
6
6
  expandedPaths?: Set<string>;
7
7
  loadingPaths?: Set<string>;
8
+ loadedPaths?: Set<string>;
8
9
  selectedPath?: string;
9
10
  renamedPath?: string;
10
11
  showFiles?: boolean;
12
+ rootItemPath?: string;
13
+ rootItemLabel?: string;
11
14
  emptyStateTitle?: string;
12
15
  emptyStateDescription?: string;
13
16
  emptyStateIcon?: ReactNode;
@@ -17,6 +20,7 @@ export interface DialFoldersTreeProps {
17
20
  onRenameValidate?: (value: string, item: DialFile) => string | null;
18
21
  getContextMenuItems?: (item: DialFile) => DropdownItem[];
19
22
  areHiddenFilesVisible?: boolean;
23
+ onExpandedPathsChange?: (expandedPaths: Set<string>) => void;
20
24
  }
21
25
  /**
22
26
  * DialFoldersTree — A hierarchical folder tree component with nested expand/collapse support, selection highlighting,
@@ -89,6 +93,7 @@ export interface DialFoldersTreeProps {
89
93
  * @param [items] - Array of folder and file nodes to display in the tree.
90
94
  * @param [expandedPaths] - Set of folder paths that should be expanded.
91
95
  * @param [loadingPaths] - Set of folder paths currently loading (shows spinner or placeholder).
96
+ * @param [loadedPaths] - Set of folder paths that have loaded.
92
97
  * @param [selectedPath] - Path representing the currently selected folder or file.
93
98
  * @param [renamedPath] - Path of the folder or file currently being edited.
94
99
  * @param [showFiles=false] - Whether to show files in addition to folders.
@@ -101,7 +106,8 @@ export interface DialFoldersTreeProps {
101
106
  * @param [onRenameValidate] - Function to validate the new name during editing. Should return an error string or `null` if valid.
102
107
  * @param [getContextMenuItems] - Function returning context menu items for a given node.
103
108
  * @param [areHiddenFilesVisible=false] - Whether hidden files (dotfiles) should be visible in the tree.
104
- *
109
+ * @param [rootItemPath] - Path of the folder to treat as the custom root node (no context menu, special label).
110
+ * @param [rootItemLabel] - Label to display for the root node instead of its actual name.
105
111
  * @remarks
106
112
  * - Folder and file data must follow the `DialFile` model.
107
113
  * - The `expandedPaths`, `loadingPaths`, `selectedPath`, and `renamedPath` props are externally controlled.
@@ -0,0 +1,13 @@
1
+ export interface UseExpandedPathsOptions {
2
+ expandedPaths?: Set<string>;
3
+ onExpandedPathsChange?: (expandedPaths: Set<string>) => void;
4
+ }
5
+ export declare const useExpandedPaths: (options?: UseExpandedPathsOptions) => {
6
+ expandedPaths: Set<string>;
7
+ setExpandedPaths: (newSet: Set<string>) => void;
8
+ togglePath: (path: string) => void;
9
+ collapseAll: () => void;
10
+ expandPath: (path: string) => void;
11
+ collapsePath: (path: string) => void;
12
+ isControlled: boolean;
13
+ };
@@ -1,10 +1,17 @@
1
- export declare const containerBaseClasses = "w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-2";
2
- export declare const toolbarBaseClasses = "w-full text-secondary flex items-center gap-2";
3
- export declare const mainGridClasses = "flex min-h-0 min-w-0 h-full gap-4 overflow-hidden";
4
- export declare const contentGridClasses = "flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4";
5
- export declare const contentHeaderClasses = "items-center";
6
- export declare const treeBaseClasses = "w-full h-full rounded bg-layer-3 text-secondary overflow-auto min-w-0";
7
- export declare const gridBaseClasses = "flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0";
1
+ export declare const containerBaseClassName = "w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-2";
2
+ export declare const toolbarBaseClassName = "w-full text-secondary flex items-center gap-2";
3
+ export declare const mainGridClassName = "flex min-h-0 min-w-0 h-full gap-4 overflow-hidden";
4
+ export declare const contentGridClassName = "flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4";
5
+ export declare const contentHeaderClassName = "items-center";
6
+ export declare const treeBaseClassName = "w-full h-full rounded bg-layer-3 text-secondary overflow-auto min-w-0";
7
+ export declare const gridBaseClassName = "flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0";
8
8
  export declare const sidebarWidth = 280;
9
9
  export declare const sidebarTitleDefault = "Files";
10
10
  export declare const BASE_FILE_MANAGER_ICON_SIZE = 20;
11
+ export declare const FILES_DATA_TRANSFER_TYPE = "Files";
12
+ export declare const FOLDER_PLACEHOLDER_FILE_NAME = ".dial_folder";
13
+ export declare const FOLDERS_TREE_PANEL_MIN_WIDTH = 280;
14
+ export declare const FOLDERS_TREE_PANEL_MAX_WIDTH = 460;
15
+ export declare const COMPACT_VIEW_HEADER_HEIGHT = 44;
16
+ export declare const COMPACT_VIEW_FILE_ROW_HEIGHT = 56;
17
+ export declare const DEFAULT_COMPACT_VIEW_WIDTH_BREAKPOINT = 800;
@@ -0,0 +1,26 @@
1
+ import { DialFile } from '../../../models/file';
2
+ import { DialCopiedItem } from '../../../models/file-manager';
3
+ import { FileConflictDecision } from '../components/ConflictResolutionPopup/ConflictResolutionPopup';
4
+ import { DialFileManagerConflictActions } from '../../../types/file-manager';
5
+ export interface UseConflictResolutionOptions {
6
+ getDestinationFiles: (path: string) => DialFile[];
7
+ onResolve?: (items: DialCopiedItem[], destinationFolder: string) => void;
8
+ }
9
+ export interface ConflictResolutionResult {
10
+ hasConflicts: boolean;
11
+ conflicts: DialFile[];
12
+ }
13
+ export declare const useConflictResolution: ({ getDestinationFiles, onResolve, }: UseConflictResolutionOptions) => {
14
+ conflictingFiles: DialFile[];
15
+ conflictResolutionOpen: boolean;
16
+ hasActiveConflictRef: import('react').RefObject<boolean>;
17
+ checkForConflicts: (destinationFolder: string, files: DialFile[]) => ConflictResolutionResult;
18
+ startConflictResolution: (destinationFolder: string, files: DialFile[], metadata?: Record<string, unknown>) => ConflictResolutionResult;
19
+ resolveConflictsWithStrategy: (destinationFolder: string, files: DialFile[], overwrite: boolean, metadata?: Record<string, unknown>) => DialCopiedItem[];
20
+ resolveConflictsWithDecisions: (destinationFolder: string, files: DialFile[], decisions: Map<string, DialFileManagerConflictActions>, metadata?: Record<string, unknown>) => DialCopiedItem[];
21
+ openConflictResolution: (files: DialFile[]) => void;
22
+ closeConflictResolution: () => void;
23
+ handleReplaceAll: () => void;
24
+ handleDuplicateAll: () => void;
25
+ handleDecideForEach: (decisions: FileConflictDecision[]) => void;
26
+ };
@@ -1,21 +1,35 @@
1
1
  import { DialFile } from '../../../models/file';
2
- import { DialCopiedItem } from '../../../types/file-manager';
2
+ import { DialCopiedItem } from '../../../models/file-manager';
3
+ import { FileConflictDecision } from '../components/ConflictResolutionPopup/ConflictResolutionPopup';
4
+ import { DestinationFolderMode } from '../../../types/file-manager';
3
5
  export interface UseFileClipboardOptions {
4
6
  getDestinationFiles: (path: string) => DialFile[];
5
7
  getSourceFiles: () => DialFile[];
6
8
  onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
7
9
  onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
10
+ onCopySuccess?: () => void;
11
+ onMoveSuccess?: () => void;
12
+ onDuplicateSuccess?: () => void;
13
+ getCopyHeader?: (itemsCount: number, itemName?: string) => string;
14
+ getMoveHeader?: (itemsCount: number, itemName?: string) => string;
8
15
  }
9
- export type DestinationFolderMode = 'copy' | 'move';
10
- export declare const useFileClipboard: ({ getDestinationFiles, onCopyFiles, onMoveToFiles, }: UseFileClipboardOptions) => {
16
+ export declare const useFileClipboard: ({ getDestinationFiles, onCopyFiles, onMoveToFiles, onCopySuccess, onMoveSuccess, onDuplicateSuccess, getCopyHeader, getMoveHeader, }: UseFileClipboardOptions) => {
11
17
  handleDuplicate: (files: DialFile[]) => void;
12
18
  handleCloseDestinationFolderPopup: () => void;
13
19
  handleOpenDestinationFolderPopup: (mode: DestinationFolderMode) => void;
14
20
  handleCopyTo: (destinationFolder: string) => void;
15
- handleMoveTo: (destinationFolder: string, sourceFolder: string) => void;
21
+ handleMoveTo: (destinationFolder: string, sourceFolder?: string) => void;
16
22
  openDestinationFolderPopup: boolean;
17
23
  destinationFolderMode: DestinationFolderMode;
24
+ destinationFolderTitle: string | undefined;
18
25
  handleSetCopiedFiles: (files: DialFile[]) => void;
19
26
  handleSetMovedFiles: (files: DialFile[]) => void;
20
27
  clearState: () => void;
28
+ conflictingFiles: DialFile[];
29
+ conflictResolutionOpen: boolean;
30
+ openConflictResolution: (files: DialFile[]) => void;
31
+ closeConflictResolution: () => void;
32
+ handleConflictReplace: () => void;
33
+ handleConflictDuplicate: () => void;
34
+ handleConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
21
35
  };
@@ -1,9 +1,10 @@
1
1
  import { DialFile } from '../../../models/file';
2
- import { DialDeletedItem } from '../../../types/file-manager';
2
+ import { DialDeletedItem } from '../../../models/file-manager';
3
3
  export interface UseFileDeleteOptions {
4
4
  onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
5
+ onDeleteSuccess?: () => void;
5
6
  }
6
- export declare const useFileDelete: ({ onDeleteFiles }: UseFileDeleteOptions) => {
7
+ export declare const useFileDelete: ({ onDeleteFiles, onDeleteSuccess, }: UseFileDeleteOptions) => {
7
8
  deleteConfirmationOpen: boolean;
8
9
  itemsToDelete: DialFile[];
9
10
  openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
@@ -1,7 +1,8 @@
1
1
  import { DialFile } from '../../../models/file';
2
2
  export interface UseFileDownloadOptions {
3
3
  onDownloadFiles?: (items: DialFile[]) => void;
4
+ onDownloadSuccess?: () => void;
4
5
  }
5
- export declare const useFileDownload: ({ onDownloadFiles, }: UseFileDownloadOptions) => {
6
+ export declare const useFileDownload: ({ onDownloadFiles, onDownloadSuccess, }: UseFileDownloadOptions) => {
6
7
  handleDownloadFiles: (items: DialFile[]) => void;
7
8
  };
@@ -0,0 +1,43 @@
1
+ import { DragEvent } from 'react';
2
+ import { DialFile } from '../../../models/file';
3
+ import { DialUploadFileItem } from '../../../models/file-manager';
4
+ import { FileConflictDecision } from '../components/ConflictResolutionPopup/ConflictResolutionPopup';
5
+ export interface FileUploadValidationResult {
6
+ valid: boolean;
7
+ message?: string;
8
+ }
9
+ export interface FileUploadValidationMessages {
10
+ duplicateFiles?: string;
11
+ oversizedFiles?: string;
12
+ validationFailed?: string;
13
+ validationError?: string;
14
+ }
15
+ export interface UseFileUploadOptions {
16
+ onUploadFiles?: (files: DialUploadFileItem[], destinationFolder: string) => void;
17
+ onValidateUpload?: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => FileUploadValidationResult | Promise<FileUploadValidationResult>;
18
+ maxFileSize?: number;
19
+ validationMessages?: FileUploadValidationMessages;
20
+ onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
21
+ }
22
+ export declare const useFileUpload: ({ onUploadFiles, onValidateUpload, maxFileSize, validationMessages, onUploadArchive, }?: UseFileUploadOptions) => {
23
+ isDragging: boolean;
24
+ isDraggingOverWindow: boolean;
25
+ uploadError: string | undefined;
26
+ handleDragEnter: (e: DragEvent) => void;
27
+ handleDragLeave: (e: DragEvent) => void;
28
+ handleDragOver: (e: DragEvent) => void;
29
+ handleDrop: (e: DragEvent, destinationFolder: string, existingFiles: DialFile[]) => Promise<void>;
30
+ clearError: () => void;
31
+ handleUpload: (files: DialUploadFileItem[], destinationFolder: string, existingFiles: DialFile[]) => Promise<boolean>;
32
+ openFileDialog: (destinationFolder: string, existingFiles: DialFile[]) => void;
33
+ openArchiveDialog: (destinationFolder: string, existingFiles: DialFile[]) => void;
34
+ fileInputRef: import('react').RefObject<HTMLInputElement | null>;
35
+ uploadConflictingFiles: DialFile[];
36
+ uploadConflictResolutionOpen: boolean;
37
+ hasActiveUploadConflictRef: import('react').RefObject<boolean>;
38
+ openUploadConflictResolution: (files: DialFile[]) => void;
39
+ closeUploadConflictResolution: () => void;
40
+ handleUploadConflictReplace: () => void;
41
+ handleUploadConflictDuplicate: () => void;
42
+ handleUploadConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
43
+ };
@@ -0,0 +1,21 @@
1
+ import { DialFile } from '../../../models/file';
2
+ import { DialUploadFileItem } from '../../../models/file-manager';
3
+ export interface FolderCreationValidationMessages {
4
+ emptyName?: string;
5
+ duplicateName?: string;
6
+ }
7
+ export interface UseFolderCreationProps {
8
+ currentFolder?: DialFile;
9
+ onCreateFolder?: (file: DialUploadFileItem, folderPath: string, fileId: string) => void | Promise<void>;
10
+ onValidateFolderName?: (name: string, parentFolder: DialFile) => string | null;
11
+ validationMessages?: FolderCreationValidationMessages;
12
+ }
13
+ export interface UseFolderCreationResult {
14
+ isCreatingFolder: boolean;
15
+ newFolderTempId: string | null;
16
+ startFolderCreation: () => void;
17
+ cancelFolderCreation: () => void;
18
+ saveFolderCreation: (name: string) => Promise<void>;
19
+ validateFolderName: (name: string) => string | null;
20
+ }
21
+ export declare const useFolderCreation: ({ currentFolder, onCreateFolder, onValidateFolderName, validationMessages, }: UseFolderCreationProps) => UseFolderCreationResult;
@@ -0,0 +1,10 @@
1
+ import { ColDef } from 'ag-grid-community';
2
+ import { FileManagerGridRow } from '../FileManagerContext';
3
+ import { DropdownItem } from '../../../models/dropdown';
4
+ interface UseGridActionsColumnProps {
5
+ getContextMenuItems: (row: FileManagerGridRow) => DropdownItem[];
6
+ }
7
+ export declare const useGridActionsColumn: ({ getContextMenuItems, }: UseGridActionsColumnProps) => {
8
+ actionsColumnDef: ColDef<FileManagerGridRow, any>;
9
+ };
10
+ export {};
@@ -0,0 +1,20 @@
1
+ import { DialFile } from '../../../models/file';
2
+ import { DialFileManagerActions } from '../../../types/file-manager';
3
+ import { DropdownItem } from '../../../models/dropdown';
4
+ export interface UseGridContextMenuProps {
5
+ actionLabels?: {
6
+ [DialFileManagerActions.Duplicate]?: string;
7
+ [DialFileManagerActions.Copy]?: string;
8
+ [DialFileManagerActions.Rename]?: string;
9
+ [DialFileManagerActions.Download]?: string;
10
+ [DialFileManagerActions.Delete]?: string;
11
+ [DialFileManagerActions.Move]?: string;
12
+ };
13
+ onDuplicate: (file: DialFile) => void;
14
+ onCopy: (file: DialFile) => void;
15
+ onMove: (file: DialFile) => void;
16
+ onDownload: (file: DialFile) => void;
17
+ onRename: (filePath: string) => void;
18
+ onDelete: (file: DialFile, parentFolderPath: string) => void;
19
+ }
20
+ export declare const useGridContextMenu: ({ actionLabels, onDuplicate, onCopy, onMove, onDownload, onRename, onDelete, }: UseGridContextMenuProps) => (file: DialFile) => DropdownItem[];
@@ -1,16 +1,20 @@
1
1
  import { DialFile } from '../../../models/file';
2
- import { DialCopiedItem } from '../../../types/file-manager';
3
- export declare const useItemRenaming: ({ items, onRename, onRenameSave, onRenameCancel, onRenameValidate, onMoveToFiles, }: {
2
+ import { DialCopiedItem } from '../../../models/file-manager';
3
+ export interface RenameValidationMessages {
4
+ emptyName?: string;
5
+ duplicateName?: string;
6
+ }
7
+ export declare const useItemRenaming: ({ items, onRenameValidate, validationMessages, onMoveToFiles, }: {
4
8
  items?: DialFile[];
5
- onRename?: (path: string) => void;
6
- onRenameSave?: (value: string) => void;
7
- onRenameCancel?: () => void;
8
9
  onRenameValidate?: (value: string, item: DialFile) => string | null;
10
+ validationMessages?: RenameValidationMessages;
9
11
  onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
10
12
  }) => {
11
13
  renamedPath: string | undefined;
14
+ renamedItem: DialFile | undefined;
12
15
  renameHandler: (path: string) => void;
13
16
  renameSaveHandler: (value: string) => void;
14
17
  renameCancelHandler: () => void;
15
18
  renameValidateHandler: (value: string, item: DialFile) => string | null;
19
+ getDisplayName: (item: DialFile) => string;
16
20
  };
@@ -0,0 +1,16 @@
1
+ import { DropdownItem } from '../../../models/dropdown';
2
+ export interface UseNewActionsProps {
3
+ newActionLabels?: {
4
+ uploadFiles?: string;
5
+ newFolder?: string;
6
+ uploadArchive?: string;
7
+ };
8
+ onUploadFiles?: () => void;
9
+ onCreateFolder?: () => void;
10
+ onUploadArchive?: () => void;
11
+ }
12
+ export interface UseNewActionsResult {
13
+ newActions: DropdownItem[];
14
+ isNewButtonVisible: boolean;
15
+ }
16
+ export declare const useNewActions: ({ newActionLabels, onUploadFiles, onCreateFolder, onUploadArchive, }: UseNewActionsProps) => UseNewActionsResult;
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ interface useTreeAdditionalButtonsOptions {
3
+ additionalButtons?: ReactNode;
4
+ expandedPathsLength: number;
5
+ collapseAll: () => void;
6
+ }
7
+ /**
8
+ * Provides additional action buttons for the tree component, including a
9
+ * built-in "Collapse All" button. The hook memoizes the returned JSX to avoid
10
+ * unnecessary re-renders and applies disabled state automatically based on
11
+ * the number of expanded paths.
12
+ *
13
+ * @param {ReactNode} [additionalButtons] - Optional custom buttons rendered before the Collapse All button.
14
+ * @param {number} expandedPathsLength - Number of currently expanded paths in the tree.
15
+ * @param {() => void} collapseAll - Callback fired when the Collapse All button is clicked.
16
+ *
17
+ * @returns {{ additionalButtons: ReactNode }} - The rendered buttons fragment.
18
+ */
19
+ export declare const useTreeAdditionalButtons: ({ additionalButtons, expandedPathsLength, collapseAll, }: useTreeAdditionalButtonsOptions) => {
20
+ additionalButtons: import("react/jsx-runtime").JSX.Element;
21
+ };
22
+ export {};
@@ -0,0 +1,20 @@
1
+ import { FileManagerRenameTriggerView } from '../../../types/file-manager';
2
+ interface UseTriggerViewRenameOptions {
3
+ onRename: (path: string) => void;
4
+ }
5
+ /**
6
+ * Manages which view ("tree" or "grid") triggered a rename action.
7
+ *
8
+ * Useful when both TreeView and GridView can initiate renaming,
9
+ * and the parent needs to know which source triggered it
10
+ * to apply view-specific logic or UI updates.
11
+ *
12
+ * Returns the last rename trigger source and two handlers
13
+ * (`onGridRename`, `onTreeRename`) that wrap the provided `onRename` callback.
14
+ */
15
+ export declare const useTriggerViewRename: ({ onRename, }: UseTriggerViewRenameOptions) => {
16
+ renameTriggerView: FileManagerRenameTriggerView;
17
+ onGridRename: (path: string) => void;
18
+ onTreeRename: (path: string) => void;
19
+ };
20
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { DialFile } from '../../models/file';
2
- export declare const findNodeByPath: (nodes: DialFile[] | undefined, path?: string) => DialFile | undefined;
2
+ export declare const findNodeByPath: (nodes: DialFile[] | undefined, path: string) => DialFile | undefined;
3
3
  export declare const findFolderForPath: (root: DialFile[] | undefined, path?: string) => DialFile | undefined;
4
4
  export declare const normalizeToLowerCase: (input?: string) => string;
5
5
  export declare const normalizeExtensionWithoutDot: (input?: string) => string;
@@ -1,22 +1,34 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface DialFileNameProps {
3
3
  name: string;
4
- cssClass?: string;
4
+ className?: string;
5
5
  shared?: boolean;
6
6
  iconSize?: number;
7
+ details?: ReactNode;
7
8
  }
8
9
  /**
9
10
  * Component to display a file name with a file icon and shared indicator.
10
11
  * Handles long names with ellipsis and tooltip.
11
12
  *
13
+ * If `details` is provided (e.g., file size, date), the component switches to
14
+ * a vertical layout and renders the extra information below the file name.
15
+ *
12
16
  * @example
13
17
  * ```tsx
18
+ * // Without details
14
19
  * <DialFileName name="Document.pdf" />
20
+ *
21
+ * // With details (file size and updated date)
22
+ * <DialFileName
23
+ * name="Document.pdf"
24
+ * details={<span className="text-secondary">24 KB · Jul 20, 2025</span>}
25
+ * />
15
26
  * ```
16
27
  *
17
- * @param name - Full file name with or without extension
18
- * @param cssClass - Additional CSS classes for the root container
19
- * @param shared - Whether the file is shared
28
+ * @param name - Full file name with or without extension.
29
+ * @param className - Additional CSS classes for the root container.
30
+ * @param shared - Whether the file is shared.
20
31
  * @param iconSize - Icon size in px. Default: BASE_ICON_SIZE.
32
+ * @param details - Optional metadata block displayed under the file name (e.g., size, modified date).
21
33
  */
22
34
  export declare const DialFileName: FC<DialFileNameProps>;
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  export interface DialFolderNameProps {
3
3
  name: string;
4
- cssClass?: string;
4
+ className?: string;
5
5
  shared?: boolean;
6
6
  loading?: boolean;
7
7
  iconSize?: number;
@@ -16,7 +16,7 @@ export interface DialFolderNameProps {
16
16
  * ```
17
17
  *
18
18
  * @param name - Folder name
19
- * @param cssClass - Additional CSS classes for the root container
19
+ * @param className - Additional CSS classes for the root container
20
20
  * @param shared - If true, shows shared indicator. Default: false.
21
21
  * @param loading - If true, shows loading state. Default: false.
22
22
  * @param iconSize - Icon size in px. Default: BASE_ICON_SIZE.
@@ -3,10 +3,10 @@ import { DialFormItemBaseProps } from '../../types/form-item';
3
3
  export interface DialFormItemProps extends DialFormItemBaseProps {
4
4
  elementId: string;
5
5
  labelVisuallyHidden?: boolean;
6
- cssClass?: string;
7
- childrenCssClass?: string;
8
- labelCssClass?: string;
9
- errorCssClass?: string;
6
+ className?: string;
7
+ childrenClassName?: string;
8
+ labelClassName?: string;
9
+ errorClassName?: string;
10
10
  children: ReactNode;
11
11
  value?: ReactNode | string;
12
12
  defaultEmptyText?: string;
@@ -22,7 +22,7 @@ export interface DialFormItemProps extends DialFormItemBaseProps {
22
22
  *
23
23
  * @example
24
24
  * ```tsx
25
- * <DialFormItem elementId="transport" label="Transport" cssClass="w-[320px]">
25
+ * <DialFormItem elementId="transport" label="Transport" className="w-[320px]">
26
26
  * <DialSelect
27
27
  * elementId="transport"
28
28
  * value={transport}
@@ -53,10 +53,10 @@ export interface DialFormItemProps extends DialFormItemBaseProps {
53
53
  *
54
54
  * @param elementId - Unique identifier for the form control element (used for accessibility)
55
55
  * @param labelVisuallyHidden - Whether to visually hide the label (still accessible to screen readers, default: false)
56
- * @param cssClass - Additional CSS classes to apply to the container div
57
- * @param childrenCssClass - Additional CSS classes to apply to the children container div
58
- * @param labelCssClass - Additional CSS classes to apply to the label element
59
- * @param errorCssClass - Additional CSS classes to apply to the error message element
56
+ * @param className - Additional CSS classes to apply to the container div
57
+ * @param childrenClassName - Additional CSS classes to apply to the children container div
58
+ * @param labelClassName - Additional CSS classes to apply to the label element
59
+ * @param errorClassName - Additional CSS classes to apply to the error message element
60
60
  * @param children - The form control element(s) to render inside the DialFormItem
61
61
  * @param value - The current value of the form control (for readonly mode)
62
62
  * @param defaultEmptyText - Text to display when readonly and value is empty (default: "None")
@@ -1,3 +1,3 @@
1
1
  import { FormItemOrientation } from '../../types/form-item';
2
- export declare const containerBaseClasses = "w-full flex";
2
+ export declare const containerBaseClassName = "w-full flex";
3
3
  export declare const orientationClassMap: Record<FormItemOrientation, string>;
@@ -32,7 +32,7 @@ export interface DialFormPopupProps extends DialPopupProps {
32
32
  * @param [cancelLabel="Cancel"] - Label for the cancel button
33
33
  * @param [isLoading=false] - Shows loader placeholder and hides actions
34
34
  * @param [disableSubmitButton=false] - Disables the submit button
35
- * @param [cssClass] - Extra classes for the popup container
35
+ * @param [className] - Extra classes for the popup container
36
36
  * @param [submitClassName] - Extra classes merged into the submit button
37
37
  * @param onClose - Fired on close
38
38
  * @param onSubmit - Fired on submit
@@ -1,3 +1,3 @@
1
1
  export declare const defaultSubmitLabel = "Create";
2
2
  export declare const defaultCancelLabel = "Cancel";
3
- export declare const actionsBaseClasses = "flex items-center justify-end gap-2 px-6 py-3";
3
+ export declare const actionsBaseClassName = "flex items-center justify-end gap-2 px-6 py-3";
@@ -6,12 +6,13 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
6
6
  rowData?: T[];
7
7
  additionalGridOptions?: GridOptions<T>;
8
8
  getContextMenuItems?: (row: T) => DropdownItem[];
9
- cssClass?: string;
9
+ className?: string;
10
10
  ariaLabel?: string;
11
11
  withSelectionColumn?: boolean;
12
12
  wrapCustomCellRenderers?: boolean | ((col: ColDef<T>) => boolean);
13
13
  selectedRowIds?: Set<string>;
14
14
  selectedRows?: Map<string, T>;
15
+ selectionOnHover?: boolean;
15
16
  onSelectionChange?: (selectedRowIds: Set<string>, selectedRows: T[]) => void;
16
17
  onSelectionChangeWithMap?: (selectedRows: Map<string, T>) => void;
17
18
  getRowId?: (row: T) => string;
@@ -21,6 +22,8 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
21
22
  emptyStateTitle?: string;
22
23
  emptyStateDescription?: string;
23
24
  loading?: boolean;
25
+ wrapperBorder?: boolean;
26
+ withoutHeaderBorders?: boolean;
24
27
  }
25
28
  /**
26
29
  * DialGrid — A feature-rich data grid wrapper built on ag-Grid with dark theme support.
@@ -91,11 +94,13 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
91
94
  * @param [rowData] - Array of data objects to display in the grid
92
95
  * @param [additionalGridOptions] - Additional ag-Grid GridOptions to merge with defaults
93
96
  * @param [getContextMenuItems] - Function returning context menu items for a given row
94
- * @param [cssClass] - Additional CSS classes to apply to the grid container
97
+ * @param [className] - Additional CSS classes to apply to the grid container
95
98
  * @param [ariaLabel='Data grid'] - Accessible label for the grid region
96
99
  * @param [withSelectionColumn=true] - Whether to show the checkbox selection column
97
100
  * @param [wrapCustomCellRenderers=true] - Whether to wrap custom cell renderers with context menu support
98
101
  * @param [selectedRowIds] - Controlled selection: set of row IDs that should be selected
102
+ * @param [selectedRows] - Controlled selection: map of row IDs to row data for selected rows
103
+ * @param [selectionOnHover=true] - Whether row selection highlights are shown on hover
99
104
  * @param [onSelectionChange] - Callback invoked when selection changes (selectedIds, selectedRows)
100
105
  * @param [getRowId] - Function to extract unique ID from a row object (defaults to 'id' field)
101
106
  * @param [alternateOddRowColors=false] - Whether to alternate background colors for odd/even rows
@@ -105,5 +110,7 @@ export interface DialGridProps<T extends object = Record<string, unknown>> {
105
110
  * @param [emptyStateDescription] - Optional description text displayed below the empty state title,
106
111
  * providing additional context or instructions (e.g., "No data found" or "Try adjusting your filters").
107
112
  * @param [loading=false] - When true, shows AG-Grid's native loading overlay
113
+ * @param [wrapperBorder=true] - Whether to apply a border around the grid container
114
+ * @param [withoutHeaderBorders=false] - Whether to hide the header row borders
108
115
  */
109
- export declare const DialGrid: <T extends object>({ columnDefs, rowData, additionalGridOptions, getContextMenuItems, cssClass, ariaLabel, withSelectionColumn, wrapCustomCellRenderers, selectedRowIds, selectedRows, onSelectionChange, onSelectionChangeWithMap, getRowId, alternateOddRowColors, filterPlaceholder, emptyStateIcon, emptyStateTitle, emptyStateDescription, loading, }: DialGridProps<T>) => import("react/jsx-runtime").JSX.Element;
116
+ export declare const DialGrid: <T extends object>({ columnDefs, rowData, additionalGridOptions, getContextMenuItems, className, ariaLabel, withSelectionColumn, wrapCustomCellRenderers, selectedRowIds, selectedRows, selectionOnHover, onSelectionChange, onSelectionChangeWithMap, getRowId, alternateOddRowColors, filterPlaceholder, emptyStateIcon, emptyStateTitle, emptyStateDescription, loading, wrapperBorder, withoutHeaderBorders, }: DialGridProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- export declare const gridBaseClasses = "h-full";
1
+ export declare const gridBaseClassName = "h-full";
2
2
  export declare const GRID_THEME_COLORS: {
3
3
  accentColor: string;
4
4
  backgroundColor: string;