@douyinfe/semi-ui 2.1.0-beta.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/css/semi.css +14 -1
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +263 -135
  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/es/autoComplete/index.d.ts +36 -11
  8. package/lib/es/button/index.d.ts +0 -1
  9. package/lib/es/button/index.js +1 -2
  10. package/lib/es/calendar/dayCalendar.js +1 -1
  11. package/lib/es/calendar/monthCalendar.js +1 -1
  12. package/lib/es/calendar/rangeCalendar.js +1 -1
  13. package/lib/es/calendar/weekCalendar.js +1 -1
  14. package/lib/es/cascader/index.d.ts +1 -0
  15. package/lib/es/cascader/index.js +15 -3
  16. package/lib/es/collapse/index.js +1 -5
  17. package/lib/es/collapsible/index.js +4 -1
  18. package/lib/es/datePicker/yearAndMonth.d.ts +2 -2
  19. package/lib/es/datePicker/yearAndMonth.js +1 -1
  20. package/lib/es/form/baseForm.d.ts +4 -10
  21. package/lib/es/form/baseForm.js +1 -2
  22. package/lib/es/form/field.d.ts +4 -22
  23. package/lib/es/form/field.js +2 -18
  24. package/lib/es/form/hoc/withField.d.ts +1 -1
  25. package/lib/es/form/hoc/withField.js +0 -3
  26. package/lib/es/iconButton/index.d.ts +0 -1
  27. package/lib/es/iconButton/index.js +0 -1
  28. package/lib/es/locale/localeConsumer.d.ts +5 -5
  29. package/lib/es/modal/useModal/HookModal.d.ts +3 -2
  30. package/lib/es/modal/useModal/index.js +1 -1
  31. package/lib/es/notification/index.d.ts +1 -1
  32. package/lib/es/notification/index.js +1 -1
  33. package/lib/es/popconfirm/index.d.ts +5 -1
  34. package/lib/es/popconfirm/index.js +10 -4
  35. package/lib/es/popover/index.d.ts +3 -1
  36. package/lib/es/popover/index.js +4 -8
  37. package/lib/es/radio/context.d.ts +1 -1
  38. package/lib/es/radio/radio.d.ts +2 -2
  39. package/lib/es/radio/radioGroup.d.ts +4 -4
  40. package/lib/es/rating/index.d.ts +1 -1
  41. package/lib/es/resizeObserver/index.js +1 -0
  42. package/lib/es/scrollList/scrollItem.d.ts +12 -11
  43. package/lib/es/scrollList/scrollItem.js +8 -8
  44. package/lib/es/select/index.js +18 -11
  45. package/lib/es/select/option.js +4 -4
  46. package/lib/es/select/utils.d.ts +1 -1
  47. package/lib/es/select/utils.js +12 -8
  48. package/lib/es/sideSheet/SideSheetContent.d.ts +1 -1
  49. package/lib/es/sideSheet/index.d.ts +3 -3
  50. package/lib/es/steps/basicSteps.js +2 -2
  51. package/lib/es/steps/fillSteps.js +3 -3
  52. package/lib/es/steps/navSteps.js +2 -2
  53. package/lib/es/tabs/TabBar.d.ts +5 -3
  54. package/lib/es/tabs/TabBar.js +12 -4
  55. package/lib/es/tabs/TabPane.d.ts +2 -1
  56. package/lib/es/tabs/TabPane.js +3 -2
  57. package/lib/es/tabs/index.d.ts +3 -1
  58. package/lib/es/tabs/index.js +85 -16
  59. package/lib/es/tabs/interface.d.ts +6 -1
  60. package/lib/es/tagInput/index.d.ts +3 -0
  61. package/lib/es/tagInput/index.js +6 -1
  62. package/lib/es/timePicker/Combobox.d.ts +10 -4
  63. package/lib/es/timePicker/Combobox.js +2 -1
  64. package/lib/es/timePicker/TimePicker.d.ts +1 -1
  65. package/lib/es/tooltip/index.d.ts +3 -0
  66. package/lib/es/tooltip/index.js +3 -0
  67. package/lib/es/tree/interface.d.ts +2 -2
  68. package/lib/es/treeSelect/index.d.ts +2 -11
  69. package/lib/es/treeSelect/index.js +2 -1
  70. package/lib/es/typography/base.d.ts +1 -1
  71. package/lib/es/typography/paragraph.d.ts +1 -1
  72. package/lib/es/typography/text.d.ts +1 -1
  73. package/lib/es/typography/title.d.ts +1 -1
  74. package/lib/es/upload/fileCard.d.ts +3 -18
  75. package/lib/es/upload/index.d.ts +4 -57
  76. package/lib/es/upload/interface.d.ts +56 -0
  77. package/lib/es/upload/interface.js +1 -0
  78. package/package.json +9 -8
@@ -15172,6 +15172,28 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_faye__;
15172
15172
 
15173
15173
  /***/ }),
15174
15174
 
15175
+ /***/ "ffXp":
15176
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
15177
+
15178
+ "use strict";
15179
+ /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("r6MD");
15180
+
15181
+
15182
+ const log = function (text) {
15183
+ if (Object(lodash_es__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(process, 'env.NODE_ENV') === 'development') {
15184
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
15185
+ rest[_key - 1] = arguments[_key];
15186
+ }
15187
+
15188
+ console.log(text, ...rest);
15189
+ }
15190
+ };
15191
+
15192
+ /* harmony default export */ __webpack_exports__["a"] = (log);
15193
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("F63i")))
15194
+
15195
+ /***/ }),
15196
+
15175
15197
  /***/ "fw2E":
15176
15198
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
15177
15199
 
@@ -18230,12 +18252,9 @@ const strings = {
18230
18252
  var core_js_stable_set = __webpack_require__("ZIXj");
18231
18253
  var set_default = /*#__PURE__*/__webpack_require__.n(core_js_stable_set);
18232
18254
 
18233
- // CONCATENATED MODULE: ../semi-foundation/utils/log.ts
18234
- const log = function (text) {
18235
- if (false) { var _len, rest, _key; }
18236
- };
18255
+ // EXTERNAL MODULE: ../semi-foundation/utils/log.ts
18256
+ var log = __webpack_require__("ffXp");
18237
18257
 
18238
- /* harmony default export */ var utils_log = (log);
18239
18258
  // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash-es/noop.js
18240
18259
  /**
18241
18260
  * This method returns `undefined`.
@@ -18380,7 +18399,7 @@ class foundation_BaseFoundation {
18380
18399
  rest[_key - 1] = arguments[_key];
18381
18400
  }
18382
18401
 
18383
- utils_log(text, ...rest);
18402
+ Object(log["a" /* default */])(text, ...rest);
18384
18403
  }
