@zat-design/sisyphus-react 3.2.1-beta.7 → 3.2.2

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.
@@ -819,6 +819,9 @@
819
819
  background-color: var(--zaui-base-bg, #ffffff);
820
820
  padding: 24px 0 0 0;
821
821
  }
822
+ .pro-header.pro-header-no-back.pro-header-has-describe .pro-header-top {
823
+ padding-left: var(--zaui-space-size-md, 16px);
824
+ }
822
825
  .pro-header.pro-header-no-back .pro-header-top {
823
826
  padding-left: 0;
824
827
  }
@@ -5096,16 +5099,16 @@ input[type='button'] {
5096
5099
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) td,
5097
5100
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) td.ant-table-cell-fix-right,
5098
5101
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) td.ant-table-cell-fix-left {
5099
- background-color: #fff;
5102
+ background-color: #fff !important;
5100
5103
  }
5101
5104
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) td {
5102
5105
  background-color: #fff;
5103
5106
  }
5104
5107
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(odd) {
5105
- background-color: var(--zaui-table-strip-bg, #fafafa);
5108
+ background-color: var(--zaui-table-strip-bg, #fafafa) !important;
5106
5109
  }
5107
5110
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(odd) td {
5108
- background-color: var(--zaui-table-strip-bg, #fafafa);
5111
+ background-color: var(--zaui-table-strip-bg, #fafafa) !important;
5109
5112
  }
5110
5113
  .ant-table .ant-table-cell .ant-btn-link {
5111
5114
  padding: 0;
@@ -136,10 +136,11 @@ var RenderFields = function RenderFields(props) {
136
136
  if (isBoolean(formDisabled)) {
137
137
  _fieldProps.disabled = formDisabled;
138
138
  }
139
- var componentProps = _objectSpread(_objectSpread({}, _fieldProps), {}, {
140
- disabled: _disabled,
141
- placeholder: _placeholder,
139
+ var componentProps = _objectSpread(_objectSpread({
142
140
  disabledStrictly: true
141
+ }, _fieldProps), {}, {
142
+ disabled: _disabled,
143
+ placeholder: _placeholder
143
144
  });
144
145
  // switch与SwitchCheckbox单独添加valuePropName
145
146
  if (['Switch', 'SwitchCheckbox'].includes(_type)) {
@@ -373,6 +373,7 @@ var ProHeader = function ProHeader(props) {
373
373
  'pro-header-fixed': fixedTop,
374
374
  'pro-header-shadow': showShadow,
375
375
  'pro-header-no-back': !backState,
376
+ 'pro-header-has-describe': !isEmpty(_subDescribeColumns) || !isEmpty(describeColumns) || !isEmpty(describeColumns),
376
377
  'pro-header-no-describe': isEmpty(_subDescribeColumns) && isEmpty(describeColumns) || isEmpty(describeColumns)
377
378
  }, "".concat(className), className));
378
379
  if (title && !isEmpty(_breadcrumbColumns)) {
@@ -4,6 +4,12 @@
4
4
  background-color: var(--zaui-base-bg, #ffffff);
5
5
  padding : 24px 0 0 0;
6
6
 
7
+ &.pro-header-no-back.pro-header-has-describe {
8
+ .pro-header-top {
9
+ padding-left: var(--zaui-space-size-md, 16px);
10
+ }
11
+ }
12
+
7
13
  &.pro-header-no-back {
8
14
  .pro-header-top {
9
15
  padding-left: 0;
@@ -12,6 +12,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
13
13
  import { useState, useEffect } from 'react';
14
14
  import { setThemes, setTableNoStripe } from '../../utils/index';
15
+ import locale from '../../../locale';
15
16
  var connect = function connect(Component) {
16
17
  var ComponentWrapper = function ComponentWrapper(props) {
17
18
  return _jsx(Component, _objectSpread({}, props));
@@ -62,8 +63,8 @@ var PrdTools = function PrdTools(_ref) {
62
63
  }, []);
63
64
  return _jsxs(NewDrawer, {
64
65
  className: "pro-theme-prd-tools-drawer",
65
- width: 320,
66
- title: "\u5168\u5C40\u6837\u5F0F\u81EA\u5B9A\u4E49",
66
+ width: 400,
67
+ title: "".concat(locale.ProThemeTools.title),
67
68
  placement: "right",
68
69
  onClose: onClose,
69
70
  open: visible,
@@ -77,7 +78,7 @@ var PrdTools = function PrdTools(_ref) {
77
78
  }), _jsxs("div", {
78
79
  className: "pro-theme-tools-space",
79
80
  children: [_jsx("p", {
80
- children: "\u4E3B\u9898\u8272"
81
+ children: "".concat(locale.ProThemeTools.themeColor)
81
82
  }), _jsx("ul", {
82
83
  className: "pro-theme-color",
83
84
  children: active.map(function (item, index) {
@@ -108,7 +109,7 @@ var PrdTools = function PrdTools(_ref) {
108
109
  children: [_jsx("div", {
109
110
  className: "pro-theme-tools-item",
110
111
  children: _jsx("p", {
111
- children: "\u5E03\u5C40"
112
+ children: "".concat(locale.ProThemeTools.layout)
112
113
  })
113
114
  }), _jsx("div", {
114
115
  className: "pro-theme-tools-item",
@@ -124,13 +125,13 @@ var PrdTools = function PrdTools(_ref) {
124
125
  },
125
126
  children: [_jsx(_Radio.Button, {
126
127
  value: 0.5,
127
- children: "\u7D27\u51D1"
128
+ children: "".concat(locale.ProThemeTools.layoutMode[0])
128
129
  }), _jsx(_Radio.Button, {
129
130
  value: 1,
130
- children: "\u5E38\u89C4"
131
+ children: "".concat(locale.ProThemeTools.layoutMode[1])
131
132
  }), _jsx(_Radio.Button, {
132
133
  value: 1.5,
133
- children: "\u5BBD\u677E"
134
+ children: "".concat(locale.ProThemeTools.layoutMode[2])
134
135
  })]
135
136
  })
136
137
  })]
@@ -139,7 +140,7 @@ var PrdTools = function PrdTools(_ref) {
139
140
  children: [_jsx("div", {
140
141
  className: "pro-theme-tools-item",
141
142
  children: _jsx("p", {
142
- children: "\u8868\u5355\u6807\u9898"
143
+ children: "".concat(locale.ProThemeTools.formLabel)
143
144
  })
144
145
  }), _jsx("div", {
145
146
  className: "pro-theme-tools-item",
@@ -176,10 +177,10 @@ var PrdTools = function PrdTools(_ref) {
176
177
  },
177
178
  children: [_jsx(_Radio.Button, {
178
179
  value: "left",
179
- children: "\u5DE6\u5BF9\u9F50"
180
+ children: "".concat(locale.ProThemeTools.flex[0])
180
181
  }), _jsx(_Radio.Button, {
181
182
  value: "right",
182
- children: "\u53F3\u5BF9\u9F50"
183
+ children: "".concat(locale.ProThemeTools.flex[1])
183
184
  })]
184
185
  })
185
186
  })]
@@ -188,13 +189,13 @@ var PrdTools = function PrdTools(_ref) {
188
189
  children: [_jsx("div", {
189
190
  className: "pro-theme-tools-item",
190
191
  children: _jsx("p", {
191
- children: "\u5927\u5B57\u53F7\u6A21\u5F0F"
192
+ children: "".concat(locale.ProThemeTools.bigText)
192
193
  })
193
194
  }), _jsx("div", {
194
195
  className: "pro-theme-tools-item",
195
196
  children: _jsx(_Switch, {
196
- checkedChildren: "\u5F00",
197
- unCheckedChildren: "\u5173",
197
+ checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
198
+ unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
198
199
  checked: state.zauiBigText,
199
200
  onClick: function onClick(value) {
200
201
  setState(_objectSpread(_objectSpread({}, state), {}, {
@@ -212,13 +213,13 @@ var PrdTools = function PrdTools(_ref) {
212
213
  children: [_jsx("div", {
213
214
  className: "pro-theme-tools-item",
214
215
  children: _jsx("p", {
215
- children: "\u8868\u683C\u8FB9\u6846"
216
+ children: "".concat(locale.ProThemeTools.tableBorder)
216
217
  })
217
218
  }), _jsx("div", {
218
219
  className: "pro-theme-tools-item",
219
220
  children: _jsx(_Switch, {
220
- checkedChildren: "\u5F00",
221
- unCheckedChildren: "\u5173",
221
+ checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
222
+ unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
222
223
  checked: state.zauiTableBorder,
223
224
  onClick: function onClick(value) {
224
225
  setState(_objectSpread(_objectSpread({}, state), {}, {
@@ -235,13 +236,13 @@ var PrdTools = function PrdTools(_ref) {
235
236
  children: [_jsx("div", {
236
237
  className: "pro-theme-tools-item",
237
238
  children: _jsx("p", {
238
- children: "\u8868\u683C\u6591\u9A6C\u7EB9"
239
+ children: "".concat(locale.ProThemeTools.tableStripe)
239
240
  })
240
241
  }), _jsx("div", {
241
242
  className: "pro-theme-tools-item",
242
243
  children: _jsx(_Switch, {
243
- checkedChildren: "\u5F00",
244
- unCheckedChildren: "\u5173",
244
+ checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
245
+ unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
245
246
  checked: state.zauiStripe,
246
247
  onClick: function onClick(value) {
247
248
  setState(_objectSpread(_objectSpread({}, state), {}, {
@@ -272,7 +273,7 @@ var PrdTools = function PrdTools(_ref) {
272
273
  }]);
273
274
  onReset();
274
275
  },
275
- children: "\u91CD\u7F6E"
276
+ children: "".concat(locale.ProThemeTools.reset)
276
277
  })]
277
278
  });
278
279
  };
@@ -14,6 +14,7 @@ import { useEffect, useState } from 'react';
14
14
  import classnames from 'classnames';
15
15
  import { getKebabCase, setThemes, setTableNoStripe, setTableBorder, getMapKebabCase, getMapHumpCase } from './utils/index';
16
16
  import { PrdTools } from './component';
17
+ import locale from '../locale';
17
18
  var defaultCacheTime = 1; // 配置保存时间为一天
18
19
  var defaultThemeConfig = {
19
20
  zauiBrand: '#006AFF',
@@ -89,7 +90,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
89
90
  input.select();
90
91
  if (document.execCommand('copy')) {
91
92
  document.execCommand('copy');
92
- _message.success('复制成功!');
93
+ _message.success("".concat(locale.ProThemeTools.copySuccess));
93
94
  }
94
95
  document.body.removeChild(input);
95
96
  };
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  *@Description: 树每行节点渲染组件,复选时阻止点击事件冒泡,只有点击树节点文本会向上触发onSelect事件
15
15
  */
16
16
  /* eslint-disable no-plusplus */
17
- import React, { useEffect, useMemo, useState } from 'react';
17
+ import React, { useEffect, useState } from 'react';
18
18
  import { useSetState } from 'ahooks';
19
19
  import { CaretDownOutlined } from '@ant-design/icons';
20
20
  import SearchTitle from './SearchTitle';
@@ -263,32 +263,19 @@ function List(props) {
263
263
  })]
264
264
  }, onlyKey);
265
265
  };
266
- var _treeData = useMemo(function () {
267
- function fn() {
268
- var loop = function loop(data, index) {
269
- index++;
270
- var treeRow = data.map(function (item) {
271
- var nodeClass = 'pro-tree-tree-node ';
272
- var isChecked = false;
273
- if (currentClickTreeNode === item[fieldNameValue]) {
274
- nodeClass += ' checked';
275
- isChecked = true;
276
- }
277
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
278
- if (item[fieldNames.children]) {
279
- return {
280
- title: _jsx(TreeNodeRow, {
281
- nodeClass: nodeClass,
282
- item: item,
283
- index: index,
284
- title: title,
285
- isChecked: isChecked,
286
- onlyKey: item[fieldNameValue]
287
- }),
288
- key: item[fieldNameValue],
289
- children: loop(item[fieldNames.children], index)
290
- };
291
- }
266
+ // const _treeData = useMemo(() => {
267
+ function fn() {
268
+ var loop = function loop(data, index) {
269
+ index++;
270
+ var treeRow = data.map(function (item) {
271
+ var nodeClass = 'pro-tree-tree-node ';
272
+ var isChecked = false;
273
+ if (currentClickTreeNode === item[fieldNameValue]) {
274
+ nodeClass += ' checked';
275
+ isChecked = true;
276
+ }
277
+ var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
278
+ if (item[fieldNames.children]) {
292
279
  return {
293
280
  title: _jsx(TreeNodeRow, {
294
281
  nodeClass: nodeClass,
@@ -298,23 +285,37 @@ function List(props) {
298
285
  isChecked: isChecked,
299
286
  onlyKey: item[fieldNameValue]
300
287
  }),
301
- key: item[fieldNameValue]
288
+ key: item[fieldNameValue],
289
+ children: loop(item[fieldNames.children], index)
302
290
  };
303
- });
304
- return treeRow; // .filter((item) => item);
305
- };
291
+ }
292
+ return {
293
+ title: _jsx(TreeNodeRow, {
294
+ nodeClass: nodeClass,
295
+ item: item,
296
+ index: index,
297
+ title: title,
298
+ isChecked: isChecked,
299
+ onlyKey: item[fieldNameValue]
300
+ }),
301
+ key: item[fieldNameValue]
302
+ };
303
+ });
304
+ return treeRow; // .filter((item) => item);
305
+ };
306
306
 
307
- if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
308
- return;
309
- }
310
- var newTreeData = originalTreeData;
311
- if (searchStr) {
312
- newTreeData = filterCheckedNodes(originalTreeData, [], searchStr, fieldNames);
313
- }
314
- return loop(newTreeData, -1);
307
+ if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
308
+ return;
309
+ }
310
+ var newTreeData = originalTreeData;
311
+ if (searchStr) {
312
+ newTreeData = filterCheckedNodes(originalTreeData, [], searchStr, fieldNames);
315
313
  }
316
- return fn();
317
- }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
314
+ return loop(newTreeData, -1);
315
+ }
316
+ // return fn();
317
+ // }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
318
+ var _treeData = fn();
318
319
  var onExpand = function onExpand(newExpandedKeys) {
319
320
  setState({
320
321
  expandedKeys: newExpandedKeys,
@@ -77,7 +77,6 @@ var ProTreeModal = function ProTreeModal(props) {
77
77
  var _useSetState = useSetState({
78
78
  open: false,
79
79
  checkedValues: [],
80
- beforeClearAllValues: [],
81
80
  treeData: [],
82
81
  treeViewData: [],
83
82
  originalTreeData: [],
@@ -264,7 +263,6 @@ var ProTreeModal = function ProTreeModal(props) {
264
263
  }) : [];
265
264
  setState({
266
265
  checkedValues: _checkedValues,
267
- beforeClearAllValues: state.checkedValues,
268
266
  treeViewData: [],
269
267
  checkAll: false
270
268
  });
@@ -273,18 +271,9 @@ var ProTreeModal = function ProTreeModal(props) {
273
271
  * Drawer close
274
272
  */
275
273
  var handleClose = function handleClose() {
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
- }
274
+ setState({
275
+ open: false
276
+ });
288
277
  openChange === null || openChange === void 0 ? void 0 : openChange(false);
289
278
  };
290
279
  /**
@@ -38,7 +38,6 @@ declare const _default: {
38
38
  errorMessage: string;
39
39
  defaultTitle: string;
40
40
  };
41
- ProWaterMark: {};
42
41
  ProTable: {
43
42
  noData: string;
44
43
  resetColumnWidth: string;
@@ -135,5 +134,19 @@ declare const _default: {
135
134
  ProTimeLimit: {
136
135
  foreverText: string;
137
136
  };
137
+ ProThemeTools: {
138
+ title: string;
139
+ copySuccess: string;
140
+ layout: string;
141
+ layoutMode: string[];
142
+ themeColor: string;
143
+ formLabel: string;
144
+ bigText: string;
145
+ flex: string[];
146
+ switchText: string[];
147
+ tableBorder: string;
148
+ tableStripe: string;
149
+ reset: string;
150
+ };
138
151
  };
139
152
  export default _default;
@@ -38,7 +38,6 @@ export default {
38
38
  errorMessage: 'The configuration config for ProAction must be data',
39
39
  defaultTitle: 'Are you sure delete it?'
40
40
  },
41
- ProWaterMark: {},
42
41
  ProTable: {
43
42
  noData: 'No data',
44
43
  resetColumnWidth: 'Reset column width',
@@ -121,12 +120,12 @@ export default {
121
120
  ProTreeModal: {
122
121
  checkMsg: 'Please check first',
123
122
  select: 'Please select',
124
- input: 'please enter',
123
+ input: 'Please enter',
125
124
  errorArrayMessage: 'Please return a valid array',
126
125
  selectMin: 'Select at least {min}',
127
126
  selectMax: 'Select at most {max} items',
128
127
  noCheck: 'None selected yet',
129
- checkAll: 'select all',
128
+ checkAll: 'Select all',
130
129
  check: 'selected',
131
130
  clearAll: 'Clear all',
132
131
  checkNumber: '{num} items selected',
@@ -134,5 +133,19 @@ export default {
134
133
  },
135
134
  ProTimeLimit: {
136
135
  foreverText: 'long term'
136
+ },
137
+ ProThemeTools: {
138
+ title: 'Global style customization ',
139
+ copySuccess: 'Copy success! ',
140
+ layout: 'Layout',
141
+ layoutMode: ['Compact ', 'Regular', 'Loose'],
142
+ themeColor: 'Theme color',
143
+ formLabel: 'Form label',
144
+ bigText: 'Large text mode',
145
+ flex: ['Left align ', 'Right align'],
146
+ switchText: ['on', 'off'],
147
+ tableBorder: 'Table border',
148
+ tableStripe: 'Table zebra',
149
+ reset: 'Reset'
137
150
  }
138
151
  };
@@ -38,7 +38,6 @@ declare const _default: {
38
38
  errorMessage: string;
39
39
  defaultTitle: string;
40
40
  };
41
- ProWaterMark: {};
42
41
  ProTable: {
43
42
  noData: string;
44
43
  resetColumnWidth: string;
@@ -134,5 +133,19 @@ declare const _default: {
134
133
  ProTimeLimit: {
135
134
  foreverText: string;
136
135
  };
136
+ ProThemeTools: {
137
+ title: string;
138
+ copySuccess: string;
139
+ layout: string;
140
+ layoutMode: string[];
141
+ themeColor: string;
142
+ formLabel: string;
143
+ bigText: string;
144
+ flex: string[];
145
+ switchText: string[];
146
+ tableBorder: string;
147
+ tableStripe: string;
148
+ reset: string;
149
+ };
137
150
  };
138
151
  export default _default;
@@ -38,7 +38,6 @@ export default {
38
38
  errorMessage: 'ProAction 配置 config 必须为数据',
39
39
  defaultTitle: '确认删除吗?'
40
40
  },
41
- ProWaterMark: {},
42
41
  ProTable: {
43
42
  noData: '暂无数据',
44
43
  resetColumnWidth: '重置列宽',
@@ -133,5 +132,19 @@ export default {
133
132
  },
134
133
  ProTimeLimit: {
135
134
  foreverText: '长期'
135
+ },
136
+ ProThemeTools: {
137
+ title: '全局样式自定义',
138
+ copySuccess: '复制成功!',
139
+ layout: '布局',
140
+ layoutMode: ['紧凑', '常规', '宽松'],
141
+ themeColor: '主题色',
142
+ formLabel: '表单标题',
143
+ bigText: '大字号模式',
144
+ flex: ['左对齐', '右对齐'],
145
+ switchText: ['开', '关'],
146
+ tableBorder: '表格边框',
147
+ tableStripe: '表格斑马纹',
148
+ reset: '重置'
136
149
  }
137
150
  };
@@ -258,7 +258,7 @@
258
258
  & td,
259
259
  & td.ant-table-cell-fix-right,
260
260
  & td.ant-table-cell-fix-left {
261
- background-color: #fff;
261
+ background-color: #fff !important;
262
262
  }
263
263
 
264
264
  & td {
@@ -267,10 +267,10 @@
267
267
  }
268
268
 
269
269
  .ant-table-row:nth-child(odd) {
270
- background-color: @zaui-table-strip-bg;
270
+ background-color: @zaui-table-strip-bg !important;
271
271
 
272
272
  & td {
273
- background-color: @zaui-table-strip-bg;
273
+ background-color: @zaui-table-strip-bg !important;
274
274
  }
275
275
  }
276
276
  }
@@ -144,10 +144,11 @@ var RenderFields = function RenderFields(props) {
144
144
  if ((0, _lodash.isBoolean)(formDisabled)) {
145
145
  _fieldProps.disabled = formDisabled;
146
146
  }
147
- var componentProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _fieldProps), {}, {
148
- disabled: _disabled,
149
- placeholder: _placeholder,
147
+ var componentProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({
150
148
  disabledStrictly: true
149
+ }, _fieldProps), {}, {
150
+ disabled: _disabled,
151
+ placeholder: _placeholder
151
152
  });
152
153
  // switch与SwitchCheckbox单独添加valuePropName
153
154
  if (['Switch', 'SwitchCheckbox'].includes(_type)) {
@@ -371,6 +371,7 @@ var ProHeader = function ProHeader(props) {
371
371
  'pro-header-fixed': fixedTop,
372
372
  'pro-header-shadow': showShadow,
373
373
  'pro-header-no-back': !backState,
374
+ 'pro-header-has-describe': !(0, _lodash.isEmpty)(_subDescribeColumns) || !(0, _lodash.isEmpty)(describeColumns) || !(0, _lodash.isEmpty)(describeColumns),
374
375
  'pro-header-no-describe': (0, _lodash.isEmpty)(_subDescribeColumns) && (0, _lodash.isEmpty)(describeColumns) || (0, _lodash.isEmpty)(describeColumns)
375
376
  }, "".concat(className), className));
376
377
  if (title && !(0, _lodash.isEmpty)(_breadcrumbColumns)) {
@@ -4,6 +4,12 @@
4
4
  background-color: var(--zaui-base-bg, #ffffff);
5
5
  padding : 24px 0 0 0;
6
6
 
7
+ &.pro-header-no-back.pro-header-has-describe {
8
+ .pro-header-top {
9
+ padding-left: var(--zaui-space-size-md, 16px);
10
+ }
11
+ }
12
+
7
13
  &.pro-header-no-back {
8
14
  .pro-header-top {
9
15
  padding-left: 0;
@@ -12,6 +12,7 @@ var _icons = require("@ant-design/icons");
12
12
  var _antd = require("antd");
13
13
  var _react = require("react");
14
14
  var _index = require("../../utils/index");
15
+ var _locale = _interopRequireDefault(require("../../../locale"));
15
16
  var connect = function connect(Component) {
16
17
  var ComponentWrapper = function ComponentWrapper(props) {
17
18
  return (0, _jsxRuntime.jsx)(Component, (0, _objectSpread2.default)({}, props));
@@ -62,8 +63,8 @@ var PrdTools = function PrdTools(_ref) {
62
63
  }, []);
63
64
  return (0, _jsxRuntime.jsxs)(NewDrawer, {
64
65
  className: "pro-theme-prd-tools-drawer",
65
- width: 320,
66
- title: "\u5168\u5C40\u6837\u5F0F\u81EA\u5B9A\u4E49",
66
+ width: 400,
67
+ title: "".concat(_locale.default.ProThemeTools.title),
67
68
  placement: "right",
68
69
  onClose: onClose,
69
70
  open: visible,
@@ -77,7 +78,7 @@ var PrdTools = function PrdTools(_ref) {
77
78
  }), (0, _jsxRuntime.jsxs)("div", {
78
79
  className: "pro-theme-tools-space",
79
80
  children: [(0, _jsxRuntime.jsx)("p", {
80
- children: "\u4E3B\u9898\u8272"
81
+ children: "".concat(_locale.default.ProThemeTools.themeColor)
81
82
  }), (0, _jsxRuntime.jsx)("ul", {
82
83
  className: "pro-theme-color",
83
84
  children: active.map(function (item, index) {
@@ -108,7 +109,7 @@ var PrdTools = function PrdTools(_ref) {
108
109
  children: [(0, _jsxRuntime.jsx)("div", {
109
110
  className: "pro-theme-tools-item",
110
111
  children: (0, _jsxRuntime.jsx)("p", {
111
- children: "\u5E03\u5C40"
112
+ children: "".concat(_locale.default.ProThemeTools.layout)
112
113
  })
113
114
  }), (0, _jsxRuntime.jsx)("div", {
114
115
  className: "pro-theme-tools-item",
@@ -124,13 +125,13 @@ var PrdTools = function PrdTools(_ref) {
124
125
  },
125
126
  children: [(0, _jsxRuntime.jsx)(_antd.Radio.Button, {
126
127
  value: 0.5,
127
- children: "\u7D27\u51D1"
128
+ children: "".concat(_locale.default.ProThemeTools.layoutMode[0])
128
129
  }), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
129
130
  value: 1,
130
- children: "\u5E38\u89C4"
131
+ children: "".concat(_locale.default.ProThemeTools.layoutMode[1])
131
132
  }), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
132
133
  value: 1.5,
133
- children: "\u5BBD\u677E"
134
+ children: "".concat(_locale.default.ProThemeTools.layoutMode[2])
134
135
  })]
135
136
  })
136
137
  })]
@@ -139,7 +140,7 @@ var PrdTools = function PrdTools(_ref) {
139
140
  children: [(0, _jsxRuntime.jsx)("div", {
140
141
  className: "pro-theme-tools-item",
141
142
  children: (0, _jsxRuntime.jsx)("p", {
142
- children: "\u8868\u5355\u6807\u9898"
143
+ children: "".concat(_locale.default.ProThemeTools.formLabel)
143
144
  })
144
145
  }), (0, _jsxRuntime.jsx)("div", {
145
146
  className: "pro-theme-tools-item",
@@ -176,10 +177,10 @@ var PrdTools = function PrdTools(_ref) {
176
177
  },
177
178
  children: [(0, _jsxRuntime.jsx)(_antd.Radio.Button, {
178
179
  value: "left",
179
- children: "\u5DE6\u5BF9\u9F50"
180
+ children: "".concat(_locale.default.ProThemeTools.flex[0])
180
181
  }), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
181
182
  value: "right",
182
- children: "\u53F3\u5BF9\u9F50"
183
+ children: "".concat(_locale.default.ProThemeTools.flex[1])
183
184
  })]
184
185
  })
185
186
  })]
@@ -188,13 +189,13 @@ var PrdTools = function PrdTools(_ref) {
188
189
  children: [(0, _jsxRuntime.jsx)("div", {
189
190
  className: "pro-theme-tools-item",
190
191
  children: (0, _jsxRuntime.jsx)("p", {
191
- children: "\u5927\u5B57\u53F7\u6A21\u5F0F"
192
+ children: "".concat(_locale.default.ProThemeTools.bigText)
192
193
  })
193
194
  }), (0, _jsxRuntime.jsx)("div", {
194
195
  className: "pro-theme-tools-item",
195
196
  children: (0, _jsxRuntime.jsx)(_antd.Switch, {
196
- checkedChildren: "\u5F00",
197
- unCheckedChildren: "\u5173",
197
+ checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
198
+ unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
198
199
  checked: state.zauiBigText,
199
200
  onClick: function onClick(value) {
200
201
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -212,13 +213,13 @@ var PrdTools = function PrdTools(_ref) {
212
213
  children: [(0, _jsxRuntime.jsx)("div", {
213
214
  className: "pro-theme-tools-item",
214
215
  children: (0, _jsxRuntime.jsx)("p", {
215
- children: "\u8868\u683C\u8FB9\u6846"
216
+ children: "".concat(_locale.default.ProThemeTools.tableBorder)
216
217
  })
217
218
  }), (0, _jsxRuntime.jsx)("div", {
218
219
  className: "pro-theme-tools-item",
219
220
  children: (0, _jsxRuntime.jsx)(_antd.Switch, {
220
- checkedChildren: "\u5F00",
221
- unCheckedChildren: "\u5173",
221
+ checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
222
+ unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
222
223
  checked: state.zauiTableBorder,
223
224
  onClick: function onClick(value) {
224
225
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -235,13 +236,13 @@ var PrdTools = function PrdTools(_ref) {
235
236
  children: [(0, _jsxRuntime.jsx)("div", {
236
237
  className: "pro-theme-tools-item",
237
238
  children: (0, _jsxRuntime.jsx)("p", {
238
- children: "\u8868\u683C\u6591\u9A6C\u7EB9"
239
+ children: "".concat(_locale.default.ProThemeTools.tableStripe)
239
240
  })
240
241
  }), (0, _jsxRuntime.jsx)("div", {
241
242
  className: "pro-theme-tools-item",
242
243
  children: (0, _jsxRuntime.jsx)(_antd.Switch, {
243
- checkedChildren: "\u5F00",
244
- unCheckedChildren: "\u5173",
244
+ checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
245
+ unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
245
246
  checked: state.zauiStripe,
246
247
  onClick: function onClick(value) {
247
248
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
@@ -272,7 +273,7 @@ var PrdTools = function PrdTools(_ref) {
272
273
  }]);
273
274
  onReset();
274
275
  },
275
- children: "\u91CD\u7F6E"
276
+ children: "".concat(_locale.default.ProThemeTools.reset)
276
277
  })]
277
278
  });
278
279
  };
@@ -16,6 +16,7 @@ var _react = require("react");
16
16
  var _classnames2 = _interopRequireDefault(require("classnames"));
17
17
  var _index = require("./utils/index");
18
18
  var _component = require("./component");
19
+ var _locale = _interopRequireDefault(require("../locale"));
19
20
  var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "tableBorder", "tableStripe", "theme"];
20
21
  /* eslint-disable prefer-const */
21
22
  var defaultCacheTime = 1; // 配置保存时间为一天
@@ -93,7 +94,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
93
94
  input.select();
94
95
  if (document.execCommand('copy')) {
95
96
  document.execCommand('copy');
96
- _antd.message.success('复制成功!');
97
+ _antd.message.success("".concat(_locale.default.ProThemeTools.copySuccess));
97
98
  }
98
99
  document.body.removeChild(input);
99
100
  };
@@ -268,32 +268,19 @@ function List(props) {
268
268
  })]
269
269
  }, onlyKey);
270
270
  };
271
- var _treeData = (0, _react.useMemo)(function () {
272
- function fn() {
273
- var loop = function loop(data, index) {
274
- index++;
275
- var treeRow = data.map(function (item) {
276
- var nodeClass = 'pro-tree-tree-node ';
277
- var isChecked = false;
278
- if (currentClickTreeNode === item[fieldNameValue]) {
279
- nodeClass += ' checked';
280
- isChecked = true;
281
- }
282
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
283
- if (item[fieldNames.children]) {
284
- return {
285
- title: (0, _jsxRuntime.jsx)(TreeNodeRow, {
286
- nodeClass: nodeClass,
287
- item: item,
288
- index: index,
289
- title: title,
290
- isChecked: isChecked,
291
- onlyKey: item[fieldNameValue]
292
- }),
293
- key: item[fieldNameValue],
294
- children: loop(item[fieldNames.children], index)
295
- };
296
- }
271
+ // const _treeData = useMemo(() => {
272
+ function fn() {
273
+ var loop = function loop(data, index) {
274
+ index++;
275
+ var treeRow = data.map(function (item) {
276
+ var nodeClass = 'pro-tree-tree-node ';
277
+ var isChecked = false;
278
+ if (currentClickTreeNode === item[fieldNameValue]) {
279
+ nodeClass += ' checked';
280
+ isChecked = true;
281
+ }
282
+ var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
283
+ if (item[fieldNames.children]) {
297
284
  return {
298
285
  title: (0, _jsxRuntime.jsx)(TreeNodeRow, {
299
286
  nodeClass: nodeClass,
@@ -303,23 +290,37 @@ function List(props) {
303
290
  isChecked: isChecked,
304
291
  onlyKey: item[fieldNameValue]
305
292
  }),
306
- key: item[fieldNameValue]
293
+ key: item[fieldNameValue],
294
+ children: loop(item[fieldNames.children], index)
307
295
  };
308
- });
309
- return treeRow; // .filter((item) => item);
310
- };
296
+ }
297
+ return {
298
+ title: (0, _jsxRuntime.jsx)(TreeNodeRow, {
299
+ nodeClass: nodeClass,
300
+ item: item,
301
+ index: index,
302
+ title: title,
303
+ isChecked: isChecked,
304
+ onlyKey: item[fieldNameValue]
305
+ }),
306
+ key: item[fieldNameValue]
307
+ };
308
+ });
309
+ return treeRow; // .filter((item) => item);
310
+ };
311
311
 
312
- if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
313
- return;
314
- }
315
- var newTreeData = originalTreeData;
316
- if (searchStr) {
317
- newTreeData = (0, _utils.filterCheckedNodes)(originalTreeData, [], searchStr, fieldNames);
318
- }
319
- return loop(newTreeData, -1);
312
+ if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
313
+ return;
314
+ }
315
+ var newTreeData = originalTreeData;
316
+ if (searchStr) {
317
+ newTreeData = (0, _utils.filterCheckedNodes)(originalTreeData, [], searchStr, fieldNames);
320
318
  }
321
- return fn();
322
- }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
319
+ return loop(newTreeData, -1);
320
+ }
321
+ // return fn();
322
+ // }, [searchStr, expandedKeys, showCodeName, originalTreeData, currentClickTreeNode]);
323
+ var _treeData = fn();
323
324
  var onExpand = function onExpand(newExpandedKeys) {
324
325
  setState({
325
326
  expandedKeys: newExpandedKeys,
@@ -78,7 +78,6 @@ var ProTreeModal = function ProTreeModal(props) {
78
78
  var _useSetState = (0, _ahooks.useSetState)({
79
79
  open: false,
80
80
  checkedValues: [],
81
- beforeClearAllValues: [],
82
81
  treeData: [],
83
82
  treeViewData: [],
84
83
  originalTreeData: [],
@@ -265,7 +264,6 @@ var ProTreeModal = function ProTreeModal(props) {
265
264
  }) : [];
266
265
  setState({
267
266
  checkedValues: _checkedValues,
268
- beforeClearAllValues: state.checkedValues,
269
267
  treeViewData: [],
270
268
  checkAll: false
271
269
  });
@@ -274,18 +272,9 @@ var ProTreeModal = function ProTreeModal(props) {
274
272
  * Drawer close
275
273
  */
276
274
  var handleClose = function handleClose() {
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
- }
275
+ setState({
276
+ open: false
277
+ });
289
278
  openChange === null || openChange === void 0 ? void 0 : openChange(false);
290
279
  };
291
280
  /**
@@ -38,7 +38,6 @@ declare const _default: {
38
38
  errorMessage: string;
39
39
  defaultTitle: string;
40
40
  };
41
- ProWaterMark: {};
42
41
  ProTable: {
43
42
  noData: string;
44
43
  resetColumnWidth: string;
@@ -135,5 +134,19 @@ declare const _default: {
135
134
  ProTimeLimit: {
136
135
  foreverText: string;
137
136
  };
137
+ ProThemeTools: {
138
+ title: string;
139
+ copySuccess: string;
140
+ layout: string;
141
+ layoutMode: string[];
142
+ themeColor: string;
143
+ formLabel: string;
144
+ bigText: string;
145
+ flex: string[];
146
+ switchText: string[];
147
+ tableBorder: string;
148
+ tableStripe: string;
149
+ reset: string;
150
+ };
138
151
  };
139
152
  export default _default;
@@ -44,7 +44,6 @@ var _default = exports.default = {
44
44
  errorMessage: 'The configuration config for ProAction must be data',
45
45
  defaultTitle: 'Are you sure delete it?'
46
46
  },
47
- ProWaterMark: {},
48
47
  ProTable: {
49
48
  noData: 'No data',
50
49
  resetColumnWidth: 'Reset column width',
@@ -127,12 +126,12 @@ var _default = exports.default = {
127
126
  ProTreeModal: {
128
127
  checkMsg: 'Please check first',
129
128
  select: 'Please select',
130
- input: 'please enter',
129
+ input: 'Please enter',
131
130
  errorArrayMessage: 'Please return a valid array',
132
131
  selectMin: 'Select at least {min}',
133
132
  selectMax: 'Select at most {max} items',
134
133
  noCheck: 'None selected yet',
135
- checkAll: 'select all',
134
+ checkAll: 'Select all',
136
135
  check: 'selected',
137
136
  clearAll: 'Clear all',
138
137
  checkNumber: '{num} items selected',
@@ -140,5 +139,19 @@ var _default = exports.default = {
140
139
  },
141
140
  ProTimeLimit: {
142
141
  foreverText: 'long term'
142
+ },
143
+ ProThemeTools: {
144
+ title: 'Global style customization ',
145
+ copySuccess: 'Copy success! ',
146
+ layout: 'Layout',
147
+ layoutMode: ['Compact ', 'Regular', 'Loose'],
148
+ themeColor: 'Theme color',
149
+ formLabel: 'Form label',
150
+ bigText: 'Large text mode',
151
+ flex: ['Left align ', 'Right align'],
152
+ switchText: ['on', 'off'],
153
+ tableBorder: 'Table border',
154
+ tableStripe: 'Table zebra',
155
+ reset: 'Reset'
143
156
  }
144
157
  };
@@ -38,7 +38,6 @@ declare const _default: {
38
38
  errorMessage: string;
39
39
  defaultTitle: string;
40
40
  };
41
- ProWaterMark: {};
42
41
  ProTable: {
43
42
  noData: string;
44
43
  resetColumnWidth: string;
@@ -134,5 +133,19 @@ declare const _default: {
134
133
  ProTimeLimit: {
135
134
  foreverText: string;
136
135
  };
136
+ ProThemeTools: {
137
+ title: string;
138
+ copySuccess: string;
139
+ layout: string;
140
+ layoutMode: string[];
141
+ themeColor: string;
142
+ formLabel: string;
143
+ bigText: string;
144
+ flex: string[];
145
+ switchText: string[];
146
+ tableBorder: string;
147
+ tableStripe: string;
148
+ reset: string;
149
+ };
137
150
  };
138
151
  export default _default;
@@ -44,7 +44,6 @@ var _default = exports.default = {
44
44
  errorMessage: 'ProAction 配置 config 必须为数据',
45
45
  defaultTitle: '确认删除吗?'
46
46
  },
47
- ProWaterMark: {},
48
47
  ProTable: {
49
48
  noData: '暂无数据',
50
49
  resetColumnWidth: '重置列宽',
@@ -139,5 +138,19 @@ var _default = exports.default = {
139
138
  },
140
139
  ProTimeLimit: {
141
140
  foreverText: '长期'
141
+ },
142
+ ProThemeTools: {
143
+ title: '全局样式自定义',
144
+ copySuccess: '复制成功!',
145
+ layout: '布局',
146
+ layoutMode: ['紧凑', '常规', '宽松'],
147
+ themeColor: '主题色',
148
+ formLabel: '表单标题',
149
+ bigText: '大字号模式',
150
+ flex: ['左对齐', '右对齐'],
151
+ switchText: ['开', '关'],
152
+ tableBorder: '表格边框',
153
+ tableStripe: '表格斑马纹',
154
+ reset: '重置'
142
155
  }
143
156
  };
@@ -258,7 +258,7 @@
258
258
  & td,
259
259
  & td.ant-table-cell-fix-right,
260
260
  & td.ant-table-cell-fix-left {
261
- background-color: #fff;
261
+ background-color: #fff !important;
262
262
  }
263
263
 
264
264
  & td {
@@ -267,10 +267,10 @@
267
267
  }
268
268
 
269
269
  .ant-table-row:nth-child(odd) {
270
- background-color: @zaui-table-strip-bg;
270
+ background-color: @zaui-table-strip-bg !important;
271
271
 
272
272
  & td {
273
- background-color: @zaui-table-strip-bg;
273
+ background-color: @zaui-table-strip-bg !important;
274
274
  }
275
275
  }
276
276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.2.1-beta.7",
3
+ "version": "3.2.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",