@vtx/components 4.0.0-beta.9 → 4.0.0-beta.91

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 (190) 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 +6 -6
  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-combogrid/Combogrid.js +5 -4
  26. package/es/vtx-combogrid/index.js +7 -4
  27. package/es/vtx-datagrid/Store/Provide.js +109 -140
  28. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -6
  29. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  30. package/es/vtx-datagrid/ToolBar/index.js +2 -1
  31. package/es/vtx-datagrid/ToolBar/style.js +6 -3
  32. package/es/vtx-datagrid/columnState.js +91 -0
  33. package/es/vtx-datagrid/index.js +134 -37
  34. package/es/vtx-datagrid/mergeComponents.js +15 -0
  35. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  36. package/es/vtx-datagrid/style/index.js +108 -18
  37. package/es/vtx-datagrid/style/index.less +242 -242
  38. package/es/vtx-date-picker/QdatePicker.js +1 -1
  39. package/es/vtx-date-picker/style/index.less +39 -39
  40. package/es/vtx-descriptions/Descriptions.js +29 -0
  41. package/es/vtx-descriptions/index.js +3 -0
  42. package/es/vtx-descriptions/style/index.js +19 -0
  43. package/es/vtx-ellipsis-text/index.js +2 -2
  44. package/es/vtx-ellipsis-text/style/index.js +3 -1
  45. package/es/vtx-export/index.js +33 -38
  46. package/es/vtx-export-async/History.js +15 -7
  47. package/es/vtx-export-async/index.js +18 -8
  48. package/es/vtx-export-async/util.js +16 -5
  49. package/es/vtx-form-layout/FormItem.js +16 -16
  50. package/es/vtx-form-layout/style/index.js +6 -4
  51. package/es/vtx-icon/index.js +54 -45
  52. package/es/vtx-icon/index.js1 +90 -0
  53. package/es/vtx-image/style/index.js +0 -1
  54. package/es/vtx-import/index.js +143 -42
  55. package/es/vtx-import/result.js +28 -26
  56. package/es/vtx-import/style/index.js +16 -1
  57. package/es/vtx-import2/Content.js +2 -1
  58. package/es/vtx-import2/index.js +29 -19
  59. package/es/vtx-import2/style/index.js +59 -8
  60. package/es/vtx-modal/index.js +11 -6
  61. package/es/vtx-modal/style/index.js +5 -2
  62. package/es/vtx-page-layout/Basic.js +2 -2
  63. package/es/vtx-page-layout/TabLayout.js +6 -6
  64. package/es/vtx-page-layout/TableLayout.js +10 -10
  65. package/es/vtx-page-layout/TreeLayout.js +6 -6
  66. package/es/vtx-page-layout/container.js +2 -2
  67. package/es/vtx-page-layout/style/index.js +4 -2
  68. package/es/vtx-provider/index.js +33 -31
  69. package/es/vtx-provider/intl.js +9 -9
  70. package/es/vtx-provider/locale/en_GB.js +1 -1
  71. package/es/vtx-provider/locale/en_US.js +58 -4
  72. package/es/vtx-provider/locale/zh_CN.js +57 -3
  73. package/es/vtx-provider/useStyle/index.js +17 -17
  74. package/es/vtx-search/index.js +30 -12
  75. package/es/vtx-search/style/index.js +6 -3
  76. package/es/vtx-select/index.js +123 -40
  77. package/es/vtx-select/style/index.js +11 -56
  78. package/es/vtx-split-pane/Resizer.js +0 -1
  79. package/es/vtx-split-pane/SplitPane.js +42 -34
  80. package/es/vtx-split-pane/style/index.js +8 -112
  81. package/es/vtx-statistics-column/style/index.js +1 -1
  82. package/es/vtx-time-picker/index.js +27 -1
  83. package/es/vtx-transfer/Transfer.js +29 -0
  84. package/es/vtx-transfer/index.js +3 -0
  85. package/es/vtx-transfer/style/index.js +19 -0
  86. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  87. package/es/vtx-transfer-select/index.js +3 -0
  88. package/es/vtx-transfer-select/style/index.js +19 -0
  89. package/es/vtx-tree/index.js +27 -9
  90. package/es/vtx-tree-select/index.js +81 -110
  91. package/es/vtx-tree-select/style/index.js +9 -3
  92. package/es/vtx-upload/FilePreview.js +2 -1
  93. package/es/vtx-wang-editor/index.js +41 -32
  94. package/es/vtx-wang-editor/style/index.less +12 -12
  95. package/lib/index.js +36 -0
  96. package/lib/utils/components/LabelIconTip/index.js +7 -7
  97. package/lib/utils/conversionMomentValue/index.js +25 -25
  98. package/lib/utils/filterSpecialCharacters.js +6 -6
  99. package/lib/utils/genCopyable/index.js +6 -6
  100. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  101. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  102. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  103. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  104. package/lib/utils/hooks/useLatest/index.js +2 -2
  105. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  106. package/lib/utils/index.js +0 -7
  107. package/lib/utils/isBrowser/index.js +7 -7
  108. package/lib/utils/isUrl/index.js +4 -4
  109. package/lib/utils/merge/index.js +4 -4
  110. package/lib/utils/nanoid/index.js +4 -4
  111. package/lib/utils/omitBoolean/index.js +4 -4
  112. package/lib/utils/parseValueToMoment/index.js +4 -4
  113. package/lib/utils/proFieldParsingText/index.js +10 -10
  114. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  115. package/lib/utils/useEditableArray/index.js +46 -46
  116. package/lib/utils/useEditableMap/index.js +22 -22
  117. package/lib/utils/useMediaQuery/index.js +5 -5
  118. package/lib/vtx-combogrid/Combogrid.js +5 -4
  119. package/lib/vtx-combogrid/index.js +7 -4
  120. package/lib/vtx-datagrid/Store/Provide.js +112 -142
  121. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -6
  122. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  123. package/lib/vtx-datagrid/ToolBar/index.js +2 -1
  124. package/lib/vtx-datagrid/ToolBar/style.js +6 -3
  125. package/lib/vtx-datagrid/columnState.js +100 -0
  126. package/lib/vtx-datagrid/index.js +134 -37
  127. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  128. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  129. package/lib/vtx-datagrid/style/index.js +108 -18
  130. package/lib/vtx-datagrid/style/index.less +242 -242
  131. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  132. package/lib/vtx-date-picker/style/index.less +39 -39
  133. package/lib/vtx-descriptions/Descriptions.js +38 -0
  134. package/lib/vtx-descriptions/index.js +15 -0
  135. package/lib/vtx-descriptions/style/index.js +25 -0
  136. package/lib/vtx-ellipsis-text/index.js +2 -2
  137. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  138. package/lib/vtx-export/index.js +34 -39
  139. package/lib/vtx-export-async/History.js +14 -8
  140. package/lib/vtx-export-async/index.js +18 -8
  141. package/lib/vtx-export-async/util.js +16 -5
  142. package/lib/vtx-form-layout/FormItem.js +16 -16
  143. package/lib/vtx-form-layout/style/index.js +6 -4
  144. package/lib/vtx-icon/index.js +54 -52
  145. package/lib/vtx-icon/index.js1 +90 -0
  146. package/lib/vtx-image/style/index.js +0 -1
  147. package/lib/vtx-import/index.js +141 -43
  148. package/lib/vtx-import/result.js +29 -27
  149. package/lib/vtx-import/style/index.js +16 -1
  150. package/lib/vtx-import2/Content.js +2 -1
  151. package/lib/vtx-import2/index.js +29 -19
  152. package/lib/vtx-import2/style/index.js +59 -8
  153. package/lib/vtx-modal/index.js +11 -6
  154. package/lib/vtx-modal/style/index.js +5 -2
  155. package/lib/vtx-page-layout/Basic.js +2 -2
  156. package/lib/vtx-page-layout/TabLayout.js +6 -6
  157. package/lib/vtx-page-layout/TableLayout.js +10 -10
  158. package/lib/vtx-page-layout/TreeLayout.js +6 -6
  159. package/lib/vtx-page-layout/container.js +2 -2
  160. package/lib/vtx-page-layout/style/index.js +4 -2
  161. package/lib/vtx-provider/index.js +33 -31
  162. package/lib/vtx-provider/intl.js +9 -9
  163. package/lib/vtx-provider/locale/en_GB.js +1 -1
  164. package/lib/vtx-provider/locale/en_US.js +58 -4
  165. package/lib/vtx-provider/locale/zh_CN.js +57 -3
  166. package/lib/vtx-provider/useStyle/index.js +17 -17
  167. package/lib/vtx-search/index.js +32 -12
  168. package/lib/vtx-search/style/index.js +6 -3
  169. package/lib/vtx-select/index.js +125 -42
  170. package/lib/vtx-select/style/index.js +11 -56
  171. package/lib/vtx-split-pane/Resizer.js +0 -1
  172. package/lib/vtx-split-pane/SplitPane.js +40 -31
  173. package/lib/vtx-split-pane/style/index.js +8 -112
  174. package/lib/vtx-statistics-column/style/index.js +1 -1
  175. package/lib/vtx-time-picker/index.js +27 -1
  176. package/lib/vtx-transfer/Transfer.js +38 -0
  177. package/lib/vtx-transfer/index.js +15 -0
  178. package/lib/vtx-transfer/style/index.js +25 -0
  179. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  180. package/lib/vtx-transfer-select/index.js +15 -0
  181. package/lib/vtx-transfer-select/style/index.js +25 -0
  182. package/lib/vtx-tree/index.js +27 -9
  183. package/lib/vtx-tree-select/index.js +81 -112
  184. package/lib/vtx-tree-select/style/index.js +9 -3
  185. package/lib/vtx-upload/FilePreview.js +2 -1
  186. package/lib/vtx-wang-editor/index.js +39 -30
  187. package/lib/vtx-wang-editor/style/index.less +12 -12
  188. package/package.json +239 -238
  189. package/es/utils/hooks/useFetchData/index.js +0 -82
  190. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -1,24 +1,27 @@