18385
18404
 
18386
18405
  }
@@ -18772,7 +18791,7 @@ class baseComponent_BaseComponent extends external_root_React_commonjs2_react_co
18772
18791
  rest[_key - 1] = arguments[_key];
18773
18792
  }
18774
18793
 
18775
- return utils_log(text, ...rest);
18794
+ return Object(log["a" /* default */])(text, ...rest);
18776
18795
  }
18777
18796
 
18778
18797
  }
@@ -20419,6 +20438,9 @@ class foundation_Tooltip extends foundation {
20419
20438
  this._adapter.insertPortal(content, position);
20420
20439
 
20421
20440
  if (trigger === 'custom') {
20441
+ // eslint-disable-next-line
20442
+ this._adapter.registerClickOutsideHandler(() => {});
20443
+
20422
20444
  this._togglePortalVisible(true);
20423
20445
  }
20424
20446
  /**
@@ -20541,12 +20563,12 @@ class foundation_Tooltip extends foundation {
20541
20563
  }
20542
20564
 
20543
20565
  _bindEvent() {
20544
- const types = this.getProp('trigger'); // get trigger type
20566
+ const trigger = this.getProp('trigger'); // get trigger type
20545
20567
 
20546
20568
  const {
20547
20569
  triggerEventSet,
20548
20570
  portalEventSet
20549
- } = this._generateEvent(types);
20571
+ } = this._generateEvent(trigger);
20550
20572
 
20551
20573
  this._bindTriggerEvent(triggerEventSet);
20552
20574
 
@@ -23659,6 +23681,7 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
23659
23681
  popupEl = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(popupEl);
23660
23682
 
23661
23683
  if (el && !el.contains(e.target) && popupEl && !popupEl.contains(e.target) || this.props.clickTriggerToHide) {
23684
+ this.props.onClickOutSide(e);
23662
23685
  cb();
23663
23686
  }
23664
23687
  };
@@ -23857,6 +23880,7 @@ tooltip_Tooltip.propTypes = {
23857
23880
  content: prop_types_default.a.node,
23858
23881
  prefixCls: prop_types_default.a.string,
23859
23882
  onVisibleChange: prop_types_default.a.func,
23883
+ onClickOutSide: prop_types_default.a.func,
23860
23884
  spacing: prop_types_default.a.number,
23861
23885
  showArrow: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.node]),
23862
23886
  zIndex: prop_types_default.a.number,
@@ -23882,6 +23906,7 @@ tooltip_Tooltip.defaultProps = {
23882
23906
  mouseEnterDelay: numbers.MOUSE_ENTER_DELAY,
23883
23907
  mouseLeaveDelay: numbers.MOUSE_LEAVE_DELAY,
23884
23908
  onVisibleChange: lodash_es_noop,
23909
+ onClickOutSide: lodash_es_noop,
23885
23910
  spacing: numbers.SPACING,
23886
23911
  showArrow: true,
23887
23912
  arrowBounding: numbers.ARROW_BOUNDING
@@ -24821,7 +24846,9 @@ const Icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd
24821
24846
  className: classes,
24822
24847
  style: outerStyle
24823
24848
  }, restProps), svg);
24824
- });
24849
+ }); // @ts-ignore used to judge whether it is a semi-icon in semi-ui
24850
+ // custom icon case
24851
+
24825
24852
  Icon.elementType = 'Icon';
24826
24853
 
24827
24854
  const convertIcon = (Svg, iconType) => {
@@ -24829,7 +24856,9 @@ const convertIcon = (Svg, iconType) => {
24829
24856
  svg: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Svg),
24830
24857
  type: iconType,
24831
24858
  ref: ref
24832
- }, props)));
24859
+ }, props))); // @ts-ignore used to judge whether it is a semi-icon in semi-ui
24860
+ // builtin icon case
24861
+
24833
24862
  InnerIcon.elementType = 'Icon';
24834
24863
  return InnerIcon;
24835
24864
  };
@@ -26156,7 +26185,6 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
26156
26185
 
26157
26186
 
26158
26187
 
26159
-
26160
26188
 
26161
26189
 
26162
26190
  // CONCATENATED MODULE: ../semi-icons/lib/es/index.js
@@ -26858,17 +26886,11 @@ var popover_rest = undefined && undefined.__rest || function (s, e) {
26858
26886
 
26859
26887
 
26860
26888
 
26889
+
26861
26890
  const popover_positionSet = popover_constants_strings.POSITION_SET;
26862
26891
  const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
26863
26892
 
26864
26893
  class popover_Popover extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
26865
- constructor(props) {
26866
- super(props);
26867
- this.state = {
26868
- popConfirmVisible: false
26869
- };
26870
- }
26871
-
26872
26894
  renderPopCard() {
26873
26895
  const {
26874
26896
  content,
@@ -26944,6 +26966,7 @@ popover_Popover.propTypes = {
26944
26966
  trigger: prop_types_default.a.oneOf(popover_triggerSet).isRequired,
26945
26967
  contentClassName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
26946
26968
  onVisibleChange: prop_types_default.a.func,
26969
+ onClickOutSide: prop_types_default.a.func,
26947
26970
  style: prop_types_default.a.object,
26948
26971
  spacing: prop_types_default.a.number,
26949
26972
  zIndex: prop_types_default.a.number,
@@ -26967,7 +26990,8 @@ popover_Popover.defaultProps = {
26967
26990
  cancelText: 'No',
26968
26991
  okText: 'Yes',
26969
26992
  position: 'bottom',
26970
- prefixCls: popover_constants_cssClasses.PREFIX
26993
+ prefixCls: popover_constants_cssClasses.PREFIX,
26994
+ onClickOutSide: lodash_es_noop
26971
26995
  };
26972
26996
  /* harmony default export */ var popover_0 = (popover_Popover);
26973
26997
  // CONCATENATED MODULE: ./typography/util.tsx
@@ -31451,14 +31475,14 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
31451
31475
  style: style
31452
31476
  }, showTick ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31453
31477
  className: selectedIconClassName
31454
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31478
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, Object(isString["a" /* default */])(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31455
31479
  className: "".concat(prefixCls, "-text")
31456
31480
  }, this.renderOptionContent({
31457
31481
  children,
31458
31482
  config,
31459
31483
  inputValue,
31460
31484
  prefixCls
31461
- })));
31485
+ })) : children);
31462
31486
  }
31463
31487
 
31464
31488
  }
@@ -32652,7 +32676,6 @@ iconButton_IconButton.propTypes = {
32652
32676
  loading: prop_types_default.a.bool,
32653
32677
  prefixCls: prop_types_default.a.string,
32654
32678
  icon: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.string, prop_types_default.a.node]),
32655
- iconType: prop_types_default.a.element,
32656
32679
  iconSize: prop_types_default.a.oneOf(iconSizes),
32657
32680
  noHorizontalPadding: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string, prop_types_default.a.array]),
32658
32681
  children: prop_types_default.a.node,
@@ -33668,8 +33691,7 @@ class button_Button extends external_root_React_commonjs2_react_commonjs_react_a
33668
33691
  render() {
33669
33692
  const props = assign_default()({}, this.props);
33670
33693
 
33671
- const hasIcon = Boolean(props.icon || props.iconType); // TODO: iconType needs to be confirmed
33672
-
33694
+ const hasIcon = Boolean(props.icon);
33673
33695
  const isLoading = Boolean(props.loading);
33674
33696
  const isDisabled = Boolean(props.disabled);
33675
33697
 
@@ -38409,7 +38431,7 @@ class dayCalendar_DayCalendar extends baseComponent_BaseComponent {
38409
38431
  },
38410
38432
  setParsedEvents: parsedEvents => {
38411
38433
  this.setState({
38412
- parsedEvents
38434
+ parsedEvents: parsedEvents
38413
38435
  });
38414
38436
  },
38415
38437
  cacheEventKeys: cachedKeys => {
@@ -38731,7 +38753,7 @@ class weekCalendar_WeekCalendar extends baseComponent_BaseComponent {
38731
38753
  },
38732
38754
  setParsedEvents: parsedEvents => {
38733
38755
  this.setState({
38734
- parsedEvents
38756
+ parsedEvents: parsedEvents
38735
38757
  });
38736
38758
  },
38737
38759
  cacheEventKeys: cachedKeys => {
@@ -39159,7 +39181,7 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
39159
39181
  },
39160
39182
  setParsedEvents: parsedEvents => {
39161
39183
  this.setState({
39162
- parsedEvents
39184
+ parsedEvents: parsedEvents
39163
39185
  });
39164
39186
  },
39165
39187
  setItemLimit: itemLimit => {
@@ -39472,7 +39494,7 @@ class rangeCalendar_RangeCalendar extends baseComponent_BaseComponent {
39472
39494
  },
39473
39495
  setParsedEvents: parsedEvents => {
39474
39496
  this.setState({
39475
- parsedEvents
39497
+ parsedEvents: parsedEvents
39476
39498
  });
39477
39499
  },
39478
39500
  cacheEventKeys: cachedKeys => {
@@ -41193,6 +41215,7 @@ function max_max(array) {
41193
41215
 
41194
41216
 
41195
41217
 
41218
+
41196
41219
  /**
41197
41220
  * Part of the utils function implementation process reference
41198
41221
  * https://github.com/react-component/tree/blob/master/src/util.tsx
@@ -41695,7 +41718,9 @@ function normalizeKeyList(keyList, keyEntities) {
41695
41718
  res.push(key);
41696
41719
  });
41697
41720
  } else {
41698
- res = filter_default()(keyList).call(keyList, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
41721
+ var _context8;
41722
+
41723
+ res = filter_default()(_context8 = from_default()(keyList)).call(_context8, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
41699
41724
  }
41700
41725
 
41701
41726
  return res;
@@ -41704,9 +41729,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
41704
41729
  const res = [];
41705
41730
 
41706
41731
  const getChild = itemKey => {
41707
- var _context8;
41732
+ var _context9;
41708
41733
 
41709
- keyEntities[itemKey].children && for_each_default()(_context8 = keyEntities[itemKey].children).call(_context8, item => {
41734
+ keyEntities[itemKey].children && for_each_default()(_context9 = keyEntities[itemKey].children).call(_context9, item => {
41710
41735
  const {
41711
41736
  key
41712
41737
  } = item;
@@ -41822,7 +41847,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
41822
41847
  };
41823
41848
  }
41824
41849
  function filterTreeData(info) {
41825
- var _context9, _context10;
41850
+ var _context10, _context11;
41826
41851
 
41827
41852
  const {
41828
41853
  showFilteredOnly,
@@ -41834,7 +41859,7 @@ function filterTreeData(info) {
41834
41859
  prevExpandedKeys
41835
41860
  } = info;
41836
41861
  let filteredOptsKeys = [];
41837
- filteredOptsKeys = map_default()(_context9 = filter_default()(_context10 = values_default()(keyEntities)).call(_context10, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context9, item => item.key);
41862
+ filteredOptsKeys = map_default()(_context10 = filter_default()(_context11 = values_default()(keyEntities)).call(_context11, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context10, item => item.key);
41838
41863
  let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
41839
41864
 
41840
41865
  if (prevExpandedKeys.length) {
@@ -41875,9 +41900,9 @@ function updateKeys(keySet, keyEntities) {
41875
41900
  return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
41876
41901
  }
41877
41902
  function calcDisabledKeys(keyEntities) {
41878
- var _context11;
41903
+ var _context12;
41879
41904
 
41880
- const disabledKeys = filter_default()(_context11 = keys_default()(keyEntities)).call(_context11, key => keyEntities[key].data.disabled);
41905
+ const disabledKeys = filter_default()(_context12 = keys_default()(keyEntities)).call(_context12, key => keyEntities[key].data.disabled);
41881
41906
 
41882
41907
  const {
41883
41908
  checkedKeys
@@ -44361,6 +44386,8 @@ class foundation_TagInputFoundation extends foundation {
44361
44386
 
44362
44387
  this._onRemove(newTagList, removedTag, length - 1);
44363
44388
  }
44389
+
44390
+ this._adapter.notifyKeyDown(e);
44364
44391
  };
44365
44392
  }
44366
44393
 
@@ -44620,6 +44647,9 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
44620
44647
  },
44621
44648
  notifyTagRemove: (v, idx) => {
44622
44649
  this.props.onRemove(v, idx);
44650
+ },
44651
+ notifyKeyDown: e => {
44652
+ this.props.onKeyDown(e);
44623
44653
  }
44624
44654
  });
44625
44655
  }
@@ -44868,6 +44898,7 @@ tagInput_TagInput.propTypes = {
44868
44898
  onInputExceed: prop_types_default.a.func,
44869
44899
  onAdd: prop_types_default.a.func,
44870
44900
  onRemove: prop_types_default.a.func,
44901
+ onKeyDown: prop_types_default.a.func,
44871
44902
  size: prop_types_default.a.oneOf(tagInput_constants_strings.SIZE_SET),
44872
44903
  validateStatus: prop_types_default.a.oneOf(tagInput_constants_strings.STATUS),
44873
44904
  prefix: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
@@ -44890,7 +44921,8 @@ tagInput_TagInput.defaultProps = {
44890
44921
  onExceed: lodash_es_noop,
44891
44922
  onInputExceed: lodash_es_noop,
44892
44923
  onAdd: lodash_es_noop,
44893
- onRemove: lodash_es_noop
44924
+ onRemove: lodash_es_noop,
44925
+ onKeyDown: lodash_es_noop
44894
44926
  };
44895
44927
  /* harmony default export */ var tagInput_0 = (tagInput_TagInput);
44896
44928
  // CONCATENATED MODULE: ./cascader/index.tsx
@@ -44921,6 +44953,7 @@ tagInput_TagInput.defaultProps = {
44921
44953
 
44922
44954
 
44923
44955
 
44956
+
44924
44957
 
44925
44958
 
44926
44959
  const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
@@ -45169,15 +45202,27 @@ class cascader_Cascader extends baseComponent_BaseComponent {
45169
45202
  this.renderCustomTrigger = () => {
45170
45203
  const {
45171
45204
  disabled,
45172
- triggerRender
45205
+ triggerRender,
45206
+ multiple,
45207
+ autoMergeValue
45173
45208
  } = this.props;
45174
45209
  const {
45175
45210
  selectedKeys,
45176
45211
  inputValue,
45177
- inputPlaceHolder
45212
+ inputPlaceHolder,
45213
+ mergedCheckedKeys,
45214
+ checkedKeys
45178
45215
  } = this.state;
45216
+ let realValue;
45217
+
45218
+ if (multiple) {
45219
+ realValue = autoMergeValue ? mergedCheckedKeys : checkedKeys;
45220
+ } else {
45221
+ realValue = [...selectedKeys][0];
45222
+ }
45223
+
45179
45224
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, {
45180
- value: [...selectedKeys][0],
45225
+ value: realValue,
45181
45226
  inputValue: inputValue,
45182
45227
  onChange: this.handleInputChange,
45183
45228
  onClear: this.handleClear,
@@ -45983,7 +46028,10 @@ const Collapsible = props => {
45983
46028
  className: wrapperCls,
45984
46029
  ref: ref
45985
46030
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
45986
- ref: setHeight
46031
+ ref: setHeight,
46032
+ style: {
46033
+ overflow: 'hidden'
46034
+ }
45987
46035
  }, children));
45988
46036
  };
45989
46037
 
@@ -46226,12 +46274,8 @@ class collapse_Collapse extends baseComponent_BaseComponent {
46226
46274
  }
46227
46275
 
46228
46276
  get adapter() {
46229
- var _this = this;
46230
-
46231
46277
  return assign_default()(assign_default()({}, super.adapter), {
46232
- handleChange: function () {
46233
- return _this.props.onChange(...arguments);
46234
- },
46278
+ handleChange: (activeKey, e) => this.props.onChange(activeKey, e),
46235
46279
  addActiveKey: activeSet => this.setState({
46236
46280
  activeSet
46237
46281
  })
@@ -55705,14 +55749,6 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
55705
55749
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
55706
55750
  super(props);
55707
55751
  _this = this;
55708
- this.throttledAdjustList = lodash_es_throttle((e, nearestNode) => {
55709
- this.foundation.adjustInfiniteList(this.list, this.wrapper, nearestNode);
55710
- }, scrollItem_msPerFrame);
55711
- this.debouncedSelect = lodash_es_debounce((e, nearestNode) => {
55712
- this._cacheSelectedNode(nearestNode);
55713
-
55714
- this.foundation.selectNode(nearestNode, this.list);
55715
- }, scrollItem_msPerFrame * 5);
55716
55752
 
55717
55753
  this._cacheNode = (name, node) => name && node && Object.prototype.hasOwnProperty.call(this, name) && (this[name] = node);
55718
55754
 
@@ -56078,6 +56114,14 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
56078
56114
  this.scrollAnimation = null; // cache if select action comes from outside
56079
56115
 
56080
56116
  this.foundation = new itemFoundation_ItemFoundation(this.adapter);
56117
+ this.throttledAdjustList = lodash_es_throttle((e, nearestNode) => {
56118
+ this.foundation.adjustInfiniteList(this.list, this.wrapper, nearestNode);
56119
+ }, scrollItem_msPerFrame);
56120
+ this.debouncedSelect = lodash_es_debounce((e, nearestNode) => {
56121
+ this._cacheSelectedNode(nearestNode);
56122
+
56123
+ this.foundation.selectNode(nearestNode, this.list);
56124
+ }, scrollItem_msPerFrame * 5);
56081
56125
  }
56082
56126
 
56083
56127
  get adapter() {
@@ -56484,7 +56528,8 @@ class Combobox_Combobox extends baseComponent_BaseComponent {
56484
56528
  this.onItemChange = _ref => {
56485
56529
  let {
56486
56530
  type,
56487
- value
56531
+ value,
56532
+ disabled
56488
56533
  } = _ref;
56489
56534
  // eslint-disable-next-line prefer-const
56490
56535
  let {
@@ -57063,7 +57108,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
57063
57108
  className: prefix
57064
57109
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
57065
57110
  noHorizontalPadding: false,
57066
- iconType: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
57111
+ icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
57067
57112
  size: iconSize
57068
57113
  }),
57069
57114
  size: buttonSize,
@@ -66318,7 +66363,7 @@ class notification_NotificationList extends baseComponent_BaseComponent {
66318
66363
  this.add = noticeOpts => this.foundation.addNotice(noticeOpts);
66319
66364
 
66320
66365
  this.remove = id => {
66321
- this.foundation.removeNotice(id);
66366
+ this.foundation.removeNotice(String(id));
66322
66367
  };
66323
66368
 
66324
66369
  this.destroyAll = () => this.foundation.destroyAll();
@@ -66609,6 +66654,7 @@ class resizeObserver_ReactResizeObserver extends baseComponent_BaseComponent {
66609
66654
  // using findDOMNode for two reasons:
66610
66655
  // 1. cloning to insert a ref is unwieldy and not performant.
66611
66656
  // 2. ensure that we resolve to an actual DOM node (instead of any JSX ref instance).
66657
+ // eslint-disable-next-line
66612
66658
  return Object(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_["findDOMNode"])(this.childNode || this);
66613
66659
  } catch (error) {
66614
66660
  // swallow error if findDOMNode is run on unmounted component.
@@ -69899,12 +69945,14 @@ class foundation_SelectFoundation extends foundation {
69899
69945
  let optionNotExist = {
69900
69946
  value: propValue,
69901
69947
  label: propValue,
69902
- _notExist: true
69948
+ _notExist: true,
69949
+ _scrollIndex: -1
69903
69950
  };
69904
69951
 
69905
69952
  if (onChangeWithObject) {
69906
69953
  optionNotExist = assign_default()(assign_default()({}, propValue), {
69907
- _notExist: true
69954
+ _notExist: true,
69955
+ _scrollIndex: -1
69908
69956
  });
69909
69957
  }
69910
69958
 
@@ -69963,7 +70011,9 @@ class foundation_SelectFoundation extends foundation {
69963
70011
  onChangeWithObject ? optionNotExist = assign_default()(assign_default()({}, propValue[i]), {
69964
70012
  _notExist: true
69965
70013
  }) : null;
69966
- selections.set(optionNotExist.label, optionNotExist);
70014
+ selections.set(optionNotExist.label, assign_default()(assign_default()({}, optionNotExist), {
70015
+ _scrollIndex: -1
70016
+ }));
69967
70017
  }
69968
70018
  }
69969
70019
  });
@@ -70148,7 +70198,7 @@ class foundation_SelectFoundation extends foundation {
70148
70198
  this._adapter.notifyMaxLimit(assign_default()({
70149
70199
  value,
70150
70200
  label
70151
- }, rest));
70201
+ }, lodash_es_omit(rest, '_scrollIndex')));
70152
70202
 
70153
70203
  return;
70154
70204
  } else {
@@ -70649,6 +70699,7 @@ class foundation_SelectFoundation extends foundation {
70649
70699
  delete option._parentGroup;
70650
70700
  delete option._show;
70651
70701
  delete option._selected;
70702
+ delete option._scrollIndex;
70652
70703
 
70653
70704
  if ('_keyInOptionList' in option) {
70654
70705
  option.key = option._keyInOptionList;
@@ -70985,7 +71036,7 @@ var utils_rest = undefined && undefined.__rest || function (s, e) {
70985
71036
 
70986
71037
 
70987
71038
 
70988
- const generateOption = (child, parent) => {
71039
+ const generateOption = (child, parent, index) => {
70989
71040
  const childProps = child.props;
70990
71041
 
70991
71042
  if (!child || !childProps) {
@@ -70997,7 +71048,8 @@ const generateOption = (child, parent) => {
70997
71048
  // Drop-down menu rendering priority label value, children, value in turn downgrade
70998
71049
  label: childProps.label || childProps.children || childProps.value,
70999
71050
  _show: true,
71000
- _selected: false
71051
+ _selected: false,
71052
+ _scrollIndex: index
71001
71053
  }, childProps), {
71002
71054
  _parentGroup: parent
71003
71055
  });
@@ -71006,8 +71058,6 @@ const generateOption = (child, parent) => {
71006
71058
  };
71007
71059
 
71008
71060
  const getOptionsFromGroup = selectChildren => {
71009
- var _context;
71010
-
71011
71061
  let optionGroups = [];
71012
71062
  let options = [];
71013
71063
  const emptyGroup = {
@@ -71017,14 +71067,16 @@ const getOptionsFromGroup = selectChildren => {
71017
71067
  }; // avoid null
71018
71068
  // eslint-disable-next-line max-len
71019
71069
 
71020
- const childNodes = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(selectChildren)).call(_context, childNode => childNode && childNode.props);
71021
-
71070
+ let childNodes = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(selectChildren);
71071
+ childNodes = filter_default()(childNodes).call(childNodes, childNode => childNode && childNode.props);
71022
71072
  let type = '';
71073
+ let optionIndex = -1;
71023
71074
 
71024
71075
  for_each_default()(childNodes).call(childNodes, child => {
71025
71076
  if (child.type.isSelectOption) {
71026
71077
  type = 'option';
71027
- const option = generateOption(child);
71078
+ optionIndex++;
71079
+ const option = generateOption(child, undefined, optionIndex);
71028
71080
  emptyGroup.children.push(option);
71029
71081
  options.push(option);
71030
71082
  } else if (child.type.isSelectOptionGroup) {
@@ -71039,7 +71091,10 @@ const getOptionsFromGroup = selectChildren => {
71039
71091
 
71040
71092
  children = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children);
71041
71093
 
71042
- const childrenOption = map_default()(children).call(children, option => generateOption(option, restGroupProps));
71094
+ const childrenOption = map_default()(children).call(children, option => {
71095
+ optionIndex++;
71096
+ return generateOption(option, restGroupProps, optionIndex);
71097
+ });
71043
71098
 
71044
71099
  const group = assign_default()(assign_default()({}, child.props), {
71045
71100
  children: childrenOption,
@@ -71304,9 +71359,10 @@ class select_Select extends baseComponent_BaseComponent {
71304
71359
  } = _this.props;
71305
71360
 
71306
71361
  if (optionList && optionList.length) {
71307
- options = map_default()(optionList).call(optionList, itemOpt => assign_default()({
71362
+ options = map_default()(optionList).call(optionList, (itemOpt, index) => assign_default()({
71308
71363
  _show: true,
71309
- _selected: false
71364
+ _selected: false,
71365
+ _scrollIndex: index
71310
71366
  }, itemOpt));
71311
71367
  optionGroups[0] = {
71312
71368
  children: options,
@@ -71881,15 +71937,21 @@ class select_Select extends baseComponent_BaseComponent {
71881
71937
  }
71882
71938
 
71883
71939
  if (virtualize) {
71884
- let minKey;
71940
+ let minItemIndex = -1;
71941
+
71942
+ for_each_default()(selections).call(selections, item => {
71943
+ const itemIndex = Object(lodash_es_get["a" /* default */])(item, '_scrollIndex');
71944
+ /* When the itemIndex is legal */
71885
71945
 
71886
- for_each_default()(selections).call(selections, (v, k) => {
71887
- const tempKey = Number(String(k).match(/option-(.*)/)[1]);
71888
- minKey = typeof minKey === 'number' && minKey < tempKey ? minKey : tempKey;
71946
+ if (lodash_es_isNumber(itemIndex) && itemIndex >= 0) {
71947
+ minItemIndex = minItemIndex !== -1 && minItemIndex < itemIndex ? minItemIndex : itemIndex;
71948
+ }
71889
71949
  });
71890
71950
 
71891
- if (minKey) {
71892
- this.virtualizeListRef.current.scrollToItem(minKey, 'center');
71951
+ if (minItemIndex !== -1) {
71952
+ try {
71953
+ this.virtualizeListRef.current.scrollToItem(minItemIndex, 'center');
71954
+ } catch (error) {}
71893
71955
  }
71894
71956
  } else {
71895
71957
  this.foundation.updateScrollTop();
@@ -72657,6 +72719,10 @@ class popconfirmFoundation_PopConfirmFoundation extends foundation {
72657
72719
  this.handleVisibleChange(false);
72658
72720
  }
72659
72721
 
72722
+ handleClickOutSide(e) {
72723
+ this._adapter.notifyClickOutSide(e);
72724
+ }
72725
+
72660
72726
  handleVisibleChange(visible) {
72661
72727
  if (!this._isControlledComponent('visible')) {
72662
72728
  this._adapter.setVisible(visible);
@@ -72710,6 +72776,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72710
72776
 
72711
72777
  this.handleVisibleChange = visible => this.foundation.handleVisibleChange(visible);
72712
72778
 
72779
+ this.handleClickOutSide = e => this.foundation.handleClickOutSide(e);
72780
+
72713
72781
  this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
72714
72782
 
72715
72783
  this.state = {
@@ -72738,7 +72806,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72738
72806
  }),
72739
72807
  notifyConfirm: e => this.props.onConfirm(e),
72740
72808
  notifyCancel: e => this.props.onCancel(e),
72741
- notifyVisibleChange: visible => this.props.onVisibleChange(visible)
72809
+ notifyVisibleChange: visible => this.props.onVisibleChange(visible),
72810
+ notifyClickOutSide: e => this.props.onClickOutSide(e)
72742
72811
  });
72743
72812
  }
72744
72813
 
@@ -72837,7 +72906,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72837
72906
  const popContent = this.renderConfirmPopCard();
72838
72907
  const popProps = {
72839
72908
  onVisibleChange: this.handleVisibleChange,
72840
- className: popconfirm_constants_cssClasses.POPOVER
72909
+ className: popconfirm_constants_cssClasses.POPOVER,
72910
+ onClickOutSide: this.handleClickOutSide
72841
72911
  };
72842
72912
 
72843
72913
  if (this.isControlled('visible')) {
@@ -72868,13 +72938,14 @@ popconfirm_Popconfirm.propTypes = {
72868
72938
  cancelType: prop_types_default.a.string,
72869
72939
  onCancel: prop_types_default.a.func,
72870
72940
  onConfirm: prop_types_default.a.func,
72871
- zIndex: prop_types_default.a.number,
72941
+ onClickOutSide: prop_types_default.a.func,
72872
72942
  onVisibleChange: prop_types_default.a.func,
72873
72943
  visible: prop_types_default.a.bool,
72874
72944
  defaultVisible: prop_types_default.a.bool,
72875
72945
  okButtonProps: prop_types_default.a.object,
72876
72946
  cancelButtonProps: prop_types_default.a.object,
72877
72947
  stopPropagation: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string]),
72948
+ zIndex: prop_types_default.a.number,
72878
72949
  // private
72879
72950
  trigger: prop_types_default.a.string,
72880
72951
  position: prop_types_default.a.string
@@ -72893,7 +72964,8 @@ popconfirm_Popconfirm.defaultProps = {
72893
72964
  prefixCls: popconfirm_constants_cssClasses.PREFIX,
72894
72965
  zIndex: popconfirm_constants_numbers.DEFAULT_Z_INDEX,
72895
72966
  onCancel: lodash_es_noop,
72896
- onConfirm: lodash_es_noop
72967
+ onConfirm: lodash_es_noop,
72968
+ onClickOutSide: lodash_es_noop
72897
72969
  };
72898
72970
  // CONCATENATED MODULE: ../semi-foundation/progress/constants.ts
72899
72971
 
@@ -77008,7 +77080,7 @@ const fillSteps_Steps = props => {
77008
77080
  const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
77009
77081
  var _context;
77010
77082
 
77011
- const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => Boolean(c));
77083
+ const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
77012
77084
 
77013
77085
  const colStyle = direction === 'vertical' ? null : {
77014
77086
  width: "".concat(100 / filteredChildren.length, "%")
@@ -77052,7 +77124,7 @@ const fillSteps_Steps = props => {
77052
77124
  });
77053
77125
 
77054
77126
  return content;
77055
- }, [children, initial, prefixCls, direction, status, current]);
77127
+ }, [children, initial, prefixCls, direction, status, current, onChange]);
77056
77128
  const wrapperCls = classnames_default()(className, {
77057
77129
  [prefixCls]: true,
77058
77130
  [concat_default()(_context2 = "".concat(prefixCls, "-")).call(_context2, direction)]: true
@@ -77112,7 +77184,7 @@ const basicSteps_Steps = props => {
77112
77184
  const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
77113
77185
  var _context;
77114
77186
 
77115
- const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => Boolean(c));
77187
+ const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
77116
77188
 
77117
77189
  const content = map_default()(external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"]).call(external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"], filteredChildren, (child, index) => {
77118
77190
  if (!child) {
@@ -77212,7 +77284,7 @@ const navSteps_Steps = props => {
77212
77284
  const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
77213
77285
  var _context;
77214
77286
 
77215
- const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => Boolean(c));
77287
+ const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
77216
77288
 
77217
77289
  const total = filteredChildren.length;
77218
77290
 
@@ -85596,15 +85668,11 @@ class foundation_TabsFoundation extends foundation {
85596
85668
  handleTabPanesChange() {
85597
85669
  this._adapter.collectPane();
85598
85670
 
85599
- let activeKey = this.getState('activeKey');
85600
-
85601
- if (typeof activeKey === 'undefined') {
85602
- activeKey = this._adapter.getDefaultActiveKeyFromChildren();
85603
- }
85671
+ this._adapter.collectActiveKey();
85672
+ }
85604
85673
 
85605
- if (typeof activeKey !== 'undefined') {
85606
- this.handleNewActiveKey(activeKey);
85607
- }
85674
+ handleTabDelete(tabKey) {
85675
+ this._adapter.notifyTabDelete(tabKey);
85608
85676
  }
85609
85677
 
85610
85678
  }
@@ -85667,9 +85735,15 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
85667
85735
 
85668
85736
  this.renderTabItem = panel => {
85669
85737
  const {
85670
- size
85738
+ size,
85739
+ type,
85740
+ deleteTabItem
85671
85741
  } = this.props;
85672
85742
  const panelIcon = panel.icon ? this.renderIcon(panel.icon) : null;
85743
+ const closableIcon = type === 'card' && panel.closable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
85744
+ className: "".concat(tabs_constants_cssClasses.TABS_TAB, "-icon-close"),
85745
+ onClick: e => deleteTabItem(panel.itemKey, e)
85746
+ }) : null;
85673
85747
  let events = {};
85674
85748
  const key = panel.itemKey;
85675
85749
 
@@ -85692,7 +85766,7 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
85692
85766
  }, events, {
85693
85767
  className: className,
85694
85768
  key: this._getItemKey(key)
85695
- }), panelIcon, panel.tab);
85769
+ }), panelIcon, panel.tab, closableIcon);
85696
85770
  };
85697
85771
 
85698
85772
  this.renderTabComponents = list => map_default()(list).call(list, panel => this.renderTabItem(panel));
@@ -85894,7 +85968,9 @@ TabBar_TabBar.propTypes = {
85894
85968
  style: prop_types_default.a.object,
85895
85969
  tabBarExtraContent: prop_types_default.a.node,
85896
85970
  tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
85897
- type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
85971
+ type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
85972
+ closable: prop_types_default.a.bool,
85973
+ deleteTabItem: prop_types_default.a.func
85898
85974
  };
85899
85975
  /* harmony default export */ var tabs_TabBar = (TabBar_TabBar);
85900
85976
  // CONCATENATED MODULE: ./tabs/tabs-context.ts
@@ -86140,7 +86216,8 @@ TabPane_TabPane.propTypes = {
86140
86216
  disabled: prop_types_default.a.bool,
86141
86217
  itemKey: prop_types_default.a.string,
86142
86218
  tab: prop_types_default.a.node,
86143
- icon: prop_types_default.a.node
86219
+ icon: prop_types_default.a.node,
86220
+ closable: prop_types_default.a.bool
86144
86221
  };
86145
86222
  /* harmony default export */ var tabs_TabPane = (TabPane_TabPane);
86146
86223
  // CONCATENATED MODULE: ./tabs/index.tsx
@@ -86154,6 +86231,7 @@ TabPane_TabPane.propTypes = {
86154
86231
 
86155
86232
 
86156
86233
 
86234
+
86157
86235
  var tabs_rest = undefined && undefined.__rest || function (s, e) {
86158
86236
  var t = {};
86159
86237
 
@@ -86225,7 +86303,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86225
86303
  }
86226
86304
 
86227
86305
  return filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context, pane => {
86228
- if (pane && pane.type && pane.type.isTabPane) {
86306
+ if ( /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(pane) && pane.type && pane.type.isTabPane) {
86229
86307
  return pane.props.itemKey === activeKey;
86230
86308
  }
86231
86309
 
@@ -86233,6 +86311,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86233
86311
  });
86234
86312
  };
86235
86313
 
86314
+ this.deleteTabItem = (tabKey, event) => {
86315
+ event.stopPropagation();
86316
+ this.foundation.handleTabDelete(tabKey);
86317
+ };
86318
+
86236
86319
  this.foundation = new tabs_foundation(this.adapter);
86237
86320
  this.state = {
86238
86321
  activeKey: this.foundation.getDefaultActiveKey(),
@@ -86265,13 +86348,15 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86265
86348
  tab,
86266
86349
  icon,
86267
86350
  disabled,
86268
- itemKey
86351
+ itemKey,
86352
+ closable
86269
86353
  } = child.props;
86270
86354
  return {
86271
86355
  tab,
86272
86356
  icon,
86273
86357
  disabled,
86274
- itemKey
86358
+ itemKey,
86359
+ closable
86275
86360
  };
86276
86361
  }
86277
86362
 
@@ -86282,6 +86367,61 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86282
86367
  panes
86283
86368
  });
86284
86369
  },
86370
+ collectActiveKey: () => {
86371
+ let panes = [];
86372
+ const {
86373
+ tabList,
86374
+ children,
86375
+ activeKey: propsActiveKey
86376
+ } = this.props;
86377
+
86378
+ if (typeof propsActiveKey !== 'undefined') {
86379
+ return;
86380
+ }
86381
+
86382
+ const {
86383
+ activeKey
86384
+ } = this.state;
86385
+
86386
+ if (is_array_default()(tabList) && tabList.length) {
86387
+ panes = tabList;
86388
+ } else {
86389
+ var _context3;
86390
+
86391
+ panes = map_default()(_context3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children).call(_context3, children, child => {
86392
+ if (child) {
86393
+ const {
86394
+ tab,
86395
+ icon,
86396
+ disabled,
86397
+ itemKey,
86398
+ closable
86399
+ } = child.props;
86400
+ return {
86401
+ tab,
86402
+ icon,
86403
+ disabled,
86404
+ itemKey,
86405
+ closable
86406
+ };
86407
+ }
86408
+
86409
+ return undefined;
86410
+ });
86411
+ }
86412
+
86413
+ if (find_index_default()(panes).call(panes, p => p.itemKey === activeKey) === -1) {
86414
+ if (panes.length > 0) {
86415
+ this.setState({
86416
+ activeKey: panes[0].itemKey
86417
+ });
86418
+ } else {
86419
+ this.setState({
86420
+ activeKey: ''
86421
+ });
86422
+ }
86423
+ }
86424
+ },
86285
86425
  notifyTabClick: (activeKey, event) => {
86286
86426
  this.props.onTabClick(activeKey, event);
86287
86427
  },
@@ -86294,14 +86434,14 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86294
86434
  });
86295
86435
  },
86296
86436
  getDefaultActiveKeyFromChildren: () => {
86297
- var _context3;
86437
+ var _context4;
86298
86438
 
86299
86439
  const {
86300
86440
  tabList,
86301
86441
  children
86302
86442
  } = this.props;
86303
86443
  let activeKey = '';
86304
- const list = tabList ? tabList : map_default()(_context3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context3, child => child.props);
86444
+ const list = tabList ? tabList : map_default()(_context4 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context4, child => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.props : null);
86305
86445
 
86306
86446
  for_each_default()(list).call(list, item => {
86307
86447
  if (item && !activeKey && !item.disabled) {
@@ -86310,6 +86450,9 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86310
86450
  });
86311
86451
 
86312
86452
  return activeKey;
86453
+ },
86454
+ notifyTabDelete: tabKey => {
86455
+ this.props.onTabClose && this.props.onTabClose(tabKey);
86313
86456
  }
86314
86457
  });
86315
86458
  }
@@ -86325,12 +86468,12 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86325
86468
  }
86326
86469
 
86327
86470
  componentDidUpdate(prevProps) {
86328
- var _context4, _context5;
86471
+ var _context5, _context6;
86329
86472
 
86330
86473
  // Panes state acts on tab bar, no need to compare TabPane children
86331
- const prevChildrenProps = map_default()(_context4 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context4, child => lodash_es_pick(child.props, panePickKeys));
86474
+ const prevChildrenProps = map_default()(_context5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context5, child => lodash_es_pick( /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.props : null, panePickKeys));
86332
86475
 
86333
- const nowChildrenProps = map_default()(_context5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context5, child => lodash_es_pick(child.props, panePickKeys));
86476
+ const nowChildrenProps = map_default()(_context6 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context6, child => lodash_es_pick( /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.props : null, panePickKeys));
86334
86477
 
86335
86478
  const isTabListType = this.props.tabList || prevProps.tabList;
86336
86479
 
@@ -86348,7 +86491,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86348
86491
  }
86349
86492
 
86350
86493
  render() {
86351
- var _context6, _context7;
86494
+ var _context7, _context8;
86352
86495
 
86353
86496
  const _a = this.props,
86354
86497
  {
@@ -86376,11 +86519,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86376
86519
  } = this.state;
86377
86520
  const tabWrapperCls = classnames_default()(className, {
86378
86521
  [tabs_constants_cssClasses.TABS]: true,
86379
- [concat_default()(_context6 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context6, tabPosition)]: tabPosition
86522
+ [concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context7, tabPosition)]: tabPosition
86380
86523
  });
86381
86524
  const tabContentCls = classnames_default()({
86382
86525
  [tabs_constants_cssClasses.TABS_CONTENT]: true,
86383
- [concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context7, tabPosition)]: tabPosition
86526
+ [concat_default()(_context8 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context8, tabPosition)]: tabPosition
86384
86527
  });
86385
86528
  const tabBarProps = {
86386
86529
  activeKey,
@@ -86392,7 +86535,8 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86392
86535
  style: tabBarStyle,
86393
86536
  tabBarExtraContent,
86394
86537
  tabPosition,
86395
- type
86538
+ type,
86539
+ deleteTabItem: this.deleteTabItem
86396
86540
  };
86397
86541
  const tabBar = renderTabBar ? renderTabBar(tabBarProps, tabs_TabBar) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tabs_TabBar, assign_default()({}, tabBarProps));
86398
86542
  const content = keepDOM ? children : this.getActiveItem();
@@ -86437,7 +86581,8 @@ tabs_Tabs.propTypes = {
86437
86581
  tabList: prop_types_default.a.array,
86438
86582
  tabPaneMotion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object, prop_types_default.a.func]),
86439
86583
  tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
86440
- type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
86584
+ type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
86585
+ onTabClose: prop_types_default.a.func
86441
86586
  };
86442
86587
  tabs_Tabs.defaultProps = {
86443
86588
  children: [],
@@ -86449,7 +86594,8 @@ tabs_Tabs.defaultProps = {
86449
86594
  size: 'large',
86450
86595
  tabPaneMotion: true,
86451
86596
  tabPosition: 'top',
86452
- type: 'line'
86597
+ type: 'line',
86598
+ onTabClose: () => undefined
86453
86599
  };
86454
86600
  /* harmony default export */ var tabs_0 = (tabs_Tabs);
86455
86601
  // EXTERNAL MODULE: ../semi-foundation/timeline/timeline.scss
@@ -92807,7 +92953,8 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
92807
92953
  registerClickOutsideHandler: cb => {
92808
92954
  const clickOutsideHandler = e => {
92809
92955
  const optionInstance = this.optionsRef && this.optionsRef.current;
92810
- const triggerDom = this.triggerRef && this.triggerRef.current;
92956
+ const triggerDom = this.triggerRef && this.triggerRef.current; // eslint-disable-next-line
92957
+
92811
92958
  const optionsDom = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(optionInstance);
92812
92959
  const target = e.target;
92813
92960
 
@@ -94737,6 +94884,7 @@ var upload = __webpack_require__("/t7F");
94737
94884
 
94738
94885
 
94739
94886
 
94887
+
94740
94888
  const upload_prefixCls = upload_constants_cssClasses.PREFIX;
94741
94889
 
94742
94890
 
@@ -99585,8 +99733,6 @@ function useStateWithGetter(initial) {
99585
99733
 
99586
99734
 
99587
99735
 
99588
- /* argus-disable unPkgSensitiveInfo */
99589
-
99590
99736
  /* eslint-disable max-lines-per-function, react-hooks/rules-of-hooks, prefer-const, max-len */
99591
99737
 
99592
99738
 
@@ -100087,7 +100233,6 @@ function withField(Component, opts) {
100087
100233
  return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => FieldComponent, [...shouldUpdate]);
100088
100234
  } else {
100089
100235
  // Some Custom Component with inner state shouldn't be memo, otherwise the component will not updated when the internal state is updated
100090
- // Fixed issue 328
100091
100236
  return FieldComponent;
100092
100237
  }
100093
100238
  };
@@ -100153,24 +100298,8 @@ const FormSwitch = hoc_withField(switch_0, {
100153
100298
  valueKey: 'checked'
100154
100299
  });
100155
100300
  const FormSlider = hoc_withField(slider_Slider);
100156
- /**
100157
- * Reasons for using ts-igonre:
100158
- *
100159
- * 1. TimePicker: The propTypes of the locale is defined as object (it is not necessary and too troublesome to write a complete shapeOf),
100160
- * but the interface defines a complete type, the two cannot match, and ts will report an error, so skip it here.
100161
- *
100162
- * 2. Cascader: treeData { label, value } define in PropTypes.shapeOf alreaady declare isRequired, ts still throw error
100163
- * 【Property is optional in type “InferProps<{ value: Validator<string | number>; label: Validator<any>; }>” but required in type CascaderData】
100164
- * skip it here.
100165
- * 3. TreeSelect: value same as cascader, skip it here
100166
- *
100167
- */
100168
- // @ts-ignore-next-line
100169
-
100170
- const FormTimePicker = hoc_withField(timePicker_LocaleTimePicker); // @ts-ignore-next-line
100171
-
100172
- const FormTreeSelect = hoc_withField(treeSelect_0); // @ts-ignore-next-line
100173
-
100301
+ const FormTimePicker = hoc_withField(timePicker_LocaleTimePicker);
100302
+ const FormTreeSelect = hoc_withField(treeSelect_0);
100174
100303
  const FormCascader = hoc_withField(cascader_0);
100175
100304
  const FormRating = hoc_withField(rating_Rating);
100176
100305
  const FormAutoComplete = hoc_withField(autoComplete_0, {
@@ -100236,8 +100365,7 @@ class baseForm_Form extends baseComponent_BaseComponent {
100236
100365
  this.state = {
100237
100366
  formId: getUuidv4()
100238
100367
  };
100239
- Object(warning["a" /* default */])( // @ts-ignore special usage
100240
- props.component && props.render, '[Semi Form] You should not use <Form component> and <Form render> in ths same time; <Form render> will be ignored');
100368
+ Object(warning["a" /* default */])(Boolean(props.component && props.render), '[Semi Form] You should not use <Form component> and <Form render> in ths same time; <Form render> will be ignored');
100241
100369
  Object(warning["a" /* default */])(props.component && props.children && !isEmptyChildren(props.children), '[Semi Form] You should not use <Form component> and <Form>{children}</Form> in ths same time; <Form>{children}</Form> will be ignored');
100242
100370
  Object(warning["a" /* default */])(props.render && props.children && !isEmptyChildren(props.children), '[Semi Form] You should not use <Form render> and <Form>{children}</Form> in ths same time; <Form>{children}</Form> will be ignored');
100243
100371
  this.submit = bind_default()(_context = this.submit).call(_context, this);