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

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
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
2
2
  import { DialTooltipContainerOptions } from '../Tooltip/TooltipContext';
3
3
  export interface DialEllipsisTooltipProps extends DialTooltipContainerOptions {
4
4
  text: string | ReactNode;
5
- cssClass?: string;
5
+ className?: string;
6
6
  contentClassName?: string;
7
7
  hideTooltip?: boolean;
8
8
  }
@@ -11,19 +11,19 @@ export interface DialEllipsisTooltipProps extends DialTooltipContainerOptions {
11
11
  * If the text fits, tooltip content is empty and the popup stays hidden.
12
12
  *
13
13
  * Important: width must be finite for truncation.
14
- * Consumers can override via `cssClass`.
14
+ * Consumers can override via `className`.
15
15
  *
16
16
  * a11y: when truncated, the full text is exposed via `aria-label` on the reference node.
17
17
  *
18
18
  * @example
19
19
  * ```tsx
20
20
  * <DialEllipsisTooltip text="Very long message that will be truncated" />
21
- * <DialEllipsisTooltip text={<span className="font-medium">Custom node</span>} cssClass="max-w-[160px]" />
21
+ * <DialEllipsisTooltip text={<span className="font-medium">Custom node</span>} className="max-w-[160px]" />
22
22
  * <DialEllipsisTooltip text="Tooltip disabled even if truncated" hideTooltip />
23
23
  * ```
24
24
  *
25
25
  * @param text The text or node to display (truncated with ellipsis if too long).
26
- * @param cssClass Optional additional CSS classes for the text container (e.g. to set width).
26
+ * @param className Optional additional CSS classes for the text container (e.g. to set width).
27
27
  * @param contentClassName Optional additional CSS classes for the tooltip content.
28
28
  * @param hideTooltip If true, disables the tooltip even if text is truncated.
29
29
  * @param tooltipProps Additional props to pass to the underlying DialTooltipContainer.
@@ -1 +1 @@
1
- export declare const tooltipContentBaseClasses = "text-primary";
1
+ export declare const tooltipContentBaseClassName = "text-primary";
@@ -1,10 +1,9 @@
1
- import { FC, ReactNode } from 'react';
2
- export interface DialFieldLabelProps {
1
+ import { FC, LabelHTMLAttributes, ReactNode } from 'react';
2
+ type NativeLabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children' | 'defaultValue' | 'onChange'>;
3
+ export interface DialFieldLabelProps extends NativeLabelProps {
3
4
  fieldTitle?: string | ReactNode;
4
- htmlFor: string;
5
5
  optional?: boolean;
6
6
  optionalText?: string;
7
- cssClass?: string;
8
7
  description?: string;
9
8
  }
10
9
  /**
@@ -16,11 +15,10 @@ export interface DialFieldLabelProps {
16
15
  * <DialFieldLabel htmlFor="email-input" fieldTitle="Email Address" />
17
16
  * ```
18
17
  *
19
- * @param htmlFor - The ID of the form element this label is associated with
20
18
  * @param [fieldTitle] - The title/label text to display for the field
21
19
  * @param [optional=false] - Whether the field is optional (displays "(Optional)" text if optionalText is not provided)
22
20
  * @param [optionalText="(Optional)"] - Custom text for optional indicator
23
- * @param [cssClass] - Additional CSS classes to apply to the label element
24
21
  * @param [description] - Additional description text, displayed below the label.
25
22
  */
26
23
  export declare const DialFieldLabel: FC<DialFieldLabelProps>;
24
+ export {};
@@ -3,7 +3,7 @@ export interface DialFileIconProps {
3
3
  extension: string;
4
4
  size?: number;
5
5
  stroke?: number;
6
- cssClass?: string;
6
+ className?: string;
7
7
  decorative?: boolean;
8
8
  label?: string;
9
9
  indicator?: ReactNode;
@@ -23,7 +23,7 @@ export interface DialFileIconProps {
23
23
  * @param extension - File extension string (with or without leading dot)
24
24
  * @param [size=baseIconProps.size] - Icon pixel size
25
25
  * @param [stroke=baseIconProps.stroke] - Tabler icon stroke width
26
- * @param [cssClass] - Additional classes on the container
26
+ * @param [className] - Additional classes on the container
27
27
  * @param [decorative=false] - Whether the icon should be hidden from assistive technologies
28
28
  * @param [label] - Accessible label when not decorative; defaults to "<EXT> file icon"
29
29
  * @param [indicator] - Optional indicator element to display alongside the icon
@@ -6,18 +6,30 @@ 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, DialDeletedItem } from '../../types/file-manager';
9
+ import { DialCopiedItem, DialDeletedItem, DialUploadFileItem } from '../../models/file-manager';
10
10
  import { FileManagerGridRow } from './FileManagerContext';
11
11
  import { DestinationFolderPopupProps } from './components/DestinationFolderPopup/DestinationFolderPopup';
12
+ import { FileUploadValidationResult, FileUploadValidationMessages } from './hooks/use-file-upload';
13
+ import { DialFileManagerActions, FileManagerColumnKey } from '../../types/file-manager';
14
+ import { FolderCreationValidationMessages } from './hooks/use-folder-creation';
15
+ import { ConflictResolutionPopupProps } from './components/ConflictResolutionPopup/ConflictResolutionPopup';
16
+ import { RenameValidationMessages } from './hooks/use-item-renaming';
12
17
  type GridRow = FileManagerGridRow;
13
- export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel'>;
18
+ export type DialFileManagerConflictResolutionPopupOptions = Omit<ConflictResolutionPopupProps, 'open' | 'onClose' | 'onReplace' | 'onDuplicate' | 'conflictingFiles'>;
19
+ export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'title'> & {
20
+ getCopyHeader?: (itemsCount: number, itemName?: string) => string;
21
+ getMoveHeader?: (itemsCount: number, itemName?: string) => string;
22
+ };
14
23
  export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 'selectedPath' | 'onItemClick'> {
15
24
  width?: number;
16
25
  title?: string;
17
- containerCssClass?: string;
26
+ containerClassName?: string;
18
27
  additionalButtons?: ReactNode;
19
28
  collapsed?: boolean;
20
29
  onCollapseChange?: (collapsed: boolean) => void;
30
+ expandedPaths?: Set<string>;
31
+ loadedPaths?: Set<string>;
32
+ onExpandedPathsChange?: (expandedPaths: Set<string>) => void;
21
33
  actionLabels?: {
22
34
  [DialFileManagerActions.Duplicate]?: string;
23
35
  [DialFileManagerActions.Copy]?: string;
@@ -39,9 +51,24 @@ export interface GridOptions extends Omit<DialGridProps<GridRow>, 'rowData' | 'c
39
51
  filterable?: boolean;
40
52
  dateLocale?: Intl.LocalesArgument;
41
53
  dateOptions?: Intl.DateTimeFormatOptions;
54
+ visibleColumns?: FileManagerColumnKey[];
55
+ actionLabels?: {
56
+ [DialFileManagerActions.Duplicate]?: string;
57
+ [DialFileManagerActions.Copy]?: string;
58
+ [DialFileManagerActions.Rename]?: string;
59
+ [DialFileManagerActions.Download]?: string;
60
+ [DialFileManagerActions.Delete]?: string;
61
+ [DialFileManagerActions.Move]?: string;
62
+ };
42
63
  }
43
- export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVisible' | 'onToggleHiddenFiles'>;
44
- export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection' | 'actions'> & {
64
+ export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVisible' | 'onToggleHiddenFiles'> & {
65
+ newActionLabels?: {
66
+ uploadFiles?: string;
67
+ newFolder?: string;
68
+ uploadArchive?: string;
69
+ };
70
+ };
71
+ export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection' | 'actions' | 'selectedCount'> & {
45
72
  actionLabels?: {
46
73
  [DialFileManagerActions.Duplicate]?: string;
47
74
  [DialFileManagerActions.Copy]?: string;
@@ -57,7 +84,7 @@ export interface CreateFolderValidationMessages {
57
84
  }
58
85
  export interface DialFileManagerProps {
59
86
  path?: string;
60
- cssClass?: string;
87
+ className?: string;
61
88
  items?: DialFile[];
62
89
  rootItem?: DialRootFolder;
63
90
  filesLoading?: boolean;
@@ -70,19 +97,24 @@ export interface DialFileManagerProps {
70
97
  bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
71
98
  deleteConfirmationOptions?: DeleteConfirmationOptions;
72
99
  destinationFolderPopupOptions?: DialFileManagerDestinationFolderPopupOptions;
100
+ conflictResolutionPopupOptions?: DialFileManagerConflictResolutionPopupOptions;
101
+ compactViewWidthBreakpoint?: number;
73
102
  onPathChange?: (nextPath?: string) => void;
74
103
  onTableFileClick?: (file: GridRow) => void;
75
104
  onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
76
105
  onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
77
106
  onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
78
107
  onDownloadFiles?: (items: DialFile[]) => void;
79
- onRename?: (itemPath: string) => void;
80
- onRenameSave?: (value: string) => void;
81
- onRenameCancel?: () => void;
82
108
  onRenameValidate?: (value: string, item: DialFile) => string | null;
83
- onCreateFolder?: (folderPath: string, file: File, name: string, bucket?: string) => void;
109
+ renameValidationMessages?: RenameValidationMessages;
110
+ onCreateFolder?: (file: DialUploadFileItem, folderPath: string, fileId: string) => void | Promise<void>;
84
111
  onCreateFolderValidate?: (name: string, parentFolder: DialFile) => string | null;
85
- createFolderValidationMessages?: CreateFolderValidationMessages;
112
+ folderCreationValidationMessages?: FolderCreationValidationMessages;
113
+ onUploadFiles?: (files: DialUploadFileItem[], destinationFolder: string) => void;
114
+ onValidateUpload?: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => FileUploadValidationResult | Promise<FileUploadValidationResult>;
115
+ maxFileSize?: number;
116
+ uploadValidationMessages?: FileUploadValidationMessages;
117
+ onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
86
118
  }
87
119
  /**
88
120
  * File Manager layout with a collapsible folders tree, breadcrumb/search header, and a data grid.
@@ -130,7 +162,7 @@ export interface DialFileManagerProps {
130
162
  * ```
131
163
  *
132
164
  * @param [path] - Absolute path of the current location (e.g. "/All files/Design/Icons")
133
- * @param [cssClass] - Additional classes for the root container
165
+ * @param [className] - Additional classes for the root container
134
166
  * @param [items] - Full hierarchical list of files and folders used by both tree and grid
135
167
  * @param [rootItem] - Optional root folder item to represent the top-level container in the tree
136
168
  * @param [filesLoading=false] - When true, shows skeleton loading state in the grid
@@ -142,12 +174,18 @@ export interface DialFileManagerProps {
142
174
  * @param [bulkActionsToolbarOptions] - Options for the bulk actions toolbar shown when items are selected
143
175
  * @param [deleteConfirmationOptions] - Options for the delete confirmation popup
144
176
  *
177
+ * @param [compactViewWidthBreakpoint=DEFAULT_COMPACT_VIEW_WIDTH_BREAKPOINT] - Width (px) below which the component switches to compact view.
178
+ *
145
179
  * @param [onPathChange] - Callback fired when user navigates via tree or breadcrumb
146
180
  * @param [onTableFileClick] - Callback fired when a file row is clicked in the grid
147
181
  *
148
182
  * @param [onCopyFiles] - Callback fired when files copy-paste
149
183
  * @param [onMoveToFiles] - Callback fired when files cut-paste or rename
150
184
  * @param [onDeleteFiles] - Callback fired when files are deleted
185
+ *
186
+ * @param [onDownloadFiles] - Callback fired when files are downloaded
187
+ *
188
+ * @param [onUploadArchive] - Callback fired when archive files are uploaded
151
189
  */
152
190
  export declare const DialFileManager: FC<DialFileManagerProps>;
153
191
  /**
@@ -1,6 +1,10 @@
1
+ import { DragEvent, RefObject } from 'react';
1
2
  import { DialFile, DialRootFolder, DialFileNodeType } from '../../models/file';
2
- import { FileTreeOptions, NavigationPanelOptions, GridOptions, ToolbarOptions, BulkActionsToolbarOptions, DialFileManagerProps, DeleteConfirmationOptions, DialFileManagerDestinationFolderPopupOptions } from './FileManager';
3
- import { DestinationFolderMode } from './hooks/use-file-clipboard';
3
+ import { FileTreeOptions, NavigationPanelOptions, GridOptions, ToolbarOptions, BulkActionsToolbarOptions, DialFileManagerProps, DeleteConfirmationOptions, DialFileManagerDestinationFolderPopupOptions, DialFileManagerConflictResolutionPopupOptions } from './FileManager';
4
+ import { FileUploadValidationMessages } from './hooks/use-file-upload';
5
+ import { DropdownItem } from '../../models/dropdown';
6
+ import { FileConflictDecision } from './components/ConflictResolutionPopup/ConflictResolutionPopup';
7
+ import { DestinationFolderMode } from '../../types/file-manager';
4
8
  export interface FileManagerGridRow {
5
9
  id: string;
6
10
  name: string;
@@ -10,9 +14,10 @@ export interface FileManagerGridRow {
10
14
  path: string;
11
15
  nodeType: DialFileNodeType;
12
16
  extension?: string;
17
+ isTemporary?: boolean;
13
18
  }
14
19
  export interface FileManagerContextValue {
15
- cssClass?: string;
20
+ className?: string;
16
21
  items: DialFile[];
17
22
  rootItem?: DialRootFolder;
18
23
  filesLoading?: boolean;
@@ -23,6 +28,8 @@ export interface FileManagerContextValue {
23
28
  bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
24
29
  deleteConfirmationOptions?: DeleteConfirmationOptions;
25
30
  destinationFolderPopupOptions?: DialFileManagerDestinationFolderPopupOptions;
31
+ conflictResolutionPopupOptions?: DialFileManagerConflictResolutionPopupOptions;
32
+ compactViewWidthBreakpoint?: number;
26
33
  currentPath?: string;
27
34
  setCurrentPath: (p?: string) => void;
28
35
  searchValue: string;
@@ -40,7 +47,7 @@ export interface FileManagerContextValue {
40
47
  currentFolder?: DialFile;
41
48
  gridRows: FileManagerGridRow[];
42
49
  handleCopyTo: (destinationFolder: string) => void;
43
- handleMoveTo: (destinationFolder: string, sourceFolder: string) => void;
50
+ handleMoveTo: (destinationFolder: string, sourceFolder?: string) => void;
44
51
  handleDuplicate: (files: DialFile[]) => void;
45
52
  handleOpenDestinationFolderPopup: (mode: DestinationFolderMode) => void;
46
53
  handleCloseDestinationFolderPopup: () => void;
@@ -49,10 +56,12 @@ export interface FileManagerContextValue {
49
56
  handleSetCopiedFiles: (files: DialFile[]) => void;
50
57
  handleSetMovedFiles: (files: DialFile[]) => void;
51
58
  renamedPath?: string;
59
+ renamedItem?: DialFile;
52
60
  onRename: (file: string) => void;
53
61
  onRenameSave: (value: string) => void;
54
62
  onRenameCancel: () => void;
55
63
  onRenameValidate: (value: string, item: DialFile) => string | null;
64
+ getDisplayName: (item: DialFile) => string;
56
65
  openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
57
66
  closeDeleteConfirmation: () => void;
58
67
  confirmDelete: () => void;
@@ -65,5 +74,39 @@ export interface FileManagerContextValue {
65
74
  handleTableRowClick: (row: FileManagerGridRow) => void;
66
75
  onTableFileClick?: DialFileManagerProps['onTableFileClick'];
67
76
  handleDownloadFiles: (items: DialFile[]) => void;
77
+ isDragging: boolean;
78
+ isDraggingOverWindow: boolean;
79
+ uploadError?: string;
80
+ handleDragEnter: (e: DragEvent) => void;
81
+ handleDragLeave: (e: DragEvent) => void;
82
+ handleDragOver: (e: DragEvent) => void;
83
+ handleDrop: (e: DragEvent) => void;
84
+ clearUploadError: () => void;
85
+ onUploadFiles?: DialFileManagerProps['onUploadFiles'];
86
+ onValidateUpload?: DialFileManagerProps['onValidateUpload'];
87
+ maxFileSize?: number;
88
+ uploadValidationMessages?: FileUploadValidationMessages;
89
+ newActions: DropdownItem[];
90
+ isNewButtonVisible: boolean;
91
+ openFileDialog: () => void;
92
+ fileInputRef: RefObject<HTMLInputElement | null>;
93
+ isCreatingFolder: boolean;
94
+ newFolderTempId: string | null;
95
+ startFolderCreation: () => void;
96
+ cancelFolderCreation: () => void;
97
+ saveFolderCreation: (name: string) => Promise<void>;
98
+ validateFolderName: (name: string) => string | null;
99
+ conflictingFiles: DialFile[];
100
+ conflictResolutionOpen: boolean;
101
+ closeConflictResolution: () => void;
102
+ handleConflictReplace: () => void;
103
+ handleConflictDuplicate: () => void;
104
+ handleConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
105
+ uploadConflictingFiles: DialFile[];
106
+ uploadConflictResolutionOpen: boolean;
107
+ closeUploadConflictResolution: () => void;
108
+ handleUploadConflictReplace: () => void;
109
+ handleUploadConflictDuplicate: () => void;
110
+ handleUploadConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
68
111
  }
69
112
  export declare const FileManagerContext: import('react').Context<FileManagerContextValue | undefined>;
@@ -13,6 +13,7 @@ export interface FileManagerProviderProps extends Omit<DialFileManagerProps, 'ch
13
13
  * - clipboard (copy / cut / paste)
14
14
  * - delete confirmation state
15
15
  * - computed grid rows
16
+ * - new actions
16
17
  *
17
18
  */
18
19
  export declare const FileManagerProvider: FC<FileManagerProviderProps>;
@@ -0,0 +1,92 @@
1
+ import { FC } from 'react';
2
+ import { DialFile } from '../../../../models/file';
3
+ import { DialFileManagerConflictActions, DialFileManagerConflictStrategies } from '../../../../types/file-manager';
4
+ export interface FileConflictDecision {
5
+ file: DialFile;
6
+ action: DialFileManagerConflictActions;
7
+ }
8
+ export interface ConflictResolutionPopupProps {
9
+ open: boolean;
10
+ onClose: () => void;
11
+ onReplace: () => void;
12
+ onDuplicate: () => void;
13
+ onDecideForEach?: (decisions: FileConflictDecision[]) => void;
14
+ conflictingFiles: DialFile[];
15
+ title?: string;
16
+ singleFileTitle?: string;
17
+ multipleFilesTitle?: string;
18
+ message?: string;
19
+ actionLabels?: {
20
+ [DialFileManagerConflictActions.Replace]?: string;
21
+ [DialFileManagerConflictActions.Duplicate]?: string;
22
+ [DialFileManagerConflictActions.Cancel]?: string;
23
+ };
24
+ strategyLabels?: {
25
+ [DialFileManagerConflictStrategies.ReplaceAll]?: string;
26
+ [DialFileManagerConflictStrategies.DuplicateAll]?: string;
27
+ [DialFileManagerConflictStrategies.DecideForEach]?: string;
28
+ };
29
+ confirmLabel?: string;
30
+ cancelLabel?: string;
31
+ nameColumnLabel?: string;
32
+ actionColumnLabel?: string;
33
+ }
34
+ /**
35
+ * ConflictResolutionPopup
36
+ *
37
+ * A popup dialog for resolving file name conflicts during copy or move operations.
38
+ * Shows different UI based on number of conflicting files:
39
+ * - Single file: Simple Replace/Duplicate choice with radio buttons
40
+ * - Multiple files: Replace all / Duplicate all / Decide for each strategy with optional grid
41
+ *
42
+ * When "Decide for each" is selected, displays a grid with dropdown selectors for individual
43
+ * file resolution (Replace/Duplicate/Cancel).
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * // Single file conflict
48
+ * <ConflictResolutionPopup
49
+ * open={isOpen}
50
+ * onClose={handleClose}
51
+ * onReplace={handleReplace}
52
+ * onDuplicate={handleDuplicate}
53
+ * conflictingFiles={[file]}
54
+ * />
55
+ *
56
+ * // Multiple files with custom labels
57
+ * <ConflictResolutionPopup
58
+ * open={isOpen}
59
+ * onClose={handleClose}
60
+ * onReplace={handleReplaceAll}
61
+ * onDuplicate={handleDuplicateAll}
62
+ * onDecideForEach={handleDecisions}
63
+ * conflictingFiles={files}
64
+ * actionLabels={{
65
+ * [DialFileManagerConflictActions.Replace]: 'Overwrite',
66
+ * [DialFileManagerConflictActions.Duplicate]: 'Keep Both',
67
+ * }}
68
+ * strategyLabels={{
69
+ * [DialFileManagerConflictStrategies.ReplaceAll]: 'Overwrite All',
70
+ * [DialFileManagerConflictStrategies.DuplicateAll]: 'Keep All',
71
+ * }}
72
+ * />
73
+ * ```
74
+ *
75
+ * @param open - Whether the popup is visible
76
+ * @param onClose - Callback fired when the popup is closed
77
+ * @param onReplace - Callback fired when Replace/Replace All is confirmed
78
+ * @param onDuplicate - Callback fired when Duplicate/Duplicate All is confirmed
79
+ * @param [onDecideForEach] - Callback fired when individual decisions are confirmed; receives array of decisions
80
+ * @param conflictingFiles - Array of files with name conflicts
81
+ * @param [title] - Custom title (overrides singleFileTitle and multipleFilesTitle)
82
+ * @param [singleFileTitle="Replace Or Duplicate Item"] - Title for single file conflicts
83
+ * @param [multipleFilesTitle="Replace Or Duplicate Items"] - Title for multiple file conflicts
84
+ * @param [message] - Custom message (overrides default conflict description)
85
+ * @param [actionLabels] - Custom labels for conflict actions (Replace/Duplicate/Cancel)
86
+ * @param [strategyLabels] - Custom labels for conflict strategies (Replace all/Duplicate all/Decide for each)
87
+ * @param [confirmLabel="Confirm"] - Label for the confirm button
88
+ * @param [cancelLabel="Cancel"] - Label for the cancel button
89
+ * @param [nameColumnLabel="Name"] - Label for the file name column in the grid
90
+ * @param [actionColumnLabel="Action"] - Label for the action column in the grid
91
+ */
92
+ export declare const ConflictResolutionPopup: FC<ConflictResolutionPopupProps>;
@@ -11,6 +11,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
11
11
  addFolderLabel?: string;
12
12
  hiddenFilesSwitcherLabel?: string;
13
13
  mode?: 'copy' | 'move';
14
+ title?: string;
14
15
  }
15
16
  /**
16
17
  * DestinationFolderPopup
@@ -26,6 +27,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
26
27
  * onClose={handleClose}
27
28
  * onConfirm={handleConfirm}
28
29
  * mode="copy"
30
+ * title="Copy 3 files"
29
31
  * items={files}
30
32
  * rootItem={rootFolder}
31
33
  * path={currentPath}
@@ -36,11 +38,12 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
36
38
  * @param open - Whether the popup is visible
37
39
  * @param onClose - Callback fired when the popup is closed
38
40
  * @param [onConfirm] - Callback fired when the confirm button is clicked
39
- * @param [mode="copy"] - Operation mode: 'copy' or 'move'
41
+ * @param [mode=DestinationFolderMode.Copy] - Operation mode: 'copy' or 'move'
40
42
  * @param [copyLabel="Copy"] - Label for the copy button
41
43
  * @param [moveLabel="Move"] - Label for the move button
42
44
  * @param [addFolderLabel="Add folder"] - Label for the add folder button
43
45
  * @param [hiddenFilesSwitcherLabel="Show hidden files"] - Label for the hidden files toggle
46
+ * @param [title] - Custom title for the popup header
44
47
  * @param items - Array of files to display in the File Manager
45
48
  * @param rootItem - Root folder item
46
49
  * @param path - Current path in the File Manager
@@ -0,0 +1,55 @@
1
+ import { FC } from 'react';
2
+ import { DialFileNodeType } from '../../../../models/file';
3
+ interface DialFileManagerItemSummaryCellProps {
4
+ id: string;
5
+ name: string;
6
+ nodeType: DialFileNodeType;
7
+ size?: string;
8
+ updatedAt?: string;
9
+ dateLocale?: Intl.LocalesArgument;
10
+ dateOptions?: Intl.DateTimeFormatOptions;
11
+ }
12
+ /**
13
+ * Renders file or folder details inside the File Manager list/grid item.
14
+ *
15
+ * Displays the item name with an icon (via `DialFileManagerItemName`),
16
+ * followed by a small details row:
17
+ *
18
+ * - File size (e.g., `"15 KB"`)
19
+ * - A separator dot
20
+ * - Formatted update date (via `DialDateCellRenderer`)
21
+ *
22
+ * The component automatically determines whether to show a **file** or **folder**
23
+ * icon based on `nodeType`.
24
+ *
25
+ * ### Example
26
+ * ```tsx
27
+ * <DialFileManagerItemSummaryCell
28
+ * id="42"
29
+ * name="Report.pdf"
30
+ * nodeType={DialFileNodeType.FILE}
31
+ * size="220 KB"
32
+ * updatedAt="2025-07-20T00:00:00Z"
33
+ * dateLocale="en-US"
34
+ * dateOptions={{ timeZone: 'UTC' }}
35
+ * />
36
+ *
37
+ * <DialFileManagerItemSummaryCell
38
+ * id="folder-1"
39
+ * name="Projects"
40
+ * nodeType={DialFileNodeType.FOLDER}
41
+ * size="—"
42
+ * updatedAt={undefined}
43
+ * />
44
+ * ```
45
+ *
46
+ * @param id - Unique identifier passed to `DialFileManagerItemName` as `elementId`.
47
+ * @param name - File or folder display name.
48
+ * @param nodeType - Determines whether the item renders as a **File** or **Folder**.
49
+ * @param size - Human-readable file size (e.g., `"15 KB"`). May be `"—"` or omitted.
50
+ * @param updatedAt - Date or timestamp passed to `DialDateCellRenderer`. If invalid or missing, renders `"—"`.
51
+ * @param dateLocale - Optional locale override for date formatting (e.g., `"fr-FR"`).
52
+ * @param dateOptions - Optional `Intl.DateTimeFormat` configuration (e.g., `{ timeZone: 'UTC' }`).
53
+ */
54
+ export declare const DialFileManagerItemSummaryCell: FC<DialFileManagerItemSummaryCellProps>;
55
+ export {};
@@ -4,9 +4,10 @@ export interface DialActionDropdownItem extends DropdownItem {
4
4
  title: string;
5
5
  }
6
6
  export interface DialFileManagerBulkActionsToolbarProps {
7
- selectionLabel: string;
7
+ getSelectionLabel: (selectedCount: number) => string;
8
8
  onClearSelection: () => void;
9
9
  actions: DialActionDropdownItem[];
10
+ selectedCount: number;
10
11
  }
11
12
  /**
12
13
  * A responsive toolbar component displayed when files or items are selected
@@ -33,7 +34,7 @@ export interface DialFileManagerBulkActionsToolbarProps {
33
34
  * @example
34
35
  * ```tsx
35
36
  * <DialFileManagerSelectionToolbar
36
- * selectionLabel="3 files selected"
37
+ * getSelectionLabel={(count) => `${count} files selected`}
37
38
  * onClearSelection={() => console.log('Cleared')}
38
39
  * actions={[
39
40
  * { key: 'download', title: 'Download', icon: <IconDownload />, onClick: () => {} },
@@ -43,10 +44,11 @@ export interface DialFileManagerBulkActionsToolbarProps {
43
44
  * ```
44
45
  *
45
46
  * @param {object} props
46
- * @param {string} props.selectionLabel - Label showing current selection status (e.g., "3 files selected").
47
+ * @param {() => string} props.getSelectionLabel - Function to get the label showing current selection status (e.g., "3 files selected").
47
48
  * @param {() => void} props.onClearSelection - Callback invoked when the clear selection button is clicked.
48
49
  * @param {DialActionDropdownItem[]} props.actions - List of available toolbar actions.
49
50
  * Each action defines a title, icon, key, and optional click handler.
51
+ * @param {number} [props.selectedCount] - Count of currently selected items.
50
52
  *
51
53
  * @returns {JSX.Element} A responsive toolbar that adjusts visible actions based on available width.
52
54
  */
@@ -38,7 +38,7 @@ export interface DialFileManagerItemIconProps extends Omit<DialFileIconProps, 'e
38
38
  * @param {boolean} [props.loading=false] - Whether to display the loading state.
39
39
  * @param {number} [props.size] - Optional icon size override.
40
40
  * @param {number} [props.stroke] - Optional icon stroke width override.
41
- * @param {string} [props.cssClass] - Optional CSS class for styling.
41
+ * @param {string} [props.className] - Optional CSS class for styling.
42
42
  * @param {boolean} [props.decorative] - Whether the icon is decorative (for accessibility).
43
43
  * @param {string} [props.label] - Accessible label for screen readers.
44
44
  * @param {ReactNode} [props.indicator] - Optional indicator to display over the icon.
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { DialFileManagerItemNameInputProps } from '../FileManagerItemNameInput/FileManagerItemNameInput';
3
3
  import { DialItemType } from '../../../../types/item';
4
4
  export interface DialFileManagerItemNameProps extends DialFileManagerItemNameInputProps {
@@ -8,6 +8,7 @@ export interface DialFileManagerItemNameProps extends DialFileManagerItemNameInp
8
8
  editing?: boolean;
9
9
  loading?: boolean;
10
10
  shared?: boolean;
11
+ details?: ReactNode;
11
12
  validate?: (value: string) => string | null;
12
13
  onSave?: (value: string) => void;
13
14
  onCancel?: () => void;
@@ -8,11 +8,12 @@ export interface DialFileManagerItemNameInputProps {
8
8
  elementId: string;
9
9
  iconSize?: number;
10
10
  iconStroke?: number;
11
- iconCssClass?: string;
11
+ iconClassName?: string;
12
12
  iconLabel?: string;
13
13
  iconIndicator?: ReactNode;
14
14
  inputInvalid?: boolean;
15
15
  inputInvalidMessage?: string;
16
+ inputContainerClassName?: string;
16
17
  inputIconAfter?: ReactNode;
17
18
  inputRef?: Ref<HTMLInputElement>;
18
19
  onChange?: (value?: string) => void;
@@ -53,12 +54,13 @@ export interface DialFileManagerItemNameInputProps {
53
54
  * @param {boolean} [props.loading=false] - Whether the icon is loading.
54
55
  * @param {number} [props.iconSize] - Optional size override for the icon.
55
56
  * @param {number} [props.iconStroke] - Optional stroke width override for the icon.
56
- * @param {string} [props.iconCssClass] - Optional CSS class for the icon.
57
+ * @param {string} [props.iconClassName] - Optional CSS class for the icon.
57
58
  * @param {string} [props.iconLabel] - Optional accessible label for the icon.
58
59
  * @param {ReactNode} [props.iconIndicator] - Optional indicator to render over the icon.
59
60
  * @param {boolean} [props.inputInvalid=false] - Marks the input as invalid.
60
61
  * @param {string} [props.inputInvalidMessage] - Tooltip message shown when invalid.
61
62
  * @param {ReactNode} [props.inputIconAfter] - Optional icon shown after the input (defaults to an error icon).
63
+ * @param {string} [props.inputContainerClassName] - Additional CSS classes applied to the input container.
62
64
  * @param {Ref<HTMLInputElement>} [props.inputRef] - Ref to access the underlying input element.
63
65
  * @param {(value: string) => void} [props.onChange] - Callback fired when input value changes.
64
66
  */
@@ -1,11 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { DialBreadcrumbProps } from '../../../Breadcrumb/Breadcrumb';
3
3
  import { DialSearchProps } from '../../../Search/Search';
4
- export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumbProps, 'pathItems' | 'children' | 'cssClass' | 'separator'>, Omit<DialSearchProps, 'onChange' | 'elementId' | 'value' | 'cssClass' | 'containerCssClass' | 'placeholder' | 'size'> {
4
+ export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumbProps, 'pathItems' | 'children' | 'className' | 'separator'>, Omit<DialSearchProps, 'onChange' | 'elementId' | 'value' | 'className' | 'containerClassName' | 'placeholder' | 'size'> {
5
5
  path?: string;
6
6
  makeHref?: (segments: string[], index: number) => string | undefined;
7
- cssClass?: string;
8
- breadcrumbCssClass?: string;
7
+ className?: string;
8
+ breadcrumbClassName?: string;
9
9
  onItemClick?: (href?: string) => void;
10
10
  rootItemPath?: string;
11
11
  rootItemLabel?: string;
@@ -13,8 +13,9 @@ export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumb
13
13
  value?: string | number | null;
14
14
  elementId?: string;
15
15
  onSearchChange?: (value: string) => void;
16
- searchCssClass?: string;
17
- searchContainerCssClass?: string;
16
+ searchClassName?: string;
17
+ searchContainerClassName?: string;
18
+ isCompactView?: boolean;
18
19
  }
19
20
  /**
20
21
  * FileManagerNavigationPanel
@@ -38,23 +39,24 @@ export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumb
38
39
  * // With clickable parents
39
40
  * <FileManagerNavigationPanel
40
41
  * path="Org/Design/Assets"
41
- * makeHref={(segments, i) => '#' + '/' + segments.slice(0, i + 1).join('/')}
42
+ * makeHref={(segments, i) => '#' + segments.slice(0, i + 1).join('/')}
42
43
  * />
43
44
  * ```
44
45
  *
45
46
  * @param [ariaLabel="Breadcrumb"] - Aria label for the breadcrumb `<nav>`
46
- * @param [titleCssClass] - Extra classes for breadcrumb titles
47
+ * @param [titleClassName] - Extra classes for breadcrumb titles
47
48
  * @param [path] - A full path string that will be split into breadcrumb items
48
49
  * @param [makeHref] - Factory to create hrefs for segments
49
50
  * @param [onItemClick] - Callback fired when a breadcrumb item is clicked
50
- * @param [cssClass] - Additional classes for the panel container
51
- * @param [breadcrumbCssClass] - Classes forwarded to inner `DialBreadcrumb`
51
+ * @param [className] - Additional classes for the panel container
52
+ * @param [breadcrumbClassName] - ClassName forwarded to inner `DialBreadcrumb`
52
53
  * @param [searchable=true] - Whether to render the search control
53
54
  * @param [value] - Controlled value for the search input (parent-managed)
54
55
  * @param [elementId="fm-search"] - DOM id for the internal DialSearch input
55
56
  * @param [size=SearchSize.Base] - Size of the search input (from DialSearchProps)
56
57
  * @param [onSearchChange] - Callback fired when the search value changes
57
- * @param [searchCssClass] - Extra classes for the search input element
58
- * @param [searchContainerCssClass] - Extra classes for the search container
58
+ * @param [searchClassName] - Extra classes for the search input element
59
+ * @param [searchContainerClassName] - Extra classes for the search container
60
+ * @param [isCompactView=false] - Whether the component should render in compact mode
59
61
  */
60
62
  export declare const DialFileManagerNavigationPanel: FC<DialFileManagerNavigationPanelProps>;
@@ -1,3 +1,3 @@
1
- export declare const panelBaseClasses = "w-full h-[12] flex items-center justify-between gap-4";
2
- export declare const breadcrumbContainerClasses = "min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded";
3
- export declare const searchContainerClasses = "w-[260px]";
1
+ export declare const panelBaseClassName = "w-full flex items-center justify-between gap-4";
2
+ export declare const breadcrumbContainerClassName = "min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded";
3
+ export declare const searchContainerWrapperClassName = "w-[260px]";