869f82a8eaf51a944517927cc53e0a9e.json
15.2 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\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 RcPagination from 'rc-pagination';\nimport enUS from \"rc-pagination/es/locale/en_US\";\nimport classNames from 'classnames';\nimport LeftOutlined from '@ant-design/icons/LeftOutlined';\nimport RightOutlined from '@ant-design/icons/RightOutlined';\nimport DoubleLeftOutlined from '@ant-design/icons/DoubleLeftOutlined';\nimport DoubleRightOutlined from '@ant-design/icons/DoubleRightOutlined';\nimport MiniSelect from './MiniSelect';\nimport Select from '../select';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport { ConfigContext } from '../config-provider';\nimport useBreakpoint from '../grid/hooks/useBreakpoint';\n\nvar Pagination = function Pagination(_a) {\n var customizePrefixCls = _a.prefixCls,\n customizeSelectPrefixCls = _a.selectPrefixCls,\n className = _a.className,\n size = _a.size,\n customLocale = _a.locale,\n restProps = __rest(_a, [\"prefixCls\", \"selectPrefixCls\", \"className\", \"size\", \"locale\"]);\n\n var _useBreakpoint = useBreakpoint(),\n xs = _useBreakpoint.xs;\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var prefixCls = getPrefixCls('pagination', customizePrefixCls);\n\n var getIconsProps = function getIconsProps() {\n var ellipsis = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-item-ellipsis\")\n }, \"\\u2022\\u2022\\u2022\");\n var prevIcon = /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-item-link\"),\n type: \"button\",\n tabIndex: -1\n }, /*#__PURE__*/React.createElement(LeftOutlined, null));\n var nextIcon = /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-item-link\"),\n type: \"button\",\n tabIndex: -1\n }, /*#__PURE__*/React.createElement(RightOutlined, null));\n var jumpPrevIcon = /*#__PURE__*/React.createElement(\"a\", {\n className: \"\".concat(prefixCls, \"-item-link\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-item-container\")\n }, /*#__PURE__*/React.createElement(DoubleLeftOutlined, {\n className: \"\".concat(prefixCls, \"-item-link-icon\")\n }), ellipsis));\n var jumpNextIcon = /*#__PURE__*/React.createElement(\"a\", {\n className: \"\".concat(prefixCls, \"-item-link\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-item-container\")\n }, /*#__PURE__*/React.createElement(DoubleRightOutlined, {\n className: \"\".concat(prefixCls, \"-item-link-icon\")\n }), ellipsis)); // change arrows direction in right-to-left direction\n\n if (direction === 'rtl') {\n var _ref = [nextIcon, prevIcon];\n prevIcon = _ref[0];\n nextIcon = _ref[1];\n var _ref2 = [jumpNextIcon, jumpPrevIcon];\n jumpPrevIcon = _ref2[0];\n jumpNextIcon = _ref2[1];\n }\n\n return {\n prevIcon: prevIcon,\n nextIcon: nextIcon,\n jumpPrevIcon: jumpPrevIcon,\n jumpNextIcon: jumpNextIcon\n };\n };\n\n var renderPagination = function renderPagination(contextLocale) {\n var locale = _extends(_extends({}, contextLocale), customLocale);\n\n var isSmall = size === 'small' || !!(xs && !size && restProps.responsive);\n var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);\n var extendedClassName = classNames(_defineProperty({\n mini: isSmall\n }, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), className);\n return /*#__PURE__*/React.createElement(RcPagination, _extends({}, restProps, {\n prefixCls: prefixCls,\n selectPrefixCls: selectPrefixCls\n }, getIconsProps(), {\n className: extendedClassName,\n selectComponentClass: isSmall ? MiniSelect : Select,\n locale: locale\n }));\n };\n\n return /*#__PURE__*/React.createElement(LocaleReceiver, {\n componentName: \"Pagination\",\n defaultLocale: enUS\n }, renderPagination);\n};\n\nexport default Pagination;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/pagination/Pagination.js"],"names":["_defineProperty","_extends","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","RcPagination","enUS","classNames","LeftOutlined","RightOutlined","DoubleLeftOutlined","DoubleRightOutlined","MiniSelect","Select","LocaleReceiver","ConfigContext","useBreakpoint","Pagination","_a","customizePrefixCls","prefixCls","customizeSelectPrefixCls","selectPrefixCls","className","size","customLocale","locale","restProps","_useBreakpoint","xs","_React$useContext","useContext","getPrefixCls","direction","getIconsProps","ellipsis","createElement","concat","prevIcon","type","tabIndex","nextIcon","jumpPrevIcon","jumpNextIcon","_ref","_ref2","renderPagination","contextLocale","isSmall","responsive","extendedClassName","mini","selectComponentClass","componentName","defaultLocale"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAOC,QAAP,MAAqB,gCAArB;;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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BAAoB,EAAEJ,OAAO,GAAGpC,UAAH,GAAgBC,MAF3B;AAGlBa,MAAAA,MAAM,EAAEA;AAHU,KAH0C,CAA1C,CAApB;AAQD,GAhBD;;AAkBA,SAAO,aAAatB,KAAK,CAACgC,aAAN,CAAoBtB,cAApB,EAAoC;AACtDuC,IAAAA,aAAa,EAAE,YADuC;AAEtDC,IAAAA,aAAa,EAAEhD;AAFuC,GAApC,EAGjBwC,gBAHiB,CAApB;AAID,CArFD;;AAuFA,eAAe7B,UAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\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 RcPagination from 'rc-pagination';\nimport enUS from \"rc-pagination/es/locale/en_US\";\nimport classNames from 'classnames';\nimport LeftOutlined from '@ant-design/icons/LeftOutlined';\nimport RightOutlined from '@ant-design/icons/RightOutlined';\nimport DoubleLeftOutlined from '@ant-design/icons/DoubleLeftOutlined';\nimport DoubleRightOutlined from '@ant-design/icons/DoubleRightOutlined';\nimport MiniSelect from './MiniSelect';\nimport Select from '../select';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport { ConfigContext } from '../config-provider';\nimport useBreakpoint from '../grid/hooks/useBreakpoint';\n\nvar Pagination = function Pagination(_a) {\n var customizePrefixCls = _a.prefixCls,\n customizeSelectPrefixCls = _a.selectPrefixCls,\n className = _a.className,\n size = _a.size,\n customLocale = _a.locale,\n restProps = __rest(_a, [\"prefixCls\", \"selectPrefixCls\", \"className\", \"size\", \"locale\"]);\n\n var _useBreakpoint = useBreakpoint(),\n xs = _useBreakpoint.xs;\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var prefixCls = getPrefixCls('pagination', customizePrefixCls);\n\n var getIconsProps = function getIconsProps() {\n var ellipsis = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-item-ellipsis\")\n }, \"\\u2022\\u2022\\u2022\");\n var prevIcon = /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-item-link\"),\n type: \"button\",\n tabIndex: -1\n }, /*#__PURE__*/React.createElement(LeftOutlined, null));\n var nextIcon = /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-item-link\"),\n type: \"button\",\n tabIndex: -1\n }, /*#__PURE__*/React.createElement(RightOutlined, null));\n var jumpPrevIcon = /*#__PURE__*/React.createElement(\"a\", {\n className: \"\".concat(prefixCls, \"-item-link\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-item-container\")\n }, /*#__PURE__*/React.createElement(DoubleLeftOutlined, {\n className: \"\".concat(prefixCls, \"-item-link-icon\")\n }), ellipsis));\n var jumpNextIcon = /*#__PURE__*/React.createElement(\"a\", {\n className: \"\".concat(prefixCls, \"-item-link\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-item-container\")\n }, /*#__PURE__*/React.createElement(DoubleRightOutlined, {\n className: \"\".concat(prefixCls, \"-item-link-icon\")\n }), ellipsis)); // change arrows direction in right-to-left direction\n\n if (direction === 'rtl') {\n var _ref = [nextIcon, prevIcon];\n prevIcon = _ref[0];\n nextIcon = _ref[1];\n var _ref2 = [jumpNextIcon, jumpPrevIcon];\n jumpPrevIcon = _ref2[0];\n jumpNextIcon = _ref2[1];\n }\n\n return {\n prevIcon: prevIcon,\n nextIcon: nextIcon,\n jumpPrevIcon: jumpPrevIcon,\n jumpNextIcon: jumpNextIcon\n };\n };\n\n var renderPagination = function renderPagination(contextLocale) {\n var locale = _extends(_extends({}, contextLocale), customLocale);\n\n var isSmall = size === 'small' || !!(xs && !size && restProps.responsive);\n var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);\n var extendedClassName = classNames(_defineProperty({\n mini: isSmall\n }, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), className);\n return /*#__PURE__*/React.createElement(RcPagination, _extends({}, restProps, {\n prefixCls: prefixCls,\n selectPrefixCls: selectPrefixCls\n }, getIconsProps(), {\n className: extendedClassName,\n selectComponentClass: isSmall ? MiniSelect : Select,\n locale: locale\n }));\n };\n\n return /*#__PURE__*/React.createElement(LocaleReceiver, {\n componentName: \"Pagination\",\n defaultLocale: enUS\n }, renderPagination);\n};\n\nexport default Pagination;"]},"metadata":{},"sourceType":"module"}