@vtx/components 4.0.0-beta.8 → 4.0.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +3 -0
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/utils/index.js +1 -2
- package/es/vtx-combogrid/Combogrid.js +5 -4
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-datagrid/Store/Provide.js +106 -137
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/es/vtx-datagrid/columnState.js +91 -0
- package/es/vtx-datagrid/index.js +124 -32
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +102 -20
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- package/es/vtx-descriptions/Descriptions.js +29 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +7 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +25 -25
- package/es/vtx-export-async/History.js +11 -3
- package/es/vtx-export-async/index.js +45 -15
- package/es/vtx-export-async/util.js +16 -5
- package/es/vtx-form-layout/Card.js +10 -10
- package/es/vtx-form-layout/Divider.js +1 -1
- package/es/vtx-form-layout/FormItem.js +16 -16
- package/es/vtx-form-layout/Pane.js +23 -12
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/Preview.js +11 -6
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +207 -65
- package/es/vtx-import/result.js +28 -26
- package/es/vtx-import/style/index.js +16 -1
- package/es/vtx-import2/Content.js +2 -1
- package/es/vtx-import2/index.js +30 -19
- package/es/vtx-import2/style/index.js +60 -9
- package/es/vtx-modal/index.js +9 -4
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +7 -3
- package/es/vtx-provider/locale/en_US.js +57 -3
- package/es/vtx-provider/locale/zh_CN.js +57 -3
- package/es/vtx-search/index.js +13 -9
- package/es/vtx-search/style/index.js +2 -1
- package/es/vtx-select/index.js +102 -36
- package/es/vtx-select/style/index.js +11 -56
- package/es/vtx-signature/index.js +5 -4
- package/es/vtx-signature/style/index.js +1 -1
- package/es/vtx-split-pane/Resizer.js +0 -1
- package/es/vtx-split-pane/SplitPane.js +42 -34
- package/es/vtx-split-pane/style/index.js +8 -112
- package/es/vtx-time-picker/index.js +27 -1
- package/es/vtx-transfer/Transfer.js +29 -0
- package/es/vtx-transfer/index.js +3 -0
- package/es/vtx-transfer/style/index.js +19 -0
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +98 -35
- package/es/vtx-tree-select/index.js +71 -105
- package/es/vtx-tree-select/style/index.js +9 -3
- package/es/vtx-upload/FilePreview.js +2 -1
- package/es/vtx-wang-editor/index.js +93 -39
- package/es/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/lib/index.js +36 -0
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/utils/index.js +0 -7
- package/lib/vtx-combogrid/Combogrid.js +5 -4
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-datagrid/Store/Provide.js +113 -143
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/lib/vtx-datagrid/columnState.js +100 -0
- package/lib/vtx-datagrid/index.js +124 -32
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +102 -20
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- package/lib/vtx-descriptions/Descriptions.js +38 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +7 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +26 -26
- package/lib/vtx-export-async/History.js +11 -3
- package/lib/vtx-export-async/index.js +43 -13
- package/lib/vtx-export-async/util.js +16 -5
- package/lib/vtx-form-layout/Card.js +9 -9
- package/lib/vtx-form-layout/Divider.js +1 -1
- package/lib/vtx-form-layout/FormItem.js +16 -16
- package/lib/vtx-form-layout/Pane.js +22 -11
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/Preview.js +11 -6
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +205 -63
- package/lib/vtx-import/result.js +29 -27
- package/lib/vtx-import/style/index.js +16 -1
- package/lib/vtx-import2/Content.js +2 -1
- package/lib/vtx-import2/index.js +29 -18
- package/lib/vtx-import2/style/index.js +60 -9
- package/lib/vtx-modal/index.js +9 -4
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +7 -3
- package/lib/vtx-provider/locale/en_US.js +57 -3
- package/lib/vtx-provider/locale/zh_CN.js +57 -3
- package/lib/vtx-search/index.js +13 -9
- package/lib/vtx-search/style/index.js +2 -1
- package/lib/vtx-select/index.js +104 -38
- package/lib/vtx-select/style/index.js +11 -56
- package/lib/vtx-signature/index.js +4 -3
- package/lib/vtx-signature/style/index.js +1 -1
- package/lib/vtx-split-pane/Resizer.js +0 -1
- package/lib/vtx-split-pane/SplitPane.js +40 -31
- package/lib/vtx-split-pane/style/index.js +8 -112
- package/lib/vtx-time-picker/index.js +27 -1
- package/lib/vtx-transfer/Transfer.js +38 -0
- package/lib/vtx-transfer/index.js +15 -0
- package/lib/vtx-transfer/style/index.js +25 -0
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +96 -33
- package/lib/vtx-tree-select/index.js +71 -105
- package/lib/vtx-tree-select/style/index.js +9 -3
- package/lib/vtx-upload/FilePreview.js +2 -1
- package/lib/vtx-wang-editor/index.js +91 -37
- package/lib/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/package.json +47 -32
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
package/lib/vtx-import2/index.js
CHANGED
|
@@ -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
|
|
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('
|
|
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
|
-
|
|
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 (
|
|
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();
|
|
@@ -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(
|
|
339
|
-
var
|
|
340
|
-
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)(
|
|
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: [
|
|
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(
|
|
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:
|
|
35
|
-
backgroundColor: token.
|
|
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:
|
|
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:
|
|
137
|
+
color: token.colorText,
|
|
87
138
|
fontWeight: '700',
|
|
88
139
|
fontSize: '24px'
|
|
89
140
|
}), "&-success-tips", {
|
|
90
|
-
color:
|
|
91
|
-
fontSize:
|
|
141
|
+
color: token.colorTextSecondary,
|
|
142
|
+
fontSize: 14
|
|
92
143
|
}), "&-error-tips", {
|
|
93
144
|
color: token.colorPrimary,
|
|
94
|
-
fontSize:
|
|
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) {
|
package/lib/vtx-modal/index.js
CHANGED
|
@@ -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
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
});
|
|
@@ -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
|
};
|
|
@@ -299,20 +299,24 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
|
|
|
299
299
|
borderRadius: 8,
|
|
300
300
|
borderRadiusLG: 12,
|
|
301
301
|
borderRadiusSM: 4
|
|
302
|
-
}, dark ? {
|
|
302
|
+
}, dark ? {
|
|
303
|
+
colorBgLayoutTable: '#111'
|
|
304
|
+
} : _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
303
305
|
colorPrimary: '#3A6DFF',
|
|
306
|
+
colorLink: '#3A6DFF',
|
|
304
307
|
colorText: '#29343D',
|
|
305
308
|
colorTextSecondary: '#78829D',
|
|
306
309
|
colorBorder: '#DCDFE6',
|
|
307
310
|
colorTextPlaceholder: '#BFC3CB',
|
|
308
311
|
colorFillAlter: '#F5F7FA'
|
|
309
|
-
}, "colorFillAlter", '#F5F7FA'), "colorTextPlaceholder", '#BFC3CB'), "colorFillAlterSolid", '#F5F7FA'), "colorBgLayout", '#FAFAFA')), theme.token);
|
|
312
|
+
}, "colorFillAlter", '#F5F7FA'), "colorTextPlaceholder", '#BFC3CB'), "colorFillAlterSolid", '#F5F7FA'), "colorBgLayout", '#F0F2F5'), "colorBgLayoutTable", '#FAFAFA')), theme.token);
|
|
310
313
|
theme.components = _objectSpread(_objectSpread({}, theme.components), {}, {
|
|
311
314
|
Table: _objectSpread({
|
|
312
315
|
headerBorderRadius: 0
|
|
313
316
|
}, (_theme$components = theme.components) === null || _theme$components === void 0 ? void 0 : _theme$components.Table),
|
|
314
317
|
Modal: _objectSpread({
|
|
315
|
-
contentPadding: 0
|
|
318
|
+
contentPadding: 0,
|
|
319
|
+
bodyPadding: 0
|
|
316
320
|
}, (_theme$components2 = theme.components) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.Modal)
|
|
317
321
|
});
|
|
318
322
|
|
|
@@ -131,6 +131,10 @@ var _default = exports.default = {
|
|
|
131
131
|
operation: 'Import',
|
|
132
132
|
error: 'Upload failed',
|
|
133
133
|
success: 'Upload successful',
|
|
134
|
+
rowNumber: 'Line No.',
|
|
135
|
+
errorMessage: 'Error Description',
|
|
136
|
+
selectFile: 'Click to select file',
|
|
137
|
+
noFileSelected: "No file selected",
|
|
134
138
|
downloadTemplate: 'Download template',
|
|
135
139
|
pleaseSelectFile: 'Please select the file to upload',
|
|
136
140
|
upload: 'Upload',
|
|
@@ -188,8 +192,58 @@ var _default = exports.default = {
|
|
|
188
192
|
download: 'Download'
|
|
189
193
|
},
|
|
190
194
|
wangEditor: {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
195
|
+
messageOverSizeText: 'Exceeds file size limit, maximum file size is',
|
|
196
|
+
messageUploadFailText: 'Upload error',
|
|
197
|
+
messageInsertImgFailText: 'Image Insertion Failed',
|
|
198
|
+
messageInsertVideoFailText: 'Video Insertion Failed',
|
|
199
|
+
messageInsertAttachmentFailText: 'Attachment Insertion Failed'
|
|
200
|
+
},
|
|
201
|
+
envPuzzle: {
|
|
202
|
+
common: {
|
|
203
|
+
startTime: 'Start time',
|
|
204
|
+
endTime: 'End time',
|
|
205
|
+
confirm: 'OK',
|
|
206
|
+
prompt: 'Prompt'
|
|
207
|
+
},
|
|
208
|
+
createModal: {
|
|
209
|
+
clear: 'Clear',
|
|
210
|
+
required: '{label} is required',
|
|
211
|
+
whitespace: '{label} cannot contain only whitespace'
|
|
212
|
+
},
|
|
213
|
+
template: {
|
|
214
|
+
selectedPrefix: 'Selected',
|
|
215
|
+
selectedSuffix: 'items',
|
|
216
|
+
clearSelected: 'Clear',
|
|
217
|
+
deleteItemConfirm: 'Delete this item?',
|
|
218
|
+
deleteRowConfirm: 'Confirm delete?',
|
|
219
|
+
deleteSelectedConfirm: 'Delete the selected {count} records?',
|
|
220
|
+
exportSelectedRows: 'Export selected rows',
|
|
221
|
+
exportCurrentPage: 'Export current page',
|
|
222
|
+
exportAll: 'Export all',
|
|
223
|
+
exportAllFields: 'Export all fields',
|
|
224
|
+
exportingFile: 'Exporting file...',
|
|
225
|
+
paginationTotal: 'Total {total} records'
|
|
226
|
+
},
|
|
227
|
+
import: {
|
|
228
|
+
rowNumber: 'Row',
|
|
229
|
+
errorMessage: 'Error message',
|
|
230
|
+
pleaseUploadFile: 'Please upload a file',
|
|
231
|
+
uploadFile: 'Upload file'
|
|
232
|
+
},
|
|
233
|
+
map: {
|
|
234
|
+
goToMap: 'Open map',
|
|
235
|
+
locate: 'Locate',
|
|
236
|
+
calibrate: 'Calibrate',
|
|
237
|
+
redraw: 'Redraw',
|
|
238
|
+
keywordPlaceholder: 'Enter keywords',
|
|
239
|
+
invalidLayerOptions: 'data and options cannot be empty, and map is required'
|
|
240
|
+
},
|
|
241
|
+
upload: {
|
|
242
|
+
downloading: 'Downloading...',
|
|
243
|
+
pictureUnit: 'files'
|
|
244
|
+
},
|
|
245
|
+
request: {
|
|
246
|
+
operationFailed: 'Operation failed'
|
|
247
|
+
}
|
|
194
248
|
}
|
|
195
249
|
};
|
|
@@ -130,6 +130,10 @@ var _default = exports.default = {
|
|
|
130
130
|
operation: '导入',
|
|
131
131
|
error: '上传失败',
|
|
132
132
|
success: '上传成功',
|
|
133
|
+
rowNumber: '行号',
|
|
134
|
+
errorMessage: '错误说明',
|
|
135
|
+
selectFile: '选择文件',
|
|
136
|
+
noFileSelected: "未选择任何文件",
|
|
133
137
|
downloadTemplate: '下载模板',
|
|
134
138
|
pleaseSelectFile: '请选择需要上传的文件',
|
|
135
139
|
upload: '上传',
|
|
@@ -187,9 +191,11 @@ var _default = exports.default = {
|
|
|
187
191
|
download: '下载'
|
|
188
192
|
},
|
|
189
193
|
wangEditor: {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
194
|
+
messageOverSizeText: '超过文件大小限制,最大文件大小为',
|
|
195
|
+
messageUploadFailText: '上传出错',
|
|
196
|
+
messageInsertImgFailText: '插入图片失败',
|
|
197
|
+
messageInsertVideoFailText: '插入视频失败',
|
|
198
|
+
messageInsertAttachmentFailText: '插入附件失败'
|
|
193
199
|
},
|
|
194
200
|
colorPicker: {
|
|
195
201
|
primary: '主要',
|
|
@@ -203,5 +209,53 @@ var _default = exports.default = {
|
|
|
203
209
|
basic: '基础颜色',
|
|
204
210
|
// 基础色板
|
|
205
211
|
chart: '图表颜色' // 图表专用色
|
|
212
|
+
},
|
|
213
|
+
envPuzzle: {
|
|
214
|
+
common: {
|
|
215
|
+
startTime: '开始时间',
|
|
216
|
+
endTime: '结束时间',
|
|
217
|
+
confirm: '确定',
|
|
218
|
+
prompt: '提示'
|
|
219
|
+
},
|
|
220
|
+
createModal: {
|
|
221
|
+
clear: '清空',
|
|
222
|
+
required: '{label}不能为空',
|
|
223
|
+
whitespace: '{label}不能只包含空白字符'
|
|
224
|
+
},
|
|
225
|
+
template: {
|
|
226
|
+
selectedPrefix: '已选择',
|
|
227
|
+
selectedSuffix: '项',
|
|
228
|
+
clearSelected: '清空',
|
|
229
|
+
deleteItemConfirm: '确定删除该项吗?',
|
|
230
|
+
deleteRowConfirm: '是否确认删除',
|
|
231
|
+
deleteSelectedConfirm: '确定删除选中的{count}条数据吗?',
|
|
232
|
+
exportSelectedRows: '导出选中行',
|
|
233
|
+
exportCurrentPage: '导出当前页',
|
|
234
|
+
exportAll: '导出全部',
|
|
235
|
+
exportAllFields: '导出全量字段',
|
|
236
|
+
exportingFile: '导出文件中...',
|
|
237
|
+
paginationTotal: '总共{total}条记录'
|
|
238
|
+
},
|
|
239
|
+
import: {
|
|
240
|
+
rowNumber: '行数',
|
|
241
|
+
errorMessage: '错误信息',
|
|
242
|
+
pleaseUploadFile: '请上传文件',
|
|
243
|
+
uploadFile: '上传文件'
|
|
244
|
+
},
|
|
245
|
+
map: {
|
|
246
|
+
goToMap: '去地图',
|
|
247
|
+
locate: '定位',
|
|
248
|
+
calibrate: '校正',
|
|
249
|
+
redraw: '重新绘制',
|
|
250
|
+
keywordPlaceholder: '请输入关键字',
|
|
251
|
+
invalidLayerOptions: 'data,options 不能为空或者是map对象没有'
|
|
252
|
+
},
|
|
253
|
+
upload: {
|
|
254
|
+
downloading: '下载中...',
|
|
255
|
+
pictureUnit: '张'
|
|
256
|
+
},
|
|
257
|
+
request: {
|
|
258
|
+
operationFailed: '操作失败'
|
|
259
|
+
}
|
|
206
260
|
}
|
|
207
261
|
};
|
package/lib/vtx-search/index.js
CHANGED
|
@@ -61,10 +61,6 @@ function VtxSearch(props) {
|
|
|
61
61
|
isClearButton = _props$isClearButton === void 0 ? true : _props$isClearButton,
|
|
62
62
|
_props$isMoreButton = props.isMoreButton,
|
|
63
63
|
isMoreButton = _props$isMoreButton === void 0 ? true : _props$isMoreButton,
|
|
64
|
-
_props$confirmText = props.confirmText,
|
|
65
|
-
confirmText = _props$confirmText === void 0 ? intl.getMessage('tableForm.search', '查询') : _props$confirmText,
|
|
66
|
-
_props$clearText = props.clearText,
|
|
67
|
-
clearText = _props$clearText === void 0 ? intl.getMessage('tableForm.reset', '重置') : _props$clearText,
|
|
68
64
|
onConfirm = props.onConfirm,
|
|
69
65
|
onClear = props.onClear,
|
|
70
66
|
renderButtons = props.renderButtons,
|
|
@@ -72,7 +68,15 @@ function VtxSearch(props) {
|
|
|
72
68
|
showAll = _props$showAll === void 0 ? false : _props$showAll,
|
|
73
69
|
onToggleShow = props.onToggleShow,
|
|
74
70
|
_props$customEnumText = props.customEnumText,
|
|
75
|
-
customEnumText = _props$customEnumText === void 0 ? {
|
|
71
|
+
customEnumText = _props$customEnumText === void 0 ? {
|
|
72
|
+
confirmText: intl.getMessage('tableForm.search', '查询'),
|
|
73
|
+
//确认按钮文本
|
|
74
|
+
clearText: intl.getMessage('tableForm.reset', '重置'),
|
|
75
|
+
//情况按钮文本
|
|
76
|
+
collapseText: intl.getMessage('tableForm.expand', '收起'),
|
|
77
|
+
//情况按钮文本
|
|
78
|
+
expandText: intl.getMessage('tableForm.collapsed', '展开') //情况按钮文本
|
|
79
|
+
} : _props$customEnumText;
|
|
76
80
|
var vtxSearchRef = (0, _react.useRef)();
|
|
77
81
|
var ref = (0, _react.useRef)();
|
|
78
82
|
var size = (0, _useColSize.default)(vtxSearchRef);
|
|
@@ -302,7 +306,7 @@ function VtxSearch(props) {
|
|
|
302
306
|
},
|
|
303
307
|
type: "primary",
|
|
304
308
|
onClick: onConfirm,
|
|
305
|
-
children: confirmText
|
|
309
|
+
children: customEnumText.confirmText
|
|
306
310
|
})
|
|
307
311
|
}), isClearButton && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
308
312
|
"data-type": 'bt',
|
|
@@ -312,7 +316,7 @@ function VtxSearch(props) {
|
|
|
312
316
|
width: '100%'
|
|
313
317
|
},
|
|
314
318
|
onClick: onClear,
|
|
315
|
-
children: clearText
|
|
319
|
+
children: customEnumText.clearText
|
|
316
320
|
})
|
|
317
321
|
}), isMoreButton && grid.len > realColumn - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
318
322
|
"data-type": 'bt',
|
|
@@ -321,9 +325,9 @@ function VtxSearch(props) {
|
|
|
321
325
|
},
|
|
322
326
|
className: (0, _classnames.default)("".concat(_index.prefix, "-more"), hashId),
|
|
323
327
|
children: showMore ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
324
|
-
children: [
|
|
328
|
+
children: [customEnumText.collapseText, /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.UpOutlined, {})]
|
|
325
329
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
326
|
-
children: [
|
|
330
|
+
children: [customEnumText.expandText, /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.DownOutlined, {})]
|
|
327
331
|
})
|
|
328
332
|
})]
|
|
329
333
|
})
|
|
@@ -23,7 +23,8 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
23
23
|
transitionDuration: token.toggleSpeed,
|
|
24
24
|
transitionProperty: 'height',
|
|
25
25
|
boxSizing: 'border-box',
|
|
26
|
-
overflow: 'hidden'
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
color: token.colorText
|
|
27
28
|
}, "".concat(componentCls, "-element"), {}), "".concat(componentCls, "-label_v"), {
|
|
28
29
|
overflow: 'hidden',
|
|
29
30
|
lineHeight: 1,
|