@para-ui/core 4.0.0-rc.4 → 4.0.0-rc.6

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.
Files changed (188) hide show
  1. package/AutoBox/index.js +72 -85
  2. package/AutoTips/index.js +72 -95
  3. package/Badge/index.js +17 -16
  4. package/Breadcrumbs/index.js +57 -73
  5. package/Button/index.js +90 -118
  6. package/ButtonGroup/index.js +30 -33
  7. package/Carousel/index.js +29 -33
  8. package/Cascader/index.js +9 -10
  9. package/Checkbox/index.js +28 -35
  10. package/CheckboxGroup/index.js +43 -58
  11. package/Collapse/index.js +52 -49
  12. package/CollapseBox/index.js +65 -70
  13. package/CollapseLayout/index.js +106 -101
  14. package/ColorPicker/index.js +3 -3
  15. package/ComboSelect/index.js +260 -337
  16. package/ComboSelect/lang/en_US.d.ts +1 -0
  17. package/ComboSelect/lang/index.d.ts +2 -0
  18. package/ComboSelect/lang/zh_CN.d.ts +1 -0
  19. package/ComboSelect/utils.d.ts +6 -0
  20. package/Container/index.js +17 -21
  21. package/CopyText/index.js +50 -83
  22. package/DatePicker/index.js +24 -27
  23. package/Descriptions/index.js +50 -59
  24. package/Desktop/index.js +161 -180
  25. package/DragVerify/index.js +77 -113
  26. package/Drawer/index.js +80 -95
  27. package/Dropdown/index.js +3 -3
  28. package/DynamicMultiBox/index.js +222 -224
  29. package/DynamicMultiBox/interface.d.ts +7 -0
  30. package/Empty/index.js +26 -28
  31. package/Form/index.js +70 -74
  32. package/FormItem/index.js +18 -15
  33. package/FunctionModal/index.js +7 -14
  34. package/GlobalContext/index.js +17 -20
  35. package/Help/index.js +9 -12
  36. package/HelperText/index.js +11 -11
  37. package/InputLang/index.js +104 -124
  38. package/InputNumber/index.js +62 -81
  39. package/Label/index.js +19 -21
  40. package/Loading/index.js +11 -10
  41. package/Menu/index.js +302 -371
  42. package/Message/index.js +104 -113
  43. package/Modal/index.js +122 -148
  44. package/MultiBox/index.d.ts +5 -0
  45. package/MultiBox/index.js +111 -115
  46. package/Notification/index.js +105 -103
  47. package/OperateBtn/index.d.ts +3 -0
  48. package/OperateBtn/index.js +77 -107
  49. package/PageHeader/index.js +327 -406
  50. package/Pagination/index.js +107 -137
  51. package/ParauiProvider/index.js +20 -22
  52. package/PasswordRules/index.js +36 -40
  53. package/PopConfirm/index.js +60 -77
  54. package/Popover/index.js +12 -12
  55. package/Progress/index.js +72 -74
  56. package/Querying/index.js +22 -23
  57. package/README.md +2 -0
  58. package/Radio/index.js +27 -34
  59. package/RadioGroup/index.js +38 -52
  60. package/Search/index.js +34 -43
  61. package/Select/index.js +281 -345
  62. package/SelectInput/index.js +8 -13
  63. package/Selector/index.js +582 -796
  64. package/SelectorPicker/index.js +113 -134
  65. package/SingleBox/index.d.ts +5 -0
  66. package/SingleBox/index.js +92 -88
  67. package/Slider/index.js +46 -57
  68. package/Status/index.js +14 -13
  69. package/Stepper/index.js +24 -25
  70. package/Styles/theme.scss +9 -9
  71. package/Switch/index.js +32 -35
  72. package/Table/index.js +360 -494
  73. package/Tabs/index.js +100 -100
  74. package/Tag/index.js +64 -82
  75. package/TextEditor/index.js +78 -100
  76. package/TextField/index.js +142 -183
  77. package/TimePicker/index.js +29 -28
  78. package/Timeline/index.js +50 -47
  79. package/Title/index.js +32 -34
  80. package/ToggleButton/index.js +29 -29
  81. package/Tooltip/index.js +52 -56
  82. package/Transfer/index.js +117 -154
  83. package/Tree/index.js +9 -10
  84. package/Upload/index.js +125 -143
  85. package/Upload/interface.d.ts +2 -0
  86. package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
  87. package/_verture/{index-5a7e2438.js → index-3cdaba96.js} +967 -934
  88. package/_verture/{index-b1f80962.js → index-4fafd0a0.js} +6 -8
  89. package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
  90. package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
  91. package/_verture/{index-232d890b.js → index-d63bd287.js} +1 -1
  92. package/_verture/index-da9097d3.js +239 -0
  93. package/_verture/{index-9331b116.js → index-e0f9064d.js} +125 -134
  94. package/_verture/intl-f2f27722.js +69 -0
  95. package/_verture/{modalContext-736ff215.js → modalContext-8534f23d.js} +36 -64
  96. package/_verture/{slicedToArray-a8206399.js → slicedToArray-75fa4188.js} +15 -2
  97. package/_verture/{toConsumableArray-8f4c9589.js → toConsumableArray-c7a8028f.js} +1 -1
  98. package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
  99. package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
  100. package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
  101. package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
  102. package/_verture/utils-c17b5265.js +97 -0
  103. package/index.js +24 -23
  104. package/locale/en-US.d.ts +1 -0
  105. package/locale/index.d.ts +2 -0
  106. package/locale/index.js +10 -8
  107. package/locale/zh-CN.d.ts +1 -0
  108. package/package.json +11 -10
  109. package/umd/AutoBox.js +9 -8
  110. package/umd/AutoTips.js +9 -8
  111. package/umd/Badge.js +1 -1
  112. package/umd/Breadcrumbs.js +9 -8
  113. package/umd/Button.js +9 -8
  114. package/umd/ButtonGroup.js +9 -8
  115. package/umd/Carousel.js +5 -5
  116. package/umd/Cascader.js +9 -8
  117. package/umd/Checkbox.js +9 -8
  118. package/umd/CheckboxGroup.js +9 -8
  119. package/umd/Collapse.js +8 -7
  120. package/umd/CollapseBox.js +1 -1
  121. package/umd/CollapseLayout.js +4 -4
  122. package/umd/ColorPicker.js +1 -1
  123. package/umd/ComboSelect.js +9 -8
  124. package/umd/Container.js +1 -1
  125. package/umd/CopyText.js +9 -8
  126. package/umd/DatePicker.js +9 -8
  127. package/umd/Descriptions.js +9 -8
  128. package/umd/Desktop.js +9 -8
  129. package/umd/DragVerify.js +4 -4
  130. package/umd/Drawer.js +9 -8
  131. package/umd/Dropdown.js +6 -5
  132. package/umd/DynamicMultiBox.js +11 -10
  133. package/umd/Empty.js +1 -1
  134. package/umd/Form.js +9 -8
  135. package/umd/FormItem.js +9 -8
  136. package/umd/FunctionModal.js +9 -8
  137. package/umd/GlobalContext.js +1 -1
  138. package/umd/Help.js +9 -8
  139. package/umd/HelperText.js +1 -1
  140. package/umd/InputLang.js +9 -8
  141. package/umd/InputNumber.js +9 -8
  142. package/umd/Label.js +9 -8
  143. package/umd/Loading.js +4 -4
  144. package/umd/Menu.js +4 -4
  145. package/umd/Message.js +4 -4
  146. package/umd/Modal.js +9 -8
  147. package/umd/MultiBox.js +9 -8
  148. package/umd/Notification.js +8 -7
  149. package/umd/OperateBtn.js +9 -8
  150. package/umd/PageHeader.js +9 -8
  151. package/umd/Pagination.js +9 -8
  152. package/umd/ParauiProvider.js +1 -1
  153. package/umd/PasswordRules.js +4 -4
  154. package/umd/PopConfirm.js +9 -8
  155. package/umd/Popover.js +9 -8
  156. package/umd/Progress.js +5 -5
  157. package/umd/Querying.js +1 -1
  158. package/umd/Radio.js +9 -8
  159. package/umd/RadioGroup.js +9 -8
  160. package/umd/Search.js +9 -8
  161. package/umd/Select.js +9 -8
  162. package/umd/SelectInput.js +9 -8
  163. package/umd/Selector.js +9 -8
  164. package/umd/SelectorPicker.js +9 -8
  165. package/umd/SingleBox.js +9 -8
  166. package/umd/Slider.js +6 -5
  167. package/umd/Status.js +4 -4
  168. package/umd/Stepper.js +9 -8
  169. package/umd/Switch.js +9 -8
  170. package/umd/Table.js +9 -8
  171. package/umd/Tabs.js +9 -8
  172. package/umd/Tag.js +9 -8
  173. package/umd/TextEditor.js +22 -21
  174. package/umd/TextField.js +9 -8
  175. package/umd/TimePicker.js +9 -8
  176. package/umd/Timeline.js +1 -1
  177. package/umd/Title.js +9 -8
  178. package/umd/ToggleButton.js +9 -8
  179. package/umd/Tooltip.js +9 -8
  180. package/umd/Transfer.js +10 -9
  181. package/umd/Tree.js +9 -8
  182. package/umd/Upload.js +10 -9
  183. package/umd/locale.js +1 -1
  184. package/_verture/index-e9007d6a.js +0 -236
  185. package/_verture/intl-5c1ec055.js +0 -81
  186. package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
  187. package/_verture/utils-418da0a4.js +0 -73
  188. /package/_verture/{typeof-c310ee4a.js → typeof-b240b062.js} +0 -0
