d1e13c528b5fbf3dfe4ebf50f7041ff5.json
7.72 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport * as React from 'react';\nimport RcTree, { TreeNode } from 'rc-tree';\nimport classNames from 'classnames';\nimport DirectoryTree from './DirectoryTree';\nimport { ConfigContext } from '../config-provider';\nimport collapseMotion from '../_util/motion';\nimport renderSwitcherIcon from './utils/iconUtil';\nimport dropIndicatorRender from './utils/dropIndicator';\nvar Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _classNames;\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction,\n virtual = _React$useContext.virtual;\n\n var customizePrefixCls = props.prefixCls,\n className = props.className,\n showIcon = props.showIcon,\n showLine = props.showLine,\n _switcherIcon = props.switcherIcon,\n blockNode = props.blockNode,\n children = props.children,\n checkable = props.checkable;\n var prefixCls = getPrefixCls('tree', customizePrefixCls);\n\n var newProps = _extends(_extends({}, props), {\n showLine: Boolean(showLine),\n dropIndicatorRender: dropIndicatorRender\n });\n\n return /*#__PURE__*/React.createElement(RcTree, _extends({\n itemHeight: 20,\n ref: ref,\n virtual: virtual\n }, newProps, {\n prefixCls: prefixCls,\n className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-icon-hide\"), !showIcon), _defineProperty(_classNames, \"\".concat(prefixCls, \"-block-node\"), blockNode), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className),\n direction: direction,\n checkable: checkable ? /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-checkbox-inner\")\n }) : checkable,\n switcherIcon: function switcherIcon(nodeProps) {\n return renderSwitcherIcon(prefixCls, _switcherIcon, showLine, nodeProps);\n }\n }), children);\n});\nTree.TreeNode = TreeNode;\nTree.DirectoryTree = DirectoryTree;\nTree.defaultProps = {\n checkable: false,\n showIcon: false,\n motion: _extends(_extends({}, collapseMotion), {\n motionAppear: false\n }),\n blockNode: false\n};\nexport default Tree;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/tree/Tree.js"],"names":["_defineProperty","_extends","React","RcTree","TreeNode","classNames","DirectoryTree","ConfigContext","collapseMotion","renderSwitcherIcon","dropIndicatorRender","Tree","forwardRef","props","ref","_classNames","_React$useContext","useContext","getPrefixCls","direction","virtual","customizePrefixCls","prefixCls","className","showIcon","showLine","_switcherIcon","switcherIcon","blockNode","children","checkable","newProps","Boolean","createElement","itemHeight","concat","nodeProps","defaultProps","motion","motionAppear"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAOC,QAAP,MAAqB,gCAArB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,IAAiBC,QAAjB,QAAiC,SAAjC;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,aAAT,QAA8B,oBAA9B;AACA,OAAOC,cAAP,MAA2B,iBAA3B;AACA,OAAOC,kBAAP,MAA+B,kBAA/B;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AACA,IAAIC,IAAI,GAAG,aAAaT,KAAK,CAACU,UAAN,CAAiB,UAAUC,KAAV,EAAiBC,GAAjB,EAAsB;AAC7D,MAAIC,WAAJ;;AAEA,MAAIC,iBAAiB,GAAGd,KAAK,CAACe,UAAN,CAAiBV,aAAjB,CAAxB;AAAA,MACIW,YAAY,GAAGF,iBAAiB,CAACE,YADrC;AAAA,MAEIC,SAAS,GAAGH,iBAAiB,CAACG,SAFlC;AAAA,MAGIC,OAAO,GAAGJ,iBAAiB,CAACI,OAHhC;;AAKA,MAAIC,kBAAkB,GAAGR,KAAK,CAACS,SAA/B;AAAA,MACIC,SAAS,GAAGV,KAAK,CAACU,SADtB;AAAA,MAEIC,QAAQ,GAAGX,K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W,IAAAA,SAAS,EAAEA,SAAS,GAAG,aAAa5B,KAAK,CAAC+B,aAAN,CAAoB,MAApB,EAA4B;AAC9DV,MAAAA,SAAS,EAAE,GAAGY,MAAH,CAAUb,SAAV,EAAqB,iBAArB;AADmD,KAA5B,CAAhB,GAEfQ,SANM;AAOXH,IAAAA,YAAY,EAAE,SAASA,YAAT,CAAsBS,SAAtB,EAAiC;AAC7C,aAAO3B,kBAAkB,CAACa,SAAD,EAAYI,aAAZ,EAA2BD,QAA3B,EAAqCW,SAArC,CAAzB;AACD;AATU,GAJ2C,CAApC,EAchBP,QAdgB,CAApB;AAeD,CAtCuB,CAAxB;AAuCAlB,IAAI,CAACP,QAAL,GAAgBA,QAAhB;AACAO,IAAI,CAACL,aAAL,GAAqBA,aAArB;AACAK,IAAI,CAAC0B,YAAL,GAAoB;AAClBP,EAAAA,SAAS,EAAE,KADO;AAElBN,EAAAA,QAAQ,EAAE,KAFQ;AAGlBc,EAAAA,MAAM,EAAErC,QAAQ,CAACA,QAAQ,CAAC,EAAD,EAAKO,cAAL,CAAT,EAA+B;AAC7C+B,IAAAA,YAAY,EAAE;AAD+B,GAA/B,CAHE;AAMlBX,EAAAA,SAAS,EAAE;AANO,CAApB;AAQA,eAAejB,IAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport * as React from 'react';\nimport RcTree, { TreeNode } from 'rc-tree';\nimport classNames from 'classnames';\nimport DirectoryTree from './DirectoryTree';\nimport { ConfigContext } from '../config-provider';\nimport collapseMotion from '../_util/motion';\nimport renderSwitcherIcon from './utils/iconUtil';\nimport dropIndicatorRender from './utils/dropIndicator';\nvar Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _classNames;\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction,\n virtual = _React$useContext.virtual;\n\n var customizePrefixCls = props.prefixCls,\n className = props.className,\n showIcon = props.showIcon,\n showLine = props.showLine,\n _switcherIcon = props.switcherIcon,\n blockNode = props.blockNode,\n children = props.children,\n checkable = props.checkable;\n var prefixCls = getPrefixCls('tree', customizePrefixCls);\n\n var newProps = _extends(_extends({}, props), {\n showLine: Boolean(showLine),\n dropIndicatorRender: dropIndicatorRender\n });\n\n return /*#__PURE__*/React.createElement(RcTree, _extends({\n itemHeight: 20,\n ref: ref,\n virtual: virtual\n }, newProps, {\n prefixCls: prefixCls,\n className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-icon-hide\"), !showIcon), _defineProperty(_classNames, \"\".concat(prefixCls, \"-block-node\"), blockNode), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className),\n direction: direction,\n checkable: checkable ? /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-checkbox-inner\")\n }) : checkable,\n switcherIcon: function switcherIcon(nodeProps) {\n return renderSwitcherIcon(prefixCls, _switcherIcon, showLine, nodeProps);\n }\n }), children);\n});\nTree.TreeNode = TreeNode;\nTree.DirectoryTree = DirectoryTree;\nTree.defaultProps = {\n checkable: false,\n showIcon: false,\n motion: _extends(_extends({}, collapseMotion), {\n motionAppear: false\n }),\n blockNode: false\n};\nexport default Tree;"]},"metadata":{},"sourceType":"module"}