@epam/ai-dial-ui-kit 0.5.0-rc.104 → 0.5.0-rc.105
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/dist/dial-ui-kit.cjs.js +28 -28
- package/dist/dial-ui-kit.es.js +7260 -7129
- package/dist/src/components/FileManager/FileManager.d.ts +4 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +5 -0
- package/dist/src/components/FileManager/hooks/use-file-search.d.ts +22 -0
- package/dist/src/types/file-manager.d.ts +1 -0
- package/package.json +1 -1
|
@@ -134,6 +134,10 @@ export interface DialFileManagerProps {
|
|
|
134
134
|
onGetInfo?: (file: DialFile) => void | Promise<void>;
|
|
135
135
|
onUnshareFile?: (file: DialFile) => void | Promise<void>;
|
|
136
136
|
actionsRef?: Ref<DialFileManagerActionsRef>;
|
|
137
|
+
onSearchFiles?: (folder: string, query: string) => void;
|
|
138
|
+
searchInProgress?: boolean;
|
|
139
|
+
searchResults?: DialFile[];
|
|
140
|
+
clearSearchResults?: () => void;
|
|
137
141
|
}
|
|
138
142
|
/**
|
|
139
143
|
* File Manager layout with a collapsible folders tree, breadcrumb/search header, and a data grid.
|
|
@@ -119,5 +119,10 @@ export interface FileManagerContextValue {
|
|
|
119
119
|
onUnshareFile?: (file: DialFile) => void | Promise<void>;
|
|
120
120
|
actionsRef?: Ref<DialFileManagerActionsRef>;
|
|
121
121
|
sharedByMePaths?: Set<string>;
|
|
122
|
+
onSearchFiles?: (folder: string, query: string) => void;
|
|
123
|
+
searchInProgress?: boolean;
|
|
124
|
+
searchResults?: DialFile[];
|
|
125
|
+
clearSearchResults?: () => void;
|
|
126
|
+
isSearchMode: boolean;
|
|
122
127
|
}
|
|
123
128
|
export declare const FileManagerContext: import('react').Context<FileManagerContextValue | undefined>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DialFile } from '../../../models/file';
|
|
2
|
+
export interface UseFileSearchOptions {
|
|
3
|
+
onSearchFiles?: (folder: string, query: string) => void;
|
|
4
|
+
clearSearchResults?: () => void;
|
|
5
|
+
currentPath?: string;
|
|
6
|
+
searchResults?: DialFile[];
|
|
7
|
+
searchInProgress?: boolean;
|
|
8
|
+
navigationPanelValue?: string | number | null;
|
|
9
|
+
onNavigationPanelSearchChange?: (value: string) => void;
|
|
10
|
+
allItems?: DialFile[];
|
|
11
|
+
}
|
|
12
|
+
export interface UseFileSearchReturn {
|
|
13
|
+
isSearchMode: boolean;
|
|
14
|
+
searchValue: string;
|
|
15
|
+
effectiveSearchValue: string;
|
|
16
|
+
setSearchValue: (value: string) => void;
|
|
17
|
+
handleSearchChange: (value?: string) => void;
|
|
18
|
+
handleSearchActivate: (query: string) => void;
|
|
19
|
+
handleSearchClear: () => void;
|
|
20
|
+
searchResultsRows: DialFile[];
|
|
21
|
+
}
|
|
22
|
+
export declare function useFileSearch({ onSearchFiles, clearSearchResults, currentPath, searchResults, searchInProgress, navigationPanelValue, onNavigationPanelSearchChange, allItems, }: UseFileSearchOptions): UseFileSearchReturn;
|