307e145c82e00e5e3e6024081bf94948.json
14.7 KB
{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n/* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */\n\nimport React, { cloneElement } from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport classNames from 'classnames';\nimport Step from './Step';\n\nvar Steps = /*#__PURE__*/function (_React$Component) {\n _inherits(Steps, _React$Component);\n\n var _super = _createSuper(Steps);\n\n function Steps() {\n var _this;\n\n _classCallCheck(this, Steps);\n\n _this = _super.apply(this, arguments);\n\n _this.onStepClick = function (next) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n current = _this$props.current;\n\n if (onChange && current !== next) {\n onChange(next);\n }\n };\n\n return _this;\n }\n\n _createClass(Steps, [{\n key: \"render\",\n value: function render() {\n var _classNames,\n _this2 = this;\n\n var _this$props2 = this.props,\n prefixCls = _this$props2.prefixCls,\n _this$props2$style = _this$props2.style,\n style = _this$props2$style === void 0 ? {} : _this$props2$style,\n className = _this$props2.className,\n children = _this$props2.children,\n direction = _this$props2.direction,\n type = _this$props2.type,\n labelPlacement = _this$props2.labelPlacement,\n iconPrefix = _this$props2.iconPrefix,\n status = _this$props2.status,\n size = _this$props2.size,\n current = _this$props2.current,\n progressDot = _this$props2.progressDot,\n stepIcon = _this$props2.stepIcon,\n initial = _this$props2.initial,\n icons = _this$props2.icons,\n onChange = _this$props2.onChange,\n restProps = _objectWithoutProperties(_this$props2, [\"prefixCls\", \"style\", \"className\", \"children\", \"direction\", \"type\", \"labelPlacement\", \"iconPrefix\", \"status\", \"size\", \"current\", \"progressDot\", \"stepIcon\", \"initial\", \"icons\", \"onChange\"]);\n\n var isNav = type === 'navigation';\n var adjustedLabelPlacement = progressDot ? 'vertical' : labelPlacement;\n var classString = classNames(prefixCls, \"\".concat(prefixCls, \"-\").concat(direction), className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(size), size), _defineProperty(_classNames, \"\".concat(prefixCls, \"-label-\").concat(adjustedLabelPlacement), direction === 'horizontal'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-dot\"), !!progressDot), _defineProperty(_classNames, \"\".concat(prefixCls, \"-navigation\"), isNav), _classNames));\n return React.createElement(\"div\", Object.assign({\n className: classString,\n style: style\n }, restProps), toArray(children).map(function (child, index) {\n var stepNumber = initial + index;\n\n var childProps = _objectSpread({\n stepNumber: \"\".concat(stepNumber + 1),\n stepIndex: stepNumber,\n key: stepNumber,\n prefixCls: prefixCls,\n iconPrefix: iconPrefix,\n wrapperStyle: style,\n progressDot: progressDot,\n stepIcon: stepIcon,\n icons: icons,\n onStepClick: onChange && _this2.onStepClick\n }, child.props); // fix tail color\n\n\n if (status === 'error' && index === current - 1) {\n childProps.className = \"\".concat(prefixCls, \"-next-error\");\n }\n\n if (!child.props.status) {\n if (stepNumber === current) {\n childProps.status = status;\n } else if (stepNumber < current) {\n childProps.status = 'finish';\n } else {\n childProps.status = 'wait';\n }\n }\n\n childProps.active = stepNumber === current;\n return cloneElement(child, childProps);\n }));\n }\n }]);\n\n return Steps;\n}(React.Component);\n\nexport { Steps as default };\nSteps.Step = Step;\nSteps.defaultProps = {\n type: 'default',\n prefixCls: 'rc-steps',\n iconPrefix: 'rc',\n direction: 'horizontal',\n labelPlacement: 'horizontal',\n initial: 0,\n current: 0,\n status: 'process',\n size: '',\n progressDot: false\n};","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-steps/es/Steps.js"],"names":["_objectSpread","_defineProperty","_objectWithoutProperties","_classCallCheck","_createClass","_inherits","_createSuper","React","cloneElement","toArray","classNames","Step","Steps","_React$Component","_super","_this","apply","arguments","onStepClick","next","_this$props","props","onChange","current","key","value","render","_classNames","_this2","_this$props2","prefixCls","_this$props2$style","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","progressDot","stepIcon","initial","icons","restProps","isNav","adjustedLabelPlacement","classString","concat","createElement","Object","assign","map","child","index","stepNumber","childProps","stepIndex","wrapperStyle","active","Component","default","defaultProps"],"mappings":"AAAA,OAAOA,aAAP,MAA0B,0CAA1B;AACA,OAAOC,eAAP,MAA4B,2CAA5B;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAOC,eAAP,MAA4B,2CAA5B;AACA,OAAOC,YAAP,MAAyB,wCAAzB;AACA,OAAOC,SAAP,MAAsB,qCAAtB;AACA,OAAOC,YAAP,MAAyB,wCAAzB;AAEA;;AACA,OAAOC,KAAP,IAAgBC,YAAhB,QAAoC,OAApC;AACA,OAAOC,OAAP,MAAoB,6BAApB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;AAEA,IAAIC,KAAK,GAAG,aAAa,UAAUC,gBAAV,EAA4B;AACnDR,EAAAA,SAAS,CAACO,KAAD,EAAQC,gBAAR,CAAT;;AAEA,MAAIC,MAAM,GAAGR,YAAY,CAACM,KAAD,CAAzB;;AAEA,WAASA,KAAT,GAAiB;AACf,QAAIG,KAAJ;;AAEAZ,IAAAA,eAAe,CAAC,IAAD,EAAOS,KAAP,CAAf;;AAEAG,IAAAA,KAAK,GAAGD,MAAM,CAACE,KAAP,CAAa,IAAb,EAAmBC,SAAnB,CAAR;;AAEAF,IAAAA,KAAK,CAACG,WAAN,GAAoB,UAAUC,IAAV,EAAgB;AAClC,UAAIC,WAAW,GAAGL,KAAK,CAACM,KAAxB;AAAA,UACIC,QAAQ,GAAGF,WAAW,CAACE,QAD3B;AAAA,UAEIC,OAAO,GAAGH,WAAW,CAACG,OAF1B;;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AAA,UAAU,CAACG,MAAX,GAAoBJ,UAAU,KAAKjC,OAAnC;AACA,eAAOf,YAAY,CAAC8C,KAAD,EAAQG,UAAR,CAAnB;AACD,OAjCc,CAHR,CAAP;AAqCD;AAlEkB,GAAD,CAAR,CAAZ;;AAqEA,SAAO7C,KAAP;AACD,CA/FwB,CA+FvBL,KAAK,CAACsD,SA/FiB,CAAzB;;AAiGA,SAASjD,KAAK,IAAIkD,OAAlB;AACAlD,KAAK,CAACD,IAAN,GAAaA,IAAb;AACAC,KAAK,CAACmD,YAAN,GAAqB;AACnB3B,EAAAA,IAAI,EAAE,SADa;AAEnBN,EAAAA,SAAS,EAAE,UAFQ;AAGnBQ,EAAAA,UAAU,EAAE,IAHO;AAInBH,EAAAA,SAAS,EAAE,YAJQ;AAKnBE,EAAAA,cAAc,EAAE,YALG;AAMnBM,EAAAA,OAAO,EAAE,CANU;AAOnBpB,EAAAA,OAAO,EAAE,CAPU;AAQnBgB,EAAAA,MAAM,EAAE,SARW;AASnBC,EAAAA,IAAI,EAAE,EATa;AAUnBC,EAAAA,WAAW,EAAE;AAVM,CAArB","sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\n/* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */\nimport React, { cloneElement } from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport classNames from 'classnames';\nimport Step from './Step';\n\nvar Steps = /*#__PURE__*/function (_React$Component) {\n _inherits(Steps, _React$Component);\n\n var _super = _createSuper(Steps);\n\n function Steps() {\n var _this;\n\n _classCallCheck(this, Steps);\n\n _this = _super.apply(this, arguments);\n\n _this.onStepClick = function (next) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n current = _this$props.current;\n\n if (onChange && current !== next) {\n onChange(next);\n }\n };\n\n return _this;\n }\n\n _createClass(Steps, [{\n key: \"render\",\n value: function render() {\n var _classNames,\n _this2 = this;\n\n var _this$props2 = this.props,\n prefixCls = _this$props2.prefixCls,\n _this$props2$style = _this$props2.style,\n style = _this$props2$style === void 0 ? {} : _this$props2$style,\n className = _this$props2.className,\n children = _this$props2.children,\n direction = _this$props2.direction,\n type = _this$props2.type,\n labelPlacement = _this$props2.labelPlacement,\n iconPrefix = _this$props2.iconPrefix,\n status = _this$props2.status,\n size = _this$props2.size,\n current = _this$props2.current,\n progressDot = _this$props2.progressDot,\n stepIcon = _this$props2.stepIcon,\n initial = _this$props2.initial,\n icons = _this$props2.icons,\n onChange = _this$props2.onChange,\n restProps = _objectWithoutProperties(_this$props2, [\"prefixCls\", \"style\", \"className\", \"children\", \"direction\", \"type\", \"labelPlacement\", \"iconPrefix\", \"status\", \"size\", \"current\", \"progressDot\", \"stepIcon\", \"initial\", \"icons\", \"onChange\"]);\n\n var isNav = type === 'navigation';\n var adjustedLabelPlacement = progressDot ? 'vertical' : labelPlacement;\n var classString = classNames(prefixCls, \"\".concat(prefixCls, \"-\").concat(direction), className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(size), size), _defineProperty(_classNames, \"\".concat(prefixCls, \"-label-\").concat(adjustedLabelPlacement), direction === 'horizontal'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-dot\"), !!progressDot), _defineProperty(_classNames, \"\".concat(prefixCls, \"-navigation\"), isNav), _classNames));\n return React.createElement(\"div\", Object.assign({\n className: classString,\n style: style\n }, restProps), toArray(children).map(function (child, index) {\n var stepNumber = initial + index;\n\n var childProps = _objectSpread({\n stepNumber: \"\".concat(stepNumber + 1),\n stepIndex: stepNumber,\n key: stepNumber,\n prefixCls: prefixCls,\n iconPrefix: iconPrefix,\n wrapperStyle: style,\n progressDot: progressDot,\n stepIcon: stepIcon,\n icons: icons,\n onStepClick: onChange && _this2.onStepClick\n }, child.props); // fix tail color\n\n\n if (status === 'error' && index === current - 1) {\n childProps.className = \"\".concat(prefixCls, \"-next-error\");\n }\n\n if (!child.props.status) {\n if (stepNumber === current) {\n childProps.status = status;\n } else if (stepNumber < current) {\n childProps.status = 'finish';\n } else {\n childProps.status = 'wait';\n }\n }\n\n childProps.active = stepNumber === current;\n return cloneElement(child, childProps);\n }));\n }\n }]);\n\n return Steps;\n}(React.Component);\n\nexport { Steps as default };\nSteps.Step = Step;\nSteps.defaultProps = {\n type: 'default',\n prefixCls: 'rc-steps',\n iconPrefix: 'rc',\n direction: 'horizontal',\n labelPlacement: 'horizontal',\n initial: 0,\n current: 0,\n status: 'process',\n size: '',\n progressDot: false\n};"]},"metadata":{},"sourceType":"module"}