shineout 1.8.7-beta.1 → 1.8.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.
Files changed (89) hide show
  1. package/css/Alert/index.d.ts +15 -15
  2. package/css/Alert/styles/alert.css +8 -4
  3. package/css/Cascader/Result.js +3 -1
  4. package/css/DataList/List.js +6 -3
  5. package/css/EditableArea/EditableArea.js +1 -2
  6. package/css/Modal/Panel.js +2 -3
  7. package/css/Modal/styles/modal.css +6 -0
  8. package/css/Popover/Confirm.js +1 -1
  9. package/css/Popover/Content.js +22 -0
  10. package/css/Popover/Panel.js +5 -3
  11. package/css/Popover/index.d.ts +9 -2
  12. package/css/Popover/index.js +3 -0
  13. package/css/Popover/styles/popover.css +0 -3
  14. package/css/Select/Result.js +3 -1
  15. package/css/Table/SeperateTable.js +45 -39
  16. package/css/Table/SimpleTable.js +2 -1
  17. package/css/Table/TreeExpand.js +2 -3
  18. package/css/Table/index.d.ts +0 -9
  19. package/css/Table/index.js +1 -1
  20. package/css/TreeSelect/Result.js +3 -1
  21. package/css/TreeSelect/TreeSelect.js +5 -2
  22. package/css/icons/index.js +2 -1
  23. package/css/index.d.ts +1 -1
  24. package/css/index.js +1 -1
  25. package/css/utils/dom/element.js +3 -3
  26. package/css/utils/proptypes.js +1 -1
  27. package/css/utils/validate/index.js +6 -1
  28. package/dist/shineout.js +190 -128
  29. package/dist/shineout.js.map +1 -1
  30. package/dist/shineout.min.js +1 -1
  31. package/dist/theme.antd.css +1 -1
  32. package/dist/theme.antd2.css +1 -1
  33. package/dist/theme.default.css +1 -1
  34. package/dist/theme.shineout.css +1 -1
  35. package/es/Alert/index.d.ts +15 -15
  36. package/es/Alert/styles/alert.less +2 -1
  37. package/es/Cascader/Result.js +3 -1
  38. package/es/DataList/List.js +6 -3
  39. package/es/EditableArea/EditableArea.js +1 -2
  40. package/es/Modal/Panel.js +2 -3
  41. package/es/Modal/styles/modal.less +12 -0
  42. package/es/Popover/Confirm.js +1 -1
  43. package/es/Popover/Content.js +12 -0
  44. package/es/Popover/Panel.js +5 -3
  45. package/es/Popover/index.d.ts +9 -2
  46. package/es/Popover/index.js +2 -0
  47. package/es/Popover/styles/popover.less +0 -4
  48. package/es/Select/Result.js +3 -1
  49. package/es/Table/SeperateTable.js +45 -39
  50. package/es/Table/SimpleTable.js +2 -1
  51. package/es/Table/TreeExpand.js +2 -3
  52. package/es/Table/index.d.ts +0 -9
  53. package/es/Table/index.js +1 -1
  54. package/es/TreeSelect/Result.js +3 -1
  55. package/es/TreeSelect/TreeSelect.js +5 -2
  56. package/es/icons/index.js +2 -1
  57. package/es/index.d.ts +1 -1
  58. package/es/index.js +1 -1
  59. package/es/utils/dom/element.js +3 -3
  60. package/es/utils/proptypes.js +1 -1
  61. package/es/utils/validate/index.js +5 -1
  62. package/lib/Alert/index.d.ts +15 -15
  63. package/lib/Alert/styles/alert.less +2 -1
  64. package/lib/Cascader/Result.js +3 -1
  65. package/lib/DataList/List.js +6 -3
  66. package/lib/EditableArea/EditableArea.js +1 -2
  67. package/lib/Modal/Panel.js +2 -3
  68. package/lib/Modal/styles/modal.less +12 -0
  69. package/lib/Popover/Confirm.js +1 -1
  70. package/lib/Popover/Content.js +22 -0
  71. package/lib/Popover/Panel.js +5 -3
  72. package/lib/Popover/index.d.ts +9 -2
  73. package/lib/Popover/index.js +3 -0
  74. package/lib/Popover/styles/popover.less +0 -4
  75. package/lib/Select/Result.js +3 -1
  76. package/lib/Table/SeperateTable.js +45 -39
  77. package/lib/Table/SimpleTable.js +2 -1
  78. package/lib/Table/TreeExpand.js +2 -3
  79. package/lib/Table/index.d.ts +0 -9
  80. package/lib/Table/index.js +1 -1
  81. package/lib/TreeSelect/Result.js +3 -1
  82. package/lib/TreeSelect/TreeSelect.js +5 -2
  83. package/lib/icons/index.js +2 -1
  84. package/lib/index.d.ts +1 -1
  85. package/lib/index.js +1 -1
  86. package/lib/utils/dom/element.js +3 -3
  87. package/lib/utils/proptypes.js +1 -1
  88. package/lib/utils/validate/index.js +6 -1
  89. package/package.json +1 -1
