@douyinfe/semi-ui 2.52.0-beta.1 → 2.52.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.
@@ -191,9 +191,10 @@ declare class Cascader extends BaseComponent<CascaderProps, CascaderState> {
191
191
  componentWillUnmount(): void;
192
192
  componentDidUpdate(prevProps: CascaderProps): void;
193
193
  handleInputChange: (value: string) => void;
194
- handleTagRemove: (e: any, tagValuePath: Array<string | number>) => void;
195
- handleRemoveByKey: (key: any) => void;
194
+ handleTagRemoveInTrigger: (pos: string) => void;
195
+ handleTagClose: (tagChildren: React.ReactNode, e: React.MouseEvent<HTMLElement>, tagKey: string | number) => void;
196
196
  renderTagItem: (nodeKey: string, idx: number) => string | number | boolean | React.ReactFragment | JSX.Element;
197
+ onRemoveInTagInput: (v: string) => void;
197
198
  renderTagInput(): JSX.Element;
198
199
  renderInput(): JSX.Element;
199
200
  handleItemClick: (e: MouseEvent | KeyboardEvent, item: Entity | Data) => void;
@@ -43,14 +43,13 @@ class Cascader extends _baseComponent.default {
43
43
  this.handleInputChange = value => {
44
44
  this.foundation.handleInputChange(value);
45
45
  };
46
- this.handleTagRemove = (e, tagValuePath) => {
47
- this.foundation.handleTagRemove(e, tagValuePath);
46
+ this.handleTagRemoveInTrigger = pos => {
47
+ this.foundation.handleTagRemoveInTrigger(pos);
48
48
  };
49
- this.handleRemoveByKey = key => {
50
- const {
51
- keyEntities
52
- } = this.state;
53
- this.handleTagRemove(null, keyEntities[key].valuePath);
49
+ this.handleTagClose = (tagChildren, e, tagKey) => {
50
+ // When value has not changed, prevent clicking tag closeBtn to close tag
51
+ e.preventDefault();
52
+ this.foundation.handleTagRemoveByKey(tagKey);
54
53
  };
55
54
  this.renderTagItem = (nodeKey, idx) => {
56
55
  const {
@@ -78,18 +77,18 @@ class Cascader extends _baseComponent.default {
78
77
  size: size === 'default' ? 'large' : size,
79
78
  key: `tag-${nodeKey}-${idx}`,
80
79
  color: "white",
80
+ tagKey: nodeKey,
81
81
  className: tagCls,
82
82
  closable: true,
83
- onClose: (tagChildren, e) => {
84
- // When value has not changed, prevent clicking tag closeBtn to close tag
85
- e.preventDefault();
86
- this.handleTagRemove(e, keyEntities[nodeKey].valuePath);
87
- }
83
+ onClose: this.handleTagClose
88
84
  }, keyEntities[nodeKey].data[displayProp]);
89
85
  }
90
86
  }
91
87
  return null;
92
88
  };
89
+ this.onRemoveInTagInput = v => {
90
+ this.foundation.handleTagRemoveByKey(v);
91
+ };
93
92
  this.handleItemClick = (e, item) => {
94
93
  this.foundation.handleItemClick(e, item);
95
94
  };
@@ -289,6 +288,7 @@ class Cascader extends _baseComponent.default {
289
288
  }, labelNode);
290
289
  };