1
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
2
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
5
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
6
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ 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; }
9
+ 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; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ 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); }
13
13
  import React from 'react';
14
14
  import { Modal, Button } from 'antd';
15
15
  import PropTypes from 'prop-types';
16
16
  import useSet from "../utils/useSet";
17
17
  import VtxDatagrid from "../vtx-datagrid";
18
- import { useIntl } from "../vtx-provider";
18
+ import VtxModal from "../vtx-modal";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  function VtxImportResult(props) {
21
- var intl = useIntl();
21
+ var TextEnum = _objectSpread({
22
+ resultTitleText: '导入结果',
23
+ btnCloseText: '关闭'
24
+ }, props.TextEnum);
22
25
  var _useSet = useSet({
23
26
  visible: props.visible || false,
24
27
  dataSource: props.dataSource || [],
@@ -28,47 +31,45 @@ function VtxImportResult(props) {
28
31
  _useSet2 = _slicedToArray(_useSet, 1),
29
32
  state = _useSet2[0];
30
33
  var modalProps = {
31
- bodyStyle: {
32
- backgroundColor: '#f8f8f8'
33
- },
34
+ bodyStyle: {},
34
35
  open: state.visible,
35
- title: intl.getMessage('import.result', '导入结果'),
36
+ title: TextEnum.resultTitleText,
36
37
  onCancel: function onCancel() {
37
38
  if (typeof props.hideVisible === 'function') {
38
39
  props.hideVisible();
39
40
  }
40
41
  },
41
42
  width: state.modalWidth,
42
- maskClosable: false,
43
+ // maskClosable: false,
44
+ mask: {
45
+ closable: false
46
+ },
43
47
  footer: [/*#__PURE__*/_jsx(Button, {
44
48
  onClick: function onClick() {
45
49
  if (typeof props.hideVisible === 'function') {
46
50
  props.hideVisible();
47
51
  }
48
52
  },
49
- children: intl.getMessage('switch.close', '关闭')
53
+ children: TextEnum.btnCloseText
50
54
  }, "closeWindow")]
51
55
  };
52
56
  var newTableProps = {
57
+ toolba: false,
53
58
  columns: state.columns,
54
59
  dataSource: state.dataSource,
55
60
  startIndex: 1,
56
61
  size: 'small',
57
62
  headFootHeight: 50,
58
63
  pagination: false,
59
- autoFit: false
64
+ autoFit: false,
65
+ scroll: {
66
+ y: 550
67
+ }
60
68
  };
61
- return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({}, modalProps), {}, {
62
- children: /*#__PURE__*/_jsx("div", {
63
- style: {
64
- maxHeight: 600,
65
- width: '100%',
66
- overflow: 'auto'
67
- },
68
- children: /*#__PURE__*/_jsx(VtxDatagrid, _objectSpread({
69
- toolbar: false
70
- }, newTableProps))
71
- })
69
+ return /*#__PURE__*/_jsx(VtxModal, _objectSpread(_objectSpread({}, modalProps), {}, {
70
+ children: /*#__PURE__*/_jsx(VtxDatagrid, _objectSpread({
71
+ toolbar: false
72
+ }, newTableProps))
72
73
  }));
73
74
  }
74
75
  VtxImportResult.propTypes = {
@@ -76,6 +77,7 @@ VtxImportResult.propTypes = {
76
77
  dataSource: PropTypes.array,
77
78
  columns: PropTypes.array,
78
79
  modalWidth: PropTypes.number,
79
- hideVisible: PropTypes.func
80
+ hideVisible: PropTypes.func,
81
+ TextEnum: PropTypes.object
80
82
  };
81
83
  export default VtxImportResult;
@@ -7,7 +7,22 @@ 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 genVtxImportStyle = function genVtxImportStyle(token) {
9
9
  var componentCls = token.componentCls;
10
- return _defineProperty({}, componentCls, {});
10
+ return _defineProperty({}, componentCls, _defineProperty({
11
+ '.ant-modal-container': {
12
+ padding: 0,
13
+ '.ant-modal-header': {
14
+ padding: 20
15
+ },
16
+ '.ant-modal-body': {
17
+ padding: 20
18
+ }
19
+ }
20
+ }, '&-btn', {
21
+ display: 'flex',
22
+ justifyContent: 'flex-start',
23
+ alignItems: 'center',
24
+ gap: 8
25
+ }));
11
26
  };
12
27
  export function useStyle(prefixCls) {
13
28
  return useAntdStyle('VtxImport', function (token) {
@@ -98,6 +98,7 @@ Content.propTypes = {
98
98
  customText: PropTypes.string,
99
99
  extraText: PropTypes.string,
100
100
  TextEnum: PropTypes.object,
101
- extraDom: [PropTypes.string, PropTypes.node]
101
+ // extraDom: [PropTypes.string, PropTypes.node],
102
+ extraDom: PropTypes.object
102
103
  };
103
104
  export default Content;
@@ -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();
@@ -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'));
@@ -330,9 +341,9 @@ var VtxImport2 = function VtxImport2(props) {
330
341
  }
331
342
  }
332
343
  };
333
- var onUpload = function onUpload(_ref) {
334
- var _ref$files = _ref.files,
335
- 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;
336
347
  if (typeof props.beforeUpload === 'function') {
337
348
  var flag = beforeUpload(files[0]);
338
349
  if (!flag) {
@@ -367,7 +378,10 @@ var VtxImport2 = function VtxImport2(props) {
367
378
  var modelProps = {
368
379
  open: visible,
369
380
  width: width || 392,
370
- maskClosable: false,
381
+ // maskClosable: false,
382
+ mask: {
383
+ closable: false
384
+ },
371
385
  footer: [/*#__PURE__*/_jsx(Button, {
372
386
  onClick: close,
373
387
  children: "".concat(TextEnum.btnCloseText).concat(status === 1 && result ? '(' + countdown + ')' : '')
@@ -389,7 +403,7 @@ var VtxImport2 = function VtxImport2(props) {
389
403
  })]
390
404
  })
391
405
  };
392
- return wrapSSR( /*#__PURE__*/_jsxs(Modal, _objectSpread(_objectSpread({}, modelProps), {}, {
406
+ return wrapSSR( /*#__PURE__*/_jsxs(VtxModal, _objectSpread(_objectSpread({}, modelProps), {}, {
393
407
  children: [status === 0 ? /*#__PURE__*/_jsx(Content, {
394
408
  prefixCls: prefixCls,
395
409
  fileList: fileList,
@@ -423,11 +437,6 @@ var VtxImport2 = function VtxImport2(props) {
423
437
  })]
424
438
  })));
425
439
  };
426
- VtxImport2.defaultProps = {
427
- fileKey: 'file',
428
- accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
429
- postData: {}
430
- };
431
440
  VtxImport2.propTypes = {
432
441
  visible: PropTypes.bool,
433
442
  templateURL: PropTypes.string,
@@ -448,7 +457,8 @@ VtxImport2.propTypes = {
448
457
  beforeUpload: PropTypes.func,
449
458
  chunkSize: PropTypes.number,
450
459
  width: PropTypes.number,
451
- extraDom: [PropTypes.string, PropTypes.node]
460
+ // extraDom: [PropTypes.string, PropTypes.node],
461
+ extraDom: PropTypes.object
452
462
  };
453
463
  export { VtxImport2 };
454
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,7 +25,7 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
25
25
  height: '80px',
26
26
  padding: '16px 16px 16px 48px',
27
27
  color: token.colorPrimary,
28
- fontSize: '14px',
28
+ fontSize: 14,
29
29
  backgroundColor: token.colorBgLayoutTable,
30
30
  borderRadius: '4px'
31
31
  }, "".concat(componentCls, "-download"), {
@@ -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) {
@@ -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
  });
@@ -31,7 +31,10 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
31
31
  }, '&-title', _defineProperty(_defineProperty(_defineProperty({
32
32
  position: 'relative',
33
33
  padding: '8px 20px',
34
- borderBottom: "1px solid ".concat(token.colorBorderSecondary)
34
+ borderBottom: "1px solid ".concat(token.colorBorderSecondary),
35
+ fontSize: '14px',
36
+ height: '40px',
37
+ boxSizing: 'border-box'
35
38
  }, "".concat(componentCls, "-title_name"), {
36
39
  width: '100%',
37
40
  color: token.colorText
@@ -39,7 +42,7 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
39
42
  position: 'absolute',
40
43
  top: '1px !important',
41
44
  right: '20px !important',
42
- 'span': {
45
+ span: {
43
46
  position: 'absolute',
44
47
  top: 0,
45
48
  right: 0,
@@ -1,5 +1,5 @@
1
- /**
2
- * 基础布局
1
+ /**
2
+ * 基础布局
3
3
  */
4
4
  import PropTypes from 'prop-types';
5
5
  import { useContext } from 'react';
@@ -5,9 +5,9 @@ import { useContext } from 'react';
5
5
  import { useStyle } from "./style";
6
6
  import { VtxProvider } from "../vtx-provider";
7
7
 
8
- /**
9
- * 页面
10
- * @param {*} props
8
+ /**
9
+ * 页面
10
+ * @param {*} props
11
11
  */
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  var Page = function Page(props) {
@@ -29,9 +29,9 @@ Page.propTypes = {
29
29
  children: PropTypes.node
30
30
  };
31
31
 
32
- /**
33
- * 内容
34
- * @param {*} props
32
+ /**
33
+ * 内容
34
+ * @param {*} props
35
35
  */
36
36
  var Content = function Content(props) {
37
37
  var className = props.className,
@@ -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,8 +119,8 @@ 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,
@@ -4,9 +4,9 @@ import { useContext } from 'react';
4
4
  import { useStyle } from "./style";
5
5
  import { VtxProvider } from "../vtx-provider";
6
6
 
7
- /**
8
- * 页面
9
- * @param {*} props
7
+ /**
8
+ * 页面
9
+ * @param {*} props
10
10
  */
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  var Page = function Page(props) {
@@ -28,9 +28,9 @@ Page.propTypes = {
28
28
  children: PropTypes.node
29
29
  };
30
30
 
31
- /**
32
- * 内容
33
- * @param {*} props
31
+ /**
32
+ * 内容
33
+ * @param {*} props
34
34
  */
35
35
  var Content = function Content(props) {
36
36
  var className = props.className,
@@ -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';
@@ -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
  };