@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
@@ -18,6 +18,7 @@ var _utils = require("@vtx/utils");
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
  var _index = require("./style/index");
20
20
  var _vtxProvider = require("../vtx-provider");
21
+ var _vtxModal = _interopRequireDefault(require("../vtx-modal"));
21
22
  var _jsxRuntime = require("react/jsx-runtime");
22
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
24
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -40,7 +41,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
40
41
  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); }
41
42
  function getFileName() {
42
43
  var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
43
- var intl = (0, _vtxProvider.useIntl)();
44
+ var _ref = arguments.length > 1 ? arguments[1] : undefined,
45
+ intl = _ref.intl;
44
46
  var index = name.lastIndexOf('.');
45
47
  var suffix = name.substring(index);
46
48
  return name.substring(0, index) + "(".concat(intl.getMessage('import.errorFile', '错误文件'), ")") + suffix;
@@ -49,17 +51,20 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
49
51
  var intl = (0, _vtxProvider.useIntl)();
50
52
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
51
53
  getPrefixCls = _useContext.getPrefixCls;
52
- var prefixCls = getPrefixCls('import2', props.prefixCls);
54
+ var prefixCls = getPrefixCls('', 'vtx-import2');
53
55
  var _useStyle = (0, _index.useStyle)(prefixCls),
54
56
  wrapSSR = _useStyle.wrapSSR,
55
57
  hashId = _useStyle.hashId;
56
58
  var visible = props.visible,
57
59
  close = props.close,
58
60
  title = props.title,
59
- accept = props.accept,
60
- fileKey = props.fileKey,
61
+ _props$accept = props.accept,
62
+ accept = _props$accept === void 0 ? 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv' : _props$accept,
63
+ _props$fileKey = props.fileKey,
64
+ fileKey = _props$fileKey === void 0 ? 'file' : _props$fileKey,
61
65
  uploadURL = props.uploadURL,
62
- postData = props.postData,
66
+ _props$postData = props.postData,
67
+ postData = _props$postData === void 0 ? {} : _props$postData,
63
68
  errorURL = props.errorURL,
64
69
  templateURL = props.templateURL,
65
70
  afterUpload = props.afterUpload,
@@ -138,7 +143,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
138
143
  state = _useSet2[0],
139
144
  setState = _useSet2[1];
140
145
  var token = (0, _getToken.default)();
141
- if (!token) {
146
+ if (props.token) {
142
147
  token = props.token;
143
148
  }
144
149
  var newErrorDownloadName = errorDownloadName;
@@ -153,7 +158,9 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
153
158
  }, interval);
154
159
  (0, _react.useEffect)(function () {
155
160
  if (fileList.length !== 0) {
156
- fileName.current = getFileName(fileList[0].name);
161
+ fileName.current = getFileName(fileList[0].name, {
162
+ intl: intl
163
+ });
157
164
  }
158
165
  }, [fileList]);
159
166
 
@@ -208,6 +215,8 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
208
215
  };
209
216
  // 发送请求
210
217
  xhr.open('POST', '/cloudFile/common/uploadChunk', true);
218
+ xhr.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
219
+ xhr.setRequestHeader('access_token', token ? "".concat(token) : '');
211
220
  xhr.send(list[indexRef.current]);
