@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.
@@ -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: var(--zaui-font-size, 14px);
2136
+ font-size: 10px;
2137
2137
  border: none;
2138
2138
  border-radius: 50%;
2139
2139
  }
@@ -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 "\u5171".concat(total, "\u6761");
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,
@@ -22,7 +22,7 @@
22
22
 
23
23
  > span {
24
24
  position: relative;
25
- font-size: var(--zaui-font-size, 14px);
25
+ font-size: 10px;
26
26
  border: none;
27
27
  border-radius: 50%;
28
28
  }
@@ -26,9 +26,6 @@ export default (function (_ref) {
26
26
  title: title
27
27
  }, restProps), {}, {
28
28
  children: children
29
- })) : _jsx("div", {
30
- id: id,
31
- children: children
32
- })
29
+ })) : children
33
30
  });
34
31
  });
@@ -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
- setState({
275
- open: false
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
  /**
@@ -94,6 +94,7 @@ declare const _default: {
94
94
  save: string;
95
95
  custom: string;
96
96
  operation: string;
97
+ total: string;
97
98
  onlyOneLineMsg: string;
98
99
  deletePoConfirmMsg: string;
99
100
  mulDeletePoConfirmMsg: string;
@@ -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?'
@@ -94,6 +94,7 @@ declare const _default: {
94
94
  operation: string;
95
95
  noData: string;
96
96
  clickAdd: string;
97
+ total: string;
97
98
  onlyOneLineMsg: string;
98
99
  deletePoConfirmMsg: string;
99
100
  mulDeletePoConfirmMsg: string;
@@ -94,6 +94,7 @@ export default {
94
94
  operation: '操作',
95
95
  noData: '暂无数据',
96
96
  clickAdd: '点击添加',
97
+ total: '共{total}条',
97
98
  onlyOneLineMsg: '请先保存数据',
98
99
  deletePoConfirmMsg: '您确定要删除该行数据吗?',
99
100
  mulDeletePoConfirmMsg: '您确定要删除选中的数据吗?'
@@ -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 = _interopRequireDefault(require("../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 "\u5171".concat(total, "\u6761");
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,
@@ -22,7 +22,7 @@
22
22
 
23
23
  > span {
24
24
  position: relative;
25
- font-size: var(--zaui-font-size, 14px);
25
+ font-size: 10px;
26
26
  border: none;
27
27
  border-radius: 50%;
28
28
  }
@@ -33,9 +33,6 @@ var _default = exports.default = function _default(_ref) {
33
33
  title: title
34
34
  }, restProps), {}, {
35
35
  children: children
36
- })) : (0, _jsxRuntime.jsx)("div", {
37
- id: id,
38
- children: children
39
- })
36
+ })) : children
40
37
  });
41
38
  };
@@ -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
- setState({
276
- open: false
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
  /**
@@ -94,6 +94,7 @@ declare const _default: {
94
94
  save: string;
95
95
  custom: string;
96
96
  operation: string;
97
+ total: string;
97
98
  onlyOneLineMsg: string;
98
99
  deletePoConfirmMsg: string;
99
100
  mulDeletePoConfirmMsg: string;
@@ -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?'
@@ -94,6 +94,7 @@ declare const _default: {
94
94
  operation: string;
95
95
  noData: string;
96
96
  clickAdd: string;
97
+ total: string;
97
98
  onlyOneLineMsg: string;
98
99
  deletePoConfirmMsg: string;
99
100
  mulDeletePoConfirmMsg: string;
@@ -100,6 +100,7 @@ var _default = exports.default = {
100
100
  operation: '操作',
101
101
  noData: '暂无数据',
102
102
  clickAdd: '点击添加',
103
+ total: '共{total}条',
103
104
  onlyOneLineMsg: '请先保存数据',
104
105
  deletePoConfirmMsg: '您确定要删除该行数据吗?',
105
106
  mulDeletePoConfirmMsg: '您确定要删除选中的数据吗?'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.2.1-beta.6",
3
+ "version": "3.2.1-beta.7",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",