@para-ui/core 4.0.40 → 4.0.42

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/Stepper/index.js CHANGED
@@ -15,7 +15,7 @@ import Check from '@para-ui/icons/Check';
15
15
  import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-5317fc89.js';
16
16
  import clsx from 'clsx';
17
17
  import AutoTips from '../AutoTips/index.js';
18
- import CloseIcon from '@para-ui/icons/Close';
18
+ import Close from '@para-ui/icons/Close';
19
19
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
20
20
  import '../Tooltip/index.js';
21
21
  import 'rc-tooltip';
@@ -98,13 +98,13 @@ const Stepper = props => {
98
98
  const isErr = index === errorStep;
99
99
  if (typeof item === 'string') {
100
100
  label = item;
101
- icon = isErr ? jsx(CloseIcon, {
101
+ icon = isErr ? jsx(Close, {
102
102
  size: "medium"
103
103
  }) : Icons[index + 1];
104
104
  } else if (typeof item === 'object') {
105
105
  label = item.label;
106
106
  description = item.description;
107
- icon = isErr ? jsx(CloseIcon, {
107
+ icon = isErr ? jsx(Close, {
108
108
  size: "medium"
109
109
  }) : item.icon || Icons[index + 1];
110
110
  }
package/Tabs/index.js CHANGED
@@ -4,7 +4,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import RcTabs, { TabPane } from 'rc-tabs';
5
5
  import More from '@para-ui/icons/More';
6
6
  import Plus from '@para-ui/icons/Plus';
7
- import CloseIcon from '@para-ui/icons/Close';
7
+ import Close from '@para-ui/icons/Close';
8
8
  import { PopConfirm } from '../PopConfirm/index.js';
9
9
  import { Radio } from '../Radio/index.js';
10
10
  import Help from '../Help/index.js';
@@ -122,7 +122,7 @@ const Tabs = props => {
122
122
  onEdit === null || onEdit === void 0 ? void 0 : onEdit(currItem, tKey, editType);
123
123
  }
124
124
  },
125
- removeIcon: jsx(CloseIcon, {}),
125
+ removeIcon: jsx(Close, {}),
126
126
  addIcon: addIcon || jsx(Plus, {}),
127
127
  showAdd: hideAdd !== true && showAdd !== false
128
128
  };
@@ -143,7 +143,7 @@ const Tabs = props => {
143
143
  } = item;
144
144
  if (closable === false) return null;
145
145
  if (!showPopConfirm) {
146
- return closeIcon || jsx(CloseIcon, {});
146
+ return closeIcon || jsx(Close, {});
147
147
  }
148
148
  return jsx("span", Object.assign({
149
149
  onClick: ev => ev.stopPropagation()
@@ -156,7 +156,7 @@ const Tabs = props => {
156
156
  }, popConfirmProps, {
157
157
  onOk: () => onEdit === null || onEdit === void 0 ? void 0 : onEdit(item, item.value, 'remove')
158
158
  }, {
159
- children: closeIcon || jsx(CloseIcon, {})
159
+ children: closeIcon || jsx(Close, {})
160
160
  }))
161
161
  }));
162
162
  };
package/Tag/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as __rest } from '../_verture/tslib.es6-f43aa41d.js';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { useState, useRef, useEffect } from 'react';
4
- import CloseIcon from '@para-ui/icons/Close';
4
+ import Close from '@para-ui/icons/Close';
5
5
  import EditOutline from '@para-ui/icons/EditOutline';
6
6
  import clsx from 'clsx';
7
7
  import { _ as _toConsumableArray } from '../_verture/toConsumableArray-c7a8028f.js';
@@ -319,7 +319,7 @@ const InternalTag = props => {
319
319
  onMouseLeave: handleCloseLeave
320
320
  }, {
321
321
  children: closeIcon
322
- })) : jsx(CloseIcon, {
322
+ })) : jsx(Close, {
323
323
  className: 'tag-close-icon',
324
324
  style: closeIconStyle,
325
325
  onClick: handleCloseClick,
package/Upload/index.js CHANGED
@@ -10,7 +10,7 @@ import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
10
10
  import { _ as _slicedToArray } from '../_verture/slicedToArray-75fa4188.js';
11
11
  import { r as regenerator } from '../_verture/index-94e24006.js';
12
12
  import EditOutline from '@para-ui/icons/EditOutline';
13
- import CloseIcon from '@para-ui/icons/Close';
13
+ import Close from '@para-ui/icons/Close';
14
14
  import Delete from '@para-ui/icons/Delete';
15
15
  import FileOutlined from '@para-ui/icons/Document';
16
16
  import PhotoIcon from '@para-ui/icons/Photo';
@@ -1107,7 +1107,7 @@ var ImageUpload = function ImageUpload(props) {
1107
1107
  size: "small",
1108
1108
  onClick: handleReset
1109
1109
  }, {
1110
- children: jsx(CloseIcon, {})
1110
+ children: jsx(Close, {})
1111
1111
  })), renderUploadSelector()]
