@gingkoo/pandora-explorer 0.0.1-alpha.1 → 0.0.1-alpha.100

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 (37) hide show
  1. package/README.md +0 -91
  2. package/lib/es/components/Dropdown/index.d.ts +1 -0
  3. package/lib/es/components/columns/index.d.ts +3 -3
  4. package/lib/es/components/details/index.d.ts +4 -0
  5. package/lib/es/components/icons/index.d.ts +7 -1
  6. package/lib/es/components/menu/index.d.ts +6 -2
  7. package/lib/es/components/menu/menulist.d.ts +2 -0
  8. package/lib/es/components/notdata/index.d.ts +2 -0
  9. package/lib/es/components/select-box/index.d.ts +8 -3
  10. package/lib/es/components/tile/index.d.ts +5 -4
  11. package/lib/es/components/tree/components/Indent.d.ts +1 -8
  12. package/lib/es/components/tree/components/MotionTreeNode.d.ts +2 -1
  13. package/lib/es/components/tree/components/Tree.d.ts +28 -28
  14. package/lib/es/components/tree/components/TreeNode.d.ts +1 -1
  15. package/lib/es/components/tree/components/contextTypes.d.ts +4 -4
  16. package/lib/es/components/tree/components/interface.d.ts +1 -0
  17. package/lib/es/components/tree/components/util.d.ts +7 -7
  18. package/lib/es/components/tree/components/utils/keyUtil.d.ts +1 -2
  19. package/lib/es/components/tree/components/utils/treeUtil.d.ts +3 -3
  20. package/lib/es/components/tree/index.d.ts +9 -5
  21. package/lib/es/components/virtualScroll/index.d.ts +7 -2
  22. package/lib/es/enum.d.ts +1 -0
  23. package/lib/es/explorer.d.ts +3 -0
  24. package/lib/es/index.d.ts +5 -1
  25. package/lib/es/index.js +5017 -2202
  26. package/lib/es/index.js.map +1 -1
  27. package/lib/es/layout/components/explorer-head/index.d.ts +1 -1
  28. package/lib/es/layout/components/explorer-menu/index.d.ts +1 -1
  29. package/lib/es/layout/index.d.ts +6 -1
  30. package/lib/es/store.d.ts +28 -2
  31. package/lib/es/types.d.ts +38 -10
  32. package/lib/es/utils/helper.d.ts +3 -0
  33. package/package.json +12 -1
  34. package/lib/umd/index.js +0 -7598
  35. package/lib/umd/index.js.map +0 -1
  36. package/lib/umd/index.min.js +0 -2
  37. package/lib/umd/index.min.js.map +0 -1
package/README.md CHANGED
@@ -1,93 +1,2 @@
1
1
  # pandora-explorer
2
2
 
