@gingkoo/pandora-explorer 0.0.1-alpha.11 → 0.0.1-alpha.111

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.
Files changed (33) hide show
  1. package/lib/es/components/Dropdown/index.d.ts +1 -0
  2. package/lib/es/components/columns/index.d.ts +3 -3
  3. package/lib/es/components/details/index.d.ts +4 -0
  4. package/lib/es/components/icons/index.d.ts +6 -1
  5. package/lib/es/components/menu/index.d.ts +7 -2
  6. package/lib/es/components/menu/menulist.d.ts +2 -0
  7. package/lib/es/components/notdata/index.d.ts +2 -0
  8. package/lib/es/components/select-box/index.d.ts +9 -3
  9. package/lib/es/components/tile/index.d.ts +5 -4
  10. package/lib/es/components/tree/components/Indent.d.ts +1 -8
  11. package/lib/es/components/tree/components/MotionTreeNode.d.ts +2 -1
  12. package/lib/es/components/tree/components/Tree.d.ts +28 -28
  13. package/lib/es/components/tree/components/TreeNode.d.ts +1 -1
  14. package/lib/es/components/tree/components/contextTypes.d.ts +4 -4
  15. package/lib/es/components/tree/components/interface.d.ts +1 -0
  16. package/lib/es/components/tree/components/util.d.ts +7 -7
  17. package/lib/es/components/tree/components/utils/keyUtil.d.ts +1 -2
  18. package/lib/es/components/tree/components/utils/treeUtil.d.ts +3 -3
  19. package/lib/es/components/tree/index.d.ts +9 -7
  20. package/lib/es/components/tree/tree-item.d.ts +1 -2
  21. package/lib/es/components/virtualScroll/index.d.ts +7 -2
  22. package/lib/es/css.d.ts +7 -7
  23. package/lib/es/enum.d.ts +1 -0
  24. package/lib/es/explorer.d.ts +3 -0
  25. package/lib/es/index.d.ts +5 -1
  26. package/lib/es/index.js +7300 -4529
  27. package/lib/es/index.js.map +1 -1
  28. package/lib/es/layout/components/explorer-menu/index.d.ts +1 -1
  29. package/lib/es/layout/index.d.ts +2 -0
  30. package/lib/es/store.d.ts +30 -0
  31. package/lib/es/types.d.ts +37 -13
  32. package/lib/es/utils/helper.d.ts +3 -0
  33. package/package.json +11 -6
@@ -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;
@@ -2,6 +2,8 @@ import './index.less';
2
2
  import { ExplorerProps } from '../';
3
3
  interface ExploreLayout extends ExplorerProps {
4
4
  loadNode: (key: string) => Promise<any>;
5
+ onMenuClick?: any;
6
+ onMoveFile?: any;
5
7
  }
6
8
  declare const Layout: (props: ExploreLayout) => import("react/jsx-runtime").JSX.Element;
7
9
  export default Layout;
package/lib/es/store.d.ts CHANGED
@@ -8,14 +8,34 @@ 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;
28
+ createState: Boolean;
16
29
  columns?: ColumnsProps[];
17
30
  getIcons: (v: ExplorerItem, className: string, style?: any) => JSX.Element;
31
+ uploadFile: any;
32
+ createFolder: any;
33
+ reloadNode: (key: string) => void;
34
+ openMenu: (props: any, param?: ExplorerItem | null) => void;
35
+ closeMenu: () => void;
36
+ setTotalNum: React.Dispatch<React.SetStateAction<number>>;
18
37
  setLog: React.Dispatch<React.SetStateAction<string[]>>;
38
+ setLogIndex: React.Dispatch<React.SetStateAction<number>>;
19
39
  setCurInfo: React.Dispatch<React.SetStateAction<ExplorerItem | null>>;
20
40
  setMenuSize: React.Dispatch<React.SetStateAction<number>>;
21
41
  setCurList: React.Dispatch<React.SetStateAction<ExplorerItem[]>>;
@@ -23,6 +43,16 @@ interface ExampleContextProps extends ExplorerProps {
23
43
  setLoading: React.Dispatch<React.SetStateAction<ApiStatusEnum>>;
24
44
  setPathDisplay: React.Dispatch<React.SetStateAction<string>>;
25
45
  setMenutype: React.Dispatch<React.SetStateAction<'tile' | 'table' | 'column'>>;
46
+ setReName: React.Dispatch<React.SetStateAction<string | null>>;
47
+ setMenuRename: React.Dispatch<React.SetStateAction<string | null>>;
48
+ setCurSelect: (v: string | null) => void;
49
+ setCurSelectFile: React.Dispatch<React.SetStateAction<string | null>>;
50
+ setLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
51
+ setNavLoadKey: React.Dispatch<React.SetStateAction<string[]>>;
52
+ setExpandkey: React.Dispatch<React.SetStateAction<string[]>>;
53
+ setDataMap: React.Dispatch<React.SetStateAction<{
54
+ [key: string]: ExplorerItem;
55
+ } | null>>;
26
56
  }
