@zat-design/sisyphus-react 3.3.3 → 3.4.0-beta.1

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.
Files changed (79) hide show
  1. package/dist/index.esm.css +32 -5
  2. package/es/ProConfigProvider/index.d.ts +10 -2
  3. package/es/ProConfigProvider/index.js +13 -7
  4. package/es/ProEditLabel/index.js +2 -3
  5. package/es/ProEditTable/components/ActionButton/index.js +6 -6
  6. package/es/ProEditTable/components/RenderField/index.js +5 -5
  7. package/es/ProEditTable/style/index.less +0 -1
  8. package/es/ProEditTable/utils/index.js +2 -4
  9. package/es/ProEnum/index.js +16 -2
  10. package/es/ProEnum/style/index.less +5 -1
  11. package/es/ProForm/components/base/Switch/index.js +0 -1
  12. package/es/ProForm/components/base/TextArea/index.js +1 -3
  13. package/es/ProForm/components/base/TextArea/index.less +7 -0
  14. package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  15. package/es/ProForm/components/combination/Group/index.js +6 -1
  16. package/es/ProForm/components/combination/Group/style/index.less +2 -1
  17. package/es/ProForm/components/combination/ProCombination/index.js +0 -1
  18. package/es/ProForm/components/combination/ProModalSelect/index.js +2 -2
  19. package/es/ProForm/components/render/Render.js +9 -9
  20. package/es/ProForm/components/render/RenderFields.js +7 -9
  21. package/es/ProForm/components/render/propsType.d.ts +1 -0
  22. package/es/ProForm/index.js +36 -6
  23. package/es/ProForm/propsType.d.ts +1 -0
  24. package/es/ProForm/utils/index.d.ts +4 -0
  25. package/es/ProForm/utils/index.js +23 -6
  26. package/es/ProForm/utils/useForm.js +48 -75
  27. package/es/ProForm/utils/useRules.js +4 -2
  28. package/es/ProForm/utils/useShouldUpdate.js +11 -7
  29. package/es/ProStep/index.js +0 -1
  30. package/es/ProThemeTools/component/PrdTools/index.js +3 -3
  31. package/es/ProThemeTools/index.d.ts +1 -1
  32. package/es/ProThemeTools/index.js +14 -4
  33. package/es/ProThemeTools/propsType.d.ts +1 -0
  34. package/es/ProThemeTools/utils/index.js +0 -1
  35. package/es/ProTree/components/Tree.js +0 -1
  36. package/es/ProTreeSelect/index.js +2 -4
  37. package/es/ProUpload/index.js +0 -1
  38. package/es/old/ProEditableTable/index.js +1 -1
  39. package/es/style/theme/antd.less +46 -5
  40. package/lib/ProConfigProvider/index.d.ts +10 -2
  41. package/lib/ProConfigProvider/index.js +14 -7
  42. package/lib/ProEditLabel/index.js +2 -3
  43. package/lib/ProEditTable/components/ActionButton/index.js +6 -6
  44. package/lib/ProEditTable/components/RenderField/index.js +5 -5
  45. package/lib/ProEditTable/style/index.less +0 -1
  46. package/lib/ProEditTable/utils/index.js +2 -4
  47. package/lib/ProEnum/index.js +16 -2
  48. package/lib/ProEnum/style/index.less +5 -1
  49. package/lib/ProForm/components/base/TextArea/index.js +1 -3
  50. package/lib/ProForm/components/base/TextArea/index.less +7 -0
  51. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  52. package/lib/ProForm/components/combination/Group/index.js +6 -1
  53. package/lib/ProForm/components/combination/Group/style/index.less +2 -1
  54. package/lib/ProForm/components/combination/ProCombination/index.js +0 -1
  55. package/lib/ProForm/components/combination/ProModalSelect/index.js +2 -2
  56. package/lib/ProForm/components/old/InputRange/index.js +1 -0
  57. package/lib/ProForm/components/render/Render.js +9 -9
  58. package/lib/ProForm/components/render/RenderFields.js +7 -9
  59. package/lib/ProForm/components/render/propsType.d.ts +1 -0
  60. package/lib/ProForm/index.js +35 -5
  61. package/lib/ProForm/propsType.d.ts +1 -0
  62. package/lib/ProForm/utils/index.d.ts +4 -0
  63. package/lib/ProForm/utils/index.js +24 -7
  64. package/lib/ProForm/utils/useForm.js +48 -75
  65. package/lib/ProForm/utils/useRules.js +4 -2
  66. package/lib/ProForm/utils/useShouldUpdate.js +10 -6
  67. package/lib/ProStep/index.js +0 -1
  68. package/lib/ProThemeTools/component/PrdTools/index.js +2 -2
  69. package/lib/ProThemeTools/index.d.ts +1 -1
  70. package/lib/ProThemeTools/index.js +13 -3
  71. package/lib/ProThemeTools/propsType.d.ts +1 -0
  72. package/lib/ProThemeTools/utils/index.js +0 -1
  73. package/lib/ProTree/components/Tree.js +0 -1
  74. package/lib/ProTree/index.js +1 -0
  75. package/lib/ProTreeSelect/index.js +2 -4
  76. package/lib/ProUpload/index.js +0 -1
  77. package/lib/old/ProEditableTable/index.js +1 -1
  78. package/lib/style/theme/antd.less +46 -5
  79. package/package.json +1 -1
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.getAllNamePath = exports.findOptionByValue = exports.filterInternalFields = exports.deleteForPath = exports.customEqualForFun = exports.contrast = void 0;
8
+ exports.getAllNamePath = exports.findOptionByValue = exports.filterInternalFields = exports.equalDependencies = exports.deleteForPath = exports.customEqualForFun = exports.contrast = void 0;
9
9
  exports.getArrayBeforeNumber = getArrayBeforeNumber;
10
10
  exports.hasRowKey = exports.getLayout = exports.getDecimalDigits = void 0;
11
11
  exports.initialValuesToNames = initialValuesToNames;
@@ -150,18 +150,22 @@ var splitNameStr = exports.splitNameStr = function splitNameStr(name) {
150
150
  // 过滤掉字段名中包含 '-' 的字段
151
151
  var filterInternalFields = exports.filterInternalFields = function filterInternalFields(values) {
152
152
  var nextValues = values;
153
+ // fix: braft-editor对象不可遍历
154
+ if (values === null || values === void 0 ? void 0 : values._immutable) {
155
+ return nextValues;
156
+ }
153
157
  if (Array.isArray(nextValues)) {
154
- nextValues.forEach(function (item) {
155
- filterInternalFields(item);
158
+ return nextValues.map(function (item) {
159
+ return filterInternalFields(item);
156
160
  });
157
161
  }
158
162
  if ((0, _lodash.isObject)(nextValues)) {
163
+ var result = {};
159
164
  Object.keys(nextValues).forEach(function (key) {
160
- if (key.includes('-')) {
161
- delete nextValues[key];
162
- }
163
- filterInternalFields(nextValues[key]);
165
+ if (key.includes('-')) return;
166
+ result[key] = filterInternalFields(nextValues[key]);
164
167
  });
168
+ return result;
165
169
  }
166
170
  return nextValues;
167
171
  };
@@ -419,4 +423,17 @@ var findOptionByValue = exports.findOptionByValue = function findOptionByValue(t
419
423
  }
420
424
  }
421
425
  }
426
+ };
427
+ /**
428
+ * 对比依赖列表中的 值是否变更
429
+ */
430
+ var equalDependencies = exports.equalDependencies = function equalDependencies(dependencies, prevValues, currentValues) {
431
+ if (dependencies === null || dependencies === void 0 ? void 0 : dependencies.length) {
432
+ return dependencies.some(function (namePath) {
433
+ var prevValue = (0, _lodash.get)(prevValues, namePath);
434
+ var currentValue = (0, _lodash.get)(currentValues, namePath);
435
+ return prevValue !== currentValue;
436
+ });
437
+ }
438
+ return false;
422
439
  };
@@ -9,86 +9,59 @@ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helper
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _antd = require("antd");
12
- var _react = require("react");
13
- var _lodash = require("lodash");
14
- var _FieldContext = require("rc-field-form/es/FieldContext");
15
- var _ = require(".");
12
+ var _index = require("./index");
16
13
  var useForm = exports.useForm = function useForm(originForm) {
17
14
  var _Form$useForm = _antd.Form.useForm(originForm),
18
15
  _Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),
