@sheinx/base 3.8.0-beta.37 → 3.8.0-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/modal/modal-content.d.ts.map +1 -1
- package/cjs/modal/modal-content.js +4 -1
- package/cjs/pagination/pagination-size-list.d.ts.map +1 -1
- package/cjs/pagination/pagination-size-list.js +10 -9
- package/cjs/pagination/pagination-size-list.type.d.ts +1 -1
- package/cjs/pagination/pagination-size-list.type.d.ts.map +1 -1
- package/cjs/pagination/pagination.d.ts.map +1 -1
- package/cjs/pagination/pagination.js +10 -2
- package/cjs/pagination/pagination.type.d.ts +11 -11
- package/cjs/pagination/pagination.type.d.ts.map +1 -1
- package/esm/modal/modal-content.d.ts.map +1 -1
- package/esm/modal/modal-content.js +4 -1
- package/esm/pagination/pagination-size-list.d.ts.map +1 -1
- package/esm/pagination/pagination-size-list.js +10 -9
- package/esm/pagination/pagination-size-list.type.d.ts +1 -1
- package/esm/pagination/pagination-size-list.type.d.ts.map +1 -1
- package/esm/pagination/pagination.d.ts.map +1 -1
- package/esm/pagination/pagination.js +11 -3
- package/esm/pagination/pagination.type.d.ts +11 -11
- package/esm/pagination/pagination.type.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,
|
|
1
|
+
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,mDAiXtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -225,7 +225,10 @@ var Modal = function Modal(props) {
|
|
|
225
225
|
}, []);
|
|
226
226
|
(0, _react.useEffect)(function () {
|
|
227
227
|
if (props.setInnerClose) {
|
|
228
|
-
props.setInnerClose(
|
|
228
|
+
props.setInnerClose(function () {
|
|
229
|
+
setVisible(false);
|
|
230
|
+
setAnimation(true);
|
|
231
|
+
});
|
|
229
232
|
}
|
|
230
233
|
}, [props.setInnerClose]);
|
|
231
234
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-size-list.d.ts","sourceRoot":"","sources":["pagination-size-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,
|
|
1
|
+
{"version":3,"file":"pagination-size-list.d.ts","sourceRoot":"","sources":["pagination-size-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,4CAyCzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,6 +8,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
8
8
|
var _select = _interopRequireDefault(require("../select"));
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
17
|
var PaginationSizeList = function PaginationSizeList(props) {
|
|
12
18
|
var _jssStyle$pagination;
|
|
13
19
|
var jssStyle = props.jssStyle,
|
|
@@ -18,26 +24,21 @@ var PaginationSizeList = function PaginationSizeList(props) {
|
|
|
18
24
|
text = props.text,
|
|
19
25
|
size = props.size,
|
|
20
26
|
select = props.select,
|
|
27
|
+
sizeListProps = props.sizeListProps,
|
|
21
28
|
pageSize = props.pageSize,
|
|
22
29
|
onChange = props.onChange;
|
|
23
30
|
var paginationStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$pagination = jssStyle.pagination) === null || _jssStyle$pagination === void 0 ? void 0 : _jssStyle$pagination.call(jssStyle);
|
|
24
31
|
var rootClasses = (0, _classnames.default)(paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.section, paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.sizeList);
|
|
25
|
-
var _ref = select || {},
|
|
26
|
-
absolute = _ref.absolute,
|
|
27
|
-
position = _ref.position,
|
|
28
|
-
zIndex = _ref.zIndex;
|
|
29
32
|
var handleChange = function handleChange(pageSize) {
|
|
30
33
|
var start = (current - 1) * props.pageSize + 1;
|
|
31
34
|
onChange(Math.ceil(start / pageSize), pageSize);
|
|
32
35
|
};
|
|
33
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
37
|
className: rootClasses,
|
|
35
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_select.default, {
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_select.default, _objectSpread(_objectSpread({
|
|
36
39
|
jssStyle: jssStyle,
|
|
37
40
|
disabled: disabled,
|
|
38
|
-
|
|
39
|
-
absolute: absolute || true,
|
|
40
|
-
position: position || undefined,
|
|
41
|
+
absolute: true,
|
|
41
42
|
autoAdapt: true,
|
|
42
43
|
keygen: true,
|
|
43
44
|
size: size,
|
|
@@ -48,7 +49,7 @@ var PaginationSizeList = function PaginationSizeList(props) {
|
|
|
48
49
|
renderItem: function renderItem(d) {
|
|
49
50
|
return "".concat(d, " ").concat(text.page || '');
|
|
50
51
|
}
|
|
51
|
-
})
|
|
52
|
+
}, sizeListProps), select))
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
var _default = exports.default = PaginationSizeList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaginationJssStyle, PaginationProps, TextParams } from './pagination.type';
|
|
2
|
-
export interface PaginationSizeListProps extends Pick<PaginationProps, 'pageSizeList' | 'size' | 'disabled' | 'select'> {
|
|
2
|
+
export interface PaginationSizeListProps extends Pick<PaginationProps, 'pageSizeList' | 'size' | 'disabled' | 'select' | 'sizeListProps'> {
|
|
3
3
|
jssStyle?: PaginationJssStyle;
|
|
4
4
|
current: number;
|
|
5
5
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-size-list.type.d.ts","sourceRoot":"","sources":["pagination-size-list.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpF,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination-size-list.type.d.ts","sourceRoot":"","sources":["pagination-size-list.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpF,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,CAAC;IAChG,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["pagination.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["pagination.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,QAAA,MAAM,UAAU,UAAW,eAAe,4CAoJzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -18,6 +18,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
+
var devUseWarning = _hooks.util.devUseWarning;
|
|
21
22
|
var Pagination = function Pagination(props) {
|
|
22
23
|
var _jssStyle$pagination;
|
|
23
24
|
var className = props.className,
|
|
@@ -45,7 +46,13 @@ var Pagination = function Pagination(props) {
|
|
|
45
46
|
text = _props$text === void 0 ? {} : _props$text,
|
|
46
47
|
pageSizeList = props.pageSizeList,
|
|
47
48
|
style = props.style,
|
|
48
|
-
select = props.select
|
|
49
|
+
select = props.select,
|
|
50
|
+
sizeListProps = props.sizeListProps;
|
|
51
|
+
|
|
52
|
+
// 兼容v1 & v2版本
|
|
53
|
+
if (props.sizeListProps) {
|
|
54
|
+
devUseWarning.deprecated('sizeListProps', 'select', 'Pagination');
|
|
55
|
+
}
|
|
49
56
|
var _usePagination = (0, _hooks.usePagination)({
|
|
50
57
|
total: total,
|
|
51
58
|
span: span,
|
|
@@ -114,7 +121,8 @@ var Pagination = function Pagination(props) {
|
|
|
114
121
|
current: current || 0,
|
|
115
122
|
pageSize: pageSize,
|
|
116
123
|
pageSizeList: pageSizeList,
|
|
117
|
-
onChange: onChange
|
|
124
|
+
onChange: onChange,
|
|
125
|
+
sizeListProps: sizeListProps
|
|
118
126
|
}), i);
|
|
119
127
|
case 'simple':
|
|
120
128
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_paginationSimple.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -3,7 +3,7 @@ import { ButtonClasses } from '../button/button.type';
|
|
|
3
3
|
import { SelectClasses } from '../select/select.type';
|
|
4
4
|
import { InputClasses } from '../input/input.type';
|
|
5
5
|
import { CommonType } from '../common/type';
|
|
6
|
-
import {
|
|
6
|
+
import { SelectProps as FullSelectProps } from '../select/select.type';
|
|
7
7
|
export type AlignType = 'left' | 'center' | 'right';
|
|
8
8
|
export type LayoutType = ('links' | 'list' | 'jumper' | 'simple' | ((props: PaginationProps) => React.ReactNode))[];
|
|
9
9
|
export interface PaginationJssStyle {
|
|
@@ -12,14 +12,7 @@ export interface PaginationJssStyle {
|
|
|
12
12
|
button?: () => ButtonClasses;
|
|
13
13
|
pagination?: () => PaginationClasses;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
/**
|
|
17
|
-
* @en Set Position can control the different position of DatePicker
|
|
18
|
-
* @cn 弹出框位置
|
|
19
|
-
* @default auto
|
|
20
|
-
*/
|
|
21
|
-
position?: 'auto' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
22
|
-
}
|
|
15
|
+
export type SelectProps = Pick<FullSelectProps<any, any>, 'absolute' | 'width' | 'height' | 'position' | 'optionWidth' | 'emptyText' | 'zIndex'>;
|
|
23
16
|
export interface PaginationClasses {
|
|
24
17
|
rootClass: string;
|
|
25
18
|
pagination: string;
|
|
@@ -121,10 +114,17 @@ export interface PaginationProps extends Pick<CommonType, 'style' | 'className'
|
|
|
121
114
|
simple?: boolean;
|
|
122
115
|
jssStyle?: PaginationJssStyle;
|
|
123
116
|
/**
|
|
124
|
-
* @en Configuration
|
|
125
|
-
* @cn 分页器有关 Select
|
|
117
|
+
* @en Configuration related to the Select component in the pagination, properties same as Select component
|
|
118
|
+
* @cn 分页器有关 Select 组件的配置,属性同 Select 组件
|
|
126
119
|
* @version 3.4.4
|
|
127
120
|
*/
|
|
128
121
|
select?: SelectProps;
|
|
122
|
+
/**
|
|
123
|
+
* @cn 旧版本的属性,新版本中使用 `select` 替代
|
|
124
|
+
* @en Deprecated property, use `select` instead in the new version
|
|
125
|
+
* @version 3.8.0
|
|
126
|
+
* @deprecated
|
|
127
|
+
*/
|
|
128
|
+
sizeListProps?: SelectProps;
|
|
129
129
|
}
|
|
130
130
|
//# sourceMappingURL=pagination.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.type.d.ts","sourceRoot":"","sources":["pagination.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination.type.d.ts","sourceRoot":"","sources":["pagination.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG,CACrB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,CAAC,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,CAAC,CAChD,EAAE,CAAC;AAEJ,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,YAAY,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,aAAa,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,iBAAiB,CAAC;CACtC;AAED,MAAM,MA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E,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7E;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,
|
|
1
|
+
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,mDAiXtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -219,7 +219,10 @@ var Modal = function Modal(props) {
|
|
|
219
219
|
}, []);
|
|
220
220
|
useEffect(function () {
|
|
221
221
|
if (props.setInnerClose) {
|
|
222
|
-
props.setInnerClose(
|
|
222
|
+
props.setInnerClose(function () {
|
|
223
|
+
setVisible(false);
|
|
224
|
+
setAnimation(true);
|
|
225
|
+
});
|
|
223
226
|
}
|
|
224
227
|
}, [props.setInnerClose]);
|
|
225
228
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-size-list.d.ts","sourceRoot":"","sources":["pagination-size-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,
|
|
1
|
+
{"version":3,"file":"pagination-size-list.d.ts","sourceRoot":"","sources":["pagination-size-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,4CAyCzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
import classNames from 'classnames';
|
|
2
8
|
import Select from "../select";
|
|
3
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,26 +17,21 @@ var PaginationSizeList = function PaginationSizeList(props) {
|
|
|
11
17
|
text = props.text,
|
|
12
18
|
size = props.size,
|
|
13
19
|
select = props.select,
|
|
20
|
+
sizeListProps = props.sizeListProps,
|
|
14
21
|
pageSize = props.pageSize,
|
|
15
22
|
onChange = props.onChange;
|
|
16
23
|
var paginationStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$pagination = jssStyle.pagination) === null || _jssStyle$pagination === void 0 ? void 0 : _jssStyle$pagination.call(jssStyle);
|
|
17
24
|
var rootClasses = classNames(paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.section, paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.sizeList);
|
|
18
|
-
var _ref = select || {},
|
|
19
|
-
absolute = _ref.absolute,
|
|
20
|
-
position = _ref.position,
|
|
21
|
-
zIndex = _ref.zIndex;
|
|
22
25
|
var handleChange = function handleChange(pageSize) {
|
|
23
26
|
var start = (current - 1) * props.pageSize + 1;
|
|
24
27
|
onChange(Math.ceil(start / pageSize), pageSize);
|
|
25
28
|
};
|
|
26
29
|
return /*#__PURE__*/_jsx("div", {
|
|
27
30
|
className: rootClasses,
|
|
28
|
-
children: /*#__PURE__*/_jsx(Select, {
|
|
31
|
+
children: /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
29
32
|
jssStyle: jssStyle,
|
|
30
33
|
disabled: disabled,
|
|
31
|
-
|
|
32
|
-
absolute: absolute || true,
|
|
33
|
-
position: position || undefined,
|
|
34
|
+
absolute: true,
|
|
34
35
|
autoAdapt: true,
|
|
35
36
|
keygen: true,
|
|
36
37
|
size: size,
|
|
@@ -41,7 +42,7 @@ var PaginationSizeList = function PaginationSizeList(props) {
|
|
|
41
42
|
renderItem: function renderItem(d) {
|
|
42
43
|
return "".concat(d, " ").concat(text.page || '');
|
|
43
44
|
}
|
|
44
|
-
})
|
|
45
|
+
}, sizeListProps), select))
|
|
45
46
|
});
|
|
46
47
|
};
|
|
47
48
|
export default PaginationSizeList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaginationJssStyle, PaginationProps, TextParams } from './pagination.type';
|
|
2
|
-
export interface PaginationSizeListProps extends Pick<PaginationProps, 'pageSizeList' | 'size' | 'disabled' | 'select'> {
|
|
2
|
+
export interface PaginationSizeListProps extends Pick<PaginationProps, 'pageSizeList' | 'size' | 'disabled' | 'select' | 'sizeListProps'> {
|
|
3
3
|
jssStyle?: PaginationJssStyle;
|
|
4
4
|
current: number;
|
|
5
5
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-size-list.type.d.ts","sourceRoot":"","sources":["pagination-size-list.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpF,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination-size-list.type.d.ts","sourceRoot":"","sources":["pagination-size-list.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpF,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,CAAC;IAChG,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["pagination.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["pagination.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,QAAA,MAAM,UAAU,UAAW,eAAe,4CAoJzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -9,8 +9,9 @@ import List from "./pagination-size-list";
|
|
|
9
9
|
import Jumper from "./pagination-jumper";
|
|
10
10
|
import Buttons from "./pagination-buttons";
|
|
11
11
|
import Simple from "./pagination-simple";
|
|
12
|
-
import { usePagination } from '@sheinx/hooks';
|
|
12
|
+
import { usePagination, util } from '@sheinx/hooks';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
var devUseWarning = util.devUseWarning;
|
|
14
15
|
var Pagination = function Pagination(props) {
|
|
15
16
|
var _jssStyle$pagination;
|
|
16
17
|
var className = props.className,
|
|
@@ -38,7 +39,13 @@ var Pagination = function Pagination(props) {
|
|
|
38
39
|
text = _props$text === void 0 ? {} : _props$text,
|
|
39
40
|
pageSizeList = props.pageSizeList,
|
|
40
41
|
style = props.style,
|
|
41
|
-
select = props.select
|
|
42
|
+
select = props.select,
|
|
43
|
+
sizeListProps = props.sizeListProps;
|
|
44
|
+
|
|
45
|
+
// 兼容v1 & v2版本
|
|
46
|
+
if (props.sizeListProps) {
|
|
47
|
+
devUseWarning.deprecated('sizeListProps', 'select', 'Pagination');
|
|
48
|
+
}
|
|
42
49
|
var _usePagination = usePagination({
|
|
43
50
|
total: total,
|
|
44
51
|
span: span,
|
|
@@ -107,7 +114,8 @@ var Pagination = function Pagination(props) {
|
|
|
107
114
|
current: current || 0,
|
|
108
115
|
pageSize: pageSize,
|
|
109
116
|
pageSizeList: pageSizeList,
|
|
110
|
-
onChange: onChange
|
|
117
|
+
onChange: onChange,
|
|
118
|
+
sizeListProps: sizeListProps
|
|
111
119
|
}), i);
|
|
112
120
|
case 'simple':
|
|
113
121
|
return /*#__PURE__*/_jsx(Simple, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -3,7 +3,7 @@ import { ButtonClasses } from '../button/button.type';
|
|
|
3
3
|
import { SelectClasses } from '../select/select.type';
|
|
4
4
|
import { InputClasses } from '../input/input.type';
|
|
5
5
|
import { CommonType } from '../common/type';
|
|
6
|
-
import {
|
|
6
|
+
import { SelectProps as FullSelectProps } from '../select/select.type';
|
|
7
7
|
export type AlignType = 'left' | 'center' | 'right';
|
|
8
8
|
export type LayoutType = ('links' | 'list' | 'jumper' | 'simple' | ((props: PaginationProps) => React.ReactNode))[];
|
|
9
9
|
export interface PaginationJssStyle {
|
|
@@ -12,14 +12,7 @@ export interface PaginationJssStyle {
|
|
|
12
12
|
button?: () => ButtonClasses;
|
|
13
13
|
pagination?: () => PaginationClasses;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
/**
|
|
17
|
-
* @en Set Position can control the different position of DatePicker
|
|
18
|
-
* @cn 弹出框位置
|
|
19
|
-
* @default auto
|
|
20
|
-
*/
|
|
21
|
-
position?: 'auto' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
22
|
-
}
|
|
15
|
+
export type SelectProps = Pick<FullSelectProps<any, any>, 'absolute' | 'width' | 'height' | 'position' | 'optionWidth' | 'emptyText' | 'zIndex'>;
|
|
23
16
|
export interface PaginationClasses {
|
|
24
17
|
rootClass: string;
|
|
25
18
|
pagination: string;
|
|
@@ -121,10 +114,17 @@ export interface PaginationProps extends Pick<CommonType, 'style' | 'className'
|
|
|
121
114
|
simple?: boolean;
|
|
122
115
|
jssStyle?: PaginationJssStyle;
|
|
123
116
|
/**
|
|
124
|
-
* @en Configuration
|
|
125
|
-
* @cn 分页器有关 Select
|
|
117
|
+
* @en Configuration related to the Select component in the pagination, properties same as Select component
|
|
118
|
+
* @cn 分页器有关 Select 组件的配置,属性同 Select 组件
|
|
126
119
|
* @version 3.4.4
|
|
127
120
|
*/
|
|
128
121
|
select?: SelectProps;
|
|
122
|
+
/**
|
|
123
|
+
* @cn 旧版本的属性,新版本中使用 `select` 替代
|
|
124
|
+
* @en Deprecated property, use `select` instead in the new version
|
|
125
|
+
* @version 3.8.0
|
|
126
|
+
* @deprecated
|
|
127
|
+
*/
|
|
128
|
+
sizeListProps?: SelectProps;
|
|
129
129
|
}
|
|
130
130
|
//# sourceMappingURL=pagination.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.type.d.ts","sourceRoot":"","sources":["pagination.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination.type.d.ts","sourceRoot":"","sources":["pagination.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,E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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.8.0-beta.
|
|
3
|
+
"version": "3.8.0-beta.39",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.8.0-beta.
|
|
13
|
+
"@sheinx/hooks": "3.8.0-beta.39",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|