@zat-design/sisyphus-react 3.2.1-beta.6 → 3.2.1-beta.7
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/dist/index.esm.css +1 -1
- package/es/ProEditTable/index.js +5 -2
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- package/es/ProStep/components/Item/index.js +1 -4
- package/es/ProTreeModal/index.js +14 -3
- package/es/locale/en_US.d.ts +1 -0
- package/es/locale/en_US.js +1 -0
- package/es/locale/zh_CN.d.ts +1 -0
- package/es/locale/zh_CN.js +1 -0
- package/lib/ProEditTable/index.js +6 -2
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- package/lib/ProStep/components/Item/index.js +1 -4
- package/lib/ProTreeModal/index.js +14 -3
- package/lib/locale/en_US.d.ts +1 -0
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh_CN.d.ts +1 -0
- package/lib/locale/zh_CN.js +1 -0
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -2133,7 +2133,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2133
2133
|
.pro-modal-select .ant-input-group-wrapper:hover .close-icon > span,
|
|
2134
2134
|
.pro-tree-modal .ant-input-group-wrapper:hover .close-icon > span {
|
|
2135
2135
|
position: relative;
|
|
2136
|
-
font-size:
|
|
2136
|
+
font-size: 10px;
|
|
2137
2137
|
border: none;
|
|
2138
2138
|
border-radius: 50%;
|
|
2139
2139
|
}
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { transformColumns } from './utils';
|
|
|
20
20
|
import { getRandom, getNamePath } from './utils/tools';
|
|
21
21
|
import { DndWrapper, Row, Validator, Summary, RenderToolbar } from './components';
|
|
22
22
|
import Empty from '../assets/empty.png';
|
|
23
|
-
import locale from '../locale';
|
|
23
|
+
import locale, { formatMessage } from '../locale';
|
|
24
24
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
25
25
|
var _resetProps$id, _resetProps$id$split, _value$2;
|
|
26
26
|
var value = _ref.value,
|
|
@@ -294,8 +294,11 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
294
294
|
showQuickJumper: true,
|
|
295
295
|
total: value.length,
|
|
296
296
|
showTotal: function showTotal(total) {
|
|
297
|
+
var _locale$ProEditTable;
|
|
297
298
|
if (!total) return;
|
|
298
|
-
return
|
|
299
|
+
return formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
300
|
+
total: total
|
|
301
|
+
});
|
|
299
302
|
},
|
|
300
303
|
onChange: handlePageChange
|
|
301
304
|
}, pagination) : false,
|
package/es/ProTreeModal/index.js
CHANGED
|
@@ -77,6 +77,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
77
77
|
var _useSetState = useSetState({
|
|
78
78
|
open: false,
|
|
79
79
|
checkedValues: [],
|
|
80
|
+
beforeClearAllValues: [],
|
|
80
81
|
treeData: [],
|
|
81
82
|
treeViewData: [],
|
|
82
83
|
originalTreeData: [],
|
|
@@ -263,6 +264,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
263
264
|
}) : [];
|
|
264
265
|
setState({
|
|
265
266
|
checkedValues: _checkedValues,
|
|
267
|
+
beforeClearAllValues: state.checkedValues,
|
|
266
268
|
treeViewData: [],
|
|
267
269
|
checkAll: false
|
|
268
270
|
});
|
|
@@ -271,9 +273,18 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
271
273
|
* Drawer close
|
|
272
274
|
*/
|
|
273
275
|
var handleClose = function handleClose() {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
var _state$beforeClearAll;
|
|
277
|
+
if ((_state$beforeClearAll = state.beforeClearAllValues) === null || _state$beforeClearAll === void 0 ? void 0 : _state$beforeClearAll.length) {
|
|
278
|
+
setState({
|
|
279
|
+
open: false,
|
|
280
|
+
checkedValues: state.beforeClearAllValues,
|
|
281
|
+
beforeClearAllValues: []
|
|
282
|
+
});
|
|
283
|
+
} else {
|
|
284
|
+
setState({
|
|
285
|
+
open: false
|
|
286
|
+
});
|
|
287
|
+
}
|
|
277
288
|
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
278
289
|
};
|
|
279
290
|
/**
|
package/es/locale/en_US.d.ts
CHANGED
package/es/locale/en_US.js
CHANGED
|
@@ -94,6 +94,7 @@ export default {
|
|
|
94
94
|
save: 'Save',
|
|
95
95
|
custom: 'Custom',
|
|
96
96
|
operation: 'Operation',
|
|
97
|
+
total: '{total} items in total',
|
|
97
98
|
onlyOneLineMsg: 'Please save the data first',
|
|
98
99
|
deletePoConfirmMsg: 'Are you sure you want to delete this row of data?',
|
|
99
100
|
mulDeletePoConfirmMsg: 'Are you sure you want to delete the selected data?'
|
package/es/locale/zh_CN.d.ts
CHANGED
package/es/locale/zh_CN.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -21,7 +22,7 @@ var _utils = require("./utils");
|
|
|
21
22
|
var _tools = require("./utils/tools");
|
|
22
23
|
var _components = require("./components");
|
|
23
24
|
var _empty = _interopRequireDefault(require("../assets/empty.png"));
|
|
24
|
-
var _locale =
|
|
25
|
+
var _locale = _interopRequireWildcard(require("../locale"));
|
|
25
26
|
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalTip"];
|
|
26
27
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
27
28
|
var _resetProps$id, _resetProps$id$split, _value$2;
|
|
@@ -296,8 +297,11 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
296
297
|
showQuickJumper: true,
|
|
297
298
|
total: value.length,
|
|
298
299
|
showTotal: function showTotal(total) {
|
|
300
|
+
var _locale$ProEditTable;
|
|
299
301
|
if (!total) return;
|
|
300
|
-
return
|
|
302
|
+
return (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProEditTable = _locale.default.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
303
|
+
total: total
|
|
304
|
+
});
|
|
301
305
|
},
|
|
302
306
|
onChange: handlePageChange
|
|
303
307
|
}, pagination) : false,
|
|
@@ -78,6 +78,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
78
78
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
79
79
|
open: false,
|
|
80
80
|
checkedValues: [],
|
|
81
|
+
beforeClearAllValues: [],
|
|
81
82
|
treeData: [],
|
|
82
83
|
treeViewData: [],
|
|
83
84
|
originalTreeData: [],
|
|
@@ -264,6 +265,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
264
265
|
}) : [];
|
|
265
266
|
setState({
|
|
266
267
|
checkedValues: _checkedValues,
|
|
268
|
+
beforeClearAllValues: state.checkedValues,
|
|
267
269
|
treeViewData: [],
|
|
268
270
|
checkAll: false
|
|
269
271
|
});
|
|
@@ -272,9 +274,18 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
272
274
|
* Drawer close
|
|
273
275
|
*/
|
|
274
276
|
var handleClose = function handleClose() {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
var _state$beforeClearAll;
|
|
278
|
+
if ((_state$beforeClearAll = state.beforeClearAllValues) === null || _state$beforeClearAll === void 0 ? void 0 : _state$beforeClearAll.length) {
|
|
279
|
+
setState({
|
|
280
|
+
open: false,
|
|
281
|
+
checkedValues: state.beforeClearAllValues,
|
|
282
|
+
beforeClearAllValues: []
|
|
283
|
+
});
|
|
284
|
+
} else {
|
|
285
|
+
setState({
|
|
286
|
+
open: false
|
|
287
|
+
});
|
|
288
|
+
}
|
|
278
289
|
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
279
290
|
};
|
|
280
291
|
/**
|
package/lib/locale/en_US.d.ts
CHANGED
package/lib/locale/en_US.js
CHANGED
|
@@ -100,6 +100,7 @@ var _default = exports.default = {
|
|
|
100
100
|
save: 'Save',
|
|
101
101
|
custom: 'Custom',
|
|
102
102
|
operation: 'Operation',
|
|
103
|
+
total: '{total} items in total',
|
|
103
104
|
onlyOneLineMsg: 'Please save the data first',
|
|
104
105
|
deletePoConfirmMsg: 'Are you sure you want to delete this row of data?',
|
|
105
106
|
mulDeletePoConfirmMsg: 'Are you sure you want to delete the selected data?'
|
package/lib/locale/zh_CN.d.ts
CHANGED
package/lib/locale/zh_CN.js
CHANGED