@vtx/components 4.0.0-beta.7 → 4.0.0-beta.71

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 (212) hide show
  1. package/README.md +19 -19
  2. package/es/index.js +3 -0
  3. package/es/utils/components/LabelIconTip/index.js +7 -7
  4. package/es/utils/conversionMomentValue/index.js +25 -25
  5. package/es/utils/filterSpecialCharacters.js +53 -52
  6. package/es/utils/genCopyable/index.js +6 -6
  7. package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  8. package/es/utils/hooks/useDebounceFn/index.js +4 -4
  9. package/es/utils/hooks/useDebounceValue/index.js +6 -6
  10. package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
  11. package/es/utils/hooks/useLatest/index.js +2 -2
  12. package/es/utils/hooks/useRefCallback/index.js +5 -5
  13. package/es/utils/index.js +1 -2
  14. package/es/utils/isBrowser/index.js +7 -7
  15. package/es/utils/isUrl/index.js +4 -4
  16. package/es/utils/merge/index.js +4 -4
  17. package/es/utils/nanoid/index.js +4 -4
  18. package/es/utils/omitBoolean/index.js +4 -4
  19. package/es/utils/parseValueToMoment/index.js +4 -4
  20. package/es/utils/proFieldParsingText/index.js +10 -10
  21. package/es/utils/transformKeySubmitValue/index.js +57 -57
  22. package/es/utils/useEditableArray/index.js +46 -46
  23. package/es/utils/useEditableMap/index.js +22 -22
  24. package/es/utils/useMediaQuery/index.js +5 -5
  25. package/es/vtx-color-picker/index.js +138 -33
  26. package/es/vtx-color-picker/style/index.js +36 -12
  27. package/es/vtx-combogrid/Combogrid.js +16 -10
  28. package/es/vtx-combogrid/index.js +7 -4
  29. package/es/vtx-combogrid/style/index.js +4 -4
  30. package/es/vtx-datagrid/Store/Provide.js +109 -132
  31. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +15 -9
  32. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  33. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  34. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  35. package/es/vtx-datagrid/ToolBar/index.js +2 -2
  36. package/es/vtx-datagrid/columnState.js +64 -0
  37. package/es/vtx-datagrid/index.js +114 -35
  38. package/es/vtx-datagrid/mergeComponents.js +15 -0
  39. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  40. package/es/vtx-datagrid/style/index.js +102 -20
  41. package/es/vtx-datagrid/style/index.less +242 -242
  42. package/es/vtx-date-picker/QdatePicker.js +1 -1
  43. package/es/vtx-date-picker/style/index.less +39 -39
  44. package/es/vtx-descriptions/Descriptions.js +29 -0
  45. package/es/vtx-descriptions/index.js +3 -0
  46. package/es/vtx-descriptions/style/index.js +19 -0
  47. package/es/vtx-ellipsis-text/index.js +7 -2
  48. package/es/vtx-ellipsis-text/style/index.js +3 -1
  49. package/es/vtx-export/index.js +33 -33
  50. package/es/vtx-export-async/History.js +11 -3
  51. package/es/vtx-export-async/index.js +45 -15
  52. package/es/vtx-form-layout/Card.js +10 -10
  53. package/es/vtx-form-layout/Divider.js +1 -1
  54. package/es/vtx-form-layout/FormItem.js +18 -17
  55. package/es/vtx-form-layout/Pane.js +23 -12
  56. package/es/vtx-icon/index.js +54 -45
  57. package/es/vtx-icon/index.js1 +90 -0
  58. package/es/vtx-image/Preview.js +11 -6
  59. package/es/vtx-image/style/index.js +0 -1
  60. package/es/vtx-import/index.js +155 -43
  61. package/es/vtx-import/result.js +6 -2
  62. package/es/vtx-import/style/index.js +16 -1
  63. package/es/vtx-import2/Content.js +2 -1
  64. package/es/vtx-import2/index.js +31 -20
  65. package/es/vtx-import2/style/index.js +60 -9
  66. package/es/vtx-input/TextArea/index.js +11 -6
  67. package/es/vtx-modal/index.js +11 -6
  68. package/es/vtx-modal/style/index.js +5 -3
  69. package/es/vtx-page-layout/Basic.js +2 -2
  70. package/es/vtx-page-layout/Content.js +1 -1
  71. package/es/vtx-page-layout/TabLayout.js +7 -13
  72. package/es/vtx-page-layout/TableLayout.js +24 -14
  73. package/es/vtx-page-layout/TableWrap.js +3 -2
  74. package/es/vtx-page-layout/TreeLayout.js +8 -14
  75. package/es/vtx-page-layout/container.js +8 -7
  76. package/es/vtx-page-layout/style/index.js +4 -2
  77. package/es/vtx-provider/index.js +50 -40
  78. package/es/vtx-provider/intl.js +9 -9
  79. package/es/vtx-provider/locale/en_US.js +65 -5
  80. package/es/vtx-provider/locale/zh_CN.js +75 -5
  81. package/es/vtx-provider/useStyle/index.js +25 -21
  82. package/es/vtx-scrollable-row/index.js +38 -28
  83. package/es/vtx-search/index.js +18 -13
  84. package/es/vtx-search/style/index.js +2 -1
  85. package/es/vtx-select/index.js +132 -46
  86. package/es/vtx-select/style/index.js +11 -56
  87. package/es/vtx-signature/index.js +5 -4
  88. package/es/vtx-signature/style/index.js +1 -1
  89. package/es/vtx-split-pane/Resizer.js +0 -1
  90. package/es/vtx-split-pane/SplitPane.js +34 -25
  91. package/es/vtx-split-pane/style/index.js +8 -112
  92. package/es/vtx-time-picker/index.js +27 -1
  93. package/es/vtx-transfer/Transfer.js +29 -0
  94. package/es/vtx-transfer/index.js +3 -0
  95. package/es/vtx-transfer/style/index.js +19 -0
  96. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  97. package/es/vtx-transfer-select/index.js +3 -0
  98. package/es/vtx-transfer-select/style/index.js +19 -0
  99. package/es/vtx-tree/index.js +104 -40
  100. package/es/vtx-tree-select/index.js +75 -105
  101. package/es/vtx-tree-select/style/index.js +9 -3
  102. package/es/vtx-upload/FilePreview.js +2 -1
  103. package/es/vtx-wang-editor/index.js +291 -113
  104. package/es/vtx-wang-editor/style/index.less +12 -12
  105. package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
  106. package/lib/index.js +36 -0
  107. package/lib/utils/components/LabelIconTip/index.js +7 -7
  108. package/lib/utils/conversionMomentValue/index.js +25 -25
  109. package/lib/utils/filterSpecialCharacters.js +54 -52
  110. package/lib/utils/genCopyable/index.js +6 -6
  111. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  112. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  113. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  114. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  115. package/lib/utils/hooks/useLatest/index.js +2 -2
  116. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  117. package/lib/utils/index.js +0 -7
  118. package/lib/utils/isBrowser/index.js +7 -7
  119. package/lib/utils/isUrl/index.js +4 -4
  120. package/lib/utils/merge/index.js +4 -4
  121. package/lib/utils/nanoid/index.js +4 -4
  122. package/lib/utils/omitBoolean/index.js +4 -4
  123. package/lib/utils/parseValueToMoment/index.js +4 -4
  124. package/lib/utils/proFieldParsingText/index.js +10 -10
  125. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  126. package/lib/utils/useEditableArray/index.js +46 -46
  127. package/lib/utils/useEditableMap/index.js +22 -22
  128. package/lib/utils/useMediaQuery/index.js +5 -5
  129. package/lib/vtx-color-picker/index.js +139 -34
  130. package/lib/vtx-color-picker/style/index.js +36 -12
  131. package/lib/vtx-combogrid/Combogrid.js +16 -10
  132. package/lib/vtx-combogrid/index.js +7 -4
  133. package/lib/vtx-combogrid/style/index.js +4 -4
  134. package/lib/vtx-datagrid/Store/Provide.js +116 -138
  135. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +15 -10
  136. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  137. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  138. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  139. package/lib/vtx-datagrid/ToolBar/index.js +2 -2
  140. package/lib/vtx-datagrid/columnState.js +73 -0
  141. package/lib/vtx-datagrid/index.js +115 -35
  142. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  143. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  144. package/lib/vtx-datagrid/style/index.js +102 -20
  145. package/lib/vtx-datagrid/style/index.less +242 -242
  146. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  147. package/lib/vtx-date-picker/style/index.less +39 -39
  148. package/lib/vtx-descriptions/Descriptions.js +38 -0
  149. package/lib/vtx-descriptions/index.js +15 -0
  150. package/lib/vtx-descriptions/style/index.js +25 -0
  151. package/lib/vtx-ellipsis-text/index.js +7 -2
  152. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  153. package/lib/vtx-export/index.js +34 -34
  154. package/lib/vtx-export-async/History.js +11 -3
  155. package/lib/vtx-export-async/index.js +43 -13
  156. package/lib/vtx-form-layout/Card.js +9 -9
  157. package/lib/vtx-form-layout/Divider.js +1 -1
  158. package/lib/vtx-form-layout/FormItem.js +18 -17
  159. package/lib/vtx-form-layout/Pane.js +22 -11
  160. package/lib/vtx-icon/index.js +54 -52
  161. package/lib/vtx-icon/index.js1 +90 -0
  162. package/lib/vtx-image/Preview.js +11 -6
  163. package/lib/vtx-image/style/index.js +0 -1
  164. package/lib/vtx-import/index.js +154 -42
  165. package/lib/vtx-import/result.js +6 -2
  166. package/lib/vtx-import/style/index.js +16 -1
  167. package/lib/vtx-import2/Content.js +2 -1
  168. package/lib/vtx-import2/index.js +30 -19
  169. package/lib/vtx-import2/style/index.js +60 -9
  170. package/lib/vtx-input/TextArea/index.js +11 -6
  171. package/lib/vtx-modal/index.js +11 -6
  172. package/lib/vtx-modal/style/index.js +5 -3
  173. package/lib/vtx-page-layout/Basic.js +2 -2
  174. package/lib/vtx-page-layout/Content.js +1 -1
  175. package/lib/vtx-page-layout/TabLayout.js +8 -14
  176. package/lib/vtx-page-layout/TableLayout.js +24 -14
  177. package/lib/vtx-page-layout/TableWrap.js +3 -2
  178. package/lib/vtx-page-layout/TreeLayout.js +9 -15
  179. package/lib/vtx-page-layout/container.js +8 -7
  180. package/lib/vtx-page-layout/style/index.js +4 -2
  181. package/lib/vtx-provider/index.js +49 -40
  182. package/lib/vtx-provider/intl.js +9 -9
  183. package/lib/vtx-provider/locale/en_US.js +65 -5
  184. package/lib/vtx-provider/locale/zh_CN.js +75 -5
  185. package/lib/vtx-provider/useStyle/index.js +25 -21
  186. package/lib/vtx-scrollable-row/index.js +38 -28
  187. package/lib/vtx-search/index.js +18 -13
  188. package/lib/vtx-search/style/index.js +2 -1
  189. package/lib/vtx-select/index.js +134 -48
  190. package/lib/vtx-select/style/index.js +11 -56
  191. package/lib/vtx-signature/index.js +4 -3
  192. package/lib/vtx-signature/style/index.js +1 -1
  193. package/lib/vtx-split-pane/Resizer.js +0 -1
  194. package/lib/vtx-split-pane/SplitPane.js +32 -23
  195. package/lib/vtx-split-pane/style/index.js +8 -112
  196. package/lib/vtx-time-picker/index.js +27 -1
  197. package/lib/vtx-transfer/Transfer.js +38 -0
  198. package/lib/vtx-transfer/index.js +15 -0
  199. package/lib/vtx-transfer/style/index.js +25 -0
  200. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  201. package/lib/vtx-transfer-select/index.js +15 -0
  202. package/lib/vtx-transfer-select/style/index.js +25 -0
  203. package/lib/vtx-tree/index.js +102 -38
  204. package/lib/vtx-tree-select/index.js +75 -105
  205. package/lib/vtx-tree-select/style/index.js +9 -3
  206. package/lib/vtx-upload/FilePreview.js +2 -1
  207. package/lib/vtx-wang-editor/index.js +289 -113
  208. package/lib/vtx-wang-editor/style/index.less +12 -12
  209. package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
  210. package/package.json +238 -222
  211. package/es/utils/hooks/useFetchData/index.js +0 -82
  212. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -26,15 +26,17 @@ import getToken from "../utils/getToken";
