antd-mobile 5.7.2 → 5.8.2
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/2x/cjs/components/dialog/dialog.js +2 -2
- package/2x/cjs/components/form/form-array.d.ts +1 -0
- package/2x/cjs/components/form/form-array.js +1 -1
- package/2x/cjs/components/form/form-item.d.ts +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.js +2 -1
- package/2x/cjs/components/input/input.d.ts +3 -2
- package/2x/cjs/components/input/input.js +6 -0
- package/2x/cjs/components/modal/modal.js +2 -2
- package/2x/cjs/components/popover/popover.js +6 -7
- package/2x/cjs/components/search-bar/search-bar.js +7 -0
- package/2x/cjs/components/slider/slider.css +2 -0
- package/2x/cjs/components/slider/slider.d.ts +2 -1
- package/2x/cjs/components/slider/slider.js +3 -1
- package/2x/cjs/components/slider/thumb.d.ts +2 -1
- package/2x/cjs/components/slider/thumb.js +3 -2
- package/2x/cjs/components/text-area/text-area.d.ts +2 -2
- package/2x/cjs/components/text-area/text-area.js +1 -0
- package/2x/cjs/locales/base.d.ts +1 -0
- package/2x/cjs/locales/base.js +1 -0
- package/2x/cjs/locales/en-US.d.ts +1 -0
- package/2x/cjs/locales/es-ES.d.ts +102 -0
- package/2x/cjs/locales/es-ES.js +115 -0
- package/2x/cjs/locales/fa-IR.d.ts +1 -0
- package/2x/cjs/locales/fa-IR.js +1 -0
- package/2x/cjs/locales/zh-CN.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.js +1 -0
- package/2x/cjs/locales/zh-HK.d.ts +1 -0
- package/2x/cjs/locales/zh-HK.js +1 -0
- package/2x/cjs/locales/zh-TW.d.ts +1 -0
- package/2x/cjs/locales/zh-TW.js +1 -0
- package/2x/cjs/utils/measure-css-length.d.ts +1 -1
- package/2x/cjs/utils/measure-css-length.js +8 -0
- package/2x/es/components/dialog/dialog.js +2 -2
- package/2x/es/components/form/form-array.d.ts +1 -0
- package/2x/es/components/form/form-array.js +1 -1
- package/2x/es/components/form/form-item.d.ts +1 -1
- package/2x/es/components/image-uploader/image-uploader.js +2 -1
- package/2x/es/components/input/input.d.ts +3 -2
- package/2x/es/components/input/input.js +6 -0
- package/2x/es/components/modal/modal.js +2 -2
- package/2x/es/components/popover/popover.js +1 -2
- package/2x/es/components/search-bar/search-bar.js +7 -0
- package/2x/es/components/slider/slider.css +2 -0
- package/2x/es/components/slider/slider.d.ts +2 -1
- package/2x/es/components/slider/slider.js +3 -1
- package/2x/es/components/slider/thumb.d.ts +2 -1
- package/2x/es/components/slider/thumb.js +3 -2
- package/2x/es/components/text-area/text-area.d.ts +2 -2
- package/2x/es/components/text-area/text-area.js +1 -0
- package/2x/es/locales/base.d.ts +1 -0
- package/2x/es/locales/base.js +1 -0
- package/2x/es/locales/en-US.d.ts +1 -0
- package/2x/es/locales/es-ES.d.ts +102 -0
- package/2x/es/locales/es-ES.js +105 -0
- package/2x/es/locales/fa-IR.d.ts +1 -0
- package/2x/es/locales/fa-IR.js +1 -0
- package/2x/es/locales/zh-CN.d.ts +1 -0
- package/2x/es/locales/zh-CN.js +1 -0
- package/2x/es/locales/zh-HK.d.ts +1 -0
- package/2x/es/locales/zh-HK.js +1 -0
- package/2x/es/locales/zh-TW.d.ts +1 -0
- package/2x/es/locales/zh-TW.js +1 -0
- package/2x/es/utils/measure-css-length.d.ts +1 -1
- package/2x/es/utils/measure-css-length.js +8 -0
- package/2x/package.json +8 -8
- package/cjs/components/dialog/dialog.js +2 -2
- package/cjs/components/form/form-array.d.ts +1 -0
- package/cjs/components/form/form-array.js +1 -1
- package/cjs/components/form/form-item.d.ts +1 -1
- package/cjs/components/image-uploader/image-uploader.js +2 -1
- package/cjs/components/input/input.d.ts +3 -2
- package/cjs/components/input/input.js +6 -0
- package/cjs/components/modal/modal.js +2 -2
- package/cjs/components/popover/popover.js +6 -7
- package/cjs/components/search-bar/search-bar.js +7 -0
- package/cjs/components/slider/slider.css +2 -0
- package/cjs/components/slider/slider.d.ts +2 -1
- package/cjs/components/slider/slider.js +3 -1
- package/cjs/components/slider/thumb.d.ts +2 -1
- package/cjs/components/slider/thumb.js +3 -2
- package/cjs/components/text-area/text-area.d.ts +2 -2
- package/cjs/components/text-area/text-area.js +1 -0
- package/cjs/locales/base.d.ts +1 -0
- package/cjs/locales/base.js +1 -0
- package/cjs/locales/en-US.d.ts +1 -0
- package/cjs/locales/es-ES.d.ts +102 -0
- package/cjs/locales/es-ES.js +115 -0
- package/cjs/locales/fa-IR.d.ts +1 -0
- package/cjs/locales/fa-IR.js +1 -0
- package/cjs/locales/zh-CN.d.ts +1 -0
- package/cjs/locales/zh-CN.js +1 -0
- package/cjs/locales/zh-HK.d.ts +1 -0
- package/cjs/locales/zh-HK.js +1 -0
- package/cjs/locales/zh-TW.d.ts +1 -0
- package/cjs/locales/zh-TW.js +1 -0
- package/cjs/utils/measure-css-length.d.ts +1 -1
- package/cjs/utils/measure-css-length.js +8 -0
- package/es/components/dialog/dialog.js +2 -2
- package/es/components/form/form-array.d.ts +1 -0
- package/es/components/form/form-array.js +1 -1
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/image-uploader/image-uploader.js +2 -1
- package/es/components/input/input.d.ts +3 -2
- package/es/components/input/input.js +6 -0
- package/es/components/modal/modal.js +2 -2
- package/es/components/popover/popover.js +1 -2
- package/es/components/search-bar/search-bar.js +7 -0
- package/es/components/slider/slider.css +2 -0
- package/es/components/slider/slider.d.ts +2 -1
- package/es/components/slider/slider.js +3 -1
- package/es/components/slider/thumb.d.ts +2 -1
- package/es/components/slider/thumb.js +3 -2
- package/es/components/text-area/text-area.d.ts +2 -2
- package/es/components/text-area/text-area.js +1 -0
- package/es/locales/base.d.ts +1 -0
- package/es/locales/base.js +1 -0
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/es-ES.d.ts +102 -0
- package/es/locales/es-ES.js +105 -0
- package/es/locales/fa-IR.d.ts +1 -0
- package/es/locales/fa-IR.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-HK.d.ts +1 -0
- package/es/locales/zh-HK.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/es/utils/measure-css-length.d.ts +1 -1
- package/es/utils/measure-css-length.js +8 -0
- package/package.json +8 -8
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/popover/temp-floating-ui.min.d.ts +0 -1
- package/2x/cjs/components/popover/temp-floating-ui.min.js +0 -1
- package/2x/es/components/popover/temp-floating-ui.min.d.ts +0 -1
- package/2x/es/components/popover/temp-floating-ui.min.js +0 -1
- package/cjs/components/popover/temp-floating-ui.min.d.ts +0 -1
- package/cjs/components/popover/temp-floating-ui.min.js +0 -1
- package/es/components/popover/temp-floating-ui.min.d.ts +0 -1
- package/es/components/popover/temp-floating-ui.min.js +0 -1
|
@@ -13,6 +13,7 @@ export interface FormArrayProps {
|
|
|
13
13
|
name: string | number | (string | number)[];
|
|
14
14
|
initialValue?: any[];
|
|
15
15
|
renderHeader?: (field: FormArrayField, operation: FormArrayOperation) => ReactNode;
|
|
16
|
+
onAdd?: (operation: FormArrayOperation) => void;
|
|
16
17
|
renderAdd?: () => ReactNode;
|
|
17
18
|
children: (fields: FormArrayField[], operation: FormArrayOperation) => ReactElement[];
|
|
18
19
|
}
|
|
@@ -39,7 +39,7 @@ const FormArray = props => {
|
|
|
39
39
|
}, _react.default.createElement(_list.default.Item, {
|
|
40
40
|
className: 'adm-form-list-operation',
|
|
41
41
|
onClick: () => {
|
|
42
|
-
operation.add();
|
|
42
|
+
props.onAdd ? props.onAdd(operation) : operation.add();
|
|
43
43
|
},
|
|
44
44
|
arrow: false
|
|
45
45
|
}, props.renderAdd())));
|
|
@@ -17,7 +17,7 @@ export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePr
|
|
|
17
17
|
hidden?: boolean;
|
|
18
18
|
layout?: FormLayout;
|
|
19
19
|
childElementPosition?: 'normal' | 'right';
|
|
20
|
-
children
|
|
20
|
+
children?: ChildrenType;
|
|
21
21
|
} & NativeProps;
|
|
22
22
|
export declare const FormItem: FC<FormItemProps>;
|
|
23
23
|
export {};
|
|
@@ -172,7 +172,8 @@ const ImageUploader = p => {
|
|
|
172
172
|
className: classPrefix
|
|
173
173
|
}, _react.default.createElement(_space.default, {
|
|
174
174
|
className: `${classPrefix}-space`,
|
|
175
|
-
wrap: true
|
|
175
|
+
wrap: true,
|
|
176
|
+
block: true
|
|
176
177
|
}, value.map((fileItem, index) => {
|
|
177
178
|
var _a, _b;
|
|
178
179
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
declare type NativeInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
4
|
-
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'autoComplete' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
4
|
+
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'autoComplete' | 'autoFocus' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
7
|
onChange?: (val: string) => void;
|
|
@@ -20,8 +20,9 @@ export declare type InputRef = {
|
|
|
20
20
|
clear: () => void;
|
|
21
21
|
focus: () => void;
|
|
22
22
|
blur: () => void;
|
|
23
|
+
nativeElement: HTMLInputElement | null;
|
|
23
24
|
};
|
|
24
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
25
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "autoFocus" | "maxLength" | "minLength"> & {
|
|
25
26
|
value?: string | undefined;
|
|
26
27
|
defaultValue?: string | undefined;
|
|
27
28
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -49,7 +49,12 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
49
49
|
var _a;
|
|
50
50
|
|
|
51
51
|
(_a = nativeInputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
get nativeElement() {
|
|
55
|
+
return nativeInputRef.current;
|
|
52
56
|
}
|
|
57
|
+
|
|
53
58
|
}));
|
|
54
59
|
|
|
55
60
|
const handleKeydown = e => {
|
|
@@ -117,6 +122,7 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
117
122
|
max: props.max,
|
|
118
123
|
min: props.min,
|
|
119
124
|
autoComplete: props.autoComplete,
|
|
125
|
+
autoFocus: props.autoFocus,
|
|
120
126
|
pattern: props.pattern,
|
|
121
127
|
inputMode: props.inputMode,
|
|
122
128
|
type: props.type,
|
|
@@ -23,7 +23,7 @@ var _arrow = require("./arrow");
|
|
|
23
23
|
|
|
24
24
|
var _renderToContainer = require("../../utils/render-to-container");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _dom = require("@floating-ui/dom");
|
|
27
27
|
|
|
28
28
|
var _wrapper = require("./wrapper");
|
|
29
29
|
|
|
@@ -98,13 +98,13 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
|
|
|
98
98
|
y,
|
|
99
99
|
placement: realPlacement,
|
|
100
100
|
middlewareData
|
|
101
|
-
} = yield (0,
|
|
101
|
+
} = yield (0, _dom.computePosition)(target, floating, {
|
|
102
102
|
placement,
|
|
103
|
-
middleware: [(0,
|
|
103
|
+
middleware: [(0, _dom.offset)((0, _convertPx.convertPx)(12)), (0, _dom.shift)({
|
|
104
104
|
padding: (0, _convertPx.convertPx)(4),
|
|
105
105
|
crossAxis: false,
|
|
106
|
-
limiter: (0,
|
|
107
|
-
}), (0,
|
|
106
|
+
limiter: (0, _dom.limitShift)()
|
|
107
|
+
}), (0, _dom.flip)(), (0, _dom.hide)(), (0, _dom.arrow)({
|
|
108
108
|
element: arrowElement,
|
|
109
109
|
padding: (0, _convertPx.convertPx)(12)
|
|
110
110
|
})]
|
|
@@ -149,7 +149,6 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
|
|
|
149
149
|
if (!props.trigger) return;
|
|
150
150
|
|
|
151
151
|
function handleClick() {
|
|
152
|
-
console.log('handleClick');
|
|
153
152
|
setVisible(v => !v);
|
|
154
153
|
}
|
|
155
154
|
|
|
@@ -161,7 +160,7 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
|
|
|
161
160
|
(0, _react.useEffect)(() => {
|
|
162
161
|
const floatingElement = floatingRef.current;
|
|
163
162
|
if (!targetElement || !floatingElement) return;
|
|
164
|
-
return (0,
|
|
163
|
+
return (0, _dom.autoUpdate)(targetElement, floatingElement, update);
|
|
165
164
|
}, [targetElement]);
|
|
166
165
|
(0, _ahooks.useClickAway)(() => {
|
|
167
166
|
if (!props.trigger) return;
|
|
@@ -62,7 +62,14 @@ const SearchBar = (0, _react.forwardRef)((p, ref) => {
|
|
|
62
62
|
var _a;
|
|
63
63
|
|
|
64
64
|
return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
get nativeElement() {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
|
|
70
|
+
return (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null;
|
|
65
71
|
}
|
|
72
|
+
|
|
66
73
|
}));
|
|
67
74
|
|
|
68
75
|
const renderCancelButton = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { SliderMarks } from './marks';
|
|
4
4
|
export declare type SliderValue = number | [number, number];
|
|
@@ -12,6 +12,7 @@ export declare type SliderProps = {
|
|
|
12
12
|
ticks?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
range?: boolean;
|
|
15
|
+
icon?: React.ReactNode;
|
|
15
16
|
onChange?: (value: SliderValue) => void;
|
|
16
17
|
onAfterChange?: (value: SliderValue) => void;
|
|
17
18
|
} & NativeProps<'--fill-color'>;
|
|
@@ -49,7 +49,8 @@ const Slider = p => {
|
|
|
49
49
|
disabled,
|
|
50
50
|
marks,
|
|
51
51
|
ticks,
|
|
52
|
-
step
|
|
52
|
+
step,
|
|
53
|
+
icon
|
|
53
54
|
} = props;
|
|
54
55
|
|
|
55
56
|
function sortValue(val) {
|
|
@@ -149,6 +150,7 @@ const Slider = p => {
|
|
|
149
150
|
|
|
150
151
|
const renderThumb = index => {
|
|
151
152
|
return _react.default.createElement(_thumb.default, {
|
|
153
|
+
icon: icon,
|
|
152
154
|
key: index,
|
|
153
155
|
value: sliderValue[index],
|
|
154
156
|
min: min,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, RefObject } from 'react';
|
|
1
|
+
import React, { FC, RefObject } from 'react';
|
|
2
2
|
declare type ThumbProps = {
|
|
3
3
|
value: number;
|
|
4
4
|
min: number;
|
|
@@ -6,6 +6,7 @@ declare type ThumbProps = {
|
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
onDrag: (value: number, first: boolean, last: boolean) => void;
|
|
8
8
|
trackRef: RefObject<HTMLDivElement>;
|
|
9
|
+
icon?: React.ReactNode;
|
|
9
10
|
};
|
|
10
11
|
declare const Thumb: FC<ThumbProps>;
|
|
11
12
|
export default Thumb;
|
|
@@ -23,7 +23,8 @@ const Thumb = props => {
|
|
|
23
23
|
min,
|
|
24
24
|
max,
|
|
25
25
|
disabled,
|
|
26
|
-
onDrag
|
|
26
|
+
onDrag,
|
|
27
|
+
icon
|
|
27
28
|
} = props;
|
|
28
29
|
const prevValue = (0, _react.useRef)(value);
|
|
29
30
|
|
|
@@ -59,7 +60,7 @@ const Thumb = props => {
|
|
|
59
60
|
style: currentPosition()
|
|
60
61
|
}, bind()), _react.default.createElement("div", {
|
|
61
62
|
className: `${classPrefix}-thumb`
|
|
62
|
-
}, _react.default.createElement(_thumbIcon.ThumbIcon, {
|
|
63
|
+
}, icon ? icon : _react.default.createElement(_thumbIcon.ThumbIcon, {
|
|
63
64
|
className: `${classPrefix}-thumb-icon`
|
|
64
65
|
})));
|
|
65
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
|
-
export declare type TextAreaProps = Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'autoComplete' | 'disabled' | 'readOnly' | 'onFocus' | 'onBlur' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
4
|
+
export declare type TextAreaProps = Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'autoComplete' | 'autoFocus' | 'disabled' | 'readOnly' | 'onFocus' | 'onBlur' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
5
5
|
onChange?: (val: string) => void;
|
|
6
6
|
value?: string;
|
|
7
7
|
defaultValue?: string;
|
|
@@ -20,7 +20,7 @@ export declare type TextAreaRef = {
|
|
|
20
20
|
focus: () => void;
|
|
21
21
|
blur: () => void;
|
|
22
22
|
};
|
|
23
|
-
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "disabled" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoComplete" | "readOnly"> & {
|
|
23
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "disabled" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoComplete" | "autoFocus" | "readOnly"> & {
|
|
24
24
|
onChange?: ((val: string) => void) | undefined;
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
defaultValue?: string | undefined;
|
|
@@ -127,6 +127,7 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
|
127
127
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
128
128
|
},
|
|
129
129
|
autoComplete: props.autoComplete,
|
|
130
|
+
autoFocus: props.autoFocus,
|
|
130
131
|
disabled: props.disabled,
|
|
131
132
|
readOnly: props.readOnly,
|
|
132
133
|
onFocus: props.onFocus,
|
package/2x/cjs/locales/base.d.ts
CHANGED
package/2x/cjs/locales/base.js
CHANGED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
declare const esES: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
};
|
|
8
|
+
Calendar: {
|
|
9
|
+
markItems: string[];
|
|
10
|
+
renderYearAndMonth: (year: number, month: number) => string;
|
|
11
|
+
};
|
|
12
|
+
Cascader: {
|
|
13
|
+
placeholder: string;
|
|
14
|
+
};
|
|
15
|
+
Dialog: {
|
|
16
|
+
ok: string;
|
|
17
|
+
};
|
|
18
|
+
ErrorBlock: {
|
|
19
|
+
default: {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
busy: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
disconnected: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
empty: {
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
Form: {
|
|
37
|
+
required: string;
|
|
38
|
+
optional: string;
|
|
39
|
+
defaultValidateMessages: {
|
|
40
|
+
default: string;
|
|
41
|
+
required: string;
|
|
42
|
+
enum: string;
|
|
43
|
+
whitespace: string;
|
|
44
|
+
date: {
|
|
45
|
+
format: string;
|
|
46
|
+
parse: string;
|
|
47
|
+
invalid: string;
|
|
48
|
+
};
|
|
49
|
+
types: {
|
|
50
|
+
string: string;
|
|
51
|
+
method: string;
|
|
52
|
+
array: string;
|
|
53
|
+
object: string;
|
|
54
|
+
number: string;
|
|
55
|
+
date: string;
|
|
56
|
+
boolean: string;
|
|
57
|
+
integer: string;
|
|
58
|
+
float: string;
|
|
59
|
+
regexp: string;
|
|
60
|
+
email: string;
|
|
61
|
+
url: string;
|
|
62
|
+
hex: string;
|
|
63
|
+
};
|
|
64
|
+
string: {
|
|
65
|
+
len: string;
|
|
66
|
+
min: string;
|
|
67
|
+
max: string;
|
|
68
|
+
range: string;
|
|
69
|
+
};
|
|
70
|
+
number: {
|
|
71
|
+
len: string;
|
|
72
|
+
min: string;
|
|
73
|
+
max: string;
|
|
74
|
+
range: string;
|
|
75
|
+
};
|
|
76
|
+
array: {
|
|
77
|
+
len: string;
|
|
78
|
+
min: string;
|
|
79
|
+
max: string;
|
|
80
|
+
range: string;
|
|
81
|
+
};
|
|
82
|
+
pattern: {
|
|
83
|
+
mismatch: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
ImageUploader: {
|
|
88
|
+
uploading: string;
|
|
89
|
+
};
|
|
90
|
+
Mask: {
|
|
91
|
+
name: string;
|
|
92
|
+
};
|
|
93
|
+
Modal: {
|
|
94
|
+
ok: string;
|
|
95
|
+
};
|
|
96
|
+
PullToRefresh: {
|
|
97
|
+
pulling: string;
|
|
98
|
+
canRelease: string;
|
|
99
|
+
complete: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export default esES;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _mergeLocale = require("../utils/merge-locale");
|
|
9
|
+
|
|
10
|
+
var _base = require("./base");
|
|
11
|
+
|
|
12
|
+
const typeTemplate = '${label} no es un ${type} válido';
|
|
13
|
+
const esES = (0, _mergeLocale.mergeLocale)(_base.base, {
|
|
14
|
+
locale: 'es',
|
|
15
|
+
common: {
|
|
16
|
+
confirm: 'Confirmar',
|
|
17
|
+
cancel: 'Cancelar',
|
|
18
|
+
loading: 'Cargando...'
|
|
19
|
+
},
|
|
20
|
+
Calendar: {
|
|
21
|
+
markItems: ['Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab', 'Dom'],
|
|
22
|
+
renderYearAndMonth: (year, month) => `${year}/${month}`
|
|
23
|
+
},
|
|
24
|
+
Cascader: {
|
|
25
|
+
placeholder: 'Seleccionando'
|
|
26
|
+
},
|
|
27
|
+
Dialog: {
|
|
28
|
+
ok: 'OK'
|
|
29
|
+
},
|
|
30
|
+
ErrorBlock: {
|
|
31
|
+
default: {
|
|
32
|
+
title: 'Oops, algo salió mal',
|
|
33
|
+
description: 'Por favor espere un minuto e intente nuevamente'
|
|
34
|
+
},
|
|
35
|
+
busy: {
|
|
36
|
+
title: 'Oops, no está cargando',
|
|
37
|
+
description: 'Intente refrescar la página'
|
|
38
|
+
},
|
|
39
|
+
disconnected: {
|
|
40
|
+
title: 'La red se encuentra ocupada',
|
|
41
|
+
description: 'Intente refrescar la página'
|
|
42
|
+
},
|
|
43
|
+
empty: {
|
|
44
|
+
title: "Hmm, no pudimos encontrar eso...",
|
|
45
|
+
description: 'Quieres intentar una nueva búsqueda?'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
Form: {
|
|
49
|
+
required: 'Requerido',
|
|
50
|
+
optional: 'Opcional',
|
|
51
|
+
defaultValidateMessages: {
|
|
52
|
+
default: 'Error de validación para el campo ${label}',
|
|
53
|
+
required: 'Por favor ingrese ${label}',
|
|
54
|
+
enum: '${label} debe ser uno de los siguientes [${enum}]',
|
|
55
|
+
whitespace: '${label} no puede ser un caracter en blanco',
|
|
56
|
+
date: {
|
|
57
|
+
format: '${label} el formato de fecha es inválido',
|
|
58
|
+
parse: '${label} no puede ser convertido a fecha',
|
|
59
|
+
invalid: '${label} no es una fecha válida'
|
|
60
|
+
},
|
|
61
|
+
types: {
|
|
62
|
+
string: typeTemplate,
|
|
63
|
+
method: typeTemplate,
|
|
64
|
+
array: typeTemplate,
|
|
65
|
+
object: typeTemplate,
|
|
66
|
+
number: typeTemplate,
|
|
67
|
+
date: typeTemplate,
|
|
68
|
+
boolean: typeTemplate,
|
|
69
|
+
integer: typeTemplate,
|
|
70
|
+
float: typeTemplate,
|
|
71
|
+
regexp: typeTemplate,
|
|
72
|
+
email: typeTemplate,
|
|
73
|
+
url: typeTemplate,
|
|
74
|
+
hex: typeTemplate
|
|
75
|
+
},
|
|
76
|
+
string: {
|
|
77
|
+
len: '${label} debe tener ${len} caracteres',
|
|
78
|
+
min: '${label} debe tener al menos ${min} caracteres',
|
|
79
|
+
max: '${label} debe tener como mucho ${max} caracteres',
|
|
80
|
+
range: '${label} debe tener entre ${min}-${max} caracteres'
|
|
81
|
+
},
|
|
82
|
+
number: {
|
|
83
|
+
len: '${label} debe ser igual a ${len}',
|
|
84
|
+
min: '${label} debe ser mínimo ${min}',
|
|
85
|
+
max: '${label} debe ser máximo ${max}',
|
|
86
|
+
range: '${label} debe ser entre ${min}-${max}'
|
|
87
|
+
},
|
|
88
|
+
array: {
|
|
89
|
+
len: 'Debe ser ${len} ${label}',
|
|
90
|
+
min: 'Al menos ${min} ${label}',
|
|
91
|
+
max: 'Como mucho ${max} ${label}',
|
|
92
|
+
range: 'La cantidad de ${label} debe ser entre ${min}-${max}'
|
|
93
|
+
},
|
|
94
|
+
pattern: {
|
|
95
|
+
mismatch: '${label} no coincide con el patrón ${pattern}'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
ImageUploader: {
|
|
100
|
+
uploading: 'Subiendo...'
|
|
101
|
+
},
|
|
102
|
+
Mask: {
|
|
103
|
+
name: 'Máscara'
|
|
104
|
+
},
|
|
105
|
+
Modal: {
|
|
106
|
+
ok: 'OK'
|
|
107
|
+
},
|
|
108
|
+
PullToRefresh: {
|
|
109
|
+
pulling: 'Desplácese hacia abajo para refrescar',
|
|
110
|
+
canRelease: 'Suelte para refrescar inmediatamente',
|
|
111
|
+
complete: 'Refrescó exitosamente'
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
var _default = esES;
|
|
115
|
+
exports.default = _default;
|
package/2x/cjs/locales/fa-IR.js
CHANGED
package/2x/cjs/locales/zh-CN.js
CHANGED
package/2x/cjs/locales/zh-HK.js
CHANGED
package/2x/cjs/locales/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function measureCSSLength(raw: string): number;
|
|
1
|
+
export declare function measureCSSLength(raw: string | undefined | null): number;
|
|
@@ -10,6 +10,14 @@ var _isDev = require("./is-dev");
|
|
|
10
10
|
var _devLog = require("./dev-log");
|
|
11
11
|
|
|
12
12
|
function measureCSSLength(raw) {
|
|
13
|
+
if (raw === null || raw === undefined) {
|
|
14
|
+
if (_isDev.isDev) {
|
|
15
|
+
(0, _devLog.devError)('Global', 'Seems like the you will encounter a style messed problem. Please check the browser environment to make sure it supports CSS variables.');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
const withUnit = raw.trim();
|
|
14
22
|
|
|
15
23
|
if (withUnit.endsWith('px')) {
|
|
@@ -13,6 +13,7 @@ export interface FormArrayProps {
|
|
|
13
13
|
name: string | number | (string | number)[];
|
|
14
14
|
initialValue?: any[];
|
|
15
15
|
renderHeader?: (field: FormArrayField, operation: FormArrayOperation) => ReactNode;
|
|
16
|
+
onAdd?: (operation: FormArrayOperation) => void;
|
|
16
17
|
renderAdd?: () => ReactNode;
|
|
17
18
|
children: (fields: FormArrayField[], operation: FormArrayOperation) => ReactElement[];
|
|
18
19
|
}
|
|
@@ -27,7 +27,7 @@ export const FormArray = props => {
|
|
|
27
27
|
}, React.createElement(List.Item, {
|
|
28
28
|
className: 'adm-form-list-operation',
|
|
29
29
|
onClick: () => {
|
|
30
|
-
operation.add();
|
|
30
|
+
props.onAdd ? props.onAdd(operation) : operation.add();
|
|
31
31
|
},
|
|
32
32
|
arrow: false
|
|
33
33
|
}, props.renderAdd())));
|
|
@@ -17,7 +17,7 @@ export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePr
|
|
|
17
17
|
hidden?: boolean;
|
|
18
18
|
layout?: FormLayout;
|
|
19
19
|
childElementPosition?: 'normal' | 'right';
|
|
20
|
-
children
|
|
20
|
+
children?: ChildrenType;
|
|
21
21
|
} & NativeProps;
|
|
22
22
|
export declare const FormItem: FC<FormItemProps>;
|
|
23
23
|
export {};
|