8475fc09bad032149a4af8266686cb9d.json
3.88 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport React from 'react';\nexport var offset = 4;\nexport default function dropIndicatorRender(props) {\n var _style;\n\n var dropPosition = props.dropPosition,\n dropLevelOffset = props.dropLevelOffset,\n prefixCls = props.prefixCls,\n indent = props.indent,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'ltr' : _props$direction;\n var startPosition = direction === 'ltr' ? 'left' : 'right';\n var endPosition = direction === 'ltr' ? 'right' : 'left';\n var style = (_style = {}, _defineProperty(_style, startPosition, -dropLevelOffset * indent + offset), _defineProperty(_style, endPosition, 0), _style);\n\n switch (dropPosition) {\n case -1:\n style.top = -3;\n break;\n\n case 1:\n style.bottom = -3;\n break;\n\n default:\n // dropPosition === 0\n style.bottom = -3;\n style[startPosition] = indent + offset;\n break;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n style: style,\n className: \"\".concat(prefixCls, \"-drop-indicator\")\n });\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/tree/utils/dropIndicator.js"],"names":["_defineProperty","React","offset","dropIndicatorRender","props","_style","dropPosition","dropLevelOffset","prefixCls","indent","_props$direction","direction","startPosition","endPosition","style","top","bottom","createElement","className","concat"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAO,IAAIC,MAAM,GAAG,CAAb;AACP,eAAe,SAASC,mBAAT,CAA6BC,KAA7B,EAAoC;AACjD,MAAIC,MAAJ;;AAEA,MAAIC,YAAY,GAAGF,KAAK,CAACE,YAAzB;AAAA,MACIC,eAAe,GAAGH,KAAK,CAACG,eAD5B;AAAA,MAEIC,SAAS,GAAGJ,KAAK,CAACI,SAFtB;AAAA,MAGIC,MAAM,GAAGL,KAAK,CAACK,MAHnB;AAAA,MAIIC,gBAAgB,GAAGN,KAAK,CAACO,SAJ7B;AAAA,MAKIA,SAAS,GAAGD,gBAAgB,KAAK,KAAK,CAA1B,GAA8B,KAA9B,GAAsCA,gBALtD;AAMA,MAAIE,aAAa,GAAGD,SAAS,KAAK,KAAd,GAAsB,MAAtB,GAA+B,OAAnD;AACA,MAAIE,WAAW,GAAGF,SAAS,KAAK,KAAd,GAAsB,OAAtB,GAAgC,MAAlD;AACA,MAAIG,KAAK,IAAIT,MAAM,GAAG,EAAT,EAAaL,eAAe,CAACK,MAAD,EAASO,aAAT,EAAwB,CAACL,eAAD,GAAmBE,MAAnB,GAA4BP,MAApD,CAA5B,EAAyFF,eAAe,CAACK,MAAD,EAASQ,WAAT,EAAsB,CAAtB,CAAxG,EAAkIR,MAAtI,CAAT;;AAEA,UAAQC,YAAR;AACE,SAAK,CAAC,CAAN;AACEQ,MAAAA,KAAK,CAACC,GAAN,GAAY,CAAC,CAAb;AACA;;AAEF,SAAK,CAAL;AACED,MAAAA,KAAK,CAACE,MAAN,GAAe,CAAC,CAAhB;AACA;;AAEF;AACE;AACAF,MAAAA,KAAK,CAACE,MAAN,GAAe,CAAC,CAAhB;AACAF,MAAAA,KAAK,CAACF,aAAD,CAAL,GAAuBH,MAAM,GAAGP,MAAhC;AACA;AAbJ;;AAgBA,SAAO,aAAaD,KAAK,CAACgB,aAAN,CAAoB,KAApB,EAA2B;AAC7CH,IAAAA,KAAK,EAAEA,KADsC;AAE7CI,IAAAA,SAAS,EAAE,GAAGC,MAAH,CAAUX,SAAV,EAAqB,iBAArB;AAFkC,GAA3B,CAApB;AAID","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport React from 'react';\nexport var offset = 4;\nexport default function dropIndicatorRender(props) {\n var _style;\n\n var dropPosition = props.dropPosition,\n dropLevelOffset = props.dropLevelOffset,\n prefixCls = props.prefixCls,\n indent = props.indent,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'ltr' : _props$direction;\n var startPosition = direction === 'ltr' ? 'left' : 'right';\n var endPosition = direction === 'ltr' ? 'right' : 'left';\n var style = (_style = {}, _defineProperty(_style, startPosition, -dropLevelOffset * indent + offset), _defineProperty(_style, endPosition, 0), _style);\n\n switch (dropPosition) {\n case -1:\n style.top = -3;\n break;\n\n case 1:\n style.bottom = -3;\n break;\n\n default:\n // dropPosition === 0\n style.bottom = -3;\n style[startPosition] = indent + offset;\n break;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n style: style,\n className: \"\".concat(prefixCls, \"-drop-indicator\")\n });\n}"]},"metadata":{},"sourceType":"module"}