212
221
  } else {
213
222
  mergeFile();
@@ -221,7 +230,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
221
230
  if (xhr.status === 200) {
222
231
  var res = JSON.parse(xhr.responseText);
223
232
  if ((res === null || res === void 0 ? void 0 : res.result) == 0) {
224
- _antd.message.success('上传成功');
233
+ _antd.message.success(intl.getMessage('import.success', '上传成功'));
225
234
  chunkUpload(res.data);
226
235
  } else {
227
236
  _antd.message.error((res === null || res === void 0 ? void 0 : res.msg) || intl.getMessage('import.error', '上传失败'));
@@ -233,6 +242,8 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
233
242
  };
234
243
  // 发送请求
235
244
  xhr.open('POST', '/cloudFile/common/mergeChunk', true);
245
+ xhr.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
246
+ xhr.setRequestHeader('access_token', token ? "".concat(token) : '');
236
247
  var data = new FormData();
237
248
  data.append('chunkId', state.chunkId);
238
249
  data.append('tenantId', (0, _utils.getVtxToken)('tenantId'));
@@ -253,6 +264,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
253
264
  }
254
265
  request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
255
266
  request.setRequestHeader('access_token', token ? "".concat(token) : '');
267
+ request.setRequestHeader('systemCode', (0, _utils.getUrlParam)('systemCode') ? (0, _utils.getUrlParam)('systemCode') : '');
256
268
  // 添加操作日志
257
269
  request.setRequestHeader('operation', encodeURIComponent(JSON.stringify({
258
270
  menuId: sessionStorage.getItem('vtxmenuselectedKeys'),
@@ -335,9 +347,9 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
335
347
  }
336
348
  }
337
349
  };
338
- var onUpload = function onUpload(_ref) {
339
- var _ref$files = _ref.files,
340
- files = _ref$files === void 0 ? fileList : _ref$files;
350
+ var onUpload = function onUpload(_ref2) {
351
+ var _ref2$files = _ref2.files,
352
+ files = _ref2$files === void 0 ? fileList : _ref2$files;
341
353
  if (typeof props.beforeUpload === 'function') {
342
354
  var flag = beforeUpload(files[0]);
343
355
  if (!flag) {
@@ -372,7 +384,10 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
372
384
  var modelProps = {
373
385
  open: visible,
374
386
  width: width || 392,
375
- maskClosable: false,
387
+ // maskClosable: false,
388
+ mask: {
389
+ closable: false
390
+ },
376
391
  footer: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
377
392
  onClick: close,
378
393
  children: "".concat(TextEnum.btnCloseText).concat(status === 1 && result ? '(' + countdown + ')' : '')
@@ -394,7 +409,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
394
409
  })]
395
410
  })
396
411
  };
397
- return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Modal, _objectSpread(_objectSpread({}, modelProps), {}, {
412
+ return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_vtxModal.default, _objectSpread(_objectSpread({}, modelProps), {}, {
398
413
  children: [status === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Content.default, {
399
414
  prefixCls: prefixCls,
400
415
  fileList: fileList,
@@ -428,11 +443,6 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
428
443
  })]
429
444
  })));
430
445
  };
431
- VtxImport2.defaultProps = {
432
- fileKey: 'file',
433
- accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
434
- postData: {}
435
- };
436
446
  VtxImport2.propTypes = {
437
447
  visible: _propTypes.default.bool,
438
448
  templateURL: _propTypes.default.string,
@@ -453,6 +463,7 @@ VtxImport2.propTypes = {
453
463
  beforeUpload: _propTypes.default.func,
454
464
  chunkSize: _propTypes.default.number,
455
465
  width: _propTypes.default.number,
456
- extraDom: [_propTypes.default.string, _propTypes.default.node]
466
+ // extraDom: [PropTypes.string, PropTypes.node],
467
+ extraDom: _propTypes.default.object
457
468
  };
458
469
  var _default = exports.default = VtxImport2;
@@ -13,7 +13,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
13
13
  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); }
