e4f65fbfc227781ed71a252792ed4ce0.json 18.1 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\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-disable react/prop-types */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport shallowEqual from 'shallowequal';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport CollapsePanel from './Panel';\n\nfunction getActiveKeysArray(activeKey) {\n  var currentActiveKey = activeKey;\n\n  if (!Array.isArray(currentActiveKey)) {\n    currentActiveKey = currentActiveKey ? [currentActiveKey] : [];\n  }\n\n  return currentActiveKey.map(function (key) {\n    return String(key);\n  });\n}\n\nvar Collapse = /*#__PURE__*/function (_React$Component) {\n  _inherits(Collapse, _React$Component);\n\n  var _super = _createSuper(Collapse);\n\n  function Collapse(props) {\n    var _this;\n\n    _classCallCheck(this, Collapse);\n\n    _this = _super.call(this, props);\n\n    _this.onClickItem = function (key) {\n      var activeKey = _this.state.activeKey;\n\n      if (_this.props.accordion) {\n        activeKey = activeKey[0] === key ? [] : [key];\n      } else {\n        activeKey = _toConsumableArray(activeKey);\n        var index = activeKey.indexOf(key);\n        var isActive = index > -1;\n\n        if (isActive) {\n          // remove active state\n          activeKey.splice(index, 1);\n        } else {\n          activeKey.push(key);\n        }\n      }\n\n      _this.setActiveKey(activeKey);\n    };\n\n    _this.getNewChild = function (child, index) {\n      if (!child) return null;\n      var activeKey = _this.state.activeKey;\n      var _this$props = _this.props,\n          prefixCls = _this$props.prefixCls,\n          openMotion = _this$props.openMotion,\n          accordion = _this$props.accordion,\n          rootDestroyInactivePanel = _this$props.destroyInactivePanel,\n          expandIcon = _this$props.expandIcon,\n          collapsible = _this$props.collapsible; // If there is no key provide, use the panel order as default key\n\n      var key = child.key || String(index);\n      var _child$props = child.props,\n          header = _child$props.header,\n          headerClass = _child$props.headerClass,\n          destroyInactivePanel = _child$props.destroyInactivePanel,\n          childCollapsible = _child$props.collapsible;\n      var isActive = false;\n\n      if (accordion) {\n        isActive = activeKey[0] === key;\n      } else {\n        isActive = activeKey.indexOf(key) > -1;\n      }\n\n      var mergeCollapsible = childCollapsible !== null && childCollapsible !== void 0 ? childCollapsible : collapsible;\n      var props = {\n        key: key,\n        panelKey: key,\n        header: header,\n        headerClass: headerClass,\n        isActive: isActive,\n        prefixCls: prefixCls,\n        destroyInactivePanel: destroyInactivePanel !== null && destroyInactivePanel !== void 0 ? destroyInactivePanel : rootDestroyInactivePanel,\n        openMotion: openMotion,\n        accordion: accordion,\n        children: child.props.children,\n        onItemClick: mergeCollapsible === 'disabled' ? null : _this.onClickItem,\n        expandIcon: expandIcon,\n        collapsible: mergeCollapsible\n      }; // https://github.com/ant-design/ant-design/issues/20479\n\n      if (typeof child.type === 'string') {\n        return child;\n      }\n\n      return React.cloneElement(child, props);\n    };\n\n    _this.getItems = function () {\n      var children = _this.props.children;\n      return toArray(children).map(_this.getNewChild);\n    };\n\n    _this.setActiveKey = function (activeKey) {\n      if (!('activeKey' in _this.props)) {\n        _this.setState({\n          activeKey: activeKey\n        });\n      }\n\n      _this.props.onChange(_this.props.accordion ? activeKey[0] : activeKey);\n    };\n\n    var activeKey = props.activeKey,\n        defaultActiveKey = props.defaultActiveKey;\n    var currentActiveKey = defaultActiveKey;\n\n    if ('activeKey' in props) {\n      currentActiveKey = activeKey;\n    }\n\n    _this.state = {\n      activeKey: getActiveKeysArray(currentActiveKey)\n    };\n    return _this;\n  }\n\n  _createClass(Collapse, [{\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps, nextState) {\n      return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _classNames;\n\n      var _this$props2 = this.props,\n          prefixCls = _this$props2.prefixCls,\n          className = _this$props2.className,\n          style = _this$props2.style,\n          accordion = _this$props2.accordion;\n      var collapseClassName = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, className, !!className), _classNames));\n      return React.createElement(\"div\", {\n        className: collapseClassName,\n        style: style,\n        role: accordion ? 'tablist' : null\n      }, this.getItems());\n    }\n  }], [{\n    key: \"getDerivedStateFromProps\",\n    value: function getDerivedStateFromProps(nextProps) {\n      var newState = {};\n\n      if ('activeKey' in nextProps) {\n        newState.activeKey = getActiveKeysArray(nextProps.activeKey);\n      }\n\n      return newState;\n    }\n  }]);\n\n  return Collapse;\n}(React.Component);\n\nCollapse.defaultProps = {\n  prefixCls: 'rc-collapse',\n  onChange: function onChange() {},\n  accordion: false,\n  destroyInactivePanel: false\n};\nCollapse.Panel = CollapsePanel;\nexport default Collapse;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-collapse/es/Collapse.js"],"names":["_defineProperty","_toConsumableArray","_classCallCheck","_createClass","_inherits","_createSuper","React","classNames","shallowEqual","toArray","CollapsePanel","getActiveKeysArray","activeKey","currentActiveKey","Array","isArray","map","key","String","Collapse","_React$Component","_super","props","_this","call","onClickItem","state","accordion","index","indexOf","isActive","splice","push","setActiveKey","getNewChild","child","_this$props","prefixCls","openMotion","rootDestroyInactivePanel","destroyInactivePanel","expandIcon","collapsible","_child$props","header","headerClass","childCollapsible","mergeCollapsible","panelKey","children","onItemClick","type","cloneElement","getItems","setState","onChange","defaultActiveKey","value","shouldComponentUpdate","nextProps","nextState","render","_classNames","_this$props2","className","style","collapseClassName","createElement","role","getDerivedStateFromProps","newState","Component","defaultProps","Panel"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,2CAA5B;AACA,OAAOC,kBAAP,MAA+B,8CAA/B;AACA,OAAOC,eAAP,MAA4B,2CAA5B;AACA,OAAOC,YAAP,MAAyB,wCAA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AAwB;AACtBnC,EAAAA,SAAS,EAAE,aADW;AAEtBkB,EAAAA,QAAQ,EAAE,SAASA,QAAT,GAAoB,CAAE,CAFV;AAGtB5B,EAAAA,SAAS,EAAE,KAHW;AAItBa,EAAAA,oBAAoB,EAAE;AAJA,CAAxB;AAMArB,QAAQ,CAACsD,KAAT,GAAiB/D,aAAjB;AACA,eAAeS,QAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\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-disable react/prop-types */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport shallowEqual from 'shallowequal';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport CollapsePanel from './Panel';\n\nfunction getActiveKeysArray(activeKey) {\n  var currentActiveKey = activeKey;\n\n  if (!Array.isArray(currentActiveKey)) {\n    currentActiveKey = currentActiveKey ? [currentActiveKey] : [];\n  }\n\n  return currentActiveKey.map(function (key) {\n    return String(key);\n  });\n}\n\nvar Collapse = /*#__PURE__*/function (_React$Component) {\n  _inherits(Collapse, _React$Component);\n\n  var _super = _createSuper(Collapse);\n\n  function Collapse(props) {\n    var _this;\n\n    _classCallCheck(this, Collapse);\n\n    _this = _super.call(this, props);\n\n    _this.onClickItem = function (key) {\n      var activeKey = _this.state.activeKey;\n\n      if (_this.props.accordion) {\n        activeKey = activeKey[0] === key ? [] : [key];\n      } else {\n        activeKey = _toConsumableArray(activeKey);\n        var index = activeKey.indexOf(key);\n        var isActive = index > -1;\n\n        if (isActive) {\n          // remove active state\n          activeKey.splice(index, 1);\n        } else {\n          activeKey.push(key);\n        }\n      }\n\n      _this.setActiveKey(activeKey);\n    };\n\n    _this.getNewChild = function (child, index) {\n      if (!child) return null;\n      var activeKey = _this.state.activeKey;\n      var _this$props = _this.props,\n          prefixCls = _this$props.prefixCls,\n          openMotion = _this$props.openMotion,\n          accordion = _this$props.accordion,\n          rootDestroyInactivePanel = _this$props.destroyInactivePanel,\n          expandIcon = _this$props.expandIcon,\n          collapsible = _this$props.collapsible; // If there is no key provide, use the panel order as default key\n\n      var key = child.key || String(index);\n      var _child$props = child.props,\n          header = _child$props.header,\n          headerClass = _child$props.headerClass,\n          destroyInactivePanel = _child$props.destroyInactivePanel,\n          childCollapsible = _child$props.collapsible;\n      var isActive = false;\n\n      if (accordion) {\n        isActive = activeKey[0] === key;\n      } else {\n        isActive = activeKey.indexOf(key) > -1;\n      }\n\n      var mergeCollapsible = childCollapsible !== null && childCollapsible !== void 0 ? childCollapsible : collapsible;\n      var props = {\n        key: key,\n        panelKey: key,\n        header: header,\n        headerClass: headerClass,\n        isActive: isActive,\n        prefixCls: prefixCls,\n        destroyInactivePanel: destroyInactivePanel !== null && destroyInactivePanel !== void 0 ? destroyInactivePanel : rootDestroyInactivePanel,\n        openMotion: openMotion,\n        accordion: accordion,\n        children: child.props.children,\n        onItemClick: mergeCollapsible === 'disabled' ? null : _this.onClickItem,\n        expandIcon: expandIcon,\n        collapsible: mergeCollapsible\n      }; // https://github.com/ant-design/ant-design/issues/20479\n\n      if (typeof child.type === 'string') {\n        return child;\n      }\n\n      return React.cloneElement(child, props);\n    };\n\n    _this.getItems = function () {\n      var children = _this.props.children;\n      return toArray(children).map(_this.getNewChild);\n    };\n\n    _this.setActiveKey = function (activeKey) {\n      if (!('activeKey' in _this.props)) {\n        _this.setState({\n          activeKey: activeKey\n        });\n      }\n\n      _this.props.onChange(_this.props.accordion ? activeKey[0] : activeKey);\n    };\n\n    var activeKey = props.activeKey,\n        defaultActiveKey = props.defaultActiveKey;\n    var currentActiveKey = defaultActiveKey;\n\n    if ('activeKey' in props) {\n      currentActiveKey = activeKey;\n    }\n\n    _this.state = {\n      activeKey: getActiveKeysArray(currentActiveKey)\n    };\n    return _this;\n  }\n\n  _createClass(Collapse, [{\n    key: \"shouldComponentUpdate\",\n    value: function shouldComponentUpdate(nextProps, nextState) {\n      return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _classNames;\n\n      var _this$props2 = this.props,\n          prefixCls = _this$props2.prefixCls,\n          className = _this$props2.className,\n          style = _this$props2.style,\n          accordion = _this$props2.accordion;\n      var collapseClassName = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, className, !!className), _classNames));\n      return React.createElement(\"div\", {\n        className: collapseClassName,\n        style: style,\n        role: accordion ? 'tablist' : null\n      }, this.getItems());\n    }\n  }], [{\n    key: \"getDerivedStateFromProps\",\n    value: function getDerivedStateFromProps(nextProps) {\n      var newState = {};\n\n      if ('activeKey' in nextProps) {\n        newState.activeKey = getActiveKeysArray(nextProps.activeKey);\n      }\n\n      return newState;\n    }\n  }]);\n\n  return Collapse;\n}(React.Component);\n\nCollapse.defaultProps = {\n  prefixCls: 'rc-collapse',\n  onChange: function onChange() {},\n  accordion: false,\n  destroyInactivePanel: false\n};\nCollapse.Panel = CollapsePanel;\nexport default Collapse;"]},"metadata":{},"sourceType":"module"}