@douyinfe/semi-ui 2.0.8 → 2.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/css/semi.css +166 -6
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +318 -172
  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 +0 -1
  8. package/lib/es/autoComplete/index.js +0 -1
  9. package/lib/es/button/index.d.ts +0 -1
  10. package/lib/es/button/index.js +1 -2
  11. package/lib/es/cascader/index.d.ts +1 -0
  12. package/lib/es/cascader/index.js +15 -3
  13. package/lib/es/datePicker/yearAndMonth.js +1 -1
  14. package/lib/es/form/hoc/withField.d.ts +2 -2
  15. package/lib/es/form/interface.d.ts +2 -2
  16. package/lib/es/iconButton/index.d.ts +0 -1
  17. package/lib/es/iconButton/index.js +0 -1
  18. package/lib/es/notification/index.d.ts +1 -1
  19. package/lib/es/popconfirm/index.d.ts +5 -1
  20. package/lib/es/popconfirm/index.js +10 -4
  21. package/lib/es/popover/index.d.ts +3 -1
  22. package/lib/es/popover/index.js +4 -8
  23. package/lib/es/radio/context.d.ts +1 -1
  24. package/lib/es/radio/radio.d.ts +2 -2
  25. package/lib/es/radio/radioGroup.d.ts +4 -4
  26. package/lib/es/select/index.d.ts +0 -1
  27. package/lib/es/select/index.js +16 -10
  28. package/lib/es/select/option.js +2 -2
  29. package/lib/es/select/utils.d.ts +1 -1
  30. package/lib/es/select/utils.js +10 -4
  31. package/lib/es/slider/index.js +3 -1
  32. package/lib/es/spin/index.d.ts +2 -2
  33. package/lib/es/spin/index.js +1 -1
  34. package/lib/es/tabs/TabBar.d.ts +4 -2
  35. package/lib/es/tabs/TabBar.js +12 -4
  36. package/lib/es/tabs/TabPane.d.ts +2 -1
  37. package/lib/es/tabs/TabPane.js +3 -2
  38. package/lib/es/tabs/index.d.ts +4 -2
  39. package/lib/es/tabs/index.js +83 -14
  40. package/lib/es/tabs/interface.d.ts +6 -1
  41. package/lib/es/tagInput/index.d.ts +3 -0
  42. package/lib/es/tagInput/index.js +6 -1
  43. package/lib/es/toast/index.d.ts +1 -1
  44. package/lib/es/tooltip/index.d.ts +3 -0
  45. package/lib/es/tooltip/index.js +3 -0
  46. package/lib/es/tree/interface.d.ts +2 -2
  47. package/lib/es/treeSelect/index.d.ts +2 -11
  48. package/lib/es/upload/index.d.ts +1 -0
  49. package/package.json +8 -8
@@ -9987,13 +9987,6 @@ module.exports = entryVirtual('Array').keys;
9987
9987
 
9988
9988
 
9989
9989
 
9990
- /***/ }),
9991
-
9992
- /***/ "QHmH":
9993
- /***/ (function(module, exports) {
9994
-
9995
-
9996
-
9997
9990
  /***/ }),
9998
9991
 
9999
9992
  /***/ "Qb90":
