@uiw/react-tree
Advanced tools
Comparing version
import React from 'react'; | ||
import { IconProps } from '@uiw/react-icon'; | ||
import { IconProps, IconTagType } from '@uiw/react-icon'; | ||
import { IProps, HTMLDivProps } from '@uiw/utils'; | ||
import './style/index.less'; | ||
export declare type TreeRenderTitleNode = { | ||
export type TreeRenderTitleNode = { | ||
selected?: boolean; | ||
@@ -16,3 +16,3 @@ noChild?: boolean; | ||
export interface TreeProps extends IProps, Omit<HTMLDivProps, 'onChange'> { | ||
icon?: IconProps['type']; | ||
icon?: IconProps<IconTagType>['type']; | ||
data?: TreeData[]; | ||
@@ -55,2 +55,2 @@ openKeys?: TreeData['key'][]; | ||
export declare const getChildKeys: (childs?: TreeData[], result?: TreeData['key'][], depth?: number) => TreeData['key'][]; | ||
export default function Tree(props: TreeProps): JSX.Element; | ||
export default function Tree(props: TreeProps): React.JSX.Element; |
@@ -200,3 +200,3 @@ "use strict"; | ||
onSelected && onSelected(selKeys, item.key, selected, item, evn); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(item.key, selKeys); | ||
onChange === null || onChange === void 0 || onChange(item.key, selKeys); | ||
} | ||
@@ -220,3 +220,2 @@ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
})); | ||
} | ||
//# sourceMappingURL=index.js.map | ||
} |
import React from 'react'; | ||
import { IconProps } from '@uiw/react-icon'; | ||
import { IconProps, IconTagType } from '@uiw/react-icon'; | ||
import { IProps } from '@uiw/utils'; | ||
@@ -11,3 +11,3 @@ import { TreeData, TreeProps } from './'; | ||
} | ||
interface TreeNodeProps<T = (data: TreeData, props: TreeNodeIconProps) => IconProps['type']> extends IProps { | ||
interface TreeNodeProps<T = (data: TreeData, props: TreeNodeIconProps) => IconProps<IconTagType>['type']> extends IProps { | ||
data: TreeData[]; | ||
@@ -25,3 +25,3 @@ level: number; | ||
} | ||
export default function TreeNode<T>(props: TreeNodeProps<T>): JSX.Element; | ||
export default function TreeNode<T>(props: TreeNodeProps<T>): React.JSX.Element; | ||
export {}; |
@@ -165,3 +165,2 @@ "use strict"; | ||
} | ||
module.exports = exports.default; | ||
//# sourceMappingURL=TreeNode.js.map | ||
module.exports = exports.default; |
import React from 'react'; | ||
import { IconProps } from '@uiw/react-icon'; | ||
import { IconProps, IconTagType } from '@uiw/react-icon'; | ||
import { IProps, HTMLDivProps } from '@uiw/utils'; | ||
import './style/index.less'; | ||
export declare type TreeRenderTitleNode = { | ||
export type TreeRenderTitleNode = { | ||
selected?: boolean; | ||
@@ -16,3 +16,3 @@ noChild?: boolean; | ||
export interface TreeProps extends IProps, Omit<HTMLDivProps, 'onChange'> { | ||
icon?: IconProps['type']; | ||
icon?: IconProps<IconTagType>['type']; | ||
data?: TreeData[]; | ||
@@ -55,2 +55,2 @@ openKeys?: TreeData['key'][]; | ||
export declare const getChildKeys: (childs?: TreeData[], result?: TreeData['key'][], depth?: number) => TreeData['key'][]; | ||
export default function Tree(props: TreeProps): JSX.Element; | ||
export default function Tree(props: TreeProps): React.JSX.Element; |
@@ -169,3 +169,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
onSelected && onSelected(selKeys, item.key, selected, item, evn); | ||
onChange == null ? void 0 : onChange(item.key, selKeys); | ||
onChange == null || onChange(item.key, selKeys); | ||
} | ||
@@ -189,3 +189,2 @@ return /*#__PURE__*/_jsx("div", _extends({ | ||
})); | ||
} | ||
//# sourceMappingURL=index.js.map | ||
} |
import React from 'react'; | ||
import { IconProps } from '@uiw/react-icon'; | ||
import { IconProps, IconTagType } from '@uiw/react-icon'; | ||
import { IProps } from '@uiw/utils'; | ||
@@ -11,3 +11,3 @@ import { TreeData, TreeProps } from './'; | ||
} | ||
interface TreeNodeProps<T = (data: TreeData, props: TreeNodeIconProps) => IconProps['type']> extends IProps { | ||
interface TreeNodeProps<T = (data: TreeData, props: TreeNodeIconProps) => IconProps<IconTagType>['type']> extends IProps { | ||
data: TreeData[]; | ||
@@ -25,3 +25,3 @@ level: number; | ||
} | ||
export default function TreeNode<T>(props: TreeNodeProps<T>): JSX.Element; | ||
export default function TreeNode<T>(props: TreeNodeProps<T>): React.JSX.Element; | ||
export {}; |
@@ -152,3 +152,2 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
}); | ||
} | ||
//# sourceMappingURL=TreeNode.js.map | ||
} |
{ | ||
"name": "@uiw/react-tree", | ||
"version": "4.21.28", | ||
"version": "4.22.0", | ||
"description": "Tree component", | ||
@@ -47,6 +47,6 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/react-icon": "^4.21.28", | ||
"@uiw/utils": "^4.21.28", | ||
"@uiw/react-icon": "^4.22.0", | ||
"@uiw/utils": "^4.22.0", | ||
"react-transition-group": "~4.4.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
84539
-42.36%17
-19.05%1506
-0.2%Updated
Updated