14
14
  var genVtxImport2Style = function genVtxImport2Style(token) {
15
15
  var componentCls = token.componentCls;
16
- return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&-modal-header-title', {
16
+ return _defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&-modal-header-title', {
17
17
  color: token.colorText
18
18
  }), '&-modal-header-text', {
19
19
  fontWeight: '400'
@@ -31,8 +31,8 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
31
31
  height: '80px',
32
32
  padding: '16px 16px 16px 48px',
33
33
  color: token.colorPrimary,
34
- fontSize: '14px',
35
- backgroundColor: token.colorBgLayout,
34
+ fontSize: 14,
35
+ backgroundColor: token.colorBgLayoutTable,
36
36
  borderRadius: '4px'
37
37
  }, "".concat(componentCls, "-download"), {
38
38
  marginLeft: '16px'
@@ -54,7 +54,58 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
54
54
  display: 'flex',
55
55
  alignItems: 'center',
56
56
  justifyContent: 'space-between',
57
- color: 'fade(@black, 65%)'
57
+ color: token.colorTextSecondary
58
+ }, "".concat(componentCls, "-file-name"), {
59
+ overflow: 'hidden',
60
+ whiteSpace: 'nowrap',
61
+ textOverflow: 'ellipsis'
62
+ }))), '&:last-child ', {
63
+ marginTop: '20px'
64
+ }), "".concat(componentCls, "-content-mark"), {
65
+ position: 'absolute',
66
+ top: 0,
67
+ left: 0,
68
+ display: 'flex',
69
+ alignItems: 'center',
70
+ justifyContent: 'center',
71
+ width: '28px',
72
+ height: '22px',
73
+ color: '#fff',
74
+ backgroundColor: token.colorPrimary,
75
+ border: "1px solid ".concat(token.colorPrimary),
76
+ borderRadius: '4px 0',
77
+ opacity: 0.6
78
+ }))), "".concat(componentCls, "-content-box"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
79
+ position: 'relative',
80
+ display: 'flex',
81
+ alignItems: 'center',
82
+ height: '80px',
83
+ padding: '16px 16px 16px 48px',
84
+ color: token.colorPrimary,
85
+ fontSize: 14,
86
+ backgroundColor: token.colorBgLayoutTable,
87
+ borderRadius: '4px'
88
+ }, "".concat(componentCls, "-download"), {
89
+ marginLeft: '16px'
90
+ }), "".concat(componentCls, "-file-list"), _defineProperty(_defineProperty({
91
+ display: 'flex',
92
+ flexDirection: 'column',
93
+ justifyContent: 'space-between',
94
+ width: '100%',
95
+ marginLeft: '16px',
96
+ overflow: 'hidden',
97
+ whiteSpace: 'nowrap',
98
+ textOverflow: 'ellipsis'
99
+ }, "".concat(componentCls, "-text"), {
100
+ cursor: 'pointer',
101
+ overflowRrap: 'break-word',
102
+ wordBreak: 'break-all',
103
+ whiteSpace: 'pre-wrap'
104
+ }), "".concat(componentCls, "-file-item"), _defineProperty({
105
+ display: 'flex',
106
+ alignItems: 'center',
107
+ justifyContent: 'space-between',
108
+ color: token.colorBase
58
109
  }, "".concat(componentCls, "-file-name"), {
59
110
  overflow: 'hidden',
60
111
  whiteSpace: 'nowrap',
@@ -83,17 +134,17 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
83
134
  }, "".concat(componentCls, "-result"), {
84
135
  marginTop: '20px',
85
136
  marginBottom: '12px',
86
- color: 'fade(@black, 85%)',
137
+ color: token.colorText,
87
138
  fontWeight: '700',
88
139
  fontSize: '24px'
89
140
  }), "&-success-tips", {
90
- color: 'fade(@black, 45%)',
91
- fontSize: '14px'
141
+ color: token.colorTextSecondary,
142
+ fontSize: 14
92
143
  }), "&-error-tips", {
93
144
  color: token.colorPrimary,
94
- fontSize: '14px',
145
+ fontSize: 14,
95
146
  cursor: 'pointer'
96
- })));
147
+ }));
97
148
  };
98
149
  function useStyle(prefixCls) {
99
150
  return (0, _vtxProvider.useStyle)('VtxImport2', function (token) {
@@ -54,12 +54,17 @@ var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
54
54
  }));
55
55
 
56
56
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
57
- showCount && 'value' in props && (render = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
58
- className: (0, _classnames.default)(prefixCls, hashId),
59
- "data-count": "".concat(len, "/").concat(maxLength),
60
- children: render
61
- }));
62
- return wrapSSR(render);
57
+ var wrapper = null;
58
+ if (showCount && 'value' in props) {
59
+ wrapper = function wrapper(element) {
60
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
61
+ className: (0, _classnames.default)(prefixCls, hashId),
62
+ "data-count": "".concat(len, "/").concat(maxLength),
63
+ children: element
64
+ });
65
+ };
66
+ }
67
+ return wrapSSR(wrapper ? wrapper(render) : render);
63
68
  });
64
69
  var _default = exports.default = TextArea;
