@gingkoo/pandora-explorer 0.0.1-alpha.99 → 0.1.0

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/store.d.ts CHANGED
@@ -22,9 +22,11 @@ interface ExampleContextProps extends ExplorerProps {
22
22
  nav_loadKey: string[];
23
23
  expand?: string[];
24
24
  expandkey: string[];
25
+ nav_expandkey: string[];
25
26
  shift: Boolean;
26
27
  control: Boolean;
27
28
  totalNum: number;
29
+ createState: Boolean;
28
30
  columns?: ColumnsProps[];
29
31
  getIcons: (v: ExplorerItem, className: string, style?: any) => JSX.Element;
30
32
  uploadFile: any;
@@ -49,6 +51,10 @@ interface ExampleContextProps extends ExplorerProps {
49
51
  setLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
50
52
  setNavLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
51
53
  setExpandkey: React.Dispatch<React.SetStateAction<string[]>>;
54
+ setExpandNavKey: React.Dispatch<React.SetStateAction<string[]>>;
55
+ setDataMap: React.Dispatch<React.SetStateAction<{
56
+ [key: string]: ExplorerItem;
57
+ } | null>>;
52
58
  }
53
59
  export declare const ExampleContext: React.Context<ExampleContextProps>;
54
60
  export {};
package/lib/es/types.d.ts CHANGED
@@ -1,6 +1,17 @@
1
- /// <reference types="react" />
2
1
  export interface ExplorerType {
3
2
  }
3
+ export interface Returndata {
4
+ status?: 'OK' | 'Err';
5
+ current: {
6
+ icon?: string;
7
+ pathDisplay?: string;
8
+ parentLevel?: string;
9
+ title: string;
10
+ type: string;
11
+ suffix?: string;
12
+ };
13
+ fileList: ExplorerItem[];
14
+ }
4
15
  export interface ExplorerProps {
5
16
  ref?: any;
6
17
  data?: ExplorerItem[];
@@ -27,6 +38,7 @@ export interface ExplorerProps {
27
38
  expandedKeys?: string[];
28
39
  accept?: string;
29
40
  selectedSuffix?: string[];
41
+ activeFile?: string;
30
42
  expandkey?: string[];
31
43
  loadData?: (key: any, page?: {
32
44
  page: number;
@@ -43,10 +55,13 @@ export interface ExplorerProps {
43
55
  };
44
56
  fileList: ExplorerItem[];
45
57
  }>;
46
- createFile?: (name: string, parent: ExplorerItem, info: ExplorerItem) => Promise<void>;
58
+ createFile?: (name: string, parent: ExplorerItem, info: ExplorerItem) => Promise<Returndata | void>;
47
59
  loadMenu?: (key?: MenuItem, param?: ExplorerItem) => MenuItem | undefined;
48
60
  onSelectFile?: (key: string | null, param?: ExplorerItem) => void;
49
61
  renderFileInfo?: (param: ExplorerItem) => React.ReactNode;
62
+ onFileDarg?: (key: string) => boolean;
63
+ onStartDarg?: (key: string[]) => void;
64
+ onEndDarg?: () => void;
50
65
  onChangeCurMap?: (map: any) => void;
51
66
  onExpand?: (keys: string[]) => void;
52
67
  onUpload?: (file: any, param: ExplorerItem, empty?: string[]) => Promise<void> | void;
@@ -57,7 +72,7 @@ export interface ExplorerProps {
57
72
  onRename?: (key: string, value: string, param: ExplorerItem) => Promise<ExplorerItem | void>;
58
73
  onSelect?: (key: string, value: string, param: ExplorerItem) => boolean | void;
59
74
  onDelect?: (key: string[], param: ExplorerItem) => Promise<boolean> | void;
60
- onMoveFile?: (cur: ExplorerItem[], target: ExplorerItem) => Promise<boolean> | void;
75
+ onMoveFile?: (cur: ExplorerItem[], target?: ExplorerItem) => Promise<boolean> | void;
61
76
  onSearch?: (value: string, curInfo: ExplorerItem) => Promise<boolean> | void;
62
77
  onBookmark?: (param: ExplorerItem) => void;
63
78
  onCopy?: (param: ExplorerItem | null) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-explorer",
3
- "version": "0.0.1-alpha.99",
3
+ "version": "0.1.0",
4
4
  "description": "文件资源管理器",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",
@@ -21,18 +21,17 @@
21
21
  "license": "ISC",
22
22
  "peerDependencies": {
23
23
  "@emotion/css": ">=11.0.0",
24
- "@gingkoo/pandora-ui": "1.0.0-alpha.12",
25
24
  "classnames": "^2.5.1",
26
25
  "lodash": "*",
27
26
  "react": "^17.0.0 || ^18.0.0",
28
27
  "react-dom": "^17.0.0 || ^18.0.0"
29
28
  },
30
29
  "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",
30
+ "@gingkoo/pandora": "1.0.0-alpha.80",
31
+ "@gingkoo/pandora-icons": "^0.0.3",
34
32
  "axios": "^1.7.2",
35
33
  "rc-motion": "^2.9.0",
34
+ "mobx": "^6.12.0",
36
35
  "rc-virtual-list": "^3.11.5"
37
36
  },
38
37
  "devDependencies": {