@douyinfe/semi-ui 2.3.1 → 2.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64034,14 +64034,16 @@ class textarea_TextArea extends baseComponent_BaseComponent {
64034
64034
  minLength: stateMinLength
64035
64035
  } = this.state;
64036
64036
  const wrapperCls = classnames_default()(className, "".concat(textarea_prefixCls, "-textarea-wrapper"), {
64037
- ["".concat(textarea_prefixCls, "-textarea-wrapper-disabled")]: disabled || readonly,
64037
+ ["".concat(textarea_prefixCls, "-textarea-wrapper-disabled")]: disabled,
64038
+ ["".concat(textarea_prefixCls, "-textarea-wrapper-readonly")]: readonly,
64038
64039
  [concat_default()(_context = "".concat(textarea_prefixCls, "-textarea-wrapper-")).call(_context, validateStatus)]: Boolean(validateStatus),
64039
64040
  ["".concat(textarea_prefixCls, "-textarea-wrapper-focus")]: isFocus // [`${prefixCls}-textarea-wrapper-resize`]: !autosize && resize,
64040
64041
 
64041
64042
  }); // const ref = this.props.forwardRef || this.textAreaRef;
64042
64043
 
64043
64044
  const itemCls = classnames_default()("".concat(textarea_prefixCls, "-textarea"), {
64044
- ["".concat(textarea_prefixCls, "-textarea-disabled")]: disabled || readonly,
64045
+ ["".concat(textarea_prefixCls, "-textarea-disabled")]: disabled,
64046
+ ["".concat(textarea_prefixCls, "-textarea-readonly")]: readonly,
64045
64047
  ["".concat(textarea_prefixCls, "-textarea-autosize")]: autosize,
64046
64048
  ["".concat(textarea_prefixCls, "-textarea-showClear")]: showClear
64047
64049
  });
@@ -64160,7 +64162,8 @@ const inputNumber_constants_numbers = assign_default()(assign_default()({}, inpu
64160
64162
  DEFAULT_STEP: 1,
64161
64163
  DEFAULT_SHIFT_STEP: 1,
64162
64164
  DEFAULT_PRESS_TIMEOUT: 250,
64163
- DEFAULT_PRESS_INTERVAL: 0
64165
+ DEFAULT_PRESS_INTERVAL: 0,
64166
+ MOUSE_BUTTON_LEFT: 0
64164
64167
  });
64165
64168
 
64166
64169
  const inputNumber_constants_strings = assign_default()({}, input_constants_strings);
@@ -64194,6 +64197,7 @@ function minus(num1, num2) {
64194
64197
 
64195
64198
 
64196
64199
 
64200
+
64197
64201
  /* eslint-disable max-len */
64198
64202
 
64199
64203
  /* eslint-disable no-param-reassign */
@@ -64480,6 +64484,10 @@ class foundation_InputNumberFoundation extends foundation {
64480
64484
  }
64481
64485
 
64482
64486
  handleUpClick(event) {
64487
+ if (!this._isMouseButtonLeft(event)) {
64488
+ return;
64489
+ }
64490
+
64483
64491
  this._adapter.setClickUpOrDown(true);
64484
64492
 
64485
64493
  if (event) {
@@ -64499,6 +64507,10 @@ class foundation_InputNumberFoundation extends foundation {
64499
64507
  }
64500
64508
 
64501
64509
  handleDownClick(event) {
64510
+ if (!this._isMouseButtonLeft(event)) {
64511
+ return;
64512
+ }
64513
+
64502
64514
  this._adapter.setClickUpOrDown(true);
64503
64515
 
64504
64516
  if (event) {
@@ -64516,6 +64528,15 @@ class foundation_InputNumberFoundation extends foundation {
64516
64528
  });
64517
64529
  });
64518
64530
  }
64531
+ /**
64532
+ * Whether it is a left mouse button click
64533
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
64534
+ */
64535
+
64536
+
64537
+ _isMouseButtonLeft(event) {
64538
+ return get_default()(event, 'button') === inputNumber_constants_numbers.MOUSE_BUTTON_LEFT;
64539
+ }
64519
64540
 
64520
64541
  _preventDefault(event) {
64521
64542
  const keepFocus = this._adapter.getProp('keepFocus');
@@ -73450,7 +73471,7 @@ class select_Select extends baseComponent_BaseComponent {
73450
73471
  role: "button",
73451
73472
  "aria-label": "Use the input box to create an optional item",
73452
73473
  onClick: e => this.onSelect(option, optionIndex, e),
73453
- key: new Date().valueOf()
73474
+ key: option.key || option.label
73454
73475
  }, customCreateItem)
73455
73476
  );
