@qsxy/element-plus-react 1.0.0-next.16 → 1.0.0-next.18
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/dist/CheckboxGroup/CheckboxGroup.js +1 -0
- package/dist/ConfigProvider/ConfigProvider.d.ts +2 -0
- package/dist/ConfigProvider/ConfigProvider.js +5 -1
- package/dist/ConfigProvider/index.d.ts +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/Dialog/Dialog.js +3 -1
- package/dist/Empty/Empty.js +1 -1
- package/dist/Empty/ImgEmpty.js +5 -5
- package/dist/Form/Form.d.ts +9 -4
- package/dist/Form/Form.js +6 -4
- package/dist/Form/typings.d.ts +2 -2
- package/dist/MessageBox/MessageBox.js +1 -0
- package/dist/MessageBox/typings.d.ts +1 -0
- package/dist/Pagination/Options.d.ts +7 -2
- package/dist/Pagination/Options.js +68 -53
- package/dist/Pagination/Pager.js +10 -10
- package/dist/Pagination/Pagination.js +288 -318
- package/dist/Pagination/typings.d.ts +27 -28
- package/dist/Select/SelectCore.js +6 -5
- package/dist/Select/SelectDropdown.js +65 -15
- package/dist/Select/typings.d.ts +5 -0
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/hooks/useSelection.d.ts +3 -3
- package/dist/Table/util.d.ts +2 -4
- package/dist/Transfer/ListBody.js +1 -1
- package/dist/TreeSelect/TreeSelect.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/locale/en.d.ts +179 -0
- package/dist/locale/en.js +178 -0
- package/dist/locale/i18n.d.ts +2 -0
- package/dist/locale/i18n.js +44 -0
- package/dist/locale/zhCn.d.ts +178 -0
- package/dist/locale/zhCn.js +177 -0
- package/package.json +4 -1
- package/theme-chalk/pagination/index.scss +227 -439
- package/theme-chalk/select/index.scss +10 -7
|
@@ -16,6 +16,8 @@ export interface ConfigProviderProps {
|
|
|
16
16
|
popper?: {
|
|
17
17
|
appendTo?: HTMLElement;
|
|
18
18
|
};
|
|
19
|
+
locale?: 'en' | 'zh-CN';
|
|
19
20
|
}
|
|
20
21
|
declare const ConfigProvider: import("react").Context<ConfigProviderProps>;
|
|
22
|
+
export declare const useConfigProvider: () => ConfigProviderProps;
|
|
21
23
|
export default ConfigProvider;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
2
|
var ConfigProvider = /*#__PURE__*/createContext({
|
|
3
3
|
// message: { max: Infinity },
|
|
4
4
|
inputNumber: {
|
|
5
5
|
controlsPositionRight: false
|
|
6
6
|
},
|
|
7
|
+
locale: 'en',
|
|
7
8
|
popper: {}
|
|
8
9
|
});
|
|
10
|
+
export var useConfigProvider = function useConfigProvider() {
|
|
11
|
+
return useContext(ConfigProvider);
|
|
12
|
+
};
|
|
9
13
|
ConfigProvider.displayName = 'ConfigProvider';
|
|
10
14
|
export default ConfigProvider;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ConfigProvider } from './ConfigProvider';
|
|
1
|
+
export { default as ConfigProvider, useConfigProvider } from './ConfigProvider';
|
|
2
2
|
export type { ConfigProviderProps } from './ConfigProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ConfigProvider } from "./ConfigProvider";
|
|
1
|
+
export { default as ConfigProvider, useConfigProvider } from "./ConfigProvider";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DateTimePickerRef } from './typings';
|
|
3
|
-
declare const DateTimePicker: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<import("..").DatePickerProps, "
|
|
3
|
+
declare const DateTimePicker: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<import("..").DatePickerProps, "name" | "type"> & {
|
|
4
4
|
name?: string;
|
|
5
5
|
onClear?: (event?: any) => void;
|
|
6
6
|
defaultTime?: Date;
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -41,6 +41,7 @@ function InternalElDialog(props, ref) {
|
|
|
41
41
|
alignCenter = props.alignCenter,
|
|
42
42
|
draggable = props.draggable,
|
|
43
43
|
fullscreen = props.fullscreen,
|
|
44
|
+
headerClass = props.headerClass,
|
|
44
45
|
top = props.top,
|
|
45
46
|
close = props.close,
|
|
46
47
|
beforeClose = props.beforeClose,
|
|
@@ -245,7 +246,8 @@ function InternalElDialog(props, ref) {
|
|
|
245
246
|
ref: headerRef,
|
|
246
247
|
classPrefix: classPrefix,
|
|
247
248
|
showClose: showClose,
|
|
248
|
-
border: border
|
|
249
|
+
border: border,
|
|
250
|
+
headerClass: headerClass
|
|
249
251
|
}, title), children)))), document.body));
|
|
250
252
|
}
|
|
251
253
|
var Comp = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(InternalElDialog));
|
package/dist/Empty/Empty.js
CHANGED
package/dist/Empty/ImgEmpty.js
CHANGED
|
@@ -16,10 +16,10 @@ var ImgEmpty = function ImgEmpty() {
|
|
|
16
16
|
x2: "61.1496914%",
|
|
17
17
|
y2: "100%"
|
|
18
18
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
19
|
-
|
|
19
|
+
stopColor: "var(--el-empty-fill-color-1)",
|
|
20
20
|
offset: "0%"
|
|
21
21
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
22
|
-
|
|
22
|
+
stopColor: "var(--el-empty-fill-color-4)",
|
|
23
23
|
offset: "100%"
|
|
24
24
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
25
25
|
id: ids[1],
|
|
@@ -28,10 +28,10 @@ var ImgEmpty = function ImgEmpty() {
|
|
|
28
28
|
x2: "100%",
|
|
29
29
|
y2: "90.5%"
|
|
30
30
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
31
|
-
|
|
31
|
+
stopColor: "var(--el-empty-fill-color-1)",
|
|
32
32
|
offset: "0%"
|
|
33
33
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
34
|
-
|
|
34
|
+
stopColor: "var(--el-empty-fill-color-6)",
|
|
35
35
|
offset: "100%"
|
|
36
36
|
})), /*#__PURE__*/React.createElement("rect", {
|
|
37
37
|
id: "path-3-1",
|
|
@@ -42,7 +42,7 @@ var ImgEmpty = function ImgEmpty() {
|
|
|
42
42
|
})), /*#__PURE__*/React.createElement("g", {
|
|
43
43
|
id: "Illustrations",
|
|
44
44
|
stroke: "none",
|
|
45
|
-
|
|
45
|
+
strokeWidth: "1",
|
|
46
46
|
fill: "none",
|
|
47
47
|
fillRule: "evenodd"
|
|
48
48
|
}, /*#__PURE__*/React.createElement("g", {
|
package/dist/Form/Form.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React, { ForwardedRef } from 'react';
|
|
2
2
|
import { FormProvider } from './FormContext';
|
|
3
3
|
import Field from './FormItem';
|
|
4
4
|
import List from './List';
|
|
5
|
-
import { FormProps } from './typings';
|
|
5
|
+
import { FormInstance, FormProps, Store } from './typings';
|
|
6
6
|
import useForm from './useForm';
|
|
7
7
|
import useWatch from './useWatch';
|
|
8
|
-
|
|
8
|
+
declare const ForwardForm: <RecordType = Store>(props: FormProps<RecordType> & {
|
|
9
|
+
ref?: ForwardedRef<FormInstance<RecordType>>;
|
|
10
|
+
}) => React.ReactElement;
|
|
11
|
+
type InternalFormType = typeof ForwardForm;
|
|
12
|
+
interface FormInterface extends InternalFormType {
|
|
13
|
+
displayName?: string;
|
|
9
14
|
FormProvider: typeof FormProvider;
|
|
10
15
|
Item: typeof Field;
|
|
11
16
|
List: typeof List;
|
|
12
17
|
useForm: typeof useForm;
|
|
13
18
|
useWatch: typeof useWatch;
|
|
14
19
|
}
|
|
15
|
-
declare const Form:
|
|
20
|
+
declare const Form: FormInterface;
|
|
16
21
|
export default Form;
|
package/dist/Form/Form.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
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
|
+
var _templateObject;
|
|
2
3
|
var _excluded = ["colon", "inline", "labelPosition", "cols", "flat", "formStyle", "name", "initialValues", "fields", "component", "preserve", "children", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed", "className", "disabled", "labelWidth", "size", "rules", "hideRequiredAsterisk", "requireAsteriskPosition", "showMessage", "scrollToError"];
|
|
3
|
-
var _this = this,
|
|
4
|
-
_templateObject;
|
|
5
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
5
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
7
6
|
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; }
|
|
@@ -29,7 +28,8 @@ import List from "./List";
|
|
|
29
28
|
import useForm from "./useForm";
|
|
30
29
|
import useWatch from "./useWatch";
|
|
31
30
|
import { isSimilar } from "./utils/valueUtil";
|
|
32
|
-
|
|
31
|
+
function InternalForm(props, ref) {
|
|
32
|
+
var _this = this;
|
|
33
33
|
props = mergeDefaultProps({
|
|
34
34
|
inline: false,
|
|
35
35
|
cols: 0,
|
|
@@ -189,7 +189,9 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
189
189
|
restProps === null || restProps === void 0 || (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 || _restProps$onReset.call(_this, event);
|
|
190
190
|
}
|
|
191
191
|
}), wrapperNode);
|
|
192
|
-
}
|
|
192
|
+
}
|
|
193
|
+
var ForwardForm = /*#__PURE__*/forwardRef(InternalForm);
|
|
194
|
+
var Form = ForwardForm;
|
|
193
195
|
Form.FormProvider = FormProvider;
|
|
194
196
|
Form.Item = Field;
|
|
195
197
|
Form.List = List;
|
package/dist/Form/typings.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { InternalFieldProps } from './FormItem';
|
|
|
5
5
|
type BaseFormProps = Omit<React.AllHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'form' | 'size' | 'children'>;
|
|
6
6
|
type RenderProps = (values: Store, form: FormInstance) => React.ReactElement;
|
|
7
7
|
export type FormRules = Record<string, Rule[] | Record<string, Rule[]>>;
|
|
8
|
-
export interface FormProps<Values =
|
|
8
|
+
export interface FormProps<Values = Store> extends BaseFormProps {
|
|
9
9
|
/** 经 Form.useForm() 创建的 form 控制实例,不提供时会自动创建 */
|
|
10
10
|
form?: FormInstance<Values>;
|
|
11
11
|
children?: RenderProps | ComponentChildren;
|
|
@@ -25,7 +25,7 @@ export interface FormProps<Values = any> extends BaseFormProps {
|
|
|
25
25
|
/** 配置 Form.Item 的 colon 的默认值。表示是否显示 label 后面的冒号 */
|
|
26
26
|
colon?: boolean;
|
|
27
27
|
/** 表单默认值,只有初始化以及重置时生效 */
|
|
28
|
-
initialValues?:
|
|
28
|
+
initialValues?: Values;
|
|
29
29
|
/** 表单域标签的位置, 如果值为 left 或者 right 时,则需要设置 label-width */
|
|
30
30
|
labelPosition?: 'left' | 'right' | 'top';
|
|
31
31
|
/** 表单域标签的宽度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 支持 auto。 */
|
|
@@ -208,6 +208,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
208
208
|
get ref() {
|
|
209
209
|
return containerRef;
|
|
210
210
|
},
|
|
211
|
+
inputValue: inputValue,
|
|
211
212
|
close: done,
|
|
212
213
|
setConfirmButtonLoading: setConfirmButtonLoading,
|
|
213
214
|
setConfirmButtonText: setConfirmButtonText
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
+
import { TypeAttributes } from '../types/common';
|
|
2
3
|
interface Props {
|
|
3
4
|
goButton?: React.ReactElement | boolean;
|
|
4
5
|
quickGo?: (val: number) => void;
|
|
5
6
|
rootPrefixCls?: string;
|
|
6
7
|
pageSize: number;
|
|
7
|
-
|
|
8
|
+
/** 默认的每页条数 */
|
|
9
|
+
defaultPageSize?: number;
|
|
10
|
+
pageSizeOptions?: Array<number>;
|
|
8
11
|
selectComponentClass?: string;
|
|
9
12
|
selectPrefixCls?: string;
|
|
10
13
|
disabled?: boolean;
|
|
14
|
+
simple?: boolean;
|
|
11
15
|
current?: number;
|
|
12
16
|
changeSize: ((page: number) => void) | null;
|
|
13
|
-
|
|
17
|
+
size?: TypeAttributes.Size;
|
|
18
|
+
type: 'sizes' | 'jumper';
|
|
14
19
|
}
|
|
15
20
|
declare const Options: FC<Props>;
|
|
16
21
|
export default Options;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -6,7 +6,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
6
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
-
import
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
|
+
import { useTranslation } from 'react-i18next';
|
|
12
|
+
import { ElInput } from '..';
|
|
13
|
+
import { useConfigProvider } from "../ConfigProvider";
|
|
10
14
|
import ElOption from "../Select/Option";
|
|
11
15
|
import Select from "../Select/Select";
|
|
12
16
|
import { useClassNames } from "../hooks";
|
|
@@ -14,42 +18,50 @@ var Options = function Options(props) {
|
|
|
14
18
|
var rootPrefixCls = props.rootPrefixCls,
|
|
15
19
|
changeSize = props.changeSize,
|
|
16
20
|
quickGo = props.quickGo,
|
|
21
|
+
current = props.current,
|
|
17
22
|
goButton = props.goButton,
|
|
18
23
|
disabled = props.disabled,
|
|
19
|
-
|
|
20
|
-
_pageSizeOptions =
|
|
24
|
+
simple = props.simple,
|
|
25
|
+
_pageSizeOptions = props.pageSizeOptions,
|
|
21
26
|
pageSize = props.pageSize,
|
|
22
|
-
|
|
27
|
+
defaultPageSize = props.defaultPageSize,
|
|
28
|
+
type = props.type,
|
|
29
|
+
size = props.size;
|
|
23
30
|
var _useState = useState(''),
|
|
24
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
32
|
goInputText = _useState2[0],
|
|
26
33
|
setGoInputText = _useState2[1];
|
|
27
|
-
var _useClassNames = useClassNames(
|
|
28
|
-
b = _useClassNames.b
|
|
34
|
+
var _useClassNames = useClassNames(rootPrefixCls),
|
|
35
|
+
b = _useClassNames.b,
|
|
36
|
+
e = _useClassNames.e,
|
|
37
|
+
is = _useClassNames.is;
|
|
38
|
+
var _useTranslation = useTranslation(),
|
|
39
|
+
t = _useTranslation.t;
|
|
40
|
+
var _useConfigProvider = useConfigProvider(),
|
|
41
|
+
locale = _useConfigProvider.locale;
|
|
29
42
|
var getValidValue = useMemo(function () {
|
|
30
43
|
return !goInputText || typeof goInputText === 'number' ? undefined : Number(goInputText);
|
|
31
44
|
}, [goInputText]);
|
|
32
|
-
var go = useCallback(function (
|
|
45
|
+
var go = useCallback(function (event) {
|
|
33
46
|
if (goInputText === '') {
|
|
34
47
|
return;
|
|
35
48
|
}
|
|
36
|
-
if (
|
|
37
|
-
setGoInputText('');
|
|
49
|
+
if (event.key === 'Enter' || event.type === 'click') {
|
|
38
50
|
getValidValue && (quickGo === null || quickGo === void 0 ? void 0 : quickGo(getValidValue));
|
|
39
51
|
}
|
|
40
52
|
}, [getValidValue, goInputText, quickGo]);
|
|
41
53
|
var handleChangeSize = useCallback(function (value) {
|
|
42
54
|
changeSize === null || changeSize === void 0 || changeSize(Number(value));
|
|
43
55
|
}, [changeSize]);
|
|
44
|
-
var handleChange = useCallback(function (
|
|
45
|
-
setGoInputText(
|
|
56
|
+
var handleChange = useCallback(function (value) {
|
|
57
|
+
setGoInputText(value);
|
|
46
58
|
}, []);
|
|
47
|
-
var handleBlur = useCallback(function (
|
|
59
|
+
var handleBlur = useCallback(function (event) {
|
|
48
60
|
if (goButton || goInputText === '') {
|
|
49
61
|
return;
|
|
50
62
|
}
|
|
51
63
|
setGoInputText('');
|
|
52
|
-
if (
|
|
64
|
+
if (event.relatedTarget && (event.relatedTarget.className.indexOf(b(_templateObject || (_templateObject = _taggedTemplateLiteral(["item-link"])))) >= 0 || event.relatedTarget.className.indexOf(b(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["item"])))) >= 0)) {
|
|
53
65
|
return;
|
|
54
66
|
}
|
|
55
67
|
getValidValue && (quickGo === null || quickGo === void 0 ? void 0 : quickGo(getValidValue));
|
|
@@ -60,7 +72,7 @@ var Options = function Options(props) {
|
|
|
60
72
|
})) {
|
|
61
73
|
return _pageSizeOptions;
|
|
62
74
|
}
|
|
63
|
-
return _pageSizeOptions.concat([pageSize
|
|
75
|
+
return _pageSizeOptions.concat([pageSize]).sort(function (x, y) {
|
|
64
76
|
var numberA = isNaN(Number(x)) ? 0 : Number(x);
|
|
65
77
|
var numberB = isNaN(Number(y)) ? 0 : Number(y);
|
|
66
78
|
return numberA - numberB;
|
|
@@ -72,52 +84,55 @@ var Options = function Options(props) {
|
|
|
72
84
|
filterable: false,
|
|
73
85
|
className: b(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["size-changer"]))),
|
|
74
86
|
clearable: false,
|
|
75
|
-
size:
|
|
76
|
-
value:
|
|
77
|
-
|
|
78
|
-
,
|
|
87
|
+
size: size,
|
|
88
|
+
value: pageSize,
|
|
89
|
+
defaultValue: defaultPageSize || _pageSizeOptions[0],
|
|
79
90
|
onChange: handleChangeSize
|
|
80
91
|
}, pageSizeOptions.map(function (opt, i) {
|
|
81
92
|
return /*#__PURE__*/React.createElement(ElOption, {
|
|
82
93
|
key: i,
|
|
83
94
|
value: opt,
|
|
84
|
-
label: "".concat(opt, "
|
|
95
|
+
label: "".concat(opt, " ").concat(t('el.pagination.pagesize', {
|
|
96
|
+
lng: locale
|
|
97
|
+
}))
|
|
85
98
|
});
|
|
86
99
|
}));
|
|
87
|
-
}, [changeSize, disabled, b,
|
|
100
|
+
}, [changeSize, disabled, b, size, pageSize, defaultPageSize, _pageSizeOptions, handleChangeSize, pageSizeOptions, t, locale]);
|
|
101
|
+
useEffect(function () {
|
|
102
|
+
return setGoInputText(current + '');
|
|
103
|
+
}, [current]);
|
|
88
104
|
var goInput = useMemo(function () {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, simple ? null : /*#__PURE__*/React.createElement("span", {
|
|
106
|
+
className: e(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["goto"])))
|
|
107
|
+
}, t('el.pagination.goto', {
|
|
108
|
+
lng: locale
|
|
109
|
+
})), /*#__PURE__*/React.createElement(ElInput, {
|
|
110
|
+
className: e(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["editor"]))),
|
|
111
|
+
disabled: disabled,
|
|
112
|
+
value: goInputText,
|
|
113
|
+
size: size,
|
|
114
|
+
onChange: handleChange,
|
|
115
|
+
onKeyUp: go,
|
|
116
|
+
placeholder: "",
|
|
117
|
+
clearable: false
|
|
118
|
+
}), simple ? null : /*#__PURE__*/React.createElement("span", {
|
|
119
|
+
className: e(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["classifier"])))
|
|
120
|
+
}, t('el.pagination.pageClassifier', {
|
|
121
|
+
lng: locale
|
|
122
|
+
})));
|
|
123
|
+
}, [disabled, e, go, goInputText, handleChange, locale, simple, size, t]);
|
|
124
|
+
if (type === 'sizes') {
|
|
125
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
126
|
+
className: classNames(e(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["sizes"]))), b(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["item"]))))
|
|
127
|
+
}, changeSelect);
|
|
128
|
+
}
|
|
129
|
+
if (type === 'jumper') {
|
|
130
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
131
|
+
className: classNames(e(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["jump"]))), b(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["item"]))), is({
|
|
132
|
+
simple: simple
|
|
133
|
+
}))
|
|
134
|
+
}, goInput);
|
|
118
135
|
}
|
|
119
|
-
return
|
|
120
|
-
className: b()
|
|
121
|
-
}, changeSelect, goInput);
|
|
136
|
+
return null;
|
|
122
137
|
};
|
|
123
138
|
export default Options;
|
package/dist/Pagination/Pager.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
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; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
5
|
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,22 +11,22 @@ var Pager = function Pager(props) {
|
|
|
11
11
|
var _props$classPrefix = props.classPrefix,
|
|
12
12
|
classPrefix = _props$classPrefix === void 0 ? 'pagination-item' : _props$classPrefix,
|
|
13
13
|
page = props.page,
|
|
14
|
-
showTitle = props.showTitle,
|
|
15
14
|
active = props.active,
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
disabled = props.disabled,
|
|
16
|
+
onClick = props.onClick;
|
|
18
17
|
var _useClassNames = useClassNames(classPrefix),
|
|
19
|
-
b = _useClassNames.b
|
|
18
|
+
b = _useClassNames.b,
|
|
19
|
+
is = _useClassNames.is;
|
|
20
20
|
var handleClick = function handleClick() {
|
|
21
21
|
onClick === null || onClick === void 0 || onClick(page);
|
|
22
22
|
};
|
|
23
23
|
return /*#__PURE__*/React.createElement("li", {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
className: classNames('number', is({
|
|
25
|
+
active: active,
|
|
26
|
+
disabled: disabled
|
|
27
|
+
}), _defineProperty({}, b(_templateObject || (_templateObject = _taggedTemplateLiteral(["disabled"]))), !page), props.className),
|
|
26
28
|
onClick: handleClick,
|
|
27
29
|
tabIndex: 0
|
|
28
|
-
},
|
|
29
|
-
rel: "nofollow"
|
|
30
|
-
}, page)));
|
|
30
|
+
}, page);
|
|
31
31
|
};
|
|
32
32
|
export default Pager;
|