@para-ui/core 4.0.0-rc.3 → 4.0.0-rc.5

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 (180) hide show
  1. package/AutoBox/index.js +72 -85
  2. package/AutoTips/index.js +72 -95
  3. package/Badge/index.js +18 -17
  4. package/Breadcrumbs/index.js +57 -73
  5. package/Button/index.js +89 -117
  6. package/ButtonGroup/index.js +30 -33
  7. package/Carousel/index.js +29 -33
  8. package/Cascader/index.js +7 -9
  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 +242 -330
  16. package/ComboSelect/utils.d.ts +0 -5
  17. package/Container/index.js +17 -21
  18. package/CopyText/index.js +50 -83
  19. package/DatePicker/index.js +22 -27
  20. package/Descriptions/index.js +50 -59
  21. package/Desktop/index.js +161 -180
  22. package/DragVerify/index.js +77 -113
  23. package/Drawer/index.js +82 -97
  24. package/Dropdown/index.js +3 -3
  25. package/DynamicMultiBox/index.js +219 -224
  26. package/DynamicMultiBox/interface.d.ts +7 -0
  27. package/Empty/index.js +26 -28
  28. package/Form/index.js +66 -74
  29. package/FormItem/index.js +14 -15
  30. package/FunctionModal/index.js +7 -14
  31. package/GlobalContext/index.js +17 -20
  32. package/Help/index.js +9 -12
  33. package/HelperText/index.js +11 -11
  34. package/InputLang/index.js +104 -124
  35. package/InputNumber/index.js +62 -81
  36. package/Label/index.js +19 -21
  37. package/Loading/index.js +11 -10
  38. package/Menu/index.js +302 -371
  39. package/Message/index.js +105 -114
  40. package/Modal/index.js +122 -148
  41. package/MultiBox/index.d.ts +5 -0
  42. package/MultiBox/index.js +111 -115
  43. package/Notification/index.js +105 -103
  44. package/OperateBtn/index.d.ts +3 -0
  45. package/OperateBtn/index.js +77 -107
  46. package/PageHeader/index.js +327 -406
  47. package/Pagination/index.js +107 -137
  48. package/ParauiProvider/index.js +20 -22
  49. package/PasswordRules/index.js +36 -40
  50. package/PopConfirm/index.js +62 -79
  51. package/Popover/index.js +12 -12
  52. package/Progress/index.js +72 -74
  53. package/Querying/index.js +52 -59
  54. package/README.md +2 -0
  55. package/Radio/index.js +27 -34
  56. package/RadioGroup/index.js +38 -52
  57. package/Search/index.js +35 -44
  58. package/Select/index.js +323 -364
  59. package/SelectInput/index.js +8 -13
  60. package/Selector/index.js +905 -796
  61. package/SelectorPicker/index.js +111 -133
  62. package/SingleBox/index.d.ts +5 -0
  63. package/SingleBox/index.js +92 -88
  64. package/Slider/index.js +46 -57
  65. package/Status/index.js +14 -13
  66. package/Stepper/index.js +25 -26
  67. package/Styles/theme.scss +9 -9
  68. package/Switch/index.js +32 -35
  69. package/Table/index.js +767 -963
  70. package/Tabs/index.js +102 -102
  71. package/Tag/index.js +115 -162
  72. package/TextEditor/index.js +81 -103
  73. package/TextField/index.js +142 -183
  74. package/TimePicker/index.js +27 -28
  75. package/Timeline/index.js +67 -58
  76. package/Title/index.js +32 -34
  77. package/ToggleButton/index.js +53 -52
  78. package/Tooltip/index.js +79 -82
  79. package/Transfer/index.js +160 -203
  80. package/Tree/index.js +7 -12
  81. package/Upload/index.js +527 -759
  82. package/Upload/interface.d.ts +5 -0
  83. package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
  84. package/_verture/{index-f48d5ce6.js → index-0ced30f7.js} +1128 -1080
  85. package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
  86. package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
  87. package/_verture/index-da9097d3.js +239 -0
  88. package/_verture/{index-56601c94.js → index-ef1235fb.js} +125 -134
  89. package/_verture/{index-de8f4428.js → index-f186b5e8.js} +315 -399
  90. package/_verture/intl-f2f27722.js +69 -0
  91. package/_verture/{modalContext-736ff215.js → modalContext-5df08980.js} +36 -64
  92. package/_verture/{slicedToArray-a8206399.js → slicedToArray-8223a2ef.js} +15 -2
  93. package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
  94. package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
  95. package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
  96. package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
  97. package/_verture/{utils-06d86594.js → utils-46e99c9a.js} +34 -26
  98. package/index.js +21 -22
  99. package/locale/index.js +10 -10
  100. package/package.json +1 -1
  101. package/umd/AutoBox.js +9 -8
  102. package/umd/AutoTips.js +9 -8
  103. package/umd/Badge.js +1 -1
  104. package/umd/Breadcrumbs.js +9 -8
  105. package/umd/Button.js +9 -8
  106. package/umd/ButtonGroup.js +9 -8
  107. package/umd/Carousel.js +5 -5
  108. package/umd/Cascader.js +9 -8
  109. package/umd/Checkbox.js +9 -8
  110. package/umd/CheckboxGroup.js +9 -8
  111. package/umd/Collapse.js +8 -7
  112. package/umd/CollapseBox.js +1 -1
  113. package/umd/CollapseLayout.js +4 -4
  114. package/umd/ColorPicker.js +1 -1
  115. package/umd/ComboSelect.js +9 -8
  116. package/umd/Container.js +1 -1
  117. package/umd/CopyText.js +9 -8
  118. package/umd/DatePicker.js +9 -8
  119. package/umd/Descriptions.js +9 -8
  120. package/umd/Desktop.js +9 -8
  121. package/umd/DragVerify.js +4 -4
  122. package/umd/Drawer.js +9 -8
  123. package/umd/Dropdown.js +6 -5
  124. package/umd/DynamicMultiBox.js +11 -10
  125. package/umd/Empty.js +1 -1
  126. package/umd/Form.js +9 -8
  127. package/umd/FormItem.js +9 -8
  128. package/umd/FunctionModal.js +9 -8
  129. package/umd/GlobalContext.js +1 -1
  130. package/umd/Help.js +9 -8
  131. package/umd/HelperText.js +1 -1
  132. package/umd/InputLang.js +9 -8
  133. package/umd/InputNumber.js +9 -8
  134. package/umd/Label.js +9 -8
  135. package/umd/Loading.js +4 -4
  136. package/umd/Menu.js +4 -4
  137. package/umd/Message.js +4 -4
  138. package/umd/Modal.js +9 -8
  139. package/umd/MultiBox.js +9 -8
  140. package/umd/Notification.js +8 -7
  141. package/umd/OperateBtn.js +9 -8
  142. package/umd/PageHeader.js +9 -8
  143. package/umd/Pagination.js +9 -8
  144. package/umd/ParauiProvider.js +1 -1
  145. package/umd/PasswordRules.js +4 -4
  146. package/umd/PopConfirm.js +9 -8
  147. package/umd/Popover.js +9 -8
  148. package/umd/Progress.js +5 -5
  149. package/umd/Querying.js +1 -1
  150. package/umd/Radio.js +9 -8
  151. package/umd/RadioGroup.js +9 -8
  152. package/umd/Search.js +9 -8
  153. package/umd/Select.js +9 -8
  154. package/umd/SelectInput.js +9 -8
  155. package/umd/Selector.js +9 -8
  156. package/umd/SelectorPicker.js +9 -8
  157. package/umd/SingleBox.js +9 -8
  158. package/umd/Slider.js +6 -5
  159. package/umd/Status.js +4 -4
  160. package/umd/Stepper.js +9 -8
  161. package/umd/Switch.js +9 -8
  162. package/umd/Table.js +9 -8
  163. package/umd/Tabs.js +9 -8
  164. package/umd/Tag.js +9 -8
  165. package/umd/TextEditor.js +22 -21
  166. package/umd/TextField.js +9 -8
  167. package/umd/TimePicker.js +9 -8
  168. package/umd/Timeline.js +1 -1
  169. package/umd/Title.js +9 -8
  170. package/umd/ToggleButton.js +9 -8
  171. package/umd/Tooltip.js +9 -8
  172. package/umd/Transfer.js +10 -9
  173. package/umd/Tree.js +9 -8
  174. package/umd/Upload.js +10 -9
  175. package/umd/locale.js +1 -1
  176. package/_verture/index-232d890b.js +0 -327
  177. package/_verture/index-e9007d6a.js +0 -236
  178. package/_verture/intl-5c1ec055.js +0 -81
  179. package/_verture/toConsumableArray-8f4c9589.js +0 -19
  180. package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