26
26
  import getSignature from '@vtx/utils/lib/getSignature';
27
27
  import useSet from "../utils/useSet";
28
28
  import md5 from 'md5';
29
- import { getVtxToken } from '@vtx/utils';
29
+ import { getVtxToken, getUrlParam } from '@vtx/utils';
30
30
  import classnames from 'classnames';
31
31
  import { useStyle } from "./style/index";
32
32
  import { VtxProvider, useIntl } from "../vtx-provider";
33
+ import VtxModal from "../vtx-modal";
33
34
  import { jsx as _jsx } from "react/jsx-runtime";
34
35
  import { jsxs as _jsxs } from "react/jsx-runtime";
35
36
  function getFileName() {
36
37
  var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
37
- var intl = useIntl();
38
+ var _ref = arguments.length > 1 ? arguments[1] : undefined,
39
+ intl = _ref.intl;
38
40
  var index = name.lastIndexOf('.');
39
41
  var suffix = name.substring(index);
40
42
  return name.substring(0, index) + "(".concat(intl.getMessage('import.errorFile', '错误文件'), ")") + suffix;
@@ -43,17 +45,20 @@ var VtxImport2 = function VtxImport2(props) {
43
45
  var intl = useIntl();
44
46
  var _useContext = useContext(VtxProvider),
45
47
  getPrefixCls = _useContext.getPrefixCls;
46
- var prefixCls = getPrefixCls('import2', props.prefixCls);
48
+ var prefixCls = getPrefixCls('', 'vtx-import2');
47
49
  var _useStyle = useStyle(prefixCls),
48
50
  wrapSSR = _useStyle.wrapSSR,
49
51
  hashId = _useStyle.hashId;
50
52
  var visible = props.visible,
51
53
  close = props.close,
52
54
  title = props.title,
53
- accept = props.accept,
54
- fileKey = props.fileKey,
55
+ _props$accept = props.accept,
56
+ accept = _props$accept === void 0 ? 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv' : _props$accept,
57
+ _props$fileKey = props.fileKey,
58
+ fileKey = _props$fileKey === void 0 ? 'file' : _props$fileKey,
55
59
  uploadURL = props.uploadURL,
56
- postData = props.postData,
60
+ _props$postData = props.postData,
61
+ postData = _props$postData === void 0 ? {} : _props$postData,
57
62
  errorURL = props.errorURL,
58
63
  templateURL = props.templateURL,
59
64
  afterUpload = props.afterUpload,
@@ -132,7 +137,7 @@ var VtxImport2 = function VtxImport2(props) {
132
137
  state = _useSet2[0],
133
138
  setState = _useSet2[1];
134
139
  var token = getToken();
135
- if (!token) {
140
+ if (props.token) {
136
141
  token = props.token;
137
142
  }
138
143
  var newErrorDownloadName = errorDownloadName;
@@ -147,7 +152,9 @@ var VtxImport2 = function VtxImport2(props) {
147
152
  }, interval);
148
153
  useEffect(function () {
149
154
  if (fileList.length !== 0) {
150
- fileName.current = getFileName(fileList[0].name);
155
+ fileName.current = getFileName(fileList[0].name, {
156
+ intl: intl
157
+ });
151
158
  }
152
159
  }, [fileList]);
153
160
 
@@ -202,6 +209,8 @@ var VtxImport2 = function VtxImport2(props) {
202
209
  };
203
210
  // 发送请求
204
211
  xhr.open('POST', '/cloudFile/common/uploadChunk', true);
212
+ xhr.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
213
+ xhr.setRequestHeader('access_token', token ? "".concat(token) : '');
205
214
  xhr.send(list[indexRef.current]);
206
215
  } else {
207
216
  mergeFile();
@@ -215,7 +224,7 @@ var VtxImport2 = function VtxImport2(props) {
215
224
  if (xhr.status === 200) {
216
225
  var res = JSON.parse(xhr.responseText);
217
226
  if ((res === null || res === void 0 ? void 0 : res.result) == 0) {
218
- message.success('上传成功');
227
+ message.success(intl.getMessage('import.success', '上传成功'));
219
228
  chunkUpload(res.data);
220
229
  } else {
221
230
  message.error((res === null || res === void 0 ? void 0 : res.msg) || intl.getMessage('import.error', '上传失败'));
@@ -227,6 +236,8 @@ var VtxImport2 = function VtxImport2(props) {
227
236
  };
228
237
  // 发送请求
229
238
  xhr.open('POST', '/cloudFile/common/mergeChunk', true);
239
+ xhr.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
240
+ xhr.setRequestHeader('access_token', token ? "".concat(token) : '');
230
241
  var data = new FormData();
231
242
  data.append('chunkId', state.chunkId);
232
243
  data.append('tenantId', getVtxToken('tenantId'));
@@ -247,6 +258,7 @@ var VtxImport2 = function VtxImport2(props) {
247
258
  }
248
259
  request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
249
260
  request.setRequestHeader('access_token', token ? "".concat(token) : '');
261
+ request.setRequestHeader('systemCode', getUrlParam('systemCode') ? getUrlParam('systemCode') : '');
250
262
  // 添加操作日志
251
263
  request.setRequestHeader('operation', encodeURIComponent(JSON.stringify({
252
264
  menuId: sessionStorage.getItem('vtxmenuselectedKeys'),
@@ -329,9 +341,9 @@ var VtxImport2 = function VtxImport2(props) {
329
341
  }
330
342
  }
331
343
  };
332
- var onUpload = function onUpload(_ref) {
333
- var _ref$files = _ref.files,
334
- files = _ref$files === void 0 ? fileList : _ref$files;
344
+ var onUpload = function onUpload(_ref2) {
345
+ var _ref2$files = _ref2.files,
346
+ files = _ref2$files === void 0 ? fileList : _ref2$files;
335
347
  if (typeof props.beforeUpload === 'function') {
336
348
  var flag = beforeUpload(files[0]);
337
349
  if (!flag) {
@@ -366,7 +378,10 @@ var VtxImport2 = function VtxImport2(props) {
366
378
  var modelProps = {
367
379
  open: visible,
368
380
  width: width || 392,
369
- maskClosable: false,
381
+ // maskClosable: false,
382
+ mask: {
383
+ closable: false
384
+ },
370
385
  footer: [/*#__PURE__*/_jsx(Button, {
371
386
  onClick: close,
372
387
  children: "".concat(TextEnum.btnCloseText).concat(status === 1 && result ? '(' + countdown + ')' : '')
@@ -388,7 +403,7 @@ var VtxImport2 = function VtxImport2(props) {
388
403
  })]
389
404
  })
390
405
  };
391
- return wrapSSR( /*#__PURE__*/_jsxs(Modal, _objectSpread(_objectSpread({}, modelProps), {}, {
406
+ return wrapSSR( /*#__PURE__*/_jsxs(VtxModal, _objectSpread(_objectSpread({}, modelProps), {}, {
392
407
  children: [status === 0 ? /*#__PURE__*/_jsx(Content, {
393
408
  prefixCls: prefixCls,
394
409
  fileList: fileList,
@@ -422,11 +437,6 @@ var VtxImport2 = function VtxImport2(props) {
422
437
  })]
423
438
  })));
424
439
  };
425
- VtxImport2.defaultProps = {
426
- fileKey: 'file',
427
- accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
428
- postData: {}
429
- };
430
440
  VtxImport2.propTypes = {
431
441
  visible: PropTypes.bool,
432
442
  templateURL: PropTypes.string,
@@ -447,7 +457,8 @@ VtxImport2.propTypes = {
447
457
  beforeUpload: PropTypes.func,
448
458
  chunkSize: PropTypes.number,
449
459
  width: PropTypes.number,
450
- extraDom: [PropTypes.string, PropTypes.node]
460
+ // extraDom: [PropTypes.string, PropTypes.node],
461
+ extraDom: PropTypes.object
451
462
  };
452
463
  export { VtxImport2 };
453
464
  export default VtxImport2;
@@ -7,7 +7,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
7
7
  import { useStyle as useAntdStyle } from "../../vtx-provider";
8
8
  var genVtxImport2Style = function genVtxImport2Style(token) {
9
9
  var componentCls = token.componentCls;
10
- return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&-modal-header-title', {
10
+ return _defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&-modal-header-title', {
11
11
  color: token.colorText
12
12
  }), '&-modal-header-text', {
13
13
  fontWeight: '400'
@@ -25,8 +25,8 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
25
25
  height: '80px',
26
26
  padding: '16px 16px 16px 48px',
27
27
  color: token.colorPrimary,
28
- fontSize: '14px',
29
- backgroundColor: token.colorBgLayout,
28
+ fontSize: 14,
29
+ backgroundColor: token.colorBgLayoutTable,
30
30
  borderRadius: '4px'
31
31
  }, "".concat(componentCls, "-download"), {
32
32
  marginLeft: '16px'
@@ -48,7 +48,58 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
48
48
  display: 'flex',
49
49
  alignItems: 'center',
50
50
  justifyContent: 'space-between',
51
- color: 'fade(@black, 65%)'
51
+ color: token.colorTextSecondary
52
+ }, "".concat(componentCls, "-file-name"), {
53
+ overflow: 'hidden',
54
+ whiteSpace: 'nowrap',
55
+ textOverflow: 'ellipsis'
56
+ }))), '&:last-child ', {
57
+ marginTop: '20px'
58
+ }), "".concat(componentCls, "-content-mark"), {
59
+ position: 'absolute',
60
+ top: 0,
61
+ left: 0,
62
+ display: 'flex',
63
+ alignItems: 'center',
64
+ justifyContent: 'center',
65
+ width: '28px',
66
+ height: '22px',
67
+ color: '#fff',
68
+ backgroundColor: token.colorPrimary,
69
+ border: "1px solid ".concat(token.colorPrimary),
70
+ borderRadius: '4px 0',
71
+ opacity: 0.6
72
+ }))), "".concat(componentCls, "-content-box"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
73
+ position: 'relative',
74
+ display: 'flex',
75
+ alignItems: 'center',
76
+ height: '80px',
77
+ padding: '16px 16px 16px 48px',
78
+ color: token.colorPrimary,
79
+ fontSize: 14,
80
+ backgroundColor: token.colorBgLayoutTable,
81
+ borderRadius: '4px'
82
+ }, "".concat(componentCls, "-download"), {
83
+ marginLeft: '16px'
84
+ }), "".concat(componentCls, "-file-list"), _defineProperty(_defineProperty({
85
+ display: 'flex',
86
+ flexDirection: 'column',
87
+ justifyContent: 'space-between',
88
+ width: '100%',
89
+ marginLeft: '16px',
90
+ overflow: 'hidden',
91
+ whiteSpace: 'nowrap',
92
+ textOverflow: 'ellipsis'
93
+ }, "".concat(componentCls, "-text"), {
94
+ cursor: 'pointer',
95
+ overflowRrap: 'break-word',
96
+ wordBreak: 'break-all',
97
+ whiteSpace: 'pre-wrap'
98
+ }), "".concat(componentCls, "-file-item"), _defineProperty({
99
+ display: 'flex',
100
+ alignItems: 'center',
101
+ justifyContent: 'space-between',
102
+ color: token.colorBase
52
103
  }, "".concat(componentCls, "-file-name"), {
53
104
  overflow: 'hidden',
54
105
  whiteSpace: 'nowrap',
@@ -77,17 +128,17 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
77
128
  }, "".concat(componentCls, "-result"), {
78
129
  marginTop: '20px',
79
130
  marginBottom: '12px',
80
- color: 'fade(@black, 85%)',
131
+ color: token.colorText,
81
132
  fontWeight: '700',
82
133
  fontSize: '24px'
83
134
  }), "&-success-tips", {
84
- color: 'fade(@black, 45%)',
85
- fontSize: '14px'
135
+ color: token.colorTextSecondary,
136
+ fontSize: 14
86
137
  }), "&-error-tips", {
87
138
  color: token.colorPrimary,
88
- fontSize: '14px',
139
+ fontSize: 14,
89
140
  cursor: 'pointer'
90
- })));
141
+ }));
91
142
  };
92
143
  export function useStyle(prefixCls) {
93
144
  return useAntdStyle('VtxImport2', function (token) {
@@ -45,12 +45,17 @@ var TextArea = /*#__PURE__*/forwardRef(function (props, ref) {
45
45
  }));
46
46
 
47
47
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
48
- showCount && 'value' in props && (render = /*#__PURE__*/_jsx("div", {
49
- className: classnames(prefixCls, hashId),
50
- "data-count": "".concat(len, "/").concat(maxLength),
51
- children: render
52
- }));
53
- return wrapSSR(render);
48
+ var wrapper = null;
49
+ if (showCount && 'value' in props) {
50
+ wrapper = function wrapper(element) {
51
+ return /*#__PURE__*/_jsx("div", {
52
+ className: classnames(prefixCls, hashId),
53
+ "data-count": "".concat(len, "/").concat(maxLength),
54
+ children: element
55
+ });
56
+ };
57
+ }
58
+ return wrapSSR(wrapper ? wrapper(render) : render);
54
59
  });
55
60
  export default TextArea;
56
61
  TextArea.propTypes = {
@@ -134,8 +134,8 @@ function VtxModal(props) {
134
134
  }
135
135
  };
136
136
 
137
- /*
138
- *重写title,加入对话框全屏功能
137
+ /*
138
+ *重写title,加入对话框全屏功能
139
139
  */
140
140
  title = function renderTitle() {
141
141
  if (typeof title == 'string' && title.indexOf('>') > -1) {
@@ -195,15 +195,20 @@ function VtxModal(props) {
195
195
  destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
196
196
  };
197
197
  var newProps = _objectSpread(_objectSpread(_objectSpread({
198
- maskClosable: false,
199
- // destroyOnClose: true,
200
- width: 700
198
+ mask: {
199
+ closable: false
200
+ },
201
+ width: 700,
202
+ focusable: {
203
+ autoFocusButton: null,
204
+ focusTriggerAfterClose: true,
205
+ trap: false
206
+ }
201
207
  }, props), legacyProps), {}, {
202
208
  closable: false,
203
209
  open: open,
204
210
  title: title,
205
211
  wrapClassName: classnames(prefixCls, hashId, wrapClassName, _defineProperty({}, "".concat(prefixCls, "-maxClass"), isFull ? true : false), classId.current),
206
- // bodyStyle,
207
212
  onCancel: onCancel,
208
213
  style: _objectSpread(_objectSpread({}, props.style), isFull ? {} : transformStyle)
209
214
  });
@@ -19,11 +19,13 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
19
19
  padding: 0
20
20
  },
21
21
  '.ant-modal-body': {
22
- maxHeight: 'calc(100% - 108px)',
22
+ height: 'calc(100% - 108px)',
23
23
  padding: '12px 20px 8px 20px',
24
- overflowY: 'auto',
25
- height: '100%'
24
+ overflowY: 'auto'
26
25
  }
26
+ },
27
+ '.ant-modal-container': {
28
+ padding: 0
27
29
  }
28
30
  }
