d66fa1837466a166824e56c51351f2c3.json
9.14 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 RcSwitch from 'rc-switch';\nimport classNames from 'classnames';\nimport LoadingOutlined from '@ant-design/icons/LoadingOutlined';\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport SizeContext from '../config-provider/SizeContext';\nimport devWarning from '../_util/devWarning';\nvar Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {\n var _classNames;\n\n var customizePrefixCls = _a.prefixCls,\n customizeSize = _a.size,\n loading = _a.loading,\n _a$className = _a.className,\n className = _a$className === void 0 ? '' : _a$className,\n disabled = _a.disabled,\n props = __rest(_a, [\"prefixCls\", \"size\", \"loading\", \"className\", \"disabled\"]);\n\n devWarning('checked' in props || !('value' in props), 'Switch', '`value` is not a valid prop, do you mean `checked`?');\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var size = React.useContext(SizeContext);\n var prefixCls = getPrefixCls('switch', customizePrefixCls);\n var loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-handle\")\n }, loading && /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: \"\".concat(prefixCls, \"-loading-icon\")\n }));\n var classes = classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-small\"), (customizeSize || size) === 'small'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n return /*#__PURE__*/React.createElement(Wave, {\n insertExtraNode: true\n }, /*#__PURE__*/React.createElement(RcSwitch, _extends({}, props, {\n prefixCls: prefixCls,\n className: classes,\n disabled: disabled || loading,\n ref: ref,\n loadingIcon: loadingIcon\n })));\n});\nSwitch.__ANT_SWITCH = true;\nSwitch.displayName = 'Switch';\nexport default Switch;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/switch/index.js"],"names":["_extends","_defineProperty","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","RcSwitch","classNames","LoadingOutlined","Wave","ConfigContext","SizeContext","devWarning","Switch","forwardRef","_a","ref","_classNames","customizePrefixCls","prefixCls","customizeSize","size","loading","_a$className","className","disabled","props","_React$useContext","useContext","getPrefixCls","direction","loadingIcon","createElement","concat","classes","insertExtraNode","__ANT_SWITCH","displayName"],"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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7M,EAA+Qb,WAAjR,GAA+RO,SAA/R,CAAxB;AACA,SAAO,aAAanB,KAAK,CAAC2B,aAAN,CAAoBvB,IAApB,EAA0B;AAC5C0B,IAAAA,eAAe,EAAE;AAD2B,GAA1B,EAEjB,aAAa9B,KAAK,CAAC2B,aAAN,CAAoB1B,QAApB,EAA8BjB,QAAQ,CAAC,EAAD,EAAKqC,KAAL,EAAY;AAChEP,IAAAA,SAAS,EAAEA,SADqD;AAEhEK,IAAAA,SAAS,EAAEU,OAFqD;AAGhET,IAAAA,QAAQ,EAAEA,QAAQ,IAAIH,OAH0C;AAIhEN,IAAAA,GAAG,EAAEA,GAJ2D;AAKhEe,IAAAA,WAAW,EAAEA;AALmD,GAAZ,CAAtC,CAFI,CAApB;AASD,CAlCyB,CAA1B;AAmCAlB,MAAM,CAACuB,YAAP,GAAsB,IAAtB;AACAvB,MAAM,CAACwB,WAAP,GAAqB,QAArB;AACA,eAAexB,MAAf","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 RcSwitch from 'rc-switch';\nimport classNames from 'classnames';\nimport LoadingOutlined from '@ant-design/icons/LoadingOutlined';\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport SizeContext from '../config-provider/SizeContext';\nimport devWarning from '../_util/devWarning';\nvar Switch = /*#__PURE__*/React.forwardRef(function (_a, ref) {\n var _classNames;\n\n var customizePrefixCls = _a.prefixCls,\n customizeSize = _a.size,\n loading = _a.loading,\n _a$className = _a.className,\n className = _a$className === void 0 ? '' : _a$className,\n disabled = _a.disabled,\n props = __rest(_a, [\"prefixCls\", \"size\", \"loading\", \"className\", \"disabled\"]);\n\n devWarning('checked' in props || !('value' in props), 'Switch', '`value` is not a valid prop, do you mean `checked`?');\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var size = React.useContext(SizeContext);\n var prefixCls = getPrefixCls('switch', customizePrefixCls);\n var loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-handle\")\n }, loading && /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: \"\".concat(prefixCls, \"-loading-icon\")\n }));\n var classes = classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-small\"), (customizeSize || size) === 'small'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n return /*#__PURE__*/React.createElement(Wave, {\n insertExtraNode: true\n }, /*#__PURE__*/React.createElement(RcSwitch, _extends({}, props, {\n prefixCls: prefixCls,\n className: classes,\n disabled: disabled || loading,\n ref: ref,\n loadingIcon: loadingIcon\n })));\n});\nSwitch.__ANT_SWITCH = true;\nSwitch.displayName = 'Switch';\nexport default Switch;"]},"metadata":{},"sourceType":"module"}