Socket
Socket
Sign inDemoInstall

@uiw/react-tree

Package Overview
Dependencies
Maintainers
2
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-tree - npm Package Compare versions

Comparing version 4.21.23 to 5.0.0-bate.2.0

cjs/style/index.d.ts

3

cjs/index.d.ts
import React from 'react';
import { IconProps } from '@uiw/react-icon';
import { IProps, HTMLDivProps } from '@uiw/utils';
import './style/index.less';
export * from './style';
export declare type TreeRenderTitleNode = {

@@ -55,1 +55,2 @@ selected?: boolean;

export default function Tree(props: TreeProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map

@@ -8,2 +8,5 @@ "use strict";

});
var _exportNames = {
getChildKeys: true
};
exports["default"] = Tree;

@@ -18,3 +21,16 @@ exports.getChildKeys = void 0;

var _TreeNode = _interopRequireDefault(require("./TreeNode"));
var _index = require("./style/index");
var _jsxRuntime = require("react/jsx-runtime");
var _style = require("./style");
Object.keys(_style).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _style[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _style[key];
}
});
});
var _excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange", "value"];

@@ -201,3 +217,3 @@ /**

}
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TreeNodeStyleWrap, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
className: cls

@@ -204,0 +220,0 @@ }, elementProps), {}, {

@@ -14,2 +14,3 @@ import React from 'react';

level: number;
isOpen?: boolean;
parent?: TreeData;

@@ -27,1 +28,2 @@ icon?: T;

export {};
//# sourceMappingURL=TreeNode.d.ts.map

@@ -11,2 +11,3 @@ "use strict";

var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

@@ -18,2 +19,3 @@ var _react = _interopRequireWildcard(require("react"));

var _ = require("./");
var _index = require("./style/index");
var _jsxRuntime = require("react/jsx-runtime");

@@ -67,3 +69,4 @@ var _excluded = ["prefixCls", "renderTitle", "icon", "iconAnimation", "isSelected", "openKeys", "selectedKeys", "data", "level", "parent", "onItemClick", "onItemSelected"];

}, []);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TreeNodeStyleCSSTransition, {
as: _reactTransitionGroup.CSSTransition,
nodeRef: node,

@@ -78,4 +81,6 @@ classNames: prefixCls,

onEntering: onEntering,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TreeNodeStyleUl, {
ref: node,
isOpen: isOpen,
level: level,
className: [level !== 1 && isOpen ? ["".concat(prefixCls, "-open")] : null, level !== 1 && !isOpen ? ["".concat(prefixCls, "-close")] : null].filter(Boolean).join(' ').trim(),

@@ -119,5 +124,5 @@ children: data.map(function (item, idx) {

},
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.TreeNodeStyleUlDiv, {
className: "".concat(prefixCls, "-label"),
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TreeNodeStyleUlLidivSpan, {
style: {

@@ -130,7 +135,12 @@ display: noChild ? 'none' : 'auto'

},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIcon["default"], {
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TreeNodeStyleUlLidivSpanIcon, {
as: _reactIcon["default"],
type: iconItem || 'caret-right',
isIcon: (0, _typeof2["default"])(icon),
isNoChild: noChild,
isIconAnimation: iconAnimation,
isItemIsOpen: itemIsOpen,
className: [typeof icon === 'function' ? "".concat(prefixCls, "-switcher-noop") : null, noChild ? 'no-child' : null, !iconAnimation ? 'no-animation' : null, itemIsOpen ? 'open' : null].filter(Boolean).join(' ').trim()
})
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TreeNodeStyleUlLidivSpanDiv, {
onClick: function onClick(evn) {

@@ -140,2 +150,5 @@ var _disabledObj$onClick;

},
judgeSelected: selected,
judgeisSelected: isSelected,
isDisabled: disabledObj.disabled,
className: ["".concat(prefixCls, "-title"), selected && isSelected ? 'selected' : null, disabledObj.disabled, disabledObj.disabledMouse].filter(Boolean).join(' ').trim(),

@@ -142,0 +155,0 @@ children: renderTitle ? renderTitle(item, {

import React from 'react';
import { IconProps } from '@uiw/react-icon';
import { IProps, HTMLDivProps } from '@uiw/utils';
import './style/index.less';
export * from './style';
export declare type TreeRenderTitleNode = {

@@ -55,1 +55,2 @@ selected?: boolean;

export default function Tree(props: TreeProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map

@@ -7,4 +7,5 @@ import _extends from "@babel/runtime/helpers/extends";

import TreeNode from './TreeNode';
import "./style/index.css";
import { TreeNodeStyleWrap } from './style/index';
import { jsx as _jsx } from "react/jsx-runtime";
export * from './style';
/**

@@ -169,3 +170,3 @@ * a contains b

}
return /*#__PURE__*/_jsx("div", _extends({
return /*#__PURE__*/_jsx(TreeNodeStyleWrap, _extends({
className: cls

@@ -172,0 +173,0 @@ }, elementProps, {

@@ -14,2 +14,3 @@ import React from 'react';

level: number;
isOpen?: boolean;
parent?: TreeData;

@@ -27,1 +28,2 @@ icon?: T;

export {};
//# sourceMappingURL=TreeNode.d.ts.map

@@ -9,2 +9,3 @@ import _extends from "@babel/runtime/helpers/extends";

import { getChildKeys } from './';
import { TreeNodeStyleCSSTransition, TreeNodeStyleUl, TreeNodeStyleUlDiv, TreeNodeStyleUlLidivSpan, TreeNodeStyleUlLidivSpanIcon, TreeNodeStyleUlLidivSpanDiv } from './style/index';
import { jsx as _jsx } from "react/jsx-runtime";

@@ -58,3 +59,4 @@ import { jsxs as _jsxs } from "react/jsx-runtime";

}, []);
return /*#__PURE__*/_jsx(CSSTransition, {
return /*#__PURE__*/_jsx(TreeNodeStyleCSSTransition, {
as: CSSTransition,
nodeRef: node,

@@ -69,4 +71,6 @@ classNames: prefixCls,

onEntering: onEntering,
children: /*#__PURE__*/_jsx("ul", {
children: /*#__PURE__*/_jsx(TreeNodeStyleUl, {
ref: node,
isOpen: isOpen,
level: level,
className: [level !== 1 && isOpen ? [prefixCls + "-open"] : null, level !== 1 && !isOpen ? [prefixCls + "-close"] : null].filter(Boolean).join(' ').trim(),

@@ -107,5 +111,5 @@ children: data.map((item, idx) => {

},
children: [/*#__PURE__*/_jsxs("div", {
children: [/*#__PURE__*/_jsxs(TreeNodeStyleUlDiv, {
className: prefixCls + "-label",
children: [/*#__PURE__*/_jsx("span", {
children: [/*#__PURE__*/_jsx(TreeNodeStyleUlLidivSpan, {
style: {

@@ -116,8 +120,16 @@ display: noChild ? 'none' : 'auto'

onClick: evn => onItemClick(item, evn),
children: /*#__PURE__*/_jsx(Icon, {
children: /*#__PURE__*/_jsx(TreeNodeStyleUlLidivSpanIcon, {
as: Icon,
type: iconItem || 'caret-right',
isIcon: typeof icon,
isNoChild: noChild,
isIconAnimation: iconAnimation,
isItemIsOpen: itemIsOpen,
className: [typeof icon === 'function' ? prefixCls + "-switcher-noop" : null, noChild ? 'no-child' : null, !iconAnimation ? 'no-animation' : null, itemIsOpen ? 'open' : null].filter(Boolean).join(' ').trim()
})
}), /*#__PURE__*/_jsx("div", {
}), /*#__PURE__*/_jsx(TreeNodeStyleUlLidivSpanDiv, {
onClick: evn => disabledObj.onClick == null ? void 0 : disabledObj.onClick(item, evn),
judgeSelected: selected,
judgeisSelected: isSelected,
isDisabled: disabledObj.disabled,
className: [prefixCls + "-title", selected && isSelected ? 'selected' : null, disabledObj.disabled, disabledObj.disabledMouse].filter(Boolean).join(' ').trim(),

@@ -124,0 +136,0 @@ children: renderTitle ? renderTitle(item, {

{
"name": "@uiw/react-tree",
"version": "4.21.23",
"version": "5.0.0-bate.2.0",
"description": "Tree component",

@@ -44,9 +44,10 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"react": ">=16.9.0",
"react-dom": ">=16.9.0"
"react-dom": ">=16.9.0",
"styled-components": ">=5.3.5"
},
"dependencies": {
"@uiw/react-icon": "^4.21.23",
"@uiw/utils": "^4.21.23",
"react-transition-group": "~4.4.2"
"@uiw/react-icon": "^5.0.0-bate.2.0",
"@uiw/utils": "^5.0.0-bate.2.0",
"react-transition-group": "~4.4.5"
}
}

@@ -18,3 +18,3 @@ Tree 树形控件

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -143,3 +143,3 @@ import { Tree, Card, Row, Col, } from 'uiw';

)
export default Demo;
export default Demo
```

@@ -149,3 +149,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -285,3 +285,3 @@ import { Tree, Card, Row, Col, Icon } from 'uiw';

)
export default Demo;
export default Demo
```

@@ -293,3 +293,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -401,3 +401,3 @@ import { Tree, Card, Row, Col, Icon } from 'uiw';

)
export default Demo;
export default Demo
```

@@ -407,3 +407,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -529,3 +529,3 @@ import { Tree, Card, Row, Col, Icon } from 'uiw';

)
export default Demo;
export default Demo
```

@@ -537,3 +537,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -660,3 +660,3 @@ import { Tree, Card, Row, Col } from 'uiw';

)
export default Demo;
export default Demo
```

@@ -666,3 +666,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -782,3 +782,3 @@ import { Tree, Card, Row, Col } from 'uiw';

)
export default Demo;
export default Demo
```

@@ -789,3 +789,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -914,3 +914,3 @@ import { Tree, Row, Col, Form, Button } from 'uiw';

}
export default Demo;
export default Demo
```

@@ -917,0 +917,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc