@para-ui/core 4.0.0-rc → 4.0.0-rc.1
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/AutoBox/index.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +12 -12
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +3 -3
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +4 -2
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +4 -4
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +3 -3
- package/Collapse/index.js +4 -4
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +20 -20
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +43 -52
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +8 -7
- package/DatePicker/util.d.ts +1 -1
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +18 -13
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +13 -13
- package/Drawer/index.js +29 -33
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +1 -1
- package/DynamicMultiBox/index.js +38 -35
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +12 -13
- package/Form/index.js +10 -8
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +3 -2
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +6 -6
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +1 -1
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +2 -2
- package/InputNumber/index.js +3 -3
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +14 -14
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +12 -12
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +5 -5
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +3 -3
- package/Notification/index.js +1 -1
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +40 -36
- package/PageHeader/index.js +30 -30
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +17 -17
- package/PasswordRules/index.js +7 -7
- package/PopConfirm/index.js +3 -3
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +40 -40
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +2 -2
- package/README.md +3 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +4 -4
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +42 -42
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +15 -15
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +9 -9
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +3 -3
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +4 -4
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +23 -5
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +34 -34
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +25 -17
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +25 -25
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +13 -13
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +1 -1
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +4 -4
- package/Title/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +17 -10
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +21 -21
- package/Tree/OperateBar/index.d.ts +4 -4
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +2 -2
- package/Tree/interface.d.ts +4 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +7 -7
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-0f315bca.js} +2 -2
- package/_verture/{index-e1b800aa.js → index-92e406f4.js} +48 -24
- package/_verture/{index-47297a40.js → index-bc461491.js} +45 -45
- package/_verture/{index-1c8d3e94.js → index-d251967e.js} +101 -47
- package/_verture/{modalContext-670eab09.js → modalContext-9299acc9.js} +25 -25
- package/index.d.ts +2 -0
- package/index.js +8 -7
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +39 -1
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +3 -1
- package/umd/AutoBox.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +2 -2
- package/umd/Cascader.js +5 -5
- package/umd/Checkbox.js +1 -1
- package/umd/CheckboxGroup.js +1 -1
- package/umd/Collapse.js +1 -1
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +1 -1
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +2 -2
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +2 -2
- package/umd/Help.js +1 -1
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/InputNumber.js +1 -1
- package/umd/Label.js +1 -1
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +2 -2
- package/umd/Message.js +1 -1
- package/umd/Modal.js +2 -2
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +1 -1
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +1 -1
- package/umd/Radio.js +1 -1
- package/umd/RadioGroup.js +1 -1
- package/umd/Search.js +7 -7
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/SingleBox.js +1 -1
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +4 -4
- package/umd/Table.js +2 -2
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +2 -2
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +1 -1
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +2 -2
- package/umd/Tree.js +1 -1
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/Form/index.js
CHANGED
|
@@ -3,8 +3,9 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { DeepClone } from '@paraview/lib';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { F as FormItem, v as validate } from '../_verture/index-
|
|
6
|
+
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-d251967e.js';
|
|
7
7
|
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
8
9
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
10
|
import '../TextField/index.js';
|
|
10
11
|
import '../_verture/typeof-adeedc13.js';
|
|
@@ -36,7 +37,6 @@ import '../Radio/index.js';
|
|
|
36
37
|
import '../Select/index.js';
|
|
37
38
|
import '../_verture/defineProperty-1d116156.js';
|
|
38
39
|
import '../Empty/index.js';
|
|
39
|
-
import '../_verture/useFormatMessage-703f8b20.js';
|
|
40
40
|
import '@para-ui/icons/Close';
|
|
41
41
|
import '@para-ui/icons/Down';
|
|
42
42
|
import '@para-ui/icons/Check';
|
|
@@ -70,7 +70,7 @@ import 'rc-pagination';
|
|
|
70
70
|
import '@para-ui/icons/Right';
|
|
71
71
|
import '@para-ui/icons/DoubleLeft';
|
|
72
72
|
import '@para-ui/icons/DoubleRight';
|
|
73
|
-
import '../_verture/index-
|
|
73
|
+
import '../_verture/index-bc461491.js';
|
|
74
74
|
import 'rc-tree';
|
|
75
75
|
import '@para-ui/icons/Document';
|
|
76
76
|
import 'react-dom';
|
|
@@ -78,6 +78,7 @@ import '@para-ui/icons/EditFile';
|
|
|
78
78
|
import '@para-ui/icons/PlusCircle';
|
|
79
79
|
import '@para-ui/icons/MoreCircle';
|
|
80
80
|
import '../_verture/utils-06d86594.js';
|
|
81
|
+
import '../Search/index.js';
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* form 表单组件
|
|
@@ -90,6 +91,7 @@ import '../_verture/utils-06d86594.js';
|
|
|
90
91
|
* @description 用于根据配置自动生成表单
|
|
91
92
|
*/
|
|
92
93
|
var Form = function Form(props) {
|
|
94
|
+
var intl = useFormatMessage('FormItem', localeJson);
|
|
93
95
|
var _props$className = props.className,
|
|
94
96
|
className = _props$className === void 0 ? '' : _props$className,
|
|
95
97
|
FormProps = props.FormProps,
|
|
@@ -192,7 +194,7 @@ var Form = function Form(props) {
|
|
|
192
194
|
errorCount++;
|
|
193
195
|
continue;
|
|
194
196
|
}
|
|
195
|
-
var msg = validate(tItem, refData.current.allValues[key]);
|
|
197
|
+
var msg = validate(tItem, refData.current.allValues[key], intl);
|
|
196
198
|
if (msg) {
|
|
197
199
|
errorCount++;
|
|
198
200
|
if (typeof msg === 'string') refData.current.itemsCheckMessage[key] = msg;
|
|
@@ -202,8 +204,8 @@ var Form = function Form(props) {
|
|
|
202
204
|
return !errorCount && refData.current.allValues;
|
|
203
205
|
};
|
|
204
206
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
* 过滤有效值
|
|
208
|
+
*/
|
|
207
209
|
var getValidValues = function getValidValues() {
|
|
208
210
|
var tObj = {};
|
|
209
211
|
for (var i = 0; i < refData.current.configList.length; i++) {
|
|
@@ -215,8 +217,8 @@ var Form = function Form(props) {
|
|
|
215
217
|
return tObj;
|
|
216
218
|
};
|
|
217
219
|
/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
+
* 重置表单
|
|
221
|
+
*/
|
|
220
222
|
var resetForm = function resetForm() {
|
|
221
223
|
var isClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
222
224
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -11,9 +11,9 @@ interface DefaultCompomentsProps {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* @module src\FormItem\compoments\defaultCompoments\index.tsx
|
|
15
|
-
* @author zhanzl
|
|
16
|
-
* @date 2022/06/02
|
|
17
|
-
*/
|
|
14
|
+
* @module src\FormItem\compoments\defaultCompoments\index.tsx
|
|
15
|
+
* @author zhanzl
|
|
16
|
+
* @date 2022/06/02
|
|
17
|
+
*/
|
|
18
18
|
declare const DefaultCompoments: FC<DefaultCompomentsProps>;
|
|
19
19
|
export default DefaultCompoments;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { FC } from
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { SelectProps } from '../../../Select';
|
|
3
3
|
export interface FormSelectProps extends SelectProps {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
* 默认值
|
|
6
|
+
*/
|
|
7
7
|
defaultValue?: string;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* 改变方法
|
|
10
|
+
*/
|
|
11
11
|
change?: (value: any) => any;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* 绑定值
|
|
14
|
+
*/
|
|
15
15
|
value?: string;
|
|
16
16
|
}
|
|
17
17
|
declare const FormSelect: FC<FormSelectProps>;
|
package/FormItem/errorTips.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HelperTextProps } from '../HelperText';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* 报错信息组件
|
|
5
|
-
* @description 为了解决,在主组件设置state,导致输入框中内容刷新,且失去焦点
|
|
6
|
-
*/
|
|
4
|
+
* 报错信息组件
|
|
5
|
+
* @description 为了解决,在主组件设置state,导致输入框中内容刷新,且失去焦点
|
|
6
|
+
*/
|
|
7
7
|
declare const ErrorTips: FC<{
|
|
8
8
|
getSetError?: Function;
|
|
9
9
|
errorMessage?: string;
|
package/FormItem/index.d.ts
CHANGED
|
@@ -21,11 +21,11 @@ export interface ruleType {
|
|
|
21
21
|
* @return {boolean | string}, 子定义校验方法时 返回 false 或 字符串 均为校验失败 true为校验通过
|
|
22
22
|
*/
|
|
23
23
|
validate?: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
required?: boolean | validateFunctionType;
|
|
25
|
+
maxlength?: number | validateFunctionType;
|
|
26
|
+
minLength?: number | validateFunctionType;
|
|
27
|
+
pattern?: RegExp | validateFunctionType;
|
|
28
|
+
disOnlySpace?: boolean | validateFunctionType;
|
|
29
29
|
[name: string]: validateFunctionType | boolean | number | RegExp | undefined;
|
|
30
30
|
};
|
|
31
31
|
message?: {
|
package/FormItem/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { F as default } from '../_verture/index-
|
|
3
|
+
export { F as default } from '../_verture/index-d251967e.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-0d9802f7.js';
|
|
@@ -70,7 +70,7 @@ import 'rc-pagination';
|
|
|
70
70
|
import '@para-ui/icons/Right';
|
|
71
71
|
import '@para-ui/icons/DoubleLeft';
|
|
72
72
|
import '@para-ui/icons/DoubleRight';
|
|
73
|
-
import '../_verture/index-
|
|
73
|
+
import '../_verture/index-bc461491.js';
|
|
74
74
|
import 'rc-tree';
|
|
75
75
|
import '@para-ui/icons/Document';
|
|
76
76
|
import 'react-dom';
|
|
@@ -78,3 +78,4 @@ import '@para-ui/icons/EditFile';
|
|
|
78
78
|
import '@para-ui/icons/PlusCircle';
|
|
79
79
|
import '@para-ui/icons/MoreCircle';
|
|
80
80
|
import '../_verture/utils-06d86594.js';
|
|
81
|
+
import '../Search/index.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
zh: {
|
|
3
|
+
choseFile: string;
|
|
4
|
+
unEmpty: string;
|
|
5
|
+
maxLength: string;
|
|
6
|
+
minLength: string;
|
|
7
|
+
unRule: string;
|
|
8
|
+
minValue: string;
|
|
9
|
+
maxValue: string;
|
|
10
|
+
};
|
|
11
|
+
en: {
|
|
12
|
+
choseFile: string;
|
|
13
|
+
unEmpty: string;
|
|
14
|
+
maxLength: string;
|
|
15
|
+
minLength: string;
|
|
16
|
+
unRule: string;
|
|
17
|
+
minValue: string;
|
|
18
|
+
maxValue: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -6,7 +6,7 @@ import { FormItemProps } from './index';
|
|
|
6
6
|
* @param {any} val 校验项的值
|
|
7
7
|
* @return {boolean | string} 返回校验结果或报错信息
|
|
8
8
|
*/
|
|
9
|
-
export type validateFunctionType = (item: FormItemProps, val: any) => boolean | string;
|
|
9
|
+
export type validateFunctionType = (item: FormItemProps, val: any, intl: any) => boolean | string;
|
|
10
10
|
/**
|
|
11
11
|
* 表单rules校验方法
|
|
12
12
|
* @type {validateFunctionType}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import React, { ReactElement } from
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
2
|
import { ModalProps } from '../Modal';
|
|
3
|
-
import { JsxElement } from
|
|
3
|
+
import { JsxElement } from 'typescript';
|
|
4
4
|
import './index.scss';
|
|
5
5
|
/**
|
|
6
|
-
* 弹窗配置
|
|
7
|
-
*/
|
|
6
|
+
* 弹窗配置
|
|
7
|
+
*/
|
|
8
8
|
export interface modalOptions extends ModalProps {
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* 非正常关闭仍然返回true
|
|
11
|
+
*/
|
|
12
12
|
disCatchOnCancel?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* 模态框大小
|
|
15
|
+
*/
|
|
16
16
|
size?: 'sm' | 'md' | 'lg' | 'auto' | 'fullScreen';
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* 模态框标题
|
|
19
|
+
*/
|
|
20
20
|
title?: string;
|
|
21
21
|
context?: ReactElement | JsxElement;
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
* 内容
|
|
24
|
+
*/
|
|
25
25
|
content?: ReactElement | JsxElement;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
* 检查方法,根据返回值判断是否关闭模态框
|
|
28
|
+
*/
|
|
29
29
|
checkFunction?: () => boolean | Promise<boolean>;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* 获得关闭模态框方法
|
|
32
|
+
*/
|
|
33
33
|
getClose?: (close: Function) => void;
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
* 模态框其他配置
|
|
36
|
+
*/
|
|
37
37
|
ModalProps?: ModalProps;
|
|
38
38
|
}
|
|
39
39
|
interface DialogProps extends modalOptions {
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
* 模态框状态
|
|
42
|
+
*/
|
|
43
43
|
open: boolean;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
* 提交方法
|
|
46
|
+
*/
|
|
47
47
|
onSubmit: (idx: number) => void;
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
* 关闭方法
|
|
50
|
+
*/
|
|
51
51
|
onClose: (idx: number) => void;
|
|
52
52
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
* 模态框组下标
|
|
54
|
+
*/
|
|
55
55
|
listIndex: number;
|
|
56
56
|
}
|
|
57
57
|
export declare const FDialog: React.FC<DialogProps>;
|
package/FunctionModal/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @author zhanzl
|
|
3
|
-
* @date 2021/08/13
|
|
4
|
-
* @description 函数式弹窗
|
|
5
|
-
*/
|
|
6
|
-
import { useModal, useClose, FunctionModalProvider } from
|
|
2
|
+
* @author zhanzl
|
|
3
|
+
* @date 2021/08/13
|
|
4
|
+
* @description 函数式弹窗
|
|
5
|
+
*/
|
|
6
|
+
import { useModal, useClose, FunctionModalProvider } from './modalContext';
|
|
7
7
|
export default useModal;
|
|
8
|
-
export { useClose, FunctionModalProvider
|
|
8
|
+
export { useClose, FunctionModalProvider };
|
package/FunctionModal/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useModal } from '../_verture/modalContext-
|
|
2
|
-
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-
|
|
1
|
+
import { u as useModal } from '../_verture/modalContext-9299acc9.js';
|
|
2
|
+
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-9299acc9.js';
|
|
3
3
|
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
4
4
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
5
5
|
import '../_verture/slicedToArray-a8206399.js';
|
|
@@ -39,7 +39,7 @@ import '@para-ui/icons/WarningCircle';
|
|
|
39
39
|
import '@para-ui/icons/WarningCircleF';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* @author zhanzl
|
|
43
|
-
* @date 2021/08/13
|
|
44
|
-
* @description 函数式弹窗
|
|
45
|
-
*/
|
|
42
|
+
* @author zhanzl
|
|
43
|
+
* @date 2021/08/13
|
|
44
|
+
* @description 函数式弹窗
|
|
45
|
+
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { modalOptions } from
|
|
2
|
+
import { modalOptions } from './dialog';
|
|
3
3
|
/**
|
|
4
4
|
* 弹出框组件
|
|
5
5
|
* @param context 主体内容
|
|
@@ -9,7 +9,7 @@ import { modalOptions } from "./dialog";
|
|
|
9
9
|
**/
|
|
10
10
|
export declare const useModal: () => (options: modalOptions) => Promise<boolean>;
|
|
11
11
|
/**
|
|
12
|
-
* 函数弹窗组件Provider
|
|
13
|
-
*/
|
|
12
|
+
* 函数弹窗组件Provider
|
|
13
|
+
*/
|
|
14
14
|
export declare const FunctionModalProvider: ({ children }: any) => JSX.Element;
|
|
15
15
|
export declare const useClose: () => Function;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* @date 2022/5/5 4:08 PM
|
|
4
4
|
* @description 全局每个组件的props
|
|
5
5
|
*/
|
|
6
|
-
import { SelectProps } from
|
|
7
|
-
import { TextFieldProps } from
|
|
8
|
-
import { TableProps } from
|
|
9
|
-
import { EmptyProps } from
|
|
10
|
-
import { QueryingProps } from
|
|
11
|
-
import { SelectorProps } from
|
|
12
|
-
import { ComboSelectProps } from
|
|
6
|
+
import { SelectProps } from '../Select';
|
|
7
|
+
import { TextFieldProps } from '../TextField';
|
|
8
|
+
import { TableProps } from '../Table/interface';
|
|
9
|
+
import { EmptyProps } from '../Empty';
|
|
10
|
+
import { QueryingProps } from '../Querying';
|
|
11
|
+
import { SelectorProps } from '../Selector/interface';
|
|
12
|
+
import { ComboSelectProps } from '../ComboSelect/interface';
|
|
13
13
|
interface ComponentsProps {
|
|
14
14
|
Select?: Partial<SelectProps>;
|
|
15
15
|
TextField?: Partial<TextFieldProps>;
|
package/GlobalContext/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { changeConfirmLocale, getConfirmLocale } from './confirmLocale';
|
|
3
|
-
import ComponentsProps from
|
|
3
|
+
import ComponentsProps from './componentsProps';
|
|
4
4
|
/** 国际化props */
|
|
5
5
|
export interface localeProps {
|
|
6
6
|
/** 语言 */
|
package/Help/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var Help = function Help(props) {
|
|
|
32
32
|
placement: placement
|
|
33
33
|
}, restProps, {
|
|
34
34
|
children: jsx("span", Object.assign({
|
|
35
|
-
className: clsx($prefixCls
|
|
35
|
+
className: clsx("".concat($prefixCls, "-help"), className)
|
|
36
36
|
}, {
|
|
37
37
|
children: children || jsx(HelpIcon, {})
|
|
38
38
|
}))
|
package/HelperText/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var HelperText = function HelperText(props) {
|
|
|
19
19
|
// 处理class
|
|
20
20
|
var handClass = function handClass() {
|
|
21
21
|
var str = "".concat($prefixCls, "-helper-text");
|
|
22
|
-
if (className) str +=
|
|
22
|
+
if (className) str += " ".concat(className);
|
|
23
23
|
if (error) str += " ".concat($prefixCls, "-helper-text-error");
|
|
24
24
|
return str;
|
|
25
25
|
};
|
package/InputLang/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { HelperTextDetailProps } from '../HelperText';
|
|
8
|
-
import { LabelTooltipProps } from
|
|
8
|
+
import { LabelTooltipProps } from '../Label';
|
|
9
|
+
import { TooltipProps } from '../Tooltip';
|
|
9
10
|
import './index.scss';
|
|
10
|
-
import { TooltipProps } from "../Tooltip";
|
|
11
11
|
interface valueProps {
|
|
12
12
|
[name: string]: string;
|
|
13
13
|
}
|
package/InputLang/index.js
CHANGED
|
@@ -123,7 +123,7 @@ var InputLang = function InputLang(props) {
|
|
|
123
123
|
var objLabel = {};
|
|
124
124
|
for (var i = 0, l = langList.length; i < l; i++) {
|
|
125
125
|
var item = langList[i];
|
|
126
|
-
if (typeof item ===
|
|
126
|
+
if (typeof item === 'string') {
|
|
127
127
|
obj[item] = {
|
|
128
128
|
label: item,
|
|
129
129
|
value: item
|
|
@@ -216,7 +216,7 @@ var InputLang = function InputLang(props) {
|
|
|
216
216
|
var jsonMapping = ArrayToObject('label', valueListLang);
|
|
217
217
|
for (var i = 0, l = langList.length; i < l; i++) {
|
|
218
218
|
var item = langList[i];
|
|
219
|
-
if (_typeof(item) ===
|
|
219
|
+
if (_typeof(item) === 'object') {
|
|
220
220
|
item = item.label;
|
|
221
221
|
}
|
|
222
222
|
if (!jsonMapping[item] && item !== (((_a = langMapping[lang]) === null || _a === void 0 ? void 0 : _a.label) || lang)) arr.push({
|
|
@@ -268,8 +268,8 @@ var InputLang = function InputLang(props) {
|
|
|
268
268
|
}, []);
|
|
269
269
|
/** 处理弹出框className */
|
|
270
270
|
var popoverHandClass = function popoverHandClass() {
|
|
271
|
-
var str = $prefixCls
|
|
272
|
-
if (popoverClassName) str +=
|
|
271
|
+
var str = "".concat($prefixCls, "-input-lang-popover");
|
|
272
|
+
if (popoverClassName) str += " ".concat(popoverClassName);
|
|
273
273
|
if (disabledAdd) str += " ".concat($prefixCls, "-input-lang-popover-disabled-add");
|
|
274
274
|
if (disabledDelete) str += " ".concat($prefixCls, "-input-lang-popover-disabled-delete");
|
|
275
275
|
return str;
|
|
@@ -315,10 +315,10 @@ var InputLang = function InputLang(props) {
|
|
|
315
315
|
* @return {string}
|
|
316
316
|
*/
|
|
317
317
|
var handClass = function handClass() {
|
|
318
|
-
var str = $prefixCls
|
|
318
|
+
var str = "".concat($prefixCls, "-input-lang");
|
|
319
319
|
if (size) str += " ".concat($prefixCls, "-input-lang-").concat(size);
|
|
320
320
|
if (error) str += " ".concat($prefixCls, "-input-lang-error");
|
|
321
|
-
if (className) str +=
|
|
321
|
+
if (className) str += " ".concat(className);
|
|
322
322
|
return str;
|
|
323
323
|
};
|
|
324
324
|
return jsxs("div", Object.assign({
|
|
@@ -327,7 +327,7 @@ var InputLang = function InputLang(props) {
|
|
|
327
327
|
ref: refDom
|
|
328
328
|
}, {
|
|
329
329
|
children: [jsx(Popover, Object.assign({
|
|
330
|
-
placement:
|
|
330
|
+
placement: 'bottom-end',
|
|
331
331
|
visible: open,
|
|
332
332
|
content: langListPopoverContent(),
|
|
333
333
|
onVisibleChange: handleClose,
|
|
@@ -335,7 +335,7 @@ var InputLang = function InputLang(props) {
|
|
|
335
335
|
maxWidth: 'none',
|
|
336
336
|
overlayInnerStyle: {
|
|
337
337
|
minWidth: '440px',
|
|
338
|
-
width: ((_a = refDom.current) === null || _a === void 0 ? void 0 : _a.offsetWidth
|
|
338
|
+
width: "".concat((_a = refDom.current) === null || _a === void 0 ? void 0 : _a.offsetWidth, "px")
|
|
339
339
|
}
|
|
340
340
|
}, {
|
|
341
341
|
children: jsx(TextField, {
|
package/InputNumber/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @description 数字输入框
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { LabelTooltipProps } from
|
|
8
|
-
import { HelperTextDetailProps } from
|
|
7
|
+
import { LabelTooltipProps } from '../Label';
|
|
8
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
9
9
|
import { TooltipProps } from '../Tooltip';
|
|
10
10
|
import './index.scss';
|
|
11
11
|
export interface InputNumberProps extends HelperTextDetailProps {
|
package/InputNumber/index.js
CHANGED
|
@@ -127,7 +127,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
127
127
|
var handLabelClass = function handLabelClass() {
|
|
128
128
|
var str = 'input-number-label';
|
|
129
129
|
if (labelTooltip && labelTooltip.className) {
|
|
130
|
-
str +=
|
|
130
|
+
str += " ".concat(labelTooltip.className);
|
|
131
131
|
}
|
|
132
132
|
return str;
|
|
133
133
|
};
|
|
@@ -263,8 +263,8 @@ var InputNumber = function InputNumber(props) {
|
|
|
263
263
|
};
|
|
264
264
|
/** 处理class */
|
|
265
265
|
var handClass = function handClass() {
|
|
266
|
-
var str = $prefixCls
|
|
267
|
-
if (className) str +=
|
|
266
|
+
var str = "".concat($prefixCls, "-input-number ");
|
|
267
|
+
if (className) str += " ".concat(className);
|
|
268
268
|
if (size) str += " ".concat($prefixCls, "-input-number-").concat(size);
|
|
269
269
|
if (btnMode) {
|
|
270
270
|
str += " ".concat($prefixCls, "-input-number-").concat(btnMode === 'none' ? 'none' : 'tb');
|
package/Label/index.js
CHANGED
|
@@ -34,10 +34,10 @@ var Label = function Label(props) {
|
|
|
34
34
|
othersProps = __rest(props, ["className", "helpClassName", "style", "label", "labelSign", "required", "tooltip", "tooltipType", "placement", "arrow", "tooltipIcon", "onClick"]);
|
|
35
35
|
// 处理class
|
|
36
36
|
var handClass = function handClass() {
|
|
37
|
-
var str = $prefixCls
|
|
37
|
+
var str = "".concat($prefixCls, "-label");
|
|
38
38
|
if (tooltipType) str += " ".concat($prefixCls, "-label-").concat(tooltipType);
|
|
39
39
|
if (tooltip) str += " ".concat($prefixCls, "-label-tooltip");
|
|
40
|
-
if (className) str +=
|
|
40
|
+
if (className) str += " ".concat(className);
|
|
41
41
|
return str;
|
|
42
42
|
};
|
|
43
43
|
var onClickCom = function onClickCom(e) {
|
package/Loading/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var Loading = function Loading(props) {
|
|
|
23
23
|
// 处理class
|
|
24
24
|
var handClass = function handClass() {
|
|
25
25
|
var str = "".concat($prefixCls, "-loading");
|
|
26
|
-
if (className) str +=
|
|
26
|
+
if (className) str += " ".concat(className);
|
|
27
27
|
return str;
|
|
28
28
|
};
|
|
29
29
|
return jsxs("div", Object.assign({
|