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.
1310 lines
56 KiB
1310 lines
56 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[64057],{
|
|
|
|
/***/ 34061:
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js ***!
|
|
\**************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// 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 */ __webpack_exports__["Z"] = (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 _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ 97685);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
|
|
|
function useForceUpdate() {
|
|
var _React$useReducer = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(function (x) {
|
|
return x + 1;
|
|
}, 0),
|
|
_React$useReducer2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_React$useReducer, 2),
|
|
forceUpdate = _React$useReducer2[1];
|
|
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_responsiveObserve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_util/responsiveObserve */ 24308);
|
|
|
|
|
|
|
|
function useBreakpoint() {
|
|
var refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
var screensRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({});
|
|
var forceUpdate = (0,_util_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)();
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
var token = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_2__/* ["default"].subscribe */ .ZP.subscribe(function (supportScreens) {
|
|
screensRef.current = supportScreens;
|
|
if (refreshOnChange) {
|
|
forceUpdate();
|
|
}
|
|
});
|
|
return function () {
|
|
return _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_2__/* ["default"].unsubscribe */ .ZP.unsubscribe(token);
|
|
};
|
|
}, []);
|
|
return screensRef.current;
|
|
}
|
|
/* harmony default export */ __webpack_exports__["Z"] = (useBreakpoint);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 260:
|
|
/*!***************************************************************!*\
|
|
!*** ./node_modules/antd/es/pagination/index.js + 10 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/defineProperty.js
|
|
var defineProperty = __webpack_require__(4942);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
// 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/antd/node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(93771);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/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,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
ref: ref,
|
|
icon: asn_DoubleLeftOutlined
|
|
}));
|
|
};
|
|
DoubleLeftOutlined_DoubleLeftOutlined.displayName = 'DoubleLeftOutlined';
|
|
/* harmony default export */ var icons_DoubleLeftOutlined = (/*#__PURE__*/react.forwardRef(DoubleLeftOutlined_DoubleLeftOutlined));
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js
|
|
var asn_DoubleRightOutlined = __webpack_require__(34061);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
var DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
ref: ref,
|
|
icon: asn_DoubleRightOutlined/* default */.Z
|
|
}));
|
|
};
|
|
DoubleRightOutlined.displayName = 'DoubleRightOutlined';
|
|
/* harmony default export */ var icons_DoubleRightOutlined = (/*#__PURE__*/react.forwardRef(DoubleRightOutlined));
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/LeftOutlined.js
|
|
var LeftOutlined = __webpack_require__(97454);
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/RightOutlined.js
|
|
var RightOutlined = __webpack_require__(62994);
|
|
// 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/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/es/Pager.js
|
|
|
|
/* eslint react/prop-types: 0 */
|
|
|
|
|
|
var Pager = function Pager(props) {
|
|
var _classNames;
|
|
var prefixCls = "".concat(props.rootPrefixCls, "-item");
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(props.page), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), props.active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), !props.page), (0,defineProperty/* default */.Z)(_classNames, props.className, !!props.className), _classNames));
|
|
var handleClick = function handleClick() {
|
|
props.onClick(props.page);
|
|
};
|
|
var handleKeyPress = function handleKeyPress(e) {
|
|
props.onKeyPress(e, props.onClick, props.page);
|
|
};
|
|
return /*#__PURE__*/react.createElement("li", {
|
|
title: props.showTitle ? props.page : null,
|
|
className: cls,
|
|
onClick: handleClick,
|
|
onKeyPress: handleKeyPress,
|
|
tabIndex: "0"
|
|
}, props.itemRender(props.page, 'page', /*#__PURE__*/react.createElement("a", {
|
|
rel: "nofollow"
|
|
}, props.page)));
|
|
};
|
|
/* harmony default export */ var es_Pager = (Pager);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/KeyCode.js
|
|
/* harmony default export */ var KeyCode = ({
|
|
ZERO: 48,
|
|
NINE: 57,
|
|
NUMPAD_ZERO: 96,
|
|
NUMPAD_NINE: 105,
|
|
BACKSPACE: 8,
|
|
DELETE: 46,
|
|
ENTER: 13,
|
|
ARROW_UP: 38,
|
|
ARROW_DOWN: 40
|
|
});
|
|
;// 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.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 === KeyCode.ENTER || e.type === 'click') {
|
|
_this.setState({
|
|
goInputText: ''
|
|
});
|
|
_this.props.quickGo(_this.getValidValue());
|
|
}
|
|
};
|
|
return _this;
|
|
}
|
|
(0,createClass/* default */.Z)(Options, [{
|
|
key: "getValidValue",
|
|
value: function getValidValue() {
|
|
var goInputText = this.state.goInputText;
|
|
// eslint-disable-next-line no-restricted-globals
|
|
return !goInputText || isNaN(goInputText) ? undefined : Number(goInputText);
|
|
}
|
|
}, {
|
|
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 = isNaN(Number(a)) ? 0 : Number(a);
|
|
// eslint-disable-next-line no-restricted-globals
|
|
var numberB = 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",
|
|
dropdownMatchSelectWidth: 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);
|
|
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
|
|
var zh_CN = __webpack_require__(81626);
|
|
;// CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pagination.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* eslint react/prop-types: 0 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function noop() {}
|
|
function isInteger(v) {
|
|
var value = Number(v);
|
|
return (
|
|
// eslint-disable-next-line no-restricted-globals
|
|
typeof value === 'number' && !isNaN(value) && isFinite(value) && Math.floor(value) === value
|
|
);
|
|
}
|
|
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.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.savePaginationNode = function (node) {
|
|
_this.paginationNode = node;
|
|
};
|
|
_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 === KeyCode.ARROW_UP || e.keyCode === 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 === KeyCode.ENTER) {
|
|
_this.handleChange(value);
|
|
} else if (e.keyCode === KeyCode.ARROW_UP) {
|
|
_this.handleChange(value - 1);
|
|
} else if (e.keyCode === 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 === KeyCode.ENTER || e.type === 'click') {
|
|
_this.handleChange(_this.state.currentInputValue);
|
|
}
|
|
};
|
|
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(prevProps, 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) {
|
|
var lastCurrentNode = this.paginationNode.querySelector(".".concat(prefixCls, "-item-").concat(prevState.current));
|
|
if (lastCurrentNode && document.activeElement === lastCurrentNode) {
|
|
lastCurrentNode.blur();
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
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 (isNaN(Number(inputValue))) {
|
|
value = currentInputValue;
|
|
} else if (inputValue >= allPages) {
|
|
value = allPages;
|
|
} else {
|
|
value = Number(inputValue);
|
|
}
|
|
return value;
|
|
}
|
|
}, {
|
|
key: "getShowSizeChanger",
|
|
value: function getShowSizeChanger() {
|
|
var _this$props3 = this.props,
|
|
showSizeChanger = _this$props3.showSizeChanger,
|
|
total = _this$props3.total,
|
|
totalBoundaryShowSizeChanger = _this$props3.totalBoundaryShowSizeChanger;
|
|
if (typeof showSizeChanger !== 'undefined') {
|
|
return showSizeChanger;
|
|
}
|
|
return total > totalBoundaryShowSizeChanger;
|
|
}
|
|
}, {
|
|
key: "renderPrev",
|
|
value: function renderPrev(prevPage) {
|
|
var _this$props4 = this.props,
|
|
prevIcon = _this$props4.prevIcon,
|
|
itemRender = _this$props4.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;
|
|
}
|
|
}, {
|
|
key: "renderNext",
|
|
value: function renderNext(nextPage) {
|
|
var _this$props5 = this.props,
|
|
nextIcon = _this$props5.nextIcon,
|
|
itemRender = _this$props5.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;
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
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 = Object.keys(this.props).reduce(function (prev, key) {
|
|
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
// eslint-disable-next-line no-param-reassign
|
|
prev[key] = _this2.props[key];
|
|
}
|
|
return prev;
|
|
}, {});
|
|
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.savePaginationNode
|
|
}, 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.savePaginationNode
|
|
}, 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/grid/hooks/useBreakpoint.js
|
|
var useBreakpoint = __webpack_require__(25378);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules
|
|
var LocaleReceiver = __webpack_require__(23715);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js
|
|
var es_select = __webpack_require__(34041);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/Select.js
|
|
|
|
|
|
|
|
var MiniSelect = function MiniSelect(props) {
|
|
return /*#__PURE__*/react.createElement(es_select/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
size: "small"
|
|
}));
|
|
};
|
|
var MiddleSelect = function MiddleSelect(props) {
|
|
return /*#__PURE__*/react.createElement(es_select/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
size: "middle"
|
|
}));
|
|
};
|
|
MiniSelect.Option = es_select/* default.Option */.Z.Option;
|
|
MiddleSelect.Option = es_select/* default.Option */.Z.Option;
|
|
|
|
;// 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;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Pagination_Pagination = function Pagination(_a) {
|
|
var customizePrefixCls = _a.prefixCls,
|
|
customizeSelectPrefixCls = _a.selectPrefixCls,
|
|
className = _a.className,
|
|
size = _a.size,
|
|
customLocale = _a.locale,
|
|
selectComponentClass = _a.selectComponentClass,
|
|
responsive = _a.responsive,
|
|
showSizeChanger = _a.showSizeChanger,
|
|
restProps = __rest(_a, ["prefixCls", "selectPrefixCls", "className", "size", "locale", "selectComponentClass", "responsive", "showSizeChanger"]);
|
|
var _useBreakpoint = (0,useBreakpoint/* default */.Z)(responsive),
|
|
xs = _useBreakpoint.xs;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
direction = _React$useContext.direction,
|
|
_React$useContext$pag = _React$useContext.pagination,
|
|
pagination = _React$useContext$pag === void 0 ? {} : _React$useContext$pag;
|
|
var prefixCls = getPrefixCls('pagination', customizePrefixCls);
|
|
var mergedShowSizeChanger = showSizeChanger !== null && showSizeChanger !== void 0 ? showSizeChanger : pagination.showSizeChanger;
|
|
var getIconsProps = function getIconsProps() {
|
|
var ellipsis = /*#__PURE__*/react.createElement("span", {
|
|
className: "".concat(prefixCls, "-item-ellipsis")
|
|
}, "\u2022\u2022\u2022");
|
|
var prevIcon = /*#__PURE__*/react.createElement("button", {
|
|
className: "".concat(prefixCls, "-item-link"),
|
|
type: "button",
|
|
tabIndex: -1
|
|
}, /*#__PURE__*/react.createElement(LeftOutlined/* default */.Z, null));
|
|
var nextIcon = /*#__PURE__*/react.createElement("button", {
|
|
className: "".concat(prefixCls, "-item-link"),
|
|
type: "button",
|
|
tabIndex: -1
|
|
}, /*#__PURE__*/react.createElement(RightOutlined/* default */.Z, null));
|
|
var jumpPrevIcon = /*#__PURE__*/react.createElement("a", {
|
|
className: "".concat(prefixCls, "-item-link")
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-item-container")
|
|
}, /*#__PURE__*/react.createElement(icons_DoubleLeftOutlined, {
|
|
className: "".concat(prefixCls, "-item-link-icon")
|
|
}), ellipsis));
|
|
var jumpNextIcon = /*#__PURE__*/react.createElement("a", {
|
|
className: "".concat(prefixCls, "-item-link")
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-item-container")
|
|
}, /*#__PURE__*/react.createElement(icons_DoubleRightOutlined, {
|
|
className: "".concat(prefixCls, "-item-link-icon")
|
|
}), ellipsis));
|
|
// change arrows direction in right-to-left direction
|
|
if (direction === 'rtl') {
|
|
var _ref = [nextIcon, prevIcon];
|
|
prevIcon = _ref[0];
|
|
nextIcon = _ref[1];
|
|
var _ref2 = [jumpNextIcon, jumpPrevIcon];
|
|
jumpPrevIcon = _ref2[0];
|
|
jumpNextIcon = _ref2[1];
|
|
}
|
|
return {
|
|
prevIcon: prevIcon,
|
|
nextIcon: nextIcon,
|
|
jumpPrevIcon: jumpPrevIcon,
|
|
jumpNextIcon: jumpNextIcon
|
|
};
|
|
};
|
|
return /*#__PURE__*/react.createElement(LocaleReceiver/* default */.Z, {
|
|
componentName: "Pagination",
|
|
defaultLocale: en_US/* default */.Z
|
|
}, function (contextLocale) {
|
|
var _classNames;
|
|
var locale = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, contextLocale), customLocale);
|
|
var isSmall = size === 'small' || !!(xs && !size && responsive);
|
|
var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
|
|
var extendedClassName = classnames_default()((_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-mini"), isSmall), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
|
|
return /*#__PURE__*/react.createElement(es_Pagination, (0,esm_extends/* default */.Z)({}, getIconsProps(), restProps, {
|
|
prefixCls: prefixCls,
|
|
selectPrefixCls: selectPrefixCls,
|
|
className: extendedClassName,
|
|
selectComponentClass: selectComponentClass || (isSmall ? MiniSelect : MiddleSelect),
|
|
locale: locale,
|
|
showSizeChanger: mergedShowSizeChanger
|
|
}));
|
|
});
|
|
};
|
|
/* harmony default export */ var pagination_Pagination = (Pagination_Pagination);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/index.js
|
|
|
|
/* harmony default export */ var pagination = (pagination_Pagination);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 14182:
|
|
/*!********************************************************************!*\
|
|
!*** ./node_modules/antd/es/pagination/style/index.js + 1 modules ***!
|
|
\********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
var style_default = __webpack_require__(43146);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/style/index.less
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/style/index.js + 1 modules
|
|
var style = __webpack_require__(95985);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/pagination/style/index.js
|
|
|
|
|
|
// style dependencies
|
|
// deps-lint-skip: grid
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 34041:
|
|
/*!**********************************************!*\
|
|
!*** ./node_modules/antd/es/select/index.js ***!
|
|
\**********************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942);
|
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var rc_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-select */ 7752);
|
|
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-util/es/omit */ 98423);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 53124);
|
|
/* harmony import */ var _config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config-provider/defaultRenderEmpty */ 88258);
|
|
/* harmony import */ var _config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider/DisabledContext */ 98866);
|
|
/* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider/SizeContext */ 97647);
|
|
/* harmony import */ var _form_context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../form/context */ 65223);
|
|
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_util/motion */ 33603);
|
|
/* harmony import */ var _util_statusUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/statusUtils */ 9708);
|
|
/* harmony import */ var _utils_iconUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/iconUtil */ 46163);
|
|
/* harmony import */ var _space_Compact__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../space/Compact */ 4173);
|
|
|
|
|
|
// TODO: 4.0 - codemod should help to change `filterOption` to support node props.
|
|
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;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
|
var InternalSelect = function InternalSelect(_a, ref) {
|
|
var _classNames2;
|
|
var customizePrefixCls = _a.prefixCls,
|
|
_a$bordered = _a.bordered,
|
|
bordered = _a$bordered === void 0 ? true : _a$bordered,
|
|
className = _a.className,
|
|
getPopupContainer = _a.getPopupContainer,
|
|
dropdownClassName = _a.dropdownClassName,
|
|
popupClassName = _a.popupClassName,
|
|
_a$listHeight = _a.listHeight,
|
|
listHeight = _a$listHeight === void 0 ? 256 : _a$listHeight,
|
|
placement = _a.placement,
|
|
_a$listItemHeight = _a.listItemHeight,
|
|
listItemHeight = _a$listItemHeight === void 0 ? 24 : _a$listItemHeight,
|
|
customizeSize = _a.size,
|
|
customDisabled = _a.disabled,
|
|
notFoundContent = _a.notFoundContent,
|
|
customStatus = _a.status,
|
|
showArrow = _a.showArrow,
|
|
props = __rest(_a, ["prefixCls", "bordered", "className", "getPopupContainer", "dropdownClassName", "popupClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "showArrow"]);
|
|
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_),
|
|
getContextPopupContainer = _React$useContext.getPopupContainer,
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
renderEmpty = _React$useContext.renderEmpty,
|
|
direction = _React$useContext.direction,
|
|
virtual = _React$useContext.virtual,
|
|
dropdownMatchSelectWidth = _React$useContext.dropdownMatchSelectWidth;
|
|
var size = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z);
|
|
var prefixCls = getPrefixCls('select', customizePrefixCls);
|
|
var rootPrefixCls = getPrefixCls();
|
|
var _useCompactItemContex = (0,_space_Compact__WEBPACK_IMPORTED_MODULE_5__/* .useCompactItemContext */ .ri)(prefixCls, direction),
|
|
compactSize = _useCompactItemContex.compactSize,
|
|
compactItemClassnames = _useCompactItemContex.compactItemClassnames;
|
|
var mode = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(function () {
|
|
var m = props.mode;
|
|
if (m === 'combobox') {
|
|
return undefined;
|
|
}
|
|
if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {
|
|
return 'combobox';
|
|
}
|
|
return m;
|
|
}, [props.mode]);
|
|
var isMultiple = mode === 'multiple' || mode === 'tags';
|
|
var mergedShowArrow = showArrow !== undefined ? showArrow : props.loading || !(isMultiple || mode === 'combobox');
|
|
// =================== Warning =====================
|
|
false ? 0 : void 0;
|
|
// ===================== Form Status =====================
|
|
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_form_context__WEBPACK_IMPORTED_MODULE_6__/* .FormItemInputContext */ .aM),
|
|
contextStatus = _useContext.status,
|
|
hasFeedback = _useContext.hasFeedback,
|
|
isFormItemInput = _useContext.isFormItemInput,
|
|
feedbackIcon = _useContext.feedbackIcon;
|
|
var mergedStatus = (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_7__/* .getMergedStatus */ .F)(contextStatus, customStatus);
|
|
// ===================== Empty =====================
|
|
var mergedNotFound;
|
|
if (notFoundContent !== undefined) {
|
|
mergedNotFound = notFoundContent;
|
|
} else if (mode === 'combobox') {
|
|
mergedNotFound = null;
|
|
} else {
|
|
mergedNotFound = (renderEmpty || _config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)('Select');
|
|
}
|
|
// ===================== Icons =====================
|
|
var _getIcons = (0,_utils_iconUtil__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)({}, props), {
|
|
multiple: isMultiple,
|
|
hasFeedback: hasFeedback,
|
|
feedbackIcon: feedbackIcon,
|
|
showArrow: mergedShowArrow,
|
|
prefixCls: prefixCls
|
|
})),
|
|
suffixIcon = _getIcons.suffixIcon,
|
|
itemIcon = _getIcons.itemIcon,
|
|
removeIcon = _getIcons.removeIcon,
|
|
clearIcon = _getIcons.clearIcon;
|
|
var selectProps = (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(props, ['suffixIcon', 'itemIcon']);
|
|
var rcSelectRtlDropdownClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()(popupClassName || dropdownClassName, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)({}, "".concat(prefixCls, "-dropdown-").concat(direction), direction === 'rtl'));
|
|
var mergedSize = compactSize || customizeSize || size;
|
|
// ===================== Disabled =====================
|
|
var disabled = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z);
|
|
var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()((_classNames2 = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(_classNames2, "".concat(prefixCls, "-lg"), mergedSize === 'large'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(_classNames2, "".concat(prefixCls, "-sm"), mergedSize === 'small'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(_classNames2, "".concat(prefixCls, "-borderless"), !bordered), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(_classNames2, "".concat(prefixCls, "-in-form-item"), isFormItemInput), _classNames2), (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_7__/* .getStatusClassNames */ .Z)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, className);
|
|
// ===================== Placement =====================
|
|
var getPlacement = function getPlacement() {
|
|
if (placement !== undefined) {
|
|
return placement;
|
|
}
|
|
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
};
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_select__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)({
|
|
ref: ref,
|
|
virtual: virtual,
|
|
dropdownMatchSelectWidth: dropdownMatchSelectWidth
|
|
}, selectProps, {
|
|
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_14__/* .getTransitionName */ .mL)(rootPrefixCls, (0,_util_motion__WEBPACK_IMPORTED_MODULE_14__/* .getTransitionDirection */ .q0)(placement), props.transitionName),
|
|
listHeight: listHeight,
|
|
listItemHeight: listItemHeight,
|
|
mode: mode,
|
|
prefixCls: prefixCls,
|
|
placement: getPlacement(),
|
|
direction: direction,
|
|
inputIcon: suffixIcon,
|
|
menuItemSelectedIcon: itemIcon,
|
|
removeIcon: removeIcon,
|
|
clearIcon: clearIcon,
|
|
notFoundContent: mergedNotFound,
|
|
className: mergedClassName,
|
|
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
dropdownClassName: rcSelectRtlDropdownClassName,
|
|
showArrow: hasFeedback || showArrow,
|
|
disabled: mergedDisabled
|
|
}));
|
|
};
|
|
var Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(InternalSelect);
|
|
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
|
|
Select.Option = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .Option */ .Wx;
|
|
Select.OptGroup = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .OptGroup */ .Xo;
|
|
/* harmony default export */ __webpack_exports__["Z"] = (Select);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 81626:
|
|
/*!*******************************************************!*\
|
|
!*** ./node_modules/rc-pagination/es/locale/zh_CN.js ***!
|
|
\*******************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = ({
|
|
// Options.jsx
|
|
items_per_page: '条/页',
|
|
jump_to: '跳至',
|
|
jump_to_confirm: '确定',
|
|
page: '页',
|
|
// Pagination.jsx
|
|
prev_page: '上一页',
|
|
next_page: '下一页',
|
|
prev_5: '向前 5 页',
|
|
next_5: '向后 5 页',
|
|
prev_3: '向前 3 页',
|
|
next_3: '向后 3 页',
|
|
page_size: '页码'
|
|
});
|
|
|
|
/***/ })
|
|
|
|
}]); |