@@ -20426,6 +20419,9 @@ class foundation_Tooltip extends foundation {
20426
20419
  this._adapter.insertPortal(content, position);
20427
20420
 
20428
20421
  if (trigger === 'custom') {
20422
+ // eslint-disable-next-line
20423
+ this._adapter.registerClickOutsideHandler(() => {});
20424
+
20429
20425
  this._togglePortalVisible(true);
20430
20426
  }
20431
20427
  /**
@@ -20548,12 +20544,12 @@ class foundation_Tooltip extends foundation {
20548
20544
  }
20549
20545
 
20550
20546
  _bindEvent() {
20551
- const types = this.getProp('trigger'); // get trigger type
20547
+ const trigger = this.getProp('trigger'); // get trigger type
20552
20548
 
20553
20549
  const {
20554
20550
  triggerEventSet,
20555
20551
  portalEventSet
20556
- } = this._generateEvent(types);
20552
+ } = this._generateEvent(trigger);
20557
20553
 
20558
20554
  this._bindTriggerEvent(triggerEventSet);
20559
20555
 
@@ -23666,6 +23662,7 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
23666
23662
  popupEl = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(popupEl);
23667
23663
 
23668
23664
  if (el && !el.contains(e.target) && popupEl && !popupEl.contains(e.target) || this.props.clickTriggerToHide) {
23665
+ this.props.onClickOutSide(e);
23669
23666
  cb();
23670
23667
  }
23671
23668
  };
@@ -23864,6 +23861,7 @@ tooltip_Tooltip.propTypes = {
23864
23861
  content: prop_types_default.a.node,
23865
23862
  prefixCls: prop_types_default.a.string,
23866
23863
  onVisibleChange: prop_types_default.a.func,
23864
+ onClickOutSide: prop_types_default.a.func,
23867
23865
  spacing: prop_types_default.a.number,
23868
23866
  showArrow: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.node]),
23869
23867
  zIndex: prop_types_default.a.number,
@@ -23889,6 +23887,7 @@ tooltip_Tooltip.defaultProps = {
23889
23887
  mouseEnterDelay: numbers.MOUSE_ENTER_DELAY,
23890
23888
  mouseLeaveDelay: numbers.MOUSE_LEAVE_DELAY,
23891
23889
  onVisibleChange: lodash_es_noop,
23890
+ onClickOutSide: lodash_es_noop,
23892
23891
  spacing: numbers.SPACING,
23893
23892
  showArrow: true,
23894
23893
  arrowBounding: numbers.ARROW_BOUNDING
@@ -24039,6 +24038,12 @@ var formatLong = {
24039
24038
  })
24040
24039
  };
24041
24040
  /* harmony default export */ var _lib_formatLong = (formatLong);
24041
+ // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/date-fns/esm/_lib/requiredArgs/index.js
24042
+ function requiredArgs(required, args) {
24043
+ if (args.length < required) {
24044
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
24045
+ }
24046
+ }
24042
24047
  // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/date-fns/esm/_lib/toInteger/index.js
24043
24048
  function toInteger(dirtyNumber) {
24044
24049
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
@@ -24053,12 +24058,6 @@ function toInteger(dirtyNumber) {
24053
24058
 
24054
24059
  return number < 0 ? Math.ceil(number) : Math.floor(number);
24055
24060
  }
24056
- // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/date-fns/esm/_lib/requiredArgs/index.js
24057
- function requiredArgs(required, args) {
24058
- if (args.length < required) {
24059
- throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
24060
- }
24061
- }
24062
24061
  // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/date-fns/esm/toDate/index.js
24063
24062
 
24064
24063
  /**
@@ -26163,7 +26162,6 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
26163
26162
 
26164
26163
 
26165
26164
 
26166
-
26167
26165
 
26168
26166
 
26169
26167
  // CONCATENATED MODULE: ../semi-icons/lib/es/index.js
@@ -26865,17 +26863,11 @@ var popover_rest = undefined && undefined.__rest || function (s, e) {
26865
26863
 
26866
26864
 
26867
26865
 
26866
+
26868
26867
  const popover_positionSet = popover_constants_strings.POSITION_SET;
26869
26868
  const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
26870
26869
 
26871
26870
  class popover_Popover extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
26872
- constructor(props) {
26873
- super(props);
26874
- this.state = {
26875
- popConfirmVisible: false
26876
- };
26877
- }
26878
-
26879
26871
  renderPopCard() {
26880
26872
  const {
26881
26873
  content,
@@ -26951,6 +26943,7 @@ popover_Popover.propTypes = {
26951
26943
  trigger: prop_types_default.a.oneOf(popover_triggerSet).isRequired,
26952
26944
  contentClassName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
26953
26945
  onVisibleChange: prop_types_default.a.func,
26946
+ onClickOutSide: prop_types_default.a.func,
26954
26947
  style: prop_types_default.a.object,
26955
26948
  spacing: prop_types_default.a.number,
26956
26949
  zIndex: prop_types_default.a.number,
@@ -26974,7 +26967,8 @@ popover_Popover.defaultProps = {
26974
26967
  cancelText: 'No',
26975
26968
  okText: 'Yes',
26976
26969
  position: 'bottom',
26977
- prefixCls: popover_constants_cssClasses.PREFIX
26970
+ prefixCls: popover_constants_cssClasses.PREFIX,
26971
+ onClickOutSide: lodash_es_noop
26978
26972
  };
26979
26973
  /* harmony default export */ var popover_0 = (popover_Popover);
26980
26974
  // CONCATENATED MODULE: ./typography/util.tsx
@@ -30373,7 +30367,7 @@ spin_Spin.propTypes = {
30373
30367
  children: prop_types_default.a.node,
30374
30368
  indicator: prop_types_default.a.node,
30375
30369
  delay: prop_types_default.a.number,
30376
- tip: prop_types_default.a.string,
30370
+ tip: prop_types_default.a.node,
30377
30371
  wrapperClassName: prop_types_default.a.string,
30378
30372
  childStyle: prop_types_default.a.object,
30379
30373
  style: prop_types_default.a.object
@@ -31458,14 +31452,14 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
31458
31452
  style: style
31459
31453
  }, showTick ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31460
31454
  className: selectedIconClassName
31461
- }, /*#__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", {
31455
+ }, /*#__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", {
31462
31456
  className: "".concat(prefixCls, "-text")
31463
31457
  }, this.renderOptionContent({
31464
31458
  children,
31465
31459
  config,
31466
31460
  inputValue,
31467
31461
  prefixCls
31468
- })));
31462
+ })) : children);
31469
31463
  }
31470
31464
 
31471
31465
  }
@@ -31496,9 +31490,6 @@ option_Option.defaultProps = {
31496
31490
  // EXTERNAL MODULE: ../semi-foundation/autoComplete/autoComplete.scss
31497
31491
  var autoComplete = __webpack_require__("t64S");
31498
31492
 
31499
- // EXTERNAL MODULE: ../semi-foundation/select/option.scss
31500
- var semi_foundation_select_option = __webpack_require__("QHmH");
31501
-
31502
31493
  // CONCATENATED MODULE: ./autoComplete/index.tsx
31503
31494
 
31504
31495
 
@@ -31523,7 +31514,6 @@ var semi_foundation_select_option = __webpack_require__("QHmH");
31523
31514
 
31524
31515
 
31525
31516
 
31526
-
31527
31517
  const autoComplete_prefixCls = autoComplete_constants_cssClasses.PREFIX;
31528
31518
  const autoComplete_sizeSet = autoComplete_constants_strings.SIZE;
31529
31519
  const autoComplete_positionSet = autoComplete_constants_strings.POSITION;
@@ -32663,7 +32653,6 @@ iconButton_IconButton.propTypes = {
32663
32653
  loading: prop_types_default.a.bool,
32664
32654
  prefixCls: prop_types_default.a.string,
32665
32655
  icon: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.string, prop_types_default.a.node]),
32666
- iconType: prop_types_default.a.element,
32667
32656
  iconSize: prop_types_default.a.oneOf(iconSizes),
32668
32657
  noHorizontalPadding: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string, prop_types_default.a.array]),
32669
32658
  children: prop_types_default.a.node,
@@ -33679,8 +33668,7 @@ class button_Button extends external_root_React_commonjs2_react_commonjs_react_a
33679
33668
  render() {
33680
33669
  const props = assign_default()({}, this.props);
33681
33670
 
33682
- const hasIcon = Boolean(props.icon || props.iconType); // TODO: iconType needs to be confirmed
33683
-
33671
+ const hasIcon = Boolean(props.icon);
33684
33672
  const isLoading = Boolean(props.loading);
33685
33673
  const isDisabled = Boolean(props.disabled);
33686
33674
 
@@ -41204,6 +41192,7 @@ function max_max(array) {
41204
41192
 
41205
41193
 
41206
41194
 
41195
+
41207
41196
  /**
41208
41197
  * Part of the utils function implementation process reference
41209
41198
  * https://github.com/react-component/tree/blob/master/src/util.tsx
@@ -41706,7 +41695,9 @@ function normalizeKeyList(keyList, keyEntities) {
41706
41695
  res.push(key);
41707
41696
  });
41708
41697
  } else {
41709
- res = filter_default()(keyList).call(keyList, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
41698
+ var _context8;
41699
+
41700
+ res = filter_default()(_context8 = from_default()(keyList)).call(_context8, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
41710
41701
  }
41711
41702
 
41712
41703
  return res;
@@ -41715,9 +41706,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
41715
41706
  const res = [];
41716
41707
 
41717
41708
  const getChild = itemKey => {
41718
- var _context8;
41709
+ var _context9;
41719
41710
 
41720
- keyEntities[itemKey].children && for_each_default()(_context8 = keyEntities[itemKey].children).call(_context8, item => {
41711
+ keyEntities[itemKey].children && for_each_default()(_context9 = keyEntities[itemKey].children).call(_context9, item => {
41721
41712
  const {
41722
41713
  key
41723
41714
  } = item;
@@ -41833,7 +41824,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
41833
41824
  };
41834
41825
  }
41835
41826
  function filterTreeData(info) {
41836
- var _context9, _context10;
41827
+ var _context10, _context11;
41837
41828
 
41838
41829
  const {
41839
41830
  showFilteredOnly,
@@ -41845,7 +41836,7 @@ function filterTreeData(info) {
41845
41836
  prevExpandedKeys
41846
41837
  } = info;
41847
41838
  let filteredOptsKeys = [];
41848
- 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);
41839
+ 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);
41849
41840
  let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
41850
41841
 
41851
41842
  if (prevExpandedKeys.length) {
@@ -41886,9 +41877,9 @@ function updateKeys(keySet, keyEntities) {
41886
41877
  return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
41887
41878
  }
41888
41879
  function calcDisabledKeys(keyEntities) {
41889
- var _context11;
41880
+ var _context12;
41890
41881
 
41891
- const disabledKeys = filter_default()(_context11 = keys_default()(keyEntities)).call(_context11, key => keyEntities[key].data.disabled);
41882
+ const disabledKeys = filter_default()(_context12 = keys_default()(keyEntities)).call(_context12, key => keyEntities[key].data.disabled);
41892
41883
 
41893
41884
  const {
41894
41885
  checkedKeys
@@ -44372,6 +44363,8 @@ class foundation_TagInputFoundation extends foundation {
44372
44363
 
44373
44364
  this._onRemove(newTagList, removedTag, length - 1);
44374
44365
  }
44366
+
44367
+ this._adapter.notifyKeyDown(e);
44375
44368
  };
44376
44369
  }
44377
44370
 
@@ -44631,6 +44624,9 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
44631
44624
  },
44632
44625
  notifyTagRemove: (v, idx) => {
44633
44626
  this.props.onRemove(v, idx);
44627
+ },
44628
+ notifyKeyDown: e => {
44629
+ this.props.onKeyDown(e);
44634
44630
  }
44635
44631
  });
44636
44632
  }
@@ -44879,6 +44875,7 @@ tagInput_TagInput.propTypes = {
44879
44875
  onInputExceed: prop_types_default.a.func,
44880
44876
  onAdd: prop_types_default.a.func,
44881
44877
  onRemove: prop_types_default.a.func,
44878
+ onKeyDown: prop_types_default.a.func,
44882
44879
  size: prop_types_default.a.oneOf(tagInput_constants_strings.SIZE_SET),
44883
44880
  validateStatus: prop_types_default.a.oneOf(tagInput_constants_strings.STATUS),
44884
44881
  prefix: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
@@ -44901,7 +44898,8 @@ tagInput_TagInput.defaultProps = {
44901
44898
  onExceed: lodash_es_noop,
44902
44899
  onInputExceed: lodash_es_noop,
44903
44900
  onAdd: lodash_es_noop,
44904
- onRemove: lodash_es_noop
44901
+ onRemove: lodash_es_noop,
44902
+ onKeyDown: lodash_es_noop
44905
44903
  };
44906
44904
  /* harmony default export */ var tagInput_0 = (tagInput_TagInput);
44907
44905
  // CONCATENATED MODULE: ./cascader/index.tsx
@@ -44932,6 +44930,7 @@ tagInput_TagInput.defaultProps = {
44932
44930
 
44933
44931
 
44934
44932
 
44933
+
44935
44934
 
44936
44935
 
44937
44936
  const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
@@ -45180,15 +45179,27 @@ class cascader_Cascader extends baseComponent_BaseComponent {
45180
45179
  this.renderCustomTrigger = () => {
45181
45180
  const {
45182
45181
  disabled,
45183
- triggerRender
45182
+ triggerRender,
45183
+ multiple,
45184
+ autoMergeValue
45184
45185
  } = this.props;
45185
45186
  const {
45186
45187
  selectedKeys,
45187
45188
  inputValue,
45188
- inputPlaceHolder
45189
+ inputPlaceHolder,
45190
+ mergedCheckedKeys,
45191
+ checkedKeys
45189
45192
  } = this.state;
45193
+ let realValue;
45194
+
45195
+ if (multiple) {
45196
+ realValue = autoMergeValue ? mergedCheckedKeys : checkedKeys;
45197
+ } else {
45198
+ realValue = [...selectedKeys][0];
45199
+ }
45200
+
45190
45201
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, {
45191
- value: [...selectedKeys][0],
45202
+ value: realValue,
45192
45203
  inputValue: inputValue,
45193
45204
  onChange: this.handleInputChange,
45194
45205
  onClear: this.handleClear,
@@ -57074,7 +57085,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
57074
57085
  className: prefix
57075
57086
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
57076
57087
  noHorizontalPadding: false,
57077
- iconType: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
57088
+ icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
57078
57089
  size: iconSize
57079
57090
  }),
57080
57091
  size: buttonSize,
@@ -69910,12 +69921,14 @@ class foundation_SelectFoundation extends foundation {
69910
69921
  let optionNotExist = {
69911
69922
  value: propValue,
69912
69923
  label: propValue,
69913
- _notExist: true
69924
+ _notExist: true,
69925
+ _scrollIndex: -1
69914
69926
  };
69915
69927
 
69916
69928
  if (onChangeWithObject) {
69917
69929
  optionNotExist = assign_default()(assign_default()({}, propValue), {
69918
- _notExist: true
69930
+ _notExist: true,
69931
+ _scrollIndex: -1
69919
69932
  });
69920
69933
  }
69921
69934
 
@@ -69974,7 +69987,9 @@ class foundation_SelectFoundation extends foundation {
69974
69987
  onChangeWithObject ? optionNotExist = assign_default()(assign_default()({}, propValue[i]), {
69975
69988
  _notExist: true
69976
69989
  }) : null;
69977
- selections.set(optionNotExist.label, optionNotExist);
69990
+ selections.set(optionNotExist.label, assign_default()(assign_default()({}, optionNotExist), {
69991
+ _scrollIndex: -1
69992
+ }));
69978
69993
  }
69979
69994
  }
69980
69995
  });
@@ -70159,7 +70174,7 @@ class foundation_SelectFoundation extends foundation {
70159
70174
  this._adapter.notifyMaxLimit(assign_default()({
70160
70175
  value,
70161
70176
  label
70162
- }, rest));
70177
+ }, lodash_es_omit(rest, '_scrollIndex')));
70163
70178
 
