@epam/ai-dial-ui-kit 0.5.0-rc.6 → 0.5.0-rc.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/dial-ui-kit.cjs.js +29 -29
- package/dist/dial-ui-kit.es.js +14808 -12964
- package/dist/index.css +2 -2
- package/dist/src/components/Alert/Alert.d.ts +2 -2
- package/dist/src/components/Alert/constants.d.ts +2 -2
- package/dist/src/components/AutocompleteInput/AutocompleteInput.d.ts +10 -10
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +6 -6
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +8 -8
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/dist/src/components/Breadcrumb/constants.d.ts +10 -10
- package/dist/src/components/Button/Button.d.ts +10 -18
- package/dist/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/src/components/CloseButton/CloseButton.d.ts +5 -3
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +6 -6
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +3 -3
- package/dist/src/components/ConfirmationPopup/constants.d.ts +3 -3
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +8 -8
- package/dist/src/components/DraggableItem/constants.d.ts +2 -2
- package/dist/src/components/Dropdown/Dropdown.d.ts +4 -2
- package/dist/src/components/Dropdown/constants.d.ts +7 -7
- package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +4 -4
- package/dist/src/components/EllipsisTooltip/constants.d.ts +1 -1
- package/dist/src/components/Field/Field.d.ts +4 -6
- package/dist/src/components/FileIcon/FileIcon.d.ts +2 -2
- package/dist/src/components/FileManager/FileManager.d.ts +56 -10
- package/dist/src/components/FileManager/FileManagerContext.d.ts +40 -4
- package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
- package/dist/src/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.d.ts +92 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +5 -1
- package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +1 -1
- package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +2 -2
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +11 -11
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/constants.d.ts +3 -3
- package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +13 -13
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +1 -0
- package/dist/src/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.d.ts +13 -0
- package/dist/src/components/FileManager/constants.d.ts +12 -7
- package/dist/src/components/FileManager/hooks/__tests__/use-conflict-resolution.spec.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/__tests__/use-file-upload.spec.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-bulk-actions.d.ts +22 -0
- package/dist/src/components/FileManager/hooks/use-conflict-resolution.d.ts +26 -0
- package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +14 -3
- package/dist/src/components/FileManager/hooks/use-file-delete.d.ts +3 -2
- package/dist/src/components/FileManager/hooks/use-file-download.d.ts +2 -1
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +34 -0
- package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +21 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +20 -0
- package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +8 -5
- package/dist/src/components/FileManager/hooks/use-new-actions.d.ts +16 -0
- package/dist/src/components/FileManager/utils.d.ts +1 -1
- package/dist/src/components/FileName/FileName.d.ts +4 -2
- package/dist/src/components/FolderName/FolderName.d.ts +6 -3
- package/dist/src/components/FormItem/FormItem.d.ts +9 -9
- package/dist/src/components/FormItem/constants.d.ts +1 -1
- package/dist/src/components/FormPopup/FormPopup.d.ts +1 -1
- package/dist/src/components/FormPopup/constants.d.ts +1 -1
- package/dist/src/components/Grid/Grid.d.ts +7 -3
- package/dist/src/components/Grid/constants.d.ts +1 -1
- package/dist/src/components/Grid/hooks/use-grid-selection.d.ts +7 -4
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +2 -2
- package/dist/src/components/Grid/renderers/constants.d.ts +1 -1
- package/dist/src/components/Icon/Icon.d.ts +0 -1
- package/dist/src/components/Input/Input.d.ts +4 -4
- package/dist/src/components/InputField/InputField.d.ts +3 -3
- package/dist/src/components/InputPopup/InputPopup.d.ts +6 -6
- package/dist/src/components/Loader/Loader.d.ts +5 -5
- package/dist/src/components/Loader/constants.d.ts +2 -2
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +6 -3
- package/dist/src/components/PasswordInput/PasswordInputField.d.ts +1 -1
- package/dist/src/components/Popup/Popup.d.ts +6 -6
- package/dist/src/components/Popup/constants.d.ts +3 -3
- package/dist/src/components/RadioButton/RadioButton.d.ts +6 -6
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +20 -20
- package/dist/src/components/RadioGroup/constants.d.ts +3 -3
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +2 -2
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +6 -8
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +33 -0
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +69 -0
- package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +10 -0
- package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +8 -0
- package/dist/src/components/Search/Search.d.ts +4 -4
- package/dist/src/components/Search/constants.d.ts +4 -4
- package/dist/src/components/Select/Select.d.ts +9 -3
- package/dist/src/components/Select/constants.d.ts +7 -6
- package/dist/src/components/SelectField/SelectField.d.ts +6 -6
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +2 -2
- package/dist/src/components/Tab/Tab.d.ts +4 -4
- package/dist/src/components/Tabs/Tabs.d.ts +9 -9
- package/dist/src/components/Tag/Tag.d.ts +2 -2
- package/dist/src/components/TextAreaField/TextAreaField.d.ts +3 -3
- package/dist/src/components/Textarea/Textarea.d.ts +4 -4
- package/dist/src/index.d.ts +5 -1
- package/dist/src/models/breadcrumb.d.ts +1 -1
- package/dist/src/models/dropdown.d.ts +1 -0
- package/dist/src/models/file-manager.d.ts +15 -0
- package/dist/src/models/tab.d.ts +2 -1
- package/dist/src/types/dropdown.d.ts +2 -1
- package/dist/src/types/file-manager.d.ts +12 -9
- package/dist/src/types/resizable-container.d.ts +4 -0
- package/dist/src/types/tab.d.ts +1 -1
- package/package.json +5 -4
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
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
|
-
|
|
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 [
|
|
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,26 @@ 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 {
|
|
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 } 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
|
|
18
|
+
export type DialFileManagerConflictResolutionPopupOptions = Omit<ConflictResolutionPopupProps, 'open' | 'onClose' | 'onReplace' | 'onDuplicate' | 'conflictingFiles'>;
|
|
19
|
+
export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'getCopyHeader' | 'getMoveHeader'>;
|
|
14
20
|
export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 'selectedPath' | 'onItemClick'> {
|
|
15
21
|
width?: number;
|
|
16
22
|
title?: string;
|
|
17
|
-
|
|
23
|
+
containerClassName?: string;
|
|
18
24
|
additionalButtons?: ReactNode;
|
|
19
25
|
collapsed?: boolean;
|
|
20
26
|
onCollapseChange?: (collapsed: boolean) => void;
|
|
27
|
+
expandedPaths?: Set<string>;
|
|
28
|
+
onExpandedPathsChange?: (expandedPaths: Set<string>) => void;
|
|
21
29
|
actionLabels?: {
|
|
22
30
|
[DialFileManagerActions.Duplicate]?: string;
|
|
23
31
|
[DialFileManagerActions.Copy]?: string;
|
|
@@ -39,12 +47,39 @@ export interface GridOptions extends Omit<DialGridProps<GridRow>, 'rowData' | 'c
|
|
|
39
47
|
filterable?: boolean;
|
|
40
48
|
dateLocale?: Intl.LocalesArgument;
|
|
41
49
|
dateOptions?: Intl.DateTimeFormatOptions;
|
|
50
|
+
actionLabels?: {
|
|
51
|
+
[DialFileManagerActions.Duplicate]?: string;
|
|
52
|
+
[DialFileManagerActions.Copy]?: string;
|
|
53
|
+
[DialFileManagerActions.Rename]?: string;
|
|
54
|
+
[DialFileManagerActions.Download]?: string;
|
|
55
|
+
[DialFileManagerActions.Delete]?: string;
|
|
56
|
+
[DialFileManagerActions.Move]?: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVisible' | 'onToggleHiddenFiles'> & {
|
|
60
|
+
newActionLabels?: {
|
|
61
|
+
uploadFiles?: string;
|
|
62
|
+
newFolder?: string;
|
|
63
|
+
uploadArchive?: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection' | 'actions'> & {
|
|
67
|
+
actionLabels?: {
|
|
68
|
+
[DialFileManagerActions.Duplicate]?: string;
|
|
69
|
+
[DialFileManagerActions.Copy]?: string;
|
|
70
|
+
[DialFileManagerActions.Download]?: string;
|
|
71
|
+
[DialFileManagerActions.Delete]?: string;
|
|
72
|
+
[DialFileManagerActions.Move]?: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export interface CreateFolderValidationMessages {
|
|
76
|
+
emptyName?: string;
|
|
77
|
+
duplicateName?: string;
|
|
78
|
+
forbiddenChars?: string;
|
|
42
79
|
}
|
|
43
|
-
export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVisible' | 'onToggleHiddenFiles'>;
|
|
44
|
-
export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection'>;
|
|
45
80
|
export interface DialFileManagerProps {
|
|
46
81
|
path?: string;
|
|
47
|
-
|
|
82
|
+
className?: string;
|
|
48
83
|
items?: DialFile[];
|
|
49
84
|
rootItem?: DialRootFolder;
|
|
50
85
|
filesLoading?: boolean;
|
|
@@ -57,16 +92,23 @@ export interface DialFileManagerProps {
|
|
|
57
92
|
bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
|
|
58
93
|
deleteConfirmationOptions?: DeleteConfirmationOptions;
|
|
59
94
|
destinationFolderPopupOptions?: DialFileManagerDestinationFolderPopupOptions;
|
|
95
|
+
conflictResolutionPopupOptions?: DialFileManagerConflictResolutionPopupOptions;
|
|
60
96
|
onPathChange?: (nextPath?: string) => void;
|
|
61
97
|
onTableFileClick?: (file: GridRow) => void;
|
|
62
98
|
onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
|
|
63
99
|
onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
|
|
64
100
|
onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
|
|
65
101
|
onDownloadFiles?: (items: DialFile[]) => void;
|
|
66
|
-
onRename?: (itemPath: string) => void;
|
|
67
|
-
onRenameSave?: (value: string) => void;
|
|
68
|
-
onRenameCancel?: () => void;
|
|
69
102
|
onRenameValidate?: (value: string, item: DialFile) => string | null;
|
|
103
|
+
renameValidationMessages?: RenameValidationMessages;
|
|
104
|
+
onCreateFolder?: (file: DialUploadFileItem, folderPath: string, fileId: string) => void | Promise<void>;
|
|
105
|
+
onCreateFolderValidate?: (name: string, parentFolder: DialFile) => string | null;
|
|
106
|
+
folderCreationValidationMessages?: FolderCreationValidationMessages;
|
|
107
|
+
onUploadFiles?: (files: DialUploadFileItem[], destinationFolder: string) => void;
|
|
108
|
+
onValidateUpload?: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => FileUploadValidationResult | Promise<FileUploadValidationResult>;
|
|
109
|
+
maxFileSize?: number;
|
|
110
|
+
uploadValidationMessages?: FileUploadValidationMessages;
|
|
111
|
+
onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
|
|
70
112
|
}
|
|
71
113
|
/**
|
|
72
114
|
* File Manager layout with a collapsible folders tree, breadcrumb/search header, and a data grid.
|
|
@@ -114,7 +156,7 @@ export interface DialFileManagerProps {
|
|
|
114
156
|
* ```
|
|
115
157
|
*
|
|
116
158
|
* @param [path] - Absolute path of the current location (e.g. "/All files/Design/Icons")
|
|
117
|
-
* @param [
|
|
159
|
+
* @param [className] - Additional classes for the root container
|
|
118
160
|
* @param [items] - Full hierarchical list of files and folders used by both tree and grid
|
|
119
161
|
* @param [rootItem] - Optional root folder item to represent the top-level container in the tree
|
|
120
162
|
* @param [filesLoading=false] - When true, shows skeleton loading state in the grid
|
|
@@ -132,6 +174,10 @@ export interface DialFileManagerProps {
|
|
|
132
174
|
* @param [onCopyFiles] - Callback fired when files copy-paste
|
|
133
175
|
* @param [onMoveToFiles] - Callback fired when files cut-paste or rename
|
|
134
176
|
* @param [onDeleteFiles] - Callback fired when files are deleted
|
|
177
|
+
*
|
|
178
|
+
* @param [onDownloadFiles] - Callback fired when files are downloaded
|
|
179
|
+
*
|
|
180
|
+
* @param [onUploadArchive] - Callback fired when archive files are uploaded
|
|
135
181
|
*/
|
|
136
182
|
export declare const DialFileManager: FC<DialFileManagerProps>;
|
|
137
183
|
/**
|
|
@@ -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 {
|
|
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
|
-
|
|
20
|
+
className?: string;
|
|
16
21
|
items: DialFile[];
|
|
17
22
|
rootItem?: DialRootFolder;
|
|
18
23
|
filesLoading?: boolean;
|
|
@@ -23,6 +28,7 @@ export interface FileManagerContextValue {
|
|
|
23
28
|
bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
|
|
24
29
|
deleteConfirmationOptions?: DeleteConfirmationOptions;
|
|
25
30
|
destinationFolderPopupOptions?: DialFileManagerDestinationFolderPopupOptions;
|
|
31
|
+
conflictResolutionPopupOptions?: DialFileManagerConflictResolutionPopupOptions;
|
|
26
32
|
currentPath?: string;
|
|
27
33
|
setCurrentPath: (p?: string) => void;
|
|
28
34
|
searchValue: string;
|
|
@@ -34,7 +40,8 @@ export interface FileManagerContextValue {
|
|
|
34
40
|
toggleTreeCollapse: () => void;
|
|
35
41
|
setIsTreeCollapsed: (value: boolean) => void;
|
|
36
42
|
selectedIds: Set<string>;
|
|
37
|
-
|
|
43
|
+
selectedFiles: Map<string, DialFile>;
|
|
44
|
+
setSelectedFiles: (next: Map<string, DialFile>) => void;
|
|
38
45
|
clearSelection: () => void;
|
|
39
46
|
currentFolder?: DialFile;
|
|
40
47
|
gridRows: FileManagerGridRow[];
|
|
@@ -48,6 +55,7 @@ export interface FileManagerContextValue {
|
|
|
48
55
|
handleSetCopiedFiles: (files: DialFile[]) => void;
|
|
49
56
|
handleSetMovedFiles: (files: DialFile[]) => void;
|
|
50
57
|
renamedPath?: string;
|
|
58
|
+
renamedItem?: DialFile;
|
|
51
59
|
onRename: (file: string) => void;
|
|
52
60
|
onRenameSave: (value: string) => void;
|
|
53
61
|
onRenameCancel: () => void;
|
|
@@ -64,5 +72,33 @@ export interface FileManagerContextValue {
|
|
|
64
72
|
handleTableRowClick: (row: FileManagerGridRow) => void;
|
|
65
73
|
onTableFileClick?: DialFileManagerProps['onTableFileClick'];
|
|
66
74
|
handleDownloadFiles: (items: DialFile[]) => void;
|
|
75
|
+
isDragging: boolean;
|
|
76
|
+
isDraggingOverWindow: boolean;
|
|
77
|
+
uploadError?: string;
|
|
78
|
+
handleDragEnter: (e: DragEvent) => void;
|
|
79
|
+
handleDragLeave: (e: DragEvent) => void;
|
|
80
|
+
handleDragOver: (e: DragEvent) => void;
|
|
81
|
+
handleDrop: (e: DragEvent) => void;
|
|
82
|
+
clearUploadError: () => void;
|
|
83
|
+
onUploadFiles?: DialFileManagerProps['onUploadFiles'];
|
|
84
|
+
onValidateUpload?: DialFileManagerProps['onValidateUpload'];
|
|
85
|
+
maxFileSize?: number;
|
|
86
|
+
uploadValidationMessages?: FileUploadValidationMessages;
|
|
87
|
+
newActions: DropdownItem[];
|
|
88
|
+
isNewButtonVisible: boolean;
|
|
89
|
+
openFileDialog: () => void;
|
|
90
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
91
|
+
isCreatingFolder: boolean;
|
|
92
|
+
newFolderTempId: string | null;
|
|
93
|
+
startFolderCreation: () => void;
|
|
94
|
+
cancelFolderCreation: () => void;
|
|
95
|
+
saveFolderCreation: (name: string) => Promise<void>;
|
|
96
|
+
validateFolderName: (name: string) => string | null;
|
|
97
|
+
conflictingFiles: DialFile[];
|
|
98
|
+
conflictResolutionOpen: boolean;
|
|
99
|
+
closeConflictResolution: () => void;
|
|
100
|
+
handleConflictReplace: () => void;
|
|
101
|
+
handleConflictDuplicate: () => void;
|
|
102
|
+
handleConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
|
|
67
103
|
}
|
|
68
104
|
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,8 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
|
|
|
11
11
|
addFolderLabel?: string;
|
|
12
12
|
hiddenFilesSwitcherLabel?: string;
|
|
13
13
|
mode?: 'copy' | 'move';
|
|
14
|
+
getCopyHeader?: (itemsCount: number, itemName?: string) => string;
|
|
15
|
+
getMoveHeader?: (itemsCount: number, itemName?: string) => string;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* DestinationFolderPopup
|
|
@@ -36,7 +38,7 @@ 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=
|
|
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
|
|
@@ -45,5 +47,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
|
|
|
45
47
|
* @param rootItem - Root folder item
|
|
46
48
|
* @param path - Current path in the File Manager
|
|
47
49
|
* @param onPathChange - Callback fired when the path changes
|
|
50
|
+
* @param getCopyHeader - Function to get custom header for copy mode
|
|
51
|
+
* @param getMoveHeader - Function to get custom header for move mode
|
|
48
52
|
*/
|
|
49
53
|
export declare const DestinationFolderPopup: FC<DestinationFolderPopupProps>;
|
package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
@@ -8,7 +8,7 @@ export interface DialFileManagerItemNameInputProps {
|
|
|
8
8
|
elementId: string;
|
|
9
9
|
iconSize?: number;
|
|
10
10
|
iconStroke?: number;
|
|
11
|
-
|
|
11
|
+
iconClassName?: string;
|
|
12
12
|
iconLabel?: string;
|
|
13
13
|
iconIndicator?: ReactNode;
|
|
14
14
|
inputInvalid?: boolean;
|
|
@@ -53,7 +53,7 @@ export interface DialFileManagerItemNameInputProps {
|
|
|
53
53
|
* @param {boolean} [props.loading=false] - Whether the icon is loading.
|
|
54
54
|
* @param {number} [props.iconSize] - Optional size override for the icon.
|
|
55
55
|
* @param {number} [props.iconStroke] - Optional stroke width override for the icon.
|
|
56
|
-
* @param {string} [props.
|
|
56
|
+
* @param {string} [props.iconClassName] - Optional CSS class for the icon.
|
|
57
57
|
* @param {string} [props.iconLabel] - Optional accessible label for the icon.
|
|
58
58
|
* @param {ReactNode} [props.iconIndicator] - Optional indicator to render over the icon.
|
|
59
59
|
* @param {boolean} [props.inputInvalid=false] - Marks the input as invalid.
|
|
@@ -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' | '
|
|
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
|
-
|
|
8
|
-
|
|
7
|
+
className?: string;
|
|
8
|
+
breadcrumbClassName?: string;
|
|
9
9
|
onItemClick?: (href?: string) => void;
|
|
10
10
|
rootItemPath?: string;
|
|
11
11
|
rootItemLabel?: string;
|
|
@@ -13,8 +13,8 @@ export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumb
|
|
|
13
13
|
value?: string | number | null;
|
|
14
14
|
elementId?: string;
|
|
15
15
|
onSearchChange?: (value: string) => void;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
searchClassName?: string;
|
|
17
|
+
searchContainerClassName?: string;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* FileManagerNavigationPanel
|
|
@@ -38,23 +38,23 @@ export interface DialFileManagerNavigationPanelProps extends Omit<DialBreadcrumb
|
|
|
38
38
|
* // With clickable parents
|
|
39
39
|
* <FileManagerNavigationPanel
|
|
40
40
|
* path="Org/Design/Assets"
|
|
41
|
-
* makeHref={(segments, i) => '#' +
|
|
41
|
+
* makeHref={(segments, i) => '#' + segments.slice(0, i + 1).join('/')}
|
|
42
42
|
* />
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
45
|
* @param [ariaLabel="Breadcrumb"] - Aria label for the breadcrumb `<nav>`
|
|
46
|
-
* @param [
|
|
46
|
+
* @param [titleClassName] - Extra classes for breadcrumb titles
|
|
47
47
|
* @param [path] - A full path string that will be split into breadcrumb items
|
|
48
48
|
* @param [makeHref] - Factory to create hrefs for segments
|
|
49
49
|
* @param [onItemClick] - Callback fired when a breadcrumb item is clicked
|
|
50
|
-
* @param [
|
|
51
|
-
* @param [
|
|
50
|
+
* @param [className] - Additional classes for the panel container
|
|
51
|
+
* @param [breadcrumbClassName] - ClassName forwarded to inner `DialBreadcrumb`
|
|
52
52
|
* @param [searchable=true] - Whether to render the search control
|
|
53
53
|
* @param [value] - Controlled value for the search input (parent-managed)
|
|
54
54
|
* @param [elementId="fm-search"] - DOM id for the internal DialSearch input
|
|
55
55
|
* @param [size=SearchSize.Base] - Size of the search input (from DialSearchProps)
|
|
56
56
|
* @param [onSearchChange] - Callback fired when the search value changes
|
|
57
|
-
* @param [
|
|
58
|
-
* @param [
|
|
57
|
+
* @param [searchClassName] - Extra classes for the search input element
|
|
58
|
+
* @param [searchContainerClassName] - Extra classes for the search container
|
|
59
59
|
*/
|
|
60
60
|
export declare const DialFileManagerNavigationPanel: FC<DialFileManagerNavigationPanelProps>;
|
package/dist/src/components/FileManager/components/FileManagerNavigationPanel/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
export declare const panelBaseClassName = "w-full h-[12] 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]";
|
package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export interface DialFileManagerToolbarProps {
|
|
|
10
10
|
hiddenFilesSwitcherLabel?: string;
|
|
11
11
|
showHiddenFilesLabel?: string;
|
|
12
12
|
hideHiddenFilesLabel?: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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 "
|
|
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
|
-
*
|
|
44
|
-
*
|
|
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 [
|
|
60
|
-
* @param [
|
|
61
|
-
* @param [
|
|
62
|
-
* @param [
|
|
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
|
|
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 `
|
|
69
|
+
* - When `newButtonDropdownItems` is provided, the new button becomes a dropdown menu.
|
|
70
70
|
*/
|
|
71
71
|
export declare const DialFileManagerToolbar: FC<DialFileManagerToolbarProps>;
|
|
@@ -17,6 +17,7 @@ export interface DialFoldersTreeProps {
|
|
|
17
17
|
onRenameValidate?: (value: string, item: DialFile) => string | null;
|
|
18
18
|
getContextMenuItems?: (item: DialFile) => DropdownItem[];
|
|
19
19
|
areHiddenFilesVisible?: boolean;
|
|
20
|
+
onExpandedPathsChange?: (expandedPaths: Set<string>) => void;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* DialFoldersTree — A hierarchical folder tree component with nested expand/collapse support, selection highlighting,
|
|
@@ -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,9 +1,14 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
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
|
+
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DialFile } from '../../../models/file';
|
|
2
|
+
import { DialFileManagerActions } from '../../../types/file-manager';
|
|
3
|
+
import { DialActionDropdownItem } from '../components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar';
|
|
4
|
+
export interface UseBulkActionsProps {
|
|
5
|
+
selectedFiles: Map<string, DialFile>;
|
|
6
|
+
actionLabels?: {
|
|
7
|
+
[DialFileManagerActions.Duplicate]?: string;
|
|
8
|
+
[DialFileManagerActions.Copy]?: string;
|
|
9
|
+
[DialFileManagerActions.Rename]?: string;
|
|
10
|
+
[DialFileManagerActions.Download]?: string;
|
|
11
|
+
[DialFileManagerActions.Delete]?: string;
|
|
12
|
+
[DialFileManagerActions.Move]?: string;
|
|
13
|
+
};
|
|
14
|
+
onDuplicate: (files: DialFile[]) => void;
|
|
15
|
+
onCopy: (files: DialFile[]) => void;
|
|
16
|
+
onMove: (files: DialFile[]) => void;
|
|
17
|
+
onDownload: (files: DialFile[]) => void;
|
|
18
|
+
onRename: (filePath: string) => void;
|
|
19
|
+
onDelete: (files: DialFile[], parentFolderPath: string) => void;
|
|
20
|
+
getCurrentFolderPath: () => string;
|
|
21
|
+
}
|
|
22
|
+
export declare const useBulkActions: ({ selectedFiles, actionLabels, onDuplicate, onCopy, onMove, onDownload, onDelete, getCurrentFolderPath, }: UseBulkActionsProps) => DialActionDropdownItem[];
|
|
@@ -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
|
+
};
|