19
16
  form = _Form$useForm2[0];
20
17
  var getFieldsValue = form.getFieldsValue,
21
- validateFields = form.validateFields,
22
- getFieldValue = form.getFieldValue;
23
- (0, _react.useMemo)(function () {
24
- var _getFieldsValue = function _getFieldsValue() {
25
- var firstProps = !(arguments.length <= 0 ? undefined : arguments[0]) ? true : arguments.length <= 0 ? undefined : arguments[0];
26
- var values = getFieldsValue(firstProps, arguments.length <= 1 ? undefined : arguments[1]);
27
- if ((arguments.length <= 0 ? undefined : arguments[0]) === undefined) {
28
- var result = (0, _lodash.merge)({}, values);
29
- // @ts-ignore
30
- var internalHooks = form.getInternalHooks(_FieldContext.HOOK_MARK);
31
- var fields = internalHooks.getFields();
32
- var deletePath = [];
33
- // 找到带'-'的name
34
- fields.forEach(function (field) {
35
- var name = field.name;
36
- if (Array.isArray(name)) {
37
- var index = name.findIndex(function (item) {
38
- return typeof item === 'string' && item.includes('-');
39
- });
40
- if (index !== -1) deletePath.push(name);
41
- }
42
- if (typeof name === 'string' && name.includes('-')) {
43
- deletePath.push(name);
44
- }
45
- });
46
- // 执行删除操作
47
- deletePath.forEach(function (item) {
48
- (0, _.deleteForPath)(result, item);
49
- });
50
- return result;
51
- }
52
- return values;
18
+ validateFields = form.validateFields;
19
+ // @ts-ignore
20
+ var _getFieldsValue = function _getFieldsValue(nameList, filterFunc) {
21
+ // 全部查询
22
+ if (nameList !== true) {
23
+ var values = getFieldsValue(true, filterFunc);
24
+ return (0, _index.filterInternalFields)(values);
25
+ }
26
+ return getFieldsValue(nameList, filterFunc);
27
+ };
28
+ var _validateFields = /*#__PURE__*/function () {
29
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(nameList) {
30
+ var _len,
31
+ rest,
32
+ _key,
33
+ values,
34
+ _values,
35
+ _args = arguments;
36
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
37
+ while (1) switch (_context.prev = _context.next) {
38
+ case 0:
39
+ for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
40
+ rest[_key - 1] = _args[_key];
41
+ }
42
+ _context.next = 3;
43
+ return validateFields.apply(void 0, [nameList].concat(rest));
44
+ case 3:
45
+ values = _context.sent;
46
+ if (!nameList) {
47
+ _context.next = 6;
48
+ break;
49
+ }
50
+ return _context.abrupt("return", values);
51
+ case 6:
52
+ _values = _getFieldsValue();
53
+ return _context.abrupt("return", _values);
54
+ case 8:
55
+ case "end":
56
+ return _context.stop();
57
+ }
58
+ }, _callee);
59
+ }));
60
+ return function _validateFields(_x) {
61
+ return _ref.apply(this, arguments);
53
62
  };
54
- var _validateFields = /*#__PURE__*/function () {
55
- var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(nameList) {
56
- var _len,
57
- rest,
58
- _key,
59
- values,
60
- _values,
61
- _args = arguments;
62
- return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
63
- while (1) switch (_context.prev = _context.next) {
64
- case 0:
65
- for (_len = _args.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
66
- rest[_key - 1] = _args[_key];
67
- }
68
- _context.next = 3;
69
- return validateFields.apply(void 0, [nameList].concat(rest));
70
- case 3:
71
- values = _context.sent;
72
- if (!nameList) {
73
- _context.next = 6;
74
- break;
75
- }
76
- return _context.abrupt("return", values);
77
- case 6:
78
- _values = _getFieldsValue();
79
- return _context.abrupt("return", _values);
80
- case 8:
81
- case "end":
82
- return _context.stop();
83
- }
84
- }, _callee);
85
- }));
86
- return function _validateFields(_x) {
87
- return _ref.apply(this, arguments);
88
- };
89
- }();
90
- form.getFieldsValue = _getFieldsValue;
91
- form.validateFields = _validateFields;
92
- }, [form]);
63
+ }();
64
+ form.getFieldsValue = _getFieldsValue;
65
+ form.validateFields = _validateFields;
93
66
  return [form];
