@para-ui/core 3.0.28 → 3.0.30
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 +48 -88
- package/AutoTips/index.js +25 -32
- package/Breadcrumbs/index.js +43 -63
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +88 -118
- package/ButtonGroup/index.js +27 -36
- package/Carousel/index.d.ts +2 -2
- package/Carousel/index.js +27 -28
- package/Cascader/index.js +52 -64
- package/Checkbox/index.js +23 -39
- package/CheckboxGroup/index.js +31 -48
- package/Collapse/collapsePanel.d.ts +1 -1
- package/Collapse/index.d.ts +1 -1
- package/Collapse/index.js +9 -29
- package/Collapse/util.d.ts +2 -2
- package/CollapseBox/index.js +45 -56
- package/CollapseLayout/index.js +35 -54
- package/ComboSelect/index.js +222 -349
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.js +17 -20
- package/DatePicker/generatePicker/index.d.ts +17 -17
- package/DatePicker/index.d.ts +4 -4
- package/DatePicker/index.js +111 -167
- package/Desktop/index.js +62 -173
- package/Drawer/index.js +65 -58
- package/Drawer/interface.d.ts +7 -3
- package/Dropdown/index.d.ts +1 -1
- package/Dropdown/index.js +3 -3
- package/Empty/index.js +17 -22
- package/Form/index.d.ts +1 -1
- package/Form/index.js +38 -80
- package/FormItem/index.d.ts +1 -1
- package/FormItem/index.js +11 -11
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/index.js +11 -11
- package/GlobalContext/index.js +3 -3
- package/GlobalContext/usePopupContainer.d.ts +1 -1
- package/Help/index.js +11 -11
- package/HelperText/index.js +11 -12
- package/InputLang/index.js +47 -80
- package/InputNumber/index.js +65 -100
- package/Label/index.js +15 -16
- package/Loading/index.js +6 -7
- package/Menu/index.js +148 -328
- package/Menu/interface.d.ts +2 -2
- package/Menu/verticalMenuList.d.ts +1 -1
- package/Message/index.d.ts +1 -1
- package/Message/index.js +45 -64
- package/Modal/Confirm/index.d.ts +2 -2
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +119 -152
- package/MultiBox/index.js +44 -76
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +51 -72
- package/OperateBtn/index.js +42 -70
- package/PageHeader/index.js +120 -286
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +2 -2
- package/Pagination/index.js +79 -131
- package/ParauiProvider/index.js +2 -3
- package/PasswordRules/index.js +12 -30
- package/PopConfirm/index.d.ts +1 -1
- package/PopConfirm/index.js +52 -59
- package/Popover/index.js +8 -9
- package/Progress/index.d.ts +6 -6
- package/Progress/index.js +50 -89
- package/Querying/index.js +14 -17
- package/README.md +813 -800
- package/Radio/index.js +21 -33
- package/RadioGroup/index.js +32 -47
- package/Search/index.js +44 -66
- package/Select/index.js +176 -343
- package/SelectInput/index.js +8 -9
- package/Selector/index.js +285 -681
- package/SelectorPicker/index.js +62 -97
- package/SingleBox/index.js +30 -55
- package/Slider/index.d.ts +1 -1
- package/Slider/index.js +29 -41
- package/Slider/interface.d.ts +2 -2
- package/Split/index.js +10 -23
- package/Status/index.js +8 -7
- package/Stepper/index.d.ts +1 -1
- package/Stepper/index.js +20 -25
- package/Styles/form.scss +5 -5
- package/Styles/index.scss +37 -37
- package/Styles/normalize.scss +348 -348
- package/Styles/scrollbar.scss +223 -223
- package/Styles/theme.scss +74 -74
- package/Switch/index.d.ts +2 -2
- package/Switch/index.js +19 -20
- package/Table/index.js +568 -1019
- package/Table/interface.d.ts +5 -5
- package/Tabs/index.d.ts +3 -3
- package/Tabs/index.js +47 -65
- package/Tag/TagGroup.d.ts +1 -1
- package/Tag/index.d.ts +2 -2
- package/Tag/index.js +72 -107
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +81 -105
- package/TextField/index.js +141 -220
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +12 -15
- package/Timeline/index.js +42 -52
- package/Title/index.js +10 -9
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.js +50 -70
- package/Tooltip/index.js +64 -98
- package/Tooltip/interface.d.ts +1 -1
- package/Transfer/index.d.ts +1 -1
- package/Transfer/index.js +114 -137
- package/Transfer/useClick.d.ts +1 -1
- package/Tree/index.js +10 -10
- package/Tree/interface.d.ts +6 -6
- package/Upload/Dragger/index.d.ts +1 -1
- package/Upload/ImageUpload/index.d.ts +1 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/index.d.ts +1 -1
- package/Upload/index.js +283 -475
- package/Upload/interface.d.ts +2 -2
- package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
- package/_verture/defineProperty-62acccfc.js +34 -0
- package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
- package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
- package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
- package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
- package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
- package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
- package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
- package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
- package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
- package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
- package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
- package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
- package/index.d.ts +2 -4
- package/index.js +15 -16
- package/package.json +167 -168
- package/Test/index.d.ts +0 -3
- package/Test/index.js +0 -9
- package/_verture/defineProperty-0590dc61.js +0 -16
package/Form/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-87c7d895.js';
|
|
2
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.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-131f8fe5.js';
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import '../TextField/index.js';
|
|
9
9
|
import '../_verture/typeof-498dd2b1.js';
|
|
10
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -23,18 +23,18 @@ import '../AutoTips/index.js';
|
|
|
23
23
|
import '../Loading/index.js';
|
|
24
24
|
import '@para-ui/icons/LoadingF';
|
|
25
25
|
import '../HelperText/index.js';
|
|
26
|
-
import '../_verture/useGlobalProps-
|
|
26
|
+
import '../_verture/useGlobalProps-1b846a65.js';
|
|
27
27
|
import '@para-ui/core/GlobalContext';
|
|
28
|
-
import '../_verture/index-
|
|
28
|
+
import '../_verture/index-be4faaee.js';
|
|
29
29
|
import 'rc-dropdown';
|
|
30
|
-
import '../_verture/usePopupContainer-
|
|
30
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
31
31
|
import 'dayjs';
|
|
32
32
|
import '../RadioGroup/index.js';
|
|
33
33
|
import '../Radio/index.js';
|
|
34
34
|
import '../Select/index.js';
|
|
35
|
-
import '../_verture/defineProperty-
|
|
35
|
+
import '../_verture/defineProperty-62acccfc.js';
|
|
36
36
|
import '../Empty/index.js';
|
|
37
|
-
import '../_verture/useFormatMessage-
|
|
37
|
+
import '../_verture/useFormatMessage-703f8b20.js';
|
|
38
38
|
import '@para-ui/icons/Close';
|
|
39
39
|
import '@para-ui/icons/Down';
|
|
40
40
|
import '@para-ui/icons/Check';
|
|
@@ -55,7 +55,7 @@ import '@para-ui/icons/Minus';
|
|
|
55
55
|
import '@para-ui/icons/Plus';
|
|
56
56
|
import '../ComboSelect/index.js';
|
|
57
57
|
import '../Table/index.js';
|
|
58
|
-
import '../_verture/index-
|
|
58
|
+
import '../_verture/index-06fea29b.js';
|
|
59
59
|
import '@para-ui/icons/ScreenF';
|
|
60
60
|
import '@para-ui/icons/UpTriangleF';
|
|
61
61
|
import '@para-ui/icons/DownTriangleF';
|
|
@@ -68,7 +68,7 @@ import '@para-ui/icons/Left';
|
|
|
68
68
|
import 'rc-pagination';
|
|
69
69
|
import '@para-ui/icons/Right';
|
|
70
70
|
import '@para-ui/icons/DoubleRight';
|
|
71
|
-
import '../_verture/index-
|
|
71
|
+
import '../_verture/index-92144ad3.js';
|
|
72
72
|
import 'rc-tree';
|
|
73
73
|
import '@para-ui/icons/Document';
|
|
74
74
|
import 'react-dom';
|
|
@@ -86,50 +86,44 @@ import '@para-ui/icons/MoreCircle';
|
|
|
86
86
|
* @param {string} type 表单形态 竖布局 或 横布局,默认横
|
|
87
87
|
* @description 用于根据配置自动生成表单
|
|
88
88
|
*/
|
|
89
|
-
|
|
90
89
|
var Form = function Form(props) {
|
|
91
90
|
var _props$className = props.className,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
91
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
92
|
+
FormProps = props.FormProps,
|
|
93
|
+
requiredElement = props.requiredElement,
|
|
94
|
+
disRequiredElement = props.disRequiredElement,
|
|
95
|
+
configList = props.configList,
|
|
96
|
+
type = props.type,
|
|
97
|
+
getCheckForm = props.getCheckForm,
|
|
98
|
+
backData = props.backData,
|
|
99
|
+
disabled = props.disabled,
|
|
100
|
+
onChange = props.onChange,
|
|
101
|
+
getForcedRefresh = props.getForcedRefresh,
|
|
102
|
+
labelProps = props.labelProps,
|
|
103
|
+
helperTextProps = props.helperTextProps,
|
|
104
|
+
form = props.form,
|
|
105
|
+
_props$labelWidth = props.labelWidth,
|
|
106
|
+
labelWidth = _props$labelWidth === void 0 ? 60 : _props$labelWidth,
|
|
107
|
+
disOnlySpace = props.disOnlySpace;
|
|
109
108
|
var frstBackData = React__default.useRef(backData && DeepClone(backData) || {});
|
|
110
109
|
var firstConfigList = React__default.useRef(configList);
|
|
111
110
|
/**
|
|
112
111
|
* item配置项目
|
|
113
112
|
*/
|
|
114
|
-
|
|
115
113
|
var _React$useState = React__default.useState(configList),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
115
|
+
itemsConfig = _React$useState2[0],
|
|
116
|
+
setItemsConfig = _React$useState2[1];
|
|
119
117
|
/**
|
|
120
118
|
* 更新表单项
|
|
121
119
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
120
|
var _React$useState3 = React__default.useState(Math.random()),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
122
|
+
refresh = _React$useState4[0],
|
|
123
|
+
setRefresh = _React$useState4[1];
|
|
128
124
|
/**
|
|
129
125
|
* 用于存储所有常用数据
|
|
130
126
|
*/
|
|
131
|
-
|
|
132
|
-
|
|
133
127
|
var refData = React__default.useRef({
|
|
134
128
|
allItems: {},
|
|
135
129
|
itemsCheckStatus: {},
|
|
@@ -142,7 +136,6 @@ var Form = function Form(props) {
|
|
|
142
136
|
* @param {Array<FormItemProps>} list 表单项配置
|
|
143
137
|
* @param { [name: string]: any } bData 回填数据
|
|
144
138
|
*/
|
|
145
|
-
|
|
146
139
|
var refreshForm = function refreshForm(list, bData) {
|
|
147
140
|
if (bData) for (var key in bData) {
|
|
148
141
|
refData.current.allValues[key] = bData[key];
|
|
@@ -155,8 +148,6 @@ var Form = function Form(props) {
|
|
|
155
148
|
* @param {string} type 需要设置值的类型 value | item | status | initValue | message
|
|
156
149
|
* @param {any} value 需要设置的值
|
|
157
150
|
*/
|
|
158
|
-
|
|
159
|
-
|
|
160
151
|
var setValue = function setValue(name, type, value) {
|
|
161
152
|
switch (type) {
|
|
162
153
|
// 设置校验状态,自定义类型的表格设置,如果有一个是false,最终校验都不会通过
|
|
@@ -164,22 +155,18 @@ var Form = function Form(props) {
|
|
|
164
155
|
refData.current.itemsCheckStatus[name] = value;
|
|
165
156
|
break;
|
|
166
157
|
// 存储报错信息,防止表单刷新后,报错信息和状态丢失
|
|
167
|
-
|
|
168
158
|
case 'message':
|
|
169
159
|
refData.current.itemsCheckMessage[name] = value;
|
|
170
160
|
break;
|
|
171
161
|
// 存储加工之后的item 对象
|
|
172
|
-
|
|
173
162
|
case 'item':
|
|
174
163
|
refData.current.allItems[name] = value;
|
|
175
164
|
break;
|
|
176
165
|
// 初始化赋值
|
|
177
|
-
|
|
178
166
|
case 'initValue':
|
|
179
167
|
refData.current.allValues[name] = value;
|
|
180
168
|
break;
|
|
181
169
|
// 赋值,会触发表单的onChange事件
|
|
182
|
-
|
|
183
170
|
default:
|
|
184
171
|
refData.current.allValues[name] = value;
|
|
185
172
|
onChange && onChange(name, value);
|
|
@@ -190,60 +177,45 @@ var Form = function Form(props) {
|
|
|
190
177
|
* 校验表单校验状态
|
|
191
178
|
* @return {boolean | { [name: string]: any }} 返回 校验错误false,如果校验通过则返回表单所有值
|
|
192
179
|
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
180
|
var checkFrom = function checkFrom() {
|
|
196
181
|
var errorCount = 0;
|
|
197
|
-
|
|
198
182
|
for (var i = 0; i < refData.current.configList.length; i++) {
|
|
199
183
|
var key = refData.current.configList[i].name;
|
|
200
|
-
var tItem = refData.current.allItems[key];
|
|
201
|
-
|
|
184
|
+
var tItem = refData.current.allItems[key];
|
|
185
|
+
// 判断是否已经校验过了 或是 不需要校验,直接跳过
|
|
202
186
|
if (tItem.disabled || tItem.hide || refData.current.itemsCheckStatus[key] === true) continue;
|
|
203
|
-
|
|
204
187
|
if (refData.current.itemsCheckStatus[key] === false) {
|
|
205
188
|
errorCount++;
|
|
206
189
|
continue;
|
|
207
190
|
}
|
|
208
|
-
|
|
209
191
|
var msg = validate(tItem, refData.current.allValues[key]);
|
|
210
|
-
|
|
211
192
|
if (msg) {
|
|
212
193
|
errorCount++;
|
|
213
194
|
if (typeof msg === 'string') refData.current.itemsCheckMessage[key] = msg;
|
|
214
195
|
tItem.setErrorMsg && tItem.setErrorMsg(msg);
|
|
215
196
|
}
|
|
216
197
|
}
|
|
217
|
-
|
|
218
198
|
return !errorCount && refData.current.allValues;
|
|
219
199
|
};
|
|
220
200
|
/**
|
|
221
201
|
* 过滤有效值
|
|
222
202
|
*/
|
|
223
|
-
|
|
224
|
-
|
|
225
203
|
var getValidValues = function getValidValues() {
|
|
226
204
|
var tObj = {};
|
|
227
|
-
|
|
228
205
|
for (var i = 0; i < refData.current.configList.length; i++) {
|
|
229
206
|
var item = refData.current.configList[i];
|
|
230
|
-
|
|
231
207
|
if (!item.hide && refData.current.allValues[item.name]) {
|
|
232
208
|
tObj[item.name] = refData.current.allValues[item.name];
|
|
233
209
|
}
|
|
234
210
|
}
|
|
235
|
-
|
|
236
211
|
return tObj;
|
|
237
212
|
};
|
|
238
213
|
/**
|
|
239
214
|
* 重置表单
|
|
240
215
|
*/
|
|
241
|
-
|
|
242
|
-
|
|
243
216
|
var resetForm = function resetForm() {
|
|
244
217
|
var isClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
245
218
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
246
|
-
|
|
247
219
|
if (!isClear || !name) {
|
|
248
220
|
refData.current = {
|
|
249
221
|
allItems: {},
|
|
@@ -268,23 +240,20 @@ var Form = function Form(props) {
|
|
|
268
240
|
});
|
|
269
241
|
}
|
|
270
242
|
}
|
|
271
|
-
|
|
272
243
|
setItemsConfig(firstConfigList.current);
|
|
273
244
|
setRefresh(Math.random());
|
|
274
245
|
};
|
|
275
246
|
/**
|
|
276
247
|
* 传出校验方法
|
|
277
248
|
*/
|
|
278
|
-
|
|
279
|
-
|
|
280
249
|
React__default.useEffect(function () {
|
|
281
250
|
getCheckForm && getCheckForm(checkFrom);
|
|
282
|
-
getForcedRefresh && getForcedRefresh(refreshForm);
|
|
251
|
+
getForcedRefresh && getForcedRefresh(refreshForm);
|
|
252
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
283
253
|
}, [getCheckForm, getForcedRefresh]);
|
|
284
254
|
/**
|
|
285
255
|
* 更新值
|
|
286
256
|
*/
|
|
287
|
-
|
|
288
257
|
React__default.useEffect(function () {
|
|
289
258
|
if (backData) for (var key in backData) {
|
|
290
259
|
refData.current.allValues[key] = backData[key];
|
|
@@ -294,58 +263,47 @@ var Form = function Form(props) {
|
|
|
294
263
|
/**
|
|
295
264
|
* 更新配置
|
|
296
265
|
*/
|
|
297
|
-
|
|
298
266
|
React__default.useEffect(function () {
|
|
299
267
|
setItemsConfig(configList);
|
|
300
268
|
}, [configList]);
|
|
301
269
|
/**
|
|
302
270
|
* 更新表单最新配置
|
|
303
271
|
*/
|
|
304
|
-
|
|
305
272
|
React__default.useEffect(function () {
|
|
306
273
|
refData.current.configList = itemsConfig || [];
|
|
307
274
|
}, [itemsConfig]);
|
|
308
275
|
/**
|
|
309
276
|
* 表单对象赋值
|
|
310
277
|
*/
|
|
311
|
-
|
|
312
278
|
React__default.useEffect(function () {
|
|
313
279
|
if (form) {
|
|
314
280
|
form.current = {
|
|
315
281
|
get refreshForm() {
|
|
316
282
|
return refreshForm;
|
|
317
283
|
},
|
|
318
|
-
|
|
319
284
|
get check() {
|
|
320
285
|
return checkFrom;
|
|
321
286
|
},
|
|
322
|
-
|
|
323
287
|
get items() {
|
|
324
288
|
return refData.current.allItems;
|
|
325
289
|
},
|
|
326
|
-
|
|
327
290
|
get values() {
|
|
328
291
|
return refData.current.allValues;
|
|
329
292
|
},
|
|
330
|
-
|
|
331
293
|
get refData() {
|
|
332
294
|
return refData.current;
|
|
333
295
|
},
|
|
334
|
-
|
|
335
296
|
get getValidValues() {
|
|
336
297
|
return getValidValues;
|
|
337
298
|
},
|
|
338
|
-
|
|
339
299
|
get reset() {
|
|
340
300
|
return resetForm;
|
|
341
301
|
},
|
|
342
|
-
|
|
343
302
|
get clear() {
|
|
344
303
|
return function (name) {
|
|
345
304
|
resetForm(true, name);
|
|
346
305
|
};
|
|
347
306
|
}
|
|
348
|
-
|
|
349
307
|
};
|
|
350
308
|
}
|
|
351
309
|
}, [form]);
|
package/FormItem/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { validateFunctionType } from './validateFunction';
|
|
|
4
4
|
import { LabelProps } from '../Label';
|
|
5
5
|
import { HelperTextProps } from '../HelperText';
|
|
6
6
|
import './index.scss';
|
|
7
|
-
export
|
|
7
|
+
export type formInputType = 'checkGroup' | 'select' | 'radioGroup' | 'textarea' | 'default' | 'switch' | 'number' | 'file' | 'comboSelect' | ReactNode | string | FC<ItemTypeProps>;
|
|
8
8
|
/**
|
|
9
9
|
* 表单操作项的其他配置
|
|
10
10
|
*/
|
package/FormItem/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-131f8fe5.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
|
-
import '../_verture/constant-
|
|
7
|
-
import '../_verture/slicedToArray-
|
|
6
|
+
import '../_verture/constant-66aa48a1.js';
|
|
7
|
+
import '../_verture/slicedToArray-77980792.js';
|
|
8
8
|
import '../TextField/index.js';
|
|
9
9
|
import '../_verture/typeof-498dd2b1.js';
|
|
10
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -20,21 +20,21 @@ import '../_verture/style-inject.es-300983ab.js';
|
|
|
20
20
|
import '../Loading/index.js';
|
|
21
21
|
import '@para-ui/icons/LoadingF';
|
|
22
22
|
import '../HelperText/index.js';
|
|
23
|
-
import '../_verture/useGlobalProps-
|
|
23
|
+
import '../_verture/useGlobalProps-1b846a65.js';
|
|
24
24
|
import '@para-ui/core/GlobalContext';
|
|
25
|
-
import '../_verture/index-
|
|
25
|
+
import '../_verture/index-be4faaee.js';
|
|
26
26
|
import 'rc-dropdown';
|
|
27
|
-
import '../_verture/usePopupContainer-
|
|
27
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
28
28
|
import 'dayjs';
|
|
29
29
|
import '../Help/index.js';
|
|
30
30
|
import '@para-ui/icons/Help';
|
|
31
31
|
import '../RadioGroup/index.js';
|
|
32
32
|
import '../Radio/index.js';
|
|
33
33
|
import '../Select/index.js';
|
|
34
|
-
import '../_verture/defineProperty-
|
|
35
|
-
import '../_verture/toConsumableArray-
|
|
34
|
+
import '../_verture/defineProperty-62acccfc.js';
|
|
35
|
+
import '../_verture/toConsumableArray-87c7d895.js';
|
|
36
36
|
import '../Empty/index.js';
|
|
37
|
-
import '../_verture/useFormatMessage-
|
|
37
|
+
import '../_verture/useFormatMessage-703f8b20.js';
|
|
38
38
|
import '@para-ui/icons/Close';
|
|
39
39
|
import '@para-ui/icons/Down';
|
|
40
40
|
import '@para-ui/icons/Check';
|
|
@@ -55,7 +55,7 @@ import '@para-ui/icons/Minus';
|
|
|
55
55
|
import '@para-ui/icons/Plus';
|
|
56
56
|
import '../ComboSelect/index.js';
|
|
57
57
|
import '../Table/index.js';
|
|
58
|
-
import '../_verture/index-
|
|
58
|
+
import '../_verture/index-06fea29b.js';
|
|
59
59
|
import '@para-ui/icons/ScreenF';
|
|
60
60
|
import '@para-ui/icons/UpTriangleF';
|
|
61
61
|
import '@para-ui/icons/DownTriangleF';
|
|
@@ -68,7 +68,7 @@ import '@para-ui/icons/Left';
|
|
|
68
68
|
import 'rc-pagination';
|
|
69
69
|
import '@para-ui/icons/Right';
|
|
70
70
|
import '@para-ui/icons/DoubleRight';
|
|
71
|
-
import '../_verture/index-
|
|
71
|
+
import '../_verture/index-92144ad3.js';
|
|
72
72
|
import 'rc-tree';
|
|
73
73
|
import '@para-ui/icons/Document';
|
|
74
74
|
import 'react-dom';
|
|
@@ -6,7 +6,7 @@ import { FormItemProps } from './index';
|
|
|
6
6
|
* @param {any} val 校验项的值
|
|
7
7
|
* @return {boolean | string} 返回校验结果或报错信息
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type validateFunctionType = (item: FormItemProps, val: any) => boolean | string;
|
|
10
10
|
/**
|
|
11
11
|
* 表单rules校验方法
|
|
12
12
|
* @type {validateFunctionType}
|
package/FunctionModal/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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-
|
|
4
|
-
import '../_verture/slicedToArray-
|
|
5
|
-
import '../_verture/index-
|
|
1
|
+
import { u as useModal } from '../_verture/modalContext-c749e1c6.js';
|
|
2
|
+
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-c749e1c6.js';
|
|
3
|
+
import '../_verture/toConsumableArray-87c7d895.js';
|
|
4
|
+
import '../_verture/slicedToArray-77980792.js';
|
|
5
|
+
import '../_verture/index-06fea29b.js';
|
|
6
6
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react';
|
|
9
9
|
import '../Modal/index.js';
|
|
10
|
-
import '../_verture/defineProperty-
|
|
10
|
+
import '../_verture/defineProperty-62acccfc.js';
|
|
11
|
+
import '../_verture/typeof-498dd2b1.js';
|
|
11
12
|
import 'rc-dialog';
|
|
12
13
|
import '../Button/index.js';
|
|
13
|
-
import '../_verture/typeof-498dd2b1.js';
|
|
14
14
|
import 'clsx';
|
|
15
15
|
import '@para-ui/icons/LoadingF';
|
|
16
16
|
import '@para-ui/icons/Forbid';
|
|
17
17
|
import '../Tooltip/index.js';
|
|
18
18
|
import 'rc-tooltip';
|
|
19
19
|
import 'rc-tooltip/lib/placements';
|
|
20
|
-
import '../_verture/constant-
|
|
20
|
+
import '../_verture/constant-66aa48a1.js';
|
|
21
21
|
import '../_verture/style-inject.es-300983ab.js';
|
|
22
22
|
import '@para-ui/icons/Down';
|
|
23
|
-
import '../_verture/index-
|
|
23
|
+
import '../_verture/index-be4faaee.js';
|
|
24
24
|
import 'rc-dropdown';
|
|
25
|
-
import '../_verture/usePopupContainer-
|
|
25
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
26
26
|
import 'dayjs';
|
|
27
27
|
import '@paraview/lib';
|
|
28
|
-
import '../_verture/useFormatMessage-
|
|
28
|
+
import '../_verture/useFormatMessage-703f8b20.js';
|
|
29
29
|
import '@para-ui/core/GlobalContext';
|
|
30
30
|
import '@para-ui/icons/Close';
|
|
31
31
|
import '../_verture/index-e2881a53.js';
|
package/GlobalContext/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { i as i18nIntl } from '../_verture/intl-
|
|
2
|
+
import { i as i18nIntl } from '../_verture/intl-5cbb940c.js';
|
|
3
3
|
import { GetLanguage } from '@paraview/lib';
|
|
4
4
|
import { d as defaultModalLocale } from '../_verture/index-e2881a53.js';
|
|
5
5
|
import '../_verture/typeof-498dd2b1.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
//confirm 默认中文
|
|
8
9
|
var confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
|
|
9
10
|
var changeConfirmLocale = function changeConfirmLocale(newLocale) {
|
|
10
11
|
var confirmLocale = newLocale['Confirm'];
|
|
11
|
-
|
|
12
12
|
if (confirmLocale) {
|
|
13
13
|
confirmRuntimeLocale = Object.assign(Object.assign({}, confirmRuntimeLocale), confirmLocale);
|
|
14
14
|
} else {
|
|
@@ -36,6 +36,6 @@ var GlobalContext = /*#__PURE__*/React__default.createContext({
|
|
|
36
36
|
},
|
|
37
37
|
// 每个组件的默认props
|
|
38
38
|
componentsProps: {}
|
|
39
|
-
});
|
|
39
|
+
});
|
|
40
40
|
|
|
41
41
|
export { changeConfirmLocale, GlobalContext as default, getConfirmLocale };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type PopupContainer = (triggerNode: HTMLElement) => HTMLElement;
|
|
2
2
|
export declare function getNearestOverflowAncestor(node: Node): HTMLElement;
|
|
3
3
|
export default function usePopupContainer(wrapRef: any, customizeContainer?: PopupContainer): (triggerNode: HTMLElement) => HTMLElement;
|
|
4
4
|
export {};
|
package/Help/index.js
CHANGED
|
@@ -3,9 +3,9 @@ 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-66aa48a1.js';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
|
-
import '../_verture/slicedToArray-
|
|
8
|
+
import '../_verture/slicedToArray-77980792.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'rc-tooltip';
|
|
11
11
|
import 'rc-tooltip/lib/placements';
|
|
@@ -13,17 +13,17 @@ import 'rc-tooltip/lib/placements';
|
|
|
13
13
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/12/2 下午8:14\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-help {\n display: inline-block;\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-help:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-help svg {\n font-size: inherit;\n color: inherit;\n}";
|
|
14
14
|
styleInject(css_248z);
|
|
15
15
|
|
|
16
|
+
//help
|
|
16
17
|
var Help = function Help(props) {
|
|
17
18
|
var _props$title = props.title,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
title = _props$title === void 0 ? '' : _props$title,
|
|
20
|
+
children = props.children,
|
|
21
|
+
_props$arrow = props.arrow,
|
|
22
|
+
arrow = _props$arrow === void 0 ? true : _props$arrow,
|
|
23
|
+
className = props.className,
|
|
24
|
+
_props$placement = props.placement,
|
|
25
|
+
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
26
|
+
restProps = __rest(props, ["title", "children", "arrow", "className", "placement"]);
|
|
27
27
|
return jsx(Tooltip, Object.assign({
|
|
28
28
|
title: title,
|
|
29
29
|
arrow: arrow,
|
package/HelperText/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
2
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
3
3
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
4
4
|
|
|
5
5
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 表单错误提示\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-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 padding-left: 12px;\n line-height: 20px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-helper-text.paraui-v3-helper-text-error {\n color: rgb(235, 96, 84);\n}";
|
|
@@ -7,23 +7,22 @@ styleInject(css_248z);
|
|
|
7
7
|
|
|
8
8
|
var HelperText = function HelperText(props) {
|
|
9
9
|
var className = props.className,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (hideErrorDom === null) return null;
|
|
17
|
-
|
|
18
|
-
if (!error && hideErrorDom) return null;
|
|
19
|
-
|
|
10
|
+
style = props.style,
|
|
11
|
+
_props$error = props.error,
|
|
12
|
+
error = _props$error === void 0 ? false : _props$error,
|
|
13
|
+
_props$hideErrorDom = props.hideErrorDom,
|
|
14
|
+
hideErrorDom = _props$hideErrorDom === void 0 ? false : _props$hideErrorDom,
|
|
15
|
+
helperText = props.helperText;
|
|
16
|
+
if (hideErrorDom === null) return null;
|
|
17
|
+
// 不存在错误,且没有错误隐藏错误dom
|
|
18
|
+
if (!error && hideErrorDom) return null;
|
|
19
|
+
// 处理class
|
|
20
20
|
var handClass = function handClass() {
|
|
21
21
|
var str = "".concat($prefixCls, "-helper-text");
|
|
22
22
|
if (className) str += ' ' + className;
|
|
23
23
|
if (error) str += " ".concat($prefixCls, "-helper-text-error");
|
|
24
24
|
return str;
|
|
25
25
|
};
|
|
26
|
-
|
|
27
26
|
return jsx("p", Object.assign({
|
|
28
27
|
className: handClass(),
|
|
29
28
|
style: style
|