70164
70179
  return;
70165
70180
  } else {
@@ -70660,6 +70675,7 @@ class foundation_SelectFoundation extends foundation {
70660
70675
  delete option._parentGroup;
70661
70676
  delete option._show;
70662
70677
  delete option._selected;
70678
+ delete option._scrollIndex;
70663
70679
 
70664
70680
  if ('_keyInOptionList' in option) {
70665
70681
  option.key = option._keyInOptionList;
@@ -70996,7 +71012,7 @@ var utils_rest = undefined && undefined.__rest || function (s, e) {
70996
71012
 
70997
71013
 
70998
71014
 
70999
- const generateOption = (child, parent) => {
71015
+ const generateOption = (child, parent, index) => {
71000
71016
  const childProps = child.props;
71001
71017
 
71002
71018
  if (!child || !childProps) {
@@ -71008,7 +71024,8 @@ const generateOption = (child, parent) => {
71008
71024
  // Drop-down menu rendering priority label value, children, value in turn downgrade
71009
71025
  label: childProps.label || childProps.children || childProps.value,
71010
71026
  _show: true,
71011
- _selected: false
71027
+ _selected: false,
71028
+ _scrollIndex: index
71012
71029
  }, childProps), {
71013
71030
  _parentGroup: parent
71014
71031
  });
@@ -71031,11 +71048,13 @@ const getOptionsFromGroup = selectChildren => {
71031
71048
  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);
71032
71049
 
71033
71050
  let type = '';
71051
+ let optionIndex = -1;
71034
71052
 
71035
71053
  for_each_default()(childNodes).call(childNodes, child => {
71036
71054
  if (child.type.isSelectOption) {
71037
71055
  type = 'option';
71038
- const option = generateOption(child);
71056
+ optionIndex++;
71057
+ const option = generateOption(child, undefined, optionIndex);
71039
71058
  emptyGroup.children.push(option);
71040
71059
  options.push(option);
71041
71060
  } else if (child.type.isSelectOptionGroup) {
@@ -71050,7 +71069,10 @@ const getOptionsFromGroup = selectChildren => {
71050
71069
 
71051
71070
  children = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children);
71052
71071
 
71053
- const childrenOption = map_default()(children).call(children, option => generateOption(option, restGroupProps));
71072
+ const childrenOption = map_default()(children).call(children, option => {
71073
+ optionIndex++;
71074
+ return generateOption(option, restGroupProps, optionIndex);
71075
+ });
71054
71076
 
71055
71077
  const group = assign_default()(assign_default()({}, child.props), {
71056
71078
  children: childrenOption,
@@ -71176,7 +71198,6 @@ var select_select = __webpack_require__("1d3+");
71176
71198
 
71177
71199
 
71178
71200
 
71179
-
71180
71201
 
71181
71202
 
71182
71203
  const select_prefixcls = select_constants_cssClasses.PREFIX;
@@ -71316,9 +71337,10 @@ class select_Select extends baseComponent_BaseComponent {
71316
71337
  } = _this.props;
71317
71338
 
71318
71339
  if (optionList && optionList.length) {
71319
- options = map_default()(optionList).call(optionList, itemOpt => assign_default()({
71340
+ options = map_default()(optionList).call(optionList, (itemOpt, index) => assign_default()({
71320
71341
  _show: true,
71321
- _selected: false
71342
+ _selected: false,
71343
+ _scrollIndex: index
71322
71344
  }, itemOpt));
71323
71345
  optionGroups[0] = {
71324
71346
  children: options,
@@ -71893,15 +71915,21 @@ class select_Select extends baseComponent_BaseComponent {
71893
71915
  }
71894
71916
 
71895
71917
  if (virtualize) {
71896
- let minKey;
71918
+ let minItemIndex = -1;
71919
+
71920
+ for_each_default()(selections).call(selections, item => {
71921
+ const itemIndex = Object(lodash_es_get["a" /* default */])(item, '_scrollIndex');
71922
+ /* When the itemIndex is legal */
71897
71923
 
71898
- for_each_default()(selections).call(selections, (v, k) => {
71899
- const tempKey = Number(String(k).match(/option-(.*)/)[1]);
71900
- minKey = typeof minKey === 'number' && minKey < tempKey ? minKey : tempKey;
71924
+ if (lodash_es_isNumber(itemIndex) && itemIndex >= 0) {
71925
+ minItemIndex = minItemIndex !== -1 && minItemIndex < itemIndex ? minItemIndex : itemIndex;
71926
+ }
71901
71927
  });
71902
71928
 
71903
- if (minKey) {
71904
- this.virtualizeListRef.current.scrollToItem(minKey, 'center');
71929
+ if (minItemIndex !== -1) {
71930
+ try {
71931
+ this.virtualizeListRef.current.scrollToItem(minItemIndex, 'center');
71932
+ } catch (error) {}
71905
71933
  }
71906
71934
  } else {
71907
71935
  this.foundation.updateScrollTop();
@@ -72669,6 +72697,10 @@ class popconfirmFoundation_PopConfirmFoundation extends foundation {
72669
72697
  this.handleVisibleChange(false);
72670
72698
  }
72671
72699
 
72700
+ handleClickOutSide(e) {
72701
+ this._adapter.notifyClickOutSide(e);
72702
+ }
72703
+
72672
72704
  handleVisibleChange(visible) {
72673
72705
  if (!this._isControlledComponent('visible')) {
72674
72706
  this._adapter.setVisible(visible);
@@ -72722,6 +72754,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72722
72754
 
72723
72755
  this.handleVisibleChange = visible => this.foundation.handleVisibleChange(visible);
72724
72756
 
72757
+ this.handleClickOutSide = e => this.foundation.handleClickOutSide(e);
72758
+
72725
72759
  this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
72726
72760
 
72727
72761
  this.state = {
@@ -72750,7 +72784,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72750
72784
  }),
72751
72785
  notifyConfirm: e => this.props.onConfirm(e),
72752
72786
  notifyCancel: e => this.props.onCancel(e),
72753
- notifyVisibleChange: visible => this.props.onVisibleChange(visible)
72787
+ notifyVisibleChange: visible => this.props.onVisibleChange(visible),
72788
+ notifyClickOutSide: e => this.props.onClickOutSide(e)
72754
72789
  });
72755
72790
  }
72756
72791
 
@@ -72849,7 +72884,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72849
72884
  const popContent = this.renderConfirmPopCard();
72850
72885
  const popProps = {
72851
72886
  onVisibleChange: this.handleVisibleChange,
72852
- className: popconfirm_constants_cssClasses.POPOVER
72887
+ className: popconfirm_constants_cssClasses.POPOVER,
72888
+ onClickOutSide: this.handleClickOutSide
72853
72889
  };
72854
72890
 
72855
72891
  if (this.isControlled('visible')) {
@@ -72880,13 +72916,14 @@ popconfirm_Popconfirm.propTypes = {
72880
72916
  cancelType: prop_types_default.a.string,
72881
72917
  onCancel: prop_types_default.a.func,
72882
72918
  onConfirm: prop_types_default.a.func,
72883
- zIndex: prop_types_default.a.number,
72919
+ onClickOutSide: prop_types_default.a.func,
72884
72920
  onVisibleChange: prop_types_default.a.func,
72885
72921
  visible: prop_types_default.a.bool,
72886
72922
  defaultVisible: prop_types_default.a.bool,
72887
72923
  okButtonProps: prop_types_default.a.object,
72888
72924
  cancelButtonProps: prop_types_default.a.object,
72889
72925
  stopPropagation: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string]),
72926
+ zIndex: prop_types_default.a.number,
72890
72927
  // private
72891
72928
  trigger: prop_types_default.a.string,
72892
72929
  position: prop_types_default.a.string
@@ -72905,7 +72942,8 @@ popconfirm_Popconfirm.defaultProps = {
72905
72942
  prefixCls: popconfirm_constants_cssClasses.PREFIX,
72906
72943
  zIndex: popconfirm_constants_numbers.DEFAULT_Z_INDEX,
72907
72944
  onCancel: lodash_es_noop,
72908
- onConfirm: lodash_es_noop
72945
+ onConfirm: lodash_es_noop,
72946
+ onClickOutSide: lodash_es_noop
72909
72947
  };
72910
72948
  // CONCATENATED MODULE: ../semi-foundation/progress/constants.ts
72911
72949
 
@@ -75231,14 +75269,17 @@ const touchEventPolyfill = (touch, touchEvent) => {
75231
75269
 
75232
75270
  class foundation_SliderFoundation extends foundation {
75233
75271
  constructor(adapter) {
75272
+ var _this;
75273
+
75234
75274
  super(assign_default()(assign_default()({}, foundation_SliderFoundation.defaultAdapter), adapter));
75275
+ _this = this;
75276
+
75235
75277
  /**
75236
75278
  * Calculate the percentage corresponding to the current value for style calculation
75237
75279
  * @{}
75238
75280
  *
75239
75281
  * @memberof SliderFoundation
75240
75282
  */
75241
-
75242
75283
  this.getMinAndMaxPercent = value => {
75243
75284
  // debugger
75244
75285
  const {
@@ -75831,7 +75872,7 @@ class foundation_SliderFoundation extends foundation {
75831
75872
  const mousePos = this.handleMousePos(e.pageX, e.pageY);
75832
75873
  const position = vertical ? mousePos.y : mousePos.x;
75833
75874
  const isMin = this.checkWhichHandle(position);
75834
- this.setHandlePos(position, isMin);
75875
+ this.setHandlePos(position, isMin, true);
75835
75876
  };
75836
75877
  /**
75837
75878
  * Move the slider to the current click position
@@ -75840,8 +75881,10 @@ class foundation_SliderFoundation extends foundation {
75840
75881
  */
75841
75882
 
75842
75883
 
75843
- this.setHandlePos = (position, isMin) => {
75844
- this._adapter.onHandleMove(position, isMin, () => this._adapter.onHandleUpAfter());
75884
+ this.setHandlePos = function (position, isMin) {
75885
+ let clickTrack = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
75886
+
75887
+ _this._adapter.onHandleMove(position, isMin, () => _this._adapter.onHandleUpAfter(), clickTrack);
75845
75888
  };
75846
75889
  /**
75847
75890
  * Determine which slider should be moved currently
@@ -76337,6 +76380,7 @@ class slider_Slider extends baseComponent_BaseComponent {
76337
76380
  },
76338
76381
  onHandleMove: function (mousePos, isMin) {
76339
76382
  let stateChangeCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : lodash_es_noop;
76383
+ let clickTrack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
76340
76384
 
76341
76385
  const sliderDOMIsInRenderTree = _this.foundation.checkAndUpdateIsInRenderTreeState();
76342
76386
 
@@ -76364,7 +76408,8 @@ class slider_Slider extends baseComponent_BaseComponent {
76364
76408
  if (!lodash_es_isEqual(_this.foundation.outPutValue(currentValue), outPutValue)) {
76365
76409
  onChange(outPutValue);
76366
76410
 
76367
- if (_this.foundation.valueFormatIsCorrect(value)) {
76411
+ if (!clickTrack && _this.foundation.valueFormatIsCorrect(value)) {
76412
+ // still require afterChangeCallback when click on the track directly, need skip here
76368
76413
  return false;
76369
76414
  }
76370
76415
 
@@ -77923,6 +77968,73 @@ const table_constants_numbers = {
77923
77968
  DEFAULT_VIRTUALIZED_ROW_SMALL_MIN_HEIGHT
77924
77969
  };
77925
77970
 
77971
+ // CONCATENATED MODULE: ../semi-foundation/utils/Logger.ts
77972
+ class Logger {
77973
+ /**
77974
+ * specify prefix
77975
+ * @param {string} prefix
77976
+ */
77977
+ constructor(prefix) {
77978
+ this._prefix = prefix;
77979
+ }
77980
+
77981
+ _isEmpty(value) {
77982
+ return value === null || value === undefined || value === '';
77983
+ }
77984
+
77985
+ _baseLog() {
77986
+ let method = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'log';
77987
+
77988
+ if (typeof console[method] === 'function') {
77989
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
77990
+ args[_key - 1] = arguments[_key];
77991
+ }
77992
+
77993
+ const messages = [...args];
77994
+
77995
+ if (!this._isEmpty(this._prefix)) {
77996
+ messages.unshift(this._prefix, ':');
77997
+ }
77998
+
77999
+ console[method](...messages);
78000
+ }
78001
+ }
78002
+
78003
+ log() {
78004
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
78005
+ args[_key2] = arguments[_key2];
78006
+ }
78007
+
78008
+ this._baseLog('log', ...args);
78009
+ }
78010
+
78011
+ warn() {
78012
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
78013
+ args[_key3] = arguments[_key3];
78014
+ }
78015
+
78016
+ this._baseLog('warn', ...args);
78017
+ }
78018
+
78019
+ error() {
78020
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
78021
+ args[_key4] = arguments[_key4];
78022
+ }
78023
+
78024
+ this._baseLog('error', ...args);
78025
+ }
78026
+
78027
+ info() {
78028
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
78029
+ args[_key5] = arguments[_key5];
78030
+ }
78031
+
78032
+ this._baseLog('info', ...args);
78033
+ }
78034
+
78035
+ }
78036
+
78037
+ /* harmony default export */ var utils_Logger = (Logger);
77926
78038
  // CONCATENATED MODULE: ../semi-foundation/table/utils.ts
77927
78039
 
77928
78040
 
@@ -77942,6 +78054,7 @@ const table_constants_numbers = {
77942
78054
 
77943
78055
 
77944
78056
 
78057
+
77945
78058
  function utils_cloneDeep(value, customizer) {
77946
78059
  return Object(cloneDeepWith["a" /* default */])(value, v => {
77947
78060
  if (typeof v === 'function') {
@@ -78185,6 +78298,7 @@ function flattenColumns(cols) {
78185
78298
  if (is_array_default()(col[childrenColumnName]) && col[childrenColumnName].length) {
78186
78299
  list.push(...flattenColumns(col[childrenColumnName], childrenColumnName));
78187
78300
  } else {
78301
+ warnIfNoDataIndex(col);
78188
78302
  list.push(col);
78189
78303
  }
78190
78304
  }
@@ -78409,6 +78523,20 @@ function getAllDisabledRowKeys(_ref) {
78409
78523
 
78410
78524
  return disabledRowKeys;
78411
78525
  }
78526
+ function warnIfNoDataIndex(column) {
78527
+ if (typeof column === 'object' && column !== null) {
78528
+ const {
78529
+ filters,
78530
+ sorter,
78531
+ dataIndex
78532
+ } = column;
78533
+ const logger = new utils_Logger('[@douyinfe/semi-ui Table]');
78534
+
78535
+ if ((is_array_default()(filters) || Object(isFunction["a" /* default */])(sorter)) && isNullOrUndefined(dataIndex)) {
78536
+ logger.warn("The column with sorter or filter must pass the 'dataIndex' prop");
78537
+ }
78538
+ }
78539
+ }
78412
78540
  // CONCATENATED MODULE: ../semi-foundation/utils/Store.ts
78413
78541
 
78414
78542
 
@@ -81303,73 +81431,6 @@ class bodyFoundation_TableBodyFoundation extends foundation {
81303
81431
  }
81304
81432
 
81305
81433
  }
81306
- // CONCATENATED MODULE: ../semi-foundation/utils/Logger.ts
81307
- class Logger {
81308
- /**
81309
- * specify prefix
81310
- * @param {string} prefix
81311
- */
81312
- constructor(prefix) {
81313
- this._prefix = prefix;
81314
- }
81315
-
81316
- _isEmpty(value) {
81317
- return value === null || value === undefined || value === '';
81318
- }
81319
-
81320
- _baseLog() {
81321
- let method = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'log';
81322
-
81323
- if (typeof console[method] === 'function') {
81324
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
81325
- args[_key - 1] = arguments[_key];
81326
- }
81327
-
81328
- const messages = [...args];
81329
-
81330
- if (!this._isEmpty(this._prefix)) {
81331
- messages.unshift(this._prefix, ':');
81332
- }
81333
-
81334
- console[method](...messages);
81335
- }
81336
- }
81337
-
81338
- log() {
81339
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
81340
- args[_key2] = arguments[_key2];
81341
- }
81342
-
81343
- this._baseLog('log', ...args);
81344
- }
81345
-
81346
- warn() {
81347
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
81348
- args[_key3] = arguments[_key3];
81349
- }
81350
-
81351
- this._baseLog('warn', ...args);
81352
- }
81353
-
81354
- error() {
81355
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
81356
- args[_key4] = arguments[_key4];
81357
- }
81358
-
81359
- this._baseLog('error', ...args);
81360
- }
81361
-
81362
- info() {
81363
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
81364
- args[_key5] = arguments[_key5];
81365
- }
81366
-
81367
- this._baseLog('info', ...args);
81368
- }
81369
-
81370
- }
81371
-
81372
- /* harmony default export */ var utils_Logger = (Logger);
81373
81434
  // CONCATENATED MODULE: ./table/utils.ts
81374
81435
 
81375
81436
 
@@ -81483,7 +81544,7 @@ function mergeComponents(components, virtualized) {
81483
81544
  }
81484
81545
  }, components);
81485
81546
  }
81486
- const logger = new utils_Logger('[@douyinfe/semi-ui Table]');
81547
+ const utils_logger = new utils_Logger('[@douyinfe/semi-ui Table]');
81487
81548
 
81488
81549
  // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash-es/stubTrue.js
81489
81550
  /**
@@ -82704,7 +82765,7 @@ class Body_Body extends baseComponent_BaseComponent {
82704
82765
  }
82705
82766
 
82706
82767
  if (realSize < defaultConfig.minHeight) {
82707
- logger.warn("The computed real `itemSize` cannot be less than ".concat(defaultConfig.minHeight));
82768
+ utils_logger.warn("The computed real `itemSize` cannot be less than ".concat(defaultConfig.minHeight));
82708
82769
  }
82709
82770
 
82710
82771
  return realSize;
@@ -82895,7 +82956,7 @@ class Body_Body extends baseComponent_BaseComponent {
82895
82956
  const y = yIsNumber ? rawY : 600;
82896
82957
 
82897
82958
  if (!yIsNumber) {
82898
- logger.warn('You have to specific "scroll.y" which must be a number for table virtualization!');
82959
+ utils_logger.warn('You have to specific "scroll.y" which must be a number for table virtualization!');
82899
82960
  }
82900
82961
 
82901
82962
  const listStyle = {
@@ -83225,7 +83286,7 @@ class Body_Body extends baseComponent_BaseComponent {
83225
83286
  this.observer = new ResizeObserver(resizeCallback);
83226
83287
  this.observer.observe(bodyWrapDOM);
83227
83288
  } else {
83228
- logger.warn('The current browser does not support ResizeObserver,' + 'and the table may be misaligned after plugging and unplugging the mouse and keyboard.' + 'You can try to refresh it.');
83289
+ utils_logger.warn('The current browser does not support ResizeObserver,' + 'and the table may be misaligned after plugging and unplugging the mouse and keyboard.' + 'You can try to refresh it.');
83229
83290
  }
83230
83291
  }
83231
83292
  },
@@ -83523,7 +83584,7 @@ class Table_Table extends baseComponent_BaseComponent {
83523
83584
  // TODO: notify when data don't have key
83524
83585
  this._warnIfNoKey = () => {
83525
83586
  if ((this.props.rowSelection || this.props.expandedRowRender) && lodash_es_some(this.props.dataSource, record => this.foundation.getRecordKey(record) == null)) {
83526
- logger.error('You must specify a key for each element in the dataSource or use "rowKey" to specify an attribute name as the primary key!');
83587
+ utils_logger.error('You must specify a key for each element in the dataSource or use "rowKey" to specify an attribute name as the primary key!');
83527
83588
  }
83528
83589
  };
83529
83590
 
@@ -84511,7 +84572,7 @@ class Table_Table extends baseComponent_BaseComponent {
84511
84572
  childrenRecordName,
84512
84573
  rowKey
84513
84574
  } = props;
84514
- props.columns && props.children && logger.warn('columns should not given by object and children at the same time');
84575
+ props.columns && props.children && utils_logger.warn('columns should not given by object and children at the same time');
84515
84576
 
84516
84577
  if (props.columns && props.columns !== state.cachedColumns) {
84517
84578
  const newFlattenColumns = flattenColumns(props.columns);
@@ -85529,13 +85590,23 @@ class foundation_TabsFoundation extends foundation {
85529
85590
  this._adapter.collectPane();
85530
85591
  }
85531
85592
 
85593
+ _notifyChange(activeKey) {
85594
+ const {
85595
+ activeKey: stateActiveKey
85596
+ } = this.getStates();
85597
+
85598
+ if (stateActiveKey !== activeKey) {
85599
+ this._adapter.notifyChange(activeKey);
85600
+ }
85601
+ }
85602
+
85532
85603
  handleTabClick(activeKey, event) {
85533
85604
  const isControledComponent = this._isInProps('activeKey');
85534
85605
 
85535
85606
  if (isControledComponent) {
85536
- this._adapter.notifyChange(activeKey);
85607
+ this._notifyChange(activeKey);
85537
85608
  } else {
85538
- this._adapter.notifyChange(activeKey);
85609
+ this._notifyChange(activeKey);
85539
85610
 
85540
85611
  this.handleNewActiveKey(activeKey);
85541
85612
  }
@@ -85575,15 +85646,11 @@ class foundation_TabsFoundation extends foundation {
85575
85646
  handleTabPanesChange() {
85576
85647
  this._adapter.collectPane();
85577
85648
 
85578
- let activeKey = this.getState('activeKey');
85579
-
85580
- if (typeof activeKey === 'undefined') {
85581
- activeKey = this._adapter.getDefaultActiveKeyFromChildren();
85582
- }
85649
+ this._adapter.collectActiveKey();
85650
+ }
85583
85651
 
85584
- if (typeof activeKey !== 'undefined') {
85585
- this.handleNewActiveKey(activeKey);
85586
- }
85652
+ handleTabDelete(tabKey) {
85653
+ this._adapter.notifyTabDelete(tabKey);
85587
85654
  }
85588
85655
 
85589
85656
  }
@@ -85646,9 +85713,15 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
85646
85713
 
85647
85714
  this.renderTabItem = panel => {
85648
85715
  const {
85649
- size
85716
+ size,
85717
+ type,
85718
+ deleteTabItem
85650
85719
  } = this.props;
85651
85720
  const panelIcon = panel.icon ? this.renderIcon(panel.icon) : null;
85721
+ const closableIcon = type === 'card' && panel.closable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
85722
+ className: "".concat(tabs_constants_cssClasses.TABS_TAB, "-icon-close"),
85723
+ onClick: e => deleteTabItem(panel.itemKey, e)
85724
+ }) : null;
85652
85725
  let events = {};
85653
85726
  const key = panel.itemKey;
85654
85727
 
@@ -85671,7 +85744,7 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
85671
85744
  }, events, {
85672
85745
  className: className,
85673
85746
  key: this._getItemKey(key)
85674
- }), panelIcon, panel.tab);
85747
+ }), panelIcon, panel.tab, closableIcon);
85675
85748
  };
85676
85749
 
85677
85750
  this.renderTabComponents = list => map_default()(list).call(list, panel => this.renderTabItem(panel));
@@ -85873,7 +85946,9 @@ TabBar_TabBar.propTypes = {
85873
85946
  style: prop_types_default.a.object,
85874
85947
  tabBarExtraContent: prop_types_default.a.node,
85875
85948
  tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
85876
- type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
85949
+ type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
85950
+ closable: prop_types_default.a.bool,
85951
+ deleteTabItem: prop_types_default.a.func
85877
85952
  };
85878
85953
  /* harmony default export */ var tabs_TabBar = (TabBar_TabBar);
85879
85954
  // CONCATENATED MODULE: ./tabs/tabs-context.ts
@@ -86119,7 +86194,8 @@ TabPane_TabPane.propTypes = {
86119
86194
  disabled: prop_types_default.a.bool,
86120
86195
  itemKey: prop_types_default.a.string,
86121
86196
  tab: prop_types_default.a.node,
86122
- icon: prop_types_default.a.node
86197
+ icon: prop_types_default.a.node,
86198
+ closable: prop_types_default.a.bool
86123
86199
  };
86124
86200
  /* harmony default export */ var tabs_TabPane = (TabPane_TabPane);
86125
86201
  // CONCATENATED MODULE: ./tabs/index.tsx
@@ -86133,6 +86209,7 @@ TabPane_TabPane.propTypes = {
86133
86209
 
86134
86210
 
86135
86211
 
86212
+
86136
86213
  var tabs_rest = undefined && undefined.__rest || function (s, e) {
86137
86214
  var t = {};
86138
86215
 
@@ -86212,6 +86289,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86212
86289
  });
86213
86290
  };
86214
86291
 
86292
+ this.deleteTabItem = (tabKey, event) => {
86293
+ event.stopPropagation();
86294
+ this.foundation.handleTabDelete(tabKey);
86295
+ };
86296
+
86215
86297
  this.foundation = new tabs_foundation(this.adapter);
86216
86298
  this.state = {
86217
86299
  activeKey: this.foundation.getDefaultActiveKey(),
@@ -86244,13 +86326,15 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86244
86326
  tab,
86245
86327
  icon,
86246
86328
  disabled,
86247
- itemKey
86329
+ itemKey,
86330
+ closable
86248
86331
  } = child.props;
86249
86332
  return {
86250
86333
  tab,
86251
86334
  icon,
86252
86335
  disabled,
86253
- itemKey
86336
+ itemKey,
86337
+ closable
86254
86338
  };
86255
86339
  }
86256
86340
 
@@ -86261,6 +86345,61 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86261
86345
  panes
86262
86346
  });
86263
86347
  },
86348
+ collectActiveKey: () => {
86349
+ let panes = [];
86350
+ const {
86351
+ tabList,
86352
+ children,
86353
+ activeKey: propsActiveKey
86354
+ } = this.props;
86355
+
86356
+ if (typeof propsActiveKey !== 'undefined') {
86357
+ return;
86358
+ }
86359
+
86360
+ const {
86361
+ activeKey
86362
+ } = this.state;
86363
+
86364
+ if (is_array_default()(tabList) && tabList.length) {
86365
+ panes = tabList;
86366
+ } else {
86367
+ var _context3;
86368
+
86369
+ panes = map_default()(_context3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children).call(_context3, children, child => {
86370
+ if (child) {
86371
+ const {
86372
+ tab,
86373
+ icon,
86374
+ disabled,
86375
+ itemKey,
86376
+ closable
86377
+ } = child.props;
86378
+ return {
86379
+ tab,
86380
+ icon,
86381
+ disabled,
86382
+ itemKey,
86383
+ closable
86384
+ };
86385
+ }
86386
+
86387
+ return undefined;
86388
+ });
86389
+ }
86390
+
86391
+ if (find_index_default()(panes).call(panes, p => p.itemKey === activeKey) === -1) {
86392
+ if (panes.length > 0) {
86393
+ this.setState({
86394
+ activeKey: panes[0].itemKey
86395
+ });
86396
+ } else {
86397
+ this.setState({
86398
+ activeKey: ''
86399
+ });
86400
+ }
86401
+ }
86402
+ },
86264
86403
  notifyTabClick: (activeKey, event) => {
86265
86404
  this.props.onTabClick(activeKey, event);
86266
86405
  },
@@ -86273,14 +86412,14 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86273
86412
  });
86274
86413
  },
86275
86414
  getDefaultActiveKeyFromChildren: () => {
86276
- var _context3;
86415
+ var _context4;
86277
86416
 
86278
86417
  const {
86279
86418
  tabList,
86280
86419
  children
86281
86420
  } = this.props;
86282
86421
  let activeKey = '';
86283
- 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);
86422
+ const list = tabList ? tabList : map_default()(_context4 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context4, child => child.props);
86284
86423
 
86285
86424
  for_each_default()(list).call(list, item => {
86286
86425
  if (item && !activeKey && !item.disabled) {
@@ -86289,6 +86428,9 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86289
86428
  });
86290
86429
 
86291
86430
  return activeKey;
86431
+ },
86432
+ notifyTabDelete: tabKey => {
86433
+ this.props.onTabClose && this.props.onTabClose(tabKey);
86292
86434
  }
86293
86435
  });
86294
86436
  }
@@ -86304,12 +86446,12 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86304
86446
  }
86305
86447
 
86306
86448
  componentDidUpdate(prevProps) {
86307
- var _context4, _context5;
86449
+ var _context5, _context6;
86308
86450
 
86309
86451
  // Panes state acts on tab bar, no need to compare TabPane children
86310
- 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));
86452
+ 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(child.props, panePickKeys));
86311
86453
 