94
67
  };
@@ -53,7 +53,7 @@ var useRules = function useRules(props) {
53
53
  internalRule.rules = internalRule.rules && (0, _rulesCreator.rulesCreator)(internalRule.rules, _label, isSelect);
54
54
  (0, _react.useEffect)(function () {
55
55
  // 添加完整性校验
56
- if (names && !(0, _lodash.isBoolean)(labelRequired) || type === 'Group' && Array.isArray(names) && required) {
56
+ if (names && !(0, _lodash.isBoolean)(labelRequired)) {
57
57
  var customRequired = {
58
58
  validator: function validator(rules, value) {
59
59
  // 完整性校验, 空数组不校验, 数组有值且值不完整则校验不通过
@@ -63,7 +63,9 @@ var useRules = function useRules(props) {
63
63
  return Promise.resolve();
64
64
  }
65
65
  };
66
- internalRule.rules.push(customRequired);
66
+ if (!(type === 'Group' && Array.isArray(names) && !required)) {
67
+ internalRule.rules.push(customRequired);
68
+ }
67
69
  }
68
70
  }, [internalRule]);
69
71
  return internalRule;
@@ -27,7 +27,8 @@ var useShouldUpdate = function useShouldUpdate(props) {
27
27
  clearNotShow = formItemProps.clearNotShow,
28
28
  index = formItemProps.index,
29
29
  namePath = formItemProps.namePath,
30
- names = formItemProps.names;
30
+ names = formItemProps.names,
31
+ dependencies = formItemProps.dependencies;
31
32
  var timerRef = (0, _react.useRef)();
32
33
  var showRef = (0, _react.useRef)();
33
34
  var disabledRef = (0, _react.useRef)();
@@ -174,11 +175,14 @@ var useShouldUpdate = function useShouldUpdate(props) {
174
175
  clearInterval(timerRef.current);
175
176
  }
176
177
  }
177
- // 当校验规则改变的时候 重新执行校验
178
- if (_required !== requiredRef.current || !(0, _lodash.isEqualWith)(rulesRef.current, _rules, _index.customEqualForFun)) {
179
- form.validateFields([name]);
180
- }
181
- if (_show !== showRef.current || _disabled !== disabledRef.current || _required !== requiredRef.current || !(0, _lodash.isEqualWith)(rulesRef.current, _rules, _index.customEqualForFun) || !(0, _lodash.isEqualWith)(fieldPropsRef.current, _fieldProps, _index.customEqualForFun) || !(0, _lodash.isEqualWith)(originComponentRef.current, _component, _index.customEqualForFun)) {
178
+ // // 当校验规则改变的时候 重新执行校验 导致: 第一次进页面直接触发校验
179
+ // if (
180
+ // _required !== requiredRef.current ||
181
+ // !isEqualWith(rulesRef.current, _rules, customEqualForFun)
182
+ // ) {
183
+ // form.validateFields([name]);
184
+ // }
185
+ if (_show !== showRef.current || _disabled !== disabledRef.current || _required !== requiredRef.current || !(0, _lodash.isEqualWith)(rulesRef.current, _rules, _index.customEqualForFun) || !(0, _lodash.isEqualWith)(fieldPropsRef.current, _fieldProps, _index.customEqualForFun) || !(0, _lodash.isEqualWith)(originComponentRef.current, _component, _index.customEqualForFun) || (0, _index.equalDependencies)(dependencies, prevValues, _currentValues)) {
182
186
  showRef.current = _show;
183
187
  disabledRef.current = _disabled;
184
188
  requiredRef.current = _required;
@@ -167,7 +167,6 @@ var ProStep = function ProStep(_ref) {
167
167
  subtree: true,
168
168
  childList: true // 是否观察子元素的添加或删除
169
169
  };
170
-
171
170
  observer.observe(targetElement, config);
172
171
  };
173
172
  (0, _ahooks.useDeepCompareEffect)(function () {
@@ -249,9 +249,9 @@ var PrdTools = function PrdTools(_ref) {
249
249
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
250
250
  zauiStripe: value
251
251
  }));
252
- (0, _index.setTableNoStripe)(value);
253
252
  (0, _index.setThemes)({
254
- 'zaui-stripe': value
253
+ 'zaui-stripe': value,
254
+ 'zaui-table-strip-bg': value ? '#fafafa' : '#ffffff'
255
255
  });
256
256
  }
257
257
  })
@@ -1,6 +1,6 @@
1
1
  import type { ProThemeToolsProps } from './propsType';
2
2
  declare const ProThemeTools: {
3
- ({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, ...props }: ProThemeToolsProps): JSX.Element;
3
+ ({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsProps): JSX.Element;
4
4
  defaultProps: {
5
5
  size: number;
6
6
  mode: string;
@@ -13,11 +13,13 @@ var _jsxRuntime = require("react/jsx-runtime");
13
13
  var _icons = require("@ant-design/icons");
14
14
  var _antd = require("antd");
15
15
  var _react = require("react");
16
+ var _ahooks = require("ahooks");
17
+ var _lodash = require("lodash");
16
18
  var _classnames2 = _interopRequireDefault(require("classnames"));
17
19
  var _index = require("./utils/index");
18
20
  var _component = require("./component");
19
21
  var _locale = _interopRequireDefault(require("../locale"));
20
- var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "prefixCls", "tableBorder", "tableStripe", "theme"];
22
+ var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "prefixCls", "tableBorder", "tableStripe", "theme", "onChange"];
21
23
  /* eslint-disable prefer-const */
22
24
  var defaultCacheTime = 1; // 配置保存时间为一天
23
25
  var defaultThemeConfig = {
@@ -50,6 +52,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
50
52
  tableStripe = _ref$tableStripe === void 0 ? false : _ref$tableStripe,
51
53
  _ref$theme = _ref.theme,
52
54
  theme = _ref$theme === void 0 ? {} : _ref$theme,
55
+ onChange = _ref.onChange,
53
56
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
54
57
  var _useState = (0, _react.useState)(false),
55
58
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -59,6 +62,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
59
62
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
60
63
  state = _useState4[0],
61
64
  setState = _useState4[1];
65
+ var previousState = (0, _ahooks.usePrevious)(state);
62
66
  var zauiBrand = state.zauiBrand,
63
67
  zauiStripe = state.zauiStripe,
64
68
  zauiTableBorder = state.zauiTableBorder;
@@ -119,7 +123,6 @@ var ProThemeTools = function ProThemeTools(_ref) {
119
123
  return ["".concat((0, _index.getKebabCase)(item === null || item === void 0 ? void 0 : item[0])), ['zauiSize'].includes(item === null || item === void 0 ? void 0 : item[0]) || typeof (item === null || item === void 0 ? void 0 : item[1]) !== 'number' ? item === null || item === void 0 ? void 0 : item[1] : "".concat(item === null || item === void 0 ? void 0 : item[1], "px") // zauiSize取数字
120
124
  ];
121
125
  }));
122
-
123
126
  setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), localThemeConfig));
