Socket
Socket
Sign inDemoInstall

rc-tree

Package Overview
Dependencies
Maintainers
11
Versions
306
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tree - npm Package Compare versions

Comparing version 5.7.2 to 5.7.3

16

es/Tree.js

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

};
/**
* [Legacy] Select handler is smaller than node,
* so that this will trigger when drag enter node or select handler.
* This is a little tricky if customize css without padding.
* Better for use mouse move event to refresh drag state.
* But let's just keep it to avoid event trigger logic change.
*/
_this.onNodeDragEnter = function (event, node) {

@@ -255,2 +262,4 @@ var _this$state2 = _this.state,

};
// since stopPropagation() is called in treeNode
// if onWindowDrag is called, whice means state is keeped, drag state should be cleared
_this.onWindowDragEnd = function (event) {

@@ -260,2 +269,3 @@ _this.onNodeDragEnd(event, null, true);

};
// if onNodeDragEnd is called, onWindowDragEnd won't be called since stopPropagation() is called
_this.onNodeDragEnd = function (event, node) {

@@ -605,2 +615,4 @@ var onDragEnd = _this.props.onDragEnd;

};
// =========================== Expanded ===========================
/** Set uncontrolled `expandedKeys`. This will also auto update `flattenNodes`. */
_this.setExpandedKeys = function (expandedKeys) {

@@ -675,2 +687,3 @@ var _this$state9 = _this.state,

};
// =========================== Keyboard ===========================
_this.onActiveChange = function (newActiveKey) {

@@ -798,2 +811,5 @@ var activeKey = _this.state.activeKey;

};
/**
* Only update the value which is not in props
*/
_this.setUncontrolledState = function (state) {

@@ -800,0 +816,0 @@ var atomic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

17

es/TreeNode.js

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

};
// Disabled item still can be switch
_this.onExpand = function (e) {

@@ -135,2 +136,3 @@ var _this$props2 = _this.props,

};
// Drag usage
_this.setSelectHandle = function (node) {

@@ -176,2 +178,3 @@ _this.selectHandle = node;

};
// Load data to avoid default expanded tree without data
_this.syncLoadData = function (props) {

@@ -202,2 +205,3 @@ var expanded = props.expanded,

};
// ==================== Render: Drag Handler ====================
_this.renderDragHandler = function () {

@@ -211,2 +215,3 @@ var _this$props$context2 = _this.props.context,

};
// ====================== Render: Switcher ======================
_this.renderSwitcherIconDom = function (isLeaf) {

@@ -224,2 +229,3 @@ var switcherIconFromProps = _this.props.switcherIcon;

};
// Switcher
_this.renderSwitcher = function () {

@@ -242,2 +248,4 @@ var expanded = _this.props.expanded;

};
// ====================== Render: Checkbox ======================
// Checkbox
_this.renderCheckbox = function () {

@@ -259,2 +267,3 @@ var _this$props5 = _this.props,

};
// ==================== Render: Title + Icon ====================
_this.renderIcon = function () {

@@ -267,6 +276,8 @@ var loading = _this.props.loading;

};
// Icon + Title
_this.renderSelector = function () {
var dragNodeHighlight = _this.state.dragNodeHighlight;
var _this$props6 = _this.props,
title = _this$props6.title,
_this$props6$title = _this$props6.title,
title = _this$props6$title === void 0 ? defaultTitle : _this$props6$title,
selected = _this$props6.selected,

@@ -317,2 +328,3 @@ icon = _this$props6.icon,

};
// =================== Render: Drop Indicator ===================
_this.renderDropIndicator = function () {

@@ -450,7 +462,4 @@ var _this$props7 = _this.props,

ContextTreeNode.displayName = 'TreeNode';
ContextTreeNode.defaultProps = {
title: defaultTitle
};
ContextTreeNode.isTreeNode = 1;
export { InternalTreeNode };
export default ContextTreeNode;

@@ -110,2 +110,9 @@ "use strict";

};
/**
* [Legacy] Select handler is smaller than node,
* so that this will trigger when drag enter node or select handler.
* This is a little tricky if customize css without padding.
* Better for use mouse move event to refresh drag state.
* But let's just keep it to avoid event trigger logic change.
*/
_this.onNodeDragEnter = function (event, node) {

@@ -266,2 +273,4 @@ var _this$state2 = _this.state,

};
// since stopPropagation() is called in treeNode
// if onWindowDrag is called, whice means state is keeped, drag state should be cleared
_this.onWindowDragEnd = function (event) {

@@ -271,2 +280,3 @@ _this.onNodeDragEnd(event, null, true);

};
// if onNodeDragEnd is called, onWindowDragEnd won't be called since stopPropagation() is called
_this.onNodeDragEnd = function (event, node) {

@@ -616,2 +626,4 @@ var onDragEnd = _this.props.onDragEnd;

};
// =========================== Expanded ===========================
/** Set uncontrolled `expandedKeys`. This will also auto update `flattenNodes`. */
_this.setExpandedKeys = function (expandedKeys) {

@@ -686,2 +698,3 @@ var _this$state9 = _this.state,

};
// =========================== Keyboard ===========================
_this.onActiveChange = function (newActiveKey) {

@@ -809,2 +822,5 @@ var activeKey = _this.state.activeKey;

};
/**
* Only update the value which is not in props
*/
_this.setUncontrolledState = function (state) {

@@ -811,0 +827,0 @@ var atomic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

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

};
// Disabled item still can be switch
_this.onExpand = function (e) {

@@ -144,2 +145,3 @@ var _this$props2 = _this.props,

};
// Drag usage
_this.setSelectHandle = function (node) {

@@ -185,2 +187,3 @@ _this.selectHandle = node;

};
// Load data to avoid default expanded tree without data
_this.syncLoadData = function (props) {

@@ -211,2 +214,3 @@ var expanded = props.expanded,

};
// ==================== Render: Drag Handler ====================
_this.renderDragHandler = function () {

@@ -220,2 +224,3 @@ var _this$props$context2 = _this.props.context,

};
// ====================== Render: Switcher ======================
_this.renderSwitcherIconDom = function (isLeaf) {

@@ -233,2 +238,3 @@ var switcherIconFromProps = _this.props.switcherIcon;

};
// Switcher
_this.renderSwitcher = function () {

@@ -251,2 +257,4 @@ var expanded = _this.props.expanded;

};
// ====================== Render: Checkbox ======================
// Checkbox
_this.renderCheckbox = function () {

@@ -268,2 +276,3 @@ var _this$props5 = _this.props,

};
// ==================== Render: Title + Icon ====================
_this.renderIcon = function () {

@@ -276,6 +285,8 @@ var loading = _this.props.loading;

};
// Icon + Title
_this.renderSelector = function () {
var dragNodeHighlight = _this.state.dragNodeHighlight;
var _this$props6 = _this.props,
title = _this$props6.title,
_this$props6$title = _this$props6.title,
title = _this$props6$title === void 0 ? defaultTitle : _this$props6$title,
selected = _this$props6.selected,

@@ -326,2 +337,3 @@ icon = _this$props6.icon,

};
// =================== Render: Drop Indicator ===================
_this.renderDropIndicator = function () {

@@ -460,7 +472,4 @@ var _this$props7 = _this.props,

ContextTreeNode.displayName = 'TreeNode';
ContextTreeNode.defaultProps = {
title: defaultTitle
};
ContextTreeNode.isTreeNode = 1;
var _default = ContextTreeNode;
exports.default = _default;
{
"name": "rc-tree",
"version": "5.7.2",
"version": "5.7.3",
"description": "tree ui component for react",

@@ -73,4 +73,4 @@ "engines": {

"rc-trigger": "^5.0.7",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.0.2"

@@ -77,0 +77,0 @@ },

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