a5c8ad5fef9733119c3e6c907314430d.json 6.26 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\n\nvar CheckableTag = function CheckableTag(_a) {\n  var _classNames;\n\n  var customizePrefixCls = _a.prefixCls,\n      className = _a.className,\n      checked = _a.checked,\n      onChange = _a.onChange,\n      onClick = _a.onClick,\n      restProps = __rest(_a, [\"prefixCls\", \"className\", \"checked\", \"onChange\", \"onClick\"]);\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPrefixCls = _React$useContext.getPrefixCls;\n\n  var handleClick = function handleClick(e) {\n    if (onChange) {\n      onChange(!checked);\n    }\n\n    if (onClick) {\n      onClick(e);\n    }\n  };\n\n  var prefixCls = getPrefixCls('tag', customizePrefixCls);\n  var cls = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-checkable\"), true), _defineProperty(_classNames, \"\".concat(prefixCls, \"-checkable-checked\"), checked), _classNames), className);\n  return /*#__PURE__*/React.createElement(\"span\", _extends({}, restProps, {\n    className: cls,\n    onClick: handleClick\n  }));\n};\n\nexport default CheckableTag;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/tag/CheckableTag.js"],"names":["_extends","_defineProperty","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","ConfigContext","CheckableTag","_a","_classNames","customizePrefixCls","prefixCls","className","checked","onChange","onClick","restProps","_React$useContext","useContext","getPrefixCls","handleClick","cls","concat","createElement"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EAAoED,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;AACrE;;AAED,MAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EAAqE,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,CAA6BT,CAA7B,CAApB,EAAqDU,CAAC,GAAGP,CAAC,CAACQ,MAA3D,EAAmED,CAAC,EAApE,EAAwE;AAC3I,QAAIT,CAAC,CAACO,OAAF,CAAUL,CAAC,CAACO,CAAD,CAAX,IAAkB,CAAlB,IAAuBN,MAAM,CAACC,SAAP,CAAiBO,oBAAjB,CAAsCL,IAAtC,CAA2CP,CAA3C,EAA8CG,CAAC,CAACO,CAAD,CAA/C,CAA3B,EAAgFR,CAAC,CAACC,CAAC,CAACO,CAAD,CAAF,CAAD,GAAUV,CAAC,CAACG,CAAC,CAACO,CAAD,CAAF,CAAX;AACjF;AACD,SAAOR,CAAP;AACD,CAXD;;AAaA,OAAO,KAAKW,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAv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,aAAN,CAAoB,MAApB,EAA4BnC,QAAQ,CAAC,EAAD,EAAK4B,SAAL,EAAgB;AACtEJ,IAAAA,SAAS,EAAES,GAD2D;AAEtEN,IAAAA,OAAO,EAAEK;AAF6D,GAAhB,CAApC,CAApB;AAID,CA7BD;;AA+BA,eAAeb,YAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\n\nvar CheckableTag = function CheckableTag(_a) {\n  var _classNames;\n\n  var customizePrefixCls = _a.prefixCls,\n      className = _a.className,\n      checked = _a.checked,\n      onChange = _a.onChange,\n      onClick = _a.onClick,\n      restProps = __rest(_a, [\"prefixCls\", \"className\", \"checked\", \"onChange\", \"onClick\"]);\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPrefixCls = _React$useContext.getPrefixCls;\n\n  var handleClick = function handleClick(e) {\n    if (onChange) {\n      onChange(!checked);\n    }\n\n    if (onClick) {\n      onClick(e);\n    }\n  };\n\n  var prefixCls = getPrefixCls('tag', customizePrefixCls);\n  var cls = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-checkable\"), true), _defineProperty(_classNames, \"\".concat(prefixCls, \"-checkable-checked\"), checked), _classNames), className);\n  return /*#__PURE__*/React.createElement(\"span\", _extends({}, restProps, {\n    className: cls,\n    onClick: handleClick\n  }));\n};\n\nexport default CheckableTag;"]},"metadata":{},"sourceType":"module"}