1112
1112
  })) : renderUploadSelector() : jsx(Fragment, {})]
1113
1113
  }));
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { TextField } from '../TextField/index.js';
4
3
  import { _ as _slicedToArray } from './slicedToArray-75fa4188.js';
4
+ import { TextField } from '../TextField/index.js';
5
5
  import { RadioGroup } from '../RadioGroup/index.js';
6
6
  import Select from '../Select/index.js';
7
7
  import { CheckboxGroup } from '../CheckboxGroup/index.js';
@@ -407,52 +407,53 @@ var DefaultCompoments = function DefaultCompoments(props) {
407
407
  /**
408
408
  * form 表单操作项 类型
409
409
  */
410
- const ItemType = props => {
411
- const {
412
- itemType,
413
- error,
414
- placeholder,
415
- label,
416
- inputProps,
417
- name,
418
- rules,
419
- setValue,
420
- setError,
421
- backData,
422
- disabled,
423
- change,
424
- isComponent
425
- } = props;
426
- const intl = useFormatMessage('FormItem', localeJson);
427
- const tipsStr = placeholder || "".concat(label);
410
+ var ItemType = function ItemType(props) {
411
+ var itemType = props.itemType,
412
+ error = props.error,
413
+ placeholder = props.placeholder,
414
+ label = props.label,
415
+ inputProps = props.inputProps,
416
+ name = props.name,
417
+ rules = props.rules,
418
+ setValue = props.setValue,
419
+ setError = props.setError,
420
+ backData = props.backData,
421
+ disabled = props.disabled,
422
+ change = props.change,
423
+ isComponent = props.isComponent;
424
+ var intl = useFormatMessage('FormItem', localeJson);
425
+ var tipsStr = placeholder || "".concat(label);
428
426
  /**
429
427
  * 报错信息
430
428
  * @type {boolean}
431
429
  */
432
- const [errorStatus, setErrorStatus] = React__default.useState(!!error);
430
+ var _React$useState = React__default.useState(!!error),
431
+ _React$useState2 = _slicedToArray(_React$useState, 2),
432
+ errorStatus = _React$useState2[0],
433
+ setErrorStatus = _React$useState2[1];
433
434
  /**
434
435
  * 校验方法
435
436
  */
436
- const validateFunction = val => {
437
+ var validateFunction = function validateFunction(val) {
437
438
  setValue && setValue(name, 'value', val);
438
439
  change && change(val);
439
440
  // 没有校验规则直接退出
440
441
  if (!rules) return;
441
- const item = Object.assign(Object.assign({}, props), {
442
- setErrorMsg,
443
- setAndValidateValue
442
+ var item = Object.assign(Object.assign({}, props), {
443
+ setErrorMsg: setErrorMsg,
444
+ setAndValidateValue: setAndValidateValue
444
445
  });
445
- const errorMessage = validate(item, val, intl) || '';
446
+ var errorMessage = validate(item, val, intl) || '';
446
447
  setErrorMsg(errorMessage);
447
448
  };
448
449
  /**
449
450
  * 存储和校验数据
450
451
  */
451
- const setAndValidateValue = validateFunction;
452
+ var setAndValidateValue = validateFunction;
452
453
  /**
453
454
  * 合并设置Error状态方法
454
455
  */
455
- const setErrorMsg = React__default.useCallback(msg => {
456
+ var setErrorMsg = React__default.useCallback(function (msg) {
456
457
  setError && setError(msg);
457
458
  setErrorStatus(!!msg);
458
459
  setValue && setValue(name, 'message', msg);
@@ -460,21 +461,21 @@ const ItemType = props => {
460
461
  /**
461
462
  * 传出最后的 item 对象
462
463
  */
463
- React__default.useEffect(() => {
464
- const item = Object.assign(Object.assign({}, props), {
465
- setErrorMsg,
466
- setAndValidateValue
464
+ React__default.useEffect(function () {
465
+ var item = Object.assign(Object.assign({}, props), {
466
+ setErrorMsg: setErrorMsg,
467
+ setAndValidateValue: setAndValidateValue
467
468
  });
468
469
  setValue && setValue(name, 'item', item);
469
470
  }, [name, props, setErrorMsg, setValue]);
470
471
  /**
471
472
  * 判断显示那个
472
473
  */
473
- const selectType = () => {
474
+ var selectType = function selectType() {
474
475
  if (!isComponent && itemType && typeof itemType !== 'string' && (!itemType.name || itemType.name === 'InputType')) {
475
- const item = Object.assign(Object.assign({}, props), {
476
- setErrorMsg,
477
- setAndValidateValue
476
+ var item = Object.assign(Object.assign({}, props), {
477
+ setErrorMsg: setErrorMsg,
478
+ setAndValidateValue: setAndValidateValue
478
479
  });
479
480
  return itemType(item);
480
481
  }
@@ -483,7 +484,7 @@ const ItemType = props => {
483
484
  return jsx(FormFile, Object.assign({}, props, {
484
485
  defaultValue: backData[name],
485
486
  disabled: disabled,
486
- onChange: value => {
487
+ onChange: function onChange(value) {
487
488
  validateFunction(value);
488
489
  }
489
490
  }));
@@ -491,7 +492,7 @@ const ItemType = props => {
491
492
  if (backData[name] === undefined) setValue && setValue(name, 'initValue', !!backData[name]);
492
493
  return jsx(Switch, Object.assign({
493
494
  defaultChecked: !!backData[name],
494
- onChange: checked => {
495
+ onChange: function onChange(checked) {
495
496
  validateFunction(checked);
496
497
  }
497
498
  }, Object.assign(Object.assign({}, inputProps), {
@@ -501,7 +502,7 @@ const ItemType = props => {
501
502
  return jsx(FormCheckboxGroup, Object.assign({
502
503
  error: errorStatus,
503
504
  defaultValue: backData[name],
504
- change: value => {
505
+ change: function change(value) {
505
506
  validateFunction(value);
506
507
  },
507
508
  list: props.list
@@ -513,7 +514,7 @@ const ItemType = props => {
513
514
  placeholder: tipsStr,
514
515
  defaultValue: backData[name],
515
516
  error: errorStatus,
516
- change: value => {
517
+ change: function change(value) {
517
518
  validateFunction(value);
518
519
  },
519
520
  list: props.list
@@ -524,7 +525,7 @@ const ItemType = props => {
524
525
  return jsx(FormRadioGroup, Object.assign({
525
526
  error: errorStatus,
526
527
  defaultValue: backData[name],
527
- change: value => {
528
+ change: function change(value) {
528
529
  validateFunction(value);
529
530
  },
530
531
  list: props.list
@@ -541,7 +542,7 @@ const ItemType = props => {
541
542
  rows: 3,
542
543
  name: name,
543
544
  hideErrorDom: null,
544
- onChange: e => {
545
+ onChange: function onChange(e) {
545
546
  validateFunction(e.target.value);
546
547
  }
547
548
  }, inputProps));
@@ -553,7 +554,7 @@ const ItemType = props => {
553
554
  disabled: disabled,
554
555
  name: name,
555
556
  hideErrorDom: null,
556
- onChange: val => {
557
+ onChange: function onChange(val) {
557
558
  validateFunction(val);
558
559
  }
559
560
  }, inputProps));
@@ -563,7 +564,7 @@ const ItemType = props => {
563
564
  placeholder: tipsStr,
564
565
  defaultValue: backData[name],
565
566
  disabled: disabled,
566
- onChange: options => {
567
+ onChange: function onChange(options) {
567
568
  validateFunction(options);
568
569
  }
569
570
  }, inputProps));
@@ -575,7 +576,7 @@ const ItemType = props => {
575
576
  placeholder: tipsStr,
576
577
  defaultValue: backData[name],
577
578
  disabled: disabled,
578
- onChange: val => {
579
+ onChange: function onChange(val) {
579
580
  validateFunction(val);
580
581
  },
581
582
  inputProps: inputProps
@@ -586,7 +587,7 @@ const ItemType = props => {
586
587
  autocomplete: "off",
587
588
  error: errorStatus,
588
589
  placeholder: tipsStr,
589
- onChange: e => {
590
+ onChange: function onChange(e) {
590
591
  validateFunction(e.target.value);
591
592
  },
592
593
  name: name,
@@ -602,24 +603,25 @@ const ItemType = props => {
602
603
  * 报错信息组件
603
604
  * @description 为了解决,在主组件设置state,导致输入框中内容刷新,且失去焦点
604
605
  */
605
- const ErrorTips = props => {
606
- const {
607
- getSetError,
608
- errorMessage,
609
- helperTextProps
610
- } = props;
606
+ var ErrorTips = function ErrorTips(props) {
607
+ var getSetError = props.getSetError,
608
+ errorMessage = props.errorMessage,
609
+ helperTextProps = props.helperTextProps;
611
610
  /**
612
611
  * 报错信息
613
612
  * @type {string}
614
613
  */
615
- const [errorTips, setErrorTips] = React__default.useState(errorMessage || '');
614
+ var _React$useState = React__default.useState(errorMessage || ''),
615
+ _React$useState2 = _slicedToArray(_React$useState, 2),
616
+ errorTips = _React$useState2[0],
617
+ setErrorTips = _React$useState2[1];
616
618
  /**
617
619
  * 初始化传出, 设置错误信息方法
618
620
  */
619
- React__default.useEffect(() => {
621
+ React__default.useEffect(function () {
620
622
  setErrorTips(errorMessage || '');
621
623
  }, [errorMessage]);
622
- React__default.useEffect(() => {
624
+ React__default.useEffect(function () {
623
625
  getSetError && getSetError(setErrorTips);
624
626
  }, [getSetError]);
625
627
  return jsx(HelperText, Object.assign({
package/index.d.ts CHANGED
@@ -124,6 +124,8 @@ export { default as RadioGroup } from './RadioGroup';
124
124
  export * from './RadioGroup';
125
125
  export { default as RangeInput } from './RangeInput';
126
126
  export * from './RangeInput';
127
+ export { default as Result } from './Result';
128
+ export * from './Result';
127
129
  export { default as Search } from './Search';
128
130
  export * from './Search';
129
131
  export { default as Select } from './Select';
package/index.js CHANGED
@@ -30,8 +30,8 @@ export { D as Dropdown } from './_verture/index-bde7aabe.js';
30
30
  export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
31
31
  export { default as Empty } from './Empty/index.js';
32
32
  export { default as Form } from './Form/index.js';
33
- export { F as FormItem } from './_verture/index-b040e10a.js';
34
- export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-205db1f4.js';
33
+ export { F as FormItem } from './_verture/index-67fe714a.js';
34
+ export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-369509dd.js';
35
35
  export { G as GlobalContext, c as changeConfirmLocale, g as getConfirmLocale } from './_verture/index-ca413216.js';
36
36
  export { default as Help } from './Help/index.js';
37
37
  export { default as HelperText } from './HelperText/index.js';
@@ -61,6 +61,7 @@ export { QuickReply, QuickReplyCode } from './QuickReply/index.js';
61
61
  export { Radio } from './Radio/index.js';
62
62
  export { RadioGroup } from './RadioGroup/index.js';
63
63
  export { RangeInput } from './RangeInput/index.js';
64
+ export { Result } from './Result/index.js';
64
65
  export { Search } from './Search/index.js';
65
66
  export { default as Select } from './Select/index.js';
66
67
  export { SelectInput } from './SelectInput/index.js';
@@ -179,6 +180,7 @@ import '@para-ui/icons/Plus';
179
180
  import '@para-ui/icons/EditOutline';
180
181
  import '@para-ui/icons/Message';
181
182
  import '@para-ui/icons/Set';
183
+ import '@para-ui/icons/Loading';
182
184
  import './_verture/index-94e24006.js';
183
185
  import 'rc-slider';
184
186
  import './_verture/tinycolor-ece3542d.js';
@@ -208,6 +210,5 @@ import '@para-ui/icons/Document';
208
210
  import '@para-ui/icons/EditFile';
209
211
  import '@para-ui/icons/MoreCircle';
210
212
  import 'rc-upload';
211
- import '@para-ui/icons/Loading';
212
213
  import '@para-ui/icons/Photo';
213
214
  import 'react-easy-crop';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "4.0.40",
4
+ "version": "4.0.42",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",