397e241227bb25bee8165f719be07290.json
10.1 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 RcTabs, { TabPane } from 'rc-tabs';\nimport classNames from 'classnames';\nimport EllipsisOutlined from '@ant-design/icons/EllipsisOutlined';\nimport PlusOutlined from '@ant-design/icons/PlusOutlined';\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport devWarning from '../_util/devWarning';\nimport { ConfigContext } from '../config-provider';\n\nfunction Tabs(_a) {\n var _classNames;\n\n var type = _a.type,\n className = _a.className,\n size = _a.size,\n _onEdit = _a.onEdit,\n hideAdd = _a.hideAdd,\n centered = _a.centered,\n addIcon = _a.addIcon,\n props = __rest(_a, [\"type\", \"className\", \"size\", \"onEdit\", \"hideAdd\", \"centered\", \"addIcon\"]);\n\n var customizePrefixCls = props.prefixCls;\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var prefixCls = getPrefixCls('tabs', customizePrefixCls);\n var editable;\n\n if (type === 'editable-card') {\n editable = {\n onEdit: function onEdit(editType, _ref) {\n var key = _ref.key,\n event = _ref.event;\n _onEdit === null || _onEdit === void 0 ? void 0 : _onEdit(editType === 'add' ? event : key, editType);\n },\n removeIcon: /*#__PURE__*/React.createElement(CloseOutlined, null),\n addIcon: addIcon || /*#__PURE__*/React.createElement(PlusOutlined, null),\n showAdd: hideAdd !== true\n };\n }\n\n devWarning(!('onPrevClick' in props) && !('onNextClick' in props), 'Tabs', '`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.');\n return /*#__PURE__*/React.createElement(RcTabs, _extends({\n direction: direction\n }, props, {\n moreTransitionName: \"slide-up\",\n className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(size), size), _defineProperty(_classNames, \"\".concat(prefixCls, \"-card\"), ['card', 'editable-card'].includes(type)), _defineProperty(_classNames, \"\".concat(prefixCls, \"-editable-card\"), type === 'editable-card'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-centered\"), centered), _classNames), className),\n editable: editable,\n moreIcon: /*#__PURE__*/React.createElement(EllipsisOutlined, null),\n prefixCls: prefixCls\n }));\n}\n\nTabs.TabPane = TabPane;\nexport default Tabs;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/tabs/index.js"],"names":["_extends","_defineProperty","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","RcTabs","TabPane","classNames","EllipsisOutlined","PlusOutlined","CloseOutlined","devWarning","ConfigContext","Tabs","_a","_classNames","type","className","size","_onEdit","onEdit","hideAdd","centered","addIcon","props","customizePrefixCls","prefixCls","_React$useContext","useContext","getPrefixCls","direction","editable","editType","_ref","key","event","removeIcon","createElement","showAdd","moreTransitionName","concat","includes","moreIcon"],"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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time/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 RcTabs, { TabPane } from 'rc-tabs';\nimport classNames from 'classnames';\nimport EllipsisOutlined from '@ant-design/icons/EllipsisOutlined';\nimport PlusOutlined from '@ant-design/icons/PlusOutlined';\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport devWarning from '../_util/devWarning';\nimport { ConfigContext } from '../config-provider';\n\nfunction Tabs(_a) {\n var _classNames;\n\n var type = _a.type,\n className = _a.className,\n size = _a.size,\n _onEdit = _a.onEdit,\n hideAdd = _a.hideAdd,\n centered = _a.centered,\n addIcon = _a.addIcon,\n props = __rest(_a, [\"type\", \"className\", \"size\", \"onEdit\", \"hideAdd\", \"centered\", \"addIcon\"]);\n\n var customizePrefixCls = props.prefixCls;\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var prefixCls = getPrefixCls('tabs', customizePrefixCls);\n var editable;\n\n if (type === 'editable-card') {\n editable = {\n onEdit: function onEdit(editType, _ref) {\n var key = _ref.key,\n event = _ref.event;\n _onEdit === null || _onEdit === void 0 ? void 0 : _onEdit(editType === 'add' ? event : key, editType);\n },\n removeIcon: /*#__PURE__*/React.createElement(CloseOutlined, null),\n addIcon: addIcon || /*#__PURE__*/React.createElement(PlusOutlined, null),\n showAdd: hideAdd !== true\n };\n }\n\n devWarning(!('onPrevClick' in props) && !('onNextClick' in props), 'Tabs', '`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.');\n return /*#__PURE__*/React.createElement(RcTabs, _extends({\n direction: direction\n }, props, {\n moreTransitionName: \"slide-up\",\n className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(size), size), _defineProperty(_classNames, \"\".concat(prefixCls, \"-card\"), ['card', 'editable-card'].includes(type)), _defineProperty(_classNames, \"\".concat(prefixCls, \"-editable-card\"), type === 'editable-card'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-centered\"), centered), _classNames), className),\n editable: editable,\n moreIcon: /*#__PURE__*/React.createElement(EllipsisOutlined, null),\n prefixCls: prefixCls\n }));\n}\n\nTabs.TabPane = TabPane;\nexport default Tabs;"]},"metadata":{},"sourceType":"module"}