@zat-design/sisyphus-react 3.13.3-beta.1 → 3.13.4-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.
@@ -3654,6 +3654,15 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3654
3654
  .pro-tree-modal-placeholder {
3655
3655
  color: #939499;
3656
3656
  }
3657
+ .pro-tree-modal .ant-input-group-wrapper:hover .pro-tree-modal-view-svg {
3658
+ color: var(--zaui-brand);
3659
+ }
3660
+ .pro-tree-modal .pro-tree-modal-view-svg div {
3661
+ display: -webkit-box;
3662
+ display: -webkit-flex;
3663
+ display: -ms-flexbox;
3664
+ display: flex;
3665
+ }
3657
3666
  .pro-tree-modal-content {
3658
3667
  display: -webkit-box;
3659
3668
  display: -webkit-flex;
@@ -3711,7 +3720,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3711
3720
  .pro-tree-modal-box:first-child {
3712
3721
  margin-right: var(--zaui-space-size-md, 16px);
3713
3722
  }
3714
- .pro-tree-modal-box .viewSvg > div {
3723
+ .pro-tree-modal-box .pro-tree-modal-search-svg > div {
3715
3724
  display: -webkit-box;
3716
3725
  display: -webkit-flex;
3717
3726
  display: -ms-flexbox;
@@ -3849,7 +3858,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3849
3858
  -ms-flex-align: center;
3850
3859
  align-items: center;
3851
3860
  }
3852
- .pro-tree-modal-isView .viewSvg {
3861
+ .pro-tree-modal-isView .pro-tree-modal-view-svg {
3853
3862
  margin-left: var(--zaui-space-size-sm, 8px);
3854
3863
  }
3855
3864
  .pro-tree-modal-tree-content {
package/dist/less.esm.css CHANGED
@@ -3654,6 +3654,15 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3654
3654
  .pro-tree-modal-placeholder {
3655
3655
  color: #939499;
3656
3656
  }
3657
+ .pro-tree-modal .ant-input-group-wrapper:hover .pro-tree-modal-view-svg {
3658
+ color: var(--zaui-brand);
3659
+ }
3660
+ .pro-tree-modal .pro-tree-modal-view-svg div {
3661
+ display: -webkit-box;
3662
+ display: -webkit-flex;
3663
+ display: -ms-flexbox;
3664
+ display: flex;
3665
+ }
3657
3666
  .pro-tree-modal-content {
3658
3667
  display: -webkit-box;
3659
3668
  display: -webkit-flex;
@@ -3711,7 +3720,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3711
3720
  .pro-tree-modal-box:first-child {
3712
3721
  margin-right: var(--zaui-space-size-md, 16px);
3713
3722
  }
3714
- .pro-tree-modal-box .viewSvg > div {
3723
+ .pro-tree-modal-box .pro-tree-modal-search-svg > div {
3715
3724
  display: -webkit-box;
3716
3725
  display: -webkit-flex;
3717
3726
  display: -ms-flexbox;
@@ -3849,7 +3858,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3849
3858
  -ms-flex-align: center;
3850
3859
  align-items: center;
3851
3860
  }
3852
- .pro-tree-modal-isView .viewSvg {
3861
+ .pro-tree-modal-isView .pro-tree-modal-view-svg {
3853
3862
  margin-left: var(--zaui-space-size-sm, 8px);
3854
3863
  }
3855
3864
  .pro-tree-modal-tree-content {
@@ -15,6 +15,7 @@ import SearchTitle from './SearchTitle';
15
15
  import CloseIcon from './CloseIcon';
16
16
  import SortableItem from './SortableItem';
17
17
  import { CASCADER } from '..';
18
+ import { isEmpty } from '../../utils';
18
19
  function List(props, ref) {
19
20
  var checkedValues = props.checkedValues,
20
21
  disabled = props.disabled,
@@ -108,6 +109,9 @@ function List(props, ref) {
108
109
  }
109
110
  };
110
111
  function getLineHeight(string, width) {
112
+ if (isEmpty(string)) {
113
+ return 0;
114
+ }
111
115
  // 创建临时元素
112
116
  var temp = document.createElement('div');
113
117
  temp.style.position = 'absolute';
@@ -77,7 +77,7 @@ function Trigger(props) {
77
77
  }), _jsx("div", {
78
78
  className: "pro-enum-input-addonAfter",
79
79
  children: _jsx(ReactSVG, {
80
- className: "viewSvg",
80
+ className: "pro-tree-modal-view-svg",
81
81
  src: viewSvg,
82
82
  onClick: onIconClick
83
83
  })
@@ -139,7 +139,7 @@ function Trigger(props) {
139
139
  onClick: handleClearAll
140
140
  })
141
141
  }), _jsx(ReactSVG, {
142
- className: "viewSvg",
142
+ className: "pro-tree-modal-view-svg",
143
143
  src: viewSvg,
144
144
  onClick: onIconClick
145
145
  })]
@@ -291,14 +291,13 @@ var ProTreeModal = function ProTreeModal(props) {
291
291
  })) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(function (item) {
292
292
  return item[fieldNameValue];
293
293
  }) : [];
294
+ onChange === null || onChange === void 0 ? void 0 : onChange([]);
294
295
  setState({
295
296
  checkedValues: _checkedValues,
296
297
  beforeClearAllValues: state.checkedValues,
297
298
  treeViewData: [],
298
299
  checkAll: false
299
300
  });
300
- /* ******** fix:3.4.4-beta.4 点击清空全部不应该回调、所有的都是应该走统一的确定 ********* */
301
- // onChange?.(_checkedValues);
302
301
  };
303
302
  /**
304
303
  * Drawer close
@@ -535,7 +534,7 @@ var ProTreeModal = function ProTreeModal(props) {
535
534
  });
536
535
  }
537
536
  }, {
538
- wait: 300
537
+ wait: 0
539
538
  }),
540
539
  onSearch = _useDebounceFn.run;
541
540
  var handleSetSearchStr = function handleSetSearchStr(str) {
@@ -593,7 +592,7 @@ var ProTreeModal = function ProTreeModal(props) {
593
592
  appointChange: appointChange,
594
593
  appointProps: appointProps
595
594
  });
596
- }, [state.checkedValues, state.checkAll, style, disabled, isView]);
595
+ }, [state.checkedValues, state.checkAll, style, disabled, isView, value]);
597
596
  /**
598
597
  * 全选操作
599
598
  */
@@ -771,7 +770,7 @@ var ProTreeModal = function ProTreeModal(props) {
771
770
  return _jsx(_Fragment, {
772
771
  children: _jsxs("div", {
773
772
  className: "pro-tree-modal",
774
- children: [open === undefined ? TriggerComponent : null, _jsx(ProDrawerForm, {
773
+ children: [open === undefined && TriggerComponent, _jsx(ProDrawerForm, {
775
774
  onOk: handleFinish,
776
775
  onCancel: handleClose,
777
776
  okDisabled: disabled,
@@ -799,7 +798,7 @@ var ProTreeModal = function ProTreeModal(props) {
799
798
  return handleSetSearchStr(e.target.value);
800
799
  },
801
800
  prefix: _jsx(ReactSVG, {
802
- className: "viewSvg",
801
+ className: "pro-tree-modal-search-svg",
803
802
  src: searchSVG
804
803
  })
805
804
  }), _jsx("div", {
@@ -10,6 +10,17 @@
10
10
  color: #939499;
11
11
  }
12
12
 
13
+ .@{ant-prefix}-input-group-wrapper:hover {
14
+ .pro-tree-modal-view-svg {
15
+ color: var(--zaui-brand);
16
+ }
17
+ }
18
+ .pro-tree-modal-view-svg {
19
+ div {
20
+ display: flex;
21
+ }
22
+ }
23
+
13
24
  &-content {
14
25
  display: flex;
15
26
  flex-direction: row;
@@ -59,7 +70,7 @@
59
70
  margin-right: var(--zaui-space-size-md, 16px);
60
71
  }
61
72
 
62
- .viewSvg > div {
73
+ .pro-tree-modal-search-svg > div {
63
74
  display: flex;
64
75
  }
65
76
 
@@ -167,7 +178,7 @@
167
178
  display: flex;
168
179
  align-items: center;
169
180
 
170
- .viewSvg {
181
+ .pro-tree-modal-view-svg {
171
182
  margin-left: var(--zaui-space-size-sm, 8px);
172
183
  }
173
184
  }
@@ -16,6 +16,7 @@ var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
16
16
  var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
17
17
  var _SortableItem = _interopRequireDefault(require("./SortableItem"));
18
18
  var _ = require("..");
19
+ var _utils = require("../../utils");
19
20
  /* eslint-disable brace-style */
20
21
 
21
22
  function List(props, ref) {
@@ -111,6 +112,9 @@ function List(props, ref) {
111
112
  }
112
113
  };
113
114
  function getLineHeight(string, width) {
115
+ if ((0, _utils.isEmpty)(string)) {
116
+ return 0;
117
+ }
114
118
  // 创建临时元素
115
119
  var temp = document.createElement('div');
116
120
  temp.style.position = 'absolute';
@@ -80,7 +80,7 @@ function Trigger(props) {
80
80
  }), (0, _jsxRuntime.jsx)("div", {
81
81
  className: "pro-enum-input-addonAfter",
82
82
  children: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
83
- className: "viewSvg",
83
+ className: "pro-tree-modal-view-svg",
84
84
  src: _view.default,
85
85
  onClick: onIconClick
86
86
  })
@@ -142,7 +142,7 @@ function Trigger(props) {
142
142
  onClick: handleClearAll
143
143
  })
144
144
  }), (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
145
- className: "viewSvg",
145
+ className: "pro-tree-modal-view-svg",
146
146
  src: _view.default,
147
147
  onClick: onIconClick
148
148
  })]
@@ -292,14 +292,13 @@ var ProTreeModal = function ProTreeModal(props) {
292
292
  })) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(function (item) {
293
293
  return item[fieldNameValue];
294
294
  }) : [];
295
+ onChange === null || onChange === void 0 ? void 0 : onChange([]);
295
296
  setState({
296
297
  checkedValues: _checkedValues,
297
298
  beforeClearAllValues: state.checkedValues,
298
299
  treeViewData: [],
299
300
  checkAll: false
300
301
  });
301
- /* ******** fix:3.4.4-beta.4 点击清空全部不应该回调、所有的都是应该走统一的确定 ********* */
302
- // onChange?.(_checkedValues);
303
302
  };
304
303
  /**
305
304
  * Drawer close
@@ -536,7 +535,7 @@ var ProTreeModal = function ProTreeModal(props) {
536
535
  });
537
536
  }
538
537
  }, {
539
- wait: 300
538
+ wait: 0
540
539
  }),
541
540
  onSearch = _useDebounceFn.run;
542
541
  var handleSetSearchStr = function handleSetSearchStr(str) {
@@ -594,7 +593,7 @@ var ProTreeModal = function ProTreeModal(props) {
594
593
  appointChange: appointChange,
595
594
  appointProps: appointProps
596
595
  });
597
- }, [state.checkedValues, state.checkAll, style, disabled, isView]);
596
+ }, [state.checkedValues, state.checkAll, style, disabled, isView, value]);
598
597
  /**
599
598
  * 全选操作
600
599
  */
@@ -772,7 +771,7 @@ var ProTreeModal = function ProTreeModal(props) {
772
771
  return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
773
772
  children: (0, _jsxRuntime.jsxs)("div", {
774
773
  className: "pro-tree-modal",
775
- children: [open === undefined ? TriggerComponent : null, (0, _jsxRuntime.jsx)(_index.ProDrawerForm, {
774
+ children: [open === undefined && TriggerComponent, (0, _jsxRuntime.jsx)(_index.ProDrawerForm, {
776
775
  onOk: handleFinish,
777
776
  onCancel: handleClose,
778
777
  okDisabled: disabled,
@@ -800,7 +799,7 @@ var ProTreeModal = function ProTreeModal(props) {
800
799
  return handleSetSearchStr(e.target.value);
801
800
  },
802
801
  prefix: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
803
- className: "viewSvg",
802
+ className: "pro-tree-modal-search-svg",
804
803
  src: _inputSearch.default
805
804
  })
806
805
  }), (0, _jsxRuntime.jsx)("div", {
@@ -10,6 +10,17 @@
10
10
  color: #939499;
11
11
  }
12
12
 
13
+ .@{ant-prefix}-input-group-wrapper:hover {
14
+ .pro-tree-modal-view-svg {
15
+ color: var(--zaui-brand);
16
+ }
17
+ }
18
+ .pro-tree-modal-view-svg {
19
+ div {
20
+ display: flex;
21
+ }
22
+ }
23
+
13
24
  &-content {
14
25
  display: flex;
15
26
  flex-direction: row;
@@ -59,7 +70,7 @@
59
70
  margin-right: var(--zaui-space-size-md, 16px);
60
71
  }
61
72
 
62
- .viewSvg > div {
73
+ .pro-tree-modal-search-svg > div {
63
74
  display: flex;
64
75
  }
65
76
 
@@ -167,7 +178,7 @@
167
178
  display: flex;
168
179
  align-items: center;
169
180
 
170
- .viewSvg {
181
+ .pro-tree-modal-view-svg {
171
182
  margin-left: var(--zaui-space-size-sm, 8px);
172
183
  }
173
184
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.13.3-beta.1",
3
+ "version": "3.13.4-beta.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -63,7 +63,7 @@
63
63
  "@pansy/react-watermark": "^3.1.13",
64
64
  "@zat-design/utils": "1.1.37",
65
65
  "ahooks": "3.8.4",
66
- "antd": "4.24.12",
66
+ "antd": "4.24.16",
67
67
  "big.js": "^6.2.1",
68
68
  "classnames": "^2.3.1",
69
69
  "lodash": "^4.17.21",