@douyinfe/semi-ui 2.30.2 → 2.31.0

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 (97) hide show
  1. package/dist/css/semi.css +66 -51
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +298 -132
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/_base/base.d.ts +3 -3
  8. package/lib/cjs/anchor/index.d.ts +1 -1
  9. package/lib/cjs/autoComplete/index.d.ts +1 -1
  10. package/lib/cjs/button/Button.d.ts +1 -1
  11. package/lib/cjs/carousel/index.d.ts +1 -0
  12. package/lib/cjs/carousel/index.js +17 -1
  13. package/lib/cjs/cascader/index.js +2 -1
  14. package/lib/cjs/checkbox/checkbox.d.ts +1 -1
  15. package/lib/cjs/checkbox/checkboxGroup.d.ts +1 -1
  16. package/lib/cjs/descriptions/index.d.ts +1 -1
  17. package/lib/cjs/form/baseForm.d.ts +1 -1
  18. package/lib/cjs/form/field.d.ts +1 -1
  19. package/lib/cjs/image/previewInner.d.ts +1 -2
  20. package/lib/cjs/image/previewInner.js +5 -6
  21. package/lib/cjs/layout/index.d.ts +1 -1
  22. package/lib/cjs/modal/confirm.d.ts +1 -1
  23. package/lib/cjs/popconfirm/index.js +10 -1
  24. package/lib/cjs/popover/index.d.ts +1 -0
  25. package/lib/cjs/progress/index.d.ts +3 -3
  26. package/lib/cjs/radio/radio.d.ts +1 -1
  27. package/lib/cjs/select/index.d.ts +2 -2
  28. package/lib/cjs/select/index.js +3 -7
  29. package/lib/cjs/select/virtualRow.js +3 -2
  30. package/lib/cjs/table/Body/index.js +4 -8
  31. package/lib/cjs/table/ColumnSelection.d.ts +4 -3
  32. package/lib/cjs/table/Table.d.ts +9 -1
  33. package/lib/cjs/table/Table.js +30 -11
  34. package/lib/cjs/table/TableCell.js +30 -7
  35. package/lib/cjs/table/TableContextProvider.d.ts +1 -1
  36. package/lib/cjs/table/TableContextProvider.js +5 -3
  37. package/lib/cjs/table/TableHeaderRow.js +28 -9
  38. package/lib/cjs/table/index.d.ts +3 -0
  39. package/lib/cjs/table/index.js +11 -3
  40. package/lib/cjs/table/interface.d.ts +1 -0
  41. package/lib/cjs/table/table-context.d.ts +2 -0
  42. package/lib/cjs/tabs/interface.d.ts +1 -1
  43. package/lib/cjs/tag/index.js +4 -2
  44. package/lib/cjs/tagInput/index.d.ts +1 -1
  45. package/lib/cjs/tagInput/index.js +1 -3
  46. package/lib/cjs/tooltip/index.d.ts +4 -0
  47. package/lib/cjs/tooltip/index.js +21 -6
  48. package/lib/cjs/treeSelect/index.d.ts +1 -1
  49. package/lib/cjs/treeSelect/index.js +18 -18
  50. package/lib/cjs/typography/copyable.d.ts +3 -0
  51. package/lib/cjs/typography/copyable.js +30 -9
  52. package/lib/es/_base/base.d.ts +3 -3
  53. package/lib/es/anchor/index.d.ts +1 -1
  54. package/lib/es/autoComplete/index.d.ts +1 -1
  55. package/lib/es/button/Button.d.ts +1 -1
  56. package/lib/es/carousel/index.d.ts +1 -0
  57. package/lib/es/carousel/index.js +16 -2
  58. package/lib/es/cascader/index.js +2 -1
  59. package/lib/es/checkbox/checkbox.d.ts +1 -1
  60. package/lib/es/checkbox/checkboxGroup.d.ts +1 -1
  61. package/lib/es/descriptions/index.d.ts +1 -1
  62. package/lib/es/form/baseForm.d.ts +1 -1
  63. package/lib/es/form/field.d.ts +1 -1
  64. package/lib/es/image/previewInner.d.ts +1 -2
  65. package/lib/es/image/previewInner.js +5 -6
  66. package/lib/es/layout/index.d.ts +1 -1
  67. package/lib/es/modal/confirm.d.ts +1 -1
  68. package/lib/es/popconfirm/index.js +10 -1
  69. package/lib/es/popover/index.d.ts +1 -0
  70. package/lib/es/progress/index.d.ts +3 -3
  71. package/lib/es/radio/radio.d.ts +1 -1
  72. package/lib/es/select/index.d.ts +2 -2
  73. package/lib/es/select/index.js +3 -6
  74. package/lib/es/select/virtualRow.js +3 -2
  75. package/lib/es/table/Body/index.js +4 -7
  76. package/lib/es/table/ColumnSelection.d.ts +4 -3
  77. package/lib/es/table/Table.d.ts +9 -1
  78. package/lib/es/table/Table.js +30 -11
  79. package/lib/es/table/TableCell.js +31 -8
  80. package/lib/es/table/TableContextProvider.d.ts +1 -1
  81. package/lib/es/table/TableContextProvider.js +5 -3
  82. package/lib/es/table/TableHeaderRow.js +29 -10
  83. package/lib/es/table/index.d.ts +3 -0
  84. package/lib/es/table/index.js +10 -3
  85. package/lib/es/table/interface.d.ts +1 -0
  86. package/lib/es/table/table-context.d.ts +2 -0
  87. package/lib/es/tabs/interface.d.ts +1 -1
  88. package/lib/es/tag/index.js +7 -2
  89. package/lib/es/tagInput/index.d.ts +1 -1
  90. package/lib/es/tagInput/index.js +1 -3
  91. package/lib/es/tooltip/index.d.ts +4 -0
  92. package/lib/es/tooltip/index.js +21 -6
  93. package/lib/es/treeSelect/index.d.ts +1 -1
  94. package/lib/es/treeSelect/index.js +17 -18
  95. package/lib/es/typography/copyable.d.ts +3 -0
  96. package/lib/es/typography/copyable.js +28 -9
  97. package/package.json +8 -8
@@ -18209,6 +18209,10 @@ class foundation_Tooltip extends foundation {
18209
18209
  this._adapter.removePortal();
18210
18210
  };
18211
18211
 
18212
+ this.setDisplayNone = (displayNone, cb) => {
18213
+ this._adapter.setDisplayNone(displayNone, cb);
18214
+ };
18215
+
18212
18216
  this.onResize = () => {
18213
18217
  // this.log('resize');
18214
18218
  // rePosition when window resize
@@ -18234,9 +18238,14 @@ class foundation_Tooltip extends foundation {
18234
18238
  const trigger = this.getProp('trigger');
18235
18239
  const clickTriggerToHide = this.getProp('clickTriggerToHide');
18236
18240
  const {
18237
- visible
18241
+ visible,
18242
+ displayNone
18238
18243
  } = this.getStates();
18239
18244
 
18245
+ if (displayNone) {
18246
+ this.setDisplayNone(false);
18247
+ }
18248
+
18240
18249
  if (visible) {
18241
18250
  return;
18242
18251
  }
@@ -20009,7 +20018,12 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20009
20018
 
20010
20019
 
20011
20020
  this.didLeave = () => {
20012
- this.foundation.removePortal();
20021
+ if (this.props.keepDOM) {
20022
+ this.foundation.setDisplayNone(true);
20023
+ } else {
20024
+ this.foundation.removePortal();
20025
+ }
20026
+
20013
20027
  this.foundation.unBindEvent();
20014
20028
  };
20015
20029
 
@@ -20079,6 +20093,7 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20079
20093
  visible,
20080
20094
  portalEventSet,
20081
20095
  placement,
20096
+ displayNone,
20082
20097
  transitionState,
20083
20098
  id,
20084
20099
  isPositionUpdated
@@ -20133,7 +20148,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20133
20148
  } = _ref;
20134
20149
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", Object.assign({
20135
20150
  className: classnames_default()(className, animationClassName),
20136
- style: Object.assign(Object.assign(Object.assign(Object.assign({}, animationStyle), {
20151
+ style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, animationStyle), displayNone ? {
20152
+ display: "none"
20153
+ } : {}), {
20137
20154
  transformOrigin
20138
20155
  }), style), {
20139
20156
  opacity: isPositionUpdated ? opacity : "0"
@@ -20223,8 +20240,8 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20223
20240
  placement: props.position || 'top',
20224
20241
  transitionStyle: {},
20225
20242
  isPositionUpdated: false,
20226
- id: props.wrapperId // auto generate id, will be used by children.aria-describedby & content.id, improve a11y
20227
-
20243
+ id: props.wrapperId,
20244
+ displayNone: false
20228
20245
  };
20229
20246
  this.foundation = new foundation_Tooltip(this.adapter);
20230
20247
  this.eventManager = new Event_Event();
@@ -20348,6 +20365,11 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20348
20365
  this.eventManager.emit('positionUpdated');
20349
20366
  });
