@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.
- package/README.md +19 -19
- package/es/index.js +3 -0
- package/es/utils/components/LabelIconTip/index.js +7 -7
- package/es/utils/conversionMomentValue/index.js +25 -25
- package/es/utils/filterSpecialCharacters.js +6 -6
- package/es/utils/genCopyable/index.js +6 -6
- package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/es/utils/hooks/useDebounceFn/index.js +4 -4
- package/es/utils/hooks/useDebounceValue/index.js +6 -6
- package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +5 -5
- package/es/utils/index.js +1 -2
- package/es/utils/isBrowser/index.js +7 -7
- package/es/utils/isUrl/index.js +4 -4
- package/es/utils/merge/index.js +4 -4
- package/es/utils/nanoid/index.js +4 -4
- package/es/utils/omitBoolean/index.js +4 -4
- package/es/utils/parseValueToMoment/index.js +4 -4
- package/es/utils/proFieldParsingText/index.js +10 -10
- package/es/utils/transformKeySubmitValue/index.js +57 -57
- package/es/utils/useEditableArray/index.js +46 -46
- package/es/utils/useEditableMap/index.js +22 -22
- package/es/utils/useMediaQuery/index.js +5 -5
- package/es/vtx-combogrid/Combogrid.js +5 -4
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-datagrid/Store/Provide.js +109 -140
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -6
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/index.js +2 -1
- package/es/vtx-datagrid/ToolBar/style.js +6 -3
- package/es/vtx-datagrid/columnState.js +91 -0
- package/es/vtx-datagrid/index.js +134 -37
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +108 -18
- package/es/vtx-datagrid/style/index.less +242 -242
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- package/es/vtx-date-picker/style/index.less +39 -39
- 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 +2 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +33 -38
- package/es/vtx-export-async/History.js +15 -7
- package/es/vtx-export-async/index.js +18 -8
- package/es/vtx-export-async/util.js +16 -5
- package/es/vtx-form-layout/FormItem.js +16 -16
- package/es/vtx-form-layout/style/index.js +6 -4
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +143 -42
- 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 +29 -19
- package/es/vtx-import2/style/index.js +59 -8
- package/es/vtx-modal/index.js +11 -6
- package/es/vtx-modal/style/index.js +5 -2
- package/es/vtx-page-layout/Basic.js +2 -2
- package/es/vtx-page-layout/TabLayout.js +6 -6
- package/es/vtx-page-layout/TableLayout.js +10 -10
- package/es/vtx-page-layout/TreeLayout.js +6 -6
- package/es/vtx-page-layout/container.js +2 -2
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +33 -31
- package/es/vtx-provider/intl.js +9 -9
- package/es/vtx-provider/locale/en_GB.js +1 -1
- package/es/vtx-provider/locale/en_US.js +58 -4
- package/es/vtx-provider/locale/zh_CN.js +57 -3
- package/es/vtx-provider/useStyle/index.js +17 -17
- package/es/vtx-search/index.js +30 -12
- package/es/vtx-search/style/index.js +6 -3
- package/es/vtx-select/index.js +123 -40
- package/es/vtx-select/style/index.js +11 -56
- 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-statistics-column/style/index.js +1 -1
- 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 +27 -9
- package/es/vtx-tree-select/index.js +81 -110
- 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 +41 -32
- package/es/vtx-wang-editor/style/index.less +12 -12
- package/lib/index.js +36 -0
- package/lib/utils/components/LabelIconTip/index.js +7 -7
- package/lib/utils/conversionMomentValue/index.js +25 -25
- package/lib/utils/filterSpecialCharacters.js +6 -6
- package/lib/utils/genCopyable/index.js +6 -6
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/lib/utils/hooks/useDebounceFn/index.js +4 -4
- package/lib/utils/hooks/useDebounceValue/index.js +6 -6
- package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/lib/utils/hooks/useLatest/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +5 -5
- package/lib/utils/index.js +0 -7
- package/lib/utils/isBrowser/index.js +7 -7
- package/lib/utils/isUrl/index.js +4 -4
- package/lib/utils/merge/index.js +4 -4
- package/lib/utils/nanoid/index.js +4 -4
- package/lib/utils/omitBoolean/index.js +4 -4
- package/lib/utils/parseValueToMoment/index.js +4 -4
- package/lib/utils/proFieldParsingText/index.js +10 -10
- package/lib/utils/transformKeySubmitValue/index.js +57 -57
- package/lib/utils/useEditableArray/index.js +46 -46
- package/lib/utils/useEditableMap/index.js +22 -22
- package/lib/utils/useMediaQuery/index.js +5 -5
- package/lib/vtx-combogrid/Combogrid.js +5 -4
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-datagrid/Store/Provide.js +112 -142
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -6
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/index.js +2 -1
- package/lib/vtx-datagrid/ToolBar/style.js +6 -3
- package/lib/vtx-datagrid/columnState.js +100 -0
- package/lib/vtx-datagrid/index.js +134 -37
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +108 -18
- package/lib/vtx-datagrid/style/index.less +242 -242
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- package/lib/vtx-date-picker/style/index.less +39 -39
- 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 +2 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +34 -39
- package/lib/vtx-export-async/History.js +14 -8
- package/lib/vtx-export-async/index.js +18 -8
- package/lib/vtx-export-async/util.js +16 -5
- package/lib/vtx-form-layout/FormItem.js +16 -16
- package/lib/vtx-form-layout/style/index.js +6 -4
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +141 -43
- 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 -19
- package/lib/vtx-import2/style/index.js +59 -8
- package/lib/vtx-modal/index.js +11 -6
- package/lib/vtx-modal/style/index.js +5 -2
- package/lib/vtx-page-layout/Basic.js +2 -2
- package/lib/vtx-page-layout/TabLayout.js +6 -6
- package/lib/vtx-page-layout/TableLayout.js +10 -10
- package/lib/vtx-page-layout/TreeLayout.js +6 -6
- package/lib/vtx-page-layout/container.js +2 -2
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +33 -31
- package/lib/vtx-provider/intl.js +9 -9
- package/lib/vtx-provider/locale/en_GB.js +1 -1
- package/lib/vtx-provider/locale/en_US.js +58 -4
- package/lib/vtx-provider/locale/zh_CN.js +57 -3
- package/lib/vtx-provider/useStyle/index.js +17 -17
- package/lib/vtx-search/index.js +32 -12
- package/lib/vtx-search/style/index.js +6 -3
- package/lib/vtx-select/index.js +125 -42
- package/lib/vtx-select/style/index.js +11 -56
- 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-statistics-column/style/index.js +1 -1
- 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 +27 -9
- package/lib/vtx-tree-select/index.js +81 -112
- 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 +39 -30
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/package.json +239 -238
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
|
@@ -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,7 +31,7 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
|
|
|
31
31
|
height: '80px',
|
|
32
32
|
padding: '16px 16px 16px 48px',
|
|
33
33
|
color: token.colorPrimary,
|
|
34
|
-
fontSize:
|
|
34
|
+
fontSize: 14,
|
|
35
35
|
backgroundColor: token.colorBgLayoutTable,
|
|
36
36
|
borderRadius: '4px'
|
|
37
37
|
}, "".concat(componentCls, "-download"), {
|
|
@@ -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
|
@@ -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
|
-
|
|
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
|
});
|
|
@@ -37,7 +37,10 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
|
|
|
37
37
|
}, '&-title', _defineProperty(_defineProperty(_defineProperty({
|
|
38
38
|
position: 'relative',
|
|
39
39
|
padding: '8px 20px',
|
|
40
|
-
borderBottom: "1px solid ".concat(token.colorBorderSecondary)
|
|
40
|
+
borderBottom: "1px solid ".concat(token.colorBorderSecondary),
|
|
41
|
+
fontSize: '14px',
|
|
42
|
+
height: '40px',
|
|
43
|
+
boxSizing: 'border-box'
|
|
41
44
|
}, "".concat(componentCls, "-title_name"), {
|
|
42
45
|
width: '100%',
|
|
43
46
|
color: token.colorText
|
|
@@ -45,7 +48,7 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
|
|
|
45
48
|
position: 'absolute',
|
|
46
49
|
top: '1px !important',
|
|
47
50
|
right: '20px !important',
|
|
48
|
-
|
|
51
|
+
span: {
|
|
49
52
|
position: 'absolute',
|
|
50
53
|
top: 0,
|
|
51
54
|
right: 0,
|
|
@@ -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) {
|
|
@@ -12,9 +12,9 @@ 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
|
-
/**
|
|
16
|
-
* 页面
|
|
17
|
-
* @param {*} props
|
|
15
|
+
/**
|
|
16
|
+
* 页面
|
|
17
|
+
* @param {*} props
|
|
18
18
|
*/var Page = function Page(props) {
|
|
19
19
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
20
20
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -34,9 +34,9 @@ Page.propTypes = {
|
|
|
34
34
|
children: _propTypes.default.node
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* 内容
|
|
39
|
-
* @param {*} props
|
|
37
|
+
/**
|
|
38
|
+
* 内容
|
|
39
|
+
* @param {*} props
|
|
40
40
|
*/
|
|
41
41
|
var Content = function Content(props) {
|
|
42
42
|
var className = props.className,
|
|
@@ -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,8 +128,8 @@ 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,
|
|
@@ -11,9 +11,9 @@ 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
|
-
/**
|
|
15
|
-
* 页面
|
|
16
|
-
* @param {*} props
|
|
14
|
+
/**
|
|
15
|
+
* 页面
|
|
16
|
+
* @param {*} props
|
|
17
17
|
*/var Page = function Page(props) {
|
|
18
18
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
19
19
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -33,9 +33,9 @@ Page.propTypes = {
|
|
|
33
33
|
children: _propTypes.default.node
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* 内容
|
|
38
|
-
* @param {*} props
|
|
36
|
+
/**
|
|
37
|
+
* 内容
|
|
38
|
+
* @param {*} props
|
|
39
39
|
*/
|
|
40
40
|
var Content = function Content(props) {
|
|
41
41
|
var className = props.className,
|
|
@@ -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';
|
|
@@ -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
|
};
|
|
@@ -82,11 +82,11 @@ var omitUndefined = function omitUndefined(obj) {
|
|
|
82
82
|
return newObj;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* 用于判断当前是否需要开启哈希(Hash)模式。
|
|
87
|
-
* 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
88
|
-
* 如果是,则返回 false。否则,直接返回 true 表示需要打开。
|
|
89
|
-
* @returns
|
|
85
|
+
/**
|
|
86
|
+
* 用于判断当前是否需要开启哈希(Hash)模式。
|
|
87
|
+
* 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
88
|
+
* 如果是,则返回 false。否则,直接返回 true 表示需要打开。
|
|
89
|
+
* @returns
|
|
90
90
|
*/
|
|
91
91
|
var isNeedOpenHash = exports.isNeedOpenHash = function isNeedOpenHash() {
|
|
92
92
|
var _process$env$NODE_ENV, _process$env$NODE_ENV2;
|
|
@@ -121,10 +121,10 @@ var VtxConfigContext = exports.VtxConfigContext = /*#__PURE__*/_react.default.cr
|
|
|
121
121
|
});
|
|
122
122
|
var ConfigConsumer = exports.ConfigConsumer = VtxConfigContext.Consumer;
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* 组件解除挂载后清空一下 cache
|
|
126
|
-
* @date 2022-11-28
|
|
127
|
-
* @returns null
|
|
124
|
+
/**
|
|
125
|
+
* 组件解除挂载后清空一下 cache
|
|
126
|
+
* @date 2022-11-28
|
|
127
|
+
* @returns null
|
|
128
128
|
*/
|
|
129
129
|
var CacheClean = function CacheClean() {
|
|
130
130
|
var _useSWRConfig = (0, _swr.useSWRConfig)(),
|
|
@@ -137,10 +137,10 @@ var CacheClean = function CacheClean() {
|
|
|
137
137
|
return null;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
/**
|
|
141
|
-
* 用于配置 Pro 的组件,分装之后会简单一些
|
|
142
|
-
* @param props
|
|
143
|
-
* @returns
|
|
140
|
+
/**
|
|
141
|
+
* 用于配置 Pro 的组件,分装之后会简单一些
|
|
142
|
+
* @param props
|
|
143
|
+
* @returns
|
|
144
144
|
*/
|
|
145
145
|
var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
146
146
|
var _antdTheme$useToken;
|
|
@@ -159,17 +159,17 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
|
159
159
|
var tokenContext = (_antdTheme$useToken = _antd.theme.useToken) === null || _antdTheme$useToken === void 0 ? void 0 : _antdTheme$useToken.call(_antd.theme);
|
|
160
160
|
var proProvide = (0, _react.useContext)(VtxConfigContext);
|
|
161
161
|
|
|
162
|
-
/**
|
|
163
|
-
* pro 的 类
|
|
164
|
-
* @type {string}
|
|
165
|
-
* @example .ant-pro
|
|
162
|
+
/**
|
|
163
|
+
* pro 的 类
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @example .ant-pro
|
|
166
166
|
*/
|
|
167
167
|
|
|
168
168
|
var vtxComponentsCls = prefixCls ? ".".concat(prefixCls) : ".vtx";
|
|
169
169
|
var antCls = '.' + getPrefixCls();
|
|
170
170
|
var salt = "".concat(vtxComponentsCls);
|
|
171
|
-
/**
|
|
172
|
-
* 合并一下token,不然导致嵌套 token 失效
|
|
171
|
+
/**
|
|
172
|
+
* 合并一下token,不然导致嵌套 token 失效
|
|
173
173
|
*/
|
|
174
174
|
var proLayoutTokenMerge = (0, _react.useMemo)(function () {
|
|
175
175
|
return (0, _layoutToken.getLayoutDesignToken)(propsToken || {}, tokenContext.token);
|
|
@@ -266,10 +266,10 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
|
266
266
|
});
|
|
267
267
|
};
|
|
268
268
|
|
|
269
|
-
/**
|
|
270
|
-
* 用于配置 一些全局性的东西
|
|
271
|
-
* @param props
|
|
272
|
-
* @returns
|
|
269
|
+
/**
|
|
270
|
+
* 用于配置 一些全局性的东西
|
|
271
|
+
* @param props
|
|
272
|
+
* @returns
|
|
273
273
|
*/
|
|
274
274
|
var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(props) {
|
|
275
275
|
var _theme$components, _theme$components2;
|
|
@@ -303,6 +303,7 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
|
|
|
303
303
|
colorBgLayoutTable: '#111'
|
|
304
304
|
} : _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
305
305
|
colorPrimary: '#3A6DFF',
|
|
306
|
+
colorLink: '#3A6DFF',
|
|
306
307
|
colorText: '#29343D',
|
|
307
308
|
colorTextSecondary: '#78829D',
|
|
308
309
|
colorBorder: '#DCDFE6',
|
|
@@ -314,7 +315,8 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
|
|
|
314
315
|
headerBorderRadius: 0
|
|
315
316
|
}, (_theme$components = theme.components) === null || _theme$components === void 0 ? void 0 : _theme$components.Table),
|
|
316
317
|
Modal: _objectSpread({
|
|
317
|
-
contentPadding: 0
|
|
318
|
+
contentPadding: 0,
|
|
319
|
+
bodyPadding: 0
|
|
318
320
|
}, (_theme$components2 = theme.components) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.Modal)
|
|
319
321
|
});
|
|
320
322
|
|
|
@@ -332,13 +334,13 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
|
|
|
332
334
|
}));
|
|
333
335
|
};
|
|
334
336
|
|
|
335
|
-
/**
|
|
336
|
-
* It returns the intl object from the context if it exists, otherwise it returns the intl object for
|
|
337
|
-
* 获取国际化的方法
|
|
338
|
-
* @param locale
|
|
339
|
-
* @param localeMap
|
|
340
|
-
* the current locale
|
|
341
|
-
* @returns The return value of the function is the intl object.
|
|
337
|
+
/**
|
|
338
|
+
* It returns the intl object from the context if it exists, otherwise it returns the intl object for
|
|
339
|
+
* 获取国际化的方法
|
|
340
|
+
* @param locale
|
|
341
|
+
* @param localeMap
|
|
342
|
+
* the current locale
|
|
343
|
+
* @returns The return value of the function is the intl object.
|
|
342
344
|
*/
|
|
343
345
|
function useIntl() {
|
|
344
346
|
var _useContext3 = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
|
package/lib/vtx-provider/intl.js
CHANGED
|
@@ -39,11 +39,11 @@ var _zh_CN = _interopRequireDefault(require("./locale/zh_CN"));
|
|
|
39
39
|
var _zh_HK = _interopRequireDefault(require("./locale/zh_HK"));
|
|
40
40
|
var _zh_TW = _interopRequireDefault(require("./locale/zh_TW"));
|
|
41
41
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
42
|
-
/**
|
|
43
|
-
* 创建一个国际化的操作函数
|
|
44
|
-
*
|
|
45
|
-
* @param locale
|
|
46
|
-
* @param localeMap
|
|
42
|
+
/**
|
|
43
|
+
* 创建一个国际化的操作函数
|
|
44
|
+
*
|
|
45
|
+
* @param locale
|
|
46
|
+
* @param localeMap
|
|
47
47
|
*/
|
|
48
48
|
var createIntl = exports.createIntl = function createIntl(locale, localeMap) {
|
|
49
49
|
return {
|
|
@@ -131,10 +131,10 @@ var intlMap = exports.intlMap = {
|
|
|
131
131
|
};
|
|
132
132
|
var intlMapKeys = exports.intlMapKeys = Object.keys(intlMap);
|
|
133
133
|
|
|
134
|
-
/**
|
|
135
|
-
* 根据 antd 的 key 来找到的 locale 插件的 key
|
|
136
|
-
*
|
|
137
|
-
* @param localeKey
|
|
134
|
+
/**
|
|
135
|
+
* 根据 antd 的 key 来找到的 locale 插件的 key
|
|
136
|
+
*
|
|
137
|
+
* @param localeKey
|
|
138
138
|
*/
|
|
139
139
|
var findIntlKeyByAntdLocaleKey = exports.findIntlKeyByAntdLocaleKey = function findIntlKeyByAntdLocaleKey(localeKey) {
|
|
140
140
|
var localeName = (localeKey || 'zh-CN').toLocaleLowerCase();
|
|
@@ -19,7 +19,7 @@ var _default = exports.default = {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
tableForm: {
|
|
22
|
-
search: '
|
|
22
|
+
search: 'Search',
|
|
23
23
|
reset: 'Reset',
|
|
24
24
|
submit: 'Submit',
|
|
25
25
|
collapsed: 'Expand',
|
|
@@ -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
|
};
|