65
70
  TextArea.propTypes = {
@@ -141,8 +141,8 @@ function VtxModal(props) {
141
141
  }
142
142
  };
143
143
 
144
- /*
145
- *重写title,加入对话框全屏功能
144
+ /*
145
+ *重写title,加入对话框全屏功能
146
146
  */
147
147
  title = function renderTitle() {
148
148
  if (typeof title == 'string' && title.indexOf('>') > -1) {
@@ -202,15 +202,20 @@ function VtxModal(props) {
202
202
  destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
203
203
  };
204
204
  var newProps = _objectSpread(_objectSpread(_objectSpread({
205
- maskClosable: false,
206
- // destroyOnClose: true,
207
- width: 700
205
+ mask: {
206
+ closable: false
207
+ },
208
+ width: 700,
209
+ focusable: {
210
+ autoFocusButton: null,
211
+ focusTriggerAfterClose: true,
212
+ trap: false
213
+ }
208
214
  }, props), legacyProps), {}, {
209
215
  closable: false,
210
216
  open: open,
211
217
  title: title,
212
218
  wrapClassName: (0, _classnames2.default)(prefixCls, hashId, wrapClassName, _defineProperty({}, "".concat(prefixCls, "-maxClass"), isFull ? true : false), classId.current),
213
- // bodyStyle,
214
219
  onCancel: onCancel,
215
220
  style: _objectSpread(_objectSpread({}, props.style), isFull ? {} : transformStyle)
216
221
  });
@@ -25,11 +25,13 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
25
25
  padding: 0
26
26
  },
27
27
  '.ant-modal-body': {
28
- maxHeight: 'calc(100% - 108px)',
28
+ height: 'calc(100% - 108px)',
29
29
  padding: '12px 20px 8px 20px',
30
- overflowY: 'auto',
31
- height: '100%'
30
+ overflowY: 'auto'
32
31
  }
32
+ },
33
+ '.ant-modal-container': {
34
+ padding: 0
33
35
  }
34
36
  }