86312
- 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));
86454
+ 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(child.props, panePickKeys));
86313
86455
 
86314
86456
  const isTabListType = this.props.tabList || prevProps.tabList;
86315
86457
 
@@ -86327,7 +86469,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86327
86469
  }
86328
86470
 
86329
86471
  render() {
86330
- var _context6, _context7;
86472
+ var _context7, _context8;
86331
86473
 
86332
86474
  const _a = this.props,
86333
86475
  {
@@ -86355,11 +86497,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86355
86497
  } = this.state;
86356
86498
  const tabWrapperCls = classnames_default()(className, {
86357
86499
  [tabs_constants_cssClasses.TABS]: true,
86358
- [concat_default()(_context6 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context6, tabPosition)]: tabPosition
86500
+ [concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context7, tabPosition)]: tabPosition
86359
86501
  });
86360
86502
  const tabContentCls = classnames_default()({
86361
86503
  [tabs_constants_cssClasses.TABS_CONTENT]: true,
86362
- [concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context7, tabPosition)]: tabPosition
86504
+ [concat_default()(_context8 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context8, tabPosition)]: tabPosition
86363
86505
  });
86364
86506
  const tabBarProps = {
86365
86507
  activeKey,
@@ -86371,7 +86513,8 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86371
86513
  style: tabBarStyle,
86372
86514
  tabBarExtraContent,
86373
86515
  tabPosition,
86374
- type
86516
+ type,
86517
+ deleteTabItem: this.deleteTabItem
86375
86518
  };
86376
86519
  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));
86377
86520
  const content = keepDOM ? children : this.getActiveItem();
@@ -86416,7 +86559,8 @@ tabs_Tabs.propTypes = {
86416
86559
  tabList: prop_types_default.a.array,
86417
86560
  tabPaneMotion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object, prop_types_default.a.func]),
86418
86561
  tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
86419
- type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
86562
+ type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
86563
+ onTabClose: prop_types_default.a.func
86420
86564
  };
86421
86565
  tabs_Tabs.defaultProps = {
86422
86566
  children: [],
@@ -86428,7 +86572,8 @@ tabs_Tabs.defaultProps = {
86428
86572
  size: 'large',
86429
86573
  tabPaneMotion: true,
86430
86574
  tabPosition: 'top',
86431
- type: 'line'
86575
+ type: 'line',
86576
+ onTabClose: () => undefined
86432
86577
  };
86433
86578
  /* harmony default export */ var tabs_0 = (tabs_Tabs);
86434
86579
  // EXTERNAL MODULE: ../semi-foundation/timeline/timeline.scss
@@ -94718,6 +94863,7 @@ var upload = __webpack_require__("/t7F");
94718
94863
 
94719
94864
  const upload_prefixCls = upload_constants_cssClasses.PREFIX;
94720
94865
 
94866
+
94721
94867
  class upload_Upload extends baseComponent_BaseComponent {
94722
94868
  constructor(props) {
94723
94869
  super(props);