20350
20367
  },
20368
+ setDisplayNone: (displayNone, cb) => {
20369
+ this.setState({
20370
+ displayNone
20371
+ }, cb);
20372
+ },
20351
20373
  updatePlacementAttr: placement => {
20352
20374
  this.setState({
20353
20375
  placement
@@ -20654,7 +20676,8 @@ tooltip_Tooltip.propTypes = {
20654
20676
  wrapWhenSpecial: prop_types_default.a.bool,
20655
20677
  guardFocus: prop_types_default.a.bool,
20656
20678
  returnFocusOnClose: prop_types_default.a.bool,
20657
- preventScroll: prop_types_default.a.bool
20679
+ preventScroll: prop_types_default.a.bool,
20680
+ keepDOM: prop_types_default.a.bool
20658
20681
  };
20659
20682
  tooltip_Tooltip.defaultProps = {
20660
20683
  arrowBounding: numbers.ARROW_BOUNDING,
@@ -20680,7 +20703,8 @@ tooltip_Tooltip.defaultProps = {
20680
20703
  returnFocusOnClose: false,
20681
20704
  onEscKeyDown: noop_default.a,
20682
20705
  disableFocusListener: false,
20683
- disableArrowKeyDown: false
20706
+ disableArrowKeyDown: false,
20707
+ keepDOM: false
20684
20708
  };
20685
20709
  // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/copy-text-to-clipboard/index.js
20686
20710
  var copy_text_to_clipboard = __webpack_require__("HDX/");
@@ -23807,6 +23831,31 @@ class copyable_Copyable extends external_root_React_commonjs2_react_commonjs_rea
23807
23831
  }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null), locale.copied));
23808
23832
  };
23809
23833
 
23834
+ this.renderCopyIcon = () => {
23835
+ const {
23836
+ icon
23837
+ } = this.props;
23838
+ const copyProps = {
23839
+ role: "button",
23840
+ tabIndex: 0,
23841
+ onClick: this.copy,
23842
+ onKeyPress: e => utils_isEnterPress(e) && this.copy(e)
23843
+ };
23844
+ {
23845
+ /* TODO: replace `a` tag with `span` in next major version
23846
+ NOTE: may have effect on style */
23847
+ }
23848
+ const defaultIcon =
23849
+ /*#__PURE__*/
23850
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid
23851
+ external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("a", {
23852
+ className: `${copyable_prefixCls}-action-copy-icon`
23853
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCopy, Object.assign({
23854
+ onClick: this.copy
23855
+ }, copyProps)));
23856
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(icon) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(icon, copyProps) : defaultIcon;
23857
+ };
23858
+
23810
23859
  this.state = {
23811
23860
  copied: false,
23812
23861
  item: ''
@@ -23844,14 +23893,7 @@ class copyable_Copyable extends external_root_React_commonjs2_react_commonjs_rea
23844
23893
  ref: forwardRef
23845
23894
  }, copied ? this.renderSuccessTip() : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tooltip_Tooltip, {
23846
23895
  content: typeof copyTip !== 'undefined' ? copyTip : locale.copy
23847
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("a", {
23848
- className: `${copyable_prefixCls}-action-copy-icon`
23849
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCopy, {
23850
- role: "button",
23851
- tabIndex: 0,
23852
- onClick: this.copy,
23853
- onKeyPress: e => utils_isEnterPress(e) && this.copy(e)
23854
- })))));
23896
+ }, this.renderCopyIcon())));
23855
23897
  }
23856
23898
 
23857
23899
  }
@@ -23862,7 +23904,8 @@ copyable_Copyable.propTypes = {
23862
23904
  copyTip: prop_types_default.a.node,
23863
23905
  duration: prop_types_default.a.number,
23864
23906
  style: prop_types_default.a.object,
23865
- className: prop_types_default.a.string
23907
+ className: prop_types_default.a.string,
23908
+ icon: prop_types_default.a.node
23866
23909
  };