27
57
  export declare const ExampleContext: React.Context<ExampleContextProps>;
28
58
  export {};
package/lib/es/types.d.ts CHANGED
@@ -2,22 +2,38 @@
2
2
  export interface ExplorerType {
3
3
  }
4
4
  export interface ExplorerProps {
5
+ ref?: any;
5
6
  data?: ExplorerItem[];
7
+ filelist?: ExplorerItem[];
6
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;
14
24
  checkType?: 'file' | 'folder';
15
25
  checkMode?: 'check' | 'file';
16
26
  columns?: ColumnsProps[];
27
+ expandedKeys?: string[];
28
+ accept?: string;
29
+ selectedSuffix?: string[];
30
+ activeFile?: string;
31
+ expandkey?: string[];
17
32
  loadData?: (key: any, page?: {
18
33
  page: number;
19
34
  pageNum: number;
20
35
  }) => Promise<{
36
+ status?: 'OK' | 'Err';
21
37
  current?: {
22
38
  icon?: string;
23
39
  pathDisplay?: string;
@@ -28,24 +44,30 @@ export interface ExplorerProps {
28
44
  };
29
45
  fileList: ExplorerItem[];
30
46
  }>;
31
- loadRightClickMenu?: (menu: MenuItem[], param: ExplorerItem) => Promise<MenuItem[]> | MenuItem[];
32
- createFile?: (config?: {
33
- path: string;
34
- name: string;
35
- suffix: string;
36
- }) => {};
37
- onDownload?: (file: File, param: ExplorerItem) => void;
38
- onCheck?: (keys: string[], param: ExplorerItem[]) => void;
47
+ createFile?: (name: string, parent: ExplorerItem, info: ExplorerItem) => Promise<void>;
48
+ loadMenu?: (key?: MenuItem, param?: ExplorerItem) => MenuItem | undefined;
49
+ onSelectFile?: (key: string | null, param?: ExplorerItem) => void;
50
+ renderFileInfo?: (param: ExplorerItem) => React.ReactNode;
51
+ onFileDarg?: (key: string) => boolean;
52
+ onStartDarg?: (key: string[]) => void;
53
+ onEndDarg?: () => void;
54
+ onChangeCurMap?: (map: any) => void;
55
+ onExpand?: (keys: string[]) => void;
56
+ onUpload?: (file: any, param: ExplorerItem, empty?: string[]) => Promise<void> | void;
57
+ onCheck?: (keys: string[], param?: ExplorerItem[]) => void;
39
58
  onChange?: (data: ExplorerItem[]) => void;
40
59
  onMenuClick?: (key: string, param: ExplorerItem) => void;
41
60
  onDblclick?: (key: string, param: ExplorerItem) => void;
42
- onRename?: (key: string, value: string, param: ExplorerItem) => boolean | void;
61
+ onRename?: (key: string, value: string, param: ExplorerItem) => Promise<ExplorerItem | void>;
43
62
  onSelect?: (key: string, value: string, param: ExplorerItem) => boolean | void;
44
- onDelect?: (key: any) => Promise<boolean> | void;
45
- onMoveFile?: (cur: string[], target: string) => Promise<boolean> | void;
63
+ onDelect?: (key: string[], param: ExplorerItem) => Promise<boolean> | void;
64
+ onMoveFile?: (cur: ExplorerItem[], target?: ExplorerItem) => Promise<boolean> | void;
46
65
  onSearch?: (value: string, curInfo: ExplorerItem) => Promise<boolean> | void;
47
66
  onBookmark?: (param: ExplorerItem) => void;
48
- onIfame?: (key: string) => {};
67
+ onCopy?: (param: ExplorerItem | null) => void;
68
+ onShear?: (param: ExplorerItem | null) => void;
69
+ onPaste?: (param: ExplorerItem) => void;
70
+ onViewType?: (type: 'tile' | 'column' | 'table') => void;
49
71
  }
50
72
  export interface ExplorerItem {
51
73
  key: string;
@@ -53,7 +75,7 @@ export interface ExplorerItem {
53
75
  type: 'file' | 'folder';
54
76
  suffix?: string;
55
77
  api?: string;
56
- menu?: string | MenuItem;
78
+ menu?: boolean;
57
79
  pic?: string;
58
80
  filesize?: string;
59
81
  createUser?: {
@@ -69,6 +91,7 @@ export interface ExplorerItem {
69
91
  userId: string;
70
92
  };
71
93
  fixTime: string;
94
+ source: string;
72
95
  auth?: {};
73
96
  [key: string]: any;
74
97
  }
@@ -85,4 +108,5 @@ export interface ColumnsProps {
85
108
  key: string;
86
109
  width?: number;
87
110
  render?: (param: any) => JSX.Element;
111
+ renderTool?: (param: any) => JSX.Element;
88
112
  }
@@ -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.11",
3
+ "version": "0.0.1-alpha.111",
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.30",
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",