35
37
  }, '&-title', _defineProperty(_defineProperty(_defineProperty({
@@ -10,8 +10,8 @@ var _style = require("./style");
10
10
  var _vtxProvider = require("../vtx-provider");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- /**
14
- * 基础布局
13
+ /**
14
+ * 基础布局
15
15
  */
16
16
 
17
17
  function Basic(props) {
@@ -26,7 +26,7 @@ function Content(props) {
26
26
  height = props.height;
27
27
  var contentClass = (0, _classnames2.default)(_defineProperty(_defineProperty(_defineProperty({}, 'vtx-page-content-absolute', !relative), 'vtx-page-content-relative', relative), 'vtx-page-content-scroll-y', scrollY), className);
28
28
  var newStyle = style;
29
- if ('height' in props) {
29
+ if (height !== undefined) {
30
30
  newStyle = _objectSpread(_objectSpread({}, newStyle), {}, {
31
31
  height: height
32
32
  });
@@ -12,16 +12,10 @@ var _style = require("./style");
12
12
  var _vtxProvider = require("../vtx-provider");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- 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); }
16
- 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; }
17
- 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; }
18
- 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; }
19
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
20
- 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); } /**
21
- * 页面
22
- * @param {*} props
23
- */
24
- var Page = function Page(props) {
15
+ /**
16
+ * 页面
17
+ * @param {*} props
18
+ */var Page = function Page(props) {
25
19
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
26
20
  getPrefixCls = _useContext.getPrefixCls;
27
21
  var prefix = getPrefixCls('page', props.prefixCls);
@@ -40,9 +34,9 @@ Page.propTypes = {
40
34
  children: _propTypes.default.node
41
35
  };
42
36
 
43
- /**
44
- * 内容
45
- * @param {*} props
37
+ /**
38
+ * 内容
39
+ * @param {*} props
46
40
  */
47
41
  var Content = function Content(props) {
48
42
  var className = props.className,
@@ -55,7 +49,7 @@ var Content = function Content(props) {
55
49
  hashId = _useStyle2.hashId;
56
50
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
57
51
  className: (0, _classnames.default)("".concat(prefix, "-tab-content"), className, hashId),
58
- style: _objectSpread({}, style),
52
+ style: style,
59
53
  children: props.children
60
54
  }));
61
55
  };
@@ -33,9 +33,9 @@ var pagePaddingTop = 20;
33
33
  var searchMarginBottom = 20;
34
34
 
35
35
  // eslint-disable-next-line valid-jsdoc
36
- /**
37
- * 页面
38
- * @param {*} props
36
+ /**
37
+ * 页面
38
+ * @param {*} props
39
39
  */
40
40
  var Page = function Page(props) {
41
41
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
@@ -83,17 +83,17 @@ Page.propTypes = {
83
83
  onSearchCollapse: _propTypes.default.func
84
84
  };
85
85
 
86
- /**
87
- * 搜索
86
+ /**
87
+ * 搜索
88
88
  */
89
89
  var Search = (0, _container.default)({
90
90
  componentClass: 'vtx-page-table-search'
91
91
  })(_Basic.default);
92
92
 
93
93
  // eslint-disable-next-line valid-jsdoc
94
- /**
95
- * 内容
96
- * @param {*} props
94
+ /**
95
+ * 内容
96
+ * @param {*} props
97
97
  */
98
98
  var Content = function Content(props) {
99
99
  var className = props.className,
@@ -128,20 +128,30 @@ Content.propTypes = {
128
128
  };
129
129
 
130
130
  // eslint-disable-next-line valid-jsdoc
131
- /**
132
- * 表格布局
131
+ /**
132
+ * 表格布局
133
133
  */
134
134
  var Table = function Table(props) {
135
135
  var className = props.className,
136
- style = props.style;
136
+ style = props.style,
137
+ children = props.children;
137
138
  var _useContext3 = (0, _react.useContext)(StoreCtx),
138
139
  searchCollapseEvent$ = _useContext3.searchCollapseEvent$;
140
+
141
+ // 安全检查:如果不是有效的 React 元素,直接渲染不注入 props
142
+ if (! /*#__PURE__*/_react.default.isValidElement(children)) {
143
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
144
+ className: (0, _classnames.default)('vtx-page-table-wrap', className),
145
+ style: style,
146
+ children: children
147
+ });
148
+ }
139
149
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
140
- className: (0, _classnames.default)('vtx-page-table-wrap', className ? className : ''),
150
+ className: (0, _classnames.default)('vtx-page-table-wrap', className),
141
151
  style: style,
142
- children: /*#__PURE__*/_react.default.cloneElement(props.children, _objectSpread(_objectSpread({}, props.children.props), {}, {
152
+ children: /*#__PURE__*/_react.default.cloneElement(children, {
143
153
  searchCollapseEvent$: searchCollapseEvent$
144
- }))
154
+ })
145
155
  });
146
156
  };
147
157
  Table.propTypes = {
@@ -19,7 +19,8 @@ function TableWrap(props) {
19
19
  var relative = props.relative,
20
20
  height = props.height,
21
21
  style = props.style,
22
- className = props.className;
22
+ className = props.className,
23
+ children = props.children;
23
24
  var tableClass = (0, _classnames2.default)(_defineProperty(_defineProperty({}, 'vtx-table-wrapper-absolute', !relative), 'vtx-table-wrapper-relative', relative), className);
24
25
  var newStyle = style;
25
26
  if (relative && 'height' in props) {
@@ -30,7 +31,7 @@ function TableWrap(props) {
30
31
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
31
32
  className: tableClass,
32
33
  style: newStyle,
33
- children: props.children
34
+ children: children
34
35
  });
35
36
  }
36
37
  var _default = exports.default = TableWrap;
@@ -11,16 +11,10 @@ var _style = require("./style");
11
11
  var _vtxProvider = require("../vtx-provider");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- 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); }
