@gingkoo/pandora-explorer 0.0.1-alpha.6 → 0.0.1-alpha.60
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/icons/index.d.ts +2 -0
- package/lib/es/components/menu/index.d.ts +1 -0
- package/lib/es/components/notdata/index.d.ts +2 -0
- package/lib/es/components/select-box/index.d.ts +2 -0
- package/lib/es/components/tile/index.d.ts +1 -1
- package/lib/es/components/tree/components/contextTypes.d.ts +2 -2
- package/lib/es/components/tree/index.d.ts +7 -3
- package/lib/es/css.d.ts +7 -7
- package/lib/es/index.js +2095 -1153
- 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 +18 -0
- package/lib/es/types.d.ts +11 -4
- package/lib/es/utils/helper.d.ts +3 -0
- package/package.json +6 -4
- package/lib/es/imgs/css.png +0 -0
- package/lib/es/imgs/folder_win11_open.png +0 -0
- package/lib/es/imgs/md.png +0 -0
- package/lib/es/imgs/menu_icon.png +0 -0
- package/lib/es/index.css +0 -2169
- package/lib/umd/index.js +0 -30644
- package/lib/umd/index.js.map +0 -1
- package/lib/umd/index.min.js +0 -15
- package/lib/umd/index.min.js.map +0 -1
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,27 @@ 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
|
+
curSelect: string | null;
|
|
19
|
+
curSelectFile: string | null;
|
|
20
|
+
loadkey: string[];
|
|
21
|
+
nav_loadKey: string[];
|
|
22
|
+
expand?: string[];
|
|
16
23
|
columns?: ColumnsProps[];
|
|
17
24
|
getIcons: (v: ExplorerItem, className: string, style?: any) => JSX.Element;
|
|
25
|
+
uploadFile: any;
|
|
26
|
+
createFolder: any;
|
|
27
|
+
reloadNode: (key: string) => void;
|
|
28
|
+
openMenu: (props: any, param?: ExplorerItem | null) => void;
|
|
29
|
+
closeMenu: () => void;
|
|
18
30
|
setLog: React.Dispatch<React.SetStateAction<string[]>>;
|
|
31
|
+
setLogIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
19
32
|
setCurInfo: React.Dispatch<React.SetStateAction<ExplorerItem | null>>;
|
|
20
33
|
setMenuSize: React.Dispatch<React.SetStateAction<number>>;
|
|
21
34
|
setCurList: React.Dispatch<React.SetStateAction<ExplorerItem[]>>;
|
|
@@ -23,6 +36,11 @@ interface ExampleContextProps extends ExplorerProps {
|
|
|
23
36
|
setLoading: React.Dispatch<React.SetStateAction<ApiStatusEnum>>;
|
|
24
37
|
setPathDisplay: React.Dispatch<React.SetStateAction<string>>;
|
|
25
38
|
setMenutype: React.Dispatch<React.SetStateAction<'tile' | 'table' | 'column'>>;
|
|
39
|
+
setReName: React.Dispatch<React.SetStateAction<string | null>>;
|
|
40
|
+
setCurSelect: React.Dispatch<React.SetStateAction<string | null>>;
|
|
41
|
+
setCurSelectFile: React.Dispatch<React.SetStateAction<string | null>>;
|
|
42
|
+
setLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
|
|
43
|
+
setNavLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
|
|
26
44
|
}
|
|
27
45
|
export declare const ExampleContext: React.Context<ExampleContextProps>;
|
|
28
46
|
export {};
|
package/lib/es/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
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';
|
|
@@ -14,10 +15,12 @@ export interface ExplorerProps {
|
|
|
14
15
|
checkType?: 'file' | 'folder';
|
|
15
16
|
checkMode?: 'check' | 'file';
|
|
16
17
|
columns?: ColumnsProps[];
|
|
18
|
+
expandedKeys?: string[];
|
|
17
19
|
loadData?: (key: any, page?: {
|
|
18
20
|
page: number;
|
|
19
21
|
pageNum: number;
|
|
20
22
|
}) => Promise<{
|
|
23
|
+
status?: 'OK' | 'Err';
|
|
21
24
|
current?: {
|
|
22
25
|
icon?: string;
|
|
23
26
|
pathDisplay?: string;
|
|
@@ -28,18 +31,22 @@ export interface ExplorerProps {
|
|
|
28
31
|
};
|
|
29
32
|
fileList: ExplorerItem[];
|
|
30
33
|
}>;
|
|
31
|
-
|
|
34
|
+
createFile?: (name: string, parent: ExplorerItem) => Promise<void>;
|
|
35
|
+
loadMenu?: (key?: MenuItem, param?: ExplorerItem) => MenuItem | undefined;
|
|
36
|
+
onUpload?: (file: any, param: ExplorerItem, empty?: string[]) => Promise<void> | void;
|
|
32
37
|
onCheck?: (keys: string[], param: ExplorerItem[]) => void;
|
|
33
38
|
onChange?: (data: ExplorerItem[]) => void;
|
|
34
39
|
onMenuClick?: (key: string, param: ExplorerItem) => void;
|
|
35
40
|
onDblclick?: (key: string, param: ExplorerItem) => void;
|
|
36
|
-
onRename?: (key: string, value: string, param: ExplorerItem) =>
|
|
41
|
+
onRename?: (key: string, value: string, param: ExplorerItem) => Promise<ExplorerItem | void>;
|
|
37
42
|
onSelect?: (key: string, value: string, param: ExplorerItem) => boolean | void;
|
|
38
43
|
onDelect?: (key: any) => Promise<boolean> | void;
|
|
39
44
|
onMoveFile?: (cur: string[], target: string) => Promise<boolean> | void;
|
|
40
45
|
onSearch?: (value: string, curInfo: ExplorerItem) => Promise<boolean> | void;
|
|
41
46
|
onBookmark?: (param: ExplorerItem) => void;
|
|
42
|
-
|
|
47
|
+
onCopy?: (param: ExplorerItem | null) => void;
|
|
48
|
+
onShear?: (param: ExplorerItem | null) => void;
|
|
49
|
+
onPaste?: (param: ExplorerItem) => void;
|
|
43
50
|
}
|
|
44
51
|
export interface ExplorerItem {
|
|
45
52
|
key: string;
|
|
@@ -47,7 +54,7 @@ export interface ExplorerItem {
|
|
|
47
54
|
type: 'file' | 'folder';
|
|
48
55
|
suffix?: string;
|
|
49
56
|
api?: string;
|
|
50
|
-
menu?:
|
|
57
|
+
menu?: boolean;
|
|
51
58
|
pic?: string;
|
|
52
59
|
filesize?: string;
|
|
53
60
|
createUser?: {
|
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.60",
|
|
4
4
|
"description": "文件资源管理器",
|
|
5
5
|
"main": "lib/es/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -21,12 +21,14 @@
|
|
|
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": {
|
|
31
|
+
"rc-motion": "^2.9.0",
|
|
30
32
|
"rc-virtual-list": "^3.11.5"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
@@ -38,16 +40,16 @@
|
|
|
38
40
|
"@emotion/css": "^11.11.2",
|
|
39
41
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
40
42
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
41
|
-
"@sixian/css-url": "^1.0.3",
|
|
42
43
|
"@rollup/plugin-replace": "^5.0.5",
|
|
43
44
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
45
|
+
"@sixian/css-url": "^1.0.3",
|
|
44
46
|
"@types/lodash": "^4.14.202",
|
|
45
47
|
"@types/react": "^18.2.49",
|
|
46
48
|
"@types/react-dom": "^18.2.18",
|
|
47
49
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
50
|
+
"classnames": "^2.5.1",
|
|
48
51
|
"cross-env": "^7.0.2",
|
|
49
52
|
"less": "^4.2.0",
|
|
50
|
-
"classnames": "^2.5.1",
|
|
51
53
|
"lodash": "^4.17.21",
|
|
52
54
|
"postcss": "^8.4.33",
|
|
53
55
|
"prettier": "^3.2.4",
|
package/lib/es/imgs/css.png
DELETED
|
Binary file
|
|
Binary file
|
package/lib/es/imgs/md.png
DELETED
|
Binary file
|
|
Binary file
|