124
127
  (0, _index.setThemes)(cssVariables);
125
128
  _antd.ConfigProvider.config({
@@ -154,7 +157,9 @@ var ProThemeTools = function ProThemeTools(_ref) {
154
157
  }, [zauiBrand]);
155
158
  // 斑马纹设置
156
159
  (0, _react.useEffect)(function () {
157
- (0, _index.setTableNoStripe)(zauiStripe, prefixCls);
160
+ (0, _index.setThemes)({
161
+ 'zaui-table-strip-bg': zauiStripe ? '#fafafa' : '#ffffff'
162
+ });
158
163
  }, [zauiStripe]);
159
164
  // 表格边框设置
160
165
  (0, _react.useEffect)(function () {
@@ -170,6 +175,11 @@ var ProThemeTools = function ProThemeTools(_ref) {
170
175
  localStorage.setItem('themeConfig', JSON.stringify(newThemeConfig));
171
176
  }
172
177
  }, [state, cacheTime]);
178
+ (0, _ahooks.useUpdateEffect)(function () {
179
+ if (!(0, _lodash.isEqual)(state, previousState) && visible) {
180
+ onChange === null || onChange === void 0 ? void 0 : onChange(state);
181
+ }
182
+ }, [state]);
173
183
  var cls = (0, _classnames2.default)((0, _defineProperty2.default)({
174
184
  'pro-theme-tools': true,
175
185
  'pro-theme-tools-follow': iconFollowTheme
@@ -27,6 +27,7 @@ export interface ProThemeToolsProps {
27
27
  tableStripe?: boolean;
28
28
  /** 统一样式前缀, 默认ant */
29
29
  prefixCls?: string;
30
+ onChange?: (record: any) => void;
30
31
  [key: string]: any;
31
32
  }
32
33
  export interface LocalThemeConfigPropsType {
@@ -55,7 +55,6 @@ var getKebabCase = exports.getKebabCase = function getKebabCase(str) {
55
55
  if (temp.slice(0, 1) === '-') {
56
56
  temp = temp.slice(1); // 如果首字母是大写,执行replace时会多一个-,需要去掉
57
57
  }
58
-
59
58
  return temp;
60
59
  };
61
60
  /** JS实现对象驼峰命名与横线命名的转换 */
@@ -308,7 +308,6 @@ function List(props) {
308
308
  });
309
309
  return treeRow; // .filter((item) => item);
310
310
  };
311
-
312
311
  if ((other === null || other === void 0 ? void 0 : other.mode) === 'view') {
313
312
  return;
314
313
  }
@@ -16,6 +16,7 @@ var _ProTreeSelect = _interopRequireDefault(require("../ProTreeSelect"));
16
16
  *@Author: liudongliang
17
17
  *@Description: ProTree组件,集成了tree和treeSelect
18
18
  */
19
+
19
20
  var ProTreeHandle = function ProTreeHandle(props) {
20
21
  var _props$mode = props.mode,
21
22
  mode = _props$mode === void 0 ? 'tree' : _props$mode;
@@ -21,7 +21,6 @@ var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onCha
21
21
  _excluded2 = ["children"];
22
22
  var SHOW_PARENT = _antd.TreeSelect.SHOW_PARENT;
23
23
  var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
24
- var _classnames2;
25
24
  // 全局属性配置在ConfigProvider
26
25
  var _ref = (0, _ProConfigProvider.useProConfig)('ProTreeSelect') || {},
27
26
  _ref$fieldNames = _ref.fieldNames,
@@ -365,7 +364,6 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
365
364
  // currentAllNodeChild.push(item);
366
365
  // }
367
366
  }
368
-
369
367
  return currentAllNodeChild;
370
368
  };
371
369
  sourceList = filterData(sourceList);
@@ -471,9 +469,9 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
471
469
  'pro-tree-select': true
472
470
  }, "".concat(className), className));