23867
23910
  copyable_Copyable.defaultProps = {
23868
23911
  content: '',
@@ -37399,6 +37442,11 @@ class foundation_CarouselFoundation extends foundation {
37399
37442
  constructor(adapter) {
37400
37443
  super(Object.assign({}, adapter));
37401
37444
  this._interval = null;
37445
+ this._forcePlay = false;
37446
+ }
37447
+
37448
+ setForcePlay(forcePlay) {
37449
+ this._forcePlay = forcePlay;
37402
37450
  }
37403
37451
 
37404
37452
  play(interval) {
@@ -37516,7 +37564,7 @@ class foundation_CarouselFoundation extends foundation {
37516
37564
  } = this.getProps();
37517
37565
  const autoPlayType = typeof autoPlay;
37518
37566
 
37519
- if (autoPlayType === 'boolean' && autoPlay) {
37567
+ if (autoPlayType === 'boolean') {
37520
37568
  return carousel_constants_numbers.DEFAULT_INTERVAL + speed;
37521
37569
  }
37522
37570
 
@@ -37535,9 +37583,9 @@ class foundation_CarouselFoundation extends foundation {
37535
37583
  const {
37536
37584
  autoPlay
37537
37585
  } = this.getProps();
37538
- const autoPlayType = typeof autoPlay;
37586
+ const autoPlayType = typeof autoPlay; // when user manually call the play function, force play
37539
37587
 
37540
- if (autoPlayType === 'boolean' && autoPlay || isObject_default()(autoPlay)) {
37588
+ if (autoPlayType === 'boolean' && autoPlay || isObject_default()(autoPlay) || this._forcePlay) {
37541
37589
  this.play(this.getSwitchingTime());
37542
37590
  }
37543
37591
  }
@@ -37796,6 +37844,7 @@ var carousel = __webpack_require__("HzcD");
37796
37844
  // CONCATENATED MODULE: ./carousel/index.tsx
37797
37845
 
37798
37846
 
37847
+
37799
37848
  /* eslint-disable jsx-a11y/no-static-element-interactions */
37800
37849
 
37801
37850
 
@@ -37813,10 +37862,12 @@ class carousel_Carousel extends baseComponent_BaseComponent {
37813
37862
  super(props);
37814
37863
 
37815
37864
  this.play = () => {
37865
+ this.foundation.setForcePlay(true);
37816
37866
  return this.foundation.handleAutoPlay();
37817
37867
  };
37818
37868
 
37819
37869
  this.stop = () => {
37870
+ this.foundation.setForcePlay(false);
37820
37871
  return this.foundation.stop();
37821
37872
  };
37822
37873
 
@@ -37843,7 +37894,7 @@ class carousel_Carousel extends baseComponent_BaseComponent {
37843
37894
  autoPlay
37844
37895
  } = this.props;
37845
37896
 
37846
- if (typeof autoPlay !== 'object' || autoPlay.hoverToPause) {
37897
+ if (autoPlay === true || typeof autoPlay === 'object' && autoPlay.hoverToPause) {
37847
37898
  this.foundation.stop();
37848
37899
  }
37849
37900
  };
@@ -38023,6 +38074,17 @@ class carousel_Carousel extends baseComponent_BaseComponent {
38023
38074
  this.handleAutoPlay();
38024
38075
  }
38025
38076
 
38077
+ componentDidUpdate(prevProps, prevState, snapshot) {
38078
+ const prevChildrenKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children).map(child => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.key : null);
38079
+ const nowChildrenKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children).map(child => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.key : null);
38080
+
38081
+ if (!isEqual_default()(prevChildrenKeys, nowChildrenKeys)) {
38082
+ this.setState({
38083
+ children: this.getChildren()
38084
+ });
38085
+ }
38086
+ }
38087
+
38026
38088
  componentWillUnmount() {
38027
38089
  this.foundation.destroy();
38028
38090
  }
@@ -39235,7 +39297,11 @@ class foundation_CascaderFoundation extends foundation {
39235
39297
  if (filterable && !multiple) {
39236
39298
  const displayText = this.renderDisplayText(selectedKey, keyEntities);
39237
39299
  updateStates.inputPlaceHolder = displayText;
39238
- updateStates.inputValue = displayText;
39300
+ /*
39301
+ * displayText should not be assign to inputValue,
39302
+ * cause inputValue should only change by user enter
39303
+ */
39304
+ // updateStates.inputValue = displayText;
39239
39305
  }
39240
39306
  /**
39241
39307
  * If selectedKeys does not meet the update conditions,
@@ -39269,7 +39335,11 @@ class foundation_CascaderFoundation extends foundation {
39269
39335
  const displayText = this._defaultRenderText(valuePath);
39270
39336
 
39271
39337
  updateStates.inputPlaceHolder = displayText;
39272
- updateStates.inputValue = displayText;
39338
+ /*
39339
+ * displayText should not be assign to inputValue,
39340
+ * cause inputValue should only change by user enter
39341
+ */
39342
+ // updateStates.inputValue = displayText;
39273
39343
  }
39274
39344
 
39275
39345
  keyEntities[key] = optionNotExist; // Fix: 1155, if the data is loaded asynchronously to update treeData, the emptying operation should not be done when entering the updateSelectedKey method
@@ -41239,6 +41309,7 @@ var tag_rest = undefined && undefined.__rest || function (s, e) {
41239
41309
 
41240
41310
 
41241
41311
 
41312
+
41242
41313
  const tag_prefixCls = tag_constants_cssClasses.PREFIX;
41243
41314
  const tagColors = tag_constants_strings.TAG_COLOR;
41244
41315
  const tagSize = tag_constants_strings.TAG_SIZE;
@@ -41386,10 +41457,14 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
41386
41457
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
41387
41458
  size: "small"
41388
41459
  })) : null;
41460
+
41461
+ const stringChild = isString_default()(children);
41462
+
41463
+ const contentCls = classnames_default()(`${tag_prefixCls}-content`, `${tag_prefixCls}-content-${stringChild ? 'ellipsis' : 'center'}`);
41389
41464
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", Object.assign({
41390
- "aria-label": this.props['aria-label'] || isString_default()(children) ? `${closable ? 'Closable ' : ''}Tag: ${children}` : ''
41465
+ "aria-label": this.props['aria-label'] || stringChild ? `${closable ? 'Closable ' : ''}Tag: ${children}` : ''
41391
41466
  }, wrapProps), avatarSrc ? this.renderAvatar() : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41392
- className: `${tag_prefixCls}-content`
41467
+ className: contentCls
41393
41468
  }, children), closeIcon);
41394
41469
  }
41395
41470
 
@@ -43831,15 +43906,13 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
43831
43906
  key: elementKey,
43832
43907
  visible: true,
43833
43908
  "aria-label": `${!disabled ? 'Closable ' : ''}Tag: ${value}`
43834
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
43835
- className: `${tagInput_prefixCls}-tag-content-wrapper`
43836
43909
  }, showIconHandler && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(DragHandle, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(paragraph_Paragraph, {
43837
43910
  className: typoCls,
43838
43911
  ellipsis: {
43839
43912
  showTooltip: showContentTooltip,
43840
43913
  rows: 1
43841
43914
  }
43842
- }, value)));
43915
+ }, value));
43843
43916
  }
43844
43917
  });
43845
43918
  };
@@ -45200,7 +45273,8 @@ class cascader_Cascader extends baseComponent_BaseComponent {
45200
45273
  onChange: this.handleInputChange
45201
45274
  };
45202
45275
  const wrappercls = classnames_default()({
45203
- [`${cascader_prefixcls}-search-wrapper`]: true
45276
+ [`${cascader_prefixcls}-search-wrapper`]: true,
45277
+ [`${cascader_prefixcls}-search-wrapper-${size}`]: size !== 'default'
45204
45278
  });
45205
45279
  const displayText = this.renderDisplayText();
