@douyinfe/semi-ui 2.34.1 → 2.34.2-alpha.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 (73) hide show
  1. package/dist/umd/semi-ui.js +10 -46
  2. package/dist/umd/semi-ui.js.map +1 -1
  3. package/dist/umd/semi-ui.min.js +1 -1
  4. package/dist/umd/semi-ui.min.js.map +1 -1
  5. package/lib/cjs/anchor/index.d.ts +2 -2
  6. package/lib/cjs/autoComplete/index.d.ts +2 -2
  7. package/lib/cjs/button/Button.d.ts +1 -1
  8. package/lib/cjs/button/buttonGroup.d.ts +1 -1
  9. package/lib/cjs/button/index.d.ts +1 -1
  10. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  11. package/lib/cjs/carousel/index.d.ts +2 -2
  12. package/lib/cjs/datePicker/datePicker.d.ts +3 -3
  13. package/lib/cjs/datePicker/datePicker.js +1 -2
  14. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  15. package/lib/cjs/datePicker/quickControl.d.ts +1 -1
  16. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  17. package/lib/cjs/dropdown/index.d.ts +1 -1
  18. package/lib/cjs/form/baseForm.d.ts +4 -4
  19. package/lib/cjs/form/field.d.ts +4 -4
  20. package/lib/cjs/input/index.d.ts +1 -1
  21. package/lib/cjs/input/inputGroup.d.ts +1 -1
  22. package/lib/cjs/modal/confirm.d.ts +36 -36
  23. package/lib/cjs/overflowList/index.d.ts +1 -1
  24. package/lib/cjs/popover/index.d.ts +1 -1
  25. package/lib/cjs/radio/radio.d.ts +1 -1
  26. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  27. package/lib/cjs/rating/index.d.ts +1 -1
  28. package/lib/cjs/rating/item.d.ts +1 -1
  29. package/lib/cjs/select/index.d.ts +1 -1
  30. package/lib/cjs/switch/index.d.ts +1 -1
  31. package/lib/cjs/table/Table.d.ts +3 -3
  32. package/lib/cjs/table/index.d.ts +1 -1
  33. package/lib/cjs/tagInput/index.d.ts +1 -1
  34. package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
  35. package/lib/cjs/timePicker/index.d.ts +1 -1
  36. package/lib/cjs/tooltip/index.d.ts +1 -1
  37. package/lib/cjs/typography/numeral.d.ts +1 -1
  38. package/lib/cjs/typography/title.d.ts +1 -1
  39. package/lib/es/anchor/index.d.ts +2 -2
  40. package/lib/es/autoComplete/index.d.ts +2 -2
  41. package/lib/es/button/Button.d.ts +1 -1
  42. package/lib/es/button/buttonGroup.d.ts +1 -1
  43. package/lib/es/button/index.d.ts +1 -1
  44. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  45. package/lib/es/carousel/index.d.ts +2 -2
  46. package/lib/es/datePicker/datePicker.d.ts +3 -3
  47. package/lib/es/datePicker/datePicker.js +1 -2
  48. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  49. package/lib/es/datePicker/quickControl.d.ts +1 -1
  50. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  51. package/lib/es/dropdown/index.d.ts +1 -1
  52. package/lib/es/form/baseForm.d.ts +4 -4
  53. package/lib/es/form/field.d.ts +4 -4
  54. package/lib/es/input/index.d.ts +1 -1
  55. package/lib/es/input/inputGroup.d.ts +1 -1
  56. package/lib/es/modal/confirm.d.ts +36 -36
  57. package/lib/es/overflowList/index.d.ts +1 -1
  58. package/lib/es/popover/index.d.ts +1 -1
  59. package/lib/es/radio/radio.d.ts +1 -1
  60. package/lib/es/radio/radioGroup.d.ts +1 -1
  61. package/lib/es/rating/index.d.ts +1 -1
  62. package/lib/es/rating/item.d.ts +1 -1
  63. package/lib/es/select/index.d.ts +1 -1
  64. package/lib/es/switch/index.d.ts +1 -1
  65. package/lib/es/table/Table.d.ts +3 -3
  66. package/lib/es/table/index.d.ts +1 -1
  67. package/lib/es/tagInput/index.d.ts +1 -1
  68. package/lib/es/timePicker/TimePicker.d.ts +1 -1
  69. package/lib/es/timePicker/index.d.ts +1 -1
  70. package/lib/es/tooltip/index.d.ts +1 -1
  71. package/lib/es/typography/numeral.d.ts +1 -1
  72. package/lib/es/typography/title.d.ts +1 -1
  73. package/package.json +8 -8
@@ -53471,41 +53471,6 @@ class DatePickerFoundation extends foundation {
53471
53471
  this._adapter.notifyOpenChange(true);
53472
53472
  }
