@douyinfe/semi-ui 2.42.2 → 2.42.4

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.
@@ -23867,8 +23867,8 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
23867
23867
  * 获取文本的缩略class和style
23868
23868
  *
23869
23869
  * 截断类型:
23870
- * - CSS 截断,仅在 rows=1 且没有 expandable、pos、suffix 时生效
23871
- * - JS 截断,应对 CSS 无法阶段的场景
23870
+ * - 当设置中间截断(pos='middle')、可展开(expandable)、有后缀(suffix 非空)、可复制(copyable),启用 JS 截断策略
23871
+ * - 非以上场景,启用 CSS 截断策略
23872
23872
  * 相关变量
23873
23873
  * props:
23874
23874
  * - ellipsis:
@@ -23884,8 +23884,8 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
23884
23884
  * Get the abbreviated class and style of the text
23885
23885
  *
23886
23886
  * Truncation type:
23887
- * -CSS truncation, which only takes effect when rows = 1 and there is no expandable, pos, suffix
23888
- * -JS truncation, dealing with scenarios where CSS cannot stage
23887
+ * -When setting middle ellipsis (pos='middle')、expandable、suffix is not empty、copyable, the JS ellipsis strategy is enabled
23888
+ * -Otherwise, enable the CSS ellipsis strategy
23889
23889
  * related variables
23890
23890
  * props:
23891
23891
  * -ellipsis:
@@ -60488,7 +60488,11 @@ class DropdownItem extends BaseComponent {
60488
60488
  const events = {};
60489
60489
  if (!disabled) {
60490
60490
  ['onClick', 'onMouseEnter', 'onMouseLeave', 'onContextMenu'].forEach(eventName => {
60491
- events[eventName] = this.props[eventName];
60491
+ if (eventName === "onClick") {
60492
+ events["onMouseDown"] = this.props[eventName];
60493
+ } else {
60494
+ events[eventName] = this.props[eventName];
60495
+ }
60492
60496
  });
60493
60497
  }
60494
60498
  let tick = null;
@@ -81080,14 +81084,14 @@ class TableRow extends BaseComponent {
81080
81084
  this.handleMouseEnter = e => {
81081
81085
  this.foundation.handleMouseEnter(e);
81082
81086
  const customRowProps = this.adapter.getCache('customRowProps');
81083
- if (typeof customRowProps.onMouseEnter === 'function') {
81087
+ if (typeof (customRowProps === null || customRowProps === void 0 ? void 0 : customRowProps.onMouseEnter) === 'function') {
81084
81088
  customRowProps.onMouseEnter(e);
81085
81089
  }
81086
81090
  };
81087
81091
  this.handleMouseLeave = e => {
81088
81092
  this.foundation.handleMouseLeave(e);
81089
81093
  const customRowProps = this.adapter.getCache('customRowProps');
81090
- if (typeof customRowProps.onMouseLeave === 'function') {
81094
+ if (typeof (customRowProps === null || customRowProps === void 0 ? void 0 : customRowProps.onMouseLeave) === 'function') {
81091
81095
  customRowProps.onMouseLeave(e);
81092
81096
  }
81093
81097
  };
@@ -83983,20 +83987,25 @@ const ResizableTable = function () {
83983
83987
  };
83984
83988
  const resizableRender = function (col, index) {
83985
83989
  let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
83990
+ let originalHeaderCellProps = arguments.length > 3 ? arguments[3] : undefined;
83986
83991
  return Object.assign(Object.assign({}, col), {
83987
- onHeaderCell: column => ({
83988
- width: column.width,
83989
- onResize: handleResize(column),
83990
- onResizeStart: handleResizeStart(column),
83991
- onResizeStop: handleResizeStop(column)
83992
- })
83992
+ onHeaderCell: column => {
83993
+ return Object.assign(Object.assign({}, originalHeaderCellProps), {
83994
+ width: column.width,
83995
+ onResize: handleResize(column),
83996
+ onResizeStart: handleResizeStart(column),
83997
+ onResizeStop: handleResizeStop(column)
83998
+ });
83999
+ }
83993
84000
  });
83994
84001
  };
83995
84002
  const assignResizableRender = function () {
83996
84003
  let columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
83997
84004
  let level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
83998
84005
  return Array.isArray(columns) && columns.length ? columns.map((col, index) => {
83999
- Object.assign(col, resizableRender(col, index, level));
84006
+ var _a, _b;
84007
+ const originalHeaderCellProps = (_b = (_a = col.onHeaderCell) === null || _a === void 0 ? void 0 : _a.call(col, col, index, level)) !== null && _b !== void 0 ? _b : {};
84008
+ Object.assign(col, resizableRender(col, index, level, originalHeaderCellProps));
84000
84009
  const children = col[childrenColumnName];
84001
84010
  if (Array.isArray(children) && children.length) {
84002
84011
  col[childrenColumnName] = assignResizableRender(children, level + 1);