@@ -6,6 +6,7 @@
6
6
  import { ReactNode } from 'react';
7
7
  import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from '@para-ui/core';
8
8
  import { LabelProps } from "../Label";
9
+ import { TooltipProps } from "../Tooltip";
9
10
  /**组件类型:输入框,下拉框,开关,数字输入框,国际化输入框,日期框,时间选择框,组合选择器,自定义组件*/
10
11
  export type IInputType = 'TextField' | 'Select' | 'Switch' | 'InputNumber' | 'InputLang' | 'ComboSelect' | 'DatePicker' | 'custom';
11
12
  /** 配置项*/
@@ -30,6 +31,8 @@ export type IConfig = {
30
31
  style?: React.CSSProperties;
31
32
  /** 标题样式 */
32
33
  labelProps?: LabelProps;
34
+ /** 组件其他样式,返回每个组件的样式 */
35
+ otherProps?: (rowIndex: number, name: string, valueList?: IValueList) => any;
33
36
  /** 其他*/
34
37
  [name: string]: any;
35
38
  } & (TextFieldProps | SelectProps | SwitchProps | InputNumberProps | InputLangProps | ComboSelectProps | DatePickerProps);
@@ -137,6 +140,10 @@ export interface IMultiValueProps {
137
140
  * 禁用新增标识
138
141
  */
139
142
  disabledAdd?: boolean;
143
+ /**
144
+ * 禁用提示
145
+ */
146
+ disabledAddTooltip?: TooltipProps;
140
147
  /**
141
148
  * 列之间icon
142
149
  * */
package/Empty/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
- import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
4
- import { u as useGlobalProps } from '../_verture/useGlobalProps-1b846a65.js';
5
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
3
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
4
+ import { u as useGlobalProps } from '../_verture/useGlobalProps-1e416658.js';
5
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
6
6
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
7
7
  import 'react';
8
8
  import '@para-ui/core/GlobalContext';
9
9
 
10
- var LargeNull = function LargeNull() {
10
+ const LargeNull = () => {
11
11
  return jsx("svg", Object.assign({
12
12
  xmlns: "http://www.w3.org/2000/svg",
13
13
  width: "100%",
@@ -462,7 +462,7 @@ var LargeNull = function LargeNull() {
462
462
  }))
463
463
  }));
464
464
  };