53473
53473
  }
53474
- /**
53475
- * @deprecated
53476
- * do these side effects when type is dateRange or dateTimeRange
53477
- * 1. trigger input blur, if input value is invalid, set input value and state value to previous status
53478
- * 2. set cachedSelectedValue using given dates(in needConfirm mode)
53479
- * - directly closePanel without click confirm will set cachedSelectedValue to state value
53480
- * - select one date(which means that the selection value is incomplete) and click confirm also set cachedSelectedValue to state value
53481
- */
53482
- // rangeTypeSideEffectsWhenClosePanel(inputValue: string, willUpdateDates: Date[]) {
53483
- // if (this._isRangeType()) {
53484
- // this._adapter.setRangeInputFocus(false);
53485
- // /**
53486
- // * inputValue is string when it is not disabled or can't parsed
53487
- // * when inputValue is null, picker value will back to last selected value
53488
- // */
53489
- // this.handleInputBlur(inputValue);
53490
- // this.resetCachedSelectedValue(willUpdateDates);
53491
- // }
53492
- // }
53493
-
53494
- /**
53495
- * @deprecated
53496
- * clear input value when selected date is not confirmed
53497
- */
53498
- // needConfirmSideEffectsWhenClosePanel(willUpdateDates: Date[] | null | undefined) {
53499
- // if (this._adapter.needConfirm() && !this._isRangeType()) {
53500
- // /**
53501
- // * if `null` input element will show `cachedSelectedValue` formatted value(format in DateInput render)
53502
- // * if `` input element will show `` directly
53503
- // */
53504
- // this._adapter.updateInputValue(null);
53505
- // this.resetCachedSelectedValue(willUpdateDates);
53506
- // }
53507
- // }
53508
-
53509
53474
  /**
53510
53475
  * clear inset input value when close panel
53511
53476
  */
@@ -54531,40 +54496,40 @@ class DatePickerFoundation extends foundation {
54531
54496
  }
54532
54497
  /**
54533
54498
  * Get the date changed through the date panel or enter
54534
- * @param {Date[]} dates
54535
- * @returns {Date[]}
54536
54499
  */
54537
54500
 
54538
54501
 
54539
54502
  _getChangedDates(dates) {
54540
54503
  const type = this._adapter.getProp('type');
54541
54504
 
54542
- const stateValue = this._adapter.getState('value');
54505
+ const {
54506
+ cachedSelectedValue: lastDate
54507
+ } = this._adapter.getStates();
54543
54508
 
54544
54509
  const changedDates = [];
54545
54510
 
54546
54511
  switch (type) {
54547
54512
  case 'dateRange':
54548
54513
  case 'dateTimeRange':
54549
- const [stateStart, stateEnd] = stateValue;
54514
+ const [lastStart, lastEnd] = lastDate;
54550
54515
  const [start, end] = dates;
54551
54516
 
54552
- if (!isEqual_isEqual(start, stateStart)) {
54517
+ if (!isEqual_isEqual(start, lastStart)) {
54553
54518
  changedDates.push(start);
54554
54519
  }
54555
54520
 
54556
- if (!isEqual_isEqual(end, stateEnd)) {
54521
+ if (!isEqual_isEqual(end, lastEnd)) {
54557
54522
  changedDates.push(end);
54558
54523
  }
54559
54524
 
54560
54525
  break;
54561
54526
 
54562
54527
  default:
54563
- const stateValueSet = new Set();
54564
- stateValue.forEach(value => stateValueSet.add(isDate(value) && value.valueOf()));
54528
+ const lastValueSet = new Set();
54529
+ lastDate.forEach(value => lastValueSet.add(isDate(value) && value.valueOf()));
54565
54530
 
54566
54531
  for (const date of dates) {
54567
- if (!stateValueSet.has(isDate(date) && date.valueOf())) {
54532
+ if (!lastValueSet.has(isDate(date) && date.valueOf())) {
54568
54533
  changedDates.push(date);
54569
54534
  }
54570
54535
  }
@@ -64173,14 +64138,13 @@ class DatePicker extends BaseComponent {
64173
64138
  isRange: false,
64174
64139
  inputValue: null,
64175
64140
  value: [],
64176
- cachedSelectedValue: null,
64141
+ cachedSelectedValue: [],
64177
64142
  prevTimeZone: null,
64178
64143
  rangeInputFocus: undefined,
64179
64144
  autofocus: props.autoFocus || this.isRangeType(props.type, props.triggerRender) && (props.open || props.defaultOpen),
64180
64145
  insetInputValue: null,
64181
64146
  triggerDisabled: undefined
64182
64147
  };
64183
- this.adapter.setCache('cachedSelectedValue', null);
64184
64148
  this.triggerElRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();
64185
64149
  this.panelRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();
64186
64150
  this.monthGrid = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();