You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1741 lines
65 KiB
1741 lines
65 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[83338],{
|
|
|
|
/***/ 96842:
|
|
/*!************************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules ***!
|
|
\************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ icons_DoubleRightOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js
|
|
// This icon file is generated automatically.
|
|
var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" };
|
|
/* harmony default export */ var asn_DoubleRightOutlined = (DoubleRightOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
var AntdIcon = __webpack_require__(74643);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var DoubleRightOutlined_DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_DoubleRightOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_DoubleRightOutlined = (/*#__PURE__*/react.forwardRef(DoubleRightOutlined_DoubleRightOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 57838:
|
|
/*!************************************************************!*\
|
|
!*** ./node_modules/antd/es/_util/hooks/useForceUpdate.js ***!
|
|
\************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "Z": function() { return /* binding */ useForceUpdate; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
|
function useForceUpdate() {
|
|
const [, forceUpdate] = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(x => x + 1, 0);
|
|
return forceUpdate;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 25378:
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/antd/es/grid/hooks/useBreakpoint.js ***!
|
|
\**********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var _util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../_util/hooks/useForceUpdate */ 57838);
|
|
/* harmony import */ var _util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_util/responsiveObserver */ 74443);
|
|
|
|
|
|
|
|
function useBreakpoint() {
|
|
let refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
const screensRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({});
|
|
const forceUpdate = (0,_util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)();
|
|
const responsiveObserver = (0,_util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)();
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
const token = responsiveObserver.subscribe(supportScreens => {
|
|
screensRef.current = supportScreens;
|
|
if (refreshOnChange) {
|
|
forceUpdate();
|
|
}
|
|
});
|
|
return () => responsiveObserver.unsubscribe(token);
|
|
}, []);
|
|
return screensRef.current;
|
|
}
|
|
/* harmony default export */ __webpack_exports__["Z"] = (useBreakpoint);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 83338:
|
|
/*!***************************************************************!*\
|
|
!*** ./node_modules/antd/es/pagination/index.js + 11 modules ***!
|
|
\***************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ pagination; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DoubleLeftOutlined.js
|
|
// This icon file is generated automatically.
|
|
var DoubleLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, "name": "double-left", "theme": "outlined" };
|
|
/* harmony default export */ var asn_DoubleLeftOutlined = (DoubleLeftOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
var AntdIcon = __webpack_require__(74643);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/DoubleLeftOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var DoubleLeftOutlined_DoubleLeftOutlined = function DoubleLeftOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_DoubleLeftOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_DoubleLeftOutlined = (/*#__PURE__*/react.forwardRef(DoubleLeftOutlined_DoubleLeftOutlined));
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js + 1 modules
|
|
var DoubleRightOutlined = __webpack_require__(96842);
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
|
|
var LeftOutlined = __webpack_require__(6171);
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
|
|
var RightOutlined = __webpack_require__(18073);
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(4942);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
var classCallCheck = __webpack_require__(15671);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
var createClass = __webpack_require__(43144);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
var inherits = __webpack_require__(60136);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
var createSuper = __webpack_require__(51630);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/node_modules/rc-util/es/pickAttrs.js
|
|
|
|
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
|
|
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
|
|
var propList = "".concat(attributes, " ").concat(eventsName).split(/[\s\n]+/);
|
|
|
|
/* eslint-enable max-len */
|
|
var ariaPrefix = 'aria-';
|
|
var dataPrefix = 'data-';
|
|
function match(key, prefix) {
|
|
return key.indexOf(prefix) === 0;
|
|
}
|
|
/**
|
|
* Picker props from exist props with filter
|
|
* @param props Passed props
|
|
* @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
|
|
*/
|
|
function pickAttrs(props) {
|
|
var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
var mergedConfig;
|
|
if (ariaOnly === false) {
|
|
mergedConfig = {
|
|
aria: true,
|
|
data: true,
|
|
attr: true
|
|
};
|
|
} else if (ariaOnly === true) {
|
|
mergedConfig = {
|
|
aria: true
|
|
};
|
|
} else {
|
|
mergedConfig = (0,objectSpread2/* default */.Z)({}, ariaOnly);
|
|
}
|
|
var attrs = {};
|
|
Object.keys(props).forEach(function (key) {
|
|
if (
|
|
// Aria
|
|
mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||
|
|
// Data
|
|
mergedConfig.data && match(key, dataPrefix) ||
|
|
// Attr
|
|
mergedConfig.attr && propList.includes(key)) {
|
|
attrs[key] = props[key];
|
|
}
|
|
});
|
|
return attrs;
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/KeyCode.js
|
|
var KeyCode = {
|
|
ZERO: 48,
|
|
NINE: 57,
|
|
NUMPAD_ZERO: 96,
|
|
NUMPAD_NINE: 105,
|
|
BACKSPACE: 8,
|
|
DELETE: 46,
|
|
ENTER: 13,
|
|
ARROW_UP: 38,
|
|
ARROW_DOWN: 40
|
|
};
|
|
/* harmony default export */ var es_KeyCode = (KeyCode);
|
|
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
|
|
var zh_CN = __webpack_require__(81626);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/Options.js
|
|
|
|
|
|
|
|
|
|
/* eslint react/prop-types: 0 */
|
|
|
|
|
|
var Options = /*#__PURE__*/function (_React$Component) {
|
|
(0,inherits/* default */.Z)(Options, _React$Component);
|
|
var _super = (0,createSuper/* default */.Z)(Options);
|
|
function Options() {
|
|
var _this;
|
|
(0,classCallCheck/* default */.Z)(this, Options);
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
_this.state = {
|
|
goInputText: ''
|
|
};
|
|
_this.getValidValue = function () {
|
|
var goInputText = _this.state.goInputText;
|
|
// eslint-disable-next-line no-restricted-globals
|
|
return !goInputText || Number.isNaN(goInputText) ? undefined : Number(goInputText);
|
|
};
|
|
_this.buildOptionText = function (value) {
|
|
return "".concat(value, " ").concat(_this.props.locale.items_per_page);
|
|
};
|
|
_this.changeSize = function (value) {
|
|
_this.props.changeSize(Number(value));
|
|
};
|
|
_this.handleChange = function (e) {
|
|
_this.setState({
|
|
goInputText: e.target.value
|
|
});
|
|
};
|
|
_this.handleBlur = function (e) {
|
|
var _this$props = _this.props,
|
|
goButton = _this$props.goButton,
|
|
quickGo = _this$props.quickGo,
|
|
rootPrefixCls = _this$props.rootPrefixCls;
|
|
var goInputText = _this.state.goInputText;
|
|
if (goButton || goInputText === '') {
|
|
return;
|
|
}
|
|
_this.setState({
|
|
goInputText: ''
|
|
});
|
|
if (e.relatedTarget && (e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-item-link")) >= 0 || e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-item")) >= 0)) {
|
|
return;
|
|
}
|
|
quickGo(_this.getValidValue());
|
|
};
|
|
_this.go = function (e) {
|
|
var goInputText = _this.state.goInputText;
|
|
if (goInputText === '') {
|
|
return;
|
|
}
|
|
if (e.keyCode === es_KeyCode.ENTER || e.type === 'click') {
|
|
_this.setState({
|
|
goInputText: ''
|
|
});
|
|
_this.props.quickGo(_this.getValidValue());
|
|
}
|
|
};
|
|
return _this;
|
|
}
|
|
(0,createClass/* default */.Z)(Options, [{
|
|
key: "getPageSizeOptions",
|
|
value: function getPageSizeOptions() {
|
|
var _this$props2 = this.props,
|
|
pageSize = _this$props2.pageSize,
|
|
pageSizeOptions = _this$props2.pageSizeOptions;
|
|
if (pageSizeOptions.some(function (option) {
|
|
return option.toString() === pageSize.toString();
|
|
})) {
|
|
return pageSizeOptions;
|
|
}
|
|
return pageSizeOptions.concat([pageSize.toString()]).sort(function (a, b) {
|
|
// eslint-disable-next-line no-restricted-globals
|
|
var numberA = Number.isNaN(Number(a)) ? 0 : Number(a);
|
|
// eslint-disable-next-line no-restricted-globals
|
|
var numberB = Number.isNaN(Number(b)) ? 0 : Number(b);
|
|
return numberA - numberB;
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
var _this$props3 = this.props,
|
|
pageSize = _this$props3.pageSize,
|
|
locale = _this$props3.locale,
|
|
rootPrefixCls = _this$props3.rootPrefixCls,
|
|
changeSize = _this$props3.changeSize,
|
|
quickGo = _this$props3.quickGo,
|
|
goButton = _this$props3.goButton,
|
|
selectComponentClass = _this$props3.selectComponentClass,
|
|
buildOptionText = _this$props3.buildOptionText,
|
|
selectPrefixCls = _this$props3.selectPrefixCls,
|
|
disabled = _this$props3.disabled;
|
|
var goInputText = this.state.goInputText;
|
|
var prefixCls = "".concat(rootPrefixCls, "-options");
|
|
var Select = selectComponentClass;
|
|
var changeSelect = null;
|
|
var goInput = null;
|
|
var gotoButton = null;
|
|
if (!changeSize && !quickGo) {
|
|
return null;
|
|
}
|
|
var pageSizeOptions = this.getPageSizeOptions();
|
|
if (changeSize && Select) {
|
|
var options = pageSizeOptions.map(function (opt, i) {
|
|
return /*#__PURE__*/react.createElement(Select.Option, {
|
|
key: i,
|
|
value: opt.toString()
|
|
}, (buildOptionText || _this2.buildOptionText)(opt));
|
|
});
|
|
changeSelect = /*#__PURE__*/react.createElement(Select, {
|
|
disabled: disabled,
|
|
prefixCls: selectPrefixCls,
|
|
showSearch: false,
|
|
className: "".concat(prefixCls, "-size-changer"),
|
|
optionLabelProp: "children",
|
|
popupMatchSelectWidth: false,
|
|
value: (pageSize || pageSizeOptions[0]).toString(),
|
|
onChange: this.changeSize,
|
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
return triggerNode.parentNode;
|
|
},
|
|
"aria-label": locale.page_size,
|
|
defaultOpen: false
|
|
}, options);
|
|
}
|
|
if (quickGo) {
|
|
if (goButton) {
|
|
gotoButton = typeof goButton === 'boolean' ? /*#__PURE__*/react.createElement("button", {
|
|
type: "button",
|
|
onClick: this.go,
|
|
onKeyUp: this.go,
|
|
disabled: disabled,
|
|
className: "".concat(prefixCls, "-quick-jumper-button")
|
|
}, locale.jump_to_confirm) : /*#__PURE__*/react.createElement("span", {
|
|
onClick: this.go,
|
|
onKeyUp: this.go
|
|
}, goButton);
|
|
}
|
|
goInput = /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-quick-jumper")
|
|
}, locale.jump_to, /*#__PURE__*/react.createElement("input", {
|
|
disabled: disabled,
|
|
type: "text",
|
|
value: goInputText,
|
|
onChange: this.handleChange,
|
|
onKeyUp: this.go,
|
|
onBlur: this.handleBlur,
|
|
"aria-label": locale.page
|
|
}), locale.page, gotoButton);
|
|
}
|
|
return /*#__PURE__*/react.createElement("li", {
|
|
className: "".concat(prefixCls)
|
|
}, changeSelect, goInput);
|
|
}
|
|
}]);
|
|
return Options;
|
|
}(react.Component);
|
|
Options.defaultProps = {
|
|
pageSizeOptions: ['10', '20', '50', '100']
|
|
};
|
|
/* harmony default export */ var es_Options = (Options);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pager.js
|
|
|
|
/* eslint react/prop-types: 0 */
|
|
|
|
|
|
var Pager = function Pager(props) {
|
|
var _classNames;
|
|
var rootPrefixCls = props.rootPrefixCls,
|
|
page = props.page,
|
|
active = props.active,
|
|
className = props.className,
|
|
showTitle = props.showTitle,
|
|
onClick = props.onClick,
|
|
onKeyPress = props.onKeyPress,
|
|
itemRender = props.itemRender;
|
|
var prefixCls = "".concat(rootPrefixCls, "-item");
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(page), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), !page), (0,defineProperty/* default */.Z)(_classNames, props.className, className), _classNames));
|
|
var handleClick = function handleClick() {
|
|
onClick(page);
|
|
};
|
|
var handleKeyPress = function handleKeyPress(e) {
|
|
onKeyPress(e, onClick, page);
|
|
};
|
|
return /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? page.toString() : null,
|
|
className: cls,
|
|
onClick: handleClick,
|
|
onKeyPress: handleKeyPress,
|
|
tabIndex: 0
|
|
}, itemRender(page, 'page', /*#__PURE__*/react.createElement("a", {
|
|
rel: "nofollow"
|
|
}, page)));
|
|
};
|
|
/* harmony default export */ var es_Pager = (Pager);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pagination.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function noop() {}
|
|
function isInteger(v) {
|
|
var value = Number(v);
|
|
return (
|
|
// eslint-disable-next-line no-restricted-globals
|
|
typeof value === 'number' && !Number.isNaN(value) && isFinite(value) && Math.floor(value) === value
|
|
);
|
|
}
|
|
var defaultItemRender = function defaultItemRender(page, type, element) {
|
|
return element;
|
|
};
|
|
function calculatePage(p, state, props) {
|
|
var pageSize = typeof p === 'undefined' ? state.pageSize : p;
|
|
return Math.floor((props.total - 1) / pageSize) + 1;
|
|
}
|
|
var Pagination = /*#__PURE__*/function (_React$Component) {
|
|
(0,inherits/* default */.Z)(Pagination, _React$Component);
|
|
var _super = (0,createSuper/* default */.Z)(Pagination);
|
|
function Pagination(props) {
|
|
var _this;
|
|
(0,classCallCheck/* default */.Z)(this, Pagination);
|
|
_this = _super.call(this, props);
|
|
_this.paginationNode = /*#__PURE__*/react.createRef();
|
|
_this.getJumpPrevPage = function () {
|
|
return Math.max(1, _this.state.current - (_this.props.showLessItems ? 3 : 5));
|
|
};
|
|
_this.getJumpNextPage = function () {
|
|
return Math.min(calculatePage(undefined, _this.state, _this.props), _this.state.current + (_this.props.showLessItems ? 3 : 5));
|
|
};
|
|
_this.getItemIcon = function (icon, label) {
|
|
var prefixCls = _this.props.prefixCls;
|
|
var iconNode = icon || /*#__PURE__*/react.createElement("button", {
|
|
type: "button",
|
|
"aria-label": label,
|
|
className: "".concat(prefixCls, "-item-link")
|
|
});
|
|
if (typeof icon === 'function') {
|
|
iconNode = /*#__PURE__*/react.createElement(icon, (0,objectSpread2/* default */.Z)({}, _this.props));
|
|
}
|
|
return iconNode;
|
|
};
|
|
_this.isValid = function (page) {
|
|
var total = _this.props.total;
|
|
return isInteger(page) && page !== _this.state.current && isInteger(total) && total > 0;
|
|
};
|
|
_this.shouldDisplayQuickJumper = function () {
|
|
var _this$props = _this.props,
|
|
showQuickJumper = _this$props.showQuickJumper,
|
|
total = _this$props.total;
|
|
var pageSize = _this.state.pageSize;
|
|
if (total <= pageSize) {
|
|
return false;
|
|
}
|
|
return showQuickJumper;
|
|
};
|
|
_this.handleKeyDown = function (e) {
|
|
if (e.keyCode === es_KeyCode.ARROW_UP || e.keyCode === es_KeyCode.ARROW_DOWN) {
|
|
e.preventDefault();
|
|
}
|
|
};
|
|
_this.handleKeyUp = function (e) {
|
|
var value = _this.getValidValue(e);
|
|
var currentInputValue = _this.state.currentInputValue;
|
|
if (value !== currentInputValue) {
|
|
_this.setState({
|
|
currentInputValue: value
|
|
});
|
|
}
|
|
if (e.keyCode === es_KeyCode.ENTER) {
|
|
_this.handleChange(value);
|
|
} else if (e.keyCode === es_KeyCode.ARROW_UP) {
|
|
_this.handleChange(value - 1);
|
|
} else if (e.keyCode === es_KeyCode.ARROW_DOWN) {
|
|
_this.handleChange(value + 1);
|
|
}
|
|
};
|
|
_this.handleBlur = function (e) {
|
|
var value = _this.getValidValue(e);
|
|
_this.handleChange(value);
|
|
};
|
|
_this.changePageSize = function (size) {
|
|
var current = _this.state.current;
|
|
var newCurrent = calculatePage(size, _this.state, _this.props);
|
|
current = current > newCurrent ? newCurrent : current;
|
|
// fix the issue:
|
|
// Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct.
|
|
if (newCurrent === 0) {
|
|
// eslint-disable-next-line prefer-destructuring
|
|
current = _this.state.current;
|
|
}
|
|
if (typeof size === 'number') {
|
|
if (!('pageSize' in _this.props)) {
|
|
_this.setState({
|
|
pageSize: size
|
|
});
|
|
}
|
|
if (!('current' in _this.props)) {
|
|
_this.setState({
|
|
current: current,
|
|
currentInputValue: current
|
|
});
|
|
}
|
|
}
|
|
_this.props.onShowSizeChange(current, size);
|
|
if ('onChange' in _this.props && _this.props.onChange) {
|
|
_this.props.onChange(current, size);
|
|
}
|
|
};
|
|
_this.handleChange = function (page) {
|
|
var _this$props2 = _this.props,
|
|
disabled = _this$props2.disabled,
|
|
onChange = _this$props2.onChange;
|
|
var _this$state = _this.state,
|
|
pageSize = _this$state.pageSize,
|
|
current = _this$state.current,
|
|
currentInputValue = _this$state.currentInputValue;
|
|
if (_this.isValid(page) && !disabled) {
|
|
var currentPage = calculatePage(undefined, _this.state, _this.props);
|
|
var newPage = page;
|
|
if (page > currentPage) {
|
|
newPage = currentPage;
|
|
} else if (page < 1) {
|
|
newPage = 1;
|
|
}
|
|
if (!('current' in _this.props)) {
|
|
_this.setState({
|
|
current: newPage
|
|
});
|
|
}
|
|
if (newPage !== currentInputValue) {
|
|
_this.setState({
|
|
currentInputValue: newPage
|
|
});
|
|
}
|
|
onChange(newPage, pageSize);
|
|
return newPage;
|
|
}
|
|
return current;
|
|
};
|
|
_this.prev = function () {
|
|
if (_this.hasPrev()) {
|
|
_this.handleChange(_this.state.current - 1);
|
|
}
|
|
};
|
|
_this.next = function () {
|
|
if (_this.hasNext()) {
|
|
_this.handleChange(_this.state.current + 1);
|
|
}
|
|
};
|
|
_this.jumpPrev = function () {
|
|
_this.handleChange(_this.getJumpPrevPage());
|
|
};
|
|
_this.jumpNext = function () {
|
|
_this.handleChange(_this.getJumpNextPage());
|
|
};
|
|
_this.hasPrev = function () {
|
|
return _this.state.current > 1;
|
|
};
|
|
_this.hasNext = function () {
|
|
return _this.state.current < calculatePage(undefined, _this.state, _this.props);
|
|
};
|
|
_this.runIfEnter = function (event, callback) {
|
|
if (event.key === 'Enter' || event.charCode === 13) {
|
|
for (var _len = arguments.length, restParams = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
restParams[_key - 2] = arguments[_key];
|
|
}
|
|
callback.apply(void 0, restParams);
|
|
}
|
|
};
|
|
_this.runIfEnterPrev = function (e) {
|
|
_this.runIfEnter(e, _this.prev);
|
|
};
|
|
_this.runIfEnterNext = function (e) {
|
|
_this.runIfEnter(e, _this.next);
|
|
};
|
|
_this.runIfEnterJumpPrev = function (e) {
|
|
_this.runIfEnter(e, _this.jumpPrev);
|
|
};
|
|
_this.runIfEnterJumpNext = function (e) {
|
|
_this.runIfEnter(e, _this.jumpNext);
|
|
};
|
|
_this.handleGoTO = function (e) {
|
|
if (e.keyCode === es_KeyCode.ENTER || e.type === 'click') {
|
|
_this.handleChange(_this.state.currentInputValue);
|
|
}
|
|
};
|
|
_this.renderPrev = function (prevPage) {
|
|
var _this$props3 = _this.props,
|
|
prevIcon = _this$props3.prevIcon,
|
|
itemRender = _this$props3.itemRender;
|
|
var prevButton = itemRender(prevPage, 'prev', _this.getItemIcon(prevIcon, 'prev page'));
|
|
var disabled = !_this.hasPrev();
|
|
return /*#__PURE__*/(0,react.isValidElement)(prevButton) ? /*#__PURE__*/(0,react.cloneElement)(prevButton, {
|
|
disabled: disabled
|
|
}) : prevButton;
|
|
};
|
|
_this.renderNext = function (nextPage) {
|
|
var _this$props4 = _this.props,
|
|
nextIcon = _this$props4.nextIcon,
|
|
itemRender = _this$props4.itemRender;
|
|
var nextButton = itemRender(nextPage, 'next', _this.getItemIcon(nextIcon, 'next page'));
|
|
var disabled = !_this.hasNext();
|
|
return /*#__PURE__*/(0,react.isValidElement)(nextButton) ? /*#__PURE__*/(0,react.cloneElement)(nextButton, {
|
|
disabled: disabled
|
|
}) : nextButton;
|
|
};
|
|
var hasOnChange = props.onChange !== noop;
|
|
var hasCurrent = ('current' in props);
|
|
if (hasCurrent && !hasOnChange) {
|
|
// eslint-disable-next-line no-console
|
|
console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.');
|
|
}
|
|
var _current = props.defaultCurrent;
|
|
if ('current' in props) {
|
|
// eslint-disable-next-line prefer-destructuring
|
|
_current = props.current;
|
|
}
|
|
var _pageSize = props.defaultPageSize;
|
|
if ('pageSize' in props) {
|
|
// eslint-disable-next-line prefer-destructuring
|
|
_pageSize = props.pageSize;
|
|
}
|
|
_current = Math.min(_current, calculatePage(_pageSize, undefined, props));
|
|
_this.state = {
|
|
current: _current,
|
|
currentInputValue: _current,
|
|
pageSize: _pageSize
|
|
};
|
|
return _this;
|
|
}
|
|
(0,createClass/* default */.Z)(Pagination, [{
|
|
key: "componentDidUpdate",
|
|
value: function componentDidUpdate(_, prevState) {
|
|
// When current page change, fix focused style of prev item
|
|
// A hacky solution of https://github.com/ant-design/ant-design/issues/8948
|
|
var prefixCls = this.props.prefixCls;
|
|
if (prevState.current !== this.state.current && this.paginationNode.current) {
|
|
var lastCurrentNode = this.paginationNode.current.querySelector(".".concat(prefixCls, "-item-").concat(prevState.current));
|
|
if (lastCurrentNode && document.activeElement === lastCurrentNode) {
|
|
var _lastCurrentNode$blur;
|
|
lastCurrentNode === null || lastCurrentNode === void 0 ? void 0 : (_lastCurrentNode$blur = lastCurrentNode.blur) === null || _lastCurrentNode$blur === void 0 ? void 0 : _lastCurrentNode$blur.call(lastCurrentNode);
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
key: "getValidValue",
|
|
value: function getValidValue(e) {
|
|
var inputValue = e.target.value;
|
|
var allPages = calculatePage(undefined, this.state, this.props);
|
|
var currentInputValue = this.state.currentInputValue;
|
|
var value;
|
|
if (inputValue === '') {
|
|
value = inputValue;
|
|
// eslint-disable-next-line no-restricted-globals
|
|
} else if (Number.isNaN(Number(inputValue))) {
|
|
value = currentInputValue;
|
|
} else if (inputValue >= allPages) {
|
|
value = allPages;
|
|
} else {
|
|
value = Number(inputValue);
|
|
}
|
|
return value;
|
|
}
|
|
}, {
|
|
key: "getShowSizeChanger",
|
|
value: function getShowSizeChanger() {
|
|
var _this$props5 = this.props,
|
|
showSizeChanger = _this$props5.showSizeChanger,
|
|
total = _this$props5.total,
|
|
totalBoundaryShowSizeChanger = _this$props5.totalBoundaryShowSizeChanger;
|
|
if (typeof showSizeChanger !== 'undefined') {
|
|
return showSizeChanger;
|
|
}
|
|
return total > totalBoundaryShowSizeChanger;
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props6 = this.props,
|
|
prefixCls = _this$props6.prefixCls,
|
|
className = _this$props6.className,
|
|
style = _this$props6.style,
|
|
disabled = _this$props6.disabled,
|
|
hideOnSinglePage = _this$props6.hideOnSinglePage,
|
|
total = _this$props6.total,
|
|
locale = _this$props6.locale,
|
|
showQuickJumper = _this$props6.showQuickJumper,
|
|
showLessItems = _this$props6.showLessItems,
|
|
showTitle = _this$props6.showTitle,
|
|
showTotal = _this$props6.showTotal,
|
|
simple = _this$props6.simple,
|
|
itemRender = _this$props6.itemRender,
|
|
showPrevNextJumpers = _this$props6.showPrevNextJumpers,
|
|
jumpPrevIcon = _this$props6.jumpPrevIcon,
|
|
jumpNextIcon = _this$props6.jumpNextIcon,
|
|
selectComponentClass = _this$props6.selectComponentClass,
|
|
selectPrefixCls = _this$props6.selectPrefixCls,
|
|
pageSizeOptions = _this$props6.pageSizeOptions;
|
|
var _this$state2 = this.state,
|
|
current = _this$state2.current,
|
|
pageSize = _this$state2.pageSize,
|
|
currentInputValue = _this$state2.currentInputValue;
|
|
// When hideOnSinglePage is true and there is only 1 page, hide the pager
|
|
if (hideOnSinglePage === true && total <= pageSize) {
|
|
return null;
|
|
}
|
|
var allPages = calculatePage(undefined, this.state, this.props);
|
|
var pagerList = [];
|
|
var jumpPrev = null;
|
|
var jumpNext = null;
|
|
var firstPager = null;
|
|
var lastPager = null;
|
|
var gotoButton = null;
|
|
var goButton = showQuickJumper && showQuickJumper.goButton;
|
|
var pageBufferSize = showLessItems ? 1 : 2;
|
|
var prevPage = current - 1 > 0 ? current - 1 : 0;
|
|
var nextPage = current + 1 < allPages ? current + 1 : allPages;
|
|
var dataOrAriaAttributeProps = pickAttrs(this.props, {
|
|
aria: true,
|
|
data: true
|
|
});
|
|
var totalText = showTotal && /*#__PURE__*/react.createElement("li", {
|
|
className: "".concat(prefixCls, "-total-text")
|
|
}, showTotal(total, [total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > total ? total : current * pageSize]));
|
|
if (simple) {
|
|
if (goButton) {
|
|
if (typeof goButton === 'boolean') {
|
|
gotoButton = /*#__PURE__*/react.createElement("button", {
|
|
type: "button",
|
|
onClick: this.handleGoTO,
|
|
onKeyUp: this.handleGoTO
|
|
}, locale.jump_to_confirm);
|
|
} else {
|
|
gotoButton = /*#__PURE__*/react.createElement("span", {
|
|
onClick: this.handleGoTO,
|
|
onKeyUp: this.handleGoTO
|
|
}, goButton);
|
|
}
|
|
gotoButton = /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? "".concat(locale.jump_to).concat(current, "/").concat(allPages) : null,
|
|
className: "".concat(prefixCls, "-simple-pager")
|
|
}, gotoButton);
|
|
}
|
|
return /*#__PURE__*/react.createElement("ul", (0,esm_extends/* default */.Z)({
|
|
className: classnames_default()(prefixCls, "".concat(prefixCls, "-simple"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-disabled"), disabled), className),
|
|
style: style,
|
|
ref: this.paginationNode
|
|
}, dataOrAriaAttributeProps), totalText, /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? locale.prev_page : null,
|
|
onClick: this.prev,
|
|
tabIndex: this.hasPrev() ? 0 : null,
|
|
onKeyPress: this.runIfEnterPrev,
|
|
className: classnames_default()("".concat(prefixCls, "-prev"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-disabled"), !this.hasPrev())),
|
|
"aria-disabled": !this.hasPrev()
|
|
}, this.renderPrev(prevPage)), /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? "".concat(current, "/").concat(allPages) : null,
|
|
className: "".concat(prefixCls, "-simple-pager")
|
|
}, /*#__PURE__*/react.createElement("input", {
|
|
type: "text",
|
|
value: currentInputValue,
|
|
disabled: disabled,
|
|
onKeyDown: this.handleKeyDown,
|
|
onKeyUp: this.handleKeyUp,
|
|
onChange: this.handleKeyUp,
|
|
onBlur: this.handleBlur,
|
|
size: 3
|
|
}), /*#__PURE__*/react.createElement("span", {
|
|
className: "".concat(prefixCls, "-slash")
|
|
}, "/"), allPages), /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? locale.next_page : null,
|
|
onClick: this.next,
|
|
tabIndex: this.hasPrev() ? 0 : null,
|
|
onKeyPress: this.runIfEnterNext,
|
|
className: classnames_default()("".concat(prefixCls, "-next"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-disabled"), !this.hasNext())),
|
|
"aria-disabled": !this.hasNext()
|
|
}, this.renderNext(nextPage)), gotoButton);
|
|
}
|
|
if (allPages <= 3 + pageBufferSize * 2) {
|
|
var pagerProps = {
|
|
locale: locale,
|
|
rootPrefixCls: prefixCls,
|
|
onClick: this.handleChange,
|
|
onKeyPress: this.runIfEnter,
|
|
showTitle: showTitle,
|
|
itemRender: itemRender
|
|
};
|
|
if (!allPages) {
|
|
pagerList.push( /*#__PURE__*/react.createElement(es_Pager, (0,esm_extends/* default */.Z)({}, pagerProps, {
|
|
key: "noPager",
|
|
page: 1,
|
|
className: "".concat(prefixCls, "-item-disabled")
|
|
})));
|
|
}
|
|
for (var i = 1; i <= allPages; i += 1) {
|
|
var active = current === i;
|
|
pagerList.push( /*#__PURE__*/react.createElement(es_Pager, (0,esm_extends/* default */.Z)({}, pagerProps, {
|
|
key: i,
|
|
page: i,
|
|
active: active
|
|
})));
|
|
}
|
|
} else {
|
|
var prevItemTitle = showLessItems ? locale.prev_3 : locale.prev_5;
|
|
var nextItemTitle = showLessItems ? locale.next_3 : locale.next_5;
|
|
if (showPrevNextJumpers) {
|
|
jumpPrev = /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? prevItemTitle : null,
|
|
key: "prev",
|
|
onClick: this.jumpPrev,
|
|
tabIndex: 0,
|
|
onKeyPress: this.runIfEnterJumpPrev,
|
|
className: classnames_default()("".concat(prefixCls, "-jump-prev"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-jump-prev-custom-icon"), !!jumpPrevIcon))
|
|
}, itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(jumpPrevIcon, 'prev page')));
|
|
jumpNext = /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? nextItemTitle : null,
|
|
key: "next",
|
|
tabIndex: 0,
|
|
onClick: this.jumpNext,
|
|
onKeyPress: this.runIfEnterJumpNext,
|
|
className: classnames_default()("".concat(prefixCls, "-jump-next"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-jump-next-custom-icon"), !!jumpNextIcon))
|
|
}, itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(jumpNextIcon, 'next page')));
|
|
}
|
|
lastPager = /*#__PURE__*/react.createElement(es_Pager, {
|
|
locale: locale,
|
|
last: true,
|
|
rootPrefixCls: prefixCls,
|
|
onClick: this.handleChange,
|
|
onKeyPress: this.runIfEnter,
|
|
key: allPages,
|
|
page: allPages,
|
|
active: false,
|
|
showTitle: showTitle,
|
|
itemRender: itemRender
|
|
});
|
|
firstPager = /*#__PURE__*/react.createElement(es_Pager, {
|
|
locale: locale,
|
|
rootPrefixCls: prefixCls,
|
|
onClick: this.handleChange,
|
|
onKeyPress: this.runIfEnter,
|
|
key: 1,
|
|
page: 1,
|
|
active: false,
|
|
showTitle: showTitle,
|
|
itemRender: itemRender
|
|
});
|
|
var left = Math.max(1, current - pageBufferSize);
|
|
var right = Math.min(current + pageBufferSize, allPages);
|
|
if (current - 1 <= pageBufferSize) {
|
|
right = 1 + pageBufferSize * 2;
|
|
}
|
|
if (allPages - current <= pageBufferSize) {
|
|
left = allPages - pageBufferSize * 2;
|
|
}
|
|
for (var _i = left; _i <= right; _i += 1) {
|
|
var _active = current === _i;
|
|
pagerList.push( /*#__PURE__*/react.createElement(es_Pager, {
|
|
locale: locale,
|
|
rootPrefixCls: prefixCls,
|
|
onClick: this.handleChange,
|
|
onKeyPress: this.runIfEnter,
|
|
key: _i,
|
|
page: _i,
|
|
active: _active,
|
|
showTitle: showTitle,
|
|
itemRender: itemRender
|
|
}));
|
|
}
|
|
if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) {
|
|
pagerList[0] = /*#__PURE__*/(0,react.cloneElement)(pagerList[0], {
|
|
className: "".concat(prefixCls, "-item-after-jump-prev")
|
|
});
|
|
pagerList.unshift(jumpPrev);
|
|
}
|
|
if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
|
|
pagerList[pagerList.length - 1] = /*#__PURE__*/(0,react.cloneElement)(pagerList[pagerList.length - 1], {
|
|
className: "".concat(prefixCls, "-item-before-jump-next")
|
|
});
|
|
pagerList.push(jumpNext);
|
|
}
|
|
if (left !== 1) {
|
|
pagerList.unshift(firstPager);
|
|
}
|
|
if (right !== allPages) {
|
|
pagerList.push(lastPager);
|
|
}
|
|
}
|
|
var prevDisabled = !this.hasPrev() || !allPages;
|
|
var nextDisabled = !this.hasNext() || !allPages;
|
|
return /*#__PURE__*/react.createElement("ul", (0,esm_extends/* default */.Z)({
|
|
className: classnames_default()(prefixCls, className, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-disabled"), disabled)),
|
|
style: style,
|
|
ref: this.paginationNode
|
|
}, dataOrAriaAttributeProps), totalText, /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? locale.prev_page : null,
|
|
onClick: this.prev,
|
|
tabIndex: prevDisabled ? null : 0,
|
|
onKeyPress: this.runIfEnterPrev,
|
|
className: classnames_default()("".concat(prefixCls, "-prev"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-disabled"), prevDisabled)),
|
|
"aria-disabled": prevDisabled
|
|
}, this.renderPrev(prevPage)), pagerList, /*#__PURE__*/react.createElement("li", {
|
|
title: showTitle ? locale.next_page : null,
|
|
onClick: this.next,
|
|
tabIndex: nextDisabled ? null : 0,
|
|
onKeyPress: this.runIfEnterNext,
|
|
className: classnames_default()("".concat(prefixCls, "-next"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-disabled"), nextDisabled)),
|
|
"aria-disabled": nextDisabled
|
|
}, this.renderNext(nextPage)), /*#__PURE__*/react.createElement(es_Options, {
|
|
disabled: disabled,
|
|
locale: locale,
|
|
rootPrefixCls: prefixCls,
|
|
selectComponentClass: selectComponentClass,
|
|
selectPrefixCls: selectPrefixCls,
|
|
changeSize: this.getShowSizeChanger() ? this.changePageSize : null,
|
|
current: current,
|
|
pageSize: pageSize,
|
|
pageSizeOptions: pageSizeOptions,
|
|
quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
|
|
goButton: goButton
|
|
}));
|
|
}
|
|
}], [{
|
|
key: "getDerivedStateFromProps",
|
|
value: function getDerivedStateFromProps(props, prevState) {
|
|
var newState = {};
|
|
if ('current' in props) {
|
|
newState.current = props.current;
|
|
if (props.current !== prevState.current) {
|
|
newState.currentInputValue = newState.current;
|
|
}
|
|
}
|
|
if ('pageSize' in props && props.pageSize !== prevState.pageSize) {
|
|
var current = prevState.current;
|
|
var newCurrent = calculatePage(props.pageSize, prevState, props);
|
|
current = current > newCurrent ? newCurrent : current;
|
|
if (!('current' in props)) {
|
|
newState.current = current;
|
|
newState.currentInputValue = current;
|
|
}
|
|
newState.pageSize = props.pageSize;
|
|
}
|
|
return newState;
|
|
}
|
|
}]);
|
|
return Pagination;
|
|
}(react.Component);
|
|
Pagination.defaultProps = {
|
|
defaultCurrent: 1,
|
|
total: 0,
|
|
defaultPageSize: 10,
|
|
onChange: noop,
|
|
className: '',
|
|
selectPrefixCls: 'rc-select',
|
|
prefixCls: 'rc-pagination',
|
|
selectComponentClass: null,
|
|
hideOnSinglePage: false,
|
|
showPrevNextJumpers: true,
|
|
showQuickJumper: false,
|
|
showLessItems: false,
|
|
showTitle: true,
|
|
onShowSizeChange: noop,
|
|
locale: zh_CN/* default */.Z,
|
|
style: {},
|
|
itemRender: defaultItemRender,
|
|
totalBoundaryShowSizeChanger: 50
|
|
};
|
|
/* harmony default export */ var es_Pagination = (Pagination);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/index.js
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/en_US.js
|
|
var en_US = __webpack_require__(62906);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
var context = __webpack_require__(53124);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
|
|
var useSize = __webpack_require__(98675);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/grid/hooks/useBreakpoint.js
|
|
var useBreakpoint = __webpack_require__(25378);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/locale/useLocale.js
|
|
var useLocale = __webpack_require__(10110);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js + 42 modules
|
|
var es_select = __webpack_require__(79035);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/Select.js
|
|
|
|
|
|
const MiniSelect = props => /*#__PURE__*/react.createElement(es_select/* default */.Z, Object.assign({}, props, {
|
|
showSearch: true,
|
|
size: "small"
|
|
}));
|
|
const MiddleSelect = props => /*#__PURE__*/react.createElement(es_select/* default */.Z, Object.assign({}, props, {
|
|
showSearch: true,
|
|
size: "middle"
|
|
}));
|
|
MiniSelect.Option = es_select/* default.Option */.Z.Option;
|
|
MiddleSelect.Option = es_select/* default.Option */.Z.Option;
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
|
|
var style = __webpack_require__(47673);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
var es_style = __webpack_require__(14747);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(45503);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/style/index.js
|
|
|
|
|
|
|
|
const genPaginationDisabledStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-disabled`]: {
|
|
'&, &:hover': {
|
|
cursor: 'not-allowed',
|
|
[`${componentCls}-item-link`]: {
|
|
color: token.colorTextDisabled,
|
|
cursor: 'not-allowed'
|
|
}
|
|
},
|
|
'&:focus-visible': {
|
|
cursor: 'not-allowed',
|
|
[`${componentCls}-item-link`]: {
|
|
color: token.colorTextDisabled,
|
|
cursor: 'not-allowed'
|
|
}
|
|
}
|
|
},
|
|
[`&${componentCls}-disabled`]: {
|
|
cursor: 'not-allowed',
|
|
[`&${componentCls}-mini`]: {
|
|
[`
|
|
&:hover ${componentCls}-item:not(${componentCls}-item-active),
|
|
&:active ${componentCls}-item:not(${componentCls}-item-active),
|
|
&:hover ${componentCls}-item-link,
|
|
&:active ${componentCls}-item-link
|
|
`]: {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
},
|
|
[`${componentCls}-item`]: {
|
|
cursor: 'not-allowed',
|
|
'&:hover, &:active': {
|
|
backgroundColor: 'transparent'
|
|
},
|
|
a: {
|
|
color: token.colorTextDisabled,
|
|
backgroundColor: 'transparent',
|
|
border: 'none',
|
|
cursor: 'not-allowed'
|
|
},
|
|
'&-active': {
|
|
borderColor: token.colorBorder,
|
|
backgroundColor: token.itemActiveBgDisabled,
|
|
'&:hover, &:active': {
|
|
backgroundColor: token.itemActiveBgDisabled
|
|
},
|
|
a: {
|
|
color: token.itemActiveColorDisabled
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-item-link`]: {
|
|
color: token.colorTextDisabled,
|
|
cursor: 'not-allowed',
|
|
'&:hover, &:active': {
|
|
backgroundColor: 'transparent'
|
|
},
|
|
[`${componentCls}-simple&`]: {
|
|
backgroundColor: 'transparent',
|
|
'&:hover, &:active': {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-simple-pager`]: {
|
|
color: token.colorTextDisabled
|
|
},
|
|
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
|
|
[`${componentCls}-item-link-icon`]: {
|
|
opacity: 0
|
|
},
|
|
[`${componentCls}-item-ellipsis`]: {
|
|
opacity: 1
|
|
}
|
|
}
|
|
},
|
|
[`&${componentCls}-simple`]: {
|
|
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
[`&${componentCls}-disabled ${componentCls}-item-link`]: {
|
|
'&:hover, &:active': {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genPaginationMiniStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[`&${componentCls}-mini ${componentCls}-total-text, &${componentCls}-mini ${componentCls}-simple-pager`]: {
|
|
height: token.itemSizeSM,
|
|
lineHeight: `${token.itemSizeSM}px`
|
|
},
|
|
[`&${componentCls}-mini ${componentCls}-item`]: {
|
|
minWidth: token.itemSizeSM,
|
|
height: token.itemSizeSM,
|
|
margin: 0,
|
|
lineHeight: `${token.itemSizeSM - 2}px`
|
|
},
|
|
[`&${componentCls}-mini ${componentCls}-item:not(${componentCls}-item-active)`]: {
|
|
backgroundColor: 'transparent',
|
|
borderColor: 'transparent',
|
|
'&:hover': {
|
|
backgroundColor: token.colorBgTextHover
|
|
},
|
|
'&:active': {
|
|
backgroundColor: token.colorBgTextActive
|
|
}
|
|
},
|
|
[`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: {
|
|
minWidth: token.itemSizeSM,
|
|
height: token.itemSizeSM,
|
|
margin: 0,
|
|
lineHeight: `${token.itemSizeSM}px`,
|
|
[`&:hover ${componentCls}-item-link`]: {
|
|
backgroundColor: token.colorBgTextHover
|
|
},
|
|
[`&:active ${componentCls}-item-link`]: {
|
|
backgroundColor: token.colorBgTextActive
|
|
},
|
|
[`&${componentCls}-disabled:hover ${componentCls}-item-link`]: {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
},
|
|
[`
|
|
&${componentCls}-mini ${componentCls}-prev ${componentCls}-item-link,
|
|
&${componentCls}-mini ${componentCls}-next ${componentCls}-item-link
|
|
`]: {
|
|
backgroundColor: 'transparent',
|
|
borderColor: 'transparent',
|
|
'&::after': {
|
|
height: token.itemSizeSM,
|
|
lineHeight: `${token.itemSizeSM}px`
|
|
}
|
|
},
|
|
[`&${componentCls}-mini ${componentCls}-jump-prev, &${componentCls}-mini ${componentCls}-jump-next`]: {
|
|
height: token.itemSizeSM,
|
|
marginInlineEnd: 0,
|
|
lineHeight: `${token.itemSizeSM}px`
|
|
},
|
|
[`&${componentCls}-mini ${componentCls}-options`]: {
|
|
marginInlineStart: token.paginationMiniOptionsMarginInlineStart,
|
|
[`&-size-changer`]: {
|
|
top: token.miniOptionsSizeChangerTop
|
|
},
|
|
[`&-quick-jumper`]: {
|
|
height: token.itemSizeSM,
|
|
lineHeight: `${token.itemSizeSM}px`,
|
|
input: Object.assign(Object.assign({}, (0,style/* genInputSmallStyle */.x0)(token)), {
|
|
width: token.paginationMiniQuickJumperInputWidth,
|
|
height: token.controlHeightSM
|
|
})
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genPaginationSimpleStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[`
|
|
&${componentCls}-simple ${componentCls}-prev,
|
|
&${componentCls}-simple ${componentCls}-next
|
|
`]: {
|
|
height: token.itemSizeSM,
|
|
lineHeight: `${token.itemSizeSM}px`,
|
|
verticalAlign: 'top',
|
|
[`${componentCls}-item-link`]: {
|
|
height: token.itemSizeSM,
|
|
backgroundColor: 'transparent',
|
|
border: 0,
|
|
'&:hover': {
|
|
backgroundColor: token.colorBgTextHover
|
|
},
|
|
'&:active': {
|
|
backgroundColor: token.colorBgTextActive
|
|
},
|
|
'&::after': {
|
|
height: token.itemSizeSM,
|
|
lineHeight: `${token.itemSizeSM}px`
|
|
}
|
|
}
|
|
},
|
|
[`&${componentCls}-simple ${componentCls}-simple-pager`]: {
|
|
display: 'inline-block',
|
|
height: token.itemSizeSM,
|
|
marginInlineEnd: token.marginXS,
|
|
input: {
|
|
boxSizing: 'border-box',
|
|
height: '100%',
|
|
marginInlineEnd: token.marginXS,
|
|
padding: `0 ${token.paginationItemPaddingInline}px`,
|
|
textAlign: 'center',
|
|
backgroundColor: token.itemInputBg,
|
|
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
|
borderRadius: token.borderRadius,
|
|
outline: 'none',
|
|
transition: `border-color ${token.motionDurationMid}`,
|
|
color: 'inherit',
|
|
'&:hover': {
|
|
borderColor: token.colorPrimary
|
|
},
|
|
'&:focus': {
|
|
borderColor: token.colorPrimaryHover,
|
|
boxShadow: `${token.inputOutlineOffset}px 0 ${token.controlOutlineWidth}px ${token.controlOutline}`
|
|
},
|
|
'&[disabled]': {
|
|
color: token.colorTextDisabled,
|
|
backgroundColor: token.colorBgContainerDisabled,
|
|
borderColor: token.colorBorder,
|
|
cursor: 'not-allowed'
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genPaginationJumpStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
|
|
outline: 0,
|
|
[`${componentCls}-item-container`]: {
|
|
position: 'relative',
|
|
[`${componentCls}-item-link-icon`]: {
|
|
color: token.colorPrimary,
|
|
fontSize: token.fontSizeSM,
|
|
opacity: 0,
|
|
transition: `all ${token.motionDurationMid}`,
|
|
'&-svg': {
|
|
top: 0,
|
|
insetInlineEnd: 0,
|
|
bottom: 0,
|
|
insetInlineStart: 0,
|
|
margin: 'auto'
|
|
}
|
|
},
|
|
[`${componentCls}-item-ellipsis`]: {
|
|
position: 'absolute',
|
|
top: 0,
|
|
insetInlineEnd: 0,
|
|
bottom: 0,
|
|
insetInlineStart: 0,
|
|
display: 'block',
|
|
margin: 'auto',
|
|
color: token.colorTextDisabled,
|
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
letterSpacing: token.paginationEllipsisLetterSpacing,
|
|
textAlign: 'center',
|
|
textIndent: token.paginationEllipsisTextIndent,
|
|
opacity: 1,
|
|
transition: `all ${token.motionDurationMid}`
|
|
}
|
|
},
|
|
'&:hover': {
|
|
[`${componentCls}-item-link-icon`]: {
|
|
opacity: 1
|
|
},
|
|
[`${componentCls}-item-ellipsis`]: {
|
|
opacity: 0
|
|
}
|
|
},
|
|
'&:focus-visible': Object.assign({
|
|
[`${componentCls}-item-link-icon`]: {
|
|
opacity: 1
|
|
},
|
|
[`${componentCls}-item-ellipsis`]: {
|
|
opacity: 0
|
|
}
|
|
}, (0,es_style/* genFocusOutline */.oN)(token))
|
|
},
|
|
[`
|
|
${componentCls}-prev,
|
|
${componentCls}-jump-prev,
|
|
${componentCls}-jump-next
|
|
`]: {
|
|
marginInlineEnd: token.marginXS
|
|
},
|
|
[`
|
|
${componentCls}-prev,
|
|
${componentCls}-next,
|
|
${componentCls}-jump-prev,
|
|
${componentCls}-jump-next
|
|
`]: {
|
|
display: 'inline-block',
|
|
minWidth: token.itemSize,
|
|
height: token.itemSize,
|
|
color: token.colorText,
|
|
fontFamily: token.fontFamily,
|
|
lineHeight: `${token.itemSize}px`,
|
|
textAlign: 'center',
|
|
verticalAlign: 'middle',
|
|
listStyle: 'none',
|
|
borderRadius: token.borderRadius,
|
|
cursor: 'pointer',
|
|
transition: `all ${token.motionDurationMid}`
|
|
},
|
|
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
outline: 0,
|
|
button: {
|
|
color: token.colorText,
|
|
cursor: 'pointer',
|
|
userSelect: 'none'
|
|
},
|
|
[`${componentCls}-item-link`]: {
|
|
display: 'block',
|
|
width: '100%',
|
|
height: '100%',
|
|
padding: 0,
|
|
fontSize: token.fontSizeSM,
|
|
textAlign: 'center',
|
|
backgroundColor: 'transparent',
|
|
border: `${token.lineWidth}px ${token.lineType} transparent`,
|
|
borderRadius: token.borderRadius,
|
|
outline: 'none',
|
|
transition: `border ${token.motionDurationMid}`
|
|
},
|
|
[`&:focus-visible ${componentCls}-item-link`]: Object.assign({}, (0,es_style/* genFocusOutline */.oN)(token)),
|
|
[`&:hover ${componentCls}-item-link`]: {
|
|
backgroundColor: token.colorBgTextHover
|
|
},
|
|
[`&:active ${componentCls}-item-link`]: {
|
|
backgroundColor: token.colorBgTextActive
|
|
},
|
|
[`&${componentCls}-disabled:hover`]: {
|
|
[`${componentCls}-item-link`]: {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-slash`]: {
|
|
marginInlineEnd: token.paginationSlashMarginInlineEnd,
|
|
marginInlineStart: token.paginationSlashMarginInlineStart
|
|
},
|
|
[`${componentCls}-options`]: {
|
|
display: 'inline-block',
|
|
marginInlineStart: token.margin,
|
|
verticalAlign: 'middle',
|
|
'&-size-changer.-select': {
|
|
display: 'inline-block',
|
|
width: 'auto'
|
|
},
|
|
'&-quick-jumper': {
|
|
display: 'inline-block',
|
|
height: token.controlHeight,
|
|
marginInlineStart: token.marginXS,
|
|
lineHeight: `${token.controlHeight}px`,
|
|
verticalAlign: 'top',
|
|
input: Object.assign(Object.assign({}, (0,style/* genBasicInputStyle */.ik)(token)), {
|
|
width: token.controlHeightLG * 1.25,
|
|
height: token.controlHeight,
|
|
boxSizing: 'border-box',
|
|
margin: 0,
|
|
marginInlineStart: token.marginXS,
|
|
marginInlineEnd: token.marginXS
|
|
})
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genPaginationItemStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-item`]: Object.assign(Object.assign({
|
|
display: 'inline-block',
|
|
minWidth: token.itemSize,
|
|
height: token.itemSize,
|
|
marginInlineEnd: token.marginXS,
|
|
fontFamily: token.fontFamily,
|
|
lineHeight: `${token.itemSize - 2}px`,
|
|
textAlign: 'center',
|
|
verticalAlign: 'middle',
|
|
listStyle: 'none',
|
|
backgroundColor: 'transparent',
|
|
border: `${token.lineWidth}px ${token.lineType} transparent`,
|
|
borderRadius: token.borderRadius,
|
|
outline: 0,
|
|
cursor: 'pointer',
|
|
userSelect: 'none',
|
|
a: {
|
|
display: 'block',
|
|
padding: `0 ${token.paginationItemPaddingInline}px`,
|
|
color: token.colorText,
|
|
transition: 'none',
|
|
'&:hover': {
|
|
textDecoration: 'none'
|
|
}
|
|
},
|
|
[`&:not(${componentCls}-item-active)`]: {
|
|
'&:hover': {
|
|
transition: `all ${token.motionDurationMid}`,
|
|
backgroundColor: token.colorBgTextHover
|
|
},
|
|
'&:active': {
|
|
backgroundColor: token.colorBgTextActive
|
|
}
|
|
}
|
|
}, (0,es_style/* genFocusStyle */.Qy)(token)), {
|
|
'&-active': {
|
|
fontWeight: token.fontWeightStrong,
|
|
backgroundColor: token.itemActiveBg,
|
|
borderColor: token.colorPrimary,
|
|
a: {
|
|
color: token.colorPrimary
|
|
},
|
|
'&:hover': {
|
|
borderColor: token.colorPrimaryHover
|
|
},
|
|
'&:hover a': {
|
|
color: token.colorPrimaryHover
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
const genPaginationStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0,es_style/* resetComponent */.Wf)(token)), {
|
|
'ul, ol': {
|
|
margin: 0,
|
|
padding: 0,
|
|
listStyle: 'none'
|
|
},
|
|
'&::after': {
|
|
display: 'block',
|
|
clear: 'both',
|
|
height: 0,
|
|
overflow: 'hidden',
|
|
visibility: 'hidden',
|
|
content: '""'
|
|
},
|
|
[`${componentCls}-total-text`]: {
|
|
display: 'inline-block',
|
|
height: token.itemSize,
|
|
marginInlineEnd: token.marginXS,
|
|
lineHeight: `${token.itemSize - 2}px`,
|
|
verticalAlign: 'middle'
|
|
}
|
|
}), genPaginationItemStyle(token)), genPaginationJumpStyle(token)), genPaginationSimpleStyle(token)), genPaginationMiniStyle(token)), genPaginationDisabledStyle(token)), {
|
|
// media query style
|
|
[`@media only screen and (max-width: ${token.screenLG}px)`]: {
|
|
[`${componentCls}-item`]: {
|
|
'&-after-jump-prev, &-before-jump-next': {
|
|
display: 'none'
|
|
}
|
|
}
|
|
},
|
|
[`@media only screen and (max-width: ${token.screenSM}px)`]: {
|
|
[`${componentCls}-options`]: {
|
|
display: 'none'
|
|
}
|
|
}
|
|
}),
|
|
// rtl style
|
|
[`&${token.componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
};
|
|
};
|
|
const genBorderedStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
return {
|
|
[`${componentCls}${componentCls}-disabled`]: {
|
|
'&, &:hover': {
|
|
[`${componentCls}-item-link`]: {
|
|
borderColor: token.colorBorder
|
|
}
|
|
},
|
|
'&:focus-visible': {
|
|
[`${componentCls}-item-link`]: {
|
|
borderColor: token.colorBorder
|
|
}
|
|
},
|
|
[`${componentCls}-item, ${componentCls}-item-link`]: {
|
|
backgroundColor: token.colorBgContainerDisabled,
|
|
borderColor: token.colorBorder,
|
|
[`&:hover:not(${componentCls}-item-active)`]: {
|
|
backgroundColor: token.colorBgContainerDisabled,
|
|
borderColor: token.colorBorder,
|
|
a: {
|
|
color: token.colorTextDisabled
|
|
}
|
|
},
|
|
[`&${componentCls}-item-active`]: {
|
|
backgroundColor: token.itemActiveBgDisabled
|
|
}
|
|
},
|
|
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
'&:hover button': {
|
|
backgroundColor: token.colorBgContainerDisabled,
|
|
borderColor: token.colorBorder,
|
|
color: token.colorTextDisabled
|
|
},
|
|
[`${componentCls}-item-link`]: {
|
|
backgroundColor: token.colorBgContainerDisabled,
|
|
borderColor: token.colorBorder
|
|
}
|
|
}
|
|
},
|
|
[componentCls]: {
|
|
[`${componentCls}-prev, ${componentCls}-next`]: {
|
|
'&:hover button': {
|
|
borderColor: token.colorPrimaryHover,
|
|
backgroundColor: token.itemBg
|
|
},
|
|
[`${componentCls}-item-link`]: {
|
|
backgroundColor: token.itemLinkBg,
|
|
borderColor: token.colorBorder
|
|
},
|
|
[`&:hover ${componentCls}-item-link`]: {
|
|
borderColor: token.colorPrimary,
|
|
backgroundColor: token.itemBg,
|
|
color: token.colorPrimary
|
|
},
|
|
[`&${componentCls}-disabled`]: {
|
|
[`${componentCls}-item-link`]: {
|
|
borderColor: token.colorBorder,
|
|
color: token.colorTextDisabled
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-item`]: {
|
|
backgroundColor: token.itemBg,
|
|
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
|
[`&:hover:not(${componentCls}-item-active)`]: {
|
|
borderColor: token.colorPrimary,
|
|
backgroundColor: token.itemBg,
|
|
a: {
|
|
color: token.colorPrimary
|
|
}
|
|
},
|
|
'&-active': {
|
|
borderColor: token.colorPrimary
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var pagination_style = ((0,genComponentStyleHook/* default */.Z)('Pagination', token => {
|
|
const paginationToken = (0,statistic/* merge */.TS)(token, {
|
|
inputOutlineOffset: 0,
|
|
paginationMiniOptionsMarginInlineStart: token.marginXXS / 2,
|
|
paginationMiniQuickJumperInputWidth: token.controlHeightLG * 1.1,
|
|
paginationItemPaddingInline: token.marginXXS * 1.5,
|
|
paginationEllipsisLetterSpacing: token.marginXXS / 2,
|
|
paginationSlashMarginInlineStart: token.marginXXS,
|
|
paginationSlashMarginInlineEnd: token.marginSM,
|
|
paginationEllipsisTextIndent: '0.13em' // magic for ui experience
|
|
}, (0,style/* initInputToken */.e5)(token));
|
|
return [genPaginationStyle(paginationToken), token.wireframe && genBorderedStyle(paginationToken)];
|
|
}, token => ({
|
|
itemBg: token.colorBgContainer,
|
|
itemSize: token.controlHeight,
|
|
itemSizeSM: token.controlHeightSM,
|
|
itemActiveBg: token.colorBgContainer,
|
|
itemLinkBg: token.colorBgContainer,
|
|
itemActiveColorDisabled: token.colorTextDisabled,
|
|
itemActiveBgDisabled: token.controlItemBgActiveDisabled,
|
|
itemInputBg: token.colorBgContainer,
|
|
miniOptionsSizeChangerTop: 0
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/Pagination.js
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Pagination_Pagination = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
selectPrefixCls: customizeSelectPrefixCls,
|
|
className,
|
|
rootClassName,
|
|
style,
|
|
size: customizeSize,
|
|
locale: customLocale,
|
|
selectComponentClass,
|
|
responsive,
|
|
showSizeChanger
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "selectPrefixCls", "className", "rootClassName", "style", "size", "locale", "selectComponentClass", "responsive", "showSizeChanger"]);
|
|
const {
|
|
xs
|
|
} = (0,useBreakpoint/* default */.Z)(responsive);
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
pagination = {}
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('pagination', customizePrefixCls);
|
|
// Style
|
|
const [wrapSSR, hashId] = pagination_style(prefixCls);
|
|
const mergedShowSizeChanger = showSizeChanger !== null && showSizeChanger !== void 0 ? showSizeChanger : pagination.showSizeChanger;
|
|
const iconsProps = react.useMemo(() => {
|
|
const ellipsis = /*#__PURE__*/react.createElement("span", {
|
|
className: `${prefixCls}-item-ellipsis`
|
|
}, "\u2022\u2022\u2022");
|
|
const prevIcon = /*#__PURE__*/react.createElement("button", {
|
|
className: `${prefixCls}-item-link`,
|
|
type: "button",
|
|
tabIndex: -1
|
|
}, direction === 'rtl' ? /*#__PURE__*/react.createElement(RightOutlined/* default */.Z, null) : /*#__PURE__*/react.createElement(LeftOutlined/* default */.Z, null));
|
|
const nextIcon = /*#__PURE__*/react.createElement("button", {
|
|
className: `${prefixCls}-item-link`,
|
|
type: "button",
|
|
tabIndex: -1
|
|
}, direction === 'rtl' ? /*#__PURE__*/react.createElement(LeftOutlined/* default */.Z, null) : /*#__PURE__*/react.createElement(RightOutlined/* default */.Z, null));
|
|
const jumpPrevIcon = /*#__PURE__*/react.createElement("a", {
|
|
className: `${prefixCls}-item-link`
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
className: `${prefixCls}-item-container`
|
|
}, direction === 'rtl' ? /*#__PURE__*/react.createElement(DoubleRightOutlined/* default */.Z, {
|
|
className: `${prefixCls}-item-link-icon`
|
|
}) : /*#__PURE__*/react.createElement(icons_DoubleLeftOutlined, {
|
|
className: `${prefixCls}-item-link-icon`
|
|
}), ellipsis));
|
|
const jumpNextIcon = /*#__PURE__*/react.createElement("a", {
|
|
className: `${prefixCls}-item-link`
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
className: `${prefixCls}-item-container`
|
|
}, direction === 'rtl' ? /*#__PURE__*/react.createElement(icons_DoubleLeftOutlined, {
|
|
className: `${prefixCls}-item-link-icon`
|
|
}) : /*#__PURE__*/react.createElement(DoubleRightOutlined/* default */.Z, {
|
|
className: `${prefixCls}-item-link-icon`
|
|
}), ellipsis));
|
|
return {
|
|
prevIcon,
|
|
nextIcon,
|
|
jumpPrevIcon,
|
|
jumpNextIcon
|
|
};
|
|
}, [direction, prefixCls]);
|
|
const [contextLocale] = (0,useLocale/* default */.Z)('Pagination', en_US/* default */.Z);
|
|
const locale = Object.assign(Object.assign({}, contextLocale), customLocale);
|
|
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
|
|
const isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);
|
|
const selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
|
|
const extendedClassName = classnames_default()({
|
|
[`${prefixCls}-mini`]: isSmall,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, pagination === null || pagination === void 0 ? void 0 : pagination.className, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, pagination === null || pagination === void 0 ? void 0 : pagination.style), style);
|
|
return wrapSSR( /*#__PURE__*/react.createElement(es_Pagination, Object.assign({}, iconsProps, restProps, {
|
|
style: mergedStyle,
|
|
prefixCls: prefixCls,
|
|
selectPrefixCls: selectPrefixCls,
|
|
className: extendedClassName,
|
|
selectComponentClass: selectComponentClass || (isSmall ? MiniSelect : MiddleSelect),
|
|
locale: locale,
|
|
showSizeChanger: mergedShowSizeChanger
|
|
})));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var pagination_Pagination = (Pagination_Pagination);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/index.js
|
|
'use client';
|
|
|
|
|
|
/* harmony default export */ var pagination = (pagination_Pagination);
|
|
|
|
/***/ })
|
|
|
|
}]); |