@epam/ai-dial-ui-kit 0.5.0-rc.11 → 0.5.0-rc.111
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 +18998 -16265
- package/dist/index.css +2 -2
- package/dist/src/components/Alert/Alert.d.ts +15 -5
- package/dist/src/components/Alert/constants.d.ts +7 -4
- 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 +4 -5
- package/dist/src/components/CloseButton/CloseButton.d.ts +5 -3
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +7 -7
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +4 -4
- 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 +7 -5
- package/dist/src/components/EllipsisTooltip/constants.d.ts +1 -1
- package/dist/src/components/Field/Field.d.ts +5 -7
- package/dist/src/components/FileIcon/FileIcon.d.ts +3 -3
- package/dist/src/components/FileManager/FileManager.d.ts +75 -15
- package/dist/src/components/FileManager/FileManagerContext.d.ts +65 -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 -2
- package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.d.ts +56 -0
- package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.test.d.ts +1 -0
- package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.d.ts +5 -3
- package/dist/src/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.d.ts +1 -1
- package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +1 -1
- package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +2 -1
- package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +4 -2
- package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +13 -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/FileMetadataPopup/FileMetadataPopup.d.ts +50 -0
- package/dist/src/components/FileManager/components/FileMetadataPopup/constants.d.ts +6 -0
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +9 -1
- package/dist/src/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.d.ts +13 -0
- package/dist/src/components/FileManager/constants.d.ts +14 -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/__tests__/use-trigger-view-rename.spec.d.ts +1 -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 +18 -4
- 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-metadata.d.ts +10 -0
- package/dist/src/components/FileManager/hooks/use-file-search.d.ts +22 -0
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +45 -0
- package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +21 -0
- package/dist/src/components/FileManager/hooks/use-grid-actions-column.d.ts +13 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +5 -1
- package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +9 -5
- package/dist/src/components/FileManager/hooks/use-new-actions.d.ts +16 -0
- package/dist/src/components/FileManager/hooks/use-tree-additional-buttons.d.ts +22 -0
- package/dist/src/components/FileManager/hooks/use-trigger-view-rename.d.ts +20 -0
- package/dist/src/components/FileManager/utils.d.ts +35 -1
- package/dist/src/components/FileName/FileName.d.ts +17 -5
- package/dist/src/components/FolderName/FolderName.d.ts +2 -2
- package/dist/src/components/FormItem/FormItem.d.ts +10 -10
- 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 +12 -3
- package/dist/src/components/Grid/constants.d.ts +1 -1
- package/dist/src/components/Grid/hooks/use-grid-selection.d.ts +2 -1
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +3 -3
- 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/LabelledText/LabelledText.d.ts +2 -0
- 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 +11 -7
- package/dist/src/components/Popup/constants.d.ts +3 -3
- package/dist/src/components/RadioButton/RadioButton.d.ts +7 -7
- 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 +7 -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 +4 -4
- package/dist/src/components/Skeleton/Skeleton.d.ts +77 -0
- package/dist/src/components/Skeleton/utils.d.ts +2 -0
- package/dist/src/components/Switch/Switch.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/hooks/use-width-breakpoint.d.ts +23 -0
- package/dist/src/index.d.ts +8 -2
- 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 +19 -0
- package/dist/src/models/file.d.ts +2 -1
- 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 +29 -11
- package/dist/src/types/form-item.d.ts +2 -2
- package/dist/src/types/resizable-container.d.ts +4 -0
- package/dist/src/types/skeleton.d.ts +15 -0
- package/dist/src/types/tab.d.ts +1 -1
- package/package.json +12 -11
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { DialTooltipContainerOptions } from '../Tooltip/TooltipContext';
|
|
3
3
|
export interface DialEllipsisTooltipProps extends DialTooltipContainerOptions {
|
|
4
|
-
text:
|
|
5
|
-
|
|
4
|
+
text: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
6
|
contentClassName?: string;
|
|
7
7
|
hideTooltip?: boolean;
|
|
8
|
+
id?: string;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Single-line text with CSS ellipsis that shows a tooltip **only when actually truncated**.
|
|
11
12
|
* If the text fits, tooltip content is empty and the popup stays hidden.
|
|
12
13
|
*
|
|
13
14
|
* Important: width must be finite for truncation.
|
|
14
|
-
* Consumers can override via `
|
|
15
|
+
* Consumers can override via `className`.
|
|
15
16
|
*
|
|
16
17
|
* a11y: when truncated, the full text is exposed via `aria-label` on the reference node.
|
|
17
18
|
*
|
|
18
19
|
* @example
|
|
19
20
|
* ```tsx
|
|
20
21
|
* <DialEllipsisTooltip text="Very long message that will be truncated" />
|
|
21
|
-
* <DialEllipsisTooltip text={<span className="font-medium">Custom node</span>}
|
|
22
|
+
* <DialEllipsisTooltip text={<span className="font-medium">Custom node</span>} className="max-w-[160px]" />
|
|
22
23
|
* <DialEllipsisTooltip text="Tooltip disabled even if truncated" hideTooltip />
|
|
23
24
|
* ```
|
|
24
25
|
*
|
|
25
26
|
* @param text The text or node to display (truncated with ellipsis if too long).
|
|
26
|
-
* @param
|
|
27
|
+
* @param className Optional additional CSS classes for the text container (e.g. to set width).
|
|
27
28
|
* @param contentClassName Optional additional CSS classes for the tooltip content.
|
|
28
29
|
* @param hideTooltip If true, disables the tooltip even if text is truncated.
|
|
30
|
+
* @param id Optional attribute for unique identification
|
|
29
31
|
* @param tooltipProps Additional props to pass to the underlying DialTooltipContainer.
|
|
30
32
|
*/
|
|
31
33
|
export declare const DialEllipsisTooltip: FC<DialEllipsisTooltipProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const tooltipContentBaseClassName = "text-primary";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { FC, LabelHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type NativeLabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children' | 'defaultValue' | 'onChange'>;
|
|
3
|
+
export interface DialFieldLabelProps extends NativeLabelProps {
|
|
4
|
+
fieldTitle?: ReactNode;
|
|
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,9 +3,9 @@ export interface DialFileIconProps {
|
|
|
3
3
|
extension: string;
|
|
4
4
|
size?: number;
|
|
5
5
|
stroke?: number;
|
|
6
|
-
|
|
6
|
+
className?: string;
|
|
7
7
|
decorative?: boolean;
|
|
8
|
-
label?:
|
|
8
|
+
label?: ReactNode;
|
|
9
9
|
indicator?: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
@@ -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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
1
|
+
import { FC, ReactNode, Ref } from 'react';
|
|
2
2
|
import { ColDef } from 'ag-grid-community';
|
|
3
3
|
import { DialFile, DialRootFolder } from '../../models/file';
|
|
4
4
|
import { DialFoldersTreeProps } from './components/FoldersTree/FoldersTree';
|
|
@@ -6,18 +6,41 @@ 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, DialFileManagerActionsRef, DialFileAcceptType } 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
|
|
18
|
+
export type DialFileManagerConflictResolutionPopupOptions = Omit<ConflictResolutionPopupProps, 'open' | 'onClose' | 'onReplace' | 'onDuplicate' | 'conflictingFiles'>;
|
|
19
|
+
export type DialFileManagerDestinationFolderPopupOptions = Pick<DestinationFolderPopupProps, 'setDestinationFolderPath' | 'destinationFolderPath' | 'addFolderLabel' | 'copyLabel' | 'moveLabel' | 'hiddenFilesSwitcherLabel' | 'title' | 'onCreateFolder' | 'onCreateFolderValidate' | 'folderCreationValidationMessages'> & {
|
|
20
|
+
getCopyHeader?: (itemsCount: number, itemName?: string) => string;
|
|
21
|
+
getMoveHeader?: (itemsCount: number, itemName?: string) => string;
|
|
22
|
+
};
|
|
23
|
+
export interface FileMetadataPopupOptions {
|
|
24
|
+
fileMetadata?: DialFile;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
clearMetadata?: () => void;
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
nameLabel?: string;
|
|
29
|
+
pathLabel?: string;
|
|
30
|
+
modifiedDateLabel?: string;
|
|
31
|
+
sizeLabel?: string;
|
|
32
|
+
authorLabel?: string;
|
|
33
|
+
}
|
|
14
34
|
export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 'selectedPath' | 'onItemClick'> {
|
|
15
35
|
width?: number;
|
|
16
|
-
title?:
|
|
17
|
-
|
|
36
|
+
title?: ReactNode;
|
|
37
|
+
containerClassName?: string;
|
|
18
38
|
additionalButtons?: ReactNode;
|
|
19
39
|
collapsed?: boolean;
|
|
20
40
|
onCollapseChange?: (collapsed: boolean) => void;
|
|
41
|
+
expandedPaths?: Set<string>;
|
|
42
|
+
loadedPaths?: Set<string>;
|
|
43
|
+
onExpandedPathsChange?: (expandedPaths: Set<string>) => void;
|
|
21
44
|
actionLabels?: {
|
|
22
45
|
[DialFileManagerActions.Duplicate]?: string;
|
|
23
46
|
[DialFileManagerActions.Copy]?: string;
|
|
@@ -25,11 +48,12 @@ export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 's
|
|
|
25
48
|
[DialFileManagerActions.Download]?: string;
|
|
26
49
|
[DialFileManagerActions.Delete]?: string;
|
|
27
50
|
[DialFileManagerActions.Move]?: string;
|
|
51
|
+
[DialFileManagerActions.Unshare]?: string;
|
|
28
52
|
};
|
|
29
53
|
}
|
|
30
54
|
export interface DeleteConfirmationOptions {
|
|
31
55
|
cancelLabel?: string;
|
|
32
|
-
titleRenderer?: (fileNames: string[]) => ReactNode
|
|
56
|
+
titleRenderer?: (fileNames: string[]) => ReactNode;
|
|
33
57
|
confirmLabel?: string;
|
|
34
58
|
contentRenderer?: (fileNames: string[]) => ReactNode;
|
|
35
59
|
}
|
|
@@ -39,6 +63,7 @@ export interface GridOptions extends Omit<DialGridProps<GridRow>, 'rowData' | 'c
|
|
|
39
63
|
filterable?: boolean;
|
|
40
64
|
dateLocale?: Intl.LocalesArgument;
|
|
41
65
|
dateOptions?: Intl.DateTimeFormatOptions;
|
|
66
|
+
visibleColumns?: FileManagerColumnKey[];
|
|
42
67
|
actionLabels?: {
|
|
43
68
|
[DialFileManagerActions.Duplicate]?: string;
|
|
44
69
|
[DialFileManagerActions.Copy]?: string;
|
|
@@ -46,10 +71,18 @@ export interface GridOptions extends Omit<DialGridProps<GridRow>, 'rowData' | 'c
|
|
|
46
71
|
[DialFileManagerActions.Download]?: string;
|
|
47
72
|
[DialFileManagerActions.Delete]?: string;
|
|
48
73
|
[DialFileManagerActions.Move]?: string;
|
|
74
|
+
[DialFileManagerActions.Info]?: string;
|
|
75
|
+
[DialFileManagerActions.Unshare]?: string;
|
|
49
76
|
};
|
|
50
77
|
}
|
|
51
|
-
export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVisible' | 'onToggleHiddenFiles'
|
|
52
|
-
|
|
78
|
+
export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVisible' | 'onToggleHiddenFiles'> & {
|
|
79
|
+
newActionLabels?: {
|
|
80
|
+
uploadFiles?: string;
|
|
81
|
+
newFolder?: string;
|
|
82
|
+
uploadArchive?: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection' | 'actions' | 'selectedCount'> & {
|
|
53
86
|
actionLabels?: {
|
|
54
87
|
[DialFileManagerActions.Duplicate]?: string;
|
|
55
88
|
[DialFileManagerActions.Copy]?: string;
|
|
@@ -65,10 +98,12 @@ export interface CreateFolderValidationMessages {
|
|
|
65
98
|
}
|
|
66
99
|
export interface DialFileManagerProps {
|
|
67
100
|
path?: string;
|
|
68
|
-
|
|
101
|
+
className?: string;
|
|
102
|
+
allowedFileTypes?: DialFileAcceptType[];
|
|
69
103
|
items?: DialFile[];
|
|
70
104
|
rootItem?: DialRootFolder;
|
|
71
105
|
filesLoading?: boolean;
|
|
106
|
+
sharedByMePaths?: Set<string>;
|
|
72
107
|
showHiddenFiles?: boolean;
|
|
73
108
|
onShowHiddenFilesChange?: (value: boolean) => void;
|
|
74
109
|
treeOptions?: FileTreeOptions;
|
|
@@ -78,19 +113,32 @@ export interface DialFileManagerProps {
|
|
|
78
113
|
bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
|
|
79
114
|
deleteConfirmationOptions?: DeleteConfirmationOptions;
|
|
80
115
|
destinationFolderPopupOptions?: DialFileManagerDestinationFolderPopupOptions;
|
|
116
|
+
conflictResolutionPopupOptions?: DialFileManagerConflictResolutionPopupOptions;
|
|
117
|
+
compactViewWidthBreakpoint?: number;
|
|
81
118
|
onPathChange?: (nextPath?: string) => void;
|
|
82
119
|
onTableFileClick?: (file: GridRow) => void;
|
|
83
120
|
onCopyFiles?: (items: DialCopiedItem[], destinationFolder: string) => void;
|
|
84
121
|
onMoveToFiles?: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
|
|
85
122
|
onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
|
|
86
123
|
onDownloadFiles?: (items: DialFile[]) => void;
|
|
87
|
-
onRename?: (itemPath: string) => void;
|
|
88
|
-
onRenameSave?: (value: string) => void;
|
|
89
|
-
onRenameCancel?: () => void;
|
|
90
124
|
onRenameValidate?: (value: string, item: DialFile) => string | null;
|
|
91
|
-
|
|
125
|
+
renameValidationMessages?: RenameValidationMessages;
|
|
126
|
+
onCreateFolder?: (file: DialUploadFileItem, folderPath: string, fileId: string) => void | Promise<void>;
|
|
92
127
|
onCreateFolderValidate?: (name: string, parentFolder: DialFile) => string | null;
|
|
93
|
-
|
|
128
|
+
folderCreationValidationMessages?: FolderCreationValidationMessages;
|
|
129
|
+
onUploadFiles?: (files: DialUploadFileItem[], destinationFolder: string) => void;
|
|
130
|
+
onValidateUpload?: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => FileUploadValidationResult | Promise<FileUploadValidationResult>;
|
|
131
|
+
maxFileSize?: number;
|
|
132
|
+
uploadValidationMessages?: FileUploadValidationMessages;
|
|
133
|
+
onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
|
|
134
|
+
fileMetadataPopupOptions?: FileMetadataPopupOptions;
|
|
135
|
+
onGetInfo?: (file: DialFile) => void | Promise<void>;
|
|
136
|
+
onUnshareFile?: (file: DialFile) => void | Promise<void>;
|
|
137
|
+
actionsRef?: Ref<DialFileManagerActionsRef>;
|
|
138
|
+
onSearchFiles?: (folder: string, query: string) => void;
|
|
139
|
+
searchInProgress?: boolean;
|
|
140
|
+
searchResults?: DialFile[];
|
|
141
|
+
clearSearchResults?: () => void;
|
|
94
142
|
}
|
|
95
143
|
/**
|
|
96
144
|
* File Manager layout with a collapsible folders tree, breadcrumb/search header, and a data grid.
|
|
@@ -138,7 +186,7 @@ export interface DialFileManagerProps {
|
|
|
138
186
|
* ```
|
|
139
187
|
*
|
|
140
188
|
* @param [path] - Absolute path of the current location (e.g. "/All files/Design/Icons")
|
|
141
|
-
* @param [
|
|
189
|
+
* @param [className] - Additional classes for the root container
|
|
142
190
|
* @param [items] - Full hierarchical list of files and folders used by both tree and grid
|
|
143
191
|
* @param [rootItem] - Optional root folder item to represent the top-level container in the tree
|
|
144
192
|
* @param [filesLoading=false] - When true, shows skeleton loading state in the grid
|
|
@@ -150,12 +198,24 @@ export interface DialFileManagerProps {
|
|
|
150
198
|
* @param [bulkActionsToolbarOptions] - Options for the bulk actions toolbar shown when items are selected
|
|
151
199
|
* @param [deleteConfirmationOptions] - Options for the delete confirmation popup
|
|
152
200
|
*
|
|
201
|
+
* @param [compactViewWidthBreakpoint=DEFAULT_COMPACT_VIEW_WIDTH_BREAKPOINT] - Width (px) below which the component switches to compact view.
|
|
202
|
+
*
|
|
153
203
|
* @param [onPathChange] - Callback fired when user navigates via tree or breadcrumb
|
|
154
204
|
* @param [onTableFileClick] - Callback fired when a file row is clicked in the grid
|
|
155
205
|
*
|
|
156
206
|
* @param [onCopyFiles] - Callback fired when files copy-paste
|
|
157
207
|
* @param [onMoveToFiles] - Callback fired when files cut-paste or rename
|
|
158
208
|
* @param [onDeleteFiles] - Callback fired when files are deleted
|
|
209
|
+
*
|
|
210
|
+
* @param [onDownloadFiles] - Callback fired when files are downloaded
|
|
211
|
+
*
|
|
212
|
+
* @param [onUploadArchive] - Callback fired when archive files are uploaded
|
|
213
|
+
*
|
|
214
|
+
* @param [sharedByMePaths] - Set of items paths that the user has shared with others. Enables UI indicators (icons/badges) in the tree and grid.
|
|
215
|
+
*
|
|
216
|
+
* @param [actionsRef] - Ref exposing a limited set of imperative File Manager actions (e.g., creating a folder). Allows parent components to trigger internal behaviors programmatically. This ref is not a DOM ref and should be used only for invoking the component’s public actions API.
|
|
217
|
+
*
|
|
218
|
+
* @param allowedFileTypes - Allowed file types (same format as the HTML `<input accept>` attribute). Controls upload filtering and which items are disabled in the File Manager UI. Supports MIME types, wildcards (e.g. `image/*`), and extensions (e.g. `.svg`).
|
|
159
219
|
*/
|
|
160
220
|
export declare const DialFileManager: FC<DialFileManagerProps>;
|
|
161
221
|
/**
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { DragEvent, Ref, 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, FileMetadataPopupOptions } 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';
|
|
8
|
+
import { DialFileAcceptType, DialFileManagerActionsRef } from '../../models/file-manager';
|
|
4
9
|
export interface FileManagerGridRow {
|
|
5
10
|
id: string;
|
|
6
11
|
name: string;
|
|
@@ -10,11 +15,15 @@ export interface FileManagerGridRow {
|
|
|
10
15
|
path: string;
|
|
11
16
|
nodeType: DialFileNodeType;
|
|
12
17
|
extension?: string;
|
|
18
|
+
isTemporary?: boolean;
|
|
19
|
+
owner?: string;
|
|
20
|
+
contentType?: string;
|
|
13
21
|
}
|
|
14
22
|
export interface FileManagerContextValue {
|
|
15
|
-
|
|
23
|
+
className?: string;
|
|
16
24
|
items: DialFile[];
|
|
17
25
|
rootItem?: DialRootFolder;
|
|
26
|
+
allowedFileTypes?: DialFileAcceptType[];
|
|
18
27
|
filesLoading?: boolean;
|
|
19
28
|
treeOptions?: FileTreeOptions;
|
|
20
29
|
navigationPanelOptions?: NavigationPanelOptions;
|
|
@@ -23,6 +32,9 @@ export interface FileManagerContextValue {
|
|
|
23
32
|
bulkActionsToolbarOptions?: BulkActionsToolbarOptions;
|
|
24
33
|
deleteConfirmationOptions?: DeleteConfirmationOptions;
|
|
25
34
|
destinationFolderPopupOptions?: DialFileManagerDestinationFolderPopupOptions;
|
|
35
|
+
conflictResolutionPopupOptions?: DialFileManagerConflictResolutionPopupOptions;
|
|
36
|
+
fileMetadataPopupOptions?: FileMetadataPopupOptions;
|
|
37
|
+
compactViewWidthBreakpoint?: number;
|
|
26
38
|
currentPath?: string;
|
|
27
39
|
setCurrentPath: (p?: string) => void;
|
|
28
40
|
searchValue: string;
|
|
@@ -40,7 +52,7 @@ export interface FileManagerContextValue {
|
|
|
40
52
|
currentFolder?: DialFile;
|
|
41
53
|
gridRows: FileManagerGridRow[];
|
|
42
54
|
handleCopyTo: (destinationFolder: string) => void;
|
|
43
|
-
handleMoveTo: (destinationFolder: string, sourceFolder
|
|
55
|
+
handleMoveTo: (destinationFolder: string, sourceFolder?: string) => void;
|
|
44
56
|
handleDuplicate: (files: DialFile[]) => void;
|
|
45
57
|
handleOpenDestinationFolderPopup: (mode: DestinationFolderMode) => void;
|
|
46
58
|
handleCloseDestinationFolderPopup: () => void;
|
|
@@ -49,10 +61,12 @@ export interface FileManagerContextValue {
|
|
|
49
61
|
handleSetCopiedFiles: (files: DialFile[]) => void;
|
|
50
62
|
handleSetMovedFiles: (files: DialFile[]) => void;
|
|
51
63
|
renamedPath?: string;
|
|
64
|
+
renamedItem?: DialFile;
|
|
52
65
|
onRename: (file: string) => void;
|
|
53
66
|
onRenameSave: (value: string) => void;
|
|
54
67
|
onRenameCancel: () => void;
|
|
55
68
|
onRenameValidate: (value: string, item: DialFile) => string | null;
|
|
69
|
+
getDisplayName: (item: DialFile) => string;
|
|
56
70
|
openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
|
|
57
71
|
closeDeleteConfirmation: () => void;
|
|
58
72
|
confirmDelete: () => void;
|
|
@@ -65,5 +79,52 @@ export interface FileManagerContextValue {
|
|
|
65
79
|
handleTableRowClick: (row: FileManagerGridRow) => void;
|
|
66
80
|
onTableFileClick?: DialFileManagerProps['onTableFileClick'];
|
|
67
81
|
handleDownloadFiles: (items: DialFile[]) => void;
|
|
82
|
+
isDragging: boolean;
|
|
83
|
+
isDraggingOverWindow: boolean;
|
|
84
|
+
uploadError?: string;
|
|
85
|
+
handleDragEnter: (e: DragEvent) => void;
|
|
86
|
+
handleDragLeave: (e: DragEvent) => void;
|
|
87
|
+
handleDragOver: (e: DragEvent) => void;
|
|
88
|
+
handleDrop: (e: DragEvent) => void;
|
|
89
|
+
clearUploadError: () => void;
|
|
90
|
+
onUploadFiles?: DialFileManagerProps['onUploadFiles'];
|
|
91
|
+
onValidateUpload?: DialFileManagerProps['onValidateUpload'];
|
|
92
|
+
maxFileSize?: number;
|
|
93
|
+
uploadValidationMessages?: FileUploadValidationMessages;
|
|
94
|
+
newActions: DropdownItem[];
|
|
95
|
+
isNewButtonVisible: boolean;
|
|
96
|
+
openFileDialog: () => void;
|
|
97
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
98
|
+
isCreatingFolder: boolean;
|
|
99
|
+
newFolderTempId: string | null;
|
|
100
|
+
startFolderCreation: () => void;
|
|
101
|
+
cancelFolderCreation: () => void;
|
|
102
|
+
saveFolderCreation: (name: string) => Promise<void>;
|
|
103
|
+
validateFolderName: (name: string) => string | null;
|
|
104
|
+
conflictingFiles: DialFile[];
|
|
105
|
+
conflictResolutionOpen: boolean;
|
|
106
|
+
closeConflictResolution: () => void;
|
|
107
|
+
handleConflictReplace: () => void;
|
|
108
|
+
handleConflictDuplicate: () => void;
|
|
109
|
+
handleConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
|
|
110
|
+
uploadConflictingFiles: DialFile[];
|
|
111
|
+
uploadConflictResolutionOpen: boolean;
|
|
112
|
+
closeUploadConflictResolution: () => void;
|
|
113
|
+
handleUploadConflictReplace: () => void;
|
|
114
|
+
handleUploadConflictDuplicate: () => void;
|
|
115
|
+
handleUploadConflictDecideForEach: (decisions: FileConflictDecision[]) => void;
|
|
116
|
+
isMetadataPopupOpen: boolean;
|
|
117
|
+
selectedFileForMetadata?: DialFile;
|
|
118
|
+
openMetadataPopup: (file: DialFile) => void;
|
|
119
|
+
closeMetadataPopup: () => void;
|
|
120
|
+
onGetInfo?: (file: DialFile) => void | Promise<void>;
|
|
121
|
+
onUnshareFile?: (file: DialFile) => void | Promise<void>;
|
|
122
|
+
actionsRef?: Ref<DialFileManagerActionsRef>;
|
|
123
|
+
sharedByMePaths?: Set<string>;
|
|
124
|
+
onSearchFiles?: (folder: string, query: string) => void;
|
|
125
|
+
searchInProgress?: boolean;
|
|
126
|
+
searchResults?: DialFile[];
|
|
127
|
+
clearSearchResults?: () => void;
|
|
128
|
+
isSearchMode: boolean;
|
|
68
129
|
}
|
|
69
130
|
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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DialFileManagerProps } from '../../FileManager';
|
|
2
|
-
import { FC } from 'react';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
3
|
export interface DestinationFolderPopupProps extends DialFileManagerProps {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
onConfirm?: () => void;
|
|
@@ -11,6 +11,7 @@ export interface DestinationFolderPopupProps extends DialFileManagerProps {
|
|
|
11
11
|
addFolderLabel?: string;
|
|
12
12
|
hiddenFilesSwitcherLabel?: string;
|
|
13
13
|
mode?: 'copy' | 'move';
|
|
14
|
+
title?: ReactNode;
|
|
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=
|
|
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,56 @@
|
|
|
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
|
+
shared?: boolean;
|
|
10
|
+
dateLocale?: Intl.LocalesArgument;
|
|
11
|
+
dateOptions?: Intl.DateTimeFormatOptions;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Renders file or folder details inside the File Manager list/grid item.
|
|
15
|
+
*
|
|
16
|
+
* Displays the item name with an icon (via `DialFileManagerItemName`),
|
|
17
|
+
* followed by a small details row:
|
|
18
|
+
*
|
|
19
|
+
* - File size (e.g., `"15 KB"`)
|
|
20
|
+
* - A separator dot
|
|
21
|
+
* - Formatted update date (via `DialDateCellRenderer`)
|
|
22
|
+
*
|
|
23
|
+
* The component automatically determines whether to show a **file** or **folder**
|
|
24
|
+
* icon based on `nodeType`.
|
|
25
|
+
*
|
|
26
|
+
* ### Example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <DialFileManagerItemSummaryCell
|
|
29
|
+
* id="42"
|
|
30
|
+
* name="Report.pdf"
|
|
31
|
+
* nodeType={DialFileNodeType.FILE}
|
|
32
|
+
* size="220 KB"
|
|
33
|
+
* updatedAt="2025-07-20T00:00:00Z"
|
|
34
|
+
* dateLocale="en-US"
|
|
35
|
+
* dateOptions={{ timeZone: 'UTC' }}
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* <DialFileManagerItemSummaryCell
|
|
39
|
+
* id="folder-1"
|
|
40
|
+
* name="Projects"
|
|
41
|
+
* nodeType={DialFileNodeType.FOLDER}
|
|
42
|
+
* size="—"
|
|
43
|
+
* updatedAt={undefined}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param id - Unique identifier passed to `DialFileManagerItemName` as `elementId`.
|
|
48
|
+
* @param name - File or folder display name.
|
|
49
|
+
* @param nodeType - Determines whether the item renders as a **File** or **Folder**.
|
|
50
|
+
* @param size - Human-readable file size (e.g., `"15 KB"`). May be `"—"` or omitted.
|
|
51
|
+
* @param updatedAt - Date or timestamp passed to `DialDateCellRenderer`. If invalid or missing, renders `"—"`.
|
|
52
|
+
* @param dateLocale - Optional locale override for date formatting (e.g., `"fr-FR"`).
|
|
53
|
+
* @param dateOptions - Optional `Intl.DateTimeFormat` configuration (e.g., `{ timeZone: 'UTC' }`).
|
|
54
|
+
*/
|
|
55
|
+
export declare const DialFileManagerItemSummaryCell: FC<DialFileManagerItemSummaryCellProps>;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,9 +4,10 @@ export interface DialActionDropdownItem extends DropdownItem {
|
|
|
4
4
|
title: string;
|
|
5
5
|
}
|
|
6
6
|
export interface DialFileManagerBulkActionsToolbarProps {
|
|
7
|
-
|
|
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
|
-
*
|
|
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.
|
|
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
|
*/
|
|
@@ -7,7 +7,7 @@ export interface FileManagerDeleteConfirmationPopupProps {
|
|
|
7
7
|
onConfirm: () => void;
|
|
8
8
|
cancelLabel?: string;
|
|
9
9
|
confirmLabel?: string;
|
|
10
|
-
titleRenderer?: (fileNames: string[]) => ReactNode
|
|
10
|
+
titleRenderer?: (fileNames: string[]) => ReactNode;
|
|
11
11
|
contentRenderer?: (fileNames: string[]) => ReactNode;
|
|
12
12
|
}
|
|
13
13
|
/**
|
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.
|
package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts
CHANGED
|
@@ -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;
|