473
471
  var innerClass = treeCheckable ? 'checkable-tree pro' : "".concat(tenCountClass, " signal-tree");
474
- var dropDownClassName = (0, _classnames3.default)((_classnames2 = {
472
+ var dropDownClassName = (0, _classnames3.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
475
473
  'pro-tree-select-drop-down-container': true
476
- }, (0, _defineProperty2.default)(_classnames2, "".concat(innerClass), true), (0, _defineProperty2.default)(_classnames2, "".concat(popupClassName), popupClassName), _classnames2));
474
+ }, "".concat(innerClass), true), "".concat(popupClassName), popupClassName));
477
475
  var treeProps = (0, _objectSpread2.default)({
478
476
  disabled: disabled,
479
477
  showSearch: showSearch,
@@ -98,7 +98,6 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
98
98
  response: file === null || file === void 0 ? void 0 : file.response
99
99
  // url: file?.response?.data?.url,
100
100
  };
101
-
102
101
  if (transformResponse) {
103
102
  var data = transformResponse(file.response) || {};
104
103
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, nfile), data);
@@ -398,7 +398,7 @@ var ProEditableTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
398
398
  }, antButtonProps), {}, {
399
399
  children: buttonText
400
400
  }))]
401
- }) : /*#__PURE__*/(0, _react.cloneElement)(buttonText, antButtonProps)
401
+ }) : ( /*#__PURE__*/(0, _react.cloneElement)(buttonText, antButtonProps))
402
402
  }) : null
