@douyinfe/semi-ui 2.17.0-beta.1 → 2.18.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/anchor/index.tsx +1 -1
  2. package/anchor/link.tsx +3 -4
  3. package/autoComplete/__test__/autoComplete.test.js +6 -6
  4. package/autoComplete/index.tsx +3 -1
  5. package/autoComplete/option.tsx +164 -0
  6. package/calendar/__test__/calendar.test.js +21 -2
  7. package/calendar/_story/calendar.stories.js +31 -0
  8. package/calendar/index.tsx +3 -1
  9. package/calendar/interface.ts +2 -1
  10. package/carousel/index.tsx +5 -5
  11. package/checkbox/checkbox.tsx +4 -1
  12. package/dist/css/semi.css +161 -23
  13. package/dist/css/semi.min.css +1 -1
  14. package/dist/umd/semi-ui.js +359 -94
  15. package/dist/umd/semi-ui.js.map +1 -1
  16. package/dist/umd/semi-ui.min.js +1 -1
  17. package/dist/umd/semi-ui.min.js.map +1 -1
  18. package/form/_story/FieldProps/labelOptional.jsx +30 -0
  19. package/form/_story/form.stories.js +7 -0
  20. package/form/hoc/withField.tsx +1 -0
  21. package/form/label.tsx +21 -7
  22. package/gulpfile.js +3 -1
  23. package/lib/cjs/_base/base.css +35 -0
  24. package/lib/cjs/anchor/index.js +2 -1
  25. package/lib/cjs/anchor/link.d.ts +1 -1
  26. package/lib/cjs/anchor/link.js +9 -5
  27. package/lib/cjs/autoComplete/index.d.ts +1 -1
  28. package/lib/cjs/autoComplete/index.js +6 -3
  29. package/lib/cjs/autoComplete/option.d.ts +50 -0
  30. package/lib/cjs/autoComplete/option.js +218 -0
  31. package/lib/cjs/calendar/index.d.ts +2 -0
  32. package/lib/cjs/calendar/index.js +3 -1
  33. package/lib/cjs/calendar/interface.d.ts +2 -1
  34. package/lib/cjs/carousel/index.js +2 -2
  35. package/lib/cjs/checkbox/checkbox.js +4 -1
  36. package/lib/cjs/form/hoc/withField.js +2 -1
  37. package/lib/cjs/form/label.d.ts +8 -5
  38. package/lib/cjs/form/label.js +15 -4
  39. package/lib/cjs/locale/interface.d.ts +3 -0
  40. package/lib/cjs/locale/source/ar.js +3 -0
  41. package/lib/cjs/locale/source/de.js +3 -0
  42. package/lib/cjs/locale/source/en_GB.js +3 -0
  43. package/lib/cjs/locale/source/en_US.js +3 -0
  44. package/lib/cjs/locale/source/es.js +3 -0
  45. package/lib/cjs/locale/source/fr.js +3 -0
  46. package/lib/cjs/locale/source/id_ID.js +3 -0
  47. package/lib/cjs/locale/source/it.js +3 -0
  48. package/lib/cjs/locale/source/ja_JP.js +3 -0
  49. package/lib/cjs/locale/source/ko_KR.js +3 -0
  50. package/lib/cjs/locale/source/ms_MY.js +3 -0
  51. package/lib/cjs/locale/source/pt_BR.js +3 -0
  52. package/lib/cjs/locale/source/ru_RU.js +3 -0
  53. package/lib/cjs/locale/source/th_TH.js +3 -0
  54. package/lib/cjs/locale/source/tr_TR.js +3 -0
  55. package/lib/cjs/locale/source/vi_VN.js +3 -0
  56. package/lib/cjs/locale/source/zh_CN.js +3 -0
  57. package/lib/cjs/locale/source/zh_TW.js +3 -0
  58. package/lib/cjs/modal/Modal.js +0 -8
  59. package/lib/cjs/modal/ModalContent.js +4 -1
  60. package/lib/cjs/tag/group.d.ts +3 -0
  61. package/lib/cjs/tag/group.js +24 -6
  62. package/lib/cjs/tag/index.d.ts +2 -1
  63. package/lib/cjs/tag/index.js +7 -5
  64. package/lib/cjs/tag/interface.d.ts +2 -1
  65. package/lib/cjs/tree/index.d.ts +3 -1
  66. package/lib/cjs/tree/index.js +23 -0
  67. package/lib/cjs/tree/interface.d.ts +4 -0
  68. package/lib/es/_base/base.css +35 -0
  69. package/lib/es/anchor/index.js +2 -1
  70. package/lib/es/anchor/link.d.ts +1 -1
  71. package/lib/es/anchor/link.js +9 -5
  72. package/lib/es/autoComplete/index.d.ts +1 -1
  73. package/lib/es/autoComplete/index.js +6 -3
  74. package/lib/es/autoComplete/option.d.ts +50 -0
  75. package/lib/es/autoComplete/option.js +188 -0
  76. package/lib/es/calendar/index.d.ts +2 -0
  77. package/lib/es/calendar/index.js +3 -1
  78. package/lib/es/calendar/interface.d.ts +2 -1
  79. package/lib/es/carousel/index.js +2 -2
  80. package/lib/es/checkbox/checkbox.js +4 -1
  81. package/lib/es/form/hoc/withField.js +2 -1
  82. package/lib/es/form/label.d.ts +8 -5
  83. package/lib/es/form/label.js +13 -4
  84. package/lib/es/locale/interface.d.ts +3 -0
  85. package/lib/es/locale/source/ar.js +3 -0
  86. package/lib/es/locale/source/de.js +3 -0
  87. package/lib/es/locale/source/en_GB.js +3 -0
  88. package/lib/es/locale/source/en_US.js +3 -0
  89. package/lib/es/locale/source/es.js +3 -0
  90. package/lib/es/locale/source/fr.js +3 -0
  91. package/lib/es/locale/source/id_ID.js +3 -0
  92. package/lib/es/locale/source/it.js +3 -0
  93. package/lib/es/locale/source/ja_JP.js +3 -0
  94. package/lib/es/locale/source/ko_KR.js +3 -0
  95. package/lib/es/locale/source/ms_MY.js +3 -0
  96. package/lib/es/locale/source/pt_BR.js +3 -0
  97. package/lib/es/locale/source/ru_RU.js +3 -0
  98. package/lib/es/locale/source/th_TH.js +3 -0
  99. package/lib/es/locale/source/tr_TR.js +3 -0
  100. package/lib/es/locale/source/vi_VN.js +3 -0
  101. package/lib/es/locale/source/zh_CN.js +3 -0
  102. package/lib/es/locale/source/zh_TW.js +3 -0
  103. package/lib/es/modal/Modal.js +0 -8
  104. package/lib/es/modal/ModalContent.js +4 -1
  105. package/lib/es/tag/group.d.ts +3 -0
  106. package/lib/es/tag/group.js +24 -6
  107. package/lib/es/tag/index.d.ts +2 -1
  108. package/lib/es/tag/index.js +7 -5
  109. package/lib/es/tag/interface.d.ts +2 -1
  110. package/lib/es/tree/index.d.ts +3 -1
  111. package/lib/es/tree/index.js +22 -0
  112. package/lib/es/tree/interface.d.ts +4 -0
  113. package/locale/interface.ts +3 -0
  114. package/locale/source/ar.ts +3 -0
  115. package/locale/source/de.ts +3 -0
  116. package/locale/source/en_GB.ts +3 -0
  117. package/locale/source/en_US.ts +3 -0
  118. package/locale/source/es.ts +3 -0
  119. package/locale/source/fr.ts +3 -0
  120. package/locale/source/id_ID.ts +3 -0
  121. package/locale/source/it.ts +3 -0
  122. package/locale/source/ja_JP.ts +3 -0
  123. package/locale/source/ko_KR.ts +3 -0
  124. package/locale/source/ms_MY.ts +3 -0
  125. package/locale/source/pt_BR.ts +3 -0
  126. package/locale/source/ru_RU.ts +3 -0
  127. package/locale/source/th_TH.ts +3 -0
  128. package/locale/source/tr_TR.ts +4 -1
  129. package/locale/source/vi_VN.ts +3 -0
  130. package/locale/source/zh_CN.ts +3 -0
  131. package/locale/source/zh_TW.ts +3 -0
  132. package/modal/Modal.tsx +0 -6
  133. package/modal/ModalContent.tsx +4 -1
  134. package/modal/__test__/modal.test.js +1 -1
  135. package/modal/_story/__snapshots__/modal.stories.tsx.snap +203 -0
  136. package/package.json +7 -7
  137. package/radio/_story/radio.stories.js +2 -2
  138. package/rating/__test__/rating.test.js +1 -1
  139. package/select/__test__/select.test.js +11 -17
  140. package/select/_story/select.stories.js +6 -6
  141. package/steps/_story/steps.stories.js +3 -3
  142. package/switch/_story/switch.stories.js +4 -4
  143. package/switch/_story/switch.stories.tsx +4 -4
  144. package/table/_story/v2/FixedFilter/index.tsx +106 -0
  145. package/table/_story/v2/FixedSorter/index.tsx +102 -0
  146. package/table/_story/v2/index.js +4 -2
  147. package/tag/_story/tag.stories.js +57 -1
  148. package/tag/group.tsx +20 -3
  149. package/tag/index.tsx +6 -5
  150. package/tag/interface.ts +2 -1
  151. package/transfer/_story/transfer.stories.js +2 -2
  152. package/tree/_story/tree.stories.js +152 -3
  153. package/tree/index.tsx +16 -1
  154. package/tree/interface.ts +6 -0
  155. package/upload/_story/upload.stories.js +2 -2