45206
45280
  const spanCls = classnames_default()({
@@ -70776,7 +70850,7 @@ class foundation_SelectFoundation extends foundation {
70776
70850
 
70777
70851
  this._adapter.once('popoverClose', () => {
70778
70852
  if (isFilterable) {
70779
- this.clearInput();
70853
+ this.clearInput(e);
70780
70854
  }
70781
70855
 
70782
70856
  if (closeCb) {
@@ -70894,7 +70968,7 @@ class foundation_SelectFoundation extends foundation {
70894
70968
 
70895
70969
  if (this._isFilterable()) {
70896
70970
  if (autoClearSearchValue) {
70897
- this.clearInput();
70971
+ this.clearInput(event);
70898
70972
  }
70899
70973
 
70900
70974
  this.focusInput();
@@ -70914,7 +70988,7 @@ class foundation_SelectFoundation extends foundation {
70914
70988
  if (this._isFilterable()) {
70915
70989
  // When filter active,if autoClearSearchValue is true,reset input after select
70916
70990
  if (autoClearSearchValue) {
70917
- this.clearInput(); // At the same time, the filtering of options is also cleared, in order to show all candidates
70991
+ this.clearInput(event); // At the same time, the filtering of options is also cleared, in order to show all candidates
70918
70992
 
70919
70993
  const sugInput = '';
70920
70994
  options = this._filterOption(options, sugInput);
@@ -71004,9 +71078,10 @@ class foundation_SelectFoundation extends foundation {
71004
71078
 
71005
71079
  this._notifyChange(selections);
71006
71080
  }
71007
- }
71081
+ } // The reason why event input is optional is that clearInput may be manually called by the user through ref
71008
71082
 
71009
- clearInput() {
71083
+
71084
+ clearInput(event) {
71010
71085
  const {
71011
71086
  inputValue
71012
71087
  } = this.getStates(); // only when input is not null, select should notifySearch and updateOptions
@@ -71014,7 +71089,7 @@ class foundation_SelectFoundation extends foundation {
71014
71089
  if (inputValue !== '') {
71015
71090
  this._adapter.updateInputValue('');
71016
71091
 
71017
- this._adapter.notifySearch(''); // reset options filter
71092
+ this._adapter.notifySearch('', event); // reset options filter
71018
71093
 
71019
71094
 
71020
71095
  const {
@@ -71041,7 +71116,7 @@ class foundation_SelectFoundation extends foundation {
71041
71116
  this._adapter.setIsFocusInContainer(false);
71042
71117
  }
71043
71118
 
71044
- handleInputChange(sugInput) {
71119
+ handleInputChange(sugInput, event) {
71045
71120
  // Input is a controlled component, so the value needs to be updated
71046
71121
  this._adapter.updateInputValue(sugInput);
71047
71122
 
@@ -71065,7 +71140,7 @@ class foundation_SelectFoundation extends foundation {
71065
71140
 
71066
71141
  this._adapter.updateOptions(optionsAfterFilter);
71067
71142
 
71068
- this._adapter.notifySearch(sugInput); // In multi-select mode, the drop-down box is repositioned each time you enter, because it may cause a line break as the input changes
71143
+ this._adapter.notifySearch(sugInput, event); // In multi-select mode, the drop-down box is repositioned each time you enter, because it may cause a line break as the input changes
71069
71144
 
71070
71145
 
71071
71146
  if (this._isMultiple()) {
@@ -71341,7 +71416,7 @@ class foundation_SelectFoundation extends foundation {
71341
71416
  }
71342
71417
  } else {
71343
71418
  // there are no focusable elements inside the container, tab to next element and trigger blur
71344
- this.close();
71419
+ this.close(event);
71345
71420
 
71346
71421
  this._notifyBlur(event);
71347
71422
  }
@@ -71367,7 +71442,7 @@ class foundation_SelectFoundation extends foundation {
71367
71442
  // focus in the last element in container, focus back to trigger and close panel
71368
71443
  this._focusTrigger();
71369
71444
 
71370
- this.close();
71445
+ this.close(event);
71371
71446
  handlePrevent(event);
71372
71447
  }
71373
71448
  }
@@ -71379,7 +71454,7 @@ class foundation_SelectFoundation extends foundation {
71379
71454
 
71380
71455
  if (!isFocusInContainer) {
71381
71456
  // focus in trigger, close the panel, shift tab to previe element and trigger blur
71382
- this.close();
71457
+ this.close(event);
71383
71458
 
71384
71459
  this._notifyBlur(event);
71385
71460
  } else if (activeElement === focusableElements[0]) {
@@ -71422,7 +71497,7 @@ class foundation_SelectFoundation extends foundation {
71422
71497
  this.onSelect(selectedOption, focusIndex, event);
71423
71498
  }
71424
71499
  } else {
71425
- this.close();
71500
+ this.close(event);
71426
71501
  }
71427
71502
  }
71428
71503
  }
@@ -71601,7 +71676,7 @@ class foundation_SelectFoundation extends foundation {
71601
71676
  } = this.getProps();
71602
71677
 
71603
71678
  if (filter) {
71604
- this.clearInput();
71679
+ this.clearInput(e);
71605
71680
  }
71606
71681
 
71607
71682
  this.clearSelected(); // prevent this click open dropdown
@@ -72043,10 +72118,11 @@ const VirtualRow = _ref => {
72043
72118
  style
72044
72119
  } = _ref;
72045
72120
  const {
72046
- visibleOptions
72121
+ visibleOptions,
72122
+ renderOption
72047
72123
  } = data;
72048
72124
  const option = visibleOptions[index];
72049
- return data.renderOption(option, index, style);
72125
+ return renderOption(option, index, style);
72050
72126
  };
72051
72127
 
72052
72128
  /* harmony default export */ var virtualRow = (VirtualRow);
@@ -72318,7 +72394,6 @@ var select_select = __webpack_require__("1d3+");
72318
72394
 
72319
72395
 
72320
72396
 
72321
-
72322
72397
 
72323
72398
 
72324
72399
  const select_prefixcls = select_constants_cssClasses.PREFIX;
@@ -72332,7 +72407,7 @@ class select_Select extends baseComponent_BaseComponent {
72332
72407
  current: node
72333
72408
  };
72334
72409
 
72335
- this.handleInputChange = value => this.foundation.handleInputChange(value);
72410
+ this.handleInputChange = (value, event) => this.foundation.handleInputChange(value, event);
72336
72411
 
72337
72412
  this.getTagItem = (item, i, renderSelectedItem) => {
72338
72413
  const {
@@ -72419,8 +72494,6 @@ class select_Select extends baseComponent_BaseComponent {
72419
72494
  this.onKeyPress = this.onKeyPress.bind(this);
72420
72495
  this.eventManager = new Event_Event();
72421
72496
  this.foundation = new foundation_SelectFoundation(this.adapter);
72422
- Object(warning["a" /* default */])('optionLabelProp' in this.props, '[Semi Select] \'optionLabelProp\' has already been deprecated, please use \'renderSelectedItem\' instead.');
72423
- Object(warning["a" /* default */])('labelInValue' in this.props, '[Semi Select] \'labelInValue\' has already been deprecated, please use \'onChangeWithObject\' instead.');
72424
72497
  }
72425
72498
 
72426
72499
  get adapter() {
@@ -72589,8 +72662,8 @@ class select_Select extends baseComponent_BaseComponent {
72589
72662
  notifyDropdownVisibleChange: visible => {
72590
72663
  this.props.onDropdownVisibleChange(visible);
72591
72664
  },
72592
- notifySearch: input => {
72593
- this.props.onSearch(input);
72665
+ notifySearch: (input, event) => {
72666
+ this.props.onSearch(input, event);
72594
72667
  },
72595
72668
  notifyCreate: input => {
72596
72669
  this.props.onCreate(input);
@@ -74480,7 +74553,16 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
74480
74553
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popover_0, Object.assign({
74481
74554
  ref: this.popoverRef
74482
74555
  }, attrs, {
74483
- content: this.renderConfirmPopCard,
74556
+ // A arrow function needs to be passed here, otherwise the content will not be updated after the Popconfirm state is updated
74557
+ // Popover is a PureComponent, same props will not trigger update
74558
+ content: _ref2 => {
74559
+ let {
74560
+ initialFocusRef
74561
+ } = _ref2;
74562
+ return this.renderConfirmPopCard({
74563
+ initialFocusRef
74564
+ });
74565
+ },
74484
74566
  visible: visible,
74485
74567
  position: position
74486
74568
  }, popProps), children);
@@ -80406,14 +80488,14 @@ function isAnyFixed(columns) {
80406
80488
  function isAnyFixedRight(columns) {
80407
80489
  return some_default()(columns, col => col.fixed === 'right');
80408
80490
  }
80409
- function isFixedLeft(column) {
80491
+ function utils_isFixedLeft(column) {
80410
80492
  return ['left', true].includes(get_default()(column, 'fixed'));
80411
80493
  }
80412
- function isFixedRight(column) {
80494
+ function utils_isFixedRight(column) {
80413
80495
  return ['right'].includes(get_default()(column, 'fixed'));
80414
80496
  }
80415
80497
  function isFixed(column) {
80416
- return isFixedLeft(column) || isFixedRight(column);
80498
+ return utils_isFixedLeft(column) || utils_isFixedRight(column);
80417
80499
  }
80418
80500
  function isInnerColumnKey(key) {
80419
80501
  return [table_constants_strings.DEFAULT_KEY_COLUMN_EXPAND, table_constants_strings.DEFAULT_KEY_COLUMN_SCROLLBAR, table_constants_strings.DEFAULT_KEY_COLUMN_SELECTION].includes(key);
@@ -80802,6 +80884,22 @@ function isTreeTable(_ref2) {
80802
80884
 
80803
80885
  return flag;
80804
80886
  }
80887
+ function getRTLAlign(align, direction) {
80888
+ if (direction === 'rtl') {
80889
+ switch (align) {
80890
+ case 'left':
80891
+ return 'right';
80892
+
80893
+ case 'right':
80894
+ return 'left';
80895
+
80896
+ default:
80897
+ return align;
80898
+ }
80899
+ }
80900
+
80901
+ return align;
80902
+ }
80805
80903
  // CONCATENATED MODULE: ../semi-foundation/utils/Store.ts
80806
80904
  /* istanbul ignore next */
80807
80905
  class Store {
@@ -81070,12 +81168,14 @@ class foundation_TableFoundation extends foundation {
81070
81168
  } = this._adapter.getStates();
81071
81169
 
81072
81170
  const filteredSortedDataSource = this.getFilteredSortedDataSource(dataSource, queries);
81171
+ const allDataDisabledRowKeys = this.getAllDisabledRowKeys(filteredSortedDataSource);
81073
81172
  const pageData = this.getCurrentPageData(filteredSortedDataSource);
81074
81173
  this.setAdapterPageData(pageData);
81075
81174
  this.initExpandedRowKeys(pageData);
81076
81175
  this.initSelectedRowKeys(pageData); // cache dataSource after mount, and then calculate it on demand
81077
81176
 
81078
81177
  this.setCachedFilteredSortedDataSource(filteredSortedDataSource);
81178
+ this.setAllDisabledRowKeys(allDataDisabledRowKeys);
81079
81179
  }
81080
81180
 
81081
81181
  initExpandedRowKeys() {
@@ -81437,6 +81537,10 @@ class foundation_TableFoundation extends foundation {
81437
81537
 
81438
81538
  destroy() {}
81439
81539
 
81540
+ setAllDisabledRowKeys(disabledRowKeys) {
81541
+ this._adapter.setAllDisabledRowKeys(disabledRowKeys);
81542
+ }
81543
+
81440
81544
  handleClick(e) {}
81441
81545
 
81442
81546
  handleMouseEnter(e) {}
@@ -81695,8 +81799,11 @@ class foundation_TableFoundation extends foundation {
81695
81799
  const selectedRowKeysSet = this._getSelectedRowKeysSet();
81696
81800
 
81697
81801
  let allRowKeys = [...this._adapter.getCachedFilteredSortedRowKeys()];
81698
- const disabledRowKeys = this.getAllDisabledRowKeys();
81699
- const disabledRowKeysSet = new Set(disabledRowKeys);
81802
+
81803
+ const disabledRowKeys = this._adapter.getAllDisabledRowKeys();
81804
+
81805
+ const disabledRowKeysSet = this._adapter.getAllDisabledRowKeysSet();
81806
+
81700
81807
  let changedRowKeys; // Select all, if not disabled && not in selectedRowKeys
81701
81808
 
81702
81809
  if (selected) {
@@ -82070,7 +82177,9 @@ class foundation_TableFoundation extends foundation {
82070
82177
  handleClickFilterOrSorter(queries) {
82071
82178
  const dataSource = [...this.getProp('dataSource')];
82072
82179
  const sortedDataSource = this.getFilteredSortedDataSource(dataSource, queries);
82180
+ const allDataDisabledRowKeys = this.getAllDisabledRowKeys(sortedDataSource);
82073
82181
  this.setCachedFilteredSortedDataSource(sortedDataSource);
82182
+ this.setAllDisabledRowKeys(allDataDisabledRowKeys);
82074
82183
  const pageData = this.getCurrentPageData(sortedDataSource);
82075
82184
  this.setAdapterPageData(pageData);
82076
82185
  }
@@ -82220,7 +82329,8 @@ const TableContextProvider = _ref => {
82220
82329
  renderExpandIcon,
82221
82330
  renderSelection,
82222
82331
  getVirtualizedListRef,
82223
- setBodyHasScrollbar
82332
+ setBodyHasScrollbar,
82333
+ direction
82224
82334
  } = _ref;
82225
82335
  const tableContextValue = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => ({
82226
82336
  anyColumnFixed,
@@ -82234,8 +82344,9 @@ const TableContextProvider = _ref => {
82234
82344
  tableWidth,
82235
82345
  handleRowExpanded,
82236
82346
  getVirtualizedListRef,
82237
- setBodyHasScrollbar
82238
- }), [anyColumnFixed, flattenedColumns, renderExpandIcon, renderSelection, setHeadWidths, getHeadWidths, getCellWidths, headWidths, tableWidth, handleRowExpanded, getVirtualizedListRef, setBodyHasScrollbar]);
82347
+ setBodyHasScrollbar,
82348
+ direction
82349
+ }), [anyColumnFixed, flattenedColumns, renderExpandIcon, renderSelection, setHeadWidths, getHeadWidths, getCellWidths, headWidths, tableWidth, handleRowExpanded, getVirtualizedListRef, setBodyHasScrollbar, direction]);
82239
82350
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_context.Provider, {
82240
82351
  value: tableContextValue
82241
82352
  }, children);
@@ -82832,8 +82943,10 @@ class TableHeaderRow_TableHeaderRow extends baseComponent_BaseComponent {
82832
82943
  columns
82833
82944
  } = this.props;
82834
82945
  const {
82835
- getCellWidths
82946
+ getCellWidths,
82947
+ direction
82836
82948
  } = this.context;
82949
+ const isRTL = direction === 'rtl';
82837
82950
  const slicedColumns = sliceColumnsByLevel(columns, index);
82838
82951
  const headWidths = getCellWidths(slicedColumns);
82839
82952
 
@@ -82855,35 +82968,52 @@ class TableHeaderRow_TableHeaderRow extends baseComponent_BaseComponent {
82855
82968
  let cellStyle = Object.assign({}, customProps.style);
82856
82969
 
82857
82970
  if (column.align) {
82971
+ const textAlign = getRTLAlign(column.align, direction);
82858
82972
  cellStyle = Object.assign(Object.assign({}, cellStyle), {
82859
- textAlign: column.align
82973
+ textAlign
82860
82974
  });
82861
82975
  customProps.className = classnames_default()(customProps.className, column.className, {
82862
- [`${prefixCls}-align-${column.align}`]: Boolean(column.align)
82976
+ [`${prefixCls}-align-${textAlign}`]: Boolean(textAlign)
82863
82977
  });
82864
82978
  }
82865
82979
 
82980
+ let fixedLeft, fixedRight, fixedLeftLast, fixedRightFirst;
82981
+
82982
+ if (isRTL) {
82983
+ fixedLeft = utils_isFixedRight(column);
82984
+ fixedRight = utils_isFixedLeft(column);
82985
+ fixedLeftLast = isFirstFixedRight(slicedColumns, column);
82986
+ fixedRightFirst = isLastLeftFixed(slicedColumns, column);
82987
+ } else {
82988
+ fixedLeft = utils_isFixedLeft(column);
82989
+ fixedRight = utils_isFixedRight(column);
82990
+ fixedLeftLast = isLastLeftFixed(slicedColumns, column);
82991
+ fixedRightFirst = isFirstFixedRight(slicedColumns, column);
82992
+ }
82993
+
82866
82994
  customProps.className = classnames_default()(`${prefixCls}-row-head`, column.className, customProps.className, // `${prefixCls}-fixed-columns`,
82867
82995
  {
82868
- [`${prefixCls}-cell-fixed-left`]: isFixedLeft(column),
82869
- [`${prefixCls}-cell-fixed-left-last`]: isLastLeftFixed(slicedColumns, column),
82870
- [`${prefixCls}-cell-fixed-right`]: isFixedRight(column),
82871
- [`${prefixCls}-cell-fixed-right-first`]: isFirstFixedRight(slicedColumns, column)
82996
+ [`${prefixCls}-cell-fixed-left`]: fixedLeft,
82997
+ [`${prefixCls}-cell-fixed-left-last`]: fixedLeftLast,
82998
+ [`${prefixCls}-cell-fixed-right`]: fixedRight,
82999
+ [`${prefixCls}-cell-fixed-right-first`]: fixedRightFirst
82872
83000
  });
82873
83001
 
82874
83002
  if (headWidths.length && slicedColumns.length) {
82875
83003
  const indexOfSlicedColumns = findIndex_default()(slicedColumns, item => item && item.key != null && item.key === column.key);
82876
83004
 
82877
83005
  if (indexOfSlicedColumns > -1) {
82878
- if (isFixedLeft(column)) {
83006
+ if (utils_isFixedLeft(column)) {
83007
+ const xPositionKey = isRTL ? 'right' : 'left';
82879
83008
  cellStyle = Object.assign(Object.assign({}, cellStyle), {
82880
83009
  position: 'sticky',
82881
- left: arrayAdd(headWidths, 0, indexOfSlicedColumns)
83010
+ [xPositionKey]: arrayAdd(headWidths, 0, indexOfSlicedColumns)
82882
83011
  });
82883
- } else if (isFixedRight(column)) {
83012
+ } else if (utils_isFixedRight(column)) {
83013
+ const xPositionKey = isRTL ? 'left' : 'right';
82884
83014
  cellStyle = Object.assign(Object.assign({}, cellStyle), {
82885
83015
  position: 'sticky',
82886
- right: arrayAdd(headWidths, indexOfSlicedColumns + 1)
83016
+ [xPositionKey]: arrayAdd(headWidths, indexOfSlicedColumns + 1)
82887
83017
  });
82888
83018
  }
82889
83019
  }
@@ -83665,13 +83795,17 @@ class TableCell_TableCell extends baseComponent_BaseComponent {
83665
83795
  } = this.props;
83666
83796
  let tdProps = {};
83667
83797
  let customCellProps = {};
83798
+ const {
83799
+ direction
83800
+ } = this.context;
83801
+ const isRTL = direction === 'rtl';
83668
83802
  const fixedLeftFlag = fixedLeft || typeof fixedLeft === 'number';
83669
83803
  const fixedRightFlag = fixedRight || typeof fixedRight === 'number';
83670
83804
 
83671
83805
  if (fixedLeftFlag) {
83672
- set_default()(tdProps, 'style.left', typeof fixedLeft === 'number' ? fixedLeft : 0);
83806
+ set_default()(tdProps, isRTL ? 'style.right' : 'style.left', typeof fixedLeft === 'number' ? fixedLeft : 0);
83673
83807
  } else if (fixedRightFlag) {
83674
- set_default()(tdProps, 'style.right', typeof fixedRight === 'number' ? fixedRight : 0);
83808
+ set_default()(tdProps, isRTL ? 'style.left' : 'style.right', typeof fixedRight === 'number' ? fixedRight : 0);
83675
83809
  }
83676
83810
 
83677
83811
  if (width != null) {
@@ -83691,8 +83825,9 @@ class TableCell_TableCell extends baseComponent_BaseComponent {
83691
83825
  }
83692
83826
 
83693
83827
  if (column.align) {
83828
+ const textAlign = getRTLAlign(column.align, direction);
83694
83829
  tdProps.style = Object.assign(Object.assign({}, tdProps.style), {
83695
- textAlign: column.align
83830
+ textAlign
83696
83831
  });
83697
83832
  }
83698
83833
 
@@ -83830,6 +83965,10 @@ class TableCell_TableCell extends baseComponent_BaseComponent {
83830
83965
  firstFixedRight,
83831
83966
  colIndex
83832
83967
  } = this.props;
83968
+ const {
83969
+ direction
83970
+ } = this.context;
83971
+ const isRTL = direction === 'rtl';
83833
83972
  const {
83834
83973
  className
83835
83974
  } = column;
@@ -83860,11 +83999,25 @@ class TableCell_TableCell extends baseComponent_BaseComponent {
83860
83999
  }
83861
84000
 
83862
84001
  const inner = this.renderInner(text, indentText, realExpandIcon);
84002
+ let isFixedLeft, isFixedLeftLast, isFixedRight, isFixedRightFirst;
84003
+
84004
+ if (isRTL) {
84005
+ isFixedLeft = fixedRightFlag;
84006
+ isFixedLeftLast = firstFixedRight;
84007
+ isFixedRight = fixedLeftFlag;
84008
+ isFixedRightFirst = lastFixedLeft;
84009
+ } else {
84010
+ isFixedLeft = fixedLeftFlag;
84011
+ isFixedLeftLast = lastFixedLeft;
84012
+ isFixedRight = fixedRightFlag;
84013
+ isFixedRightFirst = firstFixedRight;
84014
+ }
84015
+
83863
84016
  const columnCls = classnames_default()(className, `${prefixCls}-row-cell`, get_default()(customCellProps, 'className'), {
83864
- [`${prefixCls}-cell-fixed-left`]: fixedLeftFlag,
83865
- [`${prefixCls}-cell-fixed-left-last`]: lastFixedLeft,
83866
- [`${prefixCls}-cell-fixed-right`]: fixedRightFlag,
83867
- [`${prefixCls}-cell-fixed-right-first`]: firstFixedRight
84017
+ [`${prefixCls}-cell-fixed-left`]: isFixedLeft,
84018
+ [`${prefixCls}-cell-fixed-left-last`]: isFixedLeftLast,
84019
+ [`${prefixCls}-cell-fixed-right`]: isFixedRight,
84020
+ [`${prefixCls}-cell-fixed-right-first`]: isFixedRightFirst
83868
84021
  });
83869
84022
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(BodyCell, Object.assign({
83870
84023
  role: "gridcell",
@@ -84137,9 +84290,9 @@ class BaseRow_TableRow extends baseComponent_BaseComponent {
84137
84290
  index: index,
84138
84291
  record: record,
84139
84292
  component: BodyCell,
84140
- fixedLeft: isFixedLeft(column) && arrayAdd(cellWidths, 0, columnIndex),
84293
+ fixedLeft: utils_isFixedLeft(column) && arrayAdd(cellWidths, 0, columnIndex),
84141
84294
  lastFixedLeft: isLastLeftFixed(columns, column),
84142
- fixedRight: isFixedRight(column) && arrayAdd(cellWidths, columnIndex + 1),
84295
+ fixedRight: utils_isFixedRight(column) && arrayAdd(cellWidths, columnIndex + 1),
84143
84296
  firstFixedRight: isFirstFixedRight(columns, column),
84144
84297
  selected: selected,
84145
84298
  expanded: expanded,
@@ -84683,7 +84836,6 @@ var Body_rest = undefined && undefined.__rest || function (s, e) {
84683
84836
 
84684
84837
 
84685
84838
 
84686
-
84687
84839
  class Body_Body extends baseComponent_BaseComponent {
84688
84840
  constructor(props, context) {
84689
84841
  var _this;
@@ -85447,12 +85599,10 @@ class Body_Body extends baseComponent_BaseComponent {
85447
85599
  const {
85448
85600
  virtualized
85449
85601
  } = this.props;
85450
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(configProvider_context.Consumer, null, _ref => {
85451
- let {
85452
- direction
85453
- } = _ref;
85454
- return virtualized ? this.renderVirtualizedBody(direction) : this.renderBody(direction);
85455
- });
85602
+ const {
85603
+ direction
85604
+ } = this.context;
85605
+ return virtualized ? this.renderVirtualizedBody(direction) : this.renderBody(direction);
85456
85606
  }
85457
85607
 
85458
85608
  }
@@ -85765,8 +85915,9 @@ class Table_Table extends baseComponent_BaseComponent {
85765
85915
  const node = this.bodyWrapRef.current;
85766
85916
 
85767
85917
  if (node && node.children && node.children.length) {
85768
- const scrollToLeft = node.scrollLeft === 0;
85769
- const scrollToRight = node.scrollLeft + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width;
85918
+ const scrollToLeft = node.scrollLeft === 0; // why use Math.abs? @see https://bugzilla.mozilla.org/show_bug.cgi?id=1447743
85919
+
85920
+ const scrollToRight = Math.abs(node.scrollLeft) + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width;
85770
85921
 
85771
85922
  if (scrollToLeft && scrollToRight) {
85772
85923
  this.setScrollPosition('both');
@@ -85793,7 +85944,7 @@ class Table_Table extends baseComponent_BaseComponent {
85793
85944
  let inHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
85794
85945
  const {
85795
85946
  rowSelection,
85796
- disabledRowKeysSet
85947
+ allDisabledRowKeysSet
85797
85948
  } = _this.state;
85798
85949
 
85799
85950
  if (rowSelection && typeof rowSelection === 'object') {
@@ -85810,7 +85961,7 @@ class Table_Table extends baseComponent_BaseComponent {
85810
85961
  const allRowKeys = _this.cachedFilteredSortedRowKeys;
85811
85962
  const allRowKeysSet = _this.cachedFilteredSortedRowKeysSet;
85812
85963
 
85813
- const allIsSelected = _this.foundation.allIsSelected(selectedRowKeysSet, disabledRowKeysSet, allRowKeys);
85964
+ const allIsSelected = _this.foundation.allIsSelected(selectedRowKeysSet, allDisabledRowKeysSet, allRowKeys);
85814
85965
 
85815
85966
  const hasRowSelected = _this.foundation.hasRowSelected(selectedRowKeys, allRowKeysSet);
85816
85967
 
@@ -85820,8 +85971,8 @@ class Table_Table extends baseComponent_BaseComponent {
85820
85971
  key: columnKey,
85821
85972
  selected: allIsSelected,
85822
85973
  indeterminate: hasRowSelected && !allIsSelected,
85823
- onChange: (status, e) => {
85824
- _this.toggleSelectAllRow(status, e);
85974
+ onChange: (selected, e) => {
85975
+ _this.toggleSelectAllRow(selected, e);
85825
85976
  }
85826
85977
  });
85827
85978
  } else {
@@ -86024,8 +86175,8 @@ class Table_Table extends baseComponent_BaseComponent {
86024
86175
  this.foundation.handleSelectRow(realKey, selected, e);
86025
86176
  };
86026
86177
 
86027
- this.toggleSelectAllRow = (status, e) => {
86028
- this.foundation.handleSelectAllRow(status, e);
86178
+ this.toggleSelectAllRow = (selected, e) => {
86179
+ this.foundation.handleSelectAllRow(selected, e);
86029
86180
  };
86030
86181
  /**
86031
86182
  * render pagination
@@ -86343,6 +86494,8 @@ class Table_Table extends baseComponent_BaseComponent {
86343
86494
  allRowKeys: [],
86344
86495
  disabledRowKeys: [],
86345
86496
  disabledRowKeysSet: new Set(),
86497
+ allDisabledRowKeys: [],
86498
+ allDisabledRowKeysSet: new Set(),
86346
86499
  headWidths: [],
86347
86500
  bodyHasScrollBar: false,
86348
86501
  prePropRowSelection: undefined,
@@ -86447,11 +86600,20 @@ class Table_Table extends baseComponent_BaseComponent {
86447
86600
  this.cachedFilteredSortedRowKeys = filteredSortedRowKeys;
86448
86601
  this.cachedFilteredSortedRowKeysSet = new Set(filteredSortedRowKeys);
86449
86602
  },
86603
+ setAllDisabledRowKeys: allDisabledRowKeys => {
86604
+ const allDisabledRowKeysSet = new Set(allDisabledRowKeys);
86605
+ this.setState({
86606
+ allDisabledRowKeys,
86607
+ allDisabledRowKeysSet
86608
+ });
86609
+ },
86450
86610
  getCurrentPage: () => get_default()(this.state, 'pagination.currentPage', 1),
86451
86611
  getCurrentPageSize: () => get_default()(this.state, 'pagination.pageSize', table_constants_numbers.DEFAULT_PAGE_SIZE),
86452
86612
  getCachedFilteredSortedDataSource: () => this.cachedFilteredSortedDataSource,
86453
86613
  getCachedFilteredSortedRowKeys: () => this.cachedFilteredSortedRowKeys,
86454
86614
  getCachedFilteredSortedRowKeysSet: () => this.cachedFilteredSortedRowKeysSet,
86615
+ getAllDisabledRowKeys: () => this.state.allDisabledRowKeys,
86616
+ getAllDisabledRowKeysSet: () => this.state.allDisabledRowKeysSet,
86455
86617
  notifyFilterDropdownVisibleChange: (visible, dataIndex) => this._invokeColumnFn(dataIndex, 'onFilterDropdownVisibleChange', visible),
86456
86618
  notifyChange: function () {
86457
86619
  return _this2.props.onChange(...arguments);
@@ -86655,8 +86817,11 @@ class Table_Table extends baseComponent_BaseComponent {
86655
86817
  childrenRecordName,
86656
86818
  rowKey
86657
86819
  });
86820
+ const disabledRowKeysSet = new Set(disabledRowKeys);
86658
86821
  willUpdateStates.disabledRowKeys = disabledRowKeys;
86659
- willUpdateStates.disabledRowKeysSet = new Set(disabledRowKeys);
86822
+ willUpdateStates.disabledRowKeysSet = disabledRowKeysSet;
86823
+ willUpdateStates.allDisabledRowKeys = disabledRowKeys;
86824
+ willUpdateStates.allDisabledRowKeysSet = disabledRowKeysSet;
86660
86825
  }
86661
86826
 
86662
86827
  willUpdateStates.rowSelection = newSelectionStates;
@@ -86760,7 +86925,9 @@ class Table_Table extends baseComponent_BaseComponent {
86760
86925
  // Temporarily use _dataSource=[...dataSource] for processing
86761
86926
  const _dataSource = [...dataSource];
86762
86927
  const filteredSortedDataSource = this.foundation.getFilteredSortedDataSource(_dataSource, stateQueries);
86928
+ const allDataDisabledRowKeys = this.foundation.getAllDisabledRowKeys(filteredSortedDataSource);
86763
86929
  this.foundation.setCachedFilteredSortedDataSource(filteredSortedDataSource);
86930
+ this.foundation.setAllDisabledRowKeys(allDataDisabledRowKeys);
86764
86931
  states.dataSource = filteredSortedDataSource;
86765
86932
 
86766
86933
  if (this.props.groupBy) {
@@ -86957,11 +87124,13 @@ class Table_Table extends baseComponent_BaseComponent {
86957
87124
  });
86958
87125
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
86959
87126
  ref: this.rootWrapRef,
86960
- className: classnames_default()(className, `${prefixCls}-wrapper`),
87127
+ className: classnames_default()(className, `${prefixCls}-wrapper`, `${prefixCls}-wrapper-${props.direction}`),
86961
87128
  "data-column-fixed": anyColumnFixed,
86962
87129
  style: wrapStyle,
86963
87130
  id: id
86964
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_TableContextProvider, Object.assign({}, tableContextValue), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(spin_0, {
87131
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_TableContextProvider, Object.assign({}, tableContextValue, {
87132
+ direction: props.direction
87133
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(spin_0, {
86965
87134
  spinning: loading,
86966
87135
  size: "large"
86967
87136
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
@@ -87349,6 +87518,7 @@ const ResizableTable = function () {
87349
87518
 
87350
87519
 
87351
87520
 
87521
+
87352
87522
  class table_Table_0 extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
87353
87523
  constructor(props) {
87354
87524
  super(props);
@@ -87359,16 +87529,21 @@ class table_Table_0 extends external_root_React_commonjs2_react_commonjs_react_a
87359
87529
  }
87360
87530
 
87361
87531
  render() {
87362
- // eslint-disable-next-line prefer-destructuring
87532
+ var _a; // eslint-disable-next-line prefer-destructuring
87533
+
87534
+
87363
87535
  const props = this.props;
87536
+ const direction = (_a = this.props.direction) !== null && _a !== void 0 ? _a : this.context.direction;
87364
87537
 
87365
87538
  if (props.resizable) {
87366
87539
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_ResizableTable, Object.assign({}, props, {
87367
- ref: this.tableRef
87540
+ ref: this.tableRef,
87541
+ direction: direction
87368
87542
  }));
87369
87543
  } else {
87370
87544
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_Table, Object.assign({}, props, {
87371
- ref: this.tableRef
87545
+ ref: this.tableRef,
87546
+ direction: direction
87372
87547
  }));
87373
87548
  }
87374
87549
  }
@@ -87384,6 +87559,7 @@ table_Table_0.propTypes = Object.assign(Object.assign({}, table_Table.propTypes)
87384
87559
  table_Table_0.defaultProps = {
87385
87560
  hideExpandedColumn: true
87386
87561
  };
87562
+ table_Table_0.contextType = configProvider_context;
87387
87563
 
87388
87564
  /* harmony default export */ var table_0 = (table_Table_0);
87389
87565
  // CONCATENATED MODULE: ../semi-foundation/tabs/constants.ts
@@ -94085,6 +94261,7 @@ var treeSelect = __webpack_require__("uw59");
94085
94261
 
94086
94262
 
94087
94263
 
94264
+
94088
94265
 
94089
94266
 
94090
94267
  const treeSelect_prefixcls = treeSelect_constants_cssClasses.PREFIX;
@@ -94819,8 +94996,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94819
94996
  };
94820
94997
 
94821
94998
  this.itemKey = (index, data) => {
94822
- // Find the item at the specified index.
94823
- const item = data[index]; // Return a value that uniquely identifies this item.
94999
+ const {
95000
+ visibleOptions
95001
+ } = data; // Find the item at the specified index.
95002
+
95003
+ const item = visibleOptions[index]; // Return a value that uniquely identifies this item.
94824
95004
 
94825
95005
  return item.key;
94826
95006
  };
@@ -94854,23 +95034,18 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94854
95034
  });
94855
95035
  }
94856
95036
 
94857
- const option = _ref => {
94858
- let {
94859
- index,
94860
- style,
94861
- data
94862
- } = _ref;
94863
- return this.renderTreeNode(data[index], index, style);
95037
+ const data = {
95038
+ visibleOptions: flattenNodes,
95039
+ renderOption: this.renderTreeNode
94864
95040
  };
94865
-
94866
95041
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(autoSizer_AutoSizer, {
94867
95042
  defaultHeight: virtualize.height,
94868
95043
  defaultWidth: virtualize.width
94869
- }, _ref2 => {
95044
+ }, _ref => {
94870
95045
  let {
94871
95046
  height,
94872
95047
  width
94873
- } = _ref2;
95048
+ } = _ref;
94874
95049
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(FixedSizeList, {
94875
95050
  itemCount: flattenNodes.length,
94876
95051
  itemSize: virtualize.itemSize,
@@ -94878,12 +95053,12 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94878
95053
  width: width,
94879
95054
  // @ts-ignore avoid strict check of itemKey
94880
95055
  itemKey: this.itemKey,
94881
- itemData: flattenNodes,
95056
+ itemData: data,
94882
95057
  className: `${prefixTree}-virtual-list`,
94883
95058
  style: {
94884
95059
  direction
94885
95060
  }
94886
- }, option);
95061
+ }, virtualRow);
94887
95062
  });
94888
95063
  };
94889
95064
 
@@ -95193,11 +95368,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
95193
95368
  };
95194
95369
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, super.adapter), filterAdapter), treeSelectAdapter), treeAdapter), {
95195
95370
  updateLoadKeys: (data, resolve) => {
95196
- this.setState(_ref3 => {
95371
+ this.setState(_ref2 => {
95197
95372
  let {
95198
95373
  loadedKeys,
95199
95374
  loadingKeys
95200
- } = _ref3;
95375
+ } = _ref2;
95201
95376
  return this.foundation.handleNodeLoad(loadedKeys, loadingKeys, data, resolve);
95202
95377
  });
95203
95378
  },
@@ -95234,11 +95409,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
95234
95409
  notifyChangeWithObject: (node, e) => {
95235
95410
  this.props.onChange && this.props.onChange(node, e);
95236
95411
  },
95237
- notifyExpand: (expandedKeys, _ref4) => {
95412
+ notifyExpand: (expandedKeys, _ref3) => {
95238
95413
  let {
95239
95414
  expanded: bool,
95240
95415
  node
95241
- } = _ref4;
95416
+ } = _ref3;
95242
95417
  this.props.onExpand && this.props.onExpand([...expandedKeys], {
95243
95418
  expanded: bool,
95244
95419
  node
@@ -102203,11 +102378,9 @@ class previewImageFoundation_PreviewImageFoundation extends foundation {
102203
102378
 
102204
102379
  this.handleWindowResize = () => {
102205
102380
  const {
102381
+ ratio,
102206
102382
  setRatio
102207
102383
  } = this.getProps();
102208
- const {
102209
- ratio
102210
- } = this.getProps();
102211
102384
 
102212
102385
  const {
102213
102386
  originImageWidth,
@@ -103177,12 +103350,6 @@ class previewInnerFoundation_PreviewInnerFoundation extends foundation {
103177
103350
  this._adapter.enabledBodyScroll();
103178
103351
  }
103179
103352
 
103180
- handleRatio(type) {
103181
- this.setState({
103182
- ratio: type
103183
- });
103184
- }
103185
-
103186
103353
  }
103187
103354
  // CONCATENATED MODULE: ./image/previewInner.tsx
103188
103355
 
@@ -103270,10 +103437,6 @@ class previewInner_PreviewInner extends baseComponent_BaseComponent {
103270
103437
  this.foundation.handleMouseDown(e);
103271
103438
  };
103272
103439
 
103273
- this.handleRatio = type => {
103274
- this.foundation.handleRatio(type);
103275
- };
103276
-
103277
103440
  this.state = {
103278
103441
  imgSrc: [],
103279
103442
  imgLoadStatus: new Map(),
@@ -103424,7 +103587,10 @@ class previewInner_PreviewInner extends baseComponent_BaseComponent {
103424
103587
  }
103425
103588
 
103426
103589
  if ("currentIndex" in props && props.currentIndex !== state.currentIndex) {
103427
- willUpdateStates.currentIndex = props.currentIndex;
103590
+ willUpdateStates.currentIndex = props.currentIndex; // ratio will set to adaptation when change picture,
103591
+ // attention: If the ratio is controlled, the ratio should not change as the index changes
103592
+
103593
+ willUpdateStates.ratio = 'adaptation';
103428
103594
  }
103429
103595
 
103430
103596
  return willUpdateStates;
@@ -103546,7 +103712,7 @@ class previewInner_PreviewInner extends baseComponent_BaseComponent {
103546
103712
  src: imgSrc[currentIndex],
103547
103713
  onZoom: this.handleZoomImage,
103548
103714
  disableDownload: disableDownload,
103549
- setRatio: this.handleRatio,
103715
+ setRatio: this.handleAdjustRatio,
103550
103716
  zoom: zoom,
103551
103717
  ratio: ratio,
103552
103718
  zoomStep: zoomStep,