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