465
- var SmallNull = function SmallNull() {
465
+ const SmallNull = () => {
466
466
  return jsx("svg", Object.assign({
467
467
  xmlns: "http://www.w3.org/2000/svg",
468
468
  width: "100%",
@@ -562,42 +562,40 @@ var zh = {
562
562
  };
563
563
 
564
564
  var localeJson = {
565
- zh: zh,
566
- en: en
565
+ zh,
566
+ en
567
567
  };
568
568
 
569
569
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-empty {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-v4-empty > .empty-image {\n line-height: 0;\n overflow: hidden;\n}\n.paraui-v4-empty > .empty-image img {\n width: 100%;\n}\n.paraui-v4-empty .empty-image-large {\n width: 334px;\n height: 238px;\n}\n.paraui-v4-empty .empty-image-small {\n width: 120px;\n height: 120px;\n}\n.paraui-v4-empty > .empty-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-empty > .empty-description > .empty-description-refresh {\n display: inline-block;\n}\n.paraui-v4-empty > .empty-description > .empty-description-refresh span {\n color: rgb(46, 101, 230);\n cursor: pointer;\n}\n.paraui-v4-empty > .empty-description > .empty-description-refresh span:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-empty.paraui-v4-empty-large > .empty-description {\n margin-top: 20px;\n}\n.paraui-v4-empty.paraui-v4-empty-small > .empty-description {\n margin-top: 10px;\n font-size: 14px;\n}";
570
570
  styleInject(css_248z);
571
571
 
572
- var imageMap = {
572
+ const imageMap = {
573
573
  large: jsx(LargeNull, {}),
574
574
  small: jsx(SmallNull, {})
575
575
  };
576
576
  //empty空状态
577
- var Empty = function Empty(props) {
578
- var _useGlobalProps = useGlobalProps(props, 'Empty'),
579
- className = _useGlobalProps.className,
580
- style = _useGlobalProps.style,
581
- _useGlobalProps$size = _useGlobalProps.size,
582
- size = _useGlobalProps$size === void 0 ? 'large' : _useGlobalProps$size,
583
- imageStyle = _useGlobalProps.imageStyle,
584
- _useGlobalProps$image = _useGlobalProps.image,
585
- image = _useGlobalProps$image === void 0 ? imageMap[size] : _useGlobalProps$image,
586
- description = _useGlobalProps.description,
587
- _useGlobalProps$showR = _useGlobalProps.showRefresh,
588
- showRefresh = _useGlobalProps$showR === void 0 ? false : _useGlobalProps$showR,
589
- onRefresh = _useGlobalProps.onRefresh,
590
- customEmpty = _useGlobalProps.customEmpty;
591
- var intl = useFormatMessage('Empty', localeJson);
592
- var handleClick = function handleClick(e) {
577
+ const Empty = props => {
578
+ const {
579
+ className,
580
+ style,
581
+ size = 'large',
582
+ imageStyle,
583
+ image = imageMap[size],
584
+ description,
585
+ showRefresh = false,
586
+ onRefresh,
587
+ customEmpty
588
+ } = useGlobalProps(props, 'Empty');
589
+ const intl = useFormatMessage('Empty', localeJson);
590
+ const handleClick = e => {
593
591
  onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh(e);
594
592
  };
595
- var des = typeof description !== 'undefined' ? description : intl({
593
+ const des = typeof description !== 'undefined' ? description : intl({
596
594
  id: 'noData'
597
595
  });
598
- var alt = typeof des === 'string' ? des : 'empty';
599
- var imageNode = null;
600
- var refreshNode = showRefresh ? jsxs("span", Object.assign({
596
+ const alt = typeof des === 'string' ? des : 'empty';
597
+ let imageNode = null;
598
+ const refreshNode = showRefresh ? jsxs("span", Object.assign({
601
599
  className: 'empty-description-refresh'
602
600
  }, {
603
601
  children: [intl({
package/Form/index.js CHANGED
@@ -1,14 +1,10 @@
1
- import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
2
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
3
1
  import { jsx } from 'react/jsx-runtime';
4
2
  import { DeepClone } from '@paraview/lib';
5
3
  import React__default from 'react';
6
- import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-9331b116.js';
7
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
8
- import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
9
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
4
+ import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-e0f9064d.js';
5
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
6
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
10
7
  import '../TextField/index.js';
11
- import '../_verture/typeof-adeedc13.js';
12
8
  import '../_verture/tslib.es6-55ed4bd2.js';
13
9
  import '../Label/index.js';
14
10
  import '../Help/index.js';
@@ -26,16 +22,16 @@ import '../AutoTips/index.js';
26
22
  import '../Loading/index.js';
27
23
  import '@para-ui/icons/LoadingF';
28
24
  import '../HelperText/index.js';
29
- import '../_verture/useGlobalProps-1b846a65.js';
25
+ import '../_verture/useGlobalProps-1e416658.js';
30
26
  import '@para-ui/core/GlobalContext';
31
- import '../_verture/index-e9007d6a.js';
27
+ import '../_verture/index-da9097d3.js';
32
28
  import 'rc-dropdown';
33
- import '../_verture/usePopupContainer-87febeb9.js';
29
+ import '../_verture/usePopupContainer-635f66f4.js';
34
30
  import 'dayjs';
31
+ import '../_verture/slicedToArray-75fa4188.js';
35
32
  import '../RadioGroup/index.js';
36
33
  import '../Radio/index.js';
37
34
  import '../Select/index.js';
38
- import '../_verture/defineProperty-1d116156.js';
39
35
  import '../Empty/index.js';
40
36
  import '@para-ui/icons/Close';
41
37
  import '@para-ui/icons/Down';
@@ -54,15 +50,19 @@ import '../InputNumber/index.js';
54
50
  import 'rc-input-number';
55
51
  import '@para-ui/icons/Up';
56
52
  import '../ComboSelect/index.js';
57
- import '../_verture/index-232d890b.js';
58
- import '../_verture/typeof-c310ee4a.js';
59
53
  import '../Table/index.js';
54
+ import '../_verture/typeof-adeedc13.js';
60
55
  import '@para-ui/icons/ScreenF';
61
56
  import '@para-ui/icons/UpTriangleF';
62
57
  import '@para-ui/icons/DownTriangleF';
63
58
  import '@para-ui/icons/Panel';
59
+ import '../_verture/defineProperty-1d116156.js';
64
60
  import '../OperateBtn/index.js';
65
61
  import '@para-ui/icons/More';
62
+ import '../PopConfirm/index.js';
63
+ import '@para-ui/icons/CheckCircleF';
64
+ import '@para-ui/icons/WarningCircle';
65
+ import '@para-ui/icons/WarningCircleF';
66
66
  import '@para-ui/icons/Refresh';
67
67
  import '../Pagination/index.js';
68
68
  import '@para-ui/icons/Left';
@@ -70,14 +70,17 @@ 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-b1f80962.js';
73
+ import '../_verture/index-4fafd0a0.js';
74
+ import '../_verture/toConsumableArray-c7a8028f.js';
75
+ import '../_verture/index-d63bd287.js';
76
+ import '../_verture/typeof-b240b062.js';
74
77
  import 'rc-tree';
75
78
  import '@para-ui/icons/Document';
76
79
  import 'react-dom';
77
80
  import '@para-ui/icons/EditFile';
78
81
  import '@para-ui/icons/PlusCircle';
79
82
  import '@para-ui/icons/MoreCircle';
80
- import '../_verture/utils-418da0a4.js';
83
+ import '../_verture/utils-c17b5265.js';
81
84
  import '../Search/index.js';
82
85
 
83
86
  /**
@@ -90,47 +93,40 @@ import '../Search/index.js';
90
93
  * @param {string} type 表单形态 竖布局 或 横布局,默认横
91
94
  * @description 用于根据配置自动生成表单
92
95
  */
93
- var Form = function Form(props) {
94
- var intl = useFormatMessage('FormItem', localeJson);
95
- var _props$className = props.className,
96
- className = _props$className === void 0 ? '' : _props$className,
97
- FormProps = props.FormProps,
98
- requiredElement = props.requiredElement,
99
- disRequiredElement = props.disRequiredElement,
100
- configList = props.configList,
101
- type = props.type,
102
- getCheckForm = props.getCheckForm,
103
- backData = props.backData,
104
- disabled = props.disabled,
105
- onChange = props.onChange,
106
- getForcedRefresh = props.getForcedRefresh,
107
- labelProps = props.labelProps,
108
- helperTextProps = props.helperTextProps,
109
- form = props.form,
110
- _props$labelWidth = props.labelWidth,
111
- labelWidth = _props$labelWidth === void 0 ? 60 : _props$labelWidth,
112
- _props$disOnlySpace = props.disOnlySpace,
113
- disOnlySpace = _props$disOnlySpace === void 0 ? true : _props$disOnlySpace;
114
- var frstBackData = React__default.useRef(backData && DeepClone(backData) || {});
115
- var firstConfigList = React__default.useRef(configList);
96
+ const Form = props => {
97
+ const intl = useFormatMessage('FormItem', localeJson);
98
+ const {
99
+ className = '',
100
+ FormProps,
101
+ requiredElement,
102
+ disRequiredElement,
103
+ configList,
104
+ type,
105
+ getCheckForm,
106
+ backData,
107
+ disabled,
108
+ onChange,
109
+ getForcedRefresh,
110
+ labelProps,
111
+ helperTextProps,
112
+ form,
113
+ labelWidth = 60,
114
+ disOnlySpace = true
115
+ } = props;
116
+ const frstBackData = React__default.useRef(backData && DeepClone(backData) || {});
117
+ const firstConfigList = React__default.useRef(configList);
116
118
  /**
117
119
  * item配置项目
118
120
  */
119
- var _React$useState = React__default.useState(configList),
120
- _React$useState2 = _slicedToArray(_React$useState, 2),
121
- itemsConfig = _React$useState2[0],
122
- setItemsConfig = _React$useState2[1];
121
+ const [itemsConfig, setItemsConfig] = React__default.useState(configList);
123
122
  /**
124
123
  * 更新表单项
125
124
  */
126
- var _React$useState3 = React__default.useState(Math.random()),
127
- _React$useState4 = _slicedToArray(_React$useState3, 2),
128
- refresh = _React$useState4[0],
129
- setRefresh = _React$useState4[1];
125
+ const [refresh, setRefresh] = React__default.useState(Math.random());
130
126
  /**
131
127
  * 用于存储所有常用数据
132
128
  */
133
- var refData = React__default.useRef({
129
+ const refData = React__default.useRef({
134
130
  allItems: {},
135
131
  itemsCheckStatus: {},
136
132
  itemsCheckMessage: {},
@@ -142,11 +138,11 @@ var Form = function Form(props) {
142
138
  * @param {Array<FormItemProps>} list 表单项配置
143
139
  * @param { [name: string]: any } bData 回填数据
144
140
  */
145
- var refreshForm = function refreshForm(list, bData) {
146
- if (bData) for (var key in bData) {
141
+ const refreshForm = (list, bData) => {
142
+ if (bData) for (const key in bData) {
147
143
  refData.current.allValues[key] = bData[key];
148
144
  }
149
- setItemsConfig(list || itemsConfig && _toConsumableArray(itemsConfig));
145
+ setItemsConfig(list || itemsConfig && [...itemsConfig]);
150
146
  };
151
147
  /**
152
148
  * 保存值 和 最后的 item 对象
@@ -154,7 +150,7 @@ var Form = function Form(props) {
154
150
  * @param {string} type 需要设置值的类型 value | item | status | initValue | message
155
151
  * @param {any} value 需要设置的值
156
152
  */
157
- var setValue = function setValue(name, type, value) {
153
+ const setValue = (name, type, value) => {
158
154
  switch (type) {
159
155
  // 设置校验状态,自定义类型的表格设置,如果有一个是false,最终校验都不会通过
160
156
  case 'status':
@@ -183,18 +179,18 @@ var Form = function Form(props) {
183
179
  * 校验表单校验状态
184
180
  * @return {boolean | { [name: string]: any }} 返回 校验错误false,如果校验通过则返回表单所有值
185
181
  */
186
- var checkFrom = function checkFrom() {
187
- var errorCount = 0;
188
- for (var i = 0; i < refData.current.configList.length; i++) {
189
- var key = refData.current.configList[i].name;
190
- var tItem = refData.current.allItems[key];
182
+ const checkFrom = () => {
183
+ let errorCount = 0;
184
+ for (let i = 0; i < refData.current.configList.length; i++) {
185
+ const key = refData.current.configList[i].name;
186
+ const tItem = refData.current.allItems[key];
191
187
  // 判断是否已经校验过了 或是 不需要校验,直接跳过
192
188
  if (tItem.disabled || tItem.hide || refData.current.itemsCheckStatus[key] === true) continue;
193
189
  if (refData.current.itemsCheckStatus[key] === false) {
194
190
  errorCount++;
195
191
  continue;
196
192
  }
197
- var msg = validate(tItem, refData.current.allValues[key], intl);
193
+ const msg = validate(tItem, refData.current.allValues[key], intl);
198
194
  if (msg) {
199
195
  errorCount++;
200
196
  if (typeof msg === 'string') refData.current.itemsCheckMessage[key] = msg;
@@ -206,10 +202,10 @@ var Form = function Form(props) {
206
202
  /**
207
203
  * 过滤有效值
208
204
  */
209
- var getValidValues = function getValidValues() {
210
- var tObj = {};
211
- for (var i = 0; i < refData.current.configList.length; i++) {
212
- var item = refData.current.configList[i];
205
+ const getValidValues = () => {
206
+ const tObj = {};
207
+ for (let i = 0; i < refData.current.configList.length; i++) {
208
+ const item = refData.current.configList[i];
213
209
  if (!item.hide && refData.current.allValues[item.name]) {
214
210
  tObj[item.name] = refData.current.allValues[item.name];
215
211
  }
@@ -219,9 +215,9 @@ var Form = function Form(props) {
219
215
  /**
220
216
  * 重置表单
221
217
  */
222
- var resetForm = function resetForm() {
223
- var isClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
224
- var name = arguments.length > 1 ? arguments[1] : undefined;
218
+ const resetForm = function () {
219
+ let isClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
220
+ let name = arguments.length > 1 ? arguments[1] : undefined;
225
221
  if (!isClear || !name) {
226
222
  refData.current = {
227
223
  allItems: {},
@@ -230,7 +226,7 @@ var Form = function Form(props) {
230
226
  configList: firstConfigList.current || [],
231
227
  allValues: {}
232
228
  };
233
- if (frstBackData.current && !isClear) for (var key in frstBackData.current) {
229
+ if (frstBackData.current && !isClear) for (const key in frstBackData.current) {
234
230
  refData.current.allValues[key] = frstBackData.current[key];
235
231
  }
236
232
  } else {
@@ -239,7 +235,7 @@ var Form = function Form(props) {
239
235
  setValue(name, 'message', '');
240
236
  setValue(name, 'initValue', undefined);
241
237
  } else {
242
- name.forEach(function (key) {
238
+ name.forEach(key => {
243
239
  setValue(key, 'status', undefined);
244
240
  setValue(key, 'message', '');
245
241
  setValue(key, 'initValue', undefined);
@@ -252,7 +248,7 @@ var Form = function Form(props) {
252
248
  /**
253
249
  * 传出校验方法
254
250
  */
255
- React__default.useEffect(function () {
251
+ React__default.useEffect(() => {
256
252
  getCheckForm && getCheckForm(checkFrom);
257
253
  getForcedRefresh && getForcedRefresh(refreshForm);
258
254
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -260,8 +256,8 @@ var Form = function Form(props) {
260
256
  /**
261
257
  * 更新值
262
258
  */
263
- React__default.useEffect(function () {
264
- if (backData) for (var key in backData) {
259
+ React__default.useEffect(() => {
260
+ if (backData) for (const key in backData) {
265
261
  refData.current.allValues[key] = backData[key];
266
262
  }
267
263
  setRefresh(Math.random());
@@ -269,19 +265,19 @@ var Form = function Form(props) {
269
265
  /**
270
266
  * 更新配置
271
267
  */
272
- React__default.useEffect(function () {
268
+ React__default.useEffect(() => {
273
269
  setItemsConfig(configList);
274
270
  }, [configList]);
275
271
  /**
276
272
  * 更新表单最新配置
277
273
  */
278
- React__default.useEffect(function () {
274
+ React__default.useEffect(() => {
279
275
  refData.current.configList = itemsConfig || [];
280
276
  }, [itemsConfig]);
281
277
  /**
282
278
  * 表单对象赋值
283
279
  */
284
- React__default.useEffect(function () {
280
+ React__default.useEffect(() => {
285
281
  if (form) {
286
282
  form.current = {
287
283
  get refreshForm() {
@@ -306,7 +302,7 @@ var Form = function Form(props) {
306
302
  return resetForm;
307
303
  },
308
304
  get clear() {
309
- return function (name) {
305
+ return name => {
310
306
  resetForm(true, name);
311
307
  };
312
308
  }
@@ -319,7 +315,7 @@ var Form = function Form(props) {
319
315
  children: jsx("div", Object.assign({
320
316
  className: "form-content ".concat(className)
321
317
  }, {
322
- children: itemsConfig && itemsConfig.length > 0 && itemsConfig.map(function (item, idx) {
318
+ children: itemsConfig && itemsConfig.length > 0 && itemsConfig.map((item, idx) => {
323
319
  // 不显示则提前保存最后值
324
320
  item.hide && setValue(item.name, 'item', item);
325
321
  return !item.hide && jsx(FormItem, Object.assign({
package/FormItem/index.js CHANGED
@@ -1,13 +1,10 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { F as default } from '../_verture/index-9331b116.js';
3
+ export { F as default } from '../_verture/index-e0f9064d.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
- import '../_verture/constant-0d9802f7.js';
7
- import '../_verture/slicedToArray-a8206399.js';
8
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
6
+ import '../_verture/constant-5317fc89.js';
9
7
  import '../TextField/index.js';
10
- import '../_verture/typeof-adeedc13.js';
11
8
  import '../_verture/tslib.es6-55ed4bd2.js';
12
9
  import '@paraview/lib';
13
10
  import '@para-ui/icons/PreviewClose';
@@ -22,21 +19,20 @@ import '../_verture/style-inject.es-300983ab.js';
22
19
  import '../Loading/index.js';
23
20
  import '@para-ui/icons/LoadingF';
24
21
  import '../HelperText/index.js';
25
- import '../_verture/useGlobalProps-1b846a65.js';
22
+ import '../_verture/useGlobalProps-1e416658.js';
26
23
  import '@para-ui/core/GlobalContext';
27
- import '../_verture/index-e9007d6a.js';
24
+ import '../_verture/index-da9097d3.js';
28
25
  import 'rc-dropdown';
29
- import '../_verture/usePopupContainer-87febeb9.js';
26
+ import '../_verture/usePopupContainer-635f66f4.js';
30
27
  import 'dayjs';
31
28
  import '../Help/index.js';
32
29
  import '@para-ui/icons/Help';
30
+ import '../_verture/slicedToArray-75fa4188.js';
33
31
  import '../RadioGroup/index.js';
34
32
  import '../Radio/index.js';
35
33
  import '../Select/index.js';
36
- import '../_verture/defineProperty-1d116156.js';
37
- import '../_verture/toConsumableArray-8f4c9589.js';
38
34
  import '../Empty/index.js';
39
- import '../_verture/useFormatMessage-703f8b20.js';
35
+ import '../_verture/useFormatMessage-eb13cf56.js';
40
36
  import '@para-ui/icons/Close';
41
37
  import '@para-ui/icons/Down';
42
38
  import '@para-ui/icons/Check';
@@ -54,15 +50,19 @@ import '../InputNumber/index.js';
54
50
  import 'rc-input-number';
55
51
  import '@para-ui/icons/Up';
56
52
  import '../ComboSelect/index.js';
57
- import '../_verture/index-232d890b.js';
58
- import '../_verture/typeof-c310ee4a.js';
59
53
  import '../Table/index.js';
54
+ import '../_verture/typeof-adeedc13.js';
60
55
  import '@para-ui/icons/ScreenF';
61
56
  import '@para-ui/icons/UpTriangleF';
62
57
  import '@para-ui/icons/DownTriangleF';
63
58
  import '@para-ui/icons/Panel';
59
+ import '../_verture/defineProperty-1d116156.js';
64
60
  import '../OperateBtn/index.js';
65
61
  import '@para-ui/icons/More';
62
+ import '../PopConfirm/index.js';
63
+ import '@para-ui/icons/CheckCircleF';
64
+ import '@para-ui/icons/WarningCircle';
65
+ import '@para-ui/icons/WarningCircleF';
66
66
  import '@para-ui/icons/Refresh';
67
67
  import '../Pagination/index.js';
68
68
  import '@para-ui/icons/Left';
@@ -70,12 +70,15 @@ 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-b1f80962.js';
73
+ import '../_verture/index-4fafd0a0.js';
74
+ import '../_verture/toConsumableArray-c7a8028f.js';
75
+ import '../_verture/index-d63bd287.js';
76
+ import '../_verture/typeof-b240b062.js';
74
77
  import 'rc-tree';
75
78
  import '@para-ui/icons/Document';
76
79
  import 'react-dom';
77
80
  import '@para-ui/icons/EditFile';
78
81
  import '@para-ui/icons/PlusCircle';
79
82
  import '@para-ui/icons/MoreCircle';
80
- import '../_verture/utils-418da0a4.js';
83
+ import '../_verture/utils-c17b5265.js';
81
84
  import '../Search/index.js';
@@ -1,16 +1,9 @@
1
- import { u as useModal } from '../_verture/modalContext-736ff215.js';
2
- export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-736ff215.js';
3
- import '../_verture/toConsumableArray-8f4c9589.js';
4
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
5
- import '../_verture/slicedToArray-a8206399.js';
6
- import '../_verture/index-232d890b.js';
7
- import '../_verture/typeof-c310ee4a.js';
1
+ import { u as useModal } from '../_verture/modalContext-8534f23d.js';
2
+ export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-8534f23d.js';
8
3
  import '../_verture/tslib.es6-55ed4bd2.js';
9
4
  import 'react/jsx-runtime';
10
5
  import 'react';
11
6
  import '../Modal/index.js';
12
- import '../_verture/defineProperty-1d116156.js';
13
- import '../_verture/typeof-adeedc13.js';
14
7
  import 'rc-dialog';
15
8
  import '../Button/index.js';
16
9
  import 'clsx';
@@ -18,20 +11,20 @@ import '@para-ui/icons/LoadingF';
18
11
  import '../Tooltip/index.js';
19
12
  import 'rc-tooltip';
20
13
  import 'rc-tooltip/lib/placements';
21
- import '../_verture/constant-0d9802f7.js';
14
+ import '../_verture/constant-5317fc89.js';
22
15
  import '@para-ui/icons/Forbid';
23
16
  import '../_verture/style-inject.es-300983ab.js';
24
17
  import '@para-ui/icons/Down';
25
- import '../_verture/index-e9007d6a.js';
18
+ import '../_verture/index-da9097d3.js';
26
19
  import 'rc-dropdown';
27
- import '../_verture/usePopupContainer-87febeb9.js';
20
+ import '../_verture/usePopupContainer-635f66f4.js';
28
21
  import 'dayjs';
29
22
  import '@paraview/lib';
30
- import '../_verture/useFormatMessage-703f8b20.js';
23
+ import '../_verture/useFormatMessage-eb13cf56.js';
31
24
  import '@para-ui/core/GlobalContext';
32
25
  import '../AutoTips/index.js';
33
26
  import '@para-ui/icons/Close';
34
- import '../_verture/index-05f7bf11.js';
27
+ import '../_verture/index-c568f272.js';
35
28
  import 'react-dom';
36
29
  import '@para-ui/icons/CheckCircleF';
37
30
  import '@para-ui/icons/WarningCircleF';
@@ -1,38 +1,35 @@
1
1
  import React__default from 'react';
2
- import { i as i18nIntl } from '../_verture/intl-5c1ec055.js';
2
+ import { i as i18nIntl } from '../_verture/intl-f2f27722.js';
3
3
  import { GetLanguage } from '@paraview/lib';
4
- import { d as defaultModalLocale } from '../_verture/index-05f7bf11.js';
5
- import '../_verture/typeof-adeedc13.js';
4
+ import { d as defaultModalLocale } from '../_verture/index-c568f272.js';
6
5
 
7
6
  //confirm 默认中文
8
- var confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
9
- var changeConfirmLocale = function changeConfirmLocale(newLocale) {
10
- var confirmLocale = newLocale['Confirm'];
7
+ let confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
8
+ const changeConfirmLocale = newLocale => {
9
+ const confirmLocale = newLocale['Confirm'];
11
10
  if (confirmLocale) {
12
11
  confirmRuntimeLocale = Object.assign(Object.assign({}, confirmRuntimeLocale), confirmLocale);
13
12
  } else {
14
13
  confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
15
14
  }
16
15
  };
17
- var getConfirmLocale = function getConfirmLocale() {
18
- var lang = GetLanguage();
16
+ const getConfirmLocale = () => {
17
+ const lang = GetLanguage();
19
18
  return (defaultModalLocale === null || defaultModalLocale === void 0 ? void 0 : defaultModalLocale[lang]) || defaultModalLocale['zh'];
20
19
  };
21
20
 
22
- var GlobalContext = /*#__PURE__*/React__default.createContext({
21
+ const GlobalContext = /*#__PURE__*/React__default.createContext({
23
22
  language: GetLanguage(),
24
23
  // 防止不包provider,有国际化组件报错
25
- intlFormat: function intlFormat(comName, defI18nData) {
26
- return function (ops, params) {
27
- var lang = GetLanguage();
28
- return i18nIntl({
29
- ops: ops,
30
- i18nData: {},
31
- lang: lang,
32
- params: params,
33
- defI18nData: defI18nData
34
- });
35
- };
24
+ intlFormat: (comName, defI18nData) => (ops, params) => {
25
+ const lang = GetLanguage();
26
+ return i18nIntl({
27
+ ops,
28
+ i18nData: {},
29
+ lang,
30
+ params,
31
+ defI18nData
32
+ });
36
33
  },
37
34
  // 每个组件的默认props
38
35
  componentsProps: {}
package/Help/index.js CHANGED
@@ -3,10 +3,8 @@ 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-0d9802f7.js';
6
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
7
7
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
8
- import '../_verture/slicedToArray-a8206399.js';
9
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
10
8
  import 'react';
11
9
  import 'rc-tooltip';
12
10
  import 'rc-tooltip/lib/placements';
@@ -16,15 +14,14 @@ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/12/2 下
16
14
  styleInject(css_248z);
17
15
 
18
16
  //help
19
- var Help = function Help(props) {
20
- var _props$title = props.title,
21
- title = _props$title === void 0 ? '' : _props$title,
22
- children = props.children,
23
- _props$arrow = props.arrow,
24
- arrow = _props$arrow === void 0 ? true : _props$arrow,
25
- className = props.className,
26
- _props$placement = props.placement,
27
- placement = _props$placement === void 0 ? 'top-start' : _props$placement,
17
+ const Help = props => {
18
+ const {
19
+ title = '',
20
+ children,
21
+ arrow = true,
22
+ className,
23
+ placement = 'top-start'
24
+ } = props,
28
25
  restProps = __rest(props, ["title", "children", "arrow", "className", "placement"]);
29
26
  return jsx(Tooltip, Object.assign({
30
27
  title: title,