@@ -30711,6 +30711,9 @@ const local = {
30711
30711
  clearSelectAll: '取消全选',
30712
30712
  total: '共 ${total} 项',
30713
30713
  selected: '已选 ${total} 项'
30714
+ },
30715
+ Form: {
30716
+ optional: '(可选)'
30714
30717
  }
30715
30718
  }; // 中文
30716
30719
 
@@ -34286,10 +34289,14 @@ class link_Link extends baseComponent_BaseComponent {
34286
34289
  } = this.props;
34287
34290
 
34288
34291
  if (!this.context.autoCollapse) {
34289
- return this.props.children;
34292
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
34293
+ role: "list"
34294
+ }, children);
34290
34295
  }
34291
34296
 
34292
- return activeLink === href || childMap[href] && childMap[href].has(activeLink) ? children : null;
34297
+ return activeLink === href || childMap[href] && childMap[href].has(activeLink) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
34298
+ role: "list"
34299
+ }, children) : null;
34293
34300
  };
34294
34301
 
34295
34302
  this.foundation = new linkFoundation_LinkFoundation(this.adapter);
@@ -34365,8 +34372,7 @@ class link_Link extends baseComponent_BaseComponent {
34365
34372
  ["".concat(link_prefixCls, "-link-title-disabled")]: disabled
34366
34373
  });
34367
34374
  const ariaProps = {
34368
- 'aria-disabled': disabled,
34369
- 'aria-label': href
34375
+ 'aria-disabled': disabled
34370
34376
  };
34371
34377
 
34372
34378
  if (active) {
@@ -34379,7 +34385,8 @@ class link_Link extends baseComponent_BaseComponent {
34379
34385
 
34380
34386
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
34381
34387
  className: linkCls,
34382
- style: style
34388
+ style: style,
34389
+ role: "listitem"
34383
34390
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
34384
34391
  role: "link",
34385
34392
  tabIndex: 0
@@ -34683,7 +34690,8 @@ class anchor_Anchor extends baseComponent_BaseComponent {
34683
34690
  top: slideBarTop
34684
34691
  }
34685
34692
  })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
34686
- className: anchorWrapper
34693
+ className: anchorWrapper,
34694
+ role: "list"
34687
34695
  }, children)));
34688
34696
  }
34689
34697
 
@@ -34751,7 +34759,9 @@ const VALIDATE_STATUS = ['default', 'error', 'warning', 'success']; // const VAL
34751
34759
 
34752
34760
 
34753
34761
  const autoComplete_constants_cssClasses = {
34754
- PREFIX: "".concat(BASE_CLASS_PREFIX, "-autocomplete")
34762
+ PREFIX: "".concat(BASE_CLASS_PREFIX, "-autocomplete"),
34763
+ PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-autoComplete-option"),
34764
+ PREFIX_GROUP: "".concat(BASE_CLASS_PREFIX, "-autoComplete-group")
34755
34765
  };
34756
34766
  const autoComplete_constants_strings = {
34757
34767
  SIZE: ['small', 'large', 'default'],
@@ -34935,6 +34945,10 @@ class foundation_AutoCompleteFoundation extends foundation {
34935
34945
  this._adapter.notifyChange(inputValue);
34936
34946
 
34937
34947
  this._modifyFocusIndex(inputValue);
34948
+
34949
+ if (!this.isPanelOpen) {
34950
+ this.openDropdown();
34951
+ }
34938
34952
  }
34939
34953
 
34940
34954
  handleSelect(option, optionIndex) {
@@ -36525,27 +36539,7 @@ trigger_Trigger.propTypes = {
36525
36539
  style: prop_types_default.a.object
36526
36540
  };
36527
36541
  /* harmony default export */ var trigger_0 = (trigger_Trigger);
36528
- // CONCATENATED MODULE: ../semi-foundation/select/constants.ts
36529
-
36530
-
36531
- const select_constants_cssClasses = {
36532
- PREFIX: "".concat(BASE_CLASS_PREFIX, "-select"),
36533
- PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-select-option"),
36534
- PREFIX_GROUP: "".concat(BASE_CLASS_PREFIX, "-select-group")
36535
- };
36536
- const select_constants_strings = {
36537
- SIZE_SET: ['small', 'large', 'default'],
36538
- POSITION_SET: tooltip_constants_strings.POSITION_SET,
36539
- MODE_SELECT: 'select',
36540
- MODE_AUTOCOMPLETE: 'autoComplete',
36541
- // MODE_TAGS: 'tags',
36542
- STATUS: VALIDATE_STATUS
36543
- };
36544
- const select_constants_numbers = {
36545
- LIST_HEIGHT: 300
36546
- };
36547
-
36548
- // CONCATENATED MODULE: ./select/option.tsx
36542
+ // CONCATENATED MODULE: ./autoComplete/option.tsx
36549
36543
 
36550
36544
 
36551
36545
 
@@ -36627,10 +36621,9 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
36627
36621
  onMouseEnter,
36628
36622
  prefixCls,
36629
36623
  renderOptionItem,
36630
- inputValue,
36631
- id
36624
+ inputValue
36632
36625
  } = _a,
36633
- rest = option_rest(_a, ["children", "disabled", "value", "selected", "label", "empty", "emptyContent", "onSelect", "focused", "showTick", "className", "style", "onMouseEnter", "prefixCls", "renderOptionItem", "inputValue", "id"]);
36626
+ rest = option_rest(_a, ["children", "disabled", "value", "selected", "label", "empty", "emptyContent", "onSelect", "focused", "showTick", "className", "style", "onMouseEnter", "prefixCls", "renderOptionItem", "inputValue"]);
36634
36627
 
36635
36628
  const optionClassName = classnames_default()(prefixCls, {
36636
36629
  ["".concat(prefixCls, "-disabled")]: disabled,
@@ -36694,7 +36687,6 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
36694
36687
  },
36695
36688
  onMouseEnter: e => onMouseEnter && onMouseEnter(e),
36696
36689
  role: "option",
36697
- id: id,
36698
36690
  "aria-selected": selected ? "true" : "false",
36699
36691
  "aria-disabled": disabled ? "true" : "false",
36700
36692
  style: style
@@ -36733,9 +36725,9 @@ option_Option.propTypes = {
36733
36725
  inputValue: prop_types_default.a.string
36734
36726
  };
36735
36727
  option_Option.defaultProps = {
36736
- prefixCls: select_constants_cssClasses.PREFIX_OPTION
36728
+ prefixCls: autoComplete_constants_cssClasses.PREFIX_OPTION
36737
36729
  };
36738
- /* harmony default export */ var select_option = (option_Option);
36730
+ /* harmony default export */ var autoComplete_option = (option_Option);
36739
36731
  // EXTERNAL MODULE: ../semi-foundation/autoComplete/autoComplete.scss
36740
36732
  var autoComplete = __webpack_require__("t64S");
36741
36733
 
@@ -36937,7 +36929,7 @@ class autoComplete_AutoComplete extends baseComponent_BaseComponent {
36937
36929
  } = this.state;
36938
36930
  const useCustomTrigger = typeof triggerRender === 'function';
36939
36931
 
36940
- const outerProps = assign_default()({
36932
+ const outerProps = assign_default()(assign_default()({
36941
36933
  style,
36942
36934
  className: useCustomTrigger ? classnames_default()(className) : classnames_default()({
36943
36935
  [autoComplete_prefixCls]: true,
@@ -36946,7 +36938,10 @@ class autoComplete_AutoComplete extends baseComponent_BaseComponent {
36946
36938
  onClick: this.handleInputClick,
36947
36939
  ref: this.triggerRef,
36948
36940
  id
36949
- }, keyboardEventSet);
36941
+ }, keyboardEventSet), {
36942
+ // tooltip give tabindex 0 to children by default, autoComplete just need the input get focus, so outer div's tabindex set to -1
36943
+ tabIndex: -1
36944
+ });
36950
36945
 
36951
36946
  const innerProps = {
36952
36947
  disabled,
@@ -36993,7 +36988,7 @@ class autoComplete_AutoComplete extends baseComponent_BaseComponent {
36993
36988
  focusIndex
36994
36989
  } = this.state;
36995
36990
  const isFocused = optionIndex === focusIndex;
36996
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(select_option, assign_default()({
36991
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(autoComplete_option, assign_default()({
36997
36992
  showTick: false,
36998
36993
  onSelect: (v, e) => this.onSelect(v, optionIndex, e),
36999
36994
  // selected={selection.has(option.label)}
@@ -37128,7 +37123,7 @@ autoComplete_AutoComplete.propTypes = {
37128
37123
  validateStatus: prop_types_default.a.oneOf(autoComplete_statusSet),
37129
37124
  zIndex: prop_types_default.a.number
37130
37125
  };
37131
- autoComplete_AutoComplete.Option = select_option;
37126
+ autoComplete_AutoComplete.Option = autoComplete_option;
37132
37127
  autoComplete_AutoComplete.defaultProps = {
37133
37128
  stopPropagation: true,
37134
37129
  motion: true,
@@ -43561,7 +43556,10 @@ const calcRangeData = (value, start, rangeLen, mode, locale) => {
43561
43556
  const calcWeekData = function (value) {
43562
43557
  let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'week';
43563
43558
  let locale = arguments.length > 2 ? arguments[2] : undefined;
43564
- const start = startOfWeek(value);
43559
+ let weekStartsOn = arguments.length > 3 ? arguments[3] : undefined;
43560
+ const start = startOfWeek(value, {
43561
+ weekStartsOn
43562
+ });
43565
43563
  return calcRangeData(value, start, 7, mode, locale);
43566
43564
  };
43567
43565
  /**
@@ -43827,6 +43825,7 @@ const renderDailyEvent = event => {
43827
43825
 
43828
43826
 
43829
43827
 
43828
+
43830
43829
  class foundation_CalendarFoundation extends foundation {
43831
43830
  constructor(adapter) {
43832
43831
  super(assign_default()({}, adapter));
@@ -43929,7 +43928,10 @@ class foundation_CalendarFoundation extends foundation {
43929
43928
  data.month = format_format(value, 'LLL', {
43930
43929
  locale: dateFnsLocale
43931
43930
  });
43932
- data.week = calcWeekData(value, 'week', dateFnsLocale);
43931
+ const {
43932
+ weekStartsOn
43933
+ } = this.getProps();
43934
+ data.week = calcWeekData(value, 'week', dateFnsLocale, weekStartsOn);
43933
43935
 
43934
43936
  this._adapter.setWeeklyData(data);
43935
43937
 
@@ -43957,10 +43959,13 @@ class foundation_CalendarFoundation extends foundation {
43957
43959
 
43958
43960
  const monthStart = startOfMonth(value);
43959
43961
  const data = {};
43962
+ const {
43963
+ weekStartsOn
43964
+ } = this.getProps();
43960
43965
  const numberOfWeek = getWeeksInMonth(value);
43961
43966
 
43962
43967
  map_default()(_context = [...instance_keys_default()(_context2 = Array(numberOfWeek)).call(_context2)]).call(_context, ind => {
43963
- data[ind] = calcWeekData(addDays(monthStart, ind * 7), 'month', dateFnsLocale);
43968
+ data[ind] = calcWeekData(addDays(monthStart, ind * 7), 'month', dateFnsLocale, weekStartsOn);
43964
43969
  });
43965
43970
 
43966
43971
  this._adapter.setMonthlyData(data);
@@ -45891,6 +45896,7 @@ calendar_Calendar.propTypes = {
45891
45896
  })),
45892
45897
  mode: prop_types_default.a.string,
45893
45898
  showCurrTime: prop_types_default.a.bool,
45899
+ weekStartsOn: prop_types_default.a.number,
45894
45900
  scrollTop: prop_types_default.a.number,
45895
45901
  onClick: prop_types_default.a.func,
45896
45902
  renderTimeDisplay: prop_types_default.a.func,
@@ -45907,7 +45913,8 @@ calendar_Calendar.defaultProps = {
45907
45913
  mode: 'week',
45908
45914
  markWeekend: false,
45909
45915
  height: 600,
45910
- scrollTop: 400
45916
+ scrollTop: 400,
45917
+ weekStartsOn: 0
45911
45918
  };
45912
45919
 
45913
45920
  /* harmony default export */ var calendar_0 = (calendar_Calendar);
@@ -46636,7 +46643,7 @@ class foundation_CarouselFoundation extends foundation {
46636
46643
 
46637
46644
  this._adapter.setIsReverse(stateActiveIndex > targetIndex);
46638
46645
 
46639
- if (this.getIsControledComponent()) {
46646
+ if (this.getIsControlledComponent()) {
46640
46647
  this._notifyChange(targetIndex);
46641
46648
  } else {
46642
46649
  this._notifyChange(targetIndex);
@@ -46653,7 +46660,7 @@ class foundation_CarouselFoundation extends foundation {
46653
46660
 
46654
46661
  this._adapter.setIsReverse(false);
46655
46662
 
46656
- if (this.getIsControledComponent()) {
46663
+ if (this.getIsControlledComponent()) {
46657
46664
  this._notifyChange(targetIndex);
46658
46665
  } else {
46659
46666
  this._notifyChange(targetIndex);
@@ -46670,7 +46677,7 @@ class foundation_CarouselFoundation extends foundation {
46670
46677
 
46671
46678
  this._adapter.setIsReverse(true);
46672
46679
 
46673
- if (this.getIsControledComponent()) {
46680
+ if (this.getIsControlledComponent()) {
46674
46681
  this._notifyChange(targetIndex);
46675
46682
  } else {
46676
46683
  this._notifyChange(targetIndex);
@@ -46732,7 +46739,7 @@ class foundation_CarouselFoundation extends foundation {
46732
46739
  return speed;
46733
46740
  }
46734
46741
 
46735
- getIsControledComponent() {
46742
+ getIsControlledComponent() {
46736
46743
  return this._isInProps('activeIndex');
46737
46744
  }
46738
46745
 
@@ -46766,7 +46773,7 @@ class foundation_CarouselFoundation extends foundation {
46766
46773
 
46767
46774
  this._notifyChange(activeIndex);
46768
46775
 
46769
- if (!this.getIsControledComponent()) {
46776
+ if (!this.getIsControlledComponent()) {
46770
46777
  this.handleNewActiveIndex(activeIndex);
46771
46778
  }
46772
46779
  }
@@ -47059,7 +47066,7 @@ class carousel_Carousel extends baseComponent_BaseComponent {
47059
47066
  };
47060
47067
 
47061
47068
  this.handleAutoPlay = () => {
47062
- if (!this.foundation.getIsControledComponent()) {
47069
+ if (!this.foundation.getIsControlledComponent()) {
47063
47070
  this.foundation.handleAutoPlay();
47064
47071
  }
47065
47072
  };
@@ -47079,7 +47086,7 @@ class carousel_Carousel extends baseComponent_BaseComponent {
47079
47086
  autoPlay
47080
47087
  } = this.props;
47081
47088
 
47082
- if ((typeof autoPlay !== 'object' || autoPlay.hoverToPause) && !this.foundation.getIsControledComponent()) {
47089
+ if ((typeof autoPlay !== 'object' || autoPlay.hoverToPause) && !this.foundation.getIsControlledComponent()) {
47083
47090
  this.foundation.handleAutoPlay();
47084
47091
  }
47085
47092
  };
@@ -49749,7 +49756,10 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
49749
49756
  }
49750
49757
 
49751
49758
  isInGroup() {
49752
- return Boolean(this.context && this.context.checkboxGroup);
49759
+ // Why do we need to determine whether there is a value in props?
49760
+ // If there is no value in the props of the checkbox in the context of the checkboxGroup,
49761
+ // it will be considered not to belong to the checkboxGroup。
49762
+ return Boolean(this.context && this.context.checkboxGroup && 'value' in this.props);
49753
49763
  }
49754
49764
 
49755
49765
  focus() {
@@ -50614,13 +50624,13 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
50614
50624
  }
50615
50625
  }
50616
50626
 
50617
- close(e, value) {
50627
+ close(e, value, tagKey) {
50618
50628
  const {
50619
50629
  onClose
50620
50630
  } = this.props;
50621
50631
  e.stopPropagation();
50622
50632
  e.nativeEvent.stopImmediatePropagation();
50623
- onClose && onClose(value, e); // when user call e.preventDefault() in onClick callback, tag will not hidden
50633
+ onClose && onClose(value, e, tagKey); // when user call e.preventDefault() in onClick callback, tag will not hidden
50624
50634
 
50625
50635
  if (e.defaultPrevented) {
50626
50636
  return;
@@ -50639,7 +50649,7 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
50639
50649
  switch (event.key) {
50640
50650
  case "Backspace":
50641
50651
  case "Delete":
50642
- closable && this.close(event, this.props.children);
50652
+ closable && this.close(event, this.props.children, this.props.tagKey);
50643
50653
  handlePrevent(event);
50644
50654
  break;
50645
50655
 
@@ -50676,6 +50686,7 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
50676
50686
 
50677
50687
  const _a = this.props,
50678
50688
  {
50689
+ tagKey,
50679
50690
  children,
50680
50691
  size,
50681
50692
  color,
@@ -50689,7 +50700,7 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
50689
50700
  avatarShape,
50690
50701
  tabIndex
50691
50702
  } = _a,
50692
- attr = tag_rest(_a, ["children", "size", "color", "closable", "visible", "onClose", "onClick", "className", "type", "avatarSrc", "avatarShape", "tabIndex"]);
50703
+ attr = tag_rest(_a, ["tagKey", "children", "size", "color", "closable", "visible", "onClose", "onClick", "className", "type", "avatarSrc", "avatarShape", "tabIndex"]);
50693
50704
 
50694
50705
  const {
50695
50706
  visible: isVisible
@@ -50722,7 +50733,7 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
50722
50733
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
50723
50734
  external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
50724
50735
  className: "".concat(tag_prefixCls, "-close"),
50725
- onClick: e => this.close(e, children)
50736
+ onClick: e => this.close(e, children, tagKey)
50726
50737
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
50727
50738
  size: "small"
50728
50739
  })) : null;
@@ -50748,6 +50759,7 @@ tag_Tag.defaultProps = {
50748
50759
  };
50749
50760
  tag_Tag.propTypes = {
50750
50761
  children: prop_types_default.a.node,
50762
+ tagKey: prop_types_default.a.oneOf([prop_types_default.a.string, prop_types_default.a.number]),
50751
50763
  size: prop_types_default.a.oneOf(tagSize),
50752
50764
  color: prop_types_default.a.oneOf(tagColors),
50753
50765
  type: prop_types_default.a.oneOf(tagType),
@@ -69406,7 +69418,10 @@ class ModalContent_ModalContent extends baseComponent_BaseComponent {
69406
69418
  }, this.getMaskElement(), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
69407
69419
  role: "none",
69408
69420
  tabIndex: -1,
69409
- className: "".concat(modal_constants_cssClasses.DIALOG, "-wrap"),
69421
+ className: classnames_default()({
69422
+ ["".concat(modal_constants_cssClasses.DIALOG, "-wrap")]: true,
69423
+ ["".concat(modal_constants_cssClasses.DIALOG, "-wrap-center")]: this.props.centered
69424
+ }),
69410
69425
  onClick: maskClosable ? this.onMaskClick : null,
69411
69426
  onMouseUp: maskClosable ? this.onMaskMouseUp : null
69412
69427
  }, this.getDialogElement())); // eslint-disable-next-line max-len
@@ -69896,14 +69911,6 @@ class Modal_Modal extends baseComponent_BaseComponent {
69896
69911
  let style = styleFromProps;
69897
69912
  const maskStyle = maskStyleFromProps;
69898
69913
  const renderFooter = 'footer' in this.props ? footer : this.renderFooter();
69899
-
69900
- if (this.props.centered) {
69901
- style = assign_default()({
69902
- transform: 'translateY(-50%)',
69903
- top: '50%'
69904
- }, style);
69905
- }
69906
-
69907
69914
  let wrapperStyle = {
69908
69915
  zIndex
69909
69916
  };
@@ -71851,6 +71858,7 @@ const form_constants_numbers = {};
71851
71858
 
71852
71859
 
71853
71860
 
71861
+
71854
71862
  const label_prefixCls = form_constants_cssClasses.PREFIX;
71855
71863
  class label_Label extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
71856
71864
  render() {
@@ -71865,7 +71873,8 @@ class label_Label extends external_root_React_commonjs2_react_commonjs_react_amd
71865
71873
  style,
71866
71874
  className,
71867
71875
  extra,
71868
- id
71876
+ id,
71877
+ optional
71869
71878
  } = this.props;
71870
71879
  const labelCls = classnames_default()(className, {
71871
71880
  ["".concat(label_prefixCls, "-field-label")]: true,
@@ -71877,10 +71886,15 @@ class label_Label extends external_root_React_commonjs2_react_commonjs_react_amd
71877
71886
  });
71878
71887
  const labelStyle = style ? style : {};
71879
71888
  width ? labelStyle.width = width : null;
71889
+ const optionalText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
71890
+ componentName: "Form"
71891
+ }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
71892
+ className: "".concat(label_prefixCls, "-field-label-optional-text")
71893
+ }, locale.optional));
71880
71894
  const textContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
71881
71895
  className: "".concat(label_prefixCls, "-field-label-text"),
71882
71896
  "x-semi-prop": "label"
71883
- }, typeof text !== 'undefined' ? text : children);
71897
+ }, typeof text !== 'undefined' ? text : children, optional ? optionalText : null);
71884
71898
  const contentWithExtra = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, textContent, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
71885
71899
  className: "".concat(label_prefixCls, "-field-label-extra")
71886
71900
  }, extra));
@@ -71897,7 +71911,8 @@ label_Label.defaultProps = {
71897
71911
  required: false,
71898
71912
  name: '',
71899
71913
  align: 'left',
71900
- className: ''
71914
+ className: '',
71915
+ optional: false
71901
71916
  };
71902
71917
  label_Label.propTypes = {
71903
71918
  id: prop_types_default.a.string,
@@ -71910,7 +71925,8 @@ label_Label.propTypes = {
71910
71925
  width: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
71911
71926
  style: prop_types_default.a.object,
71912
71927
  className: prop_types_default.a.string,
71913
- extra: prop_types_default.a.node
71928
+ extra: prop_types_default.a.node,
71929
+ optional: prop_types_default.a.bool
71914
71930
  };
71915
71931
  // CONCATENATED MODULE: ./input/inputGroup.tsx
71916
71932
 
@@ -81520,6 +81536,26 @@ class foundation_SelectFoundation extends foundation {
81520
81536
  }
81521
81537
 
81522
81538
  }
81539
+ // CONCATENATED MODULE: ../semi-foundation/select/constants.ts
81540
+
81541
+
81542
+ const select_constants_cssClasses = {
81543
+ PREFIX: "".concat(BASE_CLASS_PREFIX, "-select"),
81544
+ PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-select-option"),
81545
+ PREFIX_GROUP: "".concat(BASE_CLASS_PREFIX, "-select-group")
81546
+ };
81547
+ const select_constants_strings = {
81548
+ SIZE_SET: ['small', 'large', 'default'],
81549
+ POSITION_SET: tooltip_constants_strings.POSITION_SET,
81550
+ MODE_SELECT: 'select',
81551
+ MODE_AUTOCOMPLETE: 'autoComplete',
81552
+ // MODE_TAGS: 'tags',
81553
+ STATUS: VALIDATE_STATUS
81554
+ };
81555
+ const select_constants_numbers = {
81556
+ LIST_HEIGHT: 300
81557
+ };
81558
+
81523
81559
  // CONCATENATED MODULE: ./tag/group.tsx
81524
81560
 
81525
81561
 
@@ -81595,10 +81631,11 @@ class group_TagGroup extends external_root_React_commonjs2_react_commonjs_react_
81595
81631
  tagList,
81596
81632
  size,
81597
81633
  mode,
81598
- avatarShape
81634
+ avatarShape,
81635
+ onTagClose
81599
81636
  } = this.props;
81600
81637
 
81601
- const renderTags = map_default()(tagList).call(tagList, (tag, index) => {
81638
+ const renderTags = map_default()(tagList).call(tagList, tag => {
81602
81639
  if (mode === 'custom') {
81603
81640
  return tag;
81604
81641
  }
@@ -81611,9 +81648,24 @@ class group_TagGroup extends external_root_React_commonjs2_react_commonjs_react_
81611
81648
  tag.avatarShape = avatarShape;
81612
81649
  }
81613
81650
 
81614
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tag_Tag, assign_default()({
81615
- key: "".concat(index, "-tag")
81616
- }, tag));
81651
+ if (!tag.tagKey) {
81652
+ if (typeof tag.children === 'string' || typeof tag.children === 'number') {
81653
+ tag.tagKey = tag.children;
81654
+ } else {
81655
+ tag.tagKey = Math.random();
81656
+ }
81657
+ }
81658
+
81659
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tag_Tag, assign_default()({}, tag, {
81660
+ key: tag.tagKey,
81661
+ onClose: (tagChildren, e, tagKey) => {
81662
+ if (tag.onClose) {
81663
+ tag.onClose(tagChildren, e, tagKey);
81664
+ }
81665
+
81666
+ onTagClose && onTagClose(tagChildren, e, tagKey);
81667
+ }
81668
+ }));
81617
81669
  });
81618
81670
 
81619
81671
  return renderTags;
@@ -81645,7 +81697,8 @@ group_TagGroup.defaultProps = {
81645
81697
  style: {},
81646
81698
  className: '',
81647
81699
  size: group_tagSize[0],
81648
- avatarShape: 'square'
81700
+ avatarShape: 'square',
81701
+ onTagClose: () => undefined
81649
81702
  };
81650
81703
  group_TagGroup.propTypes = {
81651
81704
  children: prop_types_default.a.node,
@@ -81656,6 +81709,7 @@ group_TagGroup.propTypes = {
81656
81709
  tagList: prop_types_default.a.array,
81657
81710
  size: prop_types_default.a.oneOf(group_tagSize),
81658
81711
  mode: prop_types_default.a.string,
81712
+ onTagClose: prop_types_default.a.func,
81659
81713
  showPopover: prop_types_default.a.bool,
81660
81714
  popoverProps: prop_types_default.a.object,
81661
81715
  avatarShape: prop_types_default.a.oneOf(group_avatarShapeSet)
@@ -81781,6 +81835,197 @@ const VirtualRow = _ref => {
81781
81835
  };
81782
81836
 
81783
81837
  /* harmony default export */ var virtualRow = (VirtualRow);
81838
+ // CONCATENATED MODULE: ./select/option.tsx
81839
+
81840
+
81841
+
81842
+
81843
+
81844
+ var select_option_rest = undefined && undefined.__rest || function (s, e) {
81845
+ var t = {};
81846
+
81847
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && index_of_default()(e).call(e, p) < 0) t[p] = s[p];
81848
+
81849
+ if (s != null && typeof get_own_property_symbols_default.a === "function") for (var i = 0, p = get_own_property_symbols_default()(s); i < p.length; i++) {
81850
+ if (index_of_default()(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
81851
+ }
81852
+ return t;
81853
+ };
81854
+ /* eslint-disable max-len */
81855
+
81856
+
81857
+
81858
+
81859
+
81860
+
81861
+
81862
+
81863
+
81864
+
81865
+ class select_option_Option extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
81866
+ onClick(_a, event) {
81867
+ var {
81868
+ value,
81869
+ label,
81870
+ children
81871
+ } = _a,
81872
+ rest = select_option_rest(_a, ["value", "label", "children"]);
81873
+
81874
+ const {
81875
+ props
81876
+ } = this;
81877
+ const isDisabled = props.disabled;
81878
+
81879
+ if (!isDisabled) {
81880
+ props.onSelect(assign_default()(assign_default()({}, rest), {
81881
+ value,
81882
+ label: label || children
81883
+ }), event);
81884
+ }
81885
+ }
81886
+
81887
+ renderOptionContent(_ref) {
81888
+ let {
81889
+ config,
81890
+ children,
81891
+ inputValue,
81892
+ prefixCls
81893
+ } = _ref;
81894
+
81895
+ if (isString_default()(children) && inputValue) {
81896
+ return Object(_utils["d" /* getHighLightTextHTML */])(config);
81897
+ }
81898
+
81899
+ return children;
81900
+ }
81901
+
81902
+ render() {
81903
+ const _a = this.props,
81904
+ {
81905
+ children,
81906
+ disabled,
81907
+ value,
81908
+ selected,
81909
+ label,
81910
+ empty,
81911
+ emptyContent,
81912
+ onSelect,
81913
+ focused,
81914
+ showTick,
81915
+ className,
81916
+ style,
81917
+ onMouseEnter,
81918
+ prefixCls,
81919
+ renderOptionItem,
81920
+ inputValue,
81921
+ id
81922
+ } = _a,
81923
+ rest = select_option_rest(_a, ["children", "disabled", "value", "selected", "label", "empty", "emptyContent", "onSelect", "focused", "showTick", "className", "style", "onMouseEnter", "prefixCls", "renderOptionItem", "inputValue", "id"]);
81924
+
81925
+ const optionClassName = classnames_default()(prefixCls, {
81926
+ ["".concat(prefixCls, "-disabled")]: disabled,
81927
+ ["".concat(prefixCls, "-selected")]: selected,
81928
+ ["".concat(prefixCls, "-focused")]: focused,
81929
+ ["".concat(prefixCls, "-empty")]: empty,
81930
+ [className]: className
81931
+ });
81932
+ const selectedIconClassName = classnames_default()(["".concat(prefixCls, "-icon")]);
81933
+
81934
+ if (empty) {
81935
+ if (emptyContent === null) {
81936
+ return null;
81937
+ }
81938
+
81939
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
81940
+ componentName: "Select"
81941
+ }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
81942
+ className: optionClassName,
81943
+ "x-semi-prop": "emptyContent"
81944
+ }, emptyContent || locale.emptyText));
81945
+ } // Since there are empty, locale and other logic, the custom renderOptionItem is directly converged to the internal option instead of being placed in Select/index
81946
+
81947
+
81948
+ if (typeof renderOptionItem === 'function') {
81949
+ return renderOptionItem(assign_default()({
81950
+ disabled,
81951
+ focused,
81952
+ selected,
81953
+ style,
81954
+ label,
81955
+ value,
81956
+ inputValue,
81957
+ onMouseEnter: e => onMouseEnter(e),
81958
+ onClick: e => this.onClick(assign_default()({
81959
+ value,
81960
+ label,
81961
+ children
81962
+ }, rest), e)
81963
+ }, rest));
81964
+ }
81965
+
81966
+ const config = {
81967
+ searchWords: inputValue,
81968
+ sourceString: children,
81969
+ option: {
81970
+ highlightClassName: "".concat(prefixCls, "-keyword")
81971
+ }
81972
+ };
81973
+ return (
81974
+ /*#__PURE__*/
81975
+ // eslint-disable-next-line jsx-a11y/interactive-supports-focus,jsx-a11y/click-events-have-key-events
81976
+ external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
81977
+ className: optionClassName,
81978
+ onClick: e => {
81979
+ this.onClick(assign_default()({
81980
+ value,
81981
+ label,
81982
+ children
81983
+ }, rest), e);
81984
+ },
81985
+ onMouseEnter: e => onMouseEnter && onMouseEnter(e),
81986
+ role: "option",
81987
+ id: id,
81988
+ "aria-selected": selected ? "true" : "false",
81989
+ "aria-disabled": disabled ? "true" : "false",
81990
+ style: style
81991
+ }, showTick ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
81992
+ className: selectedIconClassName
81993
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, isString_default()(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
81994
+ className: "".concat(prefixCls, "-text")
81995
+ }, this.renderOptionContent({
81996
+ children,
81997
+ config,
81998
+ inputValue,
81999
+ prefixCls
82000
+ })) : children)
82001
+ );
82002
+ }
82003
+
82004
+ }
82005
+
82006
+ select_option_Option.isSelectOption = true;
82007
+ select_option_Option.propTypes = {
82008
+ children: prop_types_default.a.node,
82009
+ disabled: prop_types_default.a.bool,
82010
+ value: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]),
82011
+ selected: prop_types_default.a.bool,
82012
+ label: prop_types_default.a.node,
82013
+ empty: prop_types_default.a.bool,
82014
+ emptyContent: prop_types_default.a.node,
82015
+ onSelect: prop_types_default.a.func,
82016
+ focused: prop_types_default.a.bool,
82017
+ showTick: prop_types_default.a.bool,
82018
+ className: prop_types_default.a.string,
82019
+ style: prop_types_default.a.object,
82020
+ onMouseEnter: prop_types_default.a.func,
82021
+ prefixCls: prop_types_default.a.string,
82022
+ renderOptionItem: prop_types_default.a.func,
82023
+ inputValue: prop_types_default.a.string
82024
+ };
82025
+ select_option_Option.defaultProps = {
82026
+ prefixCls: select_constants_cssClasses.PREFIX_OPTION
82027
+ };
82028
+ /* harmony default export */ var select_option = (select_option_Option);
81784
82029
  // CONCATENATED MODULE: ./select/optionGroup.tsx
81785
82030
 
81786
82031
 
@@ -89860,9 +90105,9 @@ class foundation_SwitchFoundation extends foundation {
89860
90105
 
89861
90106
  handleChange(checked, e) {
89862
90107
  const propChecked = this.getProps().checked;
89863
- const isControledComponent = typeof propChecked !== 'undefined';
90108
+ const isControlledComponent = typeof propChecked !== 'undefined';
89864
90109
 
89865
- if (isControledComponent) {
90110
+ if (isControlledComponent) {
89866
90111
  this._adapter.notifyChange(checked, e);
89867
90112
  } else {
89868
90113
  this._adapter.setNativeControlChecked(checked);
@@ -91322,8 +91567,8 @@ class foundation_TableFoundation extends foundation {
91322
91567
  filteredData = new core_js_stable_map_default.a();
91323
91568
  }
91324
91569
 
91325
- each_default()(currentFilteredValue, value => {
91326
- each_default()(dataSource, record => {
91570
+ each_default()(dataSource, record => {
91571
+ each_default()(currentFilteredValue, value => {
91327
91572
  const childrenRecords = get_default()(record, childrenRecordName);
91328
91573
 
91329
91574
  const recordKey = this.getRecordKey(record);
@@ -99309,23 +99554,20 @@ class foundation_TimePickerFoundation extends foundation {
99309
99554
  timeZone,
99310
99555
  __prevTimeZone
99311
99556
  } = props;
99557
+ let dates = this.parseValue(value);
99558
+ const invalid = this.validateDates(dates);
99312
99559
 
99313
- if (!isNullOrUndefined(value)) {
99314
- let dates = this.parseValue(value);
99315
- const invalid = this.validateDates(dates);
99316
-
99317
- if (!invalid) {
99318
- if (this.isValidTimeZone(timeZone)) {
99319
- dates = map_default()(dates).call(dates, date => date_fns_extra_utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? date_fns_extra_zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
99320
- }
99321
-
99322
- const inputValue = this.formatValue(dates);
99323
- this.setState({
99324
- value: dates,
99325
- invalid,
99326
- inputValue
99327
- });
99560
+ if (!invalid) {
99561
+ if (this.isValidTimeZone(timeZone)) {
99562
+ dates = map_default()(dates).call(dates, date => date_fns_extra_utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? date_fns_extra_zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
99328
99563
  }
99564
+
99565
+ const inputValue = this.formatValue(dates);
99566
+ this.setState({
99567
+ value: dates,
99568
+ invalid,
99569
+ inputValue
99570
+ });
99329
99571
  }
99330
99572
  }
99331
99573
 
@@ -102804,6 +103046,7 @@ var tree = __webpack_require__("Q8Yr");
102804
103046
 
102805
103047
 
102806
103048
 
103049
+
102807
103050
  /* eslint-disable max-lines-per-function */
102808
103051
 
102809
103052
 
@@ -102836,6 +103079,25 @@ class tree_Tree extends baseComponent_BaseComponent {
102836
103079
  this.foundation.handleInputChange(value);
102837
103080
  };
102838
103081
 
103082
+ this.scrollTo = scrollData => {
103083
+ var _a;
103084
+
103085
+ const {
103086
+ key,
103087
+ align = 'center'
103088
+ } = scrollData;
103089
+ const {
103090
+ flattenNodes
103091
+ } = this.state;
103092
+
103093
+ if (key) {
103094
+ const index = flattenNodes === null || flattenNodes === void 0 ? void 0 : find_index_default()(flattenNodes).call(flattenNodes, node => {
103095
+ return node.key === key;
103096
+ });
103097
+ index >= 0 && ((_a = this.virtualizedListRef.current) === null || _a === void 0 ? void 0 : _a.scrollToItem(index, align));
103098
+ }
103099
+ };
103100
+
102839
103101
  this.renderEmpty = () => {
102840
103102
  const {
102841
103103
  emptyContent
@@ -102997,6 +103259,7 @@ class tree_Tree extends baseComponent_BaseComponent {
102997
103259
  this.optionsRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
102998
103260
  this.foundation = new foundation_TreeFoundation(this.adapter);
102999
103261
  this.dragNode = null;
103262
+ this.virtualizedListRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
103000
103263
  }
103001
103264
  /**
103002
103265
  * Process of getDerivedStateFromProps was inspired by rc-tree
@@ -103369,6 +103632,7 @@ class tree_Tree extends baseComponent_BaseComponent {
103369
103632
  width
103370
103633
  } = _ref4;
103371
103634
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(FixedSizeList, {
103635
+ ref: this.virtualizedListRef,
103372
103636
  itemCount: flattenNodes.length,
103373
103637
  itemSize: virtualize.itemSize,
103374
103638
  height: height,
@@ -111033,7 +111297,8 @@ function withField(Component, opts) {
111033
111297
  if (arrayFieldState) {
111034
111298
  initVal = arrayFieldState.shouldUseInitValue && typeof initValue !== 'undefined' ? initValue : initValueInFormOpts;
111035
111299
  }
111036
- } catch (err) {}
111300
+ } catch (err) {} // FIXME typeof initVal
111301
+
111037
111302
 
111038
111303
  const [value, setValue, getVal] = useStateWithGetter(typeof initVal !== undefined ? initVal : null);
111039
111304