291
290
  this.renderCustomTrigger = () => {
291
+ var _a;
292
292
  const {
293
293
  disabled,
294
294
  triggerRender,
@@ -299,17 +299,26 @@ class Cascader extends _baseComponent.default {
299
299
  inputValue,
300
300
  inputPlaceHolder,
301
301
  resolvedCheckedKeys,
302
- checkedKeys
302
+ checkedKeys,
303
+ keyEntities
303
304
  } = this.state;
304
305
  let realValue;
305
306
  if (multiple) {
306
307
  if (this.mergeType === _constants.strings.NONE_MERGE_TYPE) {
307
- realValue = checkedKeys;
308
+ realValue = new Set();
309
+ checkedKeys.forEach(key => {
310
+ var _a;
311
+ realValue.add((_a = keyEntities[key]) === null || _a === void 0 ? void 0 : _a.pos);
312
+ });
308
313
  } else {
309
- realValue = resolvedCheckedKeys;
314
+ realValue = new Set();
315
+ resolvedCheckedKeys.forEach(key => {
316
+ var _a;
317
+ realValue.add((_a = keyEntities[key]) === null || _a === void 0 ? void 0 : _a.pos);
318
+ });
310
319
  }
311
320
  } else {
312
- realValue = [...selectedKeys][0];
321
+ realValue = (_a = keyEntities[[...selectedKeys][0]]) === null || _a === void 0 ? void 0 : _a.pos;
313
322
  }
314
323
  return /*#__PURE__*/_react.default.createElement(_trigger.default, {
315
324
  value: realValue,
@@ -322,7 +331,7 @@ class Cascader extends _baseComponent.default {
322
331
  componentName: 'Cascader',
323
332
  componentProps: Object.assign({}, this.props),
324
333
  onSearch: this.handleInputChange,
325
- onRemove: this.handleRemoveByKey
334
+ onRemove: this.handleTagRemoveInTrigger
326
335
  });
327
336
  };
328
337
  this.handleMouseOver = () => {
@@ -353,11 +362,12 @@ class Cascader extends _baseComponent.default {
353
362
  selectedKeys,
354
363
  isOpen,
355
364
  isHovering,
356
- checkedKeys
365
+ checkedKeys,
366
+ inputValue
357
367
  } = this.state;
358
368
  const hasValue = selectedKeys.size;
359
369
  const multipleWithHaveValue = multiple && checkedKeys.size;
360
- return showClear && (hasValue || multipleWithHaveValue) && !disabled && (isOpen || isHovering);
370
+ return showClear && (inputValue || hasValue || multipleWithHaveValue) && !disabled && (isOpen || isHovering);
361
371
  };
362
372
  this.renderClearBtn = () => {
363
373
  const clearCls = (0, _classnames.default)(`${prefixcls}-clearbtn`);
@@ -806,11 +816,11 @@ class Cascader extends _baseComponent.default {
806
816
  showRestTagsPopover: showRestTagsPopover,
807
817
  restTagsPopoverProps: restTagsPopoverProps,
808
818
  maxTagCount: maxTagCount,
809
- renderTagItem: (value, index) => this.renderTagItem(value, index),
819
+ renderTagItem: this.renderTagItem,
810
820
  inputValue: inputValue,
811
821
  onInputChange: this.handleInputChange,
812
822
  // TODO Modify logic, not modify type
813
- onRemove: v => this.handleTagRemove(null, v),
823
+ onRemove: this.onRemoveInTagInput,
814
824
  placeholder: placeholder,
815
825
  expandRestTagsOnClick: false
816
826
  });
@@ -471,7 +471,7 @@ class DatePicker extends _baseComponent.default {
471
471
  return /range/i.test(type) && !(0, _isFunction2.default)(triggerRender);
472
472
  }
473
473
  componentDidUpdate(prevProps) {
474
- if (prevProps.value !== this.props.value) {
474
+ if (!(0, _isEqual2.default)(prevProps.value, this.props.value)) {
475
475
  this.foundation.initFromProps(Object.assign({}, this.props));
476
476
  } else if (this.props.timeZone !== prevProps.timeZone) {
477
477
  this.foundation.initFromProps({
@@ -48,16 +48,6 @@ class YearAndMonth extends _baseComponent.default {
48
48
  currentYear,
49
49
  currentMonth
50
50
  } = props;
51
- const currentLeftYear = currentYear.left || now.getFullYear();
52
- const currentLeftMonth = currentMonth.left || now.getMonth() + 1;
53
- currentYear = {
54
- left: currentLeftYear,
55
- right: currentLeftYear
56
- };
57
- currentMonth = {
58
- left: currentLeftMonth,
59
- right: currentMonth.right || currentLeftMonth + 1
60
- };
61
51
  this.state = {
62
52
  years: (0, _index2.getYears)(props.startYear, props.endYear).map(year => ({
63
53
  value: year,
@@ -67,8 +57,14 @@ class YearAndMonth extends _baseComponent.default {
67
57
  value: idx + 1,
68
58
  month: idx + 1
69
59
  })),
70
- currentYear,
71
- currentMonth
60
+ currentYear: {
61
+ left: currentYear.left || now.getFullYear(),
62
+ right: currentYear.right || now.getFullYear()
63
+ },
64
+ currentMonth: {
65
+ left: currentMonth.left || now.getMonth() + 1,
66
+ right: currentMonth.right || now.getMonth() + 2
67
+ }
72
68
  };
73
69
  this.yearRef = /*#__PURE__*/_react.default.createRef();
74
70
  this.monthRef = /*#__PURE__*/_react.default.createRef();
@@ -105,11 +101,19 @@ class YearAndMonth extends _baseComponent.default {
105
101
  }
106
102
  static getDerivedStateFromProps(props, state) {
107
103
  const willUpdateStates = {};
108
- if (!(0, _isEqual2.default)(props.currentYear, state.currentYear) && props.currentYear.left !== 0) {
109
- willUpdateStates.currentYear = props.currentYear;
104
+ if (!(0, _isEqual2.default)(props.currentYear, state.currentYear)) {
105
+ const nowYear = new Date().getFullYear();
106
+ willUpdateStates.currentYear = {
107
+ left: props.currentYear.left || nowYear,
108
+ right: props.currentYear.right || nowYear
109
+ };
110
110
  }
111
- if (!(0, _isEqual2.default)(props.currentMonth, state.currentMonth) && props.currentMonth.left !== 0) {
112
- willUpdateStates.currentMonth = props.currentMonth;
111
+ if (!(0, _isEqual2.default)(props.currentMonth, state.currentMonth)) {
112
+ const nowMonth = new Date().getMonth();
113
+ willUpdateStates.currentMonth = {
114
+ left: props.currentMonth.left || nowMonth + 1,
115
+ right: props.currentMonth.right || nowMonth + 2
116
+ };
113
117
  }
114
118
  return willUpdateStates;
115
119
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { WithFieldOption } from '@douyinfe/semi-foundation/lib/cjs/form/interface';
3
- import { CommonFieldProps, CommonexcludeType } from '../interface';
4
- import { Subtract } from 'utility-types';
2
+ import type { WithFieldOption } from '@douyinfe/semi-foundation/lib/cjs/form/interface';
3
+ import type { CommonFieldProps, CommonexcludeType } from '../interface';
4
+ import type { Subtract } from 'utility-types';
5
5
  /**
6
6
  * withFiled is used to inject components
7
7
  * 1. Takes over the value and onChange of the component and synchronizes them to Form Foundation
@@ -36,6 +36,7 @@ exports.destroyFns = destroyFns;
36
36
  class Modal extends _baseComponent.default {
37
37
  constructor(props) {
38
38
  super(props);
39
+ this.bodyOverflow = null;
39
40
  this.handleCancel = e => {
40
41
  this.foundation.handleCancel(e);
41
42
  };
@@ -182,7 +183,6 @@ class Modal extends _baseComponent.default {
182
183
  };
183
184
  this.foundation = new _modalFoundation.default(this.adapter);
184
185
  this.modalRef = /*#__PURE__*/_react.default.createRef();
185
- this.bodyOverflow = '';
186
186
  this.scrollBarWidth = 0;
187
187
  this.originBodyWidth = '100%';
188
188
  }
@@ -203,7 +203,7 @@ class Modal extends _baseComponent.default {
203
203
  const {
204
204
  getPopupContainer
205
205
  } = this.props;
206
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
206
+ if (!getPopupContainer && this.bodyOverflow !== null && this.bodyOverflow !== 'hidden') {
207
207
  document.body.style.overflow = this.bodyOverflow;
208
208
  document.body.style.width = this.originBodyWidth;
209
209
  }
@@ -110,7 +110,8 @@ class Option extends _react.PureComponent {
110
110
  value,
111
111
  label,
112
112
  children
113
- }, rest), e)
113
+ }, rest), e),
114
+ className
114
115
  }, rest));
115
116
  }
116
117
  const config = {
@@ -67,7 +67,7 @@ const ResizableTable = function () {
67
67
  width: _constants.numbers.DEFAULT_WIDTH_COLUMN_EXPAND
68
68
  });
69
69
  }
70
- if (props.rowSelection && !(0, _find2.default)(rawColumns, item => item.key === _constants.strings.DEFAULT_KEY_COLUMN_SELECTION)) {
70
+ if (props.rowSelection && !(0, _get2.default)(props.rowSelection, 'hidden') && !(0, _find2.default)(rawColumns, item => item.key === _constants.strings.DEFAULT_KEY_COLUMN_SELECTION)) {
71
71
  newColumns.unshift({
72
72
  width: (0, _get2.default)(props, 'rowSelection.width', _constants.numbers.DEFAULT_WIDTH_COLUMN_SELECTION),
73
73
  key: _constants.strings.DEFAULT_KEY_COLUMN_SELECTION
@@ -12,7 +12,7 @@ export interface Panel {
12
12
  panelHeader?: React.ReactNode | React.ReactNode[];
13
13
  panelFooter?: React.ReactNode | React.ReactNode[];
14
14
  }
15
- export type BaseValueType = string | number | Date;
15
+ export type BaseValueType = string | number | Date | undefined;
16
16
  export type Type = 'time' | 'timeRange';
17
17
  export type TimePickerProps = {
18
18
  'aria-describedby'?: React.AriaAttributes['aria-describedby'];
@@ -191,9 +191,10 @@ declare class Cascader extends BaseComponent<CascaderProps, CascaderState> {
191
191
  componentWillUnmount(): void;
192
192
  componentDidUpdate(prevProps: CascaderProps): void;
193
193
  handleInputChange: (value: string) => void;
194
- handleTagRemove: (e: any, tagValuePath: Array<string | number>) => void;
195
- handleRemoveByKey: (key: any) => void;
194
+ handleTagRemoveInTrigger: (pos: string) => void;
195
+ handleTagClose: (tagChildren: React.ReactNode, e: React.MouseEvent<HTMLElement>, tagKey: string | number) => void;
196
196
  renderTagItem: (nodeKey: string, idx: number) => string | number | boolean | React.ReactFragment | JSX.Element;
197
+ onRemoveInTagInput: (v: string) => void;
197
198
  renderTagInput(): JSX.Element;
198
199
  renderInput(): JSX.Element;
199
200
  handleItemClick: (e: MouseEvent | KeyboardEvent, item: Entity | Data) => void;
@@ -34,14 +34,13 @@ class Cascader extends BaseComponent {
34
34
  this.handleInputChange = value => {
35
35
  this.foundation.handleInputChange(value);
36
36
  };
37
- this.handleTagRemove = (e, tagValuePath) => {
38
- this.foundation.handleTagRemove(e, tagValuePath);
37
+ this.handleTagRemoveInTrigger = pos => {
38
+ this.foundation.handleTagRemoveInTrigger(pos);
39
39
  };
40
- this.handleRemoveByKey = key => {
41
- const {
42
- keyEntities
43
- } = this.state;
44
- this.handleTagRemove(null, keyEntities[key].valuePath);
40
+ this.handleTagClose = (tagChildren, e, tagKey) => {
41
+ // When value has not changed, prevent clicking tag closeBtn to close tag
42
+ e.preventDefault();
43
+ this.foundation.handleTagRemoveByKey(tagKey);
45
44
  };
46
45
  this.renderTagItem = (nodeKey, idx) => {
47
46
  const {
@@ -69,18 +68,18 @@ class Cascader extends BaseComponent {
69
68
  size: size === 'default' ? 'large' : size,
70
69
  key: `tag-${nodeKey}-${idx}`,
71
70
  color: "white",
71
+ tagKey: nodeKey,
72
72
  className: tagCls,
73
73
  closable: true,
74
- onClose: (tagChildren, e) => {
75
- // When value has not changed, prevent clicking tag closeBtn to close tag
76
- e.preventDefault();
77
- this.handleTagRemove(e, keyEntities[nodeKey].valuePath);
78
- }
74
+ onClose: this.handleTagClose
79
75
  }, keyEntities[nodeKey].data[displayProp]);
80
76
  }
81
77
  }
82
78
  return null;
83
79
  };
80
+ this.onRemoveInTagInput = v => {
81
+ this.foundation.handleTagRemoveByKey(v);
82
+ };
84
83
  this.handleItemClick = (e, item) => {
85
84
  this.foundation.handleItemClick(e, item);
86
85
  };
@@ -280,6 +279,7 @@ class Cascader extends BaseComponent {
280
279
  }, labelNode);
281
280
  };
282
281
  this.renderCustomTrigger = () => {
282
+ var _a;
283
283
  const {
284
284
  disabled,
285
285
  triggerRender,
@@ -290,17 +290,26 @@ class Cascader extends BaseComponent {
290
290
  inputValue,
291
291
  inputPlaceHolder,
292
292
  resolvedCheckedKeys,
293
- checkedKeys
293
+ checkedKeys,
294
+ keyEntities
294
295
  } = this.state;
295
296
  let realValue;
296
297
  if (multiple) {
297
298
  if (this.mergeType === strings.NONE_MERGE_TYPE) {
298
- realValue = checkedKeys;
299
+ realValue = new Set();
300
+ checkedKeys.forEach(key => {
301
+ var _a;
302
+ realValue.add((_a = keyEntities[key]) === null || _a === void 0 ? void 0 : _a.pos);
303
+ });
299
304
  } else {
300
- realValue = resolvedCheckedKeys;
305
+ realValue = new Set();
306
+ resolvedCheckedKeys.forEach(key => {
307
+ var _a;
308
+ realValue.add((_a = keyEntities[key]) === null || _a === void 0 ? void 0 : _a.pos);
309
+ });
301
310
  }
302
311
  } else {
303
- realValue = [...selectedKeys][0];
312
+ realValue = (_a = keyEntities[[...selectedKeys][0]]) === null || _a === void 0 ? void 0 : _a.pos;
304
313
  }
305
314
  return /*#__PURE__*/React.createElement(Trigger, {
306
315
  value: realValue,
@@ -313,7 +322,7 @@ class Cascader extends BaseComponent {
313
322
  componentName: 'Cascader',
314
323
  componentProps: Object.assign({}, this.props),
315
324
  onSearch: this.handleInputChange,
316
- onRemove: this.handleRemoveByKey
325
+ onRemove: this.handleTagRemoveInTrigger
317
326
  });
318
327
  };
319
328
  this.handleMouseOver = () => {
@@ -344,11 +353,12 @@ class Cascader extends BaseComponent {
344
353
  selectedKeys,
345
354
  isOpen,
346
355
  isHovering,
347
- checkedKeys
356
+ checkedKeys,
357
+ inputValue
348
358
  } = this.state;
349
359
  const hasValue = selectedKeys.size;
350
360
  const multipleWithHaveValue = multiple && checkedKeys.size;
351
- return showClear && (hasValue || multipleWithHaveValue) && !disabled && (isOpen || isHovering);
361
+ return showClear && (inputValue || hasValue || multipleWithHaveValue) && !disabled && (isOpen || isHovering);
352
362
  };
353
363
  this.renderClearBtn = () => {
354
364
  const clearCls = cls(`${prefixcls}-clearbtn`);
@@ -797,11 +807,11 @@ class Cascader extends BaseComponent {
797
807
  showRestTagsPopover: showRestTagsPopover,
798
808
  restTagsPopoverProps: restTagsPopoverProps,
799
809
  maxTagCount: maxTagCount,
800
- renderTagItem: (value, index) => this.renderTagItem(value, index),
810
+ renderTagItem: this.renderTagItem,
801
811
  inputValue: inputValue,
802
812
  onInputChange: this.handleInputChange,
803
813
  // TODO Modify logic, not modify type
804
- onRemove: v => this.handleTagRemove(null, v),
814
+ onRemove: this.onRemoveInTagInput,
805
815
  placeholder: placeholder,
806
816
  expandRestTagsOnClick: false
807
817
  });
@@ -463,7 +463,7 @@ export default class DatePicker extends BaseComponent {
463
463
  return /range/i.test(type) && !_isFunction(triggerRender);
464
464
  }
465
465
  componentDidUpdate(prevProps) {
466
- if (prevProps.value !== this.props.value) {
466
+ if (!_isEqual(prevProps.value, this.props.value)) {
467
467
  this.foundation.initFromProps(Object.assign({}, this.props));
468
468
  } else if (this.props.timeZone !== prevProps.timeZone) {
469
469
  this.foundation.initFromProps({
@@ -41,16 +41,6 @@ class YearAndMonth extends BaseComponent {
41
41
  currentYear,
42
42
  currentMonth
43
43
  } = props;
44
- const currentLeftYear = currentYear.left || now.getFullYear();
45
- const currentLeftMonth = currentMonth.left || now.getMonth() + 1;
46
- currentYear = {
47
- left: currentLeftYear,
48
- right: currentLeftYear
49
- };
50
- currentMonth = {
51
- left: currentLeftMonth,
52
- right: currentMonth.right || currentLeftMonth + 1
53
- };
54
44
  this.state = {
55
45
  years: getYears(props.startYear, props.endYear).map(year => ({
56
46
  value: year,
@@ -60,8 +50,14 @@ class YearAndMonth extends BaseComponent {
60
50
  value: idx + 1,
61
51
  month: idx + 1
62
52
  })),
63
- currentYear,
64
- currentMonth
53
+ currentYear: {
54
+ left: currentYear.left || now.getFullYear(),
55
+ right: currentYear.right || now.getFullYear()
56
+ },
57
+ currentMonth: {
58
+ left: currentMonth.left || now.getMonth() + 1,
59
+ right: currentMonth.right || now.getMonth() + 2
60
+ }
65
61
  };
66
62
  this.yearRef = /*#__PURE__*/React.createRef();
67
63
  this.monthRef = /*#__PURE__*/React.createRef();
@@ -98,11 +94,19 @@ class YearAndMonth extends BaseComponent {
98
94
  }
99
95
  static getDerivedStateFromProps(props, state) {
100
96
  const willUpdateStates = {};
101
- if (!_isEqual(props.currentYear, state.currentYear) && props.currentYear.left !== 0) {
102
- willUpdateStates.currentYear = props.currentYear;
97
+ if (!_isEqual(props.currentYear, state.currentYear)) {
98
+ const nowYear = new Date().getFullYear();
99
+ willUpdateStates.currentYear = {
100
+ left: props.currentYear.left || nowYear,
101
+ right: props.currentYear.right || nowYear
102
+ };
103
103
  }
104
- if (!_isEqual(props.currentMonth, state.currentMonth) && props.currentMonth.left !== 0) {
105
- willUpdateStates.currentMonth = props.currentMonth;
104
+ if (!_isEqual(props.currentMonth, state.currentMonth)) {
105
+ const nowMonth = new Date().getMonth();
106
+ willUpdateStates.currentMonth = {
107
+ left: props.currentMonth.left || nowMonth + 1,
108
+ right: props.currentMonth.right || nowMonth + 2
109
+ };
106
110
  }
107
111
  return willUpdateStates;
108
112
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { WithFieldOption } from '@douyinfe/semi-foundation/lib/es/form/interface';
3
- import { CommonFieldProps, CommonexcludeType } from '../interface';
4
- import { Subtract } from 'utility-types';
2
+ import type { WithFieldOption } from '@douyinfe/semi-foundation/lib/es/form/interface';
3
+ import type { CommonFieldProps, CommonexcludeType } from '../interface';
4
+ import type { Subtract } from 'utility-types';
5
5
  /**
6
6
  * withFiled is used to inject components
7
7
  * 1. Takes over the value and onChange of the component and synchronizes them to Form Foundation
@@ -26,6 +26,7 @@ export const destroyFns = [];
26
26
  class Modal extends BaseComponent {
27
27
  constructor(props) {
28
28
  super(props);
29
+ this.bodyOverflow = null;
29
30
  this.handleCancel = e => {
30
31
  this.foundation.handleCancel(e);
31
32
  };
@@ -172,7 +173,6 @@ class Modal extends BaseComponent {
172
173
  };
173
174
  this.foundation = new ModalFoundation(this.adapter);
174
175
  this.modalRef = /*#__PURE__*/React.createRef();
175
- this.bodyOverflow = '';
176
176
  this.scrollBarWidth = 0;
177
177
  this.originBodyWidth = '100%';
178
178
  }
@@ -193,7 +193,7 @@ class Modal extends BaseComponent {
193
193
  const {
194
194
  getPopupContainer
195
195
  } = this.props;
196
- if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
196
+ if (!getPopupContainer && this.bodyOverflow !== null && this.bodyOverflow !== 'hidden') {
197
197
  document.body.style.overflow = this.bodyOverflow;
198
198
  document.body.style.width = this.originBodyWidth;
199
199
  }
@@ -101,7 +101,8 @@ class Option extends PureComponent {
101
101
  value,
102
102
  label,
103
103
  children
104
- }, rest), e)
104
+ }, rest), e),
105
+ className
105
106
  }, rest));
106
107
  }
107
108
  const config = {
@@ -57,7 +57,7 @@ const ResizableTable = function () {
57
57
  width: numbers.DEFAULT_WIDTH_COLUMN_EXPAND
58
58
  });
59
59
  }
60
- if (props.rowSelection && !_find(rawColumns, item => item.key === strings.DEFAULT_KEY_COLUMN_SELECTION)) {
60
+ if (props.rowSelection && !_get(props.rowSelection, 'hidden') && !_find(rawColumns, item => item.key === strings.DEFAULT_KEY_COLUMN_SELECTION)) {
61
61
  newColumns.unshift({
62
62
  width: _get(props, 'rowSelection.width', numbers.DEFAULT_WIDTH_COLUMN_SELECTION),
63
63
  key: strings.DEFAULT_KEY_COLUMN_SELECTION
@@ -12,7 +12,7 @@ export interface Panel {
12
12
  panelHeader?: React.ReactNode | React.ReactNode[];
13
13
  panelFooter?: React.ReactNode | React.ReactNode[];
14
14
  }
15
- export type BaseValueType = string | number | Date;
15
+ export type BaseValueType = string | number | Date | undefined;
16
16
  export type Type = 'time' | 'timeRange';
17
17
  export type TimePickerProps = {
18
18
  'aria-describedby'?: React.AriaAttributes['aria-describedby'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.52.0-beta.1",
3
+ "version": "2.52.0",
4
4
  "description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -20,12 +20,12 @@
20
20
  "@dnd-kit/core": "^6.0.8",
21
21
  "@dnd-kit/sortable": "^7.0.2",
22
22
  "@dnd-kit/utilities": "^3.2.1",
23
- "@douyinfe/semi-animation": "2.52.0-beta.1",
24
- "@douyinfe/semi-animation-react": "2.52.0-beta.1",
25
- "@douyinfe/semi-foundation": "2.52.0-beta.1",
26
- "@douyinfe/semi-icons": "2.52.0-beta.1",
27
- "@douyinfe/semi-illustrations": "2.52.0-beta.1",
28
- "@douyinfe/semi-theme-default": "2.52.0-beta.1",
23
+ "@douyinfe/semi-animation": "2.52.0",
24
+ "@douyinfe/semi-animation-react": "2.52.0",
25
+ "@douyinfe/semi-foundation": "2.52.0",
26
+ "@douyinfe/semi-icons": "2.52.0",
27
+ "@douyinfe/semi-illustrations": "2.52.0",
28
+ "@douyinfe/semi-theme-default": "2.52.0",
29
29
  "async-validator": "^3.5.0",
30
30
  "classnames": "^2.2.6",
31
31
  "copy-text-to-clipboard": "^2.1.1",
@@ -75,7 +75,7 @@
75
75
  ],
76
76
  "author": "",
77
77
  "license": "MIT",
78
- "gitHead": "f06aca5797fda6a3f03a003ddd24591da9a4e6d4",
78
+ "gitHead": "3520c78b985bdeb81c5ce745ebc2f2e11511f8dd",
79
79
  "devDependencies": {
80
80
  "@babel/plugin-proposal-decorators": "^7.15.8",
81
81
  "@babel/plugin-transform-runtime": "^7.15.8",
@@ -1,5 +0,0 @@
1
- /*!
2
- Copyright (c) 2018 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */