@gingkoo/pandora-explorer 0.0.1-alpha.1 → 0.0.1-alpha.100
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 +0 -91
- package/lib/es/components/Dropdown/index.d.ts +1 -0
- package/lib/es/components/columns/index.d.ts +3 -3
- package/lib/es/components/details/index.d.ts +4 -0
- package/lib/es/components/icons/index.d.ts +7 -1
- package/lib/es/components/menu/index.d.ts +6 -2
- package/lib/es/components/menu/menulist.d.ts +2 -0
- package/lib/es/components/notdata/index.d.ts +2 -0
- package/lib/es/components/select-box/index.d.ts +8 -3
- package/lib/es/components/tile/index.d.ts +5 -4
- package/lib/es/components/tree/components/Indent.d.ts +1 -8
- package/lib/es/components/tree/components/MotionTreeNode.d.ts +2 -1
- package/lib/es/components/tree/components/Tree.d.ts +28 -28
- package/lib/es/components/tree/components/TreeNode.d.ts +1 -1
- package/lib/es/components/tree/components/contextTypes.d.ts +4 -4
- package/lib/es/components/tree/components/interface.d.ts +1 -0
- package/lib/es/components/tree/components/util.d.ts +7 -7
- package/lib/es/components/tree/components/utils/keyUtil.d.ts +1 -2
- package/lib/es/components/tree/components/utils/treeUtil.d.ts +3 -3
- package/lib/es/components/tree/index.d.ts +9 -5
- package/lib/es/components/virtualScroll/index.d.ts +7 -2
- package/lib/es/enum.d.ts +1 -0
- package/lib/es/explorer.d.ts +3 -0
- package/lib/es/index.d.ts +5 -1
- package/lib/es/index.js +5017 -2202
- package/lib/es/index.js.map +1 -1
- package/lib/es/layout/components/explorer-head/index.d.ts +1 -1
- package/lib/es/layout/components/explorer-menu/index.d.ts +1 -1
- package/lib/es/layout/index.d.ts +6 -1
- package/lib/es/store.d.ts +28 -2
- package/lib/es/types.d.ts +38 -10
- package/lib/es/utils/helper.d.ts +3 -0
- package/package.json +12 -1
- package/lib/umd/index.js +0 -7598
- package/lib/umd/index.js.map +0 -1
- package/lib/umd/index.min.js +0 -2
- package/lib/umd/index.min.js.map +0 -1
package/lib/es/layout/index.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import './index.less';
|
|
2
2
|
import { ExplorerProps } from '../';
|
|
3
|
-
|
|
3
|
+
interface ExploreLayout extends ExplorerProps {
|
|
4
|
+
loadNode: (key: string) => Promise<any>;
|
|
5
|
+
onMenuClick?: any;
|
|
6
|
+
onMoveFile?: any;
|
|
7
|
+
}
|
|
8
|
+
declare const Layout: (props: ExploreLayout) => import("react/jsx-runtime").JSX.Element;
|
|
4
9
|
export default Layout;
|
package/lib/es/store.d.ts
CHANGED
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ApiStatusEnum } from './enum';
|
|
3
|
-
import { ExplorerItem, ColumnsProps } from './types';
|
|
4
|
-
interface ExampleContextProps {
|
|
3
|
+
import { ExplorerItem, ExplorerProps, ColumnsProps } from './types';
|
|
4
|
+
interface ExampleContextProps extends ExplorerProps {
|
|
5
5
|
pathDisplay: string;
|
|
6
6
|
menutype: 'tile' | 'table' | 'column';
|
|
7
7
|
menuSize: number;
|
|
8
8
|
infoshow: boolean;
|
|
9
9
|
curlist: ExplorerItem[];
|
|
10
10
|
log?: string[];
|
|
11
|
+
logindex: number;
|
|
11
12
|
loading?: ApiStatusEnum;
|
|
12
13
|
curInfo?: ExplorerItem | null;
|
|
13
14
|
dataMap: {
|
|
14
15
|
[key: string]: ExplorerItem;
|
|
15
16
|
} | null;
|
|
17
|
+
reamekey: string | null;
|
|
18
|
+
menuRename: string | null;
|
|
19
|
+
curSelect: string | null;
|
|
20
|
+
curSelectFile: string | null;
|
|
21
|
+
loadkey: string[];
|
|
22
|
+
nav_loadKey: string[];
|
|
23
|
+
expand?: string[];
|
|
24
|
+
expandkey: string[];
|
|
25
|
+
shift: Boolean;
|
|
26
|
+
control: Boolean;
|
|
27
|
+
totalNum: number;
|
|
16
28
|
columns?: ColumnsProps[];
|
|
17
29
|
getIcons: (v: ExplorerItem, className: string, style?: any) => JSX.Element;
|
|
30
|
+
uploadFile: any;
|
|
31
|
+
createFolder: any;
|
|
32
|
+
reloadNode: (key: string) => void;
|
|
33
|
+
openMenu: (props: any, param?: ExplorerItem | null) => void;
|
|
34
|
+
closeMenu: () => void;
|
|
35
|
+
setTotalNum: React.Dispatch<React.SetStateAction<number>>;
|
|
18
36
|
setLog: React.Dispatch<React.SetStateAction<string[]>>;
|
|
37
|
+
setLogIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
19
38
|
setCurInfo: React.Dispatch<React.SetStateAction<ExplorerItem | null>>;
|
|
20
39
|
setMenuSize: React.Dispatch<React.SetStateAction<number>>;
|
|
21
40
|
setCurList: React.Dispatch<React.SetStateAction<ExplorerItem[]>>;
|
|
@@ -23,6 +42,13 @@ interface ExampleContextProps {
|
|
|
23
42
|
setLoading: React.Dispatch<React.SetStateAction<ApiStatusEnum>>;
|
|
24
43
|
setPathDisplay: React.Dispatch<React.SetStateAction<string>>;
|
|
25
44
|
setMenutype: React.Dispatch<React.SetStateAction<'tile' | 'table' | 'column'>>;
|
|
45
|
+
setReName: React.Dispatch<React.SetStateAction<string | null>>;
|
|
46
|
+
setMenuRename: React.Dispatch<React.SetStateAction<string | null>>;
|
|
47
|
+
setCurSelect: (v: string | null) => void;
|
|
48
|
+
setCurSelectFile: React.Dispatch<React.SetStateAction<string | null>>;
|
|
49
|
+
setLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
|
|
50
|
+
setNavLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
|
|
51
|
+
setExpandkey: React.Dispatch<React.SetStateAction<string[]>>;
|
|
26
52
|
}
|
|
27
53
|
export declare const ExampleContext: React.Context<ExampleContextProps>;
|
|
28
54
|
export {};
|
package/lib/es/types.d.ts
CHANGED
|
@@ -2,20 +2,37 @@
|
|
|
2
2
|
export interface ExplorerType {
|
|
3
3
|
}
|
|
4
4
|
export interface ExplorerProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
ref?: any;
|
|
6
|
+
data?: ExplorerItem[];
|
|
7
|
+
filelist?: ExplorerItem[];
|
|
8
|
+
checks?: string[];
|
|
7
9
|
defaultViewType?: 'tile' | 'column' | 'table';
|
|
8
10
|
defaultpageNum?: number;
|
|
11
|
+
loadging?: boolean;
|
|
9
12
|
isNavtab?: boolean;
|
|
10
13
|
isHeader?: boolean;
|
|
11
14
|
isDrag?: boolean;
|
|
12
15
|
isSelectBoxes?: boolean;
|
|
13
16
|
isOpenMenu?: boolean;
|
|
17
|
+
isUpload?: boolean;
|
|
18
|
+
isDelect?: boolean;
|
|
19
|
+
isDownload?: boolean;
|
|
20
|
+
isEdit?: boolean;
|
|
21
|
+
isAttribute?: boolean;
|
|
22
|
+
showPages?: boolean;
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
checkType?: 'file' | 'folder';
|
|
25
|
+
checkMode?: 'check' | 'file';
|
|
14
26
|
columns?: ColumnsProps[];
|
|
27
|
+
expandedKeys?: string[];
|
|
28
|
+
accept?: string;
|
|
29
|
+
selectedSuffix?: string[];
|
|
30
|
+
expandkey?: string[];
|
|
15
31
|
loadData?: (key: any, page?: {
|
|
16
32
|
page: number;
|
|
17
33
|
pageNum: number;
|
|
18
34
|
}) => Promise<{
|
|
35
|
+
status?: 'OK' | 'Err';
|
|
19
36
|
current?: {
|
|
20
37
|
icon?: string;
|
|
21
38
|
pathDisplay?: string;
|
|
@@ -26,26 +43,35 @@ export interface ExplorerProps {
|
|
|
26
43
|
};
|
|
27
44
|
fileList: ExplorerItem[];
|
|
28
45
|
}>;
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
createFile?: (name: string, parent: ExplorerItem, info: ExplorerItem) => Promise<void>;
|
|
47
|
+
loadMenu?: (key?: MenuItem, param?: ExplorerItem) => MenuItem | undefined;
|
|
48
|
+
onSelectFile?: (key: string | null, param?: ExplorerItem) => void;
|
|
49
|
+
renderFileInfo?: (param: ExplorerItem) => React.ReactNode;
|
|
50
|
+
onChangeCurMap?: (map: any) => void;
|
|
51
|
+
onExpand?: (keys: string[]) => void;
|
|
52
|
+
onUpload?: (file: any, param: ExplorerItem, empty?: string[]) => Promise<void> | void;
|
|
53
|
+
onCheck?: (keys: string[], param?: ExplorerItem[]) => void;
|
|
31
54
|
onChange?: (data: ExplorerItem[]) => void;
|
|
32
55
|
onMenuClick?: (key: string, param: ExplorerItem) => void;
|
|
33
56
|
onDblclick?: (key: string, param: ExplorerItem) => void;
|
|
34
|
-
onRename?: (key: string, value: string, param: ExplorerItem) =>
|
|
57
|
+
onRename?: (key: string, value: string, param: ExplorerItem) => Promise<ExplorerItem | void>;
|
|
35
58
|
onSelect?: (key: string, value: string, param: ExplorerItem) => boolean | void;
|
|
36
|
-
onDelect?: (key:
|
|
37
|
-
onMoveFile?: (cur:
|
|
59
|
+
onDelect?: (key: string[], param: ExplorerItem) => Promise<boolean> | void;
|
|
60
|
+
onMoveFile?: (cur: ExplorerItem[], target: ExplorerItem) => Promise<boolean> | void;
|
|
38
61
|
onSearch?: (value: string, curInfo: ExplorerItem) => Promise<boolean> | void;
|
|
39
62
|
onBookmark?: (param: ExplorerItem) => void;
|
|
40
|
-
|
|
63
|
+
onCopy?: (param: ExplorerItem | null) => void;
|
|
64
|
+
onShear?: (param: ExplorerItem | null) => void;
|
|
65
|
+
onPaste?: (param: ExplorerItem) => void;
|
|
66
|
+
onViewType?: (type: 'tile' | 'column' | 'table') => void;
|
|
41
67
|
}
|
|
42
68
|
export interface ExplorerItem {
|
|
43
69
|
key: string;
|
|
44
70
|
title: string;
|
|
45
|
-
type:
|
|
71
|
+
type: 'file' | 'folder';
|
|
46
72
|
suffix?: string;
|
|
47
73
|
api?: string;
|
|
48
|
-
menu?:
|
|
74
|
+
menu?: boolean;
|
|
49
75
|
pic?: string;
|
|
50
76
|
filesize?: string;
|
|
51
77
|
createUser?: {
|
|
@@ -61,6 +87,7 @@ export interface ExplorerItem {
|
|
|
61
87
|
userId: string;
|
|
62
88
|
};
|
|
63
89
|
fixTime: string;
|
|
90
|
+
source: string;
|
|
64
91
|
auth?: {};
|
|
65
92
|
[key: string]: any;
|
|
66
93
|
}
|
|
@@ -77,4 +104,5 @@ export interface ColumnsProps {
|
|
|
77
104
|
key: string;
|
|
78
105
|
width?: number;
|
|
79
106
|
render?: (param: any) => JSX.Element;
|
|
107
|
+
renderTool?: (param: any) => JSX.Element;
|
|
80
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gingkoo/pandora-explorer",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.100",
|
|
4
4
|
"description": "文件资源管理器",
|
|
5
5
|
"main": "lib/es/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -21,11 +21,18 @@
|
|
|
21
21
|
"license": "ISC",
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@emotion/css": ">=11.0.0",
|
|
24
|
+
"@gingkoo/pandora-ui": "1.0.0-alpha.12",
|
|
25
|
+
"classnames": "^2.5.1",
|
|
24
26
|
"lodash": "*",
|
|
25
27
|
"react": "^17.0.0 || ^18.0.0",
|
|
26
28
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
27
29
|
},
|
|
28
30
|
"dependencies": {
|
|
31
|
+
"@gingkoo/pandora": "1.0.0-alpha.34",
|
|
32
|
+
"@gingkoo/pandora-icons": "^0.0.1-alpha.11",
|
|
33
|
+
"@gingkoo/pandora-viewer": "^0.0.1-alpha.30",
|
|
34
|
+
"axios": "^1.7.2",
|
|
35
|
+
"rc-motion": "^2.9.0",
|
|
29
36
|
"rc-virtual-list": "^3.11.5"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
@@ -35,12 +42,16 @@
|
|
|
35
42
|
"@babel/preset-react": "^7.23.3",
|
|
36
43
|
"@babel/preset-typescript": "^7.23.3",
|
|
37
44
|
"@emotion/css": "^11.11.2",
|
|
45
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
46
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
38
47
|
"@rollup/plugin-replace": "^5.0.5",
|
|
39
48
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
49
|
+
"@sixian/css-url": "^1.0.3",
|
|
40
50
|
"@types/lodash": "^4.14.202",
|
|
41
51
|
"@types/react": "^18.2.49",
|
|
42
52
|
"@types/react-dom": "^18.2.18",
|
|
43
53
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
54
|
+
"classnames": "^2.5.1",
|
|
44
55
|
"cross-env": "^7.0.2",
|
|
45
56
|
"less": "^4.2.0",
|
|
46
57
|
"lodash": "^4.17.21",
|