@@ -5,59 +5,59 @@ export interface AlertProps extends StandardProps {
5
5
 
6
6
  /**
7
7
  * Content, text or react component
8
- *
8
+ *
9
9
  * 内容,文字或react组件
10
- *
10
+ *
11
11
  * default: -
12
12
  */
13
13
  children?: React.ReactNode;
14
14
 
15
15
  /**
16
16
  * When the type is true, the status icon is displayed according to the type property. If you need to display a custom icon, pass in ReactElement.
17
- *
17
+ *
18
18
  * 为true时,根据type属性显示状态图标。如果需要显示自定义图标,传入ReactElement。
19
- *
19
+ *
20
20
  * default: -
21
21
  */
22
22
  icon?: React.ReactElement | boolean;
23
23
 
24
24
  /**
25
25
  * The size for icon
26
- *
26
+ *
27
27
  * icon 的尺寸
28
- *
28
+ *
29
29
  * default: 14
30
30
  */
31
31
  iconSize?: number;
32
32
 
33
33
  /**
34
34
  * When onClose is empty, no close is displayed. If you need to close and do not need to handle callbacks, set it true.
35
- *
35
+ *
36
36
  * 当 onClose 为空时,不显示关闭。如果需要关闭又不需要处理回调,设置为true即可
37
- *
37
+ *
38
38
  * default: -
39
39
  */
40
40
  onClose?: (() => void) | boolean;
41
41
 
42
42
  /**
43
43
  * types
44
- *
44
+ *
45
45
  * 类型
46
- *
46
+ *
47
47
  * default: *warning*
48
- *
48
+ *
49
49
  */
50
- type?: 'success' | 'info' | 'warning' | 'danger' | 'error';
50
+ type?: 'success' | 'info' | 'warning' | 'danger' | 'error' | 'confirmwarning';
51
51
 
52
52
  /**
53
53
  * show close button
54
- *
54
+ *
55
55
  * 是否隐藏关闭按钮
56
- *
56
+ *
57
57
  * default: false
58
58
  */
59
59
  hideClose?: boolean,
60
60
  }
61
61
 
62
62
  declare class Alert extends React.Component<AlertProps> {}
63
- export default Alert
63
+ export default Alert
@@ -134,7 +134,8 @@
134
134
  fill: var(--success-color, #00cc66);
135
135
  }
136
136
  .so-alert-danger,