3
-
4
-
5
- ## Getting started
6
-
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
-
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
-
11
- ## Add your files
12
-
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
-
16
- ```
17
- cd existing_repo
18
- git remote add origin http://git.server.gingkoo/frontend/pandora/pandora-components/pandora-explorer.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
-
23
- ## Integrate with your tools
24
-
25
- - [ ] [Set up project integrations](http://git.server.gingkoo/frontend/pandora/pandora-components/pandora-explorer/-/settings/integrations)
26
-
27
- ## Collaborate with your team
28
-
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
-
35
- ## Test and Deploy
36
-
37
- Use the built-in continuous integration in GitLab.
38
-
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
-
45
- ***
46
-
47
- # Editing this README
48
-
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
-
51
- ## Suggestions for a good README
52
-
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
-
55
- ## Name
56
- Choose a self-explaining name for your project.
57
-
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
-
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
-
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
-
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
-
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
-
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
-
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
78
-
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
81
-
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
-
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
-
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
88
-
89
- ## License
90
- For open source projects, say how it is licensed.
91
-
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -15,6 +15,7 @@ interface DropdownProps {
15
15
  y?: number;
16
16
  };
17
17
  style?: any;
18
+ onContextMenu?: any;
18
19
  }
19
20
  export default function Dropdown(props: DropdownProps): import("react/jsx-runtime").JSX.Element;
20
21
  export {};
@@ -1,5 +1,5 @@
1
1
  import './index.less';
2
- import { ReactNode } from 'react';
2
+ import { FC, ReactNode } from 'react';
3
3
  interface ColumnsProps {
4
4
  data: any[];
5
5
  className?: string;
@@ -12,5 +12,5 @@ interface ColumnsProps {
12
12
  onClick?: (key: any, param: any) => any;
13
13
  [key: string]: any;
14
14
  }
15
- export default function Columns(props: ColumnsProps): import("react/jsx-runtime").JSX.Element;
16
- export {};
15
+ declare const Columns: FC<ColumnsProps>;
16
+ export default Columns;
@@ -0,0 +1,4 @@
1
+ import './index.less';
2
+ declare function DetailsInfo(props: any): import("react/jsx-runtime").JSX.Element;
3
+ export default DetailsInfo;
4
+ export declare function DetailHeader(info: any): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import './index.less';
2
+ export declare const IconsMap: Map<string, import("react/jsx-runtime").JSX.Element>;
2
3
  export declare function FavoriteSvg(): import("react/jsx-runtime").JSX.Element;
3
4
  export declare function SpaceSvg(): import("react/jsx-runtime").JSX.Element;
4
5
  export declare function NetdiskSvg(): import("react/jsx-runtime").JSX.Element;
@@ -22,10 +23,15 @@ export declare function AngleRightSvg(): import("react/jsx-runtime").JSX.Element
22
23
  export declare function OutdentSvg(): import("react/jsx-runtime").JSX.Element;
23
24
  export declare function CaretRight(): import("react/jsx-runtime").JSX.Element;
24
25
  export declare function CircleCheckSvg(): import("react/jsx-runtime").JSX.Element;
26
+ export declare function DoneSvg(): import("react/jsx-runtime").JSX.Element;
27
+ export declare function ProcessingSvg(): import("react/jsx-runtime").JSX.Element;
25
28
  export declare function ShareLinkSvg(): import("react/jsx-runtime").JSX.Element;
26
29
  export declare function UpdateSvg(): import("react/jsx-runtime").JSX.Element;
27
30
  export declare function NullDataSvg(): import("react/jsx-runtime").JSX.Element;
28
- export declare function SuffixIcon({ className, suffix }: {
31
+ export declare function SuffixIcon({ className, suffix, status, }: {
29
32
  className: string;
30
33
  suffix: string;
34
+ status?: 'done' | 'processing';
31
35
  }): import("react/jsx-runtime").JSX.Element;
36
+ export declare function UnknownSvg(): import("react/jsx-runtime").JSX.Element;
37
+ export declare function UploadSvg(): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,19 @@
1
1
  import './index.less';
2
+ import { ReactNode } from 'react';
2
3
  interface MenuProps {
3
4
  menu?: MenuItem[];
4
- onChange?: (key: string) => any;
5
+ onChange?: (key: string, parent?: MenuItem) => any;
6
+ loadMenu?: (item: MenuItem) => MenuItem | MenuItem[];
7
+ store?: any;
5
8
  }
6
9
  export interface MenuItem {
7
10
  key: string;
8
11
  title: string;
9
12
  type?: string;
10
- icon?: any;
13
+ icon?: string | ReactNode;
11
14
  children: MenuItem | null;
12
15
  [key: string]: any;
13
16
  }
17
+ export declare function menuIcon(icon: any): import("react/jsx-runtime").JSX.Element | undefined;
14
18
  export default function Menu(props: MenuProps): import("react/jsx-runtime").JSX.Element;
15
19
  export {};
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  export declare function getMenu(key: string): import("react").ComponentType<{}>;
3
3
  export declare function registerMenu(key: string, component: any): void;
4
+ export declare function addMenuItem(key: string | string[], menu: any[]): void;
5
+ export declare function removeMenuItem(key: string | string[], menuItem: string[]): void;
@@ -0,0 +1,2 @@
1
+ import './index.less';
2
+ export default function NotData(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,12 @@
1
+ import './index.less';
1
2
  import { ReactNode } from 'react';
3
+ /***
4
+ * 功能拆封
5
+ *
6
+ */
2
7
  interface SelectBoxProps {
3
8
  checks: string[];
9
+ getContainer: string;
4
10
  dataClass?: string;
5
11
  selectClass: string;
6
12
  className?: string;
@@ -8,11 +14,10 @@ interface SelectBoxProps {
8
14
  isDrag: boolean;
9
15
  isSelectBoxes: boolean;
10
16
  action?: 'stack' | 'rotate';
17
+ checkType?: 'file' | 'folder';
11
18
  onChange: (v: any) => any;
12
- onDrag: () => any;
13
- onEndDrag: () => any;
14
- onStartDrag: () => any;
15
19
  children: ReactNode;
20
+ onMouseup: (v: any) => void;
16
21
  [key: string]: any;
17
22
  }
18
23
  declare const SelectBox: (props: SelectBoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,12 @@
1
+ import { FC } from 'react';
1
2
  interface TileProps {
2
3
  className?: string;
3
4
  checks: any[];
4
- onMenuClick?: (key: string, param: any) => void;
5
+ onMenuClick?: (key: string, param: any, type?: string) => void;
5
6
  onDblclick?: (key: string, param: any) => void;
6
7
  onSelect?: (key: string, param: any) => void;
7
- onRename?: (key: string, value: string, param: any) => void;
8
+ onRename?: (key: string, value: string | boolean, param: any) => void;
8
9
  [key: string]: any;
9
10
  }
10
- export default function Tile(props: TileProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
11
+ declare const Tile: FC<TileProps>;
12
+ export default Tile;
@@ -1,10 +1,3 @@
1
1
  import * as React from 'react';
2
- interface IndentProps {
3
- prefixCls: string;
4
- level: number;
5
- isStart: boolean[];
6
- isEnd: boolean[];
7
- width?: number;
8
- }
9
- declare const _default: React.NamedExoticComponent<IndentProps>;
2
+ declare const _default: React.NamedExoticComponent<any>;
10
3
  export default _default;
@@ -9,6 +9,7 @@ interface MotionTreeNodeProps extends Omit<TreeNodeProps, 'domRef'> {
9
9
  onMotionEnd: () => void;
10
10
  motionType?: 'show' | 'hide';
11
11
  treeNodeRequiredProps: TreeNodeRequiredProps;
12
+ [key: string]: any;
12
13
  }
13
- declare const RefMotionTreeNode: React.ForwardRefExoticComponent<MotionTreeNodeProps & React.RefAttributes<HTMLDivElement>>;
14
+ declare const RefMotionTreeNode: React.ForwardRefExoticComponent<Omit<MotionTreeNodeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
15
  export default RefMotionTreeNode;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { NodeDragEventHandler, NodeDragEventParams, NodeMouseEventHandler, NodeMouseEventParams } from './contextTypes';
3
3
  import DropIndicator from './DropIndicator';
4
- import { BasicDataNode, DataNode, Direction, EventDataNode, FieldNames, FlattenNode, IconType, Key, KeyEntities, NodeInstance, SafeKey, ScrollTo } from './interface';
4
+ import { BasicDataNode, DataNode, Direction, EventDataNode, FieldNames, FlattenNode, IconType, Key, KeyEntities, NodeInstance, ScrollTo } from './interface';
5
5
  import { NodeListRef } from './NodeList';
6
6
  export interface CheckInfo<TreeDataType extends BasicDataNode = DataNode> {
7
7
  event: 'check';
@@ -60,7 +60,7 @@ export interface TreeProps<TreeDataType extends BasicDataNode = DataNode> {
60
60
  };
61
61
  defaultSelectedKeys?: Key[];
62
62
  selectedKeys?: Key[];
63
- allowDrop?: AllowDrop<TreeDataType>;
63
+ allowDrop?: any;
64
64
  titleRender?: (node: TreeDataType) => React.ReactNode;
65
65
  dropIndicatorRender?: (props: {
66
66
  dropPosition: -1 | 0 | 1;
@@ -144,7 +144,7 @@ interface TreeState<TreeDataType extends BasicDataNode = DataNode> {
144
144
  loadedKeys: Key[];
145
145
  loadingKeys: Key[];
146
146
  expandedKeys: Key[];
147
- draggingNodeKey: Key;
147
+ draggingNodeKey: any;
148
148
  dragChildrenKeys: Key[];
149
149
  dropPosition: -1 | 0 | 1 | null;
150
150
  dropLevelOffset: number | null;
@@ -161,7 +161,7 @@ interface TreeState<TreeDataType extends BasicDataNode = DataNode> {
161
161
  prevProps: TreeProps;
162
162
  fieldNames: FieldNames;
163
163
  }
164
- declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> extends React.Component<TreeProps<TreeDataType>, TreeState<TreeDataType>> {
164
+ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> extends React.Component<TreeProps<any>, TreeState<any>> {
165
165
  static defaultProps: {
166
166
  prefixCls: string;
167
167
  showLine: boolean;
@@ -184,19 +184,19 @@ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> ext
184
184
  };
185
185
  static TreeNode: React.FC<import("./interface").TreeNodeProps<DataNode>>;
186
186
  destroyed: boolean;
187
- delayedDragEnterLogic: Record<SafeKey, number>;
188
- loadingRetryTimes: Record<SafeKey, number>;
189
- state: TreeState<TreeDataType>;
190
- dragStartMousePosition: null;
191
- dragNode: NodeInstance<TreeDataType>;
192
- currentMouseOverDroppableNodeKey: null;
187
+ delayedDragEnterLogic: Record<any, number>;
188
+ loadingRetryTimes: Record<any, number>;
189
+ state: any;
190
+ dragStartMousePosition: any;
191
+ dragNode: any;
192
+ currentMouseOverDroppableNodeKey: any;
193
193
  listRef: React.RefObject<NodeListRef>;
194
194
  componentDidMount(): void;
195
195
  componentDidUpdate(): void;
196
196
  onUpdated(): void;
197
197
  componentWillUnmount(): void;
198
- static getDerivedStateFromProps(props: TreeProps, prevState: TreeState): Partial<TreeState<DataNode>>;
199
- onNodeDragStart: NodeDragEventHandler<TreeDataType, HTMLDivElement>;
198
+ static getDerivedStateFromProps(props: any, prevState: any): Partial<TreeState<DataNode>>;
199
+ onNodeDragStart: NodeDragEventHandler<any, HTMLDivElement>;
200
200
  /**
201
201
  * [Legacy] Select handler is smaller than node,
202
202
  * so that this will trigger when drag enter node or select handler.
@@ -204,18 +204,18 @@ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> ext
204
204
  * Better for use mouse move event to refresh drag state.
205
205
  * But let's just keep it to avoid event trigger logic change.
206
206
  */
207
- onNodeDragEnter: (event: React.DragEvent<HTMLDivElement>, node: NodeInstance<TreeDataType>) => void;
207
+ onNodeDragEnter: (event: React.DragEvent<HTMLDivElement>, node: any) => void;
208
208
  onNodeDragOver: (event: React.DragEvent<HTMLDivElement>, node: NodeInstance<TreeDataType>) => void;
209
209
  onNodeDragLeave: NodeDragEventHandler<TreeDataType>;
210
210
  onWindowDragEnd: (event: any) => void;
211
- onNodeDragEnd: NodeDragEventHandler<TreeDataType>;
211
+ onNodeDragEnd: any;
212
212
  onNodeDrop: (event: React.DragEvent<HTMLDivElement>, node: any, outsideTree?: boolean) => void;
213
213
  resetDragState(): void;
214
214
  cleanDragState: () => void;
215
215
  triggerExpandActionExpand: NodeMouseEventHandler;
216
216
  onNodeClick: NodeMouseEventHandler<TreeDataType>;
217
217
  onNodeDoubleClick: NodeMouseEventHandler<TreeDataType>;
218
- onNodeSelect: NodeMouseEventHandler<TreeDataType>;
218
+ onNodeSelect: NodeMouseEventHandler<any>;
219
219
  onNodeCheck: (e: React.MouseEvent<HTMLSpanElement>, treeNode: EventDataNode<TreeDataType>, checked: boolean) => void;
220
220
  onNodeLoad: (treeNode: EventDataNode<TreeDataType>) => Promise<void>;
221
221
  onNodeMouseEnter: NodeMouseEventHandler<TreeDataType>;
@@ -224,29 +224,29 @@ declare class Tree<TreeDataType extends DataNode | BasicDataNode = DataNode> ext
224
224
  onFocus: React.FocusEventHandler<HTMLDivElement>;
225
225
  onBlur: React.FocusEventHandler<HTMLDivElement>;
226
226
  getTreeNodeRequiredProps: () => {
227
- expandedKeys: React.Key[];
228
- selectedKeys: React.Key[];
229
- loadedKeys: React.Key[];
230
- loadingKeys: React.Key[];
231
- checkedKeys: React.Key[];
232
- halfCheckedKeys: React.Key[];
233
- dragOverNodeKey: React.Key | null;
234
- dropPosition: 0 | 1 | -1 | null;
235
- keyEntities: KeyEntities<TreeDataType>;
227
+ expandedKeys: any;
228
+ selectedKeys: any;
229
+ loadedKeys: any;
230
+ loadingKeys: any;
231
+ checkedKeys: any;
232
+ halfCheckedKeys: any;
233
+ dragOverNodeKey: any;
234
+ dropPosition: any;
235
+ keyEntities: any;
236
236
  };
237
237
  /** Set uncontrolled `expandedKeys`. This will also auto update `flattenNodes`. */
238
238
  setExpandedKeys: (expandedKeys: Key[]) => void;
239
- onNodeExpand: (e: React.MouseEvent<HTMLDivElement>, treeNode: EventDataNode<TreeDataType>) => void;
239
+ onNodeExpand: (e: React.MouseEvent<HTMLDivElement>, treeNode: any) => void;
240
240
  onListChangeStart: () => void;
241
241
  onListChangeEnd: () => void;
242
- onActiveChange: (newActiveKey: Key | null) => void;
243
- getActiveItem: () => FlattenNode<TreeDataType> | null;
242
+ onActiveChange: (newActiveKey: any) => void;
243
+ getActiveItem: () => any;
244
244
  offsetActiveKey: (offset: number) => void;
245
245
  onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
246
246
  /**
247
247
  * Only update the value which is not in props
248
248
  */
249
- setUncontrolledState: (state: Partial<TreeState<TreeDataType>>, atomic?: boolean, forceState?: Partial<TreeState<TreeDataType>> | null) => void;
249
+ setUncontrolledState: (state: any, atomic?: boolean, forceState?: Partial<TreeState<TreeDataType>> | null) => void;
250
250
  scrollTo: ScrollTo;
251
251
  render(): import("react/jsx-runtime").JSX.Element;
252
252
  }
@@ -3,7 +3,7 @@ import { TreeContextProps } from './contextTypes';
3
3
  import { TreeNodeProps } from './interface';
4
4
  export type { TreeNodeProps } from './interface';
5
5
  export interface InternalTreeNodeProps extends TreeNodeProps {
6
- context?: TreeContextProps;
6
+ context?: TreeContextProps | null;
7
7
  }
8
8
  export interface TreeNodeState {
9
9
  dragNodeHighlight: boolean;
@@ -17,8 +17,8 @@ export type NodeMouseEventHandler<TreeDataType extends BasicDataNode = DataNode,
17
17
  export type NodeDragEventHandler<TreeDataType extends BasicDataNode = DataNode, T = HTMLDivElement> = (e: React.DragEvent<T>, node: NodeInstance<TreeDataType>, outsideTree?: boolean) => void;
18
18
  export interface TreeContextProps<TreeDataType extends BasicDataNode = DataNode> {
19
19
  prefixCls: string;
20
- selectable: boolean;
21
- showIcon: boolean;
20
+ selectable?: boolean;
21
+ showIcon?: boolean;
22
22
  icon: IconType;
23
23
  switcherIcon: IconType;
24
24
  draggable?: DraggableConfig;
@@ -37,7 +37,7 @@ export interface TreeContextProps<TreeDataType extends BasicDataNode = DataNode>
37
37
  dropPosition: -1 | 0 | 1;
38
38
  dropLevelOffset: number;
39
39
  indent: any;
40
- prefixCls: any;
40
+ prefixCls: string;
41
41
  direction: Direction;
42
42
  }) => React.ReactNode;
43
43
  dragOverNodeKey: Key | null;
@@ -61,4 +61,4 @@ export interface TreeContextProps<TreeDataType extends BasicDataNode = DataNode>
61
61
  onNodeDragEnd: NodeDragEventHandler<any, any>;
62
62
  onNodeDrop: NodeDragEventHandler<any, any>;
63
63
  }
64
- export declare const TreeContext: React.Context<TreeContextProps<any> | null>;
64
+ export declare const TreeContext: React.Context<any>;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export type { ScrollTo } from 'rc-virtual-list/lib/List';
3
3
  export interface TreeNodeProps<TreeDataType extends BasicDataNode = DataNode> {
4
+ index?: number;
4
5
  eventKey?: Key;
5
6
  prefixCls?: string;
6
7
  className?: string;
@@ -5,16 +5,16 @@ import React from 'react';
5
5
  import { BasicDataNode, DataEntity, DataNode, Direction, FlattenNode, Key, KeyEntities, NodeElement, NodeInstance } from './interface';
6
6
  import { AllowDrop, TreeProps } from './Tree';
7
7
  export { getPosition, isTreeNode } from './utils/treeUtil';
8
- export declare function arrDel(list: Key[], value: Key): React.Key[];
9
- export declare function arrAdd(list: Key[], value: Key): React.Key[];
8
+ export declare function arrDel(list: Key[], value: any): React.Key[];
9
+ export declare function arrAdd(list: Key[], value: any): React.Key[];
10
10
  export declare function posToArr(pos: string): string[];
11
- export declare function getDragChildrenKeys<TreeDataType extends BasicDataNode = DataNode>(dragNodeKey: Key, keyEntities: KeyEntities<TreeDataType>): Key[];
12
- export declare function isLastChild<TreeDataType extends BasicDataNode = DataNode>(treeNodeEntity: DataEntity<TreeDataType>): boolean;
11
+ export declare function getDragChildrenKeys<TreeDataType extends BasicDataNode = DataNode>(dragNodeKey: any, keyEntities: KeyEntities<TreeDataType>): Key[];
12
+ export declare function isLastChild<TreeDataType extends BasicDataNode = DataNode>(treeNodeEntity: any): boolean;
13
13
  export declare function isFirstChild<TreeDataType extends BasicDataNode = DataNode>(treeNodeEntity: DataEntity<TreeDataType>): boolean;
14
14
  export declare function calcDropPosition<TreeDataType extends BasicDataNode = DataNode>(event: React.MouseEvent, dragNode: NodeInstance<TreeDataType>, targetNode: NodeInstance<TreeDataType>, indent: number, startMousePosition: {
15
15
  x: number;
16
16
  y: number;
17
- }, allowDrop: AllowDrop<TreeDataType>, flattenedNodes: FlattenNode<TreeDataType>[], keyEntities: KeyEntities<TreeDataType>, expandKeys: Key[], direction: Direction): {
17
+ }, allowDrop: AllowDrop<any>, flattenedNodes: FlattenNode<TreeDataType>[], keyEntities: KeyEntities<TreeDataType>, expandKeys: Key[], direction: Direction): {
18
18
  dropPosition: -1 | 0 | 1;
19
19
  dropLevelOffset: number;
20
20
  dropTargetKey: Key;
@@ -30,7 +30,7 @@ export declare function calcDropPosition<TreeDataType extends BasicDataNode = Da
30
30
  * @returns [string]
31
31
  */
32
32
  export declare function calcSelectedKeys(selectedKeys: Key[], props: TreeProps): React.Key[] | undefined;
33
- export declare function convertDataToTree(treeData: DataNode[], processor?: {
33
+ export declare function convertDataToTree(treeData: DataNode[] | any, processor?: {
34
34
  processProps: (prop: DataNode) => any;
35
35
  }): NodeElement[];
36
36
  /**
@@ -51,4 +51,4 @@ export declare function parseCheckedKeys(keys: Key[] | {
51
51
  * @param keyList
52
52
  * @param keyEntities
53
53
  */
54
- export declare function conductExpandParent(keyList: Key[], keyEntities: KeyEntities): Key[];
54
+ export declare function conductExpandParent(keyList: any[], keyEntities: KeyEntities): Key[];
@@ -1,2 +1 @@
1
- import type { Key, KeyEntities } from '../interface';
2
- export default function getEntity<T = any>(keyEntities: KeyEntities<T>, key: Key): import("../interface").DataEntity<T>;
1
+ export default function getEntity<T = any>(keyEntities: any, key: any): any;
@@ -7,11 +7,11 @@ export declare function fillFieldNames(fieldNames?: FieldNames): Required<FieldN
7
7
  /**
8
8
  * Warning if TreeNode do not provides key
9
9
  */
10
- export declare function warningWithoutKey(treeData: DataNode[], fieldNames: FieldNames): void;
10
+ export declare function warningWithoutKey(treeData: DataNode[], fieldNames: any): void;
11
11
  /**
12
12
  * Convert `children` of Tree into `treeData` structure.
13
13
  */
14
- export declare function convertTreeToData(rootNodes: React.ReactNode): DataNode[];
14
+ export declare function convertTreeToData(rootNodes: React.ReactNode): any[];
15
15
  /**
16
16
  * Flat nest tree data into flatten list. This is used for virtual list render.
17
17
  * @param treeNodeList Origin data node list
@@ -82,5 +82,5 @@ export declare function getTreeNodeProps<TreeDataType extends BasicDataNode = Da
82
82
  dragOverGapTop: boolean;
83
83
  dragOverGapBottom: boolean;
84
84
  };
85
- export declare function convertNodePropsToEventData<TreeDataType extends BasicDataNode = DataNode>(props: TreeNodeProps<TreeDataType>): EventDataNode<TreeDataType>;
85
+ export declare function convertNodePropsToEventData<TreeDataType extends BasicDataNode = DataNode>(props: TreeNodeProps<TreeDataType>): EventDataNode<any>;
86
86
  export {};
@@ -1,6 +1,5 @@
1
1
  import './index.less';
2
- import { ReactNode } from 'react';
3
- import { MenuItem } from '../menu';
2
+ import React, { ReactNode } from 'react';
4
3
  export interface TreeItem {
5
4
  key: string;
6
5
  title: string;
@@ -8,7 +7,7 @@ export interface TreeItem {
8
7
  suffix?: string;
9
8
  api?: boolean;
10
9
  level?: string;
11
- menu?: string | (string | MenuItem)[];
10
+ menu?: any;
12
11
  children?: TreeItem[];
13
12
  isLeaf?: boolean;
14
13
  [key: string]: any;
@@ -22,18 +21,23 @@ export interface TreeProps {
22
21
  animation?: boolean;
23
22
  defaultmenu?: 'basis' | 'file';
24
23
  defaultExpandedKeys?: string[];
24
+ expandedKeys?: string[];
25
25
  autoExpandParent?: boolean;
26
26
  columns?: any[];
27
27
  checks?: string[];
28
+ loadedKeys?: string[];
28
29
  icon?: (v: any, className: string) => ReactNode;
29
30
  onChecks?: (checks: string[], param?: TreeItem[]) => void;
30
31
  onSelect?: (key: string) => any;
31
32
  onChange?: (data: TreeItem[]) => void;
32
33
  titleRender?: (props: any) => any;
33
- onMenuClick?: (key: string, props: any) => void;
34
+ onMenuClick?: (key: string, props: any, type?: string) => 'update' | void;
35
+ onDblclick?: (key: string, props: any) => void;
34
36
  loadData?: (key: string) => Promise<TreeItem[]> | TreeItem[];
35
37
  onRename?: (key: string, value: string, props?: TreeItem) => boolean | void;
38
+ filterData?: (node: any) => boolean;
39
+ onExpand?: (data: string[]) => void;
36
40
  [key: string]: any;
37
41
  }
38
- declare const _default: (props: TreeProps) => import("react/jsx-runtime").JSX.Element;
42
+ declare const _default: React.ForwardRefExoticComponent<Omit<TreeProps, "ref"> & React.RefAttributes<unknown>>;
39
43
  export default _default;
@@ -1,7 +1,12 @@
1
- declare const VirtualScroll: ({ className, item, itemHeight, renderItem, }: {
1
+ import './index.less';
2
+ import { FC } from 'react';
3
+ interface VirtualProps {
4
+ ref?: any;
2
5
  className: string;
3
6
  item: any[];
4
7
  itemHeight: number;
5
8
  renderItem: (v: any, i: number, end: boolean) => any;
6
- }) => import("react/jsx-runtime").JSX.Element;
9
+ onScroll?: (v?: any) => any;
10
+ }
11
+ declare const VirtualScroll: FC<VirtualProps>;
7
12
  export default VirtualScroll;
package/lib/es/enum.d.ts CHANGED
@@ -9,3 +9,4 @@ export declare enum ApiStatusEnum {
9
9
  EMPTY = 4,
10
10
  SUCCESS = 5
11
11
  }
12
+ export declare const ImgSuffix: string[];
@@ -2,5 +2,8 @@ import './index.less';
2
2
  import './components/tree/css/index.less';
3
3
  import { FC } from 'react';
4
4
  import { ExplorerProps } from './types';
5
+ import '@gingkoo/pandora/lib/umd/index.min.css';
6
+ import '@gingkoo/pandora-icons/fonts/css/all.min.css';
7
+ export declare const Icons: (v: any, className: string, style?: any) => import("react/jsx-runtime").JSX.Element;
5
8
  declare const Explorer: FC<ExplorerProps>;
6
9
  export default Explorer;
package/lib/es/index.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import Explorer from './explorer';
2
- export { registerMenu } from './components/menu/menulist';
2
+ import ExplorerMenu from './components/menu';
3
+ export { registerMenu, addMenuItem, removeMenuItem } from './components/menu/menulist';
4
+ export { Icons } from './explorer';
5
+ export { IconsMap } from './components/icons';
3
6
  export * from './types';
4
7
  export * from './enum';
8
+ export { ExplorerMenu, Explorer };
5
9
  export default Explorer;