15
- 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; }
16
- 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; }
17
- 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; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
- 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); } /**
20
- * 页面
21
- * @param {*} props
22
- */
23
- var Page = function Page(props) {
14
+ /**
15
+ * 页面
16
+ * @param {*} props
17
+ */var Page = function Page(props) {
24
18
  var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
25
19
  getPrefixCls = _useContext.getPrefixCls;
26
20
  var prefix = getPrefixCls('page', props.prefixCls);
@@ -39,9 +33,9 @@ Page.propTypes = {
39
33
  children: _propTypes.default.node
40
34
  };
41
35
 
42
- /**
43
- * 内容
44
- * @param {*} props
36
+ /**
37
+ * 内容
38
+ * @param {*} props
45
39
  */
46
40
  var Content = function Content(props) {
47
41
  var className = props.className,
@@ -54,7 +48,7 @@ var Content = function Content(props) {
54
48
  hashId = _useStyle2.hashId;
55
49
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
56
50
  className: (0, _classnames.default)("".concat(prefix, "-tree-content"), className, hashId),
57
- style: _objectSpread({}, style),
51
+ style: style,
58
52
  children: props.children
59
53
  }));
60
54
  };
@@ -67,7 +61,7 @@ var Tree = function Tree(props) {
67
61
  var className = props.className,
68
62
  style = props.style;
69
63
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
70
- className: (0, _classnames.default)('vtx-page-tree-wrap', className ? className : ''),
64
+ className: (0, _classnames.default)('vtx-page-tree-wrap', className),
71
65
  style: style,
72
66
  children: props.children
73
67
  });
@@ -24,8 +24,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
24
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
25
  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; }
26
26
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
27
- 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); } /**
28
- * 高阶组件
27
+ 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); } /**
28
+ * 高阶组件
29
29
  */
30
30
  function getDisplayName(WrappedComponend) {
31
31
  return WrappedComponend.displayName || WrappedComponend.name || 'Component';
@@ -50,11 +50,12 @@ function Container() {
50
50
  className = _this$props.className,
51
51
  top = _this$props.top,
52
52
  space = _this$props.space;
53
- var wrapClass = (0, _classnames2.default)(_defineProperty({}, componentClass, true), className);
54
- var newStyle = _objectSpread({
55
- top: top,
53
+ var wrapClass = (0, _classnames2.default)(_defineProperty({}, componentClass, !!componentClass), className);
54
+ var newStyle = _objectSpread(_objectSpread(_objectSpread({}, top !== undefined && {
55
+ top: top
56
+ }), space !== undefined && {
56
57
  padding: space
57
- }, style);
58
+ }), style);
58
59
  var newProps = {
59
60
  className: wrapClass,
60
61
  style: newStyle
@@ -65,7 +66,7 @@ function Container() {
65
66
  return HOC;
66
67
  }(_react.default.Component), _defineProperty(_class, "displayName", "HOC(".concat(getDisplayName(WrappedComponend), ")")), _defineProperty(_class, "propTypes", {
67
68
  top: _propTypes.default.number,
68
- space: _propTypes.default.number || _propTypes.default.string,
69
+ space: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
69
70
  style: _propTypes.default.object,
70
71
  className: _propTypes.default.string
71
72
  }), _class;
@@ -103,7 +103,7 @@ var genVtxStyle = function genVtxStyle(token) {
103
103
  '&-wrap': _objectSpread(_objectSpread({}, absolute()), {}, {
104
104
  backgroundColor: token.colorBgContainer,
105
105
  borderRadius: token.borderRadiusLG,
106
- padding: '0 20px'
106
+ padding: '0 20px 20px 20px'
107
107
  }),
108
108
  '&-card': {
109
109
  background: token.colorBgContainer,
@@ -116,7 +116,9 @@ var genVtxStyle = function genVtxStyle(token) {
116
116
  '&-left': _defineProperty(_defineProperty({}, "".concat(componentCls, "-ztree-search"), {
117
117
  right: 0
118
118
  }), '.ant-vtx-tree-wraaper', {})
119
- })), "".concat(componentCls, "-button-wrap"), _defineProperty({}, "button + button", {
119
+ })), "".concat(componentCls, "-button-wrap"), _defineProperty(_defineProperty({}, "button + button", {
120
+ marginLeft: 8
121
+ }), "button + .vtx-export-async", {
120
122
  marginLeft: 8
121
123
  }));
122
124
  };