d897e487da83407a0de2c2f93bf88a90.json
58.4 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport classNames from 'classnames'; // @ts-ignore\n\nimport { TreeContext } from './contextTypes';\nimport { getDataAndAria } from './util';\nimport Indent from './Indent';\nimport { convertNodePropsToEventData } from './utils/treeUtil';\nvar ICON_OPEN = 'open';\nvar ICON_CLOSE = 'close';\nvar defaultTitle = '---';\n\nvar InternalTreeNode = /*#__PURE__*/function (_React$Component) {\n _inherits(InternalTreeNode, _React$Component);\n\n var _super = _createSuper(InternalTreeNode);\n\n function InternalTreeNode() {\n var _this;\n\n _classCallCheck(this, InternalTreeNode);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n dragNodeHighlight: false\n };\n\n _this.onSelectorClick = function (e) {\n // Click trigger before select/check operation\n var onNodeClick = _this.props.context.onNodeClick;\n onNodeClick(e, convertNodePropsToEventData(_this.props));\n\n if (_this.isSelectable()) {\n _this.onSelect(e);\n } else {\n _this.onCheck(e);\n }\n };\n\n _this.onSelectorDoubleClick = function (e) {\n var onNodeDoubleClick = _this.props.context.onNodeDoubleClick;\n onNodeDoubleClick(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onSelect = function (e) {\n if (_this.isDisabled()) return;\n var onNodeSelect = _this.props.context.onNodeSelect;\n e.preventDefault();\n onNodeSelect(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onCheck = function (e) {\n if (_this.isDisabled()) return;\n var _this$props = _this.props,\n disableCheckbox = _this$props.disableCheckbox,\n checked = _this$props.checked;\n var onNodeCheck = _this.props.context.onNodeCheck;\n if (!_this.isCheckable() || disableCheckbox) return;\n e.preventDefault();\n var targetChecked = !checked;\n onNodeCheck(e, convertNodePropsToEventData(_this.props), targetChecked);\n };\n\n _this.onMouseEnter = function (e) {\n var onNodeMouseEnter = _this.props.context.onNodeMouseEnter;\n onNodeMouseEnter(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onMouseLeave = function (e) {\n var onNodeMouseLeave = _this.props.context.onNodeMouseLeave;\n onNodeMouseLeave(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onContextMenu = function (e) {\n var onNodeContextMenu = _this.props.context.onNodeContextMenu;\n onNodeContextMenu(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onDragStart = function (e) {\n var onNodeDragStart = _this.props.context.onNodeDragStart;\n e.stopPropagation();\n\n _this.setState({\n dragNodeHighlight: true\n });\n\n onNodeDragStart(e, _assertThisInitialized(_this));\n\n try {\n // ie throw error\n // firefox-need-it\n e.dataTransfer.setData('text/plain', '');\n } catch (error) {// empty\n }\n };\n\n _this.onDragEnter = function (e) {\n var onNodeDragEnter = _this.props.context.onNodeDragEnter;\n e.preventDefault();\n e.stopPropagation();\n onNodeDragEnter(e, _assertThisInitialized(_this));\n };\n\n _this.onDragOver = function (e) {\n var onNodeDragOver = _this.props.context.onNodeDragOver;\n e.preventDefault();\n e.stopPropagation();\n onNodeDragOver(e, _assertThisInitialized(_this));\n };\n\n _this.onDragLeave = function (e) {\n var onNodeDragLeave = _this.props.context.onNodeDragLeave;\n e.stopPropagation();\n onNodeDragLeave(e, _assertThisInitialized(_this));\n };\n\n _this.onDragEnd = function (e) {\n var onNodeDragEnd = _this.props.context.onNodeDragEnd;\n e.stopPropagation();\n\n _this.setState({\n dragNodeHighlight: false\n });\n\n onNodeDragEnd(e, _assertThisInitialized(_this));\n };\n\n _this.onDrop = function (e) {\n var onNodeDrop = _this.props.context.onNodeDrop;\n e.preventDefault();\n e.stopPropagation();\n\n _this.setState({\n dragNodeHighlight: false\n });\n\n onNodeDrop(e, _assertThisInitialized(_this));\n }; // Disabled item still can be switch\n\n\n _this.onExpand = function (e) {\n var onNodeExpand = _this.props.context.onNodeExpand;\n onNodeExpand(e, convertNodePropsToEventData(_this.props));\n }; // Drag usage\n\n\n _this.setSelectHandle = function (node) {\n _this.selectHandle = node;\n };\n\n _this.getNodeState = function () {\n var expanded = _this.props.expanded;\n\n if (_this.isLeaf()) {\n return null;\n }\n\n return expanded ? ICON_OPEN : ICON_CLOSE;\n };\n\n _this.hasChildren = function () {\n var eventKey = _this.props.eventKey;\n var keyEntities = _this.props.context.keyEntities;\n\n var _ref = keyEntities[eventKey] || {},\n children = _ref.children;\n\n return !!(children || []).length;\n };\n\n _this.isLeaf = function () {\n var _this$props2 = _this.props,\n isLeaf = _this$props2.isLeaf,\n loaded = _this$props2.loaded;\n var loadData = _this.props.context.loadData;\n\n var hasChildren = _this.hasChildren();\n\n if (isLeaf === false) {\n return false;\n }\n\n return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren;\n };\n\n _this.isDisabled = function () {\n var disabled = _this.props.disabled;\n var treeDisabled = _this.props.context.disabled;\n return !!(treeDisabled || disabled);\n };\n\n _this.isCheckable = function () {\n var checkable = _this.props.checkable;\n var treeCheckable = _this.props.context.checkable; // Return false if tree or treeNode is not checkable\n\n if (!treeCheckable || checkable === false) return false;\n return treeCheckable;\n }; // Load data to avoid default expanded tree without data\n\n\n _this.syncLoadData = function (props) {\n var expanded = props.expanded,\n loading = props.loading,\n loaded = props.loaded;\n var _this$props$context = _this.props.context,\n loadData = _this$props$context.loadData,\n onNodeLoad = _this$props$context.onNodeLoad;\n if (loading) return; // read from state to avoid loadData at same time\n\n if (loadData && expanded && !_this.isLeaf()) {\n // We needn't reload data when has children in sync logic\n // It's only needed in node expanded\n if (!_this.hasChildren() && !loaded) {\n onNodeLoad(convertNodePropsToEventData(_this.props));\n }\n }\n }; // Switcher\n\n\n _this.renderSwitcher = function () {\n var _this$props3 = _this.props,\n expanded = _this$props3.expanded,\n switcherIconFromProps = _this$props3.switcherIcon;\n var _this$props$context2 = _this.props.context,\n prefixCls = _this$props$context2.prefixCls,\n switcherIconFromCtx = _this$props$context2.switcherIcon;\n var switcherIcon = switcherIconFromProps || switcherIconFromCtx;\n\n if (_this.isLeaf()) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-switcher\"), \"\".concat(prefixCls, \"-switcher-noop\"))\n }, typeof switcherIcon === 'function' ? switcherIcon(_objectSpread(_objectSpread({}, _this.props), {}, {\n isLeaf: true\n })) : switcherIcon);\n }\n\n var switcherCls = classNames(\"\".concat(prefixCls, \"-switcher\"), \"\".concat(prefixCls, \"-switcher_\").concat(expanded ? ICON_OPEN : ICON_CLOSE));\n return /*#__PURE__*/React.createElement(\"span\", {\n onClick: _this.onExpand,\n className: switcherCls\n }, typeof switcherIcon === 'function' ? switcherIcon(_objectSpread(_objectSpread({}, _this.props), {}, {\n isLeaf: false\n })) : switcherIcon);\n }; // Checkbox\n\n\n _this.renderCheckbox = function () {\n var _this$props4 = _this.props,\n checked = _this$props4.checked,\n halfChecked = _this$props4.halfChecked,\n disableCheckbox = _this$props4.disableCheckbox;\n var prefixCls = _this.props.context.prefixCls;\n\n var disabled = _this.isDisabled();\n\n var checkable = _this.isCheckable();\n\n if (!checkable) return null; // [Legacy] Custom element should be separate with `checkable` in future\n\n var $custom = typeof checkable !== 'boolean' ? checkable : null;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-checkbox\"), checked && \"\".concat(prefixCls, \"-checkbox-checked\"), !checked && halfChecked && \"\".concat(prefixCls, \"-checkbox-indeterminate\"), (disabled || disableCheckbox) && \"\".concat(prefixCls, \"-checkbox-disabled\")),\n onClick: _this.onCheck\n }, $custom);\n };\n\n _this.renderIcon = function () {\n var loading = _this.props.loading;\n var prefixCls = _this.props.context.prefixCls;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-iconEle\"), \"\".concat(prefixCls, \"-icon__\").concat(_this.getNodeState() || 'docu'), loading && \"\".concat(prefixCls, \"-icon_loading\"))\n });\n }; // Icon + Title\n\n\n _this.renderSelector = function () {\n var dragNodeHighlight = _this.state.dragNodeHighlight;\n var _this$props5 = _this.props,\n title = _this$props5.title,\n selected = _this$props5.selected,\n icon = _this$props5.icon,\n loading = _this$props5.loading,\n data = _this$props5.data;\n var _this$props$context3 = _this.props.context,\n prefixCls = _this$props$context3.prefixCls,\n showIcon = _this$props$context3.showIcon,\n treeIcon = _this$props$context3.icon,\n draggable = _this$props$context3.draggable,\n loadData = _this$props$context3.loadData,\n titleRender = _this$props$context3.titleRender;\n\n var disabled = _this.isDisabled();\n\n var mergedDraggable = typeof draggable === 'function' ? draggable(data) : draggable;\n var wrapClass = \"\".concat(prefixCls, \"-node-content-wrapper\"); // Icon - Still show loading icon when loading without showIcon\n\n var $icon;\n\n if (showIcon) {\n var currentIcon = icon || treeIcon;\n $icon = currentIcon ? /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-iconEle\"), \"\".concat(prefixCls, \"-icon__customize\"))\n }, typeof currentIcon === 'function' ? currentIcon(_this.props) : currentIcon) : _this.renderIcon();\n } else if (loadData && loading) {\n $icon = _this.renderIcon();\n } // Title\n\n\n var titleNode;\n\n if (typeof title === 'function') {\n titleNode = title(data);\n } else if (titleRender) {\n titleNode = titleRender(data);\n } else {\n titleNode = title;\n }\n\n var $title = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-title\")\n }, titleNode);\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: _this.setSelectHandle,\n title: typeof title === 'string' ? title : '',\n className: classNames(\"\".concat(wrapClass), \"\".concat(wrapClass, \"-\").concat(_this.getNodeState() || 'normal'), !disabled && (selected || dragNodeHighlight) && \"\".concat(prefixCls, \"-node-selected\"), !disabled && mergedDraggable && 'draggable'),\n draggable: !disabled && mergedDraggable || undefined,\n \"aria-grabbed\": !disabled && mergedDraggable || undefined,\n onMouseEnter: _this.onMouseEnter,\n onMouseLeave: _this.onMouseLeave,\n onContextMenu: _this.onContextMenu,\n onClick: _this.onSelectorClick,\n onDoubleClick: _this.onSelectorDoubleClick,\n onDragStart: mergedDraggable ? _this.onDragStart : undefined\n }, $icon, $title, _this.renderDropIndicator());\n };\n\n _this.renderDropIndicator = function () {\n var _this$props6 = _this.props,\n disabled = _this$props6.disabled,\n eventKey = _this$props6.eventKey;\n var _this$props$context4 = _this.props.context,\n draggable = _this$props$context4.draggable,\n dropLevelOffset = _this$props$context4.dropLevelOffset,\n dropPosition = _this$props$context4.dropPosition,\n prefixCls = _this$props$context4.prefixCls,\n indent = _this$props$context4.indent,\n dropIndicatorRender = _this$props$context4.dropIndicatorRender,\n dragOverNodeKey = _this$props$context4.dragOverNodeKey,\n direction = _this$props$context4.direction;\n var mergedDraggable = draggable !== false; // allowDrop is calculated in Tree.tsx, there is no need for calc it here\n\n var showIndicator = !disabled && mergedDraggable && dragOverNodeKey === eventKey;\n return showIndicator ? dropIndicatorRender({\n dropPosition: dropPosition,\n dropLevelOffset: dropLevelOffset,\n indent: indent,\n prefixCls: prefixCls,\n direction: direction\n }) : null;\n };\n\n return _this;\n } // Isomorphic needn't load data in server side\n\n\n _createClass(InternalTreeNode, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.syncLoadData(this.props);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.syncLoadData(this.props);\n }\n }, {\n key: \"isSelectable\",\n value: function isSelectable() {\n var selectable = this.props.selectable;\n var treeSelectable = this.props.context.selectable; // Ignore when selectable is undefined or null\n\n if (typeof selectable === 'boolean') {\n return selectable;\n }\n\n return treeSelectable;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var _this$props7 = this.props,\n eventKey = _this$props7.eventKey,\n className = _this$props7.className,\n style = _this$props7.style,\n dragOver = _this$props7.dragOver,\n dragOverGapTop = _this$props7.dragOverGapTop,\n dragOverGapBottom = _this$props7.dragOverGapBottom,\n isLeaf = _this$props7.isLeaf,\n isStart = _this$props7.isStart,\n isEnd = _this$props7.isEnd,\n expanded = _this$props7.expanded,\n selected = _this$props7.selected,\n checked = _this$props7.checked,\n halfChecked = _this$props7.halfChecked,\n loading = _this$props7.loading,\n domRef = _this$props7.domRef,\n active = _this$props7.active,\n data = _this$props7.data,\n onMouseMove = _this$props7.onMouseMove,\n otherProps = _objectWithoutProperties(_this$props7, [\"eventKey\", \"className\", \"style\", \"dragOver\", \"dragOverGapTop\", \"dragOverGapBottom\", \"isLeaf\", \"isStart\", \"isEnd\", \"expanded\", \"selected\", \"checked\", \"halfChecked\", \"loading\", \"domRef\", \"active\", \"data\", \"onMouseMove\"]);\n\n var _this$props$context5 = this.props.context,\n prefixCls = _this$props$context5.prefixCls,\n filterTreeNode = _this$props$context5.filterTreeNode,\n draggable = _this$props$context5.draggable,\n keyEntities = _this$props$context5.keyEntities,\n dropContainerKey = _this$props$context5.dropContainerKey,\n dropTargetKey = _this$props$context5.dropTargetKey;\n var disabled = this.isDisabled();\n var dataOrAriaAttributeProps = getDataAndAria(otherProps);\n\n var _ref2 = keyEntities[eventKey] || {},\n level = _ref2.level;\n\n var isEndNode = isEnd[isEnd.length - 1];\n var mergedDraggable = typeof draggable === 'function' ? draggable(data) : draggable;\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: domRef,\n className: classNames(className, \"\".concat(prefixCls, \"-treenode\"), (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-switcher-\").concat(expanded ? 'open' : 'close'), !isLeaf), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-checkbox-checked\"), checked), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-checkbox-indeterminate\"), halfChecked), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-selected\"), selected), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-loading\"), loading), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-active\"), active), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-leaf-last\"), isEndNode), _defineProperty(_classNames, 'drop-target', dropTargetKey === eventKey), _defineProperty(_classNames, 'drop-container', dropContainerKey === eventKey), _defineProperty(_classNames, 'drag-over', !disabled && dragOver), _defineProperty(_classNames, 'drag-over-gap-top', !disabled && dragOverGapTop), _defineProperty(_classNames, 'drag-over-gap-bottom', !disabled && dragOverGapBottom), _defineProperty(_classNames, 'filter-node', filterTreeNode && filterTreeNode(convertNodePropsToEventData(this.props))), _classNames)),\n style: style,\n onDragEnter: mergedDraggable ? this.onDragEnter : undefined,\n onDragOver: mergedDraggable ? this.onDragOver : undefined,\n onDragLeave: mergedDraggable ? this.onDragLeave : undefined,\n onDrop: mergedDraggable ? this.onDrop : undefined,\n onDragEnd: mergedDraggable ? this.onDragEnd : undefined,\n onMouseMove: onMouseMove\n }, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement(Indent, {\n prefixCls: prefixCls,\n level: level,\n isStart: isStart,\n isEnd: isEnd\n }), this.renderSwitcher(), this.renderCheckbox(), this.renderSelector());\n }\n }]);\n\n return InternalTreeNode;\n}(React.Component);\n\nvar ContextTreeNode = function ContextTreeNode(props) {\n return /*#__PURE__*/React.createElement(TreeContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(InternalTreeNode, Object.assign({}, props, {\n context: context\n }));\n });\n};\n\nContextTreeNode.displayName = 'TreeNode';\nContextTreeNode.defaultProps = {\n title: defaultTitle\n};\nContextTreeNode.isTreeNode = 1;\nexport { InternalTreeNode };\nexport default ContextTreeNode;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-tree/es/TreeNode.js"],"names":["_defineProperty","_objectWithoutProperties","_objectSpread","_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","React","classNames","TreeContext","getDataAndAria","Indent","convertNodePropsToEventData","ICON_OPEN","ICON_CLOSE","defaultTitle","InternalTreeNode","_React$Component","_super","_this","apply","arguments","state","dragNodeHighlight","onSelectorClick","e","onNodeClick","props","context","isSelectable","onSelect","onCheck","onSelectorDoubleClick","onNodeDoubleClick","isDisabled","onNodeSelect","preventDefault","_this$props","disableCheckbox","checked","onNodeCheck","isCheckable","targetChecked","onMouseEnter","onNodeMouseEnter","onMouseLeave","onNodeMouseLeave","onContextMenu","onNodeContextMenu","onDragStart","onNodeDragStart","stopPropagation","setState","dataTransfer","setData","error","onDragEnter","onNodeDragEnter","onDragOver","onNodeDragOver","onDragLeave","onNodeDragLeave","onDragEnd","onNodeDragEnd","onDrop","onNodeDrop","onExpand","onNodeExpand","setSelectHandle","node","selectHandle","getNodeState","expanded","isLeaf","hasChildren","eventKey","keyEntities","_ref","children","length","_this$props2","loaded","loadData","disabled","treeDisabled","checkable","treeCheckable","syncLoadData","loading","_this$props$context","onNodeLoad","renderSwitcher","_this$props3","switcherIconFromProps","switcherIcon","_this$props$context2","prefixCls","switcherIconFromCtx","createElement","className","concat","switcherCls","onClick","renderCheckbox","_this$props4","halfChecked","$custom","renderIcon","renderSelector","_this$props5","title","selected","icon","data","_this$props$context3","showIcon","treeIcon","draggable","titleRender","mergedDraggable","wrapClass","$icon","currentIcon","titleNode","$title","ref","undefined","onDoubleClick","renderDropIndicator","_this$props6","_this$props$context4","dropLevelOffset","dropPosition","indent","dropIndicatorRender","dragOverNodeKey","direction","showIndicator","key","value","componentDidMount","componentDidUpdate","selectable","treeSelectable","render","_classNames","_this$props7","style","dragOver","dragOverGapTop","dragOverGapBottom","isStart","isEnd","domRef","active","onMouseMove","otherProps","_this$props$context5","filterTreeNode","dropContainerKey","dropTargetKey","dataOrAriaAttributeProps","_ref2","level","isEndNode","Object","assign","Component","ContextTreeNode","Consumer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AeO,KAAKY,cAAL,EAfP,EAe8B,KAAKK,cAAL,EAf9B,CAApB;AAgBD;AAzDA,GAtB4B,CAAnB,CAAZ;;AAkFA,SAAO5F,gBAAP;AACD,CApbmC,CAoblCT,KAAK,CAACgK,SApb4B,CAApC;;AAsbA,IAAIC,eAAe,GAAG,SAASA,eAAT,CAAyB7I,KAAzB,EAAgC;AACpD,SAAO,aAAapB,KAAK,CAAC2F,aAAN,CAAoBzF,WAAW,CAACgK,QAAhC,EAA0C,IAA1C,EAAgD,UAAU7I,OAAV,EAAmB;AACrF,WAAO,aAAarB,KAAK,CAAC2F,aAAN,CAAoBlF,gBAApB,EAAsCqJ,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkB3I,KAAlB,EAAyB;AACjFC,MAAAA,OAAO,EAAEA;AADwE,KAAzB,CAAtC,CAApB;AAGD,GAJmB,CAApB;AAKD,CAND;;AAQA4I,eAAe,CAACE,WAAhB,GAA8B,UAA9B;AACAF,eAAe,CAACG,YAAhB,GAA+B;AAC7B7D,EAAAA,KAAK,EAAE/F;AADsB,CAA/B;AAGAyJ,eAAe,CAACI,UAAhB,GAA6B,CAA7B;AACA,SAAS5J,gBAAT;AACA,eAAewJ,eAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport classNames from 'classnames'; // @ts-ignore\n\nimport { TreeContext } from './contextTypes';\nimport { getDataAndAria } from './util';\nimport Indent from './Indent';\nimport { convertNodePropsToEventData } from './utils/treeUtil';\nvar ICON_OPEN = 'open';\nvar ICON_CLOSE = 'close';\nvar defaultTitle = '---';\n\nvar InternalTreeNode = /*#__PURE__*/function (_React$Component) {\n _inherits(InternalTreeNode, _React$Component);\n\n var _super = _createSuper(InternalTreeNode);\n\n function InternalTreeNode() {\n var _this;\n\n _classCallCheck(this, InternalTreeNode);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n dragNodeHighlight: false\n };\n\n _this.onSelectorClick = function (e) {\n // Click trigger before select/check operation\n var onNodeClick = _this.props.context.onNodeClick;\n onNodeClick(e, convertNodePropsToEventData(_this.props));\n\n if (_this.isSelectable()) {\n _this.onSelect(e);\n } else {\n _this.onCheck(e);\n }\n };\n\n _this.onSelectorDoubleClick = function (e) {\n var onNodeDoubleClick = _this.props.context.onNodeDoubleClick;\n onNodeDoubleClick(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onSelect = function (e) {\n if (_this.isDisabled()) return;\n var onNodeSelect = _this.props.context.onNodeSelect;\n e.preventDefault();\n onNodeSelect(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onCheck = function (e) {\n if (_this.isDisabled()) return;\n var _this$props = _this.props,\n disableCheckbox = _this$props.disableCheckbox,\n checked = _this$props.checked;\n var onNodeCheck = _this.props.context.onNodeCheck;\n if (!_this.isCheckable() || disableCheckbox) return;\n e.preventDefault();\n var targetChecked = !checked;\n onNodeCheck(e, convertNodePropsToEventData(_this.props), targetChecked);\n };\n\n _this.onMouseEnter = function (e) {\n var onNodeMouseEnter = _this.props.context.onNodeMouseEnter;\n onNodeMouseEnter(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onMouseLeave = function (e) {\n var onNodeMouseLeave = _this.props.context.onNodeMouseLeave;\n onNodeMouseLeave(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onContextMenu = function (e) {\n var onNodeContextMenu = _this.props.context.onNodeContextMenu;\n onNodeContextMenu(e, convertNodePropsToEventData(_this.props));\n };\n\n _this.onDragStart = function (e) {\n var onNodeDragStart = _this.props.context.onNodeDragStart;\n e.stopPropagation();\n\n _this.setState({\n dragNodeHighlight: true\n });\n\n onNodeDragStart(e, _assertThisInitialized(_this));\n\n try {\n // ie throw error\n // firefox-need-it\n e.dataTransfer.setData('text/plain', '');\n } catch (error) {// empty\n }\n };\n\n _this.onDragEnter = function (e) {\n var onNodeDragEnter = _this.props.context.onNodeDragEnter;\n e.preventDefault();\n e.stopPropagation();\n onNodeDragEnter(e, _assertThisInitialized(_this));\n };\n\n _this.onDragOver = function (e) {\n var onNodeDragOver = _this.props.context.onNodeDragOver;\n e.preventDefault();\n e.stopPropagation();\n onNodeDragOver(e, _assertThisInitialized(_this));\n };\n\n _this.onDragLeave = function (e) {\n var onNodeDragLeave = _this.props.context.onNodeDragLeave;\n e.stopPropagation();\n onNodeDragLeave(e, _assertThisInitialized(_this));\n };\n\n _this.onDragEnd = function (e) {\n var onNodeDragEnd = _this.props.context.onNodeDragEnd;\n e.stopPropagation();\n\n _this.setState({\n dragNodeHighlight: false\n });\n\n onNodeDragEnd(e, _assertThisInitialized(_this));\n };\n\n _this.onDrop = function (e) {\n var onNodeDrop = _this.props.context.onNodeDrop;\n e.preventDefault();\n e.stopPropagation();\n\n _this.setState({\n dragNodeHighlight: false\n });\n\n onNodeDrop(e, _assertThisInitialized(_this));\n }; // Disabled item still can be switch\n\n\n _this.onExpand = function (e) {\n var onNodeExpand = _this.props.context.onNodeExpand;\n onNodeExpand(e, convertNodePropsToEventData(_this.props));\n }; // Drag usage\n\n\n _this.setSelectHandle = function (node) {\n _this.selectHandle = node;\n };\n\n _this.getNodeState = function () {\n var expanded = _this.props.expanded;\n\n if (_this.isLeaf()) {\n return null;\n }\n\n return expanded ? ICON_OPEN : ICON_CLOSE;\n };\n\n _this.hasChildren = function () {\n var eventKey = _this.props.eventKey;\n var keyEntities = _this.props.context.keyEntities;\n\n var _ref = keyEntities[eventKey] || {},\n children = _ref.children;\n\n return !!(children || []).length;\n };\n\n _this.isLeaf = function () {\n var _this$props2 = _this.props,\n isLeaf = _this$props2.isLeaf,\n loaded = _this$props2.loaded;\n var loadData = _this.props.context.loadData;\n\n var hasChildren = _this.hasChildren();\n\n if (isLeaf === false) {\n return false;\n }\n\n return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren;\n };\n\n _this.isDisabled = function () {\n var disabled = _this.props.disabled;\n var treeDisabled = _this.props.context.disabled;\n return !!(treeDisabled || disabled);\n };\n\n _this.isCheckable = function () {\n var checkable = _this.props.checkable;\n var treeCheckable = _this.props.context.checkable; // Return false if tree or treeNode is not checkable\n\n if (!treeCheckable || checkable === false) return false;\n return treeCheckable;\n }; // Load data to avoid default expanded tree without data\n\n\n _this.syncLoadData = function (props) {\n var expanded = props.expanded,\n loading = props.loading,\n loaded = props.loaded;\n var _this$props$context = _this.props.context,\n loadData = _this$props$context.loadData,\n onNodeLoad = _this$props$context.onNodeLoad;\n if (loading) return; // read from state to avoid loadData at same time\n\n if (loadData && expanded && !_this.isLeaf()) {\n // We needn't reload data when has children in sync logic\n // It's only needed in node expanded\n if (!_this.hasChildren() && !loaded) {\n onNodeLoad(convertNodePropsToEventData(_this.props));\n }\n }\n }; // Switcher\n\n\n _this.renderSwitcher = function () {\n var _this$props3 = _this.props,\n expanded = _this$props3.expanded,\n switcherIconFromProps = _this$props3.switcherIcon;\n var _this$props$context2 = _this.props.context,\n prefixCls = _this$props$context2.prefixCls,\n switcherIconFromCtx = _this$props$context2.switcherIcon;\n var switcherIcon = switcherIconFromProps || switcherIconFromCtx;\n\n if (_this.isLeaf()) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-switcher\"), \"\".concat(prefixCls, \"-switcher-noop\"))\n }, typeof switcherIcon === 'function' ? switcherIcon(_objectSpread(_objectSpread({}, _this.props), {}, {\n isLeaf: true\n })) : switcherIcon);\n }\n\n var switcherCls = classNames(\"\".concat(prefixCls, \"-switcher\"), \"\".concat(prefixCls, \"-switcher_\").concat(expanded ? ICON_OPEN : ICON_CLOSE));\n return /*#__PURE__*/React.createElement(\"span\", {\n onClick: _this.onExpand,\n className: switcherCls\n }, typeof switcherIcon === 'function' ? switcherIcon(_objectSpread(_objectSpread({}, _this.props), {}, {\n isLeaf: false\n })) : switcherIcon);\n }; // Checkbox\n\n\n _this.renderCheckbox = function () {\n var _this$props4 = _this.props,\n checked = _this$props4.checked,\n halfChecked = _this$props4.halfChecked,\n disableCheckbox = _this$props4.disableCheckbox;\n var prefixCls = _this.props.context.prefixCls;\n\n var disabled = _this.isDisabled();\n\n var checkable = _this.isCheckable();\n\n if (!checkable) return null; // [Legacy] Custom element should be separate with `checkable` in future\n\n var $custom = typeof checkable !== 'boolean' ? checkable : null;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-checkbox\"), checked && \"\".concat(prefixCls, \"-checkbox-checked\"), !checked && halfChecked && \"\".concat(prefixCls, \"-checkbox-indeterminate\"), (disabled || disableCheckbox) && \"\".concat(prefixCls, \"-checkbox-disabled\")),\n onClick: _this.onCheck\n }, $custom);\n };\n\n _this.renderIcon = function () {\n var loading = _this.props.loading;\n var prefixCls = _this.props.context.prefixCls;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-iconEle\"), \"\".concat(prefixCls, \"-icon__\").concat(_this.getNodeState() || 'docu'), loading && \"\".concat(prefixCls, \"-icon_loading\"))\n });\n }; // Icon + Title\n\n\n _this.renderSelector = function () {\n var dragNodeHighlight = _this.state.dragNodeHighlight;\n var _this$props5 = _this.props,\n title = _this$props5.title,\n selected = _this$props5.selected,\n icon = _this$props5.icon,\n loading = _this$props5.loading,\n data = _this$props5.data;\n var _this$props$context3 = _this.props.context,\n prefixCls = _this$props$context3.prefixCls,\n showIcon = _this$props$context3.showIcon,\n treeIcon = _this$props$context3.icon,\n draggable = _this$props$context3.draggable,\n loadData = _this$props$context3.loadData,\n titleRender = _this$props$context3.titleRender;\n\n var disabled = _this.isDisabled();\n\n var mergedDraggable = typeof draggable === 'function' ? draggable(data) : draggable;\n var wrapClass = \"\".concat(prefixCls, \"-node-content-wrapper\"); // Icon - Still show loading icon when loading without showIcon\n\n var $icon;\n\n if (showIcon) {\n var currentIcon = icon || treeIcon;\n $icon = currentIcon ? /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-iconEle\"), \"\".concat(prefixCls, \"-icon__customize\"))\n }, typeof currentIcon === 'function' ? currentIcon(_this.props) : currentIcon) : _this.renderIcon();\n } else if (loadData && loading) {\n $icon = _this.renderIcon();\n } // Title\n\n\n var titleNode;\n\n if (typeof title === 'function') {\n titleNode = title(data);\n } else if (titleRender) {\n titleNode = titleRender(data);\n } else {\n titleNode = title;\n }\n\n var $title = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-title\")\n }, titleNode);\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: _this.setSelectHandle,\n title: typeof title === 'string' ? title : '',\n className: classNames(\"\".concat(wrapClass), \"\".concat(wrapClass, \"-\").concat(_this.getNodeState() || 'normal'), !disabled && (selected || dragNodeHighlight) && \"\".concat(prefixCls, \"-node-selected\"), !disabled && mergedDraggable && 'draggable'),\n draggable: !disabled && mergedDraggable || undefined,\n \"aria-grabbed\": !disabled && mergedDraggable || undefined,\n onMouseEnter: _this.onMouseEnter,\n onMouseLeave: _this.onMouseLeave,\n onContextMenu: _this.onContextMenu,\n onClick: _this.onSelectorClick,\n onDoubleClick: _this.onSelectorDoubleClick,\n onDragStart: mergedDraggable ? _this.onDragStart : undefined\n }, $icon, $title, _this.renderDropIndicator());\n };\n\n _this.renderDropIndicator = function () {\n var _this$props6 = _this.props,\n disabled = _this$props6.disabled,\n eventKey = _this$props6.eventKey;\n var _this$props$context4 = _this.props.context,\n draggable = _this$props$context4.draggable,\n dropLevelOffset = _this$props$context4.dropLevelOffset,\n dropPosition = _this$props$context4.dropPosition,\n prefixCls = _this$props$context4.prefixCls,\n indent = _this$props$context4.indent,\n dropIndicatorRender = _this$props$context4.dropIndicatorRender,\n dragOverNodeKey = _this$props$context4.dragOverNodeKey,\n direction = _this$props$context4.direction;\n var mergedDraggable = draggable !== false; // allowDrop is calculated in Tree.tsx, there is no need for calc it here\n\n var showIndicator = !disabled && mergedDraggable && dragOverNodeKey === eventKey;\n return showIndicator ? dropIndicatorRender({\n dropPosition: dropPosition,\n dropLevelOffset: dropLevelOffset,\n indent: indent,\n prefixCls: prefixCls,\n direction: direction\n }) : null;\n };\n\n return _this;\n } // Isomorphic needn't load data in server side\n\n\n _createClass(InternalTreeNode, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.syncLoadData(this.props);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.syncLoadData(this.props);\n }\n }, {\n key: \"isSelectable\",\n value: function isSelectable() {\n var selectable = this.props.selectable;\n var treeSelectable = this.props.context.selectable; // Ignore when selectable is undefined or null\n\n if (typeof selectable === 'boolean') {\n return selectable;\n }\n\n return treeSelectable;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var _this$props7 = this.props,\n eventKey = _this$props7.eventKey,\n className = _this$props7.className,\n style = _this$props7.style,\n dragOver = _this$props7.dragOver,\n dragOverGapTop = _this$props7.dragOverGapTop,\n dragOverGapBottom = _this$props7.dragOverGapBottom,\n isLeaf = _this$props7.isLeaf,\n isStart = _this$props7.isStart,\n isEnd = _this$props7.isEnd,\n expanded = _this$props7.expanded,\n selected = _this$props7.selected,\n checked = _this$props7.checked,\n halfChecked = _this$props7.halfChecked,\n loading = _this$props7.loading,\n domRef = _this$props7.domRef,\n active = _this$props7.active,\n data = _this$props7.data,\n onMouseMove = _this$props7.onMouseMove,\n otherProps = _objectWithoutProperties(_this$props7, [\"eventKey\", \"className\", \"style\", \"dragOver\", \"dragOverGapTop\", \"dragOverGapBottom\", \"isLeaf\", \"isStart\", \"isEnd\", \"expanded\", \"selected\", \"checked\", \"halfChecked\", \"loading\", \"domRef\", \"active\", \"data\", \"onMouseMove\"]);\n\n var _this$props$context5 = this.props.context,\n prefixCls = _this$props$context5.prefixCls,\n filterTreeNode = _this$props$context5.filterTreeNode,\n draggable = _this$props$context5.draggable,\n keyEntities = _this$props$context5.keyEntities,\n dropContainerKey = _this$props$context5.dropContainerKey,\n dropTargetKey = _this$props$context5.dropTargetKey;\n var disabled = this.isDisabled();\n var dataOrAriaAttributeProps = getDataAndAria(otherProps);\n\n var _ref2 = keyEntities[eventKey] || {},\n level = _ref2.level;\n\n var isEndNode = isEnd[isEnd.length - 1];\n var mergedDraggable = typeof draggable === 'function' ? draggable(data) : draggable;\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: domRef,\n className: classNames(className, \"\".concat(prefixCls, \"-treenode\"), (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-switcher-\").concat(expanded ? 'open' : 'close'), !isLeaf), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-checkbox-checked\"), checked), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-checkbox-indeterminate\"), halfChecked), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-selected\"), selected), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-loading\"), loading), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-active\"), active), _defineProperty(_classNames, \"\".concat(prefixCls, \"-treenode-leaf-last\"), isEndNode), _defineProperty(_classNames, 'drop-target', dropTargetKey === eventKey), _defineProperty(_classNames, 'drop-container', dropContainerKey === eventKey), _defineProperty(_classNames, 'drag-over', !disabled && dragOver), _defineProperty(_classNames, 'drag-over-gap-top', !disabled && dragOverGapTop), _defineProperty(_classNames, 'drag-over-gap-bottom', !disabled && dragOverGapBottom), _defineProperty(_classNames, 'filter-node', filterTreeNode && filterTreeNode(convertNodePropsToEventData(this.props))), _classNames)),\n style: style,\n onDragEnter: mergedDraggable ? this.onDragEnter : undefined,\n onDragOver: mergedDraggable ? this.onDragOver : undefined,\n onDragLeave: mergedDraggable ? this.onDragLeave : undefined,\n onDrop: mergedDraggable ? this.onDrop : undefined,\n onDragEnd: mergedDraggable ? this.onDragEnd : undefined,\n onMouseMove: onMouseMove\n }, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement(Indent, {\n prefixCls: prefixCls,\n level: level,\n isStart: isStart,\n isEnd: isEnd\n }), this.renderSwitcher(), this.renderCheckbox(), this.renderSelector());\n }\n }]);\n\n return InternalTreeNode;\n}(React.Component);\n\nvar ContextTreeNode = function ContextTreeNode(props) {\n return /*#__PURE__*/React.createElement(TreeContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(InternalTreeNode, Object.assign({}, props, {\n context: context\n }));\n });\n};\n\nContextTreeNode.displayName = 'TreeNode';\nContextTreeNode.defaultProps = {\n title: defaultTitle\n};\nContextTreeNode.isTreeNode = 1;\nexport { InternalTreeNode };\nexport default ContextTreeNode;"]},"metadata":{},"sourceType":"module"}