@douyinfe/semi-ui 2.4.1 → 2.5.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 (103) hide show
  1. package/button/index.tsx +1 -1
  2. package/cascader/__test__/cascader.test.js +24 -0
  3. package/cascader/_story/cascader.stories.js +73 -0
  4. package/cascader/index.tsx +5 -2
  5. package/datePicker/_story/v2/FixInputRangeFocus.jsx +25 -0
  6. package/datePicker/_story/v2/index.js +2 -1
  7. package/datePicker/datePicker.tsx +3 -0
  8. package/dist/css/semi.css +56 -29
  9. package/dist/css/semi.min.css +1 -1
  10. package/dist/umd/semi-ui.js +523 -227
  11. package/dist/umd/semi-ui.js.map +1 -1
  12. package/dist/umd/semi-ui.min.js +1 -1
  13. package/dist/umd/semi-ui.min.js.map +1 -1
  14. package/form/__test__/formApi.test.js +182 -0
  15. package/form/_story/FormApi/arrayDemo.jsx +4 -7
  16. package/form/_story/Layout/slotDemo.jsx +2 -2
  17. package/form/_story/demo.jsx +18 -1
  18. package/form/_story/form.stories.js +6 -6
  19. package/form/baseForm.tsx +2 -2
  20. package/lib/cjs/autoComplete/index.d.ts +1 -1
  21. package/lib/cjs/button/Button.d.ts +4 -4
  22. package/lib/cjs/button/buttonGroup.d.ts +2 -2
  23. package/lib/cjs/button/index.d.ts +5 -6
  24. package/lib/cjs/cascader/index.js +6 -0
  25. package/lib/cjs/datePicker/datePicker.js +4 -0
  26. package/lib/cjs/dropdown/index.d.ts +1 -1
  27. package/lib/cjs/form/baseForm.d.ts +1 -1
  28. package/lib/cjs/form/baseForm.js +2 -2
  29. package/lib/cjs/form/field.d.ts +1 -1
  30. package/lib/cjs/iconButton/index.d.ts +2 -2
  31. package/lib/cjs/select/index.d.ts +3 -3
  32. package/lib/cjs/select/index.js +32 -28
  33. package/lib/cjs/select/option.js +2 -2
  34. package/lib/cjs/select/virtualRow.js +2 -2
  35. package/lib/cjs/table/Table.d.ts +1 -1
  36. package/lib/cjs/table/Table.js +8 -2
  37. package/lib/cjs/table/interface.d.ts +1 -0
  38. package/lib/cjs/tabs/interface.d.ts +1 -1
  39. package/lib/cjs/tooltip/index.d.ts +1 -1
  40. package/lib/cjs/tooltip/index.js +12 -4
  41. package/lib/cjs/tree/index.d.ts +2 -0
  42. package/lib/cjs/tree/index.js +15 -8
  43. package/lib/cjs/treeSelect/index.d.ts +2 -0
  44. package/lib/cjs/treeSelect/index.js +64 -27
  45. package/lib/cjs/upload/fileCard.js +31 -22
  46. package/lib/cjs/upload/index.d.ts +6 -0
  47. package/lib/cjs/upload/index.js +15 -8
  48. package/lib/cjs/upload/interface.d.ts +8 -6
  49. package/lib/es/autoComplete/index.d.ts +1 -1
  50. package/lib/es/button/Button.d.ts +4 -4
  51. package/lib/es/button/buttonGroup.d.ts +2 -2
  52. package/lib/es/button/index.d.ts +5 -6
  53. package/lib/es/cascader/index.js +5 -0
  54. package/lib/es/datePicker/datePicker.js +4 -0
  55. package/lib/es/dropdown/index.d.ts +1 -1
  56. package/lib/es/form/baseForm.d.ts +1 -1
  57. package/lib/es/form/baseForm.js +2 -2
  58. package/lib/es/form/field.d.ts +1 -1
  59. package/lib/es/iconButton/index.d.ts +2 -2
  60. package/lib/es/select/index.d.ts +3 -3
  61. package/lib/es/select/index.js +30 -26
  62. package/lib/es/select/option.js +2 -2
  63. package/lib/es/select/virtualRow.js +2 -2
  64. package/lib/es/table/Table.d.ts +1 -1
  65. package/lib/es/table/Table.js +10 -2
  66. package/lib/es/table/interface.d.ts +1 -0
  67. package/lib/es/tabs/interface.d.ts +1 -1
  68. package/lib/es/tooltip/index.d.ts +1 -1
  69. package/lib/es/tooltip/index.js +12 -4
  70. package/lib/es/tree/index.d.ts +2 -0
  71. package/lib/es/tree/index.js +15 -8
  72. package/lib/es/treeSelect/index.d.ts +2 -0
  73. package/lib/es/treeSelect/index.js +64 -27
  74. package/lib/es/upload/fileCard.js +31 -24
  75. package/lib/es/upload/index.d.ts +6 -0
  76. package/lib/es/upload/index.js +14 -8
  77. package/lib/es/upload/interface.d.ts +8 -6
  78. package/package.json +9 -9
  79. package/select/index.tsx +18 -19
  80. package/select/option.tsx +2 -2
  81. package/select/virtualRow.tsx +2 -2
  82. package/table/Table.tsx +7 -2
  83. package/table/_story/Perf/Virtualized/index.jsx +6 -0
  84. package/table/_story/table.stories.js +1 -2
  85. package/table/_story/v2/FixedHeaderMerge/index.jsx +98 -0
  86. package/table/_story/v2/FixedResizable/index.jsx +114 -0
  87. package/table/_story/v2/defaultFilteredValue.tsx +114 -0
  88. package/table/_story/v2/index.js +5 -0
  89. package/table/interface.ts +1 -0
  90. package/tabs/interface.ts +1 -1
  91. package/tooltip/__test__/tooltip.test.js +48 -4
  92. package/tooltip/_story/tooltip.stories.js +718 -559
  93. package/tooltip/index.tsx +6 -6
  94. package/tree/__test__/treeMultiple.test.js +94 -0
  95. package/tree/_story/tree.stories.js +169 -0
  96. package/tree/index.tsx +12 -5
  97. package/treeSelect/__test__/treeMultiple.test.js +94 -0
  98. package/treeSelect/_story/treeSelect.stories.js +242 -0
  99. package/treeSelect/index.tsx +72 -40
  100. package/upload/_story/upload.stories.js +22 -6
  101. package/upload/fileCard.tsx +23 -23
  102. package/upload/index.tsx +15 -6
  103. package/upload/interface.ts +7 -5
@@ -24257,6 +24257,19 @@ class foundation_Tooltip extends foundation {
24257
24257
  translateX = -1;
24258
24258
  break;
24259
24259
 
24260
+ case 'leftBottomOver':
24261
+ left = triggerRect.left;
24262
+ top = triggerRect.bottom;
24263
+ translateY = -1;
24264
+ break;
24265
+
24266
+ case 'rightBottomOver':
24267
+ left = triggerRect.right;
24268
+ top = triggerRect.bottom;
24269
+ translateX = -1;
24270
+ translateY = -1;
24271
+ break;
24272
+
24260
24273
  default:
24261
24274
  break;
24262
24275
  }