137
- .so-alert-error {
137
+ .so-alert-error,
138
+ .so-alert-confirmwarning {
138
139
  border-color: var(--alert-danger-border-color, #ebccd1);
139
140
  background-color: var(--alert-danger-bg, #f2dede);
140
141
  color: var(--alert-danger-text-color, #a94442);
@@ -142,14 +143,17 @@
142
143
  box-shadow: var(--alert-danger-box-shadow, 'none');
143
144
  }
144
145
  .so-alert-danger hr,
145
- .so-alert-error hr {
146
+ .so-alert-error hr,
147
+ .so-alert-confirmwarning hr {
146
148
  border-top-color: var(--alert-danger-border-darken-5-color, #e4b9c0);
147
149
  }
148
150
  .so-alert-danger .alert-link,
149
- .so-alert-error .alert-link {
151
+ .so-alert-error .alert-link,
152
+ .so-alert-confirmwarning .alert-link {
150
153
  color: var(--alert-danger-text-darken-10-color, #843534);
151
154
  }
152
155
  .so-alert-danger .so-alert-icon path,
153
- .so-alert-error .so-alert-icon path {
156
+ .so-alert-error .so-alert-icon path,
157
+ .so-alert-confirmwarning .so-alert-icon path {
154
158
  fill: var(--danger-color, #f85555);
155
159
  }
@@ -96,7 +96,9 @@ function (_PureComponent) {
96
96
  var compressed = this.props.compressed;
97
97
 
98
98
  if (compressed) {
99
- this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore);
99
+ this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore, {
100
+ direction: 'x'
101
+ });
100
102
  }
101
103
  };
102
104
 
@@ -133,7 +133,8 @@ function (_Component) {
133
133
  keygen = _this$props2.keygen,
134
134
  fixed = _this$props2.fixed,
135
135
  rowsInView = _this$props2.rowsInView,
136
- lineHeight = _this$props2.lineHeight;
136
+ lineHeight = _this$props2.lineHeight,
137
+ value = _this$props2.value;
137
138
  if (isEmpty) return _react.default.createElement("div", {
138
139
  className: (0, _styles.listClass)('item', 'empty')
139
140
  }, empty || (0, _locale.getLocale)('noData'));
@@ -143,7 +144,8 @@ function (_Component) {
143
144
  data: data,
144
145
  keygen: keygen,
145
146
  renderItem: this.renderItem,
146
- itemsInView: rowsInView
147
+ itemsInView: rowsInView,
148
+ force: value
147
149
  });
148
150
  };
149
151
 
@@ -210,7 +212,8 @@ Index.propTypes = {
210
212
  fixed: _propTypes.default.bool,
211
213
  rowsInView: _propTypes.default.number,
212
214
  height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
213
- lineHeight: _propTypes.default.number
215
+ lineHeight: _propTypes.default.number,
216
+ value: _propTypes.default.array
214
217
  };
215
218
  Index.defaultProps = {
216
219
  size: 'default',
@@ -110,7 +110,6 @@ function (_React$PureComponent) {
110
110
  _proto.renderTextarea = function renderTextarea() {
111
111
  var showTextarea = this.state.showTextarea;
112
112
  var _this$props = this.props,
113
- delay = _this$props.delay,
114
113
  placeholder = _this$props.placeholder,
115
114
  maxHeight = _this$props.maxHeight,
116
115
  value = _this$props.value;
@@ -122,7 +121,7 @@ function (_React$PureComponent) {
122
121
  autosize: true,
123
122
  value: value,
124
123
  rows: 1,
125
- delay: delay,
124
+ delay: 0,
126
125
  onChange: this.onChange,
127
126
  onBlur: this.onBlur,
128
127
  onFocus: this.handleFocus,
@@ -222,10 +222,9 @@ function (_PureComponent) {
222
222
  position = _this$props7.position,
223
223
  bodyStyle = _this$props7.bodyStyle,
224
224
  _this$props7$from = _this$props7.from,
225
- from = _this$props7$from === void 0 ? null : _this$props7$from,
226
- type = _this$props7.type;
225
+ from = _this$props7$from === void 0 ? null : _this$props7$from;
227
226
  var style = {
228
- padding: noPadding === true || from === 'method' && type === 'normal' ? 0 : padding
227
+ padding: noPadding === true ? 0 : padding
229
228
  };
230
229
  if (position) style.overflow = 'auto';
231
230
  if (bodyStyle) style = Object.assign(style, bodyStyle);
@@ -314,6 +314,12 @@
314
314
  width: var(--modal-divider-width, 100%);
315
315
  background: var(--modal-divider-color, #ddd);
316
316
  }
317
+ .so-modal-mask > .so-card.so-modal-normal .so-modal-body {
318
+ padding-left: var(--modal-icon-body-padding-right, 40px);
319
+ }
320
+ .so-modal-mask > .so-card.so-modal-normal.so-modal-rtl .so-modal-body {
321
+ padding-right: var(--modal-icon-body-padding-right, 40px);
322
+ }
317
323
  .so-modal-mask > .so-card.so-modal-rtl {
318
324
  direction: rtl;
319
325
  text-align: right;
@@ -138,7 +138,7 @@ Confirm.propTypes = (0, _objectSpread2.default)({}, (0, _proptypes.getProps)(_pr
138
138
  icon: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.node])
139
139
  });
140
140
  Confirm.defaultProps = {
141
- type: 'warning',
141
+ type: 'confirmwarning',
142
142
  icon: true,
143
143
  okType: 'danger'
144
144
  };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ exports.__esModule = true;
6
+ exports.default = void 0;
7
+
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _Panel = _interopRequireDefault(require("./Panel"));
13
+
14
+ function Content(props) {
15
+ // eslint-disable-next-line
16
+ return _react.default.createElement(_Panel.default, (0, _extends2.default)({}, props, {
17
+ useTextStyle: true
18
+ }));
19
+ }
20
+
21
+ var _default = Content;
22
+ exports.default = _default;
@@ -295,7 +295,8 @@ function (_Component) {
295
295
  children = _this$props4.children,
296
296
  type = _this$props4.type,
297
297
  visible = _this$props4.visible,
298
- showArrow = _this$props4.showArrow;
298
+ showArrow = _this$props4.showArrow,
299
+ useTextStyle = _this$props4.useTextStyle;
299
300
  var show = typeof visible === 'boolean' ? visible : this.state.show;
300
301
 
301
302
  if (!this.isRendered && !show || !this.parentElement || !children) {
@@ -329,7 +330,7 @@ function (_Component) {
329
330
 
330
331
  this.element.className = (0, _classnames.default)((0, _styles.popoverClass)('_', position, type), this.props.className, this.id);
331
332
  var childrened = (0, _is.isFunc)(children) ? children(this.handleHide) : children;
332
- if (typeof childrened === 'string') childrened = _react.default.createElement("span", {
333
+ if (typeof childrened === 'string' || useTextStyle) childrened = _react.default.createElement("span", {
333
334
  className: (0, _styles.popoverClass)('text')
334
335
  }, childrened);
335
336
  return _reactDom.default.createPortal([showArrow && _react.default.createElement("div", {
@@ -373,7 +374,8 @@ Panel.propTypes = {
373
374
  showArrow: _propTypes.default.bool,
374
375
  bindChain: _propTypes.default.func,
375
376
  zIndex: _propTypes.default.number,
376
- clickToCancelDelay: _propTypes.default.bool
377
+ clickToCancelDelay: _propTypes.default.bool,
378
+ useTextStyle: _propTypes.default.bool
377
379
  };
378
380
  Panel.defaultProps = {
379
381
  background: '',
@@ -131,7 +131,7 @@ export interface PopoverProps extends StandardProps {
131
131
  *
132
132
  * default: none
133
133
  */
134
- type?: 'success' | 'info' | 'warning' | 'danger';
134
+ type?: 'success' | 'info' | 'warning' | 'danger' | 'confirmwarning';
135
135
 
136
136
  /**
137
137
  * Old API, out of date
@@ -232,8 +232,15 @@ declare class PopoverConfirm extends React.Component<PopoverConfirmProps, {}> {
232
232
  render(): JSX.Element;
233
233
  }
234
234
 
235
- declare class Popover extends React.Component<PopoverProps, {}> {
235
+ declare class PopoverContent extends React.Component<PopoverProps, {}> {
236
+ render(): JSX.Element;
237
+ }
238
+
239
+ export type ContentProps = Omit<PopoverProps, 'content'>;
240
+
241
+ declare class Popover extends React.Component<ContentProps, {}> {
236
242
  static Confirm: typeof PopoverConfirm;
243
+ static Content: typeof PopoverContent;
237
244
 
238
245
  render(): JSX.Element;
239
246
  }
@@ -17,6 +17,8 @@ var _Panel = _interopRequireDefault(require("./Panel"));
17
17
 
18
18
  var _Confirm = _interopRequireDefault(require("./Confirm"));
19
19
 
20
+ var _Content = _interopRequireDefault(require("./Content"));
21
+
20
22
  var Component = (0, _Container.default)(events);
21
23
 
22
24
  function Popover(props) {
@@ -28,5 +30,6 @@ function Popover(props) {
28
30
  Popover.displayName = 'ShineoutPopover';
29
31
  Popover.Confirm = _Confirm.default;
30
32
  Popover.Confirm.displayName = 'ShineoutPopoverConfirm';
33
+ Popover.Content = _Content.default;
31
34
  var _default = Popover;
32
35
  exports.default = _default;
@@ -308,9 +308,6 @@
308
308
  margin-bottom: 8px;
309
309
  font-size: var(--font-size-base, 14px);
310
310
  }
311
- .so-popover-confirm .so-popover-mention .so-alert-warning .so-alert-icon path {
312
- fill: var(--danger-color, #f85555);
313
- }
314
311
  .so-popover-text {
315
312
  display: inline-block;
316
313
  max-width: var(--popover-text-max-width, 320px);
@@ -114,7 +114,9 @@ function (_PureComponent) {
114
114
  var compressed = this.props.compressed;
115
115
 
116
116
  if (compressed) {
117
- this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore);
117
+ this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore, {
118
+ direction: 'x'
119
+ });
118
120
  }
119
121
  };
120
122
 
@@ -225,22 +225,6 @@ function (_PureComponent) {
225
225
 
226
226
  };
227
227
 
228
- _proto.setTop = function setTop(scrollHeight, fullHeight, top) {
229
- var _this2 = this;
230
-
231
- var offsetLeft = this.state.offsetLeft;
232
- this.tbody.style.marginTop = scrollHeight * top + "px";
233
- this.lastScrollTop = fullHeight * top;
234
- (0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", "-" + this.lastScrollTop + "px");
235
- setTimeout(function () {
236
- _this2.setState({
237
- scrollTop: top
238
- });
239
-
240
- _this2.lastScrollArgs[1] = top;
241
- });
242
- };
243
-
244
228
  _proto.checkScrollToIndex = function checkScrollToIndex(index, outerHeight) {
245
229
  var _this$props3 = this.props,
246
230
  data = _this$props3.data,
@@ -261,7 +245,7 @@ function (_PureComponent) {
261
245
  };
262
246
 
263
247
  _proto.ajustBottom = function ajustBottom(dataChange) {
264
- var _this3 = this;
248
+ var _this2 = this;
265
249
 
266
250
  var reachBottom = this.lastScrollArgs[1] === 1;
267
251
  var drag = this.lastScrollArgs[8];
@@ -270,7 +254,7 @@ function (_PureComponent) {
270
254
  if (this.ajustBottomScroll) return;
271
255
  this.ajustBottomScroll = true;
272
256
  setTimeout(function () {
273
- _this3.handleScroll.apply(_this3, _this3.lastScrollArgs);
257
+ _this2.handleScroll.apply(_this2, _this2.lastScrollArgs);
274
258
  });
275
259
  }
276
260
  };
@@ -330,9 +314,11 @@ function (_PureComponent) {
330
314
  };
331
315
 
332
316
  _proto.resetHeight = function resetHeight() {
333
- var _this4 = this;
317
+ var _this3 = this;
334
318
 
335
- var scrollTop = this.state.scrollTop;
319
+ var _this$state2 = this.state,
320
+ scrollTop = _this$state2.scrollTop,
321
+ offsetLeft = _this$state2.offsetLeft;
336
322
  var _this$props4 = this.props,
337
323
  treeColumnsName = _this$props4.treeColumnsName,
338
324
  changedByExpand = _this$props4.changedByExpand;
@@ -363,16 +349,32 @@ function (_PureComponent) {
363
349
  if (fullHeight <= scrollHeight) {
364
350
  index = 0;
365
351
  } else {
366
- this.setTop(scrollHeight, fullHeight, 1);
352
+ this.tbody.style.marginTop = scrollHeight + "px";
353
+ (0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", "-" + fullHeight + "px");
354
+ this.lastScrollTop = fullHeight;
367
355
  return;
368
356
  }
369
357
  }
370
358
  }
371
359
 
372
360
  if (index === 0) {
373
- this.setTop(scrollHeight, fullHeight, 0);
361
+ this.lastScrollTop = 0;
362
+ setTimeout(function () {
363
+ _this3.setState({
364
+ scrollTop: 0
365
+ });
366
+ });
367
+ this.tbody.style.marginTop = '0px';
368
+ (0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", '0px');
374
369
  } else if (fullHeight - this.lastScrollTop < (1 - this.lastScrollArgs[1]) * scrollHeight) {
375
- this.setTop(scrollHeight, fullHeight, 1);
370
+ this.tbody.style.marginTop = scrollHeight + "px";
371
+ (0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", "-" + fullHeight + "px");
372
+ this.lastScrollTop = fullHeight;
373
+ setTimeout(function () {
374
+ _this3.setState({
375
+ scrollTop: 1
376
+ });
377
+ });
376
378
  } else {
377
379
  var keepTop = this.lastScrollTop - this.lastScrollArgs[1] * scrollHeight; // keepTop = scrollTopLength - scrollTopLength/fullHeight * scrollHeight
378
380
  // keepTop = (1 - scrollHeight / fullHeight) * scrollTopLength
@@ -380,14 +382,18 @@ function (_PureComponent) {
380
382
  var scrollTopLength = keepTop / (1 - scrollHeight / fullHeight);
381
383
  this.lastScrollTop = scrollTopLength;
382
384
  var st = this.lastScrollTop / fullHeight;
383
- this.setTop(scrollHeight, fullHeight, st);
385
+ this.tbody.style.marginTop = st * scrollHeight + "px";
386
+ (0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", "-" + this.lastScrollTop + "px");
387
+ setTimeout(function () {
388
+ _this3.setState({
389
+ scrollTop: st
390
+ });
391
+ });
384
392
  }
385
393
  } else if (this.lastScrollTop - height < 1) {
386
394
  setTimeout(function () {
387
- _this4.lastScrollArgs[1] = _this4.lastScrollTop / fullHeight;
388
-
389
- _this4.setState({
390
- scrollTop: _this4.lastScrollTop / fullHeight
395
+ _this3.setState({
396
+ scrollTop: _this3.lastScrollTop / fullHeight
391
397
  });
392
398
  });
393
399
  }
@@ -631,14 +637,14 @@ function (_PureComponent) {
631
637
  innerScrollAttr = _this$props7.innerScrollAttr,
632
638
  bordered = _this$props7.bordered,
633
639
  others = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["data", "rowsInView", "columns", "width", "fixed", "rowHeight", "columnResizable", "innerScrollAttr", "bordered"]);
634
- var _this$state2 = this.state,
635
- colgroup = _this$state2.colgroup,
636
- scrollTop = _this$state2.scrollTop,
637
- scrollLeft = _this$state2.scrollLeft,
638
- offsetLeft = _this$state2.offsetLeft,
639
- offsetRight = _this$state2.offsetRight,
640
- currentIndex = _this$state2.currentIndex,
641
- resize = _this$state2.resize;
640
+ var _this$state3 = this.state,
641
+ colgroup = _this$state3.colgroup,
642
+ scrollTop = _this$state3.scrollTop,
643
+ scrollLeft = _this$state3.scrollLeft,
644
+ offsetLeft = _this$state3.offsetLeft,
645
+ offsetRight = _this$state3.offsetRight,
646
+ currentIndex = _this$state3.currentIndex,
647
+ resize = _this$state3.resize;
642
648
  var contentWidth = this.getContentWidth();
643
649
  var minWidthSup = columns.find(function (d) {
644
650
  return d.minWidth;
@@ -747,9 +753,9 @@ function (_PureComponent) {
747
753
  var _this$props9 = this.props,
748
754
  fixed = _this$props9.fixed,
749
755
  hideHeader = _this$props9.hideHeader;
750
- var _this$state3 = this.state,
751
- scrollLeft = _this$state3.scrollLeft,
752
- floatFixed = _this$state3.floatFixed;
756
+ var _this$state4 = this.state,
757
+ scrollLeft = _this$state4.scrollLeft,
758
+ floatFixed = _this$state4.floatFixed;
753
759
  var floatClass = [];
754
760
 
755
761
  if (floatFixed) {
@@ -100,6 +100,7 @@ function (_PureComponent) {
100
100
  };
101
101
 
102
102
  _proto.resetColGroup = function resetColGroup() {
103
+ this.lastColGroup = this.state.colgroup || this.lastColGroup;
103
104
  this.setState({
104
105
  colgroup: undefined,
105
106
  resize: true
@@ -178,7 +179,7 @@ function (_PureComponent) {
178
179
  },
179
180
  className: (0, _styles.tableClass)(bordered && 'table-bordered')
180
181
  }, _react.default.createElement(_Colgroup.default, {
181
- colgroup: colgroup,
182
+ colgroup: colgroup || this.lastColGroup,
182
183
  columns: columns,
183
184
  resizable: columnResizable
184
185
  }), _react.default.createElement(_Thead.default, (0, _extends2.default)({}, this.props, {
@@ -169,7 +169,7 @@ var _default = function _default(WrappedComponent) {
169
169
  }).length === 0;
170
170
  var treeIndent = this.getTreeIndent();
171
171
  return _react.default.createElement(WrappedComponent, (0, _extends2.default)({}, this.props, {
172
- changedByExpand: this.changedByExpand || this.props.changedByExpand,
172
+ changedByExpand: this.changedByExpand,
173
173
  data: data,
174
174
  onTreeExpand: this.handleTreeExpand,
175
175
  treeExpandKeys: expandKeys,
@@ -187,8 +187,7 @@ var _default = function _default(WrappedComponent) {
187
187
  treeColumnsName: _propTypes.default.string,
188
188
  defaultTreeExpandKeys: _propTypes.default.array,
189
189
  treeExpandKeys: _propTypes.default.array,
190
- onTreeExpand: _propTypes.default.func,
191
- changedByExpand: _propTypes.default.bool
190
+ onTreeExpand: _propTypes.default.func
192
191
  });
193
192
  TreeExpand.defaultProps = {
194
193
  defaultTreeExpandKeys: []
@@ -542,15 +542,6 @@ export interface TableProps<Value, TRD> extends StandardProps, ListItemStandardP
542
542
  */
543
543
  columnResizable?: boolean
544
544
 
545
- /**
546
- * Enable in specific scenarios (tree data expansion is controlled) Used to change the default behavior of scroll reset
547
- *
548
- * 在特定场景(树形数据展开受控)下开启 用来改变滚动条重置的默认行为
549
- *
550
- * default: false
551
- */
552
- changedByExpand?: boolean
553
-
554
545
  }
555
546
 
556
547
  declare class Table<Value = any, TRD = TableRowData> extends React.Component<TableProps<Value, TRD>, {}> {
@@ -33,7 +33,7 @@ var _TreeExpand = _interopRequireDefault(require("./TreeExpand"));
33
33
 
34
34
  var TableWithPagination = (0, _pagable.default)(_Table.default);
35
35
  var TableWithTree = (0, _TreeExpand.default)(_Table.default);
36
- var TableWithPT = (0, _func.compose)(_pagable.default, _TreeExpand.default)(_Table.default);
36
+ var TableWithPT = (0, _func.compose)(_TreeExpand.default, _pagable.default)(_Table.default);
37
37
 
38
38
  var _default =
39
39
  /*#__PURE__*/
@@ -89,7 +89,9 @@ function (_PureComponent) {
89
89
  var compressed = this.props.compressed;
90
90
 
91
91
  if (compressed) {
92
- this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore);
92
+ this.cancelResizeObserver = (0, _element.addResizeObserver)(this.resultEl, this.resetMore, {
93
+ direction: 'x'
94
+ });
93
95
  }
94
96
  };
95
97
 
@@ -294,7 +294,9 @@ function (_PureComponent) {
294
294
  data = _this$props7.data,
295
295
  absolute = _this$props7.absolute,
296
296
  height = _this$props7.height,
297
- zIndex = _this$props7.zIndex;
297
+ zIndex = _this$props7.zIndex,
298
+ compressed = _this$props7.compressed,
299
+ value = _this$props7.value;
298
300
  var props = {};
299
301
  ['mode', 'data', 'datum', 'defaultExpanded', 'defaultExpandAll', 'disabled', 'expanded', 'keygen', 'loader', 'onExpand', 'renderItem', 'line', 'parentClickExpand', 'childrenKey', 'expandIcons'].forEach(function (k) {
300
302
  props[k] = _this3.props[k];
@@ -331,7 +333,8 @@ function (_PureComponent) {
331
333
  overflowY: 'auto'
332
334
  },
333
335
  fixed: "min",
334
- zIndex: zIndex
336
+ zIndex: zIndex,
337
+ value: multiple && !compressed ? value : undefined
335
338
  }, _react.default.createElement("div", {
336
339
  className: (0, _styles.treeSelectClass)('tree-wrapper')
337
340
  }, content));
@@ -59,6 +59,7 @@ var _default = {
59
59
  Recovery: icon(recovery),
60
60
  Warning: icon(warning),
61
61
  Check: icon(check),
62
- Preview: icon(preview)
62
+ Preview: icon(preview),
63
+ Confirmwarning: icon(warning)
63
64
  };
64
65
  exports.default = _default;
package/css/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import './styles/normalize.less'
3
3
  import * as utils from './utils'
4
4
 
5
- export default { utils, version: '1.8.7-beta.1' }
5
+ export default { utils, version: '1.8.7' }
6
6
  export { utils }
7
7
  export { setLocale } from './locale'
8
8
  export { color, style } from './utils/expose'
package/css/index.js CHANGED
@@ -222,6 +222,6 @@ exports.Upload = _Upload.default;
222
222
  // Created by scripts/src-index.js.
223
223
  var _default = {
224
224
  utils: utils,
225
- version: '1.8.7-beta.1'
225
+ version: '1.8.7'
226
226
  };
227
227
  exports.default = _default;
@@ -214,15 +214,15 @@ var addResizeObserver = function addResizeObserver(el, handler, options) {
214
214
  width = _entry$0$contentRect.width,
215
215
  height = _entry$0$contentRect.height;
216
216
 
217
- if (direction === 'x') {
217
+ if (width && direction === 'x') {
218
218
  if (lastWidth !== width) {
219
219
  handler(entry);
220
220
  }
221
221
  } else if (direction === 'y') {
222
- if (lastHeight !== height) {
222
+ if (height && lastHeight !== height) {
223
223
  handler(entry);
224
224
  }
225
- } else {
225
+ } else if (width && height) {
226
226
  handler(entry, {
227
227
  x: lastWidth !== width,
228
228
  y: lastHeight !== height
@@ -15,7 +15,7 @@ function getProps(PropTypes) {
15
15
  grid: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
16
16
  placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.func]),
17
17
  size: PropTypes.oneOf(['small', 'default', 'large']),
18
- type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link'])
18
+ type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link', 'confirmwarning'])
19
19
  };
20
20
 
21
21
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -5,6 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
 
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
9
+
8
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
11
 
10
12
  var _Datum = _interopRequireDefault(require("../../Datum"));
@@ -58,7 +60,10 @@ function getRule(rules, props) {
58
60
 
59
61
  if (other.min !== undefined || other.max !== undefined) {
60
62
  if (type === 'number' || type === 'integer') {
61
- return (0, _range.default)(props);
63
+ return (0, _range.default)((0, _objectSpread2.default)({}, props, {
64
+ min: other.min,
65
+ max: other.max
66
+ }));
62
67
  }
63
68
 
64
69
  return (0, _rangeLength.default)(props);