@@ -1,24 +1,24 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
2
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.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 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
- var HelperText = function HelperText(props) {
9
- var className = props.className,
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;
8
+ const HelperText = props => {
9
+ const {
10
+ className,
11
+ style,
12
+ error = false,
13
+ hideErrorDom = false,
14
+ helperText
15
+ } = props;
16
16
  if (hideErrorDom === null) return null;
17
17
  // 不存在错误,且没有错误隐藏错误dom
18
18
  if (!error && hideErrorDom) return null;
19
19
  // 处理class
20
- var handClass = function handClass() {
21
- var str = "".concat($prefixCls, "-helper-text");
20
+ const handClass = () => {
21
+ let str = "".concat($prefixCls, "-helper-text");
22
22
  if (className) str += " ".concat(className);
23
23
  if (error) str += " ".concat($prefixCls, "-helper-text-error");
24
24
  return str;
@@ -1,7 +1,3 @@
1
- import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
2
- import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
3
- import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
4
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
5
1
  import { jsx, jsxs } from 'react/jsx-runtime';
6
2
  import { useState, useRef, useEffect, useMemo } from 'react';
7
3
  import { TextField } from '../TextField/index.js';
@@ -11,9 +7,8 @@ import AutoTips from '../AutoTips/index.js';
11
7
  import { Popover } from '../Popover/index.js';
12
8
  import Internet from '@para-ui/icons/Internet';
13
9
  import { GetLanguage, ArrayToObject } from '@paraview/lib';
14
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
10
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
15
11
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
16
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
17
12
  import '../_verture/tslib.es6-55ed4bd2.js';
18
13
  import '../Label/index.js';
19
14
  import '../Help/index.js';
@@ -28,101 +23,82 @@ import '@para-ui/icons/PreviewOpen';
28
23
  import '@para-ui/icons/CloseCircleF';
29
24
  import '../Loading/index.js';
30
25
  import '@para-ui/icons/LoadingF';
31
- import '../_verture/useGlobalProps-1b846a65.js';
26
+ import '../_verture/useGlobalProps-1e416658.js';
32
27
  import '@para-ui/core/GlobalContext';
33
- import '../_verture/index-e9007d6a.js';
28
+ import '../_verture/index-da9097d3.js';
34
29
  import 'rc-dropdown';
35
- import '../_verture/usePopupContainer-87febeb9.js';
30
+ import '../_verture/usePopupContainer-635f66f4.js';
36
31
  import 'dayjs';
37
32
  import '@para-ui/icons/Delete';
38
33
  import '@para-ui/icons/PlusCircleF';
39
- import '../_verture/useFormatMessage-703f8b20.js';
34
+ import '../_verture/useFormatMessage-eb13cf56.js';
40
35
 
41
36
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-input-lang {\n display: inline-block;\n width: 100%;\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: 14px;\n font-weight: 400;\n}\n.paraui-v4-input-lang .input-lang-text-field > .text-field-content > .text-field-content-before .lang-key {\n max-width: 100px;\n}\n.paraui-v4-input-lang .input-lang-text-field > .text-field-content > .text-field-content-within > .right-icon .lang-list-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-input-lang .input-lang-text-field > .text-field-content > .text-field-content-within > .right-icon .lang-list-icon:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-input-lang .input-lang-text-field > .paraui-v4-helper-text {\n display: none;\n}\n\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner {\n padding: 20px;\n line-height: 0;\n}\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box {\n padding-bottom: 0;\n}\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content .multi-box-content-item .multi-box-content-item-input .multi-box-text-field:first-child {\n flex: 1;\n}\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content .multi-box-content-item .multi-box-content-item-input .multi-box-text-field:last-child {\n flex: 3;\n}\n.paraui-v4-input-lang-popover.paraui-v4-input-lang-popover-disabled-add > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-add {\n display: none;\n}\n.paraui-v4-input-lang-popover.paraui-v4-input-lang-popover-disabled-delete > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content > .multi-box-content-item .opera-box {\n display: none;\n}";
42
37
  styleInject(css_248z);
43
38
 
44
- var InputLang = function InputLang(props) {
39
+ const InputLang = props => {
45
40
  var _a;
46
- var className = props.className,
47
- style = props.style,
48
- label = props.label,
49
- labelTooltip = props.labelTooltip,
50
- _props$size = props.size,
51
- size = _props$size === void 0 ? 'large' : _props$size,
52
- placeholder = props.placeholder,
53
- placeholderKey = props.placeholderKey,
54
- placeholderValue = props.placeholderValue,
55
- _props$error = props.error,
56
- error = _props$error === void 0 ? false : _props$error,
57
- hideErrorDom = props.hideErrorDom,
58
- _props$helperText = props.helperText,
59
- helperText = _props$helperText === void 0 ? '' : _props$helperText,
60
- _props$required = props.required,
61
- required = _props$required === void 0 ? false : _props$required,
62
- popoverClassName = props.popoverClassName,
63
- value = props.value,
64
- onChange = props.onChange,
65
- _props$langList = props.langList,
66
- langList = _props$langList === void 0 ? ['zh', 'en'] : _props$langList,
67
- _props$disabled = props.disabled,
68
- disabled = _props$disabled === void 0 ? false : _props$disabled,
69
- disabledTooltip = props.disabledTooltip,
70
- defaultLang = props.defaultLang,
71
- disabledDelete = props.disabledDelete,
72
- disabledAdd = props.disabledAdd,
73
- disabledKey = props.disabledKey;
74
- var _useState = useState(false),
75
- _useState2 = _slicedToArray(_useState, 2),
76
- open = _useState2[0],
77
- setOpen = _useState2[1]; // 打开弹窗
78
- var _useState3 = useState(GetLanguage() || 'zh'),
79
- _useState4 = _slicedToArray(_useState3, 2),
80
- lang = _useState4[0],
81
- setLang = _useState4[1]; // 当前语言
82
- var _useState5 = useState({}),
83
- _useState6 = _slicedToArray(_useState5, 2),
84
- langMapping = _useState6[0],
85
- setLangMapping = _useState6[1];
86
- var _useState7 = useState({}),
87
- _useState8 = _slicedToArray(_useState7, 2),
88
- valueCom = _useState8[0],
89
- setValueCom = _useState8[1];
90
- var _useState9 = useState([]),
91
- _useState10 = _slicedToArray(_useState9, 2),
92
- valueListLang = _useState10[0],
93
- setValueListLang = _useState10[1]; // 多值框值
94
- var constData = useRef({
95
- lang: lang,
96
- valueCom: valueCom,
41
+ const {
42
+ className,
43
+ style,
44
+ label,
45
+ labelTooltip,
46
+ size = 'large',
47
+ placeholder,
48
+ placeholderKey,
49
+ placeholderValue,
50
+ error = false,
51
+ hideErrorDom,
52
+ helperText = '',
53
+ required = false,
54
+ popoverClassName,
55
+ value,
56
+ onChange,
57
+ langList = ['zh', 'en'],
58
+ disabled = false,
59
+ disabledTooltip,
60
+ defaultLang,
61
+ disabledDelete,
62
+ disabledAdd,
63
+ disabledKey
64
+ } = props;
65
+ const [open, setOpen] = useState(false); // 打开弹窗
66
+ const [lang, setLang] = useState(GetLanguage() || 'zh'); // 当前语言
67
+ const [langMapping, setLangMapping] = useState({});
68
+ const [valueCom, setValueCom] = useState({});
69
+ const [valueListLang, setValueListLang] = useState([]); // 多值框值
70
+ const constData = useRef({
71
+ lang,
72
+ valueCom,
97
73
  langMapping: {},
98
74
  langLabelMapping: {}
99
75
  });
100
- var refDom = useRef(null);
76
+ const refDom = useRef(null);
101
77
  constData.current.lang = lang;
102
78
  constData.current.disabledDelete = disabledDelete;
103
- useEffect(function () {
79
+ useEffect(() => {
104
80
  if (props.defaultValue !== undefined) {
105
81
  handValue(props.defaultValue);
106
82
  }
107
83
  }, []);
108
- useEffect(function () {
84
+ useEffect(() => {
109
85
  if (value !== undefined) {
110
86
  handValue(value);
111
87
  }
112
88
  }, [value]);
113
- useEffect(function () {
89
+ useEffect(() => {
114
90
  if (defaultLang !== undefined) {
115
91
  setLang(defaultLang);
116
92
  constData.current.lang = defaultLang;
117
93
  handValue();
118
94
  }
119
95
  }, [defaultLang]);
120
- useEffect(function () {
96
+ useEffect(() => {
121
97
  if (langList) {
122
- var obj = {};
123
- var objLabel = {};
124
- for (var i = 0, l = langList.length; i < l; i++) {
125
- var item = langList[i];
98
+ const obj = {};
99
+ const objLabel = {};
100
+ for (let i = 0, l = langList.length; i < l; i++) {
101
+ const item = langList[i];
126
102
  if (typeof item === 'string') {
127
103
  obj[item] = {
128
104
  label: item,
@@ -146,35 +122,35 @@ var InputLang = function InputLang(props) {
146
122
  /**
147
123
  * 处理值
148
124
  */
149
- var handValue = function handValue(val) {
150
- var valueCopy = Object.assign({}, val || constData.current.valueCom);
151
- var arr = [];
152
- var json = {};
125
+ const handValue = val => {
126
+ const valueCopy = Object.assign({}, val || constData.current.valueCom);
127
+ const arr = [];
128
+ const json = {};
153
129
  if (constData.current.disabledDelete) {
154
- var keyArr = Object.keys(constData.current.langMapping) || [];
155
- for (var i = 0, l = keyArr.length; i < l; i++) {
156
- var keyItem = constData.current.langMapping[keyArr[i]] || {};
157
- var key = keyItem.value;
158
- var _label = keyItem.label;
159
- var _val = valueCopy[key];
130
+ const keyArr = Object.keys(constData.current.langMapping) || [];
131
+ for (let i = 0, l = keyArr.length; i < l; i++) {
132
+ const keyItem = constData.current.langMapping[keyArr[i]] || {};
133
+ const key = keyItem.value;
134
+ const label = keyItem.label;
135
+ const val = valueCopy[key];
160
136
  if (key !== constData.current.lang) {
161
137
  json[key] = true;
162
138
  arr.push({
163
- label: _label,
164
- value: _val || ''
139
+ label: label,
140
+ value: val || ''
165
141
  });
166
142
  }
167
143
  }
168
144
  }
169
- var valueCopyArr = Object.keys(valueCopy);
170
- for (var _i = 0, _l = valueCopyArr.length; _i < _l; _i++) {
171
- var _key = valueCopyArr[_i];
172
- var item = valueCopy[_key];
145
+ const valueCopyArr = Object.keys(valueCopy);
146
+ for (let i = 0, l = valueCopyArr.length; i < l; i++) {
147
+ const key = valueCopyArr[i];
148
+ const item = valueCopy[key];
173
149
  // 不存在设置过,且不是当前语言
174
- if (!json[_key] && _key !== constData.current.lang) {
175
- var itemDetail = constData.current.langMapping[_key] || {};
150
+ if (!json[key] && key !== constData.current.lang) {
151
+ const itemDetail = constData.current.langMapping[key] || {};
176
152
  arr.push({
177
- label: itemDetail.label || _key,
153
+ label: itemDetail.label || key,
178
154
  value: item || ''
179
155
  });
180
156
  }
@@ -186,7 +162,7 @@ var InputLang = function InputLang(props) {
186
162
  /**
187
163
  * 向外抛值
188
164
  * */
189
- var outValue = function outValue(val) {
165
+ const outValue = val => {
190
166
  if (props.value === undefined) {
191
167
  constData.current.valueCom = Object.assign({}, val);
192
168
  setValueCom(val);
@@ -197,26 +173,26 @@ var InputLang = function InputLang(props) {
197
173
  * 改变当前语言
198
174
  * @param event
199
175
  */
200
- var changeValue = function changeValue(event) {
176
+ const changeValue = event => {
201
177
  valueCom[lang] = event.target.value;
202
- var val = Object.assign({}, valueCom);
178
+ const val = Object.assign({}, valueCom);
203
179
  outValue(val);
204
180
  };
205
181
  /**
206
182
  * 改变弹窗语言值
207
183
  * @param val
208
184
  */
209
- var changeListLang = function changeListLang(val) {
210
- setValueListLang(_toConsumableArray(val));
185
+ const changeListLang = val => {
186
+ setValueListLang([...val]);
211
187
  };
212
188
  /** 模糊搜索 */
213
- var fetchSuggestionsKey = function fetchSuggestionsKey(val, cb) {
189
+ const fetchSuggestionsKey = (val, cb) => {
214
190
  var _a;
215
- var arr = [];
216
- var jsonMapping = ArrayToObject('label', valueListLang);
217
- for (var i = 0, l = langList.length; i < l; i++) {
218
- var item = langList[i];
219
- if (_typeof(item) === 'object') {
191
+ const arr = [];
192
+ const jsonMapping = ArrayToObject('label', valueListLang);
193
+ for (let i = 0, l = langList.length; i < l; i++) {
194
+ let item = langList[i];
195
+ if (typeof item === 'object') {
220
196
  item = item.label;
221
197
  }
222
198
  if (!jsonMapping[item] && item !== (((_a = langMapping[lang]) === null || _a === void 0 ? void 0 : _a.label) || lang)) arr.push({
@@ -227,26 +203,26 @@ var InputLang = function InputLang(props) {
227
203
  cb(arr);
228
204
  };
229
205
  /** 点击国际化图标 */
230
- var clickRight = function clickRight() {
206
+ const clickRight = () => {
231
207
  setOpen(true);
232
208
  };
233
209
  /** 关闭弹窗 */
234
- var handleClose = function handleClose(bol) {
210
+ const handleClose = bol => {
235
211
  var _a;
236
212
  if (bol) return;
237
213
  setOpen(false);
238
214
  // 向外抛值
239
- var json = {};
215
+ const json = {};
240
216
  json[lang] = valueCom[lang] || '';
241
- for (var i = 0, l = valueListLang.length; i < l; i++) {
242
- var item = valueListLang[i];
243
- var _label2 = ((_a = constData.current.langLabelMapping[item.label]) === null || _a === void 0 ? void 0 : _a.value) || item.label || '';
244
- if (_label2.trim() !== '') json[_label2] = item.value || '';
217
+ for (let i = 0, l = valueListLang.length; i < l; i++) {
218
+ const item = valueListLang[i];
219
+ const label = ((_a = constData.current.langLabelMapping[item.label]) === null || _a === void 0 ? void 0 : _a.value) || item.label || '';
220
+ if (label.trim() !== '') json[label] = item.value || '';
245
221
  }
246
222
  outValue(json);
247
223
  };
248
224
  /** 当前语言 */
249
- var AddonBeforeMemo = function AddonBeforeMemo() {
225
+ const AddonBeforeMemo = () => {
250
226
  var _a;
251
227
  return jsx("div", Object.assign({
252
228
  className: 'lang-key'
@@ -259,7 +235,7 @@ var InputLang = function InputLang(props) {
259
235
  }));
260
236
  };
261
237
  /** 加载更多语言 */
262
- var RightIcon = useMemo(function () {
238
+ const RightIcon = useMemo(() => {
263
239
  return jsx("div", Object.assign({
264
240
  className: "lang-list-icon"
265
241
  }, {
@@ -267,26 +243,30 @@ var InputLang = function InputLang(props) {
267
243
  }));
268
244
  }, []);
269
245
  /** 处理弹出框className */
270
- var popoverHandClass = function popoverHandClass() {
271
- var str = "".concat($prefixCls, "-input-lang-popover");
246
+ const popoverHandClass = () => {
247
+ let str = "".concat($prefixCls, "-input-lang-popover");
272
248
  if (popoverClassName) str += " ".concat(popoverClassName);
273
249
  if (disabledAdd) str += " ".concat($prefixCls, "-input-lang-popover-disabled-add");
274
250
  if (disabledDelete) str += " ".concat($prefixCls, "-input-lang-popover-disabled-delete");
275
251
  return str;
276
252
  };
277
- var handleDisabled = function handleDisabled() {
253
+ const handleDisabled = () => {
278
254
  if (disabled === true) return true;
279
- var arr = [];
255
+ const arr = [];
280
256
  if (disabledKey) {
281
- var bol = _typeof(disabledKey) === 'object';
282
- for (var i = 0, l = valueListLang.length; i < l; i++) {
283
- var _label3 = valueListLang[i].label || '';
284
- var labelDetail = constData.current.langLabelMapping[_label3] || {};
257
+ const bol = typeof disabledKey === 'object';
258
+ for (let i = 0, l = valueListLang.length; i < l; i++) {
259
+ const label = valueListLang[i].label || '';
260
+ const labelDetail = constData.current.langLabelMapping[label] || {};
285
261
  if (bol) {
286
- arr.push(_defineProperty({}, _label3, disabledKey.indexOf(labelDetail.value || _label3) !== -1));
262
+ arr.push({
263
+ [label]: disabledKey.indexOf(labelDetail.value || label) !== -1
264
+ });
287
265
  } else {
288
- if (_label3.trim() !== '') {
289
- arr.push(_defineProperty({}, _label3, true));
266
+ if (label.trim() !== '') {
267
+ arr.push({
268
+ [label]: true
269
+ });
290
270
  }
291
271
  }
292
272
  }
@@ -294,7 +274,7 @@ var InputLang = function InputLang(props) {
294
274
  return arr;
295
275
  };
296
276
  /** 弹窗列表内容 */
297
- var langListPopoverContent = function langListPopoverContent() {
277
+ const langListPopoverContent = () => {
298
278
  return jsx("div", Object.assign({
299
279
  className: "input-lang-list"
300
280
  }, {
@@ -314,8 +294,8 @@ var InputLang = function InputLang(props) {
314
294
  * 处理class
315
295
  * @return {string}
316
296
  */
317
- var handClass = function handClass() {
318
- var str = "".concat($prefixCls, "-input-lang");
297
+ const handClass = () => {
298
+ let str = "".concat($prefixCls, "-input-lang");
319
299
  if (size) str += " ".concat($prefixCls, "-input-lang-").concat(size);
320
300
  if (error) str += " ".concat($prefixCls, "-input-lang-error");
321
301
  if (className) str += " ".concat(className);