@gingkoo/pandora-explorer 0.0.1-alpha.9 → 0.0.1-alpha.90

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.
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const ExplorerHead: () => import("react/jsx-runtime").JSX.Element;
2
+ declare const ExplorerHead: (props: any) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ExplorerHead;
@@ -1,3 +1,3 @@
1
1
  import './index.less';
2
- declare const ExplorerMenu: (props: any) => import("react/jsx-runtime").JSX.Element | undefined;
2
+ declare const ExplorerMenu: (props: any) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ExplorerMenu;
@@ -1,4 +1,8 @@
1
1
  import './index.less';
2
2
  import { ExplorerProps } from '../';
3
- declare const Layout: (props: ExplorerProps) => import("react/jsx-runtime").JSX.Element;
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,33 @@ 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;
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 extends ExplorerProps {
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: React.Dispatch<React.SetStateAction<string | null>>;
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,22 +2,35 @@
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
+ showPages?: boolean;
22
+ multiple?: boolean;
14
23
  checkType?: 'file' | 'folder';
15
24
  checkMode?: 'check' | 'file';
16
25
  columns?: ColumnsProps[];
26
+ expandedKeys?: string[];
27
+ accept?: string;
28
+ selectedSuffix?: string[];
17
29
  loadData?: (key: any, page?: {
18
30
  page: number;
19
31
  pageNum: number;
20
32
  }) => Promise<{
33
+ status?: 'OK' | 'Err';
21
34
  current?: {
22
35
  icon?: string;
23
36
  pathDisplay?: string;
@@ -28,18 +41,25 @@ export interface ExplorerProps {
28
41
  };
29
42
  fileList: ExplorerItem[];
30
43
  }>;
31
- loadRightClickMenu?: (menu: MenuItem[], param: ExplorerItem) => Promise<MenuItem[]> | MenuItem[];
32
- onCheck?: (keys: string[], param: ExplorerItem[]) => void;
44
+ createFile?: (name: string, parent: ExplorerItem, info: ExplorerItem) => Promise<void>;
45
+ loadMenu?: (key?: MenuItem, param?: ExplorerItem) => MenuItem | undefined;
46
+ renderFileInfo?: (param: ExplorerItem) => React.ReactNode;
47
+ onChangeCurMap?: (map: any) => void;
48
+ onUpload?: (file: any, param: ExplorerItem, empty?: string[]) => Promise<void> | void;
49
+ onCheck?: (keys: string[], param?: ExplorerItem[]) => void;
33
50
  onChange?: (data: ExplorerItem[]) => void;
34
51
  onMenuClick?: (key: string, param: ExplorerItem) => void;
35
52
  onDblclick?: (key: string, param: ExplorerItem) => void;
36
- onRename?: (key: string, value: string, param: ExplorerItem) => boolean | void;
53
+ onRename?: (key: string, value: string, param: ExplorerItem) => Promise<ExplorerItem | void>;
37
54
  onSelect?: (key: string, value: string, param: ExplorerItem) => boolean | void;
38
- onDelect?: (key: any) => Promise<boolean> | void;
39
- onMoveFile?: (cur: string[], target: string) => Promise<boolean> | void;
55
+ onDelect?: (key: string[], param: ExplorerItem) => Promise<boolean> | void;
56
+ onMoveFile?: (cur: ExplorerItem[], target: ExplorerItem) => Promise<boolean> | void;
40
57
  onSearch?: (value: string, curInfo: ExplorerItem) => Promise<boolean> | void;
41
58
  onBookmark?: (param: ExplorerItem) => void;
42
- onIfame?: (key: string) => {};
59
+ onCopy?: (param: ExplorerItem | null) => void;
60
+ onShear?: (param: ExplorerItem | null) => void;
61
+ onPaste?: (param: ExplorerItem) => void;
62
+ onViewType?: (type: 'tile' | 'column' | 'table') => void;
43
63
  }
44
64
  export interface ExplorerItem {
45
65
  key: string;
@@ -47,7 +67,7 @@ export interface ExplorerItem {
47
67
  type: 'file' | 'folder';
48
68
  suffix?: string;
49
69
  api?: string;
50
- menu?: string | MenuItem;
70
+ menu?: boolean;
51
71
  pic?: string;
52
72
  filesize?: string;
53
73
  createUser?: {
@@ -63,6 +83,7 @@ export interface ExplorerItem {
63
83
  userId: string;
64
84
  };
65
85
  fixTime: string;
86
+ source: string;
66
87
  auth?: {};
67
88
  [key: string]: any;
68
89
  }
@@ -0,0 +1,3 @@
1
+ export declare const getKey: (randomLength?: number) => string;
2
+ export declare const convertBytesToSize: (bytes?: number) => string;
3
+ export declare const DateFormat: (date?: number | string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-explorer",
3
- "version": "0.0.1-alpha.9",
3
+ "version": "0.0.1-alpha.90",
4
4
  "description": "文件资源管理器",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",
@@ -21,14 +21,19 @@
21
21
  "license": "ISC",
22
22
  "peerDependencies": {
23
23
  "@emotion/css": ">=11.0.0",
24
- "lodash": "*",
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
- "rc-virtual-list": "^3.11.5",
31
- "rc-motion": "^2.9.0"
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.28",
34
+ "axios": "^1.7.2",
35
+ "rc-motion": "^2.9.0",
36
+ "rc-virtual-list": "^3.11.5"
32
37
  },
33
38
  "devDependencies": {
34
39
  "@babel/core": "^7.23.9",
@@ -39,16 +44,16 @@
39
44
  "@emotion/css": "^11.11.2",
40
45
  "@rollup/plugin-commonjs": "^25.0.7",
41
46
  "@rollup/plugin-node-resolve": "^15.2.3",
42
- "@sixian/css-url": "^1.0.3",
43
47
  "@rollup/plugin-replace": "^5.0.5",
44
48
  "@rollup/plugin-typescript": "^11.1.6",
49
+ "@sixian/css-url": "^1.0.3",
45
50
  "@types/lodash": "^4.14.202",
46
51
  "@types/react": "^18.2.49",
47
52
  "@types/react-dom": "^18.2.18",
48
53
  "babel-plugin-dev-expression": "^0.2.3",
54
+ "classnames": "^2.5.1",
49
55
  "cross-env": "^7.0.2",
50
56
  "less": "^4.2.0",
51
- "classnames": "^2.5.1",
52
57
  "lodash": "^4.17.21",
53
58
  "postcss": "^8.4.33",
54
59
  "prettier": "^3.2.4",