File tree Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,15 @@ import {
20
20
useDebounce ,
21
21
useSnackMessage ,
22
22
fetchDirectoryContent ,
23
+ ElementAttributes ,
23
24
} from '@gridsuite/commons-ui' ;
24
25
import { Search } from '@mui/icons-material' ;
25
26
import { useDispatch , useSelector } from 'react-redux' ;
26
27
import { setSelectedDirectory , setTreeData } from '../../redux/actions' ;
27
28
import { updatedTree } from '../tree-views-container' ;
28
29
import { useIntl } from 'react-intl' ;
29
30
import { SearchItem } from './search-item' ;
30
- import { IDirectory , ITreeData , ReduxState } from '../../redux/reducer.type' ;
31
+ import { ITreeData , ReduxState } from '../../redux/reducer.type' ;
31
32
import { UUID } from 'crypto' ;
32
33
33
34
export const SEARCH_FETCH_TIMEOUT_MILLIS = 1000 ; // 1 second
@@ -114,7 +115,7 @@ export const SearchBar: FunctionComponent<SearchBarProps> = ({ inputRef }) => {
114
115
) ;
115
116
116
117
const updateMapData = useCallback (
117
- ( nodeId : string , children : IDirectory ) => {
118
+ ( nodeId : string , children : ElementAttributes [ ] ) => {
118
119
if ( ! treeDataRef . current ) {
119
120
return ;
120
121
}
Original file line number Diff line number Diff line change 5
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
*/
7
7
import { UUID } from 'crypto' ;
8
+ import { ElementAttributes } from '@gridsuite/commons-ui' ;
8
9
9
10
type UserProfile = {
10
11
sub : string ;
@@ -22,30 +23,14 @@ interface IUser {
22
23
expires_at : number ;
23
24
}
24
25
25
- export interface IDirectory {
26
- elementUuid : UUID ;
27
- elementName : string ;
28
- type : 'DIRECTORY' ;
29
- accessRights : {
30
- isPrivate : boolean ;
31
- } ;
32
- owner : string ;
33
- subdirectoriesCount : number ;
34
- creationDate : string ;
35
- lastModificationDate : string ;
36
- lastModifiedBy : string ;
37
- children : any [ ] ;
38
- parentUuid : null | UUID ;
39
- }
40
-
41
26
export interface ITreeData {
42
- rootDirectories : IDirectory [ ] ;
27
+ rootDirectories : ElementAttributes [ ] ;
43
28
mapData : Record < string , any > ;
44
29
}
45
30
46
31
export interface ReduxState {
47
32
activeDirectory : UUID ;
48
- selectedDirectory : IDirectory ;
33
+ selectedDirectory : ElementAttributes ;
49
34
treeData : ITreeData ;
50
35
user : IUser ;
51
36
}
You can’t perform that action at this time.
0 commit comments