29
31
  }, '&-title', _defineProperty(_defineProperty(_defineProperty({
@@ -1,5 +1,5 @@
1
- /**
2
- * 基础布局
1
+ /**
2
+ * 基础布局
3
3
  */
4
4
  import PropTypes from 'prop-types';
5
5
  import { useContext } from 'react';
@@ -19,7 +19,7 @@ function Content(props) {
19
19
  height = props.height;
20
20
  var contentClass = classnames(_defineProperty(_defineProperty(_defineProperty({}, 'vtx-page-content-absolute', !relative), 'vtx-page-content-relative', relative), 'vtx-page-content-scroll-y', scrollY), className);
21
21
  var newStyle = style;
22
- if ('height' in props) {
22
+ if (height !== undefined) {
23
23
  newStyle = _objectSpread(_objectSpread({}, newStyle), {}, {
24
24
  height: height
25
25
  });
@@ -1,9 +1,3 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
1
  import { ConfigProvider } from 'antd';
8
2
  import classsnames from 'classnames';
9
3
  import PropTypes from 'prop-types';
@@ -11,9 +5,9 @@ import { useContext } from 'react';
11
5
  import { useStyle } from "./style";
12
6
  import { VtxProvider } from "../vtx-provider";
13
7
 
14
- /**
15
- * 页面
16
- * @param {*} props
8
+ /**
9
+ * 页面
10
+ * @param {*} props
17
11
  */
18
12
  import { jsx as _jsx } from "react/jsx-runtime";
19
13
  var Page = function Page(props) {
@@ -35,9 +29,9 @@ Page.propTypes = {
35
29
  children: PropTypes.node
36
30
  };
37
31
 
38
- /**
39
- * 内容
40
- * @param {*} props
32
+ /**
33
+ * 内容
34
+ * @param {*} props
41
35
  */
42
36
  var Content = function Content(props) {
43
37
  var className = props.className,
@@ -50,7 +44,7 @@ var Content = function Content(props) {
50
44
  hashId = _useStyle2.hashId;
51
45
  return wrapSSR( /*#__PURE__*/_jsx("div", {
52
46
  className: classsnames("".concat(prefix, "-tab-content"), className, hashId),
53
- style: _objectSpread({}, style),
47
+ style: style,
54
48
  children: props.children
55
49
  }));
56
50
  };
@@ -24,9 +24,9 @@ var pagePaddingTop = 20;
24
24
  var searchMarginBottom = 20;
25
25
 
26
26
  // eslint-disable-next-line valid-jsdoc
27
- /**
28
- * 页面
29
- * @param {*} props
27
+ /**
28
+ * 页面
29
+ * @param {*} props
30
30
  */
31
31
  var Page = function Page(props) {
32
32
  var _useContext = useContext(VtxProvider),
@@ -74,17 +74,17 @@ Page.propTypes = {
74
74
  onSearchCollapse: PropTypes.func
75
75
  };
76
76
 
77
- /**
78
- * 搜索
77
+ /**
78
+ * 搜索
79
79
  */
80
80
  var Search = container({
81
81
  componentClass: 'vtx-page-table-search'
82
82
  })(Basic);
83
83
 
84
84
  // eslint-disable-next-line valid-jsdoc
85
- /**
86
- * 内容
87
- * @param {*} props
85
+ /**
86
+ * 内容
87
+ * @param {*} props
88
88
  */
89
89
  var Content = function Content(props) {
90
90
  var className = props.className,
@@ -119,20 +119,30 @@ Content.propTypes = {
119
119
  };
120
120
 
121
121
  // eslint-disable-next-line valid-jsdoc
122
- /**
123
- * 表格布局
122
+ /**
123
+ * 表格布局
124
124
  */
125
125
  var Table = function Table(props) {
126
126
  var className = props.className,
127
- style = props.style;
127
+ style = props.style,
128
+ children = props.children;
128
129
  var _useContext3 = useContext(StoreCtx),
129
130
  searchCollapseEvent$ = _useContext3.searchCollapseEvent$;
131
+
132
+ // 安全检查:如果不是有效的 React 元素,直接渲染不注入 props
133
+ if (! /*#__PURE__*/React.isValidElement(children)) {
134
+ return /*#__PURE__*/_jsx("div", {
135
+ className: classsnames('vtx-page-table-wrap', className),
136
+ style: style,
137
+ children: children
138
+ });
139
+ }
130
140
  return /*#__PURE__*/_jsx("div", {
131
- className: classsnames('vtx-page-table-wrap', className ? className : ''),
141
+ className: classsnames('vtx-page-table-wrap', className),
132
142
  style: style,
133
- children: /*#__PURE__*/React.cloneElement(props.children, _objectSpread(_objectSpread({}, props.children.props), {}, {
143
+ children: /*#__PURE__*/React.cloneElement(children, {
134
144
  searchCollapseEvent$: searchCollapseEvent$
135
- }))
145
+ })
136
146
  });
137
147
  };
138
148
  Table.propTypes = {
@@ -12,7 +12,8 @@ function TableWrap(props) {
12
12
  var relative = props.relative,
13
13
  height = props.height,
14
14
  style = props.style,
15
- className = props.className;
15
+ className = props.className,
16
+ children = props.children;
16
17
  var tableClass = classnames(_defineProperty(_defineProperty({}, 'vtx-table-wrapper-absolute', !relative), 'vtx-table-wrapper-relative', relative), className);
17
18
  var newStyle = style;
18
19
  if (relative && 'height' in props) {
@@ -23,7 +24,7 @@ function TableWrap(props) {
23
24
  return /*#__PURE__*/_jsx("div", {
24
25
  className: tableClass,
25
26
  style: newStyle,
26
- children: props.children
27
+ children: children
27
28
  });
28
29
  }
29
30
  export default TableWrap;
@@ -1,18 +1,12 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
1
  import classsnames from 'classnames';
8
2
  import PropTypes from 'prop-types';
9
3
  import { useContext } from 'react';
10
4
  import { useStyle } from "./style";
11
5
  import { VtxProvider } from "../vtx-provider";
12
6
 
13
- /**
14
- * 页面
15
- * @param {*} props
7
+ /**
8
+ * 页面
9
+ * @param {*} props
16
10
  */
17
11
  import { jsx as _jsx } from "react/jsx-runtime";
18
12
  var Page = function Page(props) {
@@ -34,9 +28,9 @@ Page.propTypes = {
34
28
  children: PropTypes.node
35
29
  };
36
30
 
37
- /**
38
- * 内容
39
- * @param {*} props
31
+ /**
32
+ * 内容
33
+ * @param {*} props
40
34
  */
41
35
  var Content = function Content(props) {
42
36
  var className = props.className,
@@ -49,7 +43,7 @@ var Content = function Content(props) {
49
43
  hashId = _useStyle2.hashId;
50
44
  return wrapSSR( /*#__PURE__*/_jsx("div", {
51
45
  className: classsnames("".concat(prefix, "-tree-content"), className, hashId),
52
- style: _objectSpread({}, style),
46
+ style: style,
53
47
  children: props.children
54
48
  }));
55
49
  };
@@ -62,7 +56,7 @@ var Tree = function Tree(props) {
62
56
  var className = props.className,
63
57
  style = props.style;
64
58
  return /*#__PURE__*/_jsx("div", {
65
- className: classsnames('vtx-page-tree-wrap', className ? className : ''),
59
+ className: classsnames('vtx-page-tree-wrap', className),
66
60
  style: style,
67
61
  children: props.children
68
62
  });
@@ -14,8 +14,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14
14
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
16
16
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
- /**
18
- * 高阶组件
17
+ /**
18
+ * 高阶组件
19
19
  */
20
20
  import React from 'react';
21
21
  import PropTypes from 'prop-types';
@@ -44,11 +44,12 @@ function Container() {
44
44
  className = _this$props.className,
45
45
  top = _this$props.top,
46
46
  space = _this$props.space;
47
- var wrapClass = classnames(_defineProperty({}, componentClass, true), className);
48
- var newStyle = _objectSpread({
49
- top: top,
47
+ var wrapClass = classnames(_defineProperty({}, componentClass, !!componentClass), className);
48
+ var newStyle = _objectSpread(_objectSpread(_objectSpread({}, top !== undefined && {
49
+ top: top
50
+ }), space !== undefined && {
50
51
  padding: space
51
- }, style);
52
+ }), style);
52
53
  var newProps = {
53
54
  className: wrapClass,
54
55
  style: newStyle
@@ -59,7 +60,7 @@ function Container() {
59
60
  return HOC;
60
61
  }(React.Component), _defineProperty(_class, "displayName", "HOC(".concat(getDisplayName(WrappedComponend), ")")), _defineProperty(_class, "propTypes", {
61
62
  top: PropTypes.number,
62
- space: PropTypes.number || PropTypes.string,
63
+ space: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
63
64
  style: PropTypes.object,
64
65
  className: PropTypes.string
65
66
  }), _class;
@@ -96,7 +96,7 @@ var genVtxStyle = function genVtxStyle(token) {
96
96
  '&-wrap': _objectSpread(_objectSpread({}, absolute()), {}, {
97
97
  backgroundColor: token.colorBgContainer,
98
98
  borderRadius: token.borderRadiusLG,
99
- padding: '0 20px'
99
+ padding: '0 20px 20px 20px'
100
100
  }),
101
101
  '&-card': {
102
102
  background: token.colorBgContainer,
@@ -109,7 +109,9 @@ var genVtxStyle = function genVtxStyle(token) {
109
109
  '&-left': _defineProperty(_defineProperty({}, "".concat(componentCls, "-ztree-search"), {
110
110
  right: 0
111
111
  }), '.ant-vtx-tree-wraaper', {})
112
- })), "".concat(componentCls, "-button-wrap"), _defineProperty({}, "button + button", {
112
+ })), "".concat(componentCls, "-button-wrap"), _defineProperty(_defineProperty({}, "button + button", {
113
+ marginLeft: 8
114
+ }), "button + .vtx-export-async", {
113
115
  marginLeft: 8
114
116
  }));
115
117
  };