@para-ui/core 3.0.85 → 4.0.0-alpha
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.js +18 -19
- package/AutoTips/index.js +5 -4
- package/Breadcrumbs/index.js +5 -4
- package/Button/SplitButton.d.ts +13 -0
- package/Button/index.d.ts +1 -1
- package/Button/index.js +54 -12
- package/ButtonGroup/index.js +6 -5
- package/Carousel/index.d.ts +5 -5
- package/Carousel/index.js +21 -9
- package/Cascader/Cascader.d.ts +99 -0
- package/Cascader/OptionList/CacheContent.d.ts +7 -0
- package/Cascader/OptionList/Column.d.ts +21 -0
- package/Cascader/OptionList/index.d.ts +4 -0
- package/Cascader/OptionList/useActive.d.ts +6 -0
- package/Cascader/context.d.ts +23 -0
- package/Cascader/hooks/useDisplayValues.d.ts +10 -0
- package/Cascader/hooks/useEntities.d.ts +10 -0
- package/Cascader/hooks/useMissingValues.d.ts +3 -0
- package/Cascader/index.d.ts +3 -58
- package/Cascader/index.js +28 -177
- package/Cascader/utils/commonUtil.d.ts +18 -0
- package/Cascader/utils/treeUtil.d.ts +55 -0
- package/Checkbox/index.d.ts +7 -0
- package/Checkbox/index.js +50 -29
- package/CheckboxGroup/index.d.ts +3 -1
- package/CheckboxGroup/index.js +48 -18
- package/Collapse/index.js +2 -2
- package/Collapse/motion.d.ts +0 -2
- package/CollapseBox/index.js +3 -3
- package/CollapseLayout/index.d.ts +5 -0
- package/CollapseLayout/index.js +144 -22
- package/ColorPicker/chromePicker/index.d.ts +9 -0
- package/ColorPicker/compactPicker/index.d.ts +9 -0
- package/ColorPicker/config.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -1
- package/ColorPicker/index.js +7 -3
- package/ColorPicker/sketchPicker/index.d.ts +11 -0
- package/ColorPicker/swatchesPicker/index.d.ts +9 -0
- package/ComboSelect/index.js +14 -12
- package/Container/index.js +2 -2
- package/CopyText/index.d.ts +33 -0
- package/CopyText/index.js +180 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +9 -2
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +8 -8
- package/DatePicker/generatePicker/index.d.ts +32 -26
- package/DatePicker/generatePicker/interface.d.ts +12 -0
- package/DatePicker/index.d.ts +12 -8
- package/DatePicker/index.js +367 -454
- package/DatePicker/util.d.ts +40 -4
- package/Desktop/index.d.ts +16 -3
- package/Desktop/index.js +177 -68
- package/Desktop/lang/en_US.d.ts +6 -0
- package/Desktop/lang/index.d.ts +13 -0
- package/Desktop/lang/zh_CN.d.ts +6 -0
- package/DragVerify/index.js +9 -100
- package/Drawer/index.js +8 -8
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.js +2 -2
- package/DynamicMultiBox/index.js +57 -41
- package/DynamicMultiBox/interface.d.ts +4 -4
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +20 -26
- package/Form/index.js +48 -69
- package/FormItem/index.js +15 -15
- package/FunctionModal/index.js +11 -9
- package/GlobalContext/constant.d.ts +1 -1
- package/GlobalContext/index.js +2 -2
- package/Help/index.js +4 -3
- package/HelperText/index.js +2 -2
- package/InputLang/index.d.ts +5 -0
- package/InputLang/index.js +35 -29
- package/InputNumber/index.d.ts +5 -0
- package/InputNumber/index.js +95 -80
- package/Label/index.js +4 -3
- package/Loading/index.js +2 -2
- package/Menu/index.js +114 -39
- package/Menu/interface.d.ts +8 -0
- package/Message/index.d.ts +4 -4
- package/Message/index.js +13 -11
- package/Modal/index.js +29 -15
- package/MultiBox/index.js +9 -8
- package/Notification/index.d.ts +9 -1
- package/Notification/index.js +29 -15
- package/OperateBtn/index.js +28 -11
- package/PageHeader/index.js +270 -74
- package/PageHeader/interface.d.ts +17 -0
- package/Pagination/index.d.ts +4 -3
- package/Pagination/index.js +117 -95
- package/Pagination/lang/en_US.d.ts +3 -2
- package/Pagination/lang/index.d.ts +6 -4
- package/Pagination/lang/zh_CN.d.ts +3 -2
- package/ParauiProvider/index.js +4 -4
- package/PasswordRules/index.js +5 -5
- package/PopConfirm/index.d.ts +15 -5
- package/PopConfirm/index.js +62 -16
- package/Popover/index.js +4 -3
- package/Progress/index.js +10 -9
- package/Querying/index.js +7 -7
- package/README.md +41 -1114
- package/Radio/index.d.ts +7 -0
- package/Radio/index.js +49 -27
- package/RadioGroup/index.d.ts +3 -1
- package/RadioGroup/index.js +48 -21
- package/Search/index.d.ts +3 -15
- package/Search/index.js +21 -83
- package/Select/index.d.ts +7 -2
- package/Select/index.js +114 -91
- package/Select/lang/en_US.d.ts +1 -1
- package/Select/lang/index.d.ts +2 -2
- package/Select/lang/zh_CN.d.ts +1 -1
- package/SelectInput/index.js +8 -7
- package/Selector/index.js +30 -22
- package/SelectorPicker/index.d.ts +5 -0
- package/SelectorPicker/index.js +47 -32
- package/SelectorPicker/lang/en_US.d.ts +1 -0
- package/SelectorPicker/lang/index.d.ts +2 -0
- package/SelectorPicker/lang/zh_CN.d.ts +1 -0
- package/SingleBox/index.js +8 -7
- package/Slider/index.js +5 -5
- package/Status/index.d.ts +6 -5
- package/Status/index.js +27 -4
- package/Stepper/index.d.ts +9 -10
- package/Stepper/index.js +69 -29
- package/Styles/index.scss +4 -0
- package/Styles/scrollbar.scss +24 -24
- package/Styles/theme.scss +104 -57
- package/Switch/index.d.ts +34 -14
- package/Switch/index.js +97 -30
- package/Table/index.js +33 -27
- package/Table/interface.d.ts +3 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +5 -5
- package/Tabs/index.d.ts +11 -1
- package/Tabs/index.js +49 -16
- package/Tag/TagGroup.d.ts +11 -7
- package/Tag/index.d.ts +22 -7
- package/Tag/index.js +1382 -53
- package/TextEditor/index.js +4 -3
- package/TextField/index.d.ts +5 -0
- package/TextField/index.js +55 -38
- package/TimePicker/index.d.ts +5 -0
- package/TimePicker/index.js +39 -23
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +21 -18
- package/Title/index.d.ts +15 -3
- package/Title/index.js +95 -29
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -0
- package/ToggleButton/index.d.ts +4 -0
- package/ToggleButton/index.js +14 -52
- package/Tooltip/index.js +28 -34
- package/Tooltip/interface.d.ts +4 -10
- package/Tooltip/utils.d.ts +1 -3
- package/Transfer/index.d.ts +3 -3
- package/Transfer/index.js +72 -68
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +10 -9
- package/Tree/utils/treeUtil.d.ts +0 -7
- package/Upload/index.js +16 -14
- package/_verture/{constant-66aa48a1.js → constant-0d9802f7.js} +1 -1
- package/_verture/{defineProperty-62acccfc.js → defineProperty-1d116156.js} +1 -1
- package/_verture/index-5c77417d.js +150 -0
- package/_verture/index-68db2bc3.js +10530 -0
- package/_verture/{index-11e04b7f.js → index-7ec72724.js} +44 -38
- package/_verture/index-d63bd287.js +327 -0
- package/_verture/{index-c23dc3b0.js → index-e6f85fd5.js} +7 -8
- package/_verture/{index-77f9e0fb.js → index-e9007d6a.js} +6 -6
- package/_verture/{intl-4a9f1b44.js → intl-5c1ec055.js} +1 -1
- package/_verture/{modalContext-20780c9a.js → modalContext-c12ca3e8.js} +3 -3
- package/_verture/slicedToArray-a8206399.js +43 -0
- package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-8f4c9589.js} +1 -1
- package/_verture/typeof-adeedc13.js +11 -0
- package/_verture/typeof-b240b062.js +16 -0
- package/_verture/{utils-c9b9a157.js → utils-f0e81540.js} +8 -8
- package/index.d.ts +2 -2
- package/index.js +32 -27
- package/locale/en-US.d.ts +10 -6
- package/locale/index.d.ts +20 -12
- package/locale/index.js +33 -25
- package/locale/zh-CN.d.ts +10 -6
- package/package.json +25 -11
- package/umd/AutoBox.js +20 -21
- package/umd/AutoTips.js +31 -4
- package/umd/Breadcrumbs.js +7 -7
- package/umd/Button.js +7 -8
- package/umd/ButtonGroup.js +7 -8
- package/umd/Carousel.js +29 -1
- package/umd/Cascader.js +20 -21
- package/umd/Checkbox.js +7 -7
- package/umd/CheckboxGroup.js +7 -7
- package/umd/Collapse.js +19 -21
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +7 -7
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +42 -0
- package/umd/DatePicker.js +7 -7
- package/umd/Desktop.js +7 -7
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +7 -8
- package/umd/Dropdown.js +3 -3
- package/umd/DynamicMultiBox.js +7 -7
- package/umd/Empty.js +1 -1
- package/umd/Form.js +6 -6
- package/umd/FormItem.js +6 -6
- package/umd/FunctionModal.js +7 -7
- package/umd/Help.js +7 -7
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +7 -7
- package/umd/InputNumber.js +7 -7
- package/umd/Label.js +7 -7
- package/umd/Loading.js +4 -5
- package/umd/Menu.js +4 -4
- package/umd/Message.js +3 -4
- package/umd/Modal.js +7 -7
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +5 -6
- package/umd/OperateBtn.js +7 -7
- package/umd/PageHeader.js +7 -7
- package/umd/Pagination.js +7 -7
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -4
- package/umd/PopConfirm.js +7 -7
- package/umd/Popover.js +31 -4
- package/umd/Progress.js +4 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +7 -7
- package/umd/RadioGroup.js +7 -7
- package/umd/Search.js +7 -7
- package/umd/Select.js +7 -7
- package/umd/SelectInput.js +7 -7
- package/umd/Selector.js +7 -7
- package/umd/SelectorPicker.js +7 -7
- package/umd/SingleBox.js +7 -7
- package/umd/Slider.js +3 -3
- package/umd/Status.js +29 -1
- package/umd/Stepper.js +20 -20
- package/umd/Switch.js +7 -7
- package/umd/Table.js +7 -7
- package/umd/Tabs.js +7 -7
- package/umd/Tag.js +7 -8
- package/umd/TextEditor.js +19 -19
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +7 -7
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +42 -1
- package/umd/ToggleButton.js +7 -8
- package/umd/Tooltip.js +31 -4
- package/umd/Transfer.js +8 -8
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +8 -8
- package/umd/locale.js +1 -1
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/typeof-498dd2b1.js +0 -11
- package/umd/Split.js +0 -1
package/Form/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HelperTextProps } from
|
|
2
|
-
import { LabelProps } from
|
|
3
|
-
import React, { FC, FormHTMLAttributes, ReactElement } from
|
|
4
|
-
import { FormItemProps } from
|
|
5
|
-
import { ItemTypeProps } from
|
|
1
|
+
import { HelperTextProps } from '../HelperText';
|
|
2
|
+
import { LabelProps } from '../Label';
|
|
3
|
+
import React, { FC, FormHTMLAttributes, ReactElement } from 'react';
|
|
4
|
+
import { FormItemProps } from '../FormItem';
|
|
5
|
+
import { ItemTypeProps } from '../FormItem/itemType';
|
|
6
6
|
/**
|
|
7
7
|
* form 表单原始属性
|
|
8
8
|
*/
|
|
@@ -12,12 +12,6 @@ interface FormHtmlProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
|
12
12
|
* 配置项项类型
|
|
13
13
|
*/
|
|
14
14
|
export type configListProps = Array<FormItemProps>;
|
|
15
|
-
/**
|
|
16
|
-
* 表单校验方法type
|
|
17
|
-
*/
|
|
18
|
-
export type TCheckFormFunction = (nameList?: string[]) => false | {
|
|
19
|
-
[name: string]: any;
|
|
20
|
-
};
|
|
21
15
|
/**
|
|
22
16
|
* form 表单组件属性
|
|
23
17
|
* @typedef {object} FormProps
|
|
@@ -35,7 +29,7 @@ export interface FormProps {
|
|
|
35
29
|
* 校验表单方法,校验成功返回表单的键值对
|
|
36
30
|
* @return {false | {[name: string]: any}}
|
|
37
31
|
*/
|
|
38
|
-
check?:
|
|
32
|
+
check?: Function;
|
|
39
33
|
/**
|
|
40
34
|
* 存储所有表单item最后的配置,方便提交时做总的校验
|
|
41
35
|
*/
|
|
@@ -51,7 +45,7 @@ export interface FormProps {
|
|
|
51
45
|
/**
|
|
52
46
|
* 强制刷新表单状态方法
|
|
53
47
|
*/
|
|
54
|
-
refreshForm?: (list: Array<FormItemProps> |
|
|
48
|
+
refreshForm?: (list: Array<FormItemProps> | '', bData?: {
|
|
55
49
|
[name: string]: any;
|
|
56
50
|
}) => void;
|
|
57
51
|
/**
|
|
@@ -59,17 +53,17 @@ export interface FormProps {
|
|
|
59
53
|
*/
|
|
60
54
|
refData?: RefDataProps;
|
|
61
55
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
* 获取生效项目的值对象,会过滤掉不显示或是不启用的项目的值,
|
|
57
|
+
*/
|
|
64
58
|
getValidValues?: Function;
|
|
65
59
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
* 重置表单
|
|
61
|
+
*/
|
|
68
62
|
reset?: Function;
|
|
69
63
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
* 清空表单数据
|
|
65
|
+
* 允许清空单个
|
|
66
|
+
*/
|
|
73
67
|
clear?: (name?: string | string[]) => void;
|
|
74
68
|
}>;
|
|
75
69
|
/**
|
|
@@ -79,11 +73,11 @@ export interface FormProps {
|
|
|
79
73
|
/**
|
|
80
74
|
* 表单的主要类型 vertical 为竖布局,horizontal为横布局,默认为 horizontal.会被 configList的配置覆盖
|
|
81
75
|
*/
|
|
82
|
-
type?:
|
|
76
|
+
type?: 'vertical' | 'horizontal';
|
|
83
77
|
/**
|
|
84
78
|
* 获取表单的校验方法,会传出表单的校验方法
|
|
85
79
|
*/
|
|
86
|
-
getCheckForm?: (checkFrom:
|
|
80
|
+
getCheckForm?: (checkFrom: Function) => {};
|
|
87
81
|
/**
|
|
88
82
|
* 输入框内容改变传出
|
|
89
83
|
* @param {string} name 表单项的name
|
|
@@ -128,12 +122,12 @@ export interface FormProps {
|
|
|
128
122
|
*/
|
|
129
123
|
className?: string;
|
|
130
124
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
* 标题其他配置
|
|
126
|
+
*/
|
|
133
127
|
labelProps?: LabelProps;
|
|
134
128
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
* 报错提示其他配置
|
|
130
|
+
*/
|
|
137
131
|
helperTextProps?: HelperTextProps;
|
|
138
132
|
/**
|
|
139
133
|
* 文字宽度, 只对 type === vertical,状态下生效
|
package/Form/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
|
|
2
|
+
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-
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-e6f85fd5.js';
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
9
|
import '../TextField/index.js';
|
|
10
|
-
import '../_verture/typeof-
|
|
10
|
+
import '../_verture/typeof-adeedc13.js';
|
|
11
11
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
12
|
import '../Label/index.js';
|
|
13
13
|
import '../Help/index.js';
|
|
@@ -15,25 +15,26 @@ import '../Tooltip/index.js';
|
|
|
15
15
|
import 'rc-tooltip';
|
|
16
16
|
import 'rc-tooltip/lib/placements';
|
|
17
17
|
import 'clsx';
|
|
18
|
+
import '@para-ui/icons/Forbid';
|
|
18
19
|
import '../_verture/style-inject.es-300983ab.js';
|
|
19
20
|
import '@para-ui/icons/Help';
|
|
20
21
|
import '@para-ui/icons/PreviewClose';
|
|
21
22
|
import '@para-ui/icons/PreviewOpen';
|
|
22
|
-
import '@para-ui/icons/
|
|
23
|
+
import '@para-ui/icons/CloseCircleF';
|
|
23
24
|
import '../AutoTips/index.js';
|
|
24
25
|
import '../Loading/index.js';
|
|
25
26
|
import '@para-ui/icons/LoadingF';
|
|
26
27
|
import '../HelperText/index.js';
|
|
27
28
|
import '../_verture/useGlobalProps-1b846a65.js';
|
|
28
29
|
import '@para-ui/core/GlobalContext';
|
|
29
|
-
import '../_verture/index-
|
|
30
|
+
import '../_verture/index-e9007d6a.js';
|
|
30
31
|
import 'rc-dropdown';
|
|
31
32
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
32
33
|
import 'dayjs';
|
|
33
34
|
import '../RadioGroup/index.js';
|
|
34
35
|
import '../Radio/index.js';
|
|
35
36
|
import '../Select/index.js';
|
|
36
|
-
import '../_verture/defineProperty-
|
|
37
|
+
import '../_verture/defineProperty-1d116156.js';
|
|
37
38
|
import '../Empty/index.js';
|
|
38
39
|
import '../_verture/useFormatMessage-703f8b20.js';
|
|
39
40
|
import '@para-ui/icons/Close';
|
|
@@ -48,14 +49,13 @@ import 'rc-switch';
|
|
|
48
49
|
import '@para-ui/icons/Delete';
|
|
49
50
|
import '@para-ui/icons/LinkGroup';
|
|
50
51
|
import '../Button/index.js';
|
|
51
|
-
import '@para-ui/icons/Forbid';
|
|
52
52
|
import '../InputNumber/index.js';
|
|
53
53
|
import 'rc-input-number';
|
|
54
54
|
import '@para-ui/icons/Up';
|
|
55
|
-
import '@para-ui/icons/Minus';
|
|
56
|
-
import '@para-ui/icons/Plus';
|
|
57
55
|
import '../ComboSelect/index.js';
|
|
58
|
-
import '../_verture/index-
|
|
56
|
+
import '../_verture/index-d63bd287.js';
|
|
57
|
+
import '../_verture/typeof-b240b062.js';
|
|
58
|
+
import '@para-ui/icons/CloseCircle';
|
|
59
59
|
import '../Table/index.js';
|
|
60
60
|
import '@para-ui/icons/ScreenF';
|
|
61
61
|
import '@para-ui/icons/UpTriangleF';
|
|
@@ -65,23 +65,20 @@ import '../OperateBtn/index.js';
|
|
|
65
65
|
import '@para-ui/icons/More';
|
|
66
66
|
import '@para-ui/icons/Refresh';
|
|
67
67
|
import '../Pagination/index.js';
|
|
68
|
-
import '@para-ui/icons/DoubleLeft';
|
|
69
68
|
import '@para-ui/icons/Left';
|
|
70
69
|
import 'rc-pagination';
|
|
71
70
|
import '@para-ui/icons/Right';
|
|
71
|
+
import '@para-ui/icons/DoubleLeft';
|
|
72
72
|
import '@para-ui/icons/DoubleRight';
|
|
73
|
-
import '../_verture/index-
|
|
73
|
+
import '../_verture/index-7ec72724.js';
|
|
74
74
|
import 'rc-tree';
|
|
75
75
|
import '@para-ui/icons/Document';
|
|
76
76
|
import 'react-dom';
|
|
77
77
|
import '@para-ui/icons/EditFile';
|
|
78
78
|
import '@para-ui/icons/PlusCircle';
|
|
79
79
|
import '@para-ui/icons/MoreCircle';
|
|
80
|
-
import '../_verture/utils-
|
|
80
|
+
import '../_verture/utils-f0e81540.js';
|
|
81
81
|
|
|
82
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
83
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
84
|
-
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; }
|
|
85
82
|
/**
|
|
86
83
|
* form 表单组件
|
|
87
84
|
* @author zhanzl
|
|
@@ -94,7 +91,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
94
91
|
*/
|
|
95
92
|
var Form = function Form(props) {
|
|
96
93
|
var _props$className = props.className,
|
|
97
|
-
className = _props$className === void 0 ?
|
|
94
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
98
95
|
FormProps = props.FormProps,
|
|
99
96
|
requiredElement = props.requiredElement,
|
|
100
97
|
disRequiredElement = props.disRequiredElement,
|
|
@@ -158,19 +155,19 @@ var Form = function Form(props) {
|
|
|
158
155
|
var setValue = function setValue(name, type, value) {
|
|
159
156
|
switch (type) {
|
|
160
157
|
// 设置校验状态,自定义类型的表格设置,如果有一个是false,最终校验都不会通过
|
|
161
|
-
case
|
|
158
|
+
case 'status':
|
|
162
159
|
refData.current.itemsCheckStatus[name] = value;
|
|
163
160
|
break;
|
|
164
161
|
// 存储报错信息,防止表单刷新后,报错信息和状态丢失
|
|
165
|
-
case
|
|
162
|
+
case 'message':
|
|
166
163
|
refData.current.itemsCheckMessage[name] = value;
|
|
167
164
|
break;
|
|
168
165
|
// 存储加工之后的item 对象
|
|
169
|
-
case
|
|
166
|
+
case 'item':
|
|
170
167
|
refData.current.allItems[name] = value;
|
|
171
168
|
break;
|
|
172
169
|
// 初始化赋值
|
|
173
|
-
case
|
|
170
|
+
case 'initValue':
|
|
174
171
|
refData.current.allValues[name] = value;
|
|
175
172
|
break;
|
|
176
173
|
// 赋值,会触发表单的onChange事件
|
|
@@ -184,41 +181,29 @@ var Form = function Form(props) {
|
|
|
184
181
|
* 校验表单校验状态
|
|
185
182
|
* @return {boolean | { [name: string]: any }} 返回 校验错误false,如果校验通过则返回表单所有值
|
|
186
183
|
*/
|
|
187
|
-
var checkFrom = function checkFrom(
|
|
184
|
+
var checkFrom = function checkFrom() {
|
|
188
185
|
var errorCount = 0;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (refData.current.
|
|
202
|
-
|
|
203
|
-
continue;
|
|
204
|
-
}
|
|
205
|
-
var msg = validate(tItem, refData.current.allValues[key]);
|
|
206
|
-
if (msg) {
|
|
207
|
-
errorCount++;
|
|
208
|
-
if (typeof msg === "string") refData.current.itemsCheckMessage[key] = msg;
|
|
209
|
-
tItem.setErrorMsg && tItem.setErrorMsg(msg);
|
|
210
|
-
}
|
|
186
|
+
for (var i = 0; i < refData.current.configList.length; i++) {
|
|
187
|
+
var key = refData.current.configList[i].name;
|
|
188
|
+
var tItem = refData.current.allItems[key];
|
|
189
|
+
// 判断是否已经校验过了 或是 不需要校验,直接跳过
|
|
190
|
+
if (tItem.disabled || tItem.hide || refData.current.itemsCheckStatus[key] === true) continue;
|
|
191
|
+
if (refData.current.itemsCheckStatus[key] === false) {
|
|
192
|
+
errorCount++;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
var msg = validate(tItem, refData.current.allValues[key]);
|
|
196
|
+
if (msg) {
|
|
197
|
+
errorCount++;
|
|
198
|
+
if (typeof msg === 'string') refData.current.itemsCheckMessage[key] = msg;
|
|
199
|
+
tItem.setErrorMsg && tItem.setErrorMsg(msg);
|
|
211
200
|
}
|
|
212
|
-
} catch (err) {
|
|
213
|
-
_iterator.e(err);
|
|
214
|
-
} finally {
|
|
215
|
-
_iterator.f();
|
|
216
201
|
}
|
|
217
202
|
return !errorCount && refData.current.allValues;
|
|
218
203
|
};
|
|
219
204
|
/**
|
|
220
|
-
|
|
221
|
-
|
|
205
|
+
* 过滤有效值
|
|
206
|
+
*/
|
|
222
207
|
var getValidValues = function getValidValues() {
|
|
223
208
|
var tObj = {};
|
|
224
209
|
for (var i = 0; i < refData.current.configList.length; i++) {
|
|
@@ -230,8 +215,8 @@ var Form = function Form(props) {
|
|
|
230
215
|
return tObj;
|
|
231
216
|
};
|
|
232
217
|
/**
|
|
233
|
-
|
|
234
|
-
|
|
218
|
+
* 重置表单
|
|
219
|
+
*/
|
|
235
220
|
var resetForm = function resetForm() {
|
|
236
221
|
var isClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
237
222
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -247,15 +232,15 @@ var Form = function Form(props) {
|
|
|
247
232
|
refData.current.allValues[key] = frstBackData.current[key];
|
|
248
233
|
}
|
|
249
234
|
} else {
|
|
250
|
-
if (typeof name ===
|
|
251
|
-
setValue(name,
|
|
252
|
-
setValue(name,
|
|
253
|
-
setValue(name,
|
|
235
|
+
if (typeof name === 'string') {
|
|
236
|
+
setValue(name, 'status', undefined);
|
|
237
|
+
setValue(name, 'message', '');
|
|
238
|
+
setValue(name, 'initValue', undefined);
|
|
254
239
|
} else {
|
|
255
240
|
name.forEach(function (key) {
|
|
256
|
-
setValue(key,
|
|
257
|
-
setValue(key,
|
|
258
|
-
setValue(key,
|
|
241
|
+
setValue(key, 'status', undefined);
|
|
242
|
+
setValue(key, 'message', '');
|
|
243
|
+
setValue(key, 'initValue', undefined);
|
|
259
244
|
});
|
|
260
245
|
}
|
|
261
246
|
}
|
|
@@ -326,13 +311,7 @@ var Form = function Form(props) {
|
|
|
326
311
|
};
|
|
327
312
|
}
|
|
328
313
|
}, [form]);
|
|
329
|
-
|
|
330
|
-
event.preventDefault(); // 阻止默认的提交行为
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
return jsx("form", Object.assign({
|
|
334
|
-
onSubmit: handleSubmit
|
|
335
|
-
}, FormProps, {
|
|
314
|
+
return jsx("form", Object.assign({}, FormProps, {
|
|
336
315
|
className: "".concat($prefixCls, "-form")
|
|
337
316
|
}, {
|
|
338
317
|
children: jsx("div", Object.assign({
|
|
@@ -340,7 +319,7 @@ var Form = function Form(props) {
|
|
|
340
319
|
}, {
|
|
341
320
|
children: itemsConfig && itemsConfig.length > 0 && itemsConfig.map(function (item, idx) {
|
|
342
321
|
// 不显示则提前保存最后值
|
|
343
|
-
item.hide && setValue(item.name,
|
|
322
|
+
item.hide && setValue(item.name, 'item', item);
|
|
344
323
|
return !item.hide && jsx(FormItem, Object.assign({
|
|
345
324
|
type: type,
|
|
346
325
|
disabled: disabled,
|
package/FormItem/index.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
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-e6f85fd5.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
|
-
import '../_verture/constant-
|
|
7
|
-
import '../_verture/slicedToArray-
|
|
6
|
+
import '../_verture/constant-0d9802f7.js';
|
|
7
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
9
|
import '../TextField/index.js';
|
|
10
|
-
import '../_verture/typeof-
|
|
10
|
+
import '../_verture/typeof-adeedc13.js';
|
|
11
11
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
12
|
import '@paraview/lib';
|
|
13
13
|
import '@para-ui/icons/PreviewClose';
|
|
14
14
|
import '@para-ui/icons/PreviewOpen';
|
|
15
|
-
import '@para-ui/icons/
|
|
15
|
+
import '@para-ui/icons/CloseCircleF';
|
|
16
16
|
import '../AutoTips/index.js';
|
|
17
17
|
import '../Tooltip/index.js';
|
|
18
18
|
import 'rc-tooltip';
|
|
19
19
|
import 'rc-tooltip/lib/placements';
|
|
20
|
+
import '@para-ui/icons/Forbid';
|
|
20
21
|
import '../_verture/style-inject.es-300983ab.js';
|
|
21
22
|
import '../Loading/index.js';
|
|
22
23
|
import '@para-ui/icons/LoadingF';
|
|
23
24
|
import '../HelperText/index.js';
|
|
24
25
|
import '../_verture/useGlobalProps-1b846a65.js';
|
|
25
26
|
import '@para-ui/core/GlobalContext';
|
|
26
|
-
import '../_verture/index-
|
|
27
|
+
import '../_verture/index-e9007d6a.js';
|
|
27
28
|
import 'rc-dropdown';
|
|
28
29
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
29
30
|
import 'dayjs';
|
|
@@ -32,8 +33,8 @@ import '@para-ui/icons/Help';
|
|
|
32
33
|
import '../RadioGroup/index.js';
|
|
33
34
|
import '../Radio/index.js';
|
|
34
35
|
import '../Select/index.js';
|
|
35
|
-
import '../_verture/defineProperty-
|
|
36
|
-
import '../_verture/toConsumableArray-
|
|
36
|
+
import '../_verture/defineProperty-1d116156.js';
|
|
37
|
+
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
37
38
|
import '../Empty/index.js';
|
|
38
39
|
import '../_verture/useFormatMessage-703f8b20.js';
|
|
39
40
|
import '@para-ui/icons/Close';
|
|
@@ -48,14 +49,13 @@ import 'rc-switch';
|
|
|
48
49
|
import '@para-ui/icons/Delete';
|
|
49
50
|
import '@para-ui/icons/LinkGroup';
|
|
50
51
|
import '../Button/index.js';
|
|
51
|
-
import '@para-ui/icons/Forbid';
|
|
52
52
|
import '../InputNumber/index.js';
|
|
53
53
|
import 'rc-input-number';
|
|
54
54
|
import '@para-ui/icons/Up';
|
|
55
|
-
import '@para-ui/icons/Minus';
|
|
56
|
-
import '@para-ui/icons/Plus';
|
|
57
55
|
import '../ComboSelect/index.js';
|
|
58
|
-
import '../_verture/index-
|
|
56
|
+
import '../_verture/index-d63bd287.js';
|
|
57
|
+
import '../_verture/typeof-b240b062.js';
|
|
58
|
+
import '@para-ui/icons/CloseCircle';
|
|
59
59
|
import '../Table/index.js';
|
|
60
60
|
import '@para-ui/icons/ScreenF';
|
|
61
61
|
import '@para-ui/icons/UpTriangleF';
|
|
@@ -65,16 +65,16 @@ import '../OperateBtn/index.js';
|
|
|
65
65
|
import '@para-ui/icons/More';
|
|
66
66
|
import '@para-ui/icons/Refresh';
|
|
67
67
|
import '../Pagination/index.js';
|
|
68
|
-
import '@para-ui/icons/DoubleLeft';
|
|
69
68
|
import '@para-ui/icons/Left';
|
|
70
69
|
import 'rc-pagination';
|
|
71
70
|
import '@para-ui/icons/Right';
|
|
71
|
+
import '@para-ui/icons/DoubleLeft';
|
|
72
72
|
import '@para-ui/icons/DoubleRight';
|
|
73
|
-
import '../_verture/index-
|
|
73
|
+
import '../_verture/index-7ec72724.js';
|
|
74
74
|
import 'rc-tree';
|
|
75
75
|
import '@para-ui/icons/Document';
|
|
76
76
|
import 'react-dom';
|
|
77
77
|
import '@para-ui/icons/EditFile';
|
|
78
78
|
import '@para-ui/icons/PlusCircle';
|
|
79
79
|
import '@para-ui/icons/MoreCircle';
|
|
80
|
-
import '../_verture/utils-
|
|
80
|
+
import '../_verture/utils-f0e81540.js';
|
package/FunctionModal/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { u as useModal } from '../_verture/modalContext-
|
|
2
|
-
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-
|
|
3
|
-
import '../_verture/toConsumableArray-
|
|
1
|
+
import { u as useModal } from '../_verture/modalContext-c12ca3e8.js';
|
|
2
|
+
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-c12ca3e8.js';
|
|
3
|
+
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
4
4
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
5
|
-
import '../_verture/slicedToArray-
|
|
6
|
-
import '../_verture/index-
|
|
5
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
6
|
+
import '../_verture/index-d63bd287.js';
|
|
7
|
+
import '../_verture/typeof-b240b062.js';
|
|
7
8
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
8
9
|
import 'react/jsx-runtime';
|
|
9
10
|
import 'react';
|
|
10
11
|
import '../Modal/index.js';
|
|
11
|
-
import '../_verture/defineProperty-
|
|
12
|
-
import '../_verture/typeof-
|
|
12
|
+
import '../_verture/defineProperty-1d116156.js';
|
|
13
|
+
import '../_verture/typeof-adeedc13.js';
|
|
13
14
|
import 'rc-dialog';
|
|
14
15
|
import '../Button/index.js';
|
|
15
16
|
import 'clsx';
|
|
@@ -18,16 +19,17 @@ import '@para-ui/icons/Forbid';
|
|
|
18
19
|
import '../Tooltip/index.js';
|
|
19
20
|
import 'rc-tooltip';
|
|
20
21
|
import 'rc-tooltip/lib/placements';
|
|
21
|
-
import '../_verture/constant-
|
|
22
|
+
import '../_verture/constant-0d9802f7.js';
|
|
22
23
|
import '../_verture/style-inject.es-300983ab.js';
|
|
23
24
|
import '@para-ui/icons/Down';
|
|
24
|
-
import '../_verture/index-
|
|
25
|
+
import '../_verture/index-e9007d6a.js';
|
|
25
26
|
import 'rc-dropdown';
|
|
26
27
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
27
28
|
import 'dayjs';
|
|
28
29
|
import '@paraview/lib';
|
|
29
30
|
import '../_verture/useFormatMessage-703f8b20.js';
|
|
30
31
|
import '@para-ui/core/GlobalContext';
|
|
32
|
+
import '../AutoTips/index.js';
|
|
31
33
|
import '@para-ui/icons/Close';
|
|
32
34
|
import '../_verture/index-e2881a53.js';
|
|
33
35
|
import 'react-dom';
|
package/GlobalContext/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { i as i18nIntl } from '../_verture/intl-
|
|
2
|
+
import { i as i18nIntl } from '../_verture/intl-5c1ec055.js';
|
|
3
3
|
import { GetLanguage } from '@paraview/lib';
|
|
4
4
|
import { d as defaultModalLocale } from '../_verture/index-e2881a53.js';
|
|
5
|
-
import '../_verture/typeof-
|
|
5
|
+
import '../_verture/typeof-adeedc13.js';
|
|
6
6
|
|
|
7
7
|
//confirm 默认中文
|
|
8
8
|
var confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
|
package/Help/index.js
CHANGED
|
@@ -3,15 +3,16 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Tooltip } from '../Tooltip/index.js';
|
|
4
4
|
import HelpIcon from '@para-ui/icons/Help';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
6
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
|
-
import '../_verture/slicedToArray-
|
|
8
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
9
9
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
10
10
|
import 'react';
|
|
11
11
|
import 'rc-tooltip';
|
|
12
12
|
import 'rc-tooltip/lib/placements';
|
|
13
|
+
import '@para-ui/icons/Forbid';
|
|
13
14
|
|
|
14
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/12/2 下午8:14\n* @description\n*/\n/**\n* @author
|
|
15
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/12/2 下午8:14\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-help {\n display: inline-block;\n font-weight: 500;\n color: rgb(161, 168, 179);\n}\n.paraui-v4-help:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-help svg {\n font-size: inherit;\n color: inherit;\n font-size: 16px;\n}";
|
|
15
16
|
styleInject(css_248z);
|
|
16
17
|
|
|
17
18
|
//help
|
package/HelperText/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
2
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
3
3
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
4
4
|
|
|
5
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 表单错误提示\n*/\n/**\n* @author
|
|
5
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 表单错误提示\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-helper-text {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-helper-text.paraui-v4-helper-text-error {\n color: rgb(244, 66, 66);\n}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
var HelperText = function HelperText(props) {
|
package/InputLang/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import React, { FunctionComponent, ReactNode } from 'react';
|
|
|
7
7
|
import { HelperTextDetailProps } from '../HelperText';
|
|
8
8
|
import { LabelTooltipProps } from "../Label";
|
|
9
9
|
import './index.scss';
|
|
10
|
+
import { TooltipProps } from "../Tooltip";
|
|
10
11
|
interface valueProps {
|
|
11
12
|
[name: string]: string;
|
|
12
13
|
}
|
|
@@ -29,6 +30,10 @@ export interface InputLangProps extends HelperTextDetailProps {
|
|
|
29
30
|
placeholderValue?: string;
|
|
30
31
|
/** 是否禁用 */
|
|
31
32
|
disabled?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 禁用提示
|
|
35
|
+
*/
|
|
36
|
+
disabledTooltip?: TooltipProps;
|
|
32
37
|
/** 是否必填 */
|
|
33
38
|
required?: boolean;
|
|
34
39
|
/** 弹出框样式class */
|