403
403
  });
404
404
  };
@@ -93,7 +93,8 @@
93
93
 
94
94
  .@{ant-prefix}-input[disabled],
95
95
  .@{ant-prefix}-select-disabled,
96
- .@{ant-prefix}-select-disabled.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector,
96
+ .@{ant-prefix}-select-disabled.@{ant-prefix}-select:not(.@{ant-prefix}-select-customize-input)
97
+ .@{ant-prefix}-select-selector,
97
98
  .@{ant-prefix}-input-number-disabled,
98
99
  .@{ant-prefix}-picker-input > input[disabled],
99
100
  .@{ant-prefix}-select-disabled.@{ant-prefix}-select-multiple .@{ant-prefix}-select-selection-item {
@@ -218,7 +219,11 @@
218
219
  .@{ant-prefix}-table tfoot > tr > td {
219
220
  padding: calc(4px + var(--zaui-size) * 8px);
220
221
  }
221
- .@{ant-prefix}-table-tbody > tr > td > .@{ant-prefix}-table-wrapper:only-child .@{ant-prefix}-table,
222
+ .@{ant-prefix}-table-tbody
223
+ > tr
224
+ > td
225
+ > .@{ant-prefix}-table-wrapper:only-child
226
+ .@{ant-prefix}-table,
222
227
  .@{ant-prefix}-table-tbody
223
228
  > tr
224
229
  > td
@@ -508,7 +513,8 @@
508
513
  border-radius: @zaui-border-radius;
509
514
  }
510
515
 
511
- .@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input) .@{ant-prefix}-select-selector {
516
+ .@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
517
+ .@{ant-prefix}-select-selector {
512
518
  .set-text-color();
513
519
  .set-text-size();
514
520
  width: 100%;
@@ -523,8 +529,12 @@
523
529
  border-radius: @zaui-border-radius;
524
530
  }
525
531
 
526
- .@{ant-prefix}-pagination-jump-prev .@{ant-prefix}-pagination-item-container .@{ant-prefix}-pagination-item-link-icon,
527
- .@{ant-prefix}-pagination-jump-next .@{ant-prefix}-pagination-item-container .@{ant-prefix}-pagination-item-link-icon {
532
+ .@{ant-prefix}-pagination-jump-prev
533
+ .@{ant-prefix}-pagination-item-container
534
+ .@{ant-prefix}-pagination-item-link-icon,
535
+ .@{ant-prefix}-pagination-jump-next
536
+ .@{ant-prefix}-pagination-item-container
537
+ .@{ant-prefix}-pagination-item-link-icon {
528
538
  color: @zaui-brand;
529
539
  }
530
540
  }
@@ -705,3 +715,34 @@
705
715
  .@{ant-prefix}-popover {
706
716
  width: max-content;
707
717
  }
718
+
719
+ // tooltip样式重载
720
+ .@{ant-prefix}-tooltip {
721
+ > .ant-tooltip-content {
722
+ > .ant-tooltip-inner {
723
+ color: rgb(29, 33, 41);
724
+ background-color: #fff;
725
+ box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
726
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05);
727
+ &::selection {
728
+ color: inherit !important;
729
+ background: rgba(@primary-color, 0.3) !important;
730
+ }
731
+ > div {
732
+ &::selection {
733
+ color: inherit !important;
734
+ background: rgba(@primary-color, 0.3) !important;
735
+ }
736
+ }
737
+ }
738
+ > .ant-tooltip-arrow {
739
+ > .ant-tooltip-arrow-content {
740
+ --antd-arrow-background-color: linear-gradient(
741
+ to right bottom,
742
+ rgba(255, 255, 255, 0.95),
743
+ rgba(255, 255, 255, 1)
744
+ );
745
+ }
746
+ }
747
+ }
748
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.3",
3
+ "version": "3.4.0-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",