73456
73477
  }
@@ -86393,15 +86414,18 @@ class Table_Table extends baseComponent_BaseComponent {
86393
86414
  const _dataSource = [...dataSource];
86394
86415
  const filteredSortedDataSource = this.foundation.getFilteredSortedDataSource(_dataSource, stateQueries);
86395
86416
  this.foundation.setCachedFilteredSortedDataSource(filteredSortedDataSource);
86396
- states.dataSource = filteredSortedDataSource; // when dataSource has change, should reset currentPage
86397
-
86398
- states.pagination = isObject_default()(statePagination) ? assign_default()(assign_default()({}, statePagination), {
86399
- currentPage: isObject_default()(propsPagination) && propsPagination.currentPage ? propsPagination.currentPage : 1
86400
- }) : statePagination;
86417
+ states.dataSource = filteredSortedDataSource;
86401
86418
 
86402
86419
  if (this.props.groupBy) {
86403
86420
  states.groups = null;
86404
86421
  }
86422
+ } // when dataSource has change, should reset currentPage
86423
+
86424
+
86425
+ if (dataSource !== prevProps.dataSource) {
86426
+ states.pagination = isObject_default()(statePagination) ? assign_default()(assign_default()({}, statePagination), {
86427
+ currentPage: isObject_default()(propsPagination) && propsPagination.currentPage ? propsPagination.currentPage : 1
86428
+ }) : statePagination;
86405
86429
  }
86406
86430
 
86407
86431
  if (keys_default()(states).length) {
@@ -86588,6 +86612,7 @@ class Table_Table extends baseComponent_BaseComponent {
86588
86612
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
86589
86613
  ref: this.rootWrapRef,
86590
86614
  className: classnames_default()(className, "".concat(prefixCls, "-wrapper")),
86615
+ "data-column-fixed": anyColumnFixed,
86591
86616
  style: wrapStyle,
86592
86617
  id: id
86593
86618
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_TableContextProvider, assign_default()({}, tableContextValue), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(spin_0, {
@@ -88863,7 +88888,13 @@ class foundation_TimePickerFoundation extends foundation {
88863
88888
  }
88864
88889
  }
88865
88890
 
88866
- this._adapter.notifyChange(_value, str);
88891
+ const onChangeWithDateFirst = this.getProp('onChangeWithDateFirst');
88892
+
88893
+ if (onChangeWithDateFirst) {
88894
+ this._adapter.notifyChange(_value, str);
88895
+ } else {
88896
+ this._adapter.notifyChange(str, _value);
88897
+ }
88867
88898
  }
88868
88899
 
88869
88900
  _hasChanged() {
@@ -89330,9 +89361,7 @@ class TimePicker_TimePicker extends baseComponent_BaseComponent {
89330
89361
  notifyOpenChange: function () {
89331
89362
  return _this2.props.onOpenChange(...arguments);
89332
89363
  },
89333
- notifyChange: function () {
89334
- return _this2.props.onChange && _this2.props.onChange(...arguments);
89335
- },
89364
+ notifyChange: (agr1, arg2) => this.props.onChange && this.props.onChange(agr1, arg2),
89336
89365
  notifyFocus: function () {
89337
89366
  return _this2.props.onFocus && _this2.props.onFocus(...arguments);
89338
89367
  },
@@ -89650,6 +89679,7 @@ TimePicker_TimePicker.defaultProps = assign_default()({
89650
89679
  onFocus: noop_default.a,
89651
89680
  onBlur: noop_default.a,
89652
89681
  onChange: noop_default.a,
89682
+ onChangeWithDateFirst: true,
89653
89683
  use12Hours: false,
89654
89684
  focusOnOpen: false,
89655
89685
  onKeyDown: noop_default.a,
@@ -91247,6 +91277,7 @@ const TreeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
91247
91277
 
91248
91278
 
91249
91279
 
91280
+
91250
91281
  var treeNode_rest = undefined && undefined.__rest || function (s, e) {
91251
91282
  var t = {};
91252
91283
 
@@ -91709,7 +91740,14 @@ class treeNode_TreeNode extends external_root_React_commonjs2_react_commonjs_rea
91709
91740
  ref: this.setRef
91710
91741
  }, dragProps));
91711
91742
  } else {
91712
- return customLabel;
91743
+ if (isEmpty_default()(style)) {
91744
+ return customLabel;
91745
+ } else {
91746
+ // In virtualization, props.style will contain location information
91747
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(customLabel, {
91748
+ style: assign_default()(assign_default()({}, get_default()(customLabel, ['props', 'style'])), style)
91749
+ });
91750
+ }
91713
91751
  }
91714
91752
  }
91715
91753