@@ -24380,12 +24393,16 @@ class foundation_Tooltip extends foundation {
24380
24393
 
24381
24394
  const shouldReverseTop = clientTop < wrapperRect.height + spacing && restClientBottom > wrapperRect.height + spacing;
24382
24395
  const shouldReverseLeft = clientLeft < wrapperRect.width + spacing && restClientRight > wrapperRect.width + spacing;
24383
- const sholdReverseBottom = restClientBottom < wrapperRect.height + spacing && clientTop > wrapperRect.height + spacing;
24396
+ const shouldReverseBottom = restClientBottom < wrapperRect.height + spacing && clientTop > wrapperRect.height + spacing;
24384
24397
  const shouldReverseRight = restClientRight < wrapperRect.width + spacing && clientLeft > wrapperRect.width + spacing;
24398
+ const shouldReverseTopOver = restClientTop < wrapperRect.height + spacing && clientBottom > wrapperRect.height + spacing;
24399
+ const shouldReverseBottomOver = clientBottom < wrapperRect.height + spacing && restClientTop > wrapperRect.height + spacing;
24385
24400
  const shouldReverseTopSide = restClientTop < wrapperRect.height && clientBottom > wrapperRect.height;
24386
24401
  const shouldReverseBottomSide = clientBottom < wrapperRect.height && restClientTop > wrapperRect.height;
24387
24402
  const shouldReverseLeftSide = restClientLeft < wrapperRect.width && clientRight > wrapperRect.width;
24388
24403
  const shouldReverseRightSide = clientRight < wrapperRect.width && restClientLeft > wrapperRect.width;
24404
+ const shouldReverseLeftOver = restClientLeft < wrapperRect.width && clientRight > wrapperRect.width;
24405
+ const shouldReverseRightOver = clientRight < wrapperRect.width && restClientLeft > wrapperRect.width;
24389
24406
 
24390
24407
  switch (position) {
24391
24408
  case 'top':
@@ -24447,14 +24464,14 @@ class foundation_Tooltip extends foundation {
24447
24464
  break;
24448
24465
 
24449
24466
  case 'bottom':
24450
- if (sholdReverseBottom) {
24467
+ if (shouldReverseBottom) {
24451
24468
  position = this._reversePos(position, true);
24452
24469
  }
24453
24470
 
24454
24471
  break;
24455
24472
 
24456
24473
  case 'bottomLeft':
24457
- if (sholdReverseBottom) {
24474
+ if (shouldReverseBottom) {
24458
24475
  position = this._reversePos(position, true);
24459
24476
  }
24460
24477
 
@@ -24465,7 +24482,7 @@ class foundation_Tooltip extends foundation {
24465
24482
  break;
24466
24483
 
24467
24484
  case 'bottomRight':
24468
- if (sholdReverseBottom) {
24485
+ if (shouldReverseBottom) {
24469
24486
  position = this._reversePos(position, true);
24470
24487
  }
24471
24488
 
@@ -24504,6 +24521,50 @@ class foundation_Tooltip extends foundation {
24504
24521
 
24505
24522
  break;
24506
24523
 
24524
+ case 'leftTopOver':
24525
+ if (shouldReverseTopOver) {
24526
+ position = this._reversePos(position, true);
24527
+ }
24528
+
24529
+ if (shouldReverseLeftOver) {
24530
+ position = this._reversePos(position);
24531
+ }
24532
+
24533
+ break;
24534
+
24535
+ case 'leftBottomOver':
24536
+ if (shouldReverseBottomOver) {
24537
+ position = this._reversePos(position, true);
24538
+ }
24539
+
24540
+ if (shouldReverseLeftOver) {
24541
+ position = this._reversePos(position);
24542
+ }
24543
+
24544
+ break;
24545
+
24546
+ case 'rightTopOver':
24547
+ if (shouldReverseTopOver) {
24548
+ position = this._reversePos(position, true);
24549
+ }
24550
+
24551
+ if (shouldReverseRightOver) {
24552
+ position = this._reversePos(position);
24553
+ }
24554
+
24555
+ break;
24556
+
24557
+ case 'rightBottomOver':
24558
+ if (shouldReverseBottomOver) {
24559
+ position = this._reversePos(position, true);
24560
+ }
24561
+
24562
+ if (shouldReverseRightOver) {
24563
+ position = this._reversePos(position);
24564
+ }
24565
+
24566
+ break;
24567
+
24507
24568
  default:
24508
24569
  break;
24509
24570
  }
@@ -24533,7 +24594,7 @@ const tooltip_constants_cssClasses = {
24533
24594
  PREFIX: "".concat(BASE_CLASS_PREFIX, "-tooltip")
24534
24595
  };
24535
24596
  const tooltip_constants_strings = {
24536
- POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
24597
+ POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver', 'leftBottomOver', 'rightBottomOver'],
24537
24598
  TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
24538
24599
  STATUS_DISABLED: 'disabled',
24539
24600
  STATUS_LOADING: 'loading'
@@ -26834,7 +26895,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
26834
26895
  } = _ref;
26835
26896
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
26836
26897
  className: classnames_default()(className, animateCls),
26837
- style: assign_default()(assign_default()(assign_default()({}, animateStyle), {
26898
+ style: assign_default()(assign_default()(assign_default()({
26899
+ visibility: 'visible'
26900
+ }, animateStyle), {
26838
26901
  transformOrigin
26839
26902
  }), style)
26840
26903
  }, portalEventSet, animateEvents, {
@@ -26846,7 +26909,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
26846
26909
  className: className
26847
26910
  }, portalEventSet, {
26848
26911
  "x-placement": placement,
26849
- style: style
26912
+ style: assign_default()({
26913
+ visibility: motion ? undefined : 'visible'
26914
+ }, style)
26850
26915
  }), content, icon);
26851
26916
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(_portal, {
26852
26917
  getPopupContainer: this.props.getPopupContainer,
@@ -27093,11 +27158,15 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
27093
27158
  }
27094
27159
  };
27095
27160
 
27096
- document.addEventListener('click', this.clickOutsideHandler, false);
27161
+ document.addEventListener('mousedown', this.clickOutsideHandler, {
27162
+ capture: true
27163
+ });
27097
27164
  },
27098
27165
  unregisterClickOutsideHandler: () => {
27099
27166
  if (this.clickOutsideHandler) {
27100
- document.removeEventListener('click', this.clickOutsideHandler, false);
27167
+ document.removeEventListener('mousedown', this.clickOutsideHandler, {
27168
+ capture: true
27169
+ });
27101
27170
  this.clickOutsideHandler = null;
27102
27171
  }
27103
27172
  },
@@ -33915,9 +33984,9 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
33915
33984
  const {
33916
33985
  props
33917
33986
  } = this;
33918
- const isDisbled = props.disabled;
33987
+ const isDisabled = props.disabled;
33919
33988
 
33920
- if (!isDisbled) {
33989
+ if (!isDisabled) {
33921
33990
  props.onSelect(assign_default()(assign_default()({}, rest), {
33922
33991
  value,
33923
33992
  label: label || children
@@ -42911,6 +42980,10 @@ cardGroup_CardGroup.defaultProps = {
42911
42980
  var lodash_flatten = __webpack_require__("1xil");
42912
42981
  var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
42913
42982
 
42983
+ // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/isSet.js
42984
+ var isSet = __webpack_require__("/iLo");
42985
+ var isSet_default = /*#__PURE__*/__webpack_require__.n(isSet);
42986
+
42914
42987
  // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/promise.js
42915
42988
  var promise = __webpack_require__("kNzS");
42916
42989
  var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
@@ -46868,6 +46941,7 @@ tagInput_TagInput.defaultProps = {
46868
46941
 
46869
46942
 
46870
46943
 
46944
+
46871
46945
 
46872
46946
 
46873
46947
  const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
@@ -47560,6 +47634,10 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47560
47634
  realKeys = formatKeys;
47561
47635
  }
47562
47636
 
47637
+ if (isSet_default()(realKeys)) {
47638
+ realKeys = [...realKeys];
47639
+ }
47640
+
47563
47641
  const calRes = calcCheckedKeys(flatten_default()(realKeys), keyEntities);
47564
47642
  const checkedKeys = new set_default.a(calRes.checkedKeys);
47565
47643
  const halfCheckedKeys = new set_default.a(calRes.halfCheckedKeys); // disableStrictly
@@ -52710,6 +52788,24 @@ function getDefaultFormatTokenByType(type) {
52710
52788
  class foundation_DatePickerFoundation extends foundation {
52711
52789
  constructor(adapter) {
52712
52790
  super(assign_default()({}, adapter));
52791
+ /**
52792
+ * clear range input focus when open is controlled
52793
+ * fixed github 1375
52794
+ */
52795
+
52796
+ this.clearRangeInputFocus = () => {
52797
+ const {
52798
+ type
52799
+ } = this._adapter.getProps();
52800
+
52801
+ const {
52802
+ rangeInputFocus
52803
+ } = this._adapter.getStates();
52804
+
52805
+ if (type === 'dateTimeRange' && rangeInputFocus) {
52806
+ this._adapter.setRangeInputFocus(false);
52807
+ }
52808
+ };
52713
52809
 
52714
52810
  this.getMergedMotion = motion => {
52715
52811
  const mergedMotion = typeof motion === 'undefined' || motion ? assign_default()(assign_default()({}, motion), {
@@ -54450,10 +54546,6 @@ function addMonths(dirtyDate, dirtyAmount) {
54450
54546
  return date;
54451
54547
  }
54452
54548
  }
54453
- // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/isSet.js
54454
- var isSet = __webpack_require__("/iLo");
54455
- var isSet_default = /*#__PURE__*/__webpack_require__.n(isSet);
54456
-
54457
54549
  // CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/date-fns/esm/differenceInCalendarMonths/index.js
54458
54550
 
54459
54551
 
@@ -59810,6 +59902,10 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
59810
59902
 
59811
59903
  if (prevProps.open !== this.props.open) {
59812
59904
  this.foundation.initPanelOpenStatus();
59905
+
59906
+ if (!this.props.open) {
59907
+ this.foundation.clearRangeInputFocus();
59908
+ }
59813
59909
  }
59814
59910
  }
59815
59911
 
@@ -72358,8 +72454,9 @@ class foundation_SelectFoundation extends foundation {
72358
72454
  } // console.log('new:' + index);
72359
72455
 
72360
72456
 
72361
- this._adapter.updateFocusIndex(index); // TODO requires scrollIntoView
72457
+ this._adapter.updateFocusIndex(index);
72362
72458
 
72459
+ this._adapter.updateScrollTop(index);
72363
72460
  }
72364
72461
 
72365
72462
  _handleArrowKeyDown(offset) {
@@ -72921,9 +73018,9 @@ const VirtualRow = _ref => {
72921
73018
  style
72922
73019
  } = _ref;
72923
73020
  const {
72924
- visibileOptions
73021
+ visibleOptions
72925
73022
  } = data;
72926
- const option = visibileOptions[index];
73023
+ const option = visibleOptions[index];
72927
73024
  return data.renderOption(option, index, style);
72928
73025
  };
72929
73026
 
@@ -73261,11 +73358,19 @@ class select_Select extends baseComponent_BaseComponent {
73261
73358
  el.focus();
73262
73359
  } catch (error) {}
73263
73360
  },
73264
- updateScrollTop: () => {
73265
- var _context9, _context10;
73361
+ updateScrollTop: index => {
73362
+ var _context10, _context11;
73266
73363
 
73267
73364
  // eslint-disable-next-line max-len
73268
- let destNode = document.querySelector(concat_default()(_context9 = concat_default()(_context10 = "#".concat(select_prefixcls, "-")).call(_context10, this.selectOptionListID, " .")).call(_context9, select_prefixcls, "-option-selected"));
73365
+ let optionClassName = ".".concat(select_prefixcls, "-option-selected");
73366
+
73367
+ if (index !== undefined) {
73368
+ var _context9;
73369
+
73370
+ optionClassName = concat_default()(_context9 = ".".concat(select_prefixcls, "-option:nth-child(")).call(_context9, index, ")");
73371
+ }
73372
+
73373
+ let destNode = document.querySelector(concat_default()(_context10 = concat_default()(_context11 = "#".concat(select_prefixcls, "-")).call(_context11, this.selectOptionListID, " ")).call(_context10, optionClassName));
73269
73374
 
73270
73375
  if (is_array_default()(destNode)) {
73271
73376
  // eslint-disable-next-line prefer-destructuring
@@ -73293,11 +73398,11 @@ class select_Select extends baseComponent_BaseComponent {
73293
73398
  }
73294
73399
 
73295
73400
  componentDidUpdate(prevProps, prevState) {
73296
- var _context11, _context12;
73401
+ var _context12, _context13;
73297
73402
 
73298
- const prevChildrenKeys = map_default()(_context11 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context11, child => child.key);
73403
+ const prevChildrenKeys = map_default()(_context12 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context12, child => child.key);
73299
73404
 
73300
- const nowChildrenKeys = map_default()(_context12 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context12, child => child.key);
73405
+ const nowChildrenKeys = map_default()(_context13 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context13, child => child.key);
73301
73406
 
73302
73407
  let isOptionsChanged = false;
73303
73408
 
@@ -73491,34 +73596,30 @@ class select_Select extends baseComponent_BaseComponent {
73491
73596
  this.foundation.handleOptionMouseEnter(optionIndex);
73492
73597
  }
73493
73598
 
73494
- renderWithGroup(visibileOptions) {
73599
+ renderWithGroup(visibleOptions) {
73495
73600
  const content = [];
73496
73601
  const groupStatus = new core_js_stable_map_default.a();
73497
73602
 
73498
- for_each_default()(visibileOptions).call(visibileOptions, (option, optionIndex) => {
73603
+ for_each_default()(visibleOptions).call(visibleOptions, (option, optionIndex) => {
73499
73604
  const parentGroup = option._parentGroup;
73500
73605
  const optionContent = this.renderOption(option, optionIndex);
73501
73606
 
73502
- if (parentGroup && groupStatus.has(parentGroup.label)) {
73503
- // group content already insert
73504
- content.push(optionContent);
73505
- } else if (parentGroup) {
73607
+ if (parentGroup && !groupStatus.has(parentGroup.label)) {
73608
+ // when use with OptionGroup and group content not already insert
73506
73609
  const groupContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(optionGroup, assign_default()({}, parentGroup, {
73507
73610
  key: parentGroup.label
73508
73611
  }));
73509
73612
  groupStatus.set(parentGroup.label, true);
73510
73613
  content.push(groupContent);
73511
- content.push(optionContent);
73512
- } else {
73513
- // when not use with OptionGroup
73514
- content.push(optionContent);
73515
73614
  }
73615
+
73616
+ content.push(optionContent);
73516
73617
  });
73517
73618
 
73518
73619
  return content;
73519
73620
  }
73520
73621
 
73521
- renderVirtualizeList(visibileOptions) {
73622
+ renderVirtualizeList(visibleOptions) {
73522
73623
  const {
73523
73624
  virtualize
73524
73625
  } = this.props;
@@ -73533,10 +73634,10 @@ class select_Select extends baseComponent_BaseComponent {
73533
73634
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(FixedSizeList, {
73534
73635
  ref: this.virtualizeListRef,
73535
73636
  height: height || select_constants_numbers.LIST_HEIGHT,
73536
- itemCount: visibileOptions.length,
73637
+ itemCount: visibleOptions.length,
73537
73638
  itemSize: itemSize,
73538
73639
  itemData: {
73539
- visibileOptions,
73640
+ visibleOptions,
73540
73641
  renderOption: this.renderOption
73541
73642
  },
73542
73643
  width: width || '100%',
@@ -73547,7 +73648,7 @@ class select_Select extends baseComponent_BaseComponent {
73547
73648
  }
73548
73649
 
73549
73650
  renderOptions(children) {
73550
- var _context13;
73651
+ var _context14;
73551
73652
 
73552
73653
  const {
73553
73654
  dropdownMinWidth,
@@ -73567,12 +73668,12 @@ class select_Select extends baseComponent_BaseComponent {
73567
73668
  multiple
73568
73669
  } = this.props; // Do a filter first, instead of directly judging in forEach, so that the focusIndex can correspond to
73569
73670
 
73570
- const visibileOptions = filter_default()(options).call(options, item => item._show);
73671
+ const visibleOptions = filter_default()(options).call(options, item => item._show);
73571
73672
 
73572
- let listContent = this.renderWithGroup(visibileOptions);
73673
+ let listContent = this.renderWithGroup(visibleOptions);
73573
73674
 
73574
73675
  if (virtualize) {
73575
- listContent = this.renderVirtualizeList(visibileOptions);
73676
+ listContent = this.renderVirtualizeList(visibleOptions);
73576
73677
  }
73577
73678
 
73578
73679
  const style = assign_default()({
@@ -73585,7 +73686,7 @@ class select_Select extends baseComponent_BaseComponent {
73585
73686
  });
73586
73687
  const isEmpty = !options.length || !some_default()(options).call(options, item => item._show);
73587
73688
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
73588
- id: concat_default()(_context13 = "".concat(select_prefixcls, "-")).call(_context13, this.selectOptionListID),
73689
+ id: concat_default()(_context14 = "".concat(select_prefixcls, "-")).call(_context14, this.selectOptionListID),
73589
73690
  className: dropdownClassName,
73590
73691
  style: style
73591
73692
  }, outerTopSlot, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
@@ -73816,7 +73917,7 @@ class select_Select extends baseComponent_BaseComponent {
73816
73917
  }
73817
73918
 
73818
73919
  renderSelection() {
73819
- var _context14;
73920
+ var _context15;
73820
73921
 
73821
73922
  const {
73822
73923
  disabled,
@@ -73900,7 +74001,7 @@ class select_Select extends baseComponent_BaseComponent {
73900
74001
  role: "combobox",
73901
74002
  "aria-disabled": disabled,
73902
74003
  "aria-expanded": isOpen,
73903
- "aria-controls": concat_default()(_context14 = "".concat(select_prefixcls, "-")).call(_context14, this.selectOptionListID),
74004
+ "aria-controls": concat_default()(_context15 = "".concat(select_prefixcls, "-")).call(_context15, this.selectOptionListID),
73904
74005
  "aria-haspopup": "listbox",
73905
74006
  "aria-label": "select value",
73906
74007
  "aria-invalid": this.props['aria-invalid'],
@@ -77388,7 +77489,7 @@ class foundation_SliderFoundation extends foundation {
77388
77489
 
77389
77490
  const scroll = node => regex.test(style(node, 'overflow') + style(node, 'overflow-y') + style(node, 'overflow-x'));
77390
77491
 
77391
- const scrollParent = node => !node || node === document.body ? document.body : scroll(node) ? node : scrollParent(node.parentNode);
77492
+ const scrollParent = node => !node || node === document.body || !(node instanceof Element) ? document.body : scroll(node) ? node : scrollParent(node.parentNode);
77392
77493
 
77393
77494
  return scrollParent(el);
77394
77495
  };
@@ -77512,7 +77613,7 @@ class foundation_SliderFoundation extends foundation {
77512
77613
  }
77513
77614
 
77514
77615
  if (step !== 1) {
77515
- // Find nearest step point
77616
+ // Find nearest step point
77516
77617
  stepValue = Math.round(stepValue / step) * step;
77517
77618
  }
77518
77619
 
@@ -80149,7 +80250,10 @@ function assignColumnKeys(columns) {
80149
80250
  if (column.key == null) {
80150
80251
  var _context4;
80151
80252
 
80152
- column.key = concat_default()(_context4 = "".concat(level, "-")).call(_context4, index);
80253
+ // if user give column a dataIndex, use it for backup
80254
+ const _index = column.dataIndex || index;
80255
+
80256
+ column.key = concat_default()(_context4 = "".concat(level, "-")).call(_context4, _index);
80153
80257
  }
80154
80258
 
80155
80259
  if (is_array_default()(column[childrenColumnName]) && column[childrenColumnName].length) {
@@ -80710,7 +80814,17 @@ class foundation_TableFoundation extends foundation {
80710
80814
 
80711
80815
 
80712
80816
  getFilteredSortedDataSource(dataSource, queries) {
80713
- const filteredDataSource = this.filterDataSource(dataSource, filter_default()(queries).call(queries, query => isFunction_default()(query.onFilter) && is_array_default()(query.filters) && query.filters.length && is_array_default()(query.filteredValue) && query.filteredValue.length));
80817
+ const filteredDataSource = this.filterDataSource(dataSource, filter_default()(queries).call(queries, query => {
80818
+ /**
80819
+ * 这里无需判断 filteredValue 是否为数组,初始化时它是 `undefined`,点击选择空时为 `[]`
80820
+ * 初始化时我们应该用 `defaultFilteredValue`,点击后我们应该用 `filteredValue`
80821
+ *
80822
+ * There is no need to judge whether `filteredValue` is an array here, because it is `undefined` when initialized, and `[]` when you click to select empty
80823
+ * When initializing we should use `defaultFilteredValue`, after clicking we should use `filteredValue`
80824
+ */
80825
+ const currentFilteredValue = query.filteredValue ? query.filteredValue : query.defaultFilteredValue;
80826
+ return isFunction_default()(query.onFilter) && is_array_default()(query.filters) && query.filters.length && is_array_default()(currentFilteredValue) && currentFilteredValue.length;
80827
+ }));
80714
80828
  const sortedDataSource = this.sortDataSource(filteredDataSource, filter_default()(queries).call(queries, query => query && isFunction_default()(query.sorter)));
80715
80829
  return sortedDataSource;
80716
80830
  }
@@ -80869,10 +80983,12 @@ class foundation_TableFoundation extends foundation {
80869
80983
  const {
80870
80984
  onFilter,
80871
80985
  filteredValue,
80872
- filterChildrenRecord
80986
+ filterChildrenRecord,
80987
+ defaultFilteredValue
80873
80988
  } = filterObj;
80989
+ const currentFilteredValue = is_array_default()(filteredValue) ? filteredValue : defaultFilteredValue;
80874
80990
 
80875
- if (typeof onFilter === 'function' && is_array_default()(filteredValue) && filteredValue.length) {
80991
+ if (typeof onFilter === 'function' && is_array_default()(currentFilteredValue) && currentFilteredValue.length) {
80876
80992
  hasValidFilters = true;
80877
80993
 
80878
80994
  if (filteredData === null) {
@@ -80882,7 +80998,7 @@ class foundation_TableFoundation extends foundation {
80882
80998
  filteredData = new core_js_stable_map_default.a();
80883
80999
  }
80884
81000
 
80885
- each_default()(filteredValue, value => {
81001
+ each_default()(currentFilteredValue, value => {
80886
81002
  each_default()(dataSource, record => {
80887
81003
  const childrenRecords = get_default()(record, childrenRecordName);
80888
81004
 
@@ -85692,10 +85808,17 @@ class Table_Table extends baseComponent_BaseComponent {
85692
85808
  titleArr.push(sorter);
85693
85809
  }
85694
85810
 
85811
+ const stateFilteredValue = get_default()(curQuery, 'filteredValue');
85812
+
85813
+ const defaultFilteredValue = get_default()(curQuery, 'defaultFilteredValue');
85814
+
85815
+ const filteredValue = stateFilteredValue ? stateFilteredValue : defaultFilteredValue;
85816
+
85695
85817
  if (is_array_default()(column.filters) && column.filters.length || /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(column.filterDropdown)) {
85696
85818
  const filter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ColumnFilter, assign_default()({
85697
85819
  key: table_constants_strings.DEFAULT_KEY_COLUMN_FILTER
85698
85820
  }, curQuery, {
85821
+ filteredValue: filteredValue,
85699
85822
  onFilterDropdownVisibleChange: visible => _this.foundation.toggleShowFilter(dataIndex, visible),
85700
85823
  onSelect: data => _this.foundation.handleFilterSelect(dataIndex, data)
85701
85824
  }));
@@ -86284,11 +86407,12 @@ class Table_Table extends baseComponent_BaseComponent {
86284
86407
  willUpdateStates.cachedColumns = props.columns;
86285
86408
  willUpdateStates.cachedChildren = null;
86286
86409
  } else if (props.children && props.children !== state.cachedChildren) {
86287
- const newFlattenColumns = flattenColumns(getColumns(props.children));
86410
+ const newNestedColumns = getColumns(props.children);
86411
+ const newFlattenColumns = flattenColumns(newNestedColumns);
86288
86412
  const columns = mergeColumns(state.queries, newFlattenColumns, null, false);
86289
86413
  willUpdateStates.flattenColumns = newFlattenColumns;
86290
86414
  willUpdateStates.queries = [...columns];
86291
- willUpdateStates.cachedColumns = [...columns];
86415
+ willUpdateStates.cachedColumns = [...newNestedColumns];
86292
86416
  willUpdateStates.cachedChildren = props.children;
86293
86417
  } // Update controlled selection column
86294
86418
 
@@ -90552,6 +90676,7 @@ class foundation_TreeFoundation extends foundation {
90552
90676
  selectedKeys = [],
90553
90677
  checkedKeys = new set_default.a([]),
90554
90678
  halfCheckedKeys = new set_default.a([]),
90679
+ realCheckedKeys = new set_default.a([]),
90555
90680
  keyEntities = {},
90556
90681
  filteredKeys = new set_default.a([]),
90557
90682
  inputValue = '',
@@ -90561,13 +90686,26 @@ class foundation_TreeFoundation extends foundation {
90561
90686
  disabledKeys = new set_default.a([])
90562
90687
  } = this.getStates();
90563
90688
  const {
90564
- treeNodeFilterProp
90689
+ treeNodeFilterProp,
90690
+ checkRelation
90565
90691
  } = this.getProps();
90566
90692
  const entity = keyEntities[key];
90567
90693
  const notExist = !entity;
90568
90694
 
90569
90695
  if (notExist) {
90570
90696
  return null;
90697
+ } // if checkRelation is invalid, the checked status of node will be false
90698
+
90699
+
90700
+ let realChecked = false;
90701
+ let realHalfChecked = false;
90702
+
90703
+ if (checkRelation === 'related') {
90704
+ realChecked = checkedKeys.has(key);
90705
+ realHalfChecked = halfCheckedKeys.has(key);
90706
+ } else if (checkRelation === 'unRelated') {
90707
+ realChecked = realCheckedKeys.has(key);
90708
+ realHalfChecked = false;
90571
90709
  }
90572
90710
 
90573
90711
  const isSearching = Boolean(inputValue);
@@ -90575,8 +90713,8 @@ class foundation_TreeFoundation extends foundation {
90575
90713
  eventKey: key,
90576
90714
  expanded: isSearching ? filteredExpandedKeys.has(key) : expandedKeys.has(key),
90577
90715
  selected: includes_default()(selectedKeys).call(selectedKeys, key),
90578
- checked: checkedKeys.has(key),
90579
- halfChecked: halfCheckedKeys.has(key),
90716
+ checked: realChecked,
90717
+ halfChecked: realHalfChecked,
90580
90718
  pos: String(entity ? entity.pos : ''),
90581
90719
  level: entity.level,
90582
90720
  filtered: filteredKeys.has(key),
@@ -90610,10 +90748,17 @@ class foundation_TreeFoundation extends foundation {
90610
90748
  keyEntities
90611
90749
  } = this.getStates();
90612
90750
  const {
90613
- leafOnly
90751
+ leafOnly,
90752
+ checkRelation
90614
90753
  } = this.getProps();
90615
90754
  let value;
90616
- const keyList = normalizeKeyList(key, keyEntities, leafOnly);
90755
+ let keyList = [];
90756
+
90757
+ if (checkRelation === 'related') {
90758
+ keyList = normalizeKeyList(key, keyEntities, leafOnly);
90759
+ } else if (checkRelation === 'unRelated') {
90760
+ keyList = key;
90761
+ }
90617
90762
 
90618
90763
  if (this.getProp('onChangeWithObject')) {
90619
90764
  value = map_default()(keyList).call(keyList, itemKey => keyEntities[itemKey].data);
@@ -90828,30 +90973,58 @@ class foundation_TreeFoundation extends foundation {
90828
90973
 
90829
90974
  handleMultipleSelect(e, treeNode) {
90830
90975
  const {
90831
- disableStrictly
90832
- } = this.getProps(); // eventKey: The key value of the currently clicked node
90976
+ disableStrictly,
90977
+ checkRelation
90978
+ } = this.getProps();
90979
+ const {
90980
+ realCheckedKeys
90981
+ } = this.getStates(); // eventKey: The key value of the currently clicked node
90833
90982
 
90834
90983
  const {
90835
90984
  checked,
90836
90985
  eventKey,
90837
90986
  data
90838
- } = treeNode; // Find the checked state of the current node
90987
+ } = treeNode;
90839
90988
 
90840
- const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
90841
- const {
90842
- checkedKeys,
90843
- halfCheckedKeys
90844
- } = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
90989
+ if (checkRelation === 'related') {
90990
+ // Find the checked state of the current node
90991
+ const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
90992
+ const {
90993
+ checkedKeys,
90994
+ halfCheckedKeys
90995
+ } = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
90845
90996
 
90846
- this._adapter.notifySelect(eventKey, targetStatus, data);
90997
+ this._adapter.notifySelect(eventKey, targetStatus, data);
90847
90998
 
90848
- this.notifyChange([...checkedKeys], e);
90999
+ this.notifyChange([...checkedKeys], e);
90849
91000
 
90850
- if (!this._isControlledComponent()) {
90851
- this._adapter.updateState({
90852
- checkedKeys,
90853
- halfCheckedKeys
90854
- });
91001
+ if (!this._isControlledComponent()) {
91002
+ this._adapter.updateState({
91003
+ checkedKeys,
91004
+ halfCheckedKeys
91005
+ });
91006
+ }
91007
+ } else if (checkRelation === 'unRelated') {
91008
+ const newRealCheckedKeys = new set_default.a(realCheckedKeys);
91009
+ let targetStatus;
91010
+
91011
+ if (realCheckedKeys.has(eventKey)) {
91012
+ newRealCheckedKeys.delete(eventKey);
91013
+ targetStatus = false;
91014
+ } else {
91015
+ newRealCheckedKeys.add(eventKey);
91016
+ targetStatus = true;
91017
+ }
91018
+
91019
+ this._adapter.notifySelect(eventKey, targetStatus, data);
91020
+
91021
+ this.notifyChange([...newRealCheckedKeys], e);
91022
+
91023
+ if (!this._isControlledComponent()) {
91024
+ this._adapter.updateState({
91025
+ realCheckedKeys: newRealCheckedKeys
91026
+ });
91027
+ }
90855
91028
  }
90856
91029
  }
90857
91030
 
@@ -92262,6 +92435,7 @@ class tree_Tree extends baseComponent_BaseComponent {
92262
92435
  selectedKeys: [],
92263
92436
  checkedKeys: new set_default.a(),
92264
92437
  halfCheckedKeys: new set_default.a(),
92438
+ realCheckedKeys: new set_default.a([]),
92265
92439
  motionKeys: new set_default.a([]),
92266
92440
  motionType: 'hide',
92267
92441
  expandedKeys: new set_default.a(props.expandedKeys),
@@ -92472,12 +92646,16 @@ class tree_Tree extends baseComponent_BaseComponent {
92472
92646
  }
92473
92647
 
92474
92648
  if (checkedKeyValues) {
92475
- const {
92476
- checkedKeys,
92477
- halfCheckedKeys
92478
- } = calcCheckedKeys(checkedKeyValues, keyEntities);
92479
- newState.checkedKeys = checkedKeys;
92480
- newState.halfCheckedKeys = halfCheckedKeys;
92649
+ if (props.checkRelation === 'unRelated') {
92650
+ newState.realCheckedKeys = new set_default.a(checkedKeyValues);
92651
+ } else if (props.checkRelation === 'related') {
92652
+ const {
92653
+ checkedKeys,
92654
+ halfCheckedKeys
92655
+ } = calcCheckedKeys(checkedKeyValues, keyEntities);
92656
+ newState.checkedKeys = checkedKeys;
92657
+ newState.halfCheckedKeys = halfCheckedKeys;
92658
+ }
92481
92659
  }
92482
92660
  } // update loadedKeys
92483
92661
 
@@ -92487,7 +92665,7 @@ class tree_Tree extends baseComponent_BaseComponent {
92487
92665
  } // update disableStrictly
92488
92666
 
92489
92667
 
92490
- if (treeData && props.disableStrictly) {
92668
+ if (treeData && props.disableStrictly && props.checkRelation === 'related') {
92491
92669
  newState.disabledKeys = calcDisabledKeys(keyEntities);
92492
92670
  }
92493
92671
 
@@ -92808,6 +92986,7 @@ tree_Tree.propTypes = {
92808
92986
  onDragStart: prop_types_default.a.func,
92809
92987
  onDrop: prop_types_default.a.func,
92810
92988
  labelEllipsis: prop_types_default.a.bool,
92989
+ checkRelation: prop_types_default.a.string,
92811
92990
  'aria-label': prop_types_default.a.string
92812
92991
  };
92813
92992
  tree_Tree.defaultProps = {
@@ -92827,7 +93006,8 @@ tree_Tree.defaultProps = {
92827
93006
  expandAction: false,
92828
93007
  disableStrictly: false,
92829
93008
  draggable: false,
92830
- autoExpandWhenDragEnter: true
93009
+ autoExpandWhenDragEnter: true,
93010
+ checkRelation: 'related'
92831
93011
  };
92832
93012
  tree_Tree.TreeNode = treeNode_TreeNode;
92833
93013
  /* harmony default export */ var tree_0 = (tree_Tree);
@@ -92973,6 +93153,7 @@ class foundation_TreeSelectFoundation extends foundation {
92973
93153
  selectedKeys = [],
92974
93154
  checkedKeys = new set_default.a([]),
92975
93155
  halfCheckedKeys = new set_default.a([]),
93156
+ realCheckedKeys = new set_default.a([]),
92976
93157
  keyEntities = {},
92977
93158
  filteredKeys = new set_default.a([]),
92978
93159
  inputValue = '',
@@ -92982,13 +93163,26 @@ class foundation_TreeSelectFoundation extends foundation {
92982
93163
  disabledKeys = new set_default.a([])
92983
93164
  } = this.getStates();
92984
93165
  const {
92985
- treeNodeFilterProp
93166
+ treeNodeFilterProp,
93167
+ checkRelation
92986
93168
  } = this.getProps();
92987
93169
  const entity = keyEntities[key];
92988
93170
  const notExist = !entity;
92989
93171
 
92990
93172
  if (notExist) {
92991
93173
  return null;
93174
+ } // if checkRelation is invalid, the checked status of node will be false
93175
+
93176
+
93177
+ let realChecked = false;
93178
+ let realHalfChecked = false;
93179
+
93180
+ if (checkRelation === 'related') {
93181
+ realChecked = checkedKeys.has(key);
93182
+ realHalfChecked = halfCheckedKeys.has(key);
93183
+ } else if (checkRelation === 'unRelated') {
93184
+ realChecked = realCheckedKeys.has(key);
93185
+ realHalfChecked = false;
92992
93186
  }
92993
93187
 
92994
93188
  const isSearching = Boolean(inputValue);
@@ -92996,8 +93190,8 @@ class foundation_TreeSelectFoundation extends foundation {
92996
93190
  eventKey: key,
92997
93191
  expanded: isSearching ? filteredExpandedKeys.has(key) : expandedKeys.has(key),
92998
93192
  selected: includes_default()(selectedKeys).call(selectedKeys, key),
92999
- checked: checkedKeys.has(key),
93000
- halfChecked: halfCheckedKeys.has(key),
93193
+ checked: realChecked,
93194
+ halfChecked: realHalfChecked,
93001
93195
  pos: String(entity ? entity.pos : ''),
93002
93196
  level: entity.level,
93003
93197
  filtered: filteredKeys.has(key),
@@ -93063,9 +93257,16 @@ class foundation_TreeSelectFoundation extends foundation {
93063
93257
  keyEntities
93064
93258
  } = this.getStates();
93065
93259
  const {
93066
- leafOnly
93260
+ leafOnly,
93261
+ checkRelation
93067
93262
  } = this.getProps();
93068
- const keyList = normalizeKeyList(key, keyEntities, leafOnly);
93263
+ let keyList = [];
93264
+
93265
+ if (checkRelation === 'related') {
93266
+ keyList = normalizeKeyList(key, keyEntities, leafOnly);
93267
+ } else if (checkRelation === 'unRelated') {
93268
+ keyList = key;
93269
+ }
93069
93270
 
93070
93271
  const nodes = map_default()(keyList).call(keyList, i => keyEntities[i].data);
93071
93272
 
@@ -93192,7 +93393,8 @@ class foundation_TreeSelectFoundation extends foundation {
93192
93393
  this._adapter.updateState({
93193
93394
  selectedKeys: [],
93194
93395
  checkedKeys: new set_default.a(),
93195
- halfCheckedKeys: new set_default.a()
93396
+ halfCheckedKeys: new set_default.a(),
93397
+ realCheckedKeys: new set_default.a([])
93196
93398
  });
93197
93399
  } // When triggerSearch, clicking the clear button will trigger to clear Input
93198
93400
 
@@ -93220,11 +93422,13 @@ class foundation_TreeSelectFoundation extends foundation {
93220
93422
 
93221
93423
  removeTag(eventKey) {
93222
93424
  const {
93223
- disableStrictly
93425
+ disableStrictly,
93426
+ checkRelation
93224
93427
  } = this.getProps();
93225
93428
  const {
93226
93429
  keyEntities,
93227
- disabledKeys
93430
+ disabledKeys,
93431
+ realCheckedKeys
93228
93432
  } = this.getStates();
93229
93433
  const item = keyEntities[eventKey].data;
93230
93434
 
@@ -93232,20 +93436,35 @@ class foundation_TreeSelectFoundation extends foundation {
93232
93436
  return;
93233
93437
  }
93234
93438
 
93235
- const {
93236
- checkedKeys,
93237
- halfCheckedKeys
93238
- } = this.calcCheckedKeys(eventKey, false);
93439
+ if (checkRelation === 'unRelated') {
93440
+ const newRealCheckedKeys = new set_default.a(realCheckedKeys);
93441
+ newRealCheckedKeys.delete(eventKey);
93239
93442
 
93240
- this._notifyChange([...checkedKeys], null);
93443
+ this._notifyChange([...newRealCheckedKeys], null);
93241
93444
 
93242
- if (!this._isControlledComponent()) {
93243
- this._adapter.updateState({
93445
+ if (!this._isControlledComponent()) {
93446
+ this._adapter.updateState({
93447
+ realCheckedKeys: newRealCheckedKeys
93448
+ });
93449
+
93450
+ this._adapter.rePositionDropdown();
93451
+ }
93452
+ } else if (checkRelation === 'related') {
93453
+ const {
93244
93454
  checkedKeys,
93245
93455
  halfCheckedKeys
93246
- });
93456
+ } = this.calcCheckedKeys(eventKey, false);
93247
93457
 
93248
- this._adapter.rePositionDropdown();
93458
+ this._notifyChange([...checkedKeys], null);
93459
+
93460
+ if (!this._isControlledComponent()) {
93461
+ this._adapter.updateState({
93462
+ checkedKeys,
93463
+ halfCheckedKeys
93464
+ });
93465
+
93466
+ this._adapter.rePositionDropdown();
93467
+ }
93249
93468
  }
93250
93469
 
93251
93470
  this._adapter.notifySelect(eventKey, false, item); // reposition dropdown when selected values change
@@ -93396,39 +93615,67 @@ class foundation_TreeSelectFoundation extends foundation {
93396
93615
  handleMultipleSelect(e, treeNode) {
93397
93616
  const {
93398
93617
  searchPosition,
93399
- disableStrictly
93618
+ disableStrictly,
93619
+ checkRelation
93400
93620
  } = this.getProps();
93401
93621
  const {
93402
- inputValue
93622
+ inputValue,
93623
+ realCheckedKeys
93403
93624
  } = this.getStates();
93404
93625
  const {
93405
93626
  checked,
93406
93627
  eventKey,
93407
93628
  data
93408
93629
  } = treeNode;
93409
- const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
93410
- const {
93411
- checkedKeys,
93412
- halfCheckedKeys
93413
- } = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
93414
93630
 
93415
- this._adapter.notifySelect(eventKey, targetStatus, data);
93631
+ if (checkRelation === 'related') {
93632
+ const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
93633
+ const {
93634
+ checkedKeys,
93635
+ halfCheckedKeys
93636
+ } = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
93416
93637
 
93417
- this._notifyChange([...checkedKeys], e);
93638
+ this._adapter.notifySelect(eventKey, targetStatus, data);
93418
93639
 
93419
- if (searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER && inputValue !== '') {
93420
- this._adapter.updateState({
93421
- inputValue: ''
93422
- });
93640
+ this._notifyChange([...checkedKeys], e);
93641
+
93642
+ if (!this._isControlledComponent()) {
93643
+ this._adapter.updateState({
93644
+ checkedKeys,
93645
+ halfCheckedKeys
93646
+ });
93647
+
93648
+ this._adapter.rePositionDropdown();
93649
+ }
93650
+ } else if (checkRelation === 'unRelated') {
93651
+ const newRealCheckedKeys = new set_default.a(realCheckedKeys);
93652
+ let targetStatus;
93653
+
93654
+ if (realCheckedKeys.has(eventKey)) {
93655
+ newRealCheckedKeys.delete(eventKey);
93656
+ targetStatus = false;
93657
+ } else {
93658
+ newRealCheckedKeys.add(eventKey);
93659
+ targetStatus = true;
93660
+ }
93661
+
93662
+ this._adapter.notifySelect(eventKey, targetStatus, data);
93663
+
93664
+ this._notifyChange([...newRealCheckedKeys], e);
93665
+
93666
+ if (!this._isControlledComponent()) {
93667
+ this._adapter.updateState({
93668
+ realCheckedKeys: newRealCheckedKeys
93669
+ });
93670
+
93671
+ this._adapter.rePositionDropdown();
93672
+ }
93423
93673
  }
93424
93674
 
93425
- if (!this._isControlledComponent()) {
93675
+ if (searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER && inputValue !== '') {
93426
93676
  this._adapter.updateState({
93427
- checkedKeys,
93428
- halfCheckedKeys
93677
+ inputValue: ''
93429
93678
  });
93430
-
93431
- this._adapter.rePositionDropdown();
93432
93679
  }
93433
93680
  }
93434
93681
 
@@ -93756,34 +94003,52 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
93756
94003
  this.foundation.handleSelectionEnterPress(e);
93757
94004
  };
93758
94005
 
93759
- this.showClearBtn = () => {
94006
+ this.hasValue = () => {
93760
94007
  const {
93761
- searchPosition
94008
+ multiple,
94009
+ checkRelation
93762
94010
  } = this.props;
93763
94011
  const {
93764
- inputValue
94012
+ realCheckedKeys,
94013
+ checkedKeys,
94014
+ selectedKeys
93765
94015
  } = this.state;
93766
- const triggerSearchHasInputValue = searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER && inputValue;
94016
+ let hasValue = false;
94017
+
94018
+ if (multiple) {
94019
+ if (checkRelation === 'related') {
94020
+ hasValue = Boolean(checkedKeys.size);
94021
+ } else if (checkRelation === 'unRelated') {
94022
+ hasValue = Boolean(realCheckedKeys.size);
94023
+ }
94024
+ } else {
94025
+ hasValue = Boolean(selectedKeys.length);
94026
+ }
94027
+
94028
+ return hasValue;
94029
+ };
94030
+
94031
+ this.showClearBtn = () => {
93767
94032
  const {
93768
94033
  showClear,
93769
94034
  disabled,
93770
- multiple
94035
+ searchPosition
93771
94036
  } = this.props;
93772
94037
  const {
93773
- selectedKeys,
93774
- checkedKeys,
94038
+ inputValue,
93775
94039
  isOpen,
93776
94040
  isHovering
93777
94041
  } = this.state;
93778
- const hasValue = multiple ? Boolean(checkedKeys.size) : Boolean(selectedKeys.length);
93779
- return showClear && (hasValue || triggerSearchHasInputValue) && !disabled && (isOpen || isHovering);
94042
+ const triggerSearchHasInputValue = searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER && inputValue;
94043
+ return showClear && (this.hasValue() || triggerSearchHasInputValue) && !disabled && (isOpen || isHovering);
93780
94044
  };
93781
94045
 
93782
94046
  this.renderTagList = () => {
93783
94047
  const {
93784
94048
  checkedKeys,
93785
94049
  keyEntities,
93786
- disabledKeys
94050
+ disabledKeys,
94051
+ realCheckedKeys
93787
94052
  } = this.state;
93788
94053
  const {
93789
94054
  treeNodeLabelProp,
@@ -93791,13 +94056,21 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
93791
94056
  disabled,
93792
94057
  disableStrictly,
93793
94058
  size,
94059
+ checkRelation,
93794
94060
  renderSelectedItem: propRenderSelectedItem
93795
94061
  } = this.props;
93796
94062
  const renderSelectedItem = isFunction_default()(propRenderSelectedItem) ? propRenderSelectedItem : item => ({
93797
94063
  isRenderInTag: true,
93798
94064
  content: get_default()(item, treeNodeLabelProp, null)
93799
94065
  });
93800
- const renderKeys = normalizeKeyList([...checkedKeys], keyEntities, leafOnly);
94066
+ let renderKeys = [];
94067
+
94068
+ if (checkRelation === 'related') {
94069
+ renderKeys = normalizeKeyList([...checkedKeys], keyEntities, leafOnly);
94070
+ } else if (checkRelation === 'unRelated') {
94071
+ renderKeys = [...realCheckedKeys];
94072
+ }
94073
+
93801
94074
  const tagList = []; // eslint-disable-next-line @typescript-eslint/no-shadow
93802
94075
 
93803
94076
  for_each_default()(renderKeys).call(renderKeys, key => {
@@ -93886,11 +94159,6 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
93886
94159
  searchPosition,
93887
94160
  filterTreeNode
93888
94161
  } = this.props;
93889
- const {
93890
- selectedKeys,
93891
- checkedKeys
93892
- } = this.state;
93893
- const hasValue = multiple ? Boolean(checkedKeys.size) : Boolean(selectedKeys.length);
93894
94162
  const isTriggerPositionSearch = filterTreeNode && searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER; // searchPosition = trigger
93895
94163
 
93896
94164
  if (isTriggerPositionSearch) {
@@ -93898,7 +94166,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
93898
94166
  } // searchPosition = dropdown and single seleciton
93899
94167
 
93900
94168
 
93901
- if (!multiple || !hasValue) {
94169
+ if (!multiple || !this.hasValue()) {
93902
94170
  const renderText = this.foundation.getRenderTextInSingle();
93903
94171
  const spanCls = classnames_default()({
93904
94172
  ["".concat(treeSelect_prefixcls, "-selection-placeholder")]: !renderText
@@ -94155,14 +94423,23 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94155
94423
  size,
94156
94424
  searchAutoFocus,
94157
94425
  placeholder,
94158
- maxTagCount
94426
+ maxTagCount,
94427
+ checkRelation
94159
94428
  } = this.props;
94160
94429
  const {
94161
94430
  keyEntities,
94162
94431
  checkedKeys,
94163
- inputValue
94432
+ inputValue,
94433
+ realCheckedKeys
94164
94434
  } = this.state;
94165
- const keyList = normalizeKeyList(checkedKeys, keyEntities, leafOnly);
94435
+ let keyList = [];
94436
+
94437
+ if (checkRelation === 'related') {
94438
+ keyList = normalizeKeyList(checkedKeys, keyEntities, leafOnly);
94439
+ } else if (checkRelation === 'unRelated') {
94440
+ keyList = [...realCheckedKeys];
94441
+ }
94442
+
94166
94443
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tagInput_0, {
94167
94444
  maxTagCount: maxTagCount,
94168
94445
  disabled: disabled,
@@ -94487,6 +94764,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94487
94764
  selectedKeys: [],
94488
94765
  checkedKeys: new set_default.a(),
94489
94766
  halfCheckedKeys: new set_default.a(),
94767
+ realCheckedKeys: new set_default.a([]),
94490
94768
  disabledKeys: new set_default.a(),
94491
94769
  motionKeys: new set_default.a([]),
94492
94770
  motionType: 'hide',
@@ -94607,12 +94885,16 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94607
94885
  }
94608
94886
 
94609
94887
  if (checkedKeyValues) {
94610
- const {
94611
- checkedKeys,
94612
- halfCheckedKeys
94613
- } = calcCheckedKeys(checkedKeyValues, keyEntities);
94614
- newState.checkedKeys = checkedKeys;
94615
- newState.halfCheckedKeys = halfCheckedKeys;
94888
+ if (props.checkRelation === 'unRelated') {
94889
+ newState.realCheckedKeys = new set_default.a(checkedKeyValues);
94890
+ } else if (props.checkRelation === 'related') {
94891
+ const {
94892
+ checkedKeys,
94893
+ halfCheckedKeys
94894
+ } = calcCheckedKeys(checkedKeyValues, keyEntities);
94895
+ newState.checkedKeys = checkedKeys;
94896
+ newState.halfCheckedKeys = halfCheckedKeys;
94897
+ }
94616
94898
  }
94617
94899
  } // loadedKeys
94618
94900
 
@@ -94627,7 +94909,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
94627
94909
  } // ================ disableStrictly =================
94628
94910
 
94629
94911
 
94630
- if (treeData && props.disableStrictly) {
94912
+ if (treeData && props.disableStrictly && props.checkRelation === 'related') {
94631
94913
  newState.disabledKeys = calcDisabledKeys(keyEntities);
94632
94914
  }
94633
94915
 
@@ -94893,6 +95175,7 @@ treeSelect_TreeSelect.propTypes = {
94893
95175
  optionListStyle: prop_types_default.a.object,
94894
95176
  searchRender: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.bool]),
94895
95177
  renderSelectedItem: prop_types_default.a.func,
95178
+ checkRelation: prop_types_default.a.string,
94896
95179
  'aria-label': prop_types_default.a.string
94897
95180
  };
94898
95181
  treeSelect_TreeSelect.defaultProps = {
@@ -94921,6 +95204,7 @@ treeSelect_TreeSelect.defaultProps = {
94921
95204
  expandAction: false,
94922
95205
  clickToHide: true,
94923
95206
  searchAutoFocus: false,
95207
+ checkRelation: 'related',
94924
95208
  'aria-label': 'TreeSelect'
94925
95209
  };
94926
95210
  /* harmony default export */ var treeSelect_0 = (treeSelect_TreeSelect);
@@ -96492,6 +96776,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96492
96776
  onPreviewClick,
96493
96777
  showPicInfo,
96494
96778
  renderPicInfo,
96779
+ renderPicPreviewIcon,
96495
96780
  renderThumbnail,
96496
96781
  name,
96497
96782
  index
@@ -96499,6 +96784,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96499
96784
  const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
96500
96785
  const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
96501
96786
  const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
96787
+ const showPreview = status === upload_constants_strings.FILE_STATUS_SUCCESS && !this.props.showReplace;
96502
96788
  const filePicCardCls = classnames_default()({
96503
96789
  ["".concat(fileCard_prefixCls, "-picture-file-card")]: true,
96504
96790
  ["".concat(fileCard_prefixCls, "-picture-file-card-disabled")]: disabled,
@@ -96506,7 +96792,6 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96506
96792
  ["".concat(fileCard_prefixCls, "-picture-file-card-error")]: status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL,
96507
96793
  ["".concat(fileCard_prefixCls, "-picture-file-card-uploading")]: showProgress
96508
96794
  });
96509
- const closeCls = "".concat(fileCard_prefixCls, "-picture-file-card-close");
96510
96795
  const retry = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96511
96796
  role: "button",
96512
96797
  tabIndex: 0,
@@ -96529,6 +96814,17 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96529
96814
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ReplaceSvg, {
96530
96815
  className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-replace")
96531
96816
  })));
96817
+ const preview = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96818
+ className: "".concat(fileCard_prefixCls, "-picture-file-card-preview")
96819
+ }, typeof renderPicPreviewIcon === 'function' ? renderPicPreviewIcon(this.props) : null);
96820
+ const close = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96821
+ role: "button",
96822
+ tabIndex: 0,
96823
+ className: "".concat(fileCard_prefixCls, "-picture-file-card-close"),
96824
+ onClick: e => this.onRemove(e)
96825
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, {
96826
+ className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-close")
96827
+ }));
96532
96828
  const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96533
96829
  className: "".concat(fileCard_prefixCls, "-picture-file-card-pic-info")
96534
96830
  }, index + 1);
@@ -96547,14 +96843,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96547
96843
  size: "small",
96548
96844
  orbitStroke: '#FFF',
96549
96845
  "aria-label": "uploading file progress"
96550
- }) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96551
- className: closeCls,
96552
- onClick: e => this.onRemove(e)
96553
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
96554
- tabIndex: 0,
96555
- role: "button",
96556
- size: "extra-small"
96557
- })), this.renderPicValidateMsg());
96846
+ }) : null, showRetry ? retry : null, showReplace && replace, showPreview && preview, showPicInfo && picInfo, !disabled && close, this.renderPicValidateMsg());
96558
96847
  }
96559
96848
 
96560
96849
  renderFile(locale) {
@@ -96569,7 +96858,8 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96569
96858
  previewFile,
96570
96859
  status,
96571
96860
  style,
96572
- onPreviewClick
96861
+ onPreviewClick,
96862
+ renderFileOperation
96573
96863
  } = this.props;
96574
96864
  const fileCardCls = classnames_default()({
96575
96865
  ["".concat(fileCard_prefixCls, "-file-card")]: true,
@@ -96599,6 +96889,14 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96599
96889
  previewContent = previewFile(this.props);
96600
96890
  }
96601
96891
 
96892
+ const operation = typeof renderFileOperation === 'function' ? renderFileOperation(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
96893
+ onClick: e => this.onRemove(e),
96894
+ type: "tertiary",
96895
+ icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
96896
+ theme: "borderless",
96897
+ size: "small",
96898
+ className: closeCls
96899
+ });
96602
96900
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96603
96901
  role: "listitem",
96604
96902
  className: fileCardCls,
@@ -96619,7 +96917,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96619
96917
  position: "top",
96620
96918
  showArrow: false,
96621
96919
  content: locale.replace
96622
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
96920
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
96623
96921
  onClick: e => this.onReplace(e),
96624
96922
  type: "tertiary",
96625
96923
  theme: "borderless",
@@ -96641,29 +96939,22 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
96641
96939
  tabIndex: 0,
96642
96940
  className: "".concat(infoCls, "-retry"),
96643
96941
  onClick: e => this.onRetry(e)
96644
- }, locale.retry) : null)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
96645
- onClick: e => this.onRemove(e),
96646
- type: "tertiary",
96647
- icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
96648
- theme: "borderless",
96649
- size: "small",
96650
- className: closeCls
96651
- }));
96942
+ }, locale.retry) : null)), operation);
96652
96943
  }
96653
96944
 
96654
96945
  onRemove(e) {
96655
96946
  e.stopPropagation();
96656
- this.props.onRemove(this.props, e);
96947
+ this.props.onRemove();
96657
96948
  }
96658
96949
 
96659
96950
  onReplace(e) {
96660
96951
  e.stopPropagation();
96661
- this.props.onReplace(this.props, e);
96952
+ this.props.onReplace();
96662
96953
  }
96663
96954
 
96664
96955
  onRetry(e) {
96665
96956
  e.stopPropagation();
96666
- this.props.onRetry(this.props, e);
96957
+ this.props.onRetry();
96667
96958
  }
96668
96959
 
96669
96960
  render() {
@@ -96727,6 +97018,7 @@ var upload = __webpack_require__("/t7F");
96727
97018
 
96728
97019
 
96729
97020
 
97021
+
96730
97022
  /* eslint-disable max-len */
96731
97023
 
96732
97024
 
@@ -96837,14 +97129,14 @@ class upload_Upload extends baseComponent_BaseComponent {
96837
97129
  previewFile,
96838
97130
  listType,
96839
97131
  itemStyle,
96840
- showRetry,
96841
97132
  showPicInfo,
96842
97133
  renderPicInfo,
97134
+ renderPicPreviewIcon,
97135
+ renderFileOperation,
96843
97136
  renderFileItem,
96844
97137
  renderThumbnail,
96845
97138
  disabled,
96846
- onPreviewClick,
96847
- showReplace
97139
+ onPreviewClick
96848
97140
  } = this.props;
96849
97141
 
96850
97142
  const onRemove = () => this.remove(file);
@@ -96857,20 +97149,20 @@ class upload_Upload extends baseComponent_BaseComponent {
96857
97149
  this.replace(index);
96858
97150
  };
96859
97151
 
96860
- const fileCardProps = assign_default()(assign_default()({}, file), {
97152
+ const fileCardProps = assign_default()(assign_default()(assign_default()({}, pick_default()(this.props, ['showRetry', 'showReplace', ''])), file), {
96861
97153
  previewFile,
96862
97154
  listType,
96863
97155
  onRemove,
96864
97156
  onRetry,
96865
97157
  index,
96866
97158
  key: uid || concat_default()(_context = "".concat(name)).call(_context, index),
96867
- showRetry: typeof file.showRetry !== 'undefined' ? file.showRetry : showRetry,
96868
97159
  style: itemStyle,
96869
97160
  disabled,
96870
97161
  showPicInfo,
96871
97162
  renderPicInfo,
97163
+ renderPicPreviewIcon,
97164
+ renderFileOperation,
96872
97165
  renderThumbnail,
96873
- showReplace: typeof file.showReplace !== 'undefined' ? file.showReplace : showReplace,
96874
97166
  onReplace,
96875
97167
  onPreviewClick: typeof onPreviewClick !== 'undefined' ? () => this.foundation.handlePreviewClick(file) : undefined
96876
97168
  });
@@ -96912,7 +97204,8 @@ class upload_Upload extends baseComponent_BaseComponent {
96912
97204
  limit,
96913
97205
  disabled,
96914
97206
  children,
96915
- draggable
97207
+ draggable,
97208
+ hotSpotLocation
96916
97209
  } = this.props;
96917
97210
  const {
96918
97211
  fileList: stateFileList,
@@ -96970,7 +97263,7 @@ class upload_Upload extends baseComponent_BaseComponent {
96970
97263
  className: mainCls,
96971
97264
  role: "list",
96972
97265
  "aria-label": "picture list"
96973
- }, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList ? addContent : null)));
97266
+ }, showAddTriggerInList && hotSpotLocation === 'start' ? addContent : null, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList && hotSpotLocation === 'end' ? addContent : null)));
96974
97267
  };
96975
97268
 
96976
97269
  this.renderFileListDefault = () => {
@@ -97310,6 +97603,7 @@ upload_Upload.propTypes = {
97310
97603
  fileList: prop_types_default.a.array,
97311
97604
  fileName: prop_types_default.a.string,
97312
97605
  headers: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.func]),
97606
+ hotSpotLocation: prop_types_default.a.oneOf(['start', 'end']),
97313
97607
  itemStyle: prop_types_default.a.object,
97314
97608
  limit: prop_types_default.a.number,
97315
97609
  listType: prop_types_default.a.oneOf(upload_constants_strings.LIST_TYPE),
@@ -97335,6 +97629,8 @@ upload_Upload.propTypes = {
97335
97629
  prompt: prop_types_default.a.node,
97336
97630
  promptPosition: prop_types_default.a.oneOf(upload_constants_strings.PROMPT_POSITION),
97337
97631
  renderFileItem: prop_types_default.a.func,
97632
+ renderPicPreviewIcon: prop_types_default.a.func,
97633
+ renderFileOperation: prop_types_default.a.func,
97338
97634
  renderPicInfo: prop_types_default.a.func,
97339
97635
  renderThumbnail: prop_types_default.a.func,
97340
97636
  showClear: prop_types_default.a.bool,
@@ -97354,6 +97650,7 @@ upload_Upload.defaultProps = {
97354
97650
  defaultFileList: [],
97355
97651
  disabled: false,
97356
97652
  listType: 'list',
97653
+ hotSpotLocation: 'end',
97357
97654
  multiple: false,
97358
97655
  onAcceptInvalid: noop_default.a,
97359
97656
  onChange: noop_default.a,
@@ -100956,7 +101253,7 @@ class foundation_FormFoundation extends foundation {
100956
101253
  } // update formState value
100957
101254
 
100958
101255
 
100959
- updateStateValue(field, value, opts) {
101256
+ updateStateValue(field, value, opts, callback) {
100960
101257
  const notNotify = opts && opts.notNotify;
100961
101258
  const notUpdate = opts && opts.notUpdate;
100962
101259
  const fieldAllowEmpty = opts && opts.fieldAllowEmpty;
@@ -100988,7 +101285,7 @@ class foundation_FormFoundation extends foundation {
100988
101285
  }
100989
101286
 
100990
101287
  if (!notUpdate) {
100991
- this._adapter.forceUpdate();
101288
+ this._adapter.forceUpdate(callback);
100992
101289
  }
100993
101290
  } // get touched from formState
100994
101291
 
@@ -101002,7 +101299,7 @@ class foundation_FormFoundation extends foundation {
101002
101299
  } // update formState touched
101003
101300
 
101004
101301
 
101005
- updateStateTouched(field, isTouched, opts) {
101302
+ updateStateTouched(field, isTouched, opts, callback) {
101006
101303
  const notNotify = opts && opts.notNotify;
101007
101304
  const notUpdate = opts && opts.notUpdate;
101008
101305
  object_set(this.data.touched, field, isTouched);
@@ -101012,7 +101309,7 @@ class foundation_FormFoundation extends foundation {
101012
101309
  }
101013
101310
 
101014
101311
  if (!notUpdate) {
101015
- this._adapter.forceUpdate();
101312
+ this._adapter.forceUpdate(callback);
101016
101313
  }
101017
101314
  } // get error from formState
101018
101315
 
@@ -101026,7 +101323,7 @@ class foundation_FormFoundation extends foundation {
101026
101323
  } // update formState error
101027
101324
 
101028
101325
 
101029
- updateStateError(field, error, opts) {
101326
+ updateStateError(field, error, opts, callback) {
101030
101327
  const notNotify = opts && opts.notNotify;
101031
101328
  const notUpdate = opts && opts.notUpdate;
101032
101329
  object_set(this.data.errors, field, error); // The setError caused by centralized validation does not need to trigger notify, otherwise it will be called too frequently, as many times as there are fields
@@ -101037,7 +101334,7 @@ class foundation_FormFoundation extends foundation {
101037
101334
  }
101038
101335
 
101039
101336
  if (!notUpdate) {
101040
- this._adapter.forceUpdate();
101337
+ this._adapter.forceUpdate(callback);
101041
101338
  }
101042
101339
  } // For internal use in the FormApi Operating Field
101043
101340
 
@@ -101056,22 +101353,21 @@ class foundation_FormFoundation extends foundation {
101056
101353
  // At this time, first modify formState directly, then find out the subordinate fields and drive them to update
101057
101354
  // Eg: peoples: [0, 2, 3]. Each value of the peoples array corresponds to an Input Field
101058
101355
  // When the user directly calls formA pi.set Value ('peoples', [2,3])
101059
- this.updateStateValue(field, newValue, opts);
101060
-
101061
- let nestedFields = this._getNestedField(field);
101062
-
101063
- if (nestedFields.size) {
101064
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101065
- let fieldPath = fieldStaff.field;
101066
- let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
101067
- let nestedBatchUpdateOpts = {
101068
- notNotify: true,
101069
- notUpdate: true
101070
- };
101071
- fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
101072
- });
101073
- } // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
101074
-
101356
+ this.updateStateValue(field, newValue, opts, () => {
101357
+ let nestedFields = this._getNestedField(field);
101358
+
101359
+ if (nestedFields.size) {
101360
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101361
+ let fieldPath = fieldStaff.field;
101362
+ let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
101363
+ let nestedBatchUpdateOpts = {
101364
+ notNotify: true,
101365
+ notUpdate: true
101366
+ };
101367
+ fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
101368
+ });
101369
+ }
101370
+ }); // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
101075
101371
 
101076
101372
  if (this.getArrayField(field)) {
101077
101373
  this.updateArrayField(field, {
@@ -101089,21 +101385,21 @@ class foundation_FormFoundation extends foundation {
101089
101385
  if (fieldApi) {
101090
101386
  fieldApi.setError(newError, opts);
101091
101387
  } else {
101092
- this.updateStateError(field, newError, opts);
101093
-
101094
- let nestedFields = this._getNestedField(field);
101095
-
101096
- if (nestedFields.size) {
101097
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101098
- let fieldPath = fieldStaff.field;
101099
- let newFieldError = object_get(this.data.errors, fieldPath);
101100
- let nestedBatchUpdateOpts = {
101101
- notNotify: true,
101102
- notUpdate: true
101103
- };
101104
- fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
101105
- });
101106
- }
101388
+ this.updateStateError(field, newError, opts, () => {
101389
+ let nestedFields = this._getNestedField(field);
101390
+
101391
+ if (nestedFields.size) {
101392
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101393
+ let fieldPath = fieldStaff.field;
101394
+ let newFieldError = object_get(this.data.errors, fieldPath);
101395
+ let nestedBatchUpdateOpts = {
101396
+ notNotify: true,
101397
+ notUpdate: true
101398
+ };
101399
+ fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
101400
+ });
101401
+ }
101402
+ });
101107
101403
 
101108
101404
  if (this.getArrayField(field)) {
101109
101405
  this.updateArrayField(field, {
@@ -101119,21 +101415,21 @@ class foundation_FormFoundation extends foundation {
101119
101415
  if (fieldApi) {
101120
101416
  fieldApi.setTouched(isTouched, opts);
101121
101417
  } else {
101122
- this.updateStateTouched(field, isTouched, opts);
101123
-
101124
- let nestedFields = this._getNestedField(field);
101125
-
101126
- if (nestedFields.size) {
101127
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101128
- let fieldPath = fieldStaff.field;
101129
- let newFieldTouch = object_get(this.data.touched, fieldPath);
101130
- let nestedBatchUpdateOpts = {
101131
- notNotify: true,
101132
- notUpdate: true
101133
- };
101134
- fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
101135
- });
101136
- }
101418
+ this.updateStateTouched(field, isTouched, opts, () => {
101419
+ let nestedFields = this._getNestedField(field);
101420
+
101421
+ if (nestedFields.size) {
101422
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101423
+ let fieldPath = fieldStaff.field;
101424
+ let newFieldTouch = object_get(this.data.touched, fieldPath);
101425
+ let nestedBatchUpdateOpts = {
101426
+ notNotify: true,
101427
+ notUpdate: true
101428
+ };
101429
+ fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
101430
+ });
101431
+ }
101432
+ });
101137
101433
 
101138
101434
  if (this.getArrayField(field)) {
101139
101435
  this.updateArrayField(field, {
@@ -102491,8 +102787,8 @@ class baseForm_Form extends baseComponent_BaseComponent {
102491
102787
  notifySubmitFail: (errors, values) => {
102492
102788
  this.props.onSubmitFail(errors, values);
102493
102789
  },
102494
- forceUpdate: () => {
102495
- this.forceUpdate();
102790
+ forceUpdate: callback => {
102791
+ this.forceUpdate(callback);
102496
102792
  },
102497
102793
  notifyChange: formState => {
102498
102794
  this.props.onChange(formState);