@visactor/vtable-gantt 1.26.5 → 1.26.7

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 (41) hide show
  1. package/cjs/Gantt.d.ts +6 -6
  2. package/cjs/Gantt.js +14 -8
  3. package/cjs/Gantt.js.map +1 -1
  4. package/cjs/components/MenuElementStyle.js +1 -2
  5. package/cjs/event/touch.js +1 -0
  6. package/cjs/index.d.ts +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/index.js.map +1 -1
  9. package/cjs/scenegraph/gantt-node.d.ts +1 -1
  10. package/cjs/scenegraph/gantt-node.js.map +1 -1
  11. package/cjs/scenegraph/scenegraph.d.ts +1 -1
  12. package/cjs/scenegraph/scenegraph.js.map +1 -1
  13. package/cjs/scenegraph/task-bar.d.ts +2 -2
  14. package/cjs/scenegraph/task-bar.js +3 -2
  15. package/cjs/scenegraph/task-bar.js.map +1 -1
  16. package/cjs/state/state-manager.js +4 -2
  17. package/cjs/state/state-manager.js.map +1 -1
  18. package/cjs/ts-types/events.d.ts +11 -9
  19. package/cjs/ts-types/events.js.map +1 -1
  20. package/dist/vtable-gantt.js +1155 -388
  21. package/dist/vtable-gantt.min.js +1 -1
  22. package/es/Gantt.d.ts +6 -6
  23. package/es/Gantt.js +14 -8
  24. package/es/Gantt.js.map +1 -1
  25. package/es/components/MenuElementStyle.js +1 -2
  26. package/es/event/touch.js +2 -1
  27. package/es/index.d.ts +1 -1
  28. package/es/index.js +1 -1
  29. package/es/index.js.map +1 -1
  30. package/es/scenegraph/gantt-node.d.ts +1 -1
  31. package/es/scenegraph/gantt-node.js.map +1 -1
  32. package/es/scenegraph/scenegraph.d.ts +1 -1
  33. package/es/scenegraph/scenegraph.js.map +1 -1
  34. package/es/scenegraph/task-bar.d.ts +2 -2
  35. package/es/scenegraph/task-bar.js +2 -2
  36. package/es/scenegraph/task-bar.js.map +1 -1
  37. package/es/state/state-manager.js +4 -2
  38. package/es/state/state-manager.js.map +1 -1
  39. package/es/ts-types/events.d.ts +11 -9
  40. package/es/ts-types/events.js.map +1 -1
  41. package/package.json +3 -3
@@ -44707,6 +44707,7 @@
44707
44707
  MOUSELEAVE_CELL: "mouseleave_cell",
44708
44708
  CONTEXTMENU_CELL: "contextmenu_cell",
44709
44709
  CONTEXTMENU_CANVAS: "contextmenu_canvas",
44710
+ CONTEXT_MENU_CLICK: "context_menu_click",
44710
44711
  RESIZE_COLUMN: "resize_column",
44711
44712
  RESIZE_COLUMN_END: "resize_column_end",
44712
44713
  RESIZE_ROW: "resize_row",
@@ -52000,7 +52001,7 @@
52000
52001
  const recordIndex = recordIndexsMaxToMin[index];
52001
52002
  if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) continue;
52002
52003
  const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
52003
- this.beforeChangedRecordsMap.delete(originRecordIndex.toString()), this.dataSourceObj.records.splice(originRecordIndex, 1), this.sourceLength -= 1, this.adjustBeforeChangedRecordsMap(originRecordIndex, 1, "delete");
52004
+ isValid$1(originRecordIndex) && (this.beforeChangedRecordsMap.delete(originRecordIndex.toString()), this.dataSourceObj.records.splice(originRecordIndex, 1), this.sourceLength -= 1, this.adjustBeforeChangedRecordsMap(originRecordIndex, 1, "delete"));
52004
52005
  }
52005
52006
  this.updateGroup();
52006
52007
  }
@@ -52009,7 +52010,7 @@
52009
52010
  const recordIndex = recordIndexs[index];
52010
52011
  if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) continue;
52011
52012
  const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
52012
- this.beforeChangedRecordsMap.delete(originRecordIndex.toString()), this.dataSourceObj.records[originRecordIndex] = records[index];
52013
+ isValid$1(originRecordIndex) && (this.beforeChangedRecordsMap.delete(originRecordIndex.toString()), this.dataSourceObj.records[originRecordIndex] = records[index]);
52013
52014
  }
52014
52015
  this.updateGroup();
52015
52016
  }
@@ -53749,7 +53750,7 @@
53749
53750
  "image" === icon.type ? icon.isGif ? (iconAttribute.gif = icon.src, iconAttribute.image = icon.src) : iconAttribute.image = icon.src : ("svg" === icon.type || "svg" in icon) && (iconAttribute.image = icon.svg), iconAttribute.width = icon.width, iconAttribute.height = icon.height, iconAttribute.visibleTime = null !== (_a = icon.visibleTime) && void 0 !== _a ? _a : "always", iconAttribute.funcType = icon.funcType, iconAttribute.interactive = icon.interactive, iconAttribute.isGif = icon.isGif;
53750
53751
  let iconMark,
53751
53752
  hierarchyOffset = 0;
53752
- return dealWithIconComputeVar && 0 !== (null == dealWithIconComputeVar ? void 0 : dealWithIconComputeVar.addedHierarchyOffset) || !isNumber$3(col) || !isNumber$3(row) || !table || icon.funcType !== IconFuncTypeEnum.collapse && icon.funcType !== IconFuncTypeEnum.expand && icon.positionType !== IconPosition.contentLeft && icon.positionType !== IconPosition.contentRight || (hierarchyOffset = range ? getHierarchyOffset(range.start.col, range.start.row, table) : getHierarchyOffset(col, row, table), dealWithIconComputeVar && (dealWithIconComputeVar.addedHierarchyOffset = 1)), iconAttribute.marginLeft = (null !== (_b = icon.marginLeft) && void 0 !== _b ? _b : 0) + hierarchyOffset, iconAttribute.marginRight = null !== (_c = icon.marginRight) && void 0 !== _c ? _c : 0, !1 === icon.interactive && (iconAttribute.pickable = !1), icon.hover && (iconAttribute.backgroundWidth = null !== (_d = icon.hover.width) && void 0 !== _d ? _d : icon.width, iconAttribute.backgroundHeight = null !== (_e = icon.hover.width) && void 0 !== _e ? _e : icon.width, iconAttribute.backgroundColor = null !== (_f = icon.hover.bgColor) && void 0 !== _f ? _f : "rgba(22,44,66,0.2)", iconAttribute.hoverImage = icon.hover.image), icon.cursor && (iconAttribute.cursor = icon.cursor), "shape" in icon && "circle" === icon.shape && (iconAttribute.shape = icon.shape), mark ? (mark.setAttributes(iconAttribute), mark.loadImage(iconAttribute.image), mark.tooltip = icon.tooltip, mark.name = icon.name, mark) : ("text" === icon.type ? (iconAttribute.text = icon.content, merge(iconAttribute, icon.style), iconMark = new TextIcon(iconAttribute), iconMark.tooltip = icon.tooltip, iconMark.name = icon.name) : (iconMark = new Icon$1(iconAttribute), iconMark.tooltip = icon.tooltip, iconMark.name = icon.name), iconMark);
53753
+ return dealWithIconComputeVar && 0 !== (null == dealWithIconComputeVar ? void 0 : dealWithIconComputeVar.addedHierarchyOffset) || !isNumber$3(col) || !isNumber$3(row) || !table || icon.funcType !== IconFuncTypeEnum.collapse && icon.funcType !== IconFuncTypeEnum.expand && icon.positionType !== IconPosition.contentLeft && icon.positionType !== IconPosition.contentRight || (hierarchyOffset = range ? getHierarchyOffset(range.start.col, range.start.row, table) : getHierarchyOffset(col, row, table), dealWithIconComputeVar && (dealWithIconComputeVar.addedHierarchyOffset = 1)), iconAttribute.marginLeft = (null !== (_b = icon.marginLeft) && void 0 !== _b ? _b : 0) + hierarchyOffset, iconAttribute.marginRight = null !== (_c = icon.marginRight) && void 0 !== _c ? _c : 0, !1 === icon.interactive && (iconAttribute.pickable = !1), icon.hover && (iconAttribute.backgroundWidth = null !== (_d = icon.hover.width) && void 0 !== _d ? _d : icon.width, iconAttribute.backgroundHeight = null !== (_e = icon.hover.width) && void 0 !== _e ? _e : icon.width, iconAttribute.backgroundColor = null !== (_f = icon.hover.bgColor) && void 0 !== _f ? _f : "rgba(22,44,66,0.2)", iconAttribute.hoverImage = icon.hover.image), icon.cursor && (iconAttribute.cursor = icon.cursor), "shape" in icon && "circle" === icon.shape && (iconAttribute.shape = icon.shape), "text" === icon.type && (iconAttribute.text = icon.content, merge(iconAttribute, icon.style)), isNil$1(iconAttribute.opacity) && (iconAttribute.opacity = "mouseenter_cell" === iconAttribute.visibleTime || "click_cell" === iconAttribute.visibleTime ? 0 : 1), mark ? (mark.setAttributes(iconAttribute), iconAttribute.image && mark.loadImage(iconAttribute.image), mark.tooltip = icon.tooltip, mark.name = icon.name, mark) : ("text" === icon.type ? (iconMark = new TextIcon(iconAttribute), iconMark.tooltip = icon.tooltip, iconMark.name = icon.name) : (iconMark = new Icon$1(iconAttribute), iconMark.tooltip = icon.tooltip, iconMark.name = icon.name), iconMark);
53753
53754
  }
53754
53755
  function dealWithRichTextIcon(icon) {
53755
53756
  var _a, _b, _c, _d, _e, _f;
@@ -53942,7 +53943,61 @@
53942
53943
  }
53943
53944
  }
53944
53945
 
53945
- function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync) {
53946
+ const CELL_MEDIA_KEY = "__vtable_cell_media__";
53947
+ const CELL_MEDIA_KIND_KEY = "__vtable_cell_media_kind__";
53948
+ function markCellMedia(graphic, kind) {
53949
+ return graphic[CELL_MEDIA_KEY] = !0, graphic[CELL_MEDIA_KIND_KEY] = kind, graphic;
53950
+ }
53951
+ function isCellMedia(graphic) {
53952
+ return !0 === (null == graphic ? void 0 : graphic[CELL_MEDIA_KEY]);
53953
+ }
53954
+ function getCellMediaChildren(cellGroup) {
53955
+ const mediaChildren = [];
53956
+ return cellGroup.forEachChildren(child => {
53957
+ isCellMedia(child) && mediaChildren.push(child);
53958
+ }), mediaChildren;
53959
+ }
53960
+ function getCellMediaByKind(cellGroup, kind) {
53961
+ let graphic;
53962
+ return cellGroup.forEachChildren(child => !(!isCellMedia(child) || child[CELL_MEDIA_KIND_KEY] !== kind) && (graphic = child, !0)), graphic;
53963
+ }
53964
+ function getCellMediaImage(cellGroup) {
53965
+ return getCellMediaByKind(cellGroup, "image");
53966
+ }
53967
+ function getCellMediaPlayIcon(cellGroup) {
53968
+ return getCellMediaByKind(cellGroup, "play-icon");
53969
+ }
53970
+ function releaseVideoResource(video) {
53971
+ try {
53972
+ video.pause();
53973
+ } catch (err) {}
53974
+ video.removeAttribute("src");
53975
+ try {
53976
+ video.load();
53977
+ } catch (err) {}
53978
+ }
53979
+ function releaseGraphicMediaResource(graphic) {
53980
+ var _a;
53981
+ const source = null === (_a = null == graphic ? void 0 : graphic.attribute) || void 0 === _a ? void 0 : _a.image;
53982
+ "undefined" != typeof HTMLVideoElement && source instanceof HTMLVideoElement && releaseVideoResource(source);
53983
+ }
53984
+ function removeCellMediaChildren(cellGroup) {
53985
+ getCellMediaChildren(cellGroup).forEach(child => {
53986
+ var _a;
53987
+ releaseGraphicMediaResource(child), cellGroup.removeChild(child), null === (_a = child.release) || void 0 === _a || _a.call(child);
53988
+ });
53989
+ }
53990
+
53991
+ function hasCellMedia(cellGroup) {
53992
+ return getCellMediaChildren(cellGroup).length > 0;
53993
+ }
53994
+ function getResizeImage(cellGroup) {
53995
+ return hasCellMedia(cellGroup) ? getCellMediaImage(cellGroup) : void 0;
53996
+ }
53997
+ function getResizePlayIcon(cellGroup) {
53998
+ return hasCellMedia(cellGroup) ? getCellMediaPlayIcon(cellGroup) : void 0;
53999
+ }
54000
+ function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, cellValue) {
53946
54001
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
53947
54002
  const headerStyle = table._getCellStyle(col, row),
53948
54003
  functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
@@ -53998,17 +54053,19 @@
53998
54053
  "icon-left" === child.role ? child.setAttribute("x", child.attribute.x + padding[3]) : "icon-right" === child.role ? child.setAttribute("x", child.attribute.x + width - rightIconWidth - padding[1]) : "icon-absolute-right" === child.role && child.setAttribute("x", child.attribute.x + width - absoluteRightIconWidth - padding[1]);
53999
54054
  }), cellGroup.forEachChildren(child => {
54000
54055
  "middle" === textBaseline ? child.setAttribute("y", (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", height - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]);
54001
- }), cellGroup._cellLeftIconWidth = cellLeftIconWidth, cellGroup._cellRightIconWidth = cellRightIconWidth;
54002
- }
54003
- const value = table.getCellValue(col, row),
54004
- image = createImage({
54005
- x: padding[3],
54006
- y: padding[0],
54007
- width: width - padding[1] - padding[3] - iconWidth,
54008
- height: height - padding[0] - padding[2],
54009
- image: value,
54010
- cursor: "pointer"
54011
54056
  });
54057
+ }
54058
+ cellGroup._cellLeftIconWidth = cellLeftIconWidth, cellGroup._cellRightIconWidth = cellRightIconWidth;
54059
+ const value = arguments.length >= 18 ? cellValue : table.getCellValue(col, row);
54060
+ removeCellMediaChildren(cellGroup);
54061
+ const image = markCellMedia(createImage({
54062
+ x: padding[3],
54063
+ y: padding[0],
54064
+ width: width - padding[1] - padding[3] - iconWidth,
54065
+ height: height - padding[0] - padding[2],
54066
+ image: value,
54067
+ cursor: "pointer"
54068
+ }), "image");
54012
54069
  if (image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, keepAspectRatio || imageAutoSizing ? image.resources && image.resources.has(image.attribute.image) && "success" === image.resources.get(image.attribute.image).state ? (image.setAttribute("opacity", 0), setTimeout(() => {
54013
54070
  image.setAttribute("opacity", 1), updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
54014
54071
  }, 0)) : image.successCallback = () => {
@@ -54042,10 +54099,10 @@
54042
54099
  }
54043
54100
  function updateImageCellContentWhileResize(cellGroup, col, row, deltaX, deltaY, table) {
54044
54101
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
54045
- const image = cellGroup.getChildByName("image");
54102
+ const image = getResizeImage(cellGroup);
54046
54103
  if (!image) return;
54047
54104
  const originImage = "string" != typeof image.attribute.image && image.attribute.image || (null === (_a = image.resources) || void 0 === _a ? void 0 : _a.get(image.attribute.image).data);
54048
- if (!originImage) return;
54105
+ if (!originImage && !image.isAudioIcon) return;
54049
54106
  const headerStyle = table._getCellStyle(col, row),
54050
54107
  textAlign = null !== (_b = getProp("textAlign", headerStyle, col, row, table)) && void 0 !== _b ? _b : "left",
54051
54108
  textBaseline = null !== (_c = getProp("textBaseline", headerStyle, col, row, table)) && void 0 !== _c ? _c : "middle";
@@ -54059,17 +54116,31 @@
54059
54116
  colStart = null !== (_g = cellGroup.mergeStartCol) && void 0 !== _g ? _g : cellGroup.col,
54060
54117
  rowStart = null !== (_h = cellGroup.mergeStartRow) && void 0 !== _h ? _h : cellGroup.row,
54061
54118
  colEnd = null !== (_j = cellGroup.mergeEndCol) && void 0 !== _j ? _j : cellGroup.col,
54062
- rowEnd = null !== (_k = cellGroup.mergeEndCol) && void 0 !== _k ? _k : cellGroup.row,
54119
+ rowEnd = null !== (_k = cellGroup.mergeEndRow) && void 0 !== _k ? _k : cellGroup.row,
54063
54120
  leftIconWidth = null !== (_l = cellGroup._cellLeftIconWidth) && void 0 !== _l ? _l : 0,
54064
54121
  rightIconWidth = null !== (_m = cellGroup._cellRightIconWidth) && void 0 !== _m ? _m : 0;
54065
- if (image.keepAspectRatio || isDamagePic(image)) {
54122
+ if (image.isAudioIcon) {
54123
+ const availableWidth = Math.max(1, cellWidth - padding[1] - padding[3] - leftIconWidth - rightIconWidth),
54124
+ availableHeight = Math.max(1, cellHeight - padding[0] - padding[2]),
54125
+ iconSize = Math.max(1, Math.min(availableWidth, availableHeight, 32)),
54126
+ pos = calcStartPosition(leftIconWidth, 0, cellWidth - leftIconWidth - rightIconWidth, cellHeight, iconSize, iconSize, textAlign, textBaseline, padding);
54127
+ for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
54128
+ const image = getResizeImage(table.scenegraph.getCell(col, row));
54129
+ null == image || image.setAttributes({
54130
+ x: pos.x,
54131
+ y: pos.y,
54132
+ width: iconSize,
54133
+ height: iconSize
54134
+ });
54135
+ }
54136
+ } else if (image.keepAspectRatio || isDamagePic(image)) {
54066
54137
  const {
54067
54138
  width: imageWidth,
54068
54139
  height: imageHeight
54069
54140
  } = calcKeepAspectRatioSize(originImage.width || originImage.videoWidth, originImage.height || originImage.videoHeight, cellWidth - (padding[1] + padding[3]), cellHeight - (padding[0] + padding[2])),
54070
54141
  pos = calcStartPosition(0, 0, cellWidth, cellHeight, imageWidth, imageHeight, textAlign, textBaseline, padding);
54071
54142
  for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
54072
- const image = table.scenegraph.getCell(col, row).getChildByName("image");
54143
+ const image = getResizeImage(table.scenegraph.getCell(col, row));
54073
54144
  null == image || image.setAttributes({
54074
54145
  x: pos.x,
54075
54146
  y: pos.y,
@@ -54078,7 +54149,7 @@
54078
54149
  });
54079
54150
  }
54080
54151
  } else for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
54081
- const image = table.scenegraph.getCell(col, row).getChildByName("image");
54152
+ const image = getResizeImage(table.scenegraph.getCell(col, row));
54082
54153
  null == image || image.setAttributes({
54083
54154
  x: leftIconWidth + padding[3],
54084
54155
  y: padding[0],
@@ -54086,7 +54157,7 @@
54086
54157
  height: cellHeight - padding[0] - padding[2]
54087
54158
  });
54088
54159
  }
54089
- if (cellGroup.getChildByName("play-icon")) {
54160
+ if (getResizePlayIcon(cellGroup)) {
54090
54161
  const left = 0,
54091
54162
  top = 0,
54092
54163
  {
@@ -54097,7 +54168,8 @@
54097
54168
  anchorX = left + (width > image.attribute.width ? image.attribute.x - left + image.attribute.width / 2 : width / 2),
54098
54169
  anchorY = top + (height > image.attribute.height ? image.attribute.y - top + image.attribute.height / 2 : height / 2);
54099
54170
  for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
54100
- table.scenegraph.getCell(col, row).getChildByName("play-icon").setAttributes({
54171
+ const playIcon = getResizePlayIcon(table.scenegraph.getCell(col, row));
54172
+ null == playIcon || playIcon.setAttributes({
54101
54173
  x: anchorX - iconSize / 2,
54102
54174
  y: anchorY - iconSize / 2,
54103
54175
  width: iconSize,
@@ -54126,12 +54198,12 @@
54126
54198
  for (let col = startCol; col <= endCol; col++) for (let row = startRow; row <= endRow; row++) {
54127
54199
  const cellGroup = table.scenegraph.getCell(col, row);
54128
54200
  if (cellGroup) {
54129
- const image = cellGroup.getChildByName("image");
54201
+ const image = getResizeImage(cellGroup);
54130
54202
  image && image.setAttributes({
54131
54203
  dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
54132
54204
  dy: -table.getRowsHeight(cellGroup.mergeStartRow, row - 1)
54133
54205
  });
54134
- const playIcon = cellGroup.getChildByName("play-icon");
54206
+ const playIcon = getResizePlayIcon(cellGroup);
54135
54207
  playIcon && playIcon.setAttributes({
54136
54208
  dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
54137
54209
  dy: -table.getRowsHeight(cellGroup.mergeStartRow, row - 1)
@@ -54170,8 +54242,8 @@
54170
54242
  }
54171
54243
 
54172
54244
  function dealPromiseData(dataPromise, tabel, callback) {
54173
- dataPromise.then(() => {
54174
- callback(), tabel.scenegraph.updateNextFrame();
54245
+ dataPromise.then(value => {
54246
+ callback(value), tabel.scenegraph.updateNextFrame();
54175
54247
  }).catch(err => {});
54176
54248
  }
54177
54249
 
@@ -54187,16 +54259,27 @@
54187
54259
  }
54188
54260
  }
54189
54261
 
54190
- function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
54262
+ const PROMISE_CELL_UPDATE_TOKEN_KEY = "__vtable_promise_cell_update_token__";
54263
+ function nextPromiseCellUpdateToken(cellGroup) {
54264
+ var _a;
54265
+ const token = (null !== (_a = cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY]) && void 0 !== _a ? _a : 0) + 1;
54266
+ return cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] = token, token;
54267
+ }
54268
+ function isPromiseCellUpdateCurrent(table, col, row, cellGroup, token) {
54269
+ return table.scenegraph.highPerformanceGetCell(col, row, !0) === cellGroup && cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] === token;
54270
+ }
54271
+ function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellValue) {
54191
54272
  var _a, _b;
54192
54273
  let cellGroup,
54193
54274
  isAsync = !1;
54275
+ const hasCellValue = arguments.length >= 19;
54276
+ let renderValue = hasCellValue ? cellValue : value;
54194
54277
  if (isPromise(value)) {
54195
54278
  if ("cell" !== table.scenegraph.highPerformanceGetCell(col, row).role) return cellGroup;
54196
- value = table.getCellValue(col, row), isAsync = !0;
54279
+ hasCellValue || (renderValue = table.getCellValue(col, row)), isAsync = !0;
54197
54280
  }
54198
- if ("checkbox" === type && define.tree) {
54199
- cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0);
54281
+ if (value = renderValue, "checkbox" === type && define.tree) {
54282
+ cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0, value);
54200
54283
  } else if ("text" === type || "link" === type || customResult) {
54201
54284
  if ("link" === type) {
54202
54285
  const cellValue = value,
@@ -54232,9 +54315,11 @@
54232
54315
  stroke: !1
54233
54316
  }), cellGroup.clear()) : table.internalProps.layoutMap.isAxisCell(col, row) && cellGroup.clear();
54234
54317
  } else if ("image" === type) {
54235
- cellGroup = Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
54318
+ cellGroup = Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
54319
+ } else if ("audio" === type) {
54320
+ cellGroup = Factory.getFunction("createAudioCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
54236
54321
  } else if ("video" === type) {
54237
- cellGroup = Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
54322
+ cellGroup = Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
54238
54323
  } else if ("chart" === type) {
54239
54324
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
54240
54325
  cellGroup = Factory.getFunction("createChartCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, value, define.chartModule, table.internalProps.layoutMap.getChartSpec(col, row), chartInstance, null !== (_b = table.internalProps.layoutMap.getChartDataId(col, row)) && void 0 !== _b ? _b : "data", table, cellTheme, table.internalProps.layoutMap.isShareChartSpec(col, row), isAsync, table.internalProps.layoutMap.isNoChartDataRenderNothing(col, row));
@@ -54249,23 +54334,23 @@
54249
54334
  const progressBarGroup = Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
54250
54335
  cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
54251
54336
  } else if ("sparkline" === type) {
54252
- cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
54337
+ cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync, value);
54253
54338
  } else if ("checkbox" === type) {
54254
54339
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
54255
54340
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
54256
54341
  } else {
54257
- cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
54342
+ cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1, value);
54258
54343
  }
54259
54344
  } else if ("radio" === type) {
54260
54345
  if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
54261
54346
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
54262
54347
  } else {
54263
- cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
54348
+ cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, value);
54264
54349
  }
54265
54350
  } else if ("switch" === type) {
54266
- cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
54351
+ cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
54267
54352
  } else if ("button" === type) {
54268
- cellGroup = Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
54353
+ cellGroup = Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
54269
54354
  }
54270
54355
  return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
54271
54356
  }
@@ -54399,25 +54484,30 @@
54399
54484
  textAlign = cellTheme.text.textAlign,
54400
54485
  textBaseline = cellTheme.text.textBaseline;
54401
54486
  let newCellGroup, cellWidth, cellHeight;
54402
- if (range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col), cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col), cellHeight = table.getRowHeight(row)), isPromise(value) ? (oldCellGroup.removeAllChild(), dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
54403
- type: type,
54404
- value: value,
54405
- define: define,
54406
- table: table,
54407
- col: col,
54408
- row: row,
54409
- cellWidth: cellWidth,
54410
- cellHeight: cellHeight,
54411
- oldCellGroup: oldCellGroup,
54412
- padding: padding,
54413
- textAlign: textAlign,
54414
- textBaseline: textBaseline,
54415
- mayHaveIcon: mayHaveIcon,
54416
- addNew: addNew,
54417
- range: range,
54418
- customResult: customResult,
54419
- customStyle: customStyle
54420
- }))) : newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult), isMerge) {
54487
+ if (range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col), cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col), cellHeight = table.getRowHeight(row)), isPromise(value)) {
54488
+ const updateToken = nextPromiseCellUpdateToken(oldCellGroup);
54489
+ removeCellMediaChildren(oldCellGroup), oldCellGroup.removeAllChild(), dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
54490
+ type: type,
54491
+ define: define,
54492
+ table: table,
54493
+ col: col,
54494
+ row: row,
54495
+ cellWidth: cellWidth,
54496
+ cellHeight: cellHeight,
54497
+ oldCellGroup: oldCellGroup,
54498
+ padding: padding,
54499
+ textAlign: textAlign,
54500
+ textBaseline: textBaseline,
54501
+ mayHaveIcon: mayHaveIcon,
54502
+ addNew: addNew,
54503
+ range: range,
54504
+ customResult: customResult,
54505
+ customStyle: customStyle,
54506
+ promiseValue: value,
54507
+ updateToken: updateToken
54508
+ }));
54509
+ } else newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
54510
+ if (isMerge) {
54421
54511
  const {
54422
54512
  width: contentWidth
54423
54513
  } = newCellGroup.attribute,
@@ -54428,9 +54518,10 @@
54428
54518
  }
54429
54519
  return newCellGroup;
54430
54520
  }
54431
- function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult) {
54521
+ function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, cellValue) {
54432
54522
  var _a, _b;
54433
- if (isPromise(value) && (value = table.getCellValue(col, row)), !addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
54523
+ const hasCellValue = arguments.length >= 18;
54524
+ if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
54434
54525
  if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
54435
54526
  const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
54436
54527
  if (reactGroup) {
@@ -54441,8 +54532,10 @@
54441
54532
  isNumber$3(col) && isNumber$3(row) && table.reactCustomLayout.removeCustomCell(col, row);
54442
54533
  }
54443
54534
  }
54444
- const newCellGroup = createCell(type, value, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
54445
- return !addNew && oldCellGroup.parent && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup), oldCellGroup.release(!0), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))), newCellGroup;
54535
+ const createCellArgs = [type, value, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult];
54536
+ hasCellValue && createCellArgs.push(cellValue);
54537
+ const newCellGroup = createCell(...createCellArgs);
54538
+ return !addNew && oldCellGroup.parent && newCellGroup !== oldCellGroup && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup), removeCellMediaChildren(oldCellGroup), oldCellGroup.release(!0), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))), newCellGroup;
54446
54539
  }
54447
54540
  function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table) {
54448
54541
  var _a;
@@ -54451,29 +54544,31 @@
54451
54544
  value = table.getCellValue(col, row);
54452
54545
  return !(table.isHeader(col, row) || "cell" !== oldCellGroup.role || "text" !== cellType || autoWrapText || autoRowHeight || mayHaveIcon || "text" !== (null === (_a = oldCellGroup.firstChild) || void 0 === _a ? void 0 : _a.type) || isPromise(value));
54453
54546
  }
54454
- function callUpdateCellContentForPromiseValue(updateCellArgs) {
54547
+ function callUpdateCellContentForPromiseValue(updateCellArgs, resolvedValue) {
54455
54548
  const {
54456
- type: type,
54457
- value: value,
54458
- define: define,
54459
- table: table,
54460
- col: col,
54461
- row: row,
54462
- cellWidth: cellWidth,
54463
- cellHeight: cellHeight,
54464
- oldCellGroup: oldCellGroup,
54465
- padding: padding,
54466
- textAlign: textAlign,
54467
- textBaseline: textBaseline,
54468
- mayHaveIcon: mayHaveIcon,
54469
- addNew: addNew,
54470
- range: range,
54471
- customResult: customResult,
54472
- customStyle: customStyle
54473
- } = updateCellArgs,
54474
- cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
54549
+ type: type,
54550
+ define: define,
54551
+ table: table,
54552
+ col: col,
54553
+ row: row,
54554
+ cellWidth: cellWidth,
54555
+ cellHeight: cellHeight,
54556
+ oldCellGroup: oldCellGroup,
54557
+ padding: padding,
54558
+ textAlign: textAlign,
54559
+ textBaseline: textBaseline,
54560
+ mayHaveIcon: mayHaveIcon,
54561
+ addNew: addNew,
54562
+ range: range,
54563
+ customResult: customResult,
54564
+ customStyle: customStyle,
54565
+ promiseValue: promiseValue,
54566
+ updateToken: updateToken
54567
+ } = updateCellArgs;
54568
+ if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) return;
54569
+ const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
54475
54570
  cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
54476
- cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
54571
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), updateCellContent(type, promiseValue, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, resolvedValue);
54477
54572
  }
54478
54573
  function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
54479
54574
  for (let col = range.start.col; col <= range.end.col; col++) for (let row = range.start.row; row <= range.end.row; row++) {
@@ -54784,15 +54879,26 @@
54784
54879
  table.isPivotTable() && (layoutMap.disableUseGetBodyCache(), layoutMap.disableUseHeaderPathCache());
54785
54880
  }
54786
54881
  function computeRowHeight(row, startCol, endCol, table) {
54882
+ return computeRowHeightInternal(row, startCol, endCol, table, !0);
54883
+ }
54884
+ function computeRowHeightInternal(row, startCol, endCol, table, enableCustomCompute) {
54787
54885
  if (!(table.isAutoRowHeight(row) || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
54788
54886
  let maxHeight;
54789
- if (table.options.customComputeRowHeight) {
54790
- const customRowHeight = table.options.customComputeRowHeight({
54791
- row: row,
54792
- table: table
54887
+ if (enableCustomCompute && table.options.customComputeRowHeight) {
54888
+ let realHeight,
54889
+ hasRealHeight = !1;
54890
+ const getRealHeight = () => (hasRealHeight || (realHeight = computeRowHeightInternal(row, startCol, endCol, table, !1), hasRealHeight = !0), realHeight),
54891
+ computeArgs = {
54892
+ row: row,
54893
+ table: table
54894
+ };
54895
+ Object.defineProperty(computeArgs, "realHeight", {
54896
+ get: getRealHeight,
54897
+ enumerable: !1,
54898
+ configurable: !0
54793
54899
  });
54794
- if ("number" == typeof customRowHeight) return customRowHeight;
54795
- if ("auto" !== customRowHeight) return table.getDefaultRowHeight(row);
54900
+ const customRowHeight = table.options.customComputeRowHeight(computeArgs);
54901
+ return "number" == typeof customRowHeight ? customRowHeight : "auto" === customRowHeight ? getRealHeight() : table.getDefaultRowHeight(row);
54796
54902
  }
54797
54903
  if (table.internalProps.rowHeightConfig) {
54798
54904
  const rowHeightConfig = table.internalProps.rowHeightConfig.find(item => item.key === row);
@@ -54889,17 +54995,18 @@
54889
54995
  renderDefault = !1,
54890
54996
  enableCellPadding = !1;
54891
54997
  (table.isHeader(col, row) || (null === (_a = table.getBodyColumnDefine(col, row)) || void 0 === _a ? void 0 : _a.mergeCell) || table.hasCustomMerge()) && (cellRange = table.getCellRange(col, row), spanRow = cellRange.end.row - cellRange.start.row + 1);
54892
- const arg = {
54893
- col: null !== (_b = null == cellRange ? void 0 : cellRange.start.col) && void 0 !== _b ? _b : col,
54894
- row: null !== (_c = null == cellRange ? void 0 : cellRange.start.row) && void 0 !== _c ? _c : row,
54895
- dataValue: table.getCellOriginValue(col, row),
54896
- value: table.getCellValue(col, row),
54897
- rect: getCellRect$1(col, row, table),
54898
- table: table,
54899
- originCol: col,
54900
- originRow: row,
54901
- forComputation: !0
54902
- };
54998
+ const skipCellValue = shouldSkipCustomRenderCellValueForComputation$1(col, row, table),
54999
+ arg = {
55000
+ col: null !== (_b = null == cellRange ? void 0 : cellRange.start.col) && void 0 !== _b ? _b : col,
55001
+ row: null !== (_c = null == cellRange ? void 0 : cellRange.start.row) && void 0 !== _c ? _c : row,
55002
+ dataValue: skipCellValue ? void 0 : table.getCellOriginValue(col, row),
55003
+ value: skipCellValue ? void 0 : table.getCellValue(col, row),
55004
+ rect: getCellRect$1(col, row, table),
55005
+ table: table,
55006
+ originCol: col,
55007
+ originRow: row,
55008
+ forComputation: !0
55009
+ };
54903
55010
  if ("react-custom-layout" === customLayout && (customLayout = (null === (_d = table.reactCustomLayout) || void 0 === _d ? void 0 : _d.getCustomLayoutFunc(col, row)) || emptyCustomLayout), isFunction$3(customLayout)) {
54904
55011
  const customLayoutObj = customLayout(arg);
54905
55012
  customLayoutObj.rootContainer ? (customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer), dealPercentCalc(customLayoutObj.rootContainer, table.getColWidth(col), 0), customLayoutObj.rootContainer.setStage(table.scenegraph.stage), height = null !== (_e = customLayoutObj.rootContainer.AABBBounds.height()) && void 0 !== _e ? _e : 0, renderDefault = customLayoutObj.renderDefault, enableCellPadding = customLayoutObj.enableCellPadding) : (height = 0, renderDefault = customLayoutObj.renderDefault, enableCellPadding = customLayoutObj.enableCellPadding);
@@ -54913,11 +55020,15 @@
54913
55020
  height += padding[0] + padding[2];
54914
55021
  }
54915
55022
  return {
54916
- height: height / spanRow,
55023
+ height: getMergedCellSingleRowHeight(height / spanRow, spanRow, table),
54917
55024
  renderDefault: renderDefault
54918
55025
  };
54919
55026
  }
54920
55027
  }
55028
+ function shouldSkipCustomRenderCellValueForComputation$1(col, row, table) {
55029
+ var _a, _b;
55030
+ return table.isListTable() && !table.isHeader(col, row) && !(null === (_b = null === (_a = table.internalProps.dataSource) || void 0 === _a ? void 0 : _a.dataSourceObj) || void 0 === _b ? void 0 : _b.records);
55031
+ }
54921
55032
  function computeTextHeight(col, row, cellType, table) {
54922
55033
  var _a, _b, _c, _d;
54923
55034
  let maxHeight = 0;
@@ -55001,7 +55112,14 @@
55001
55112
  maxHeight = (bounds.height() || ("number" == typeof lineHeight ? lineHeight : fontSize)) + (underline ? underlineOffset : 0);
55002
55113
  } else maxHeight = (null === (_d = table.options.customConfig) || void 0 === _d ? void 0 : _d.multilinesForXTable) ? lineHeight : lines.length * lineHeight;
55003
55114
  }
55004
- return (Math.max(maxHeight, iconHeight) + padding[0] + padding[2]) / spanRow;
55115
+ return getMergedCellSingleRowHeight((Math.max(maxHeight, iconHeight) + padding[0] + padding[2]) / spanRow, spanRow, table);
55116
+ }
55117
+ function getMergedCellSingleRowHeight(height, spanRow, table) {
55118
+ var _a;
55119
+ if (spanRow <= 1) return height;
55120
+ const configuredMinHeight = null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.minSingleRowHeight,
55121
+ minSingleRowHeight = isNumber$3(configuredMinHeight) && configuredMinHeight > 0 ? configuredMinHeight : 2;
55122
+ return Math.max(height, minSingleRowHeight);
55005
55123
  }
55006
55124
  function getCellRect$1(col, row, table) {
55007
55125
  return {
@@ -55057,7 +55175,7 @@
55057
55175
  const headerStyle = scene.table._getCellStyle(col, row),
55058
55176
  padding = getQuadProps(getProp("padding", headerStyle, col, row, scene.table));
55059
55177
  Factory.getFunction("createSparkLineCellGroup")(cell, cell.parent, cell.attribute.x, cell.attribute.y, col, row, cell.attribute.width, cell.attribute.height, padding, scene.table, getStyleTheme(headerStyle, scene.table, col, row, getProp).theme, !1);
55060
- } else if ("image" === type || "video" === type) updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);else if ("axis" === (null === (_b = cell.firstChild) || void 0 === _b ? void 0 : _b.name)) null === (_c = cell.firstChild) || void 0 === _c || _c.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
55178
+ } else if ("image" === type || "video" === type || "audio" === type) updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);else if ("axis" === (null === (_b = cell.firstChild) || void 0 === _b ? void 0 : _b.name)) null === (_c = cell.firstChild) || void 0 === _c || _c.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
55061
55179
  let renderDefault = !0;
55062
55180
  const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
55063
55181
  if (customContainer) {
@@ -55258,7 +55376,7 @@
55258
55376
  const headerStyle = scene.table._getCellStyle(col, row),
55259
55377
  padding = getQuadProps(getProp("padding", headerStyle, col, row, scene.table));
55260
55378
  Factory.getFunction("createSparkLineCellGroup")(cellGroup, cellGroup.parent, cellGroup.attribute.x, cellGroup.attribute.y, col, row, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table, getStyleTheme(headerStyle, scene.table, col, row, getProp).theme, !1);
55261
- } else if ("image" === type || "video" === type) updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);else if ("axis" === (null === (_b = cellGroup.firstChild) || void 0 === _b ? void 0 : _b.name)) {
55379
+ } else if ("image" === type || "video" === type || "audio" === type) updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);else if ("axis" === (null === (_b = cellGroup.firstChild) || void 0 === _b ? void 0 : _b.name)) {
55262
55380
  const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row),
55263
55381
  cellStyle = scene.table._getCellStyle(col, row),
55264
55382
  padding = getQuadProps(getProp("padding", cellStyle, col, row, scene.table));
@@ -56783,17 +56901,18 @@
56783
56901
  renderDefault = !1,
56784
56902
  enableCellPadding = !1;
56785
56903
  (table.isHeader(col, row) || (null === (_a = table.getBodyColumnDefine(col, row)) || void 0 === _a ? void 0 : _a.mergeCell) || table.hasCustomMerge()) && (cellRange = table.getCellRange(col, row), spanCol = cellRange.end.col - cellRange.start.col + 1);
56786
- const arg = {
56787
- col: null !== (_b = null == cellRange ? void 0 : cellRange.start.col) && void 0 !== _b ? _b : col,
56788
- row: null !== (_c = null == cellRange ? void 0 : cellRange.start.row) && void 0 !== _c ? _c : row,
56789
- dataValue: table.getCellOriginValue(col, row),
56790
- value: table.getCellValue(col, row),
56791
- rect: getCellRect(col, row, table),
56792
- table: table,
56793
- originCol: col,
56794
- originRow: row,
56795
- forComputation: !0
56796
- };
56904
+ const skipCellValue = shouldSkipCustomRenderCellValueForComputation(col, row, table),
56905
+ arg = {
56906
+ col: null !== (_b = null == cellRange ? void 0 : cellRange.start.col) && void 0 !== _b ? _b : col,
56907
+ row: null !== (_c = null == cellRange ? void 0 : cellRange.start.row) && void 0 !== _c ? _c : row,
56908
+ dataValue: skipCellValue ? void 0 : table.getCellOriginValue(col, row),
56909
+ value: skipCellValue ? void 0 : table.getCellValue(col, row),
56910
+ rect: getCellRect(col, row, table),
56911
+ table: table,
56912
+ originCol: col,
56913
+ originRow: row,
56914
+ forComputation: !0
56915
+ };
56797
56916
  if ("react-custom-layout" === customLayout && (customLayout = (null === (_d = table.reactCustomLayout) || void 0 === _d ? void 0 : _d.getCustomLayoutFunc(col, row)) || emptyCustomLayout), isFunction$3(customLayout)) {
56798
56917
  const customLayoutObj = customLayout(arg);
56799
56918
  if (customLayoutObj.rootContainer) {
@@ -56816,6 +56935,10 @@
56816
56935
  };
56817
56936
  }
56818
56937
  }
56938
+ function shouldSkipCustomRenderCellValueForComputation(col, row, table) {
56939
+ var _a, _b;
56940
+ return table.isListTable() && !table.isHeader(col, row) && !(null === (_b = null === (_a = table.internalProps.dataSource) || void 0 === _a ? void 0 : _a.dataSourceObj) || void 0 === _b ? void 0 : _b.records);
56941
+ }
56819
56942
  function computeTextWidth(col, row, cellType, table) {
56820
56943
  var _a, _b, _c, _d;
56821
56944
  let maxWidth = 0;
@@ -57071,9 +57194,10 @@
57071
57194
  }
57072
57195
  const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row);
57073
57196
  if (isPromise(value)) {
57074
- createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup), dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
57197
+ const cellGroup = createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup),
57198
+ updateToken = nextPromiseCellUpdateToken(cellGroup);
57199
+ dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
57075
57200
  type: type,
57076
- value: value,
57077
57201
  define: define,
57078
57202
  table: table,
57079
57203
  col: col,
@@ -57088,7 +57212,10 @@
57088
57212
  cellLocation: cellLocation,
57089
57213
  range: range,
57090
57214
  customResult: customResult,
57091
- defaultRowHeight: defaultRowHeight
57215
+ defaultRowHeight: defaultRowHeight,
57216
+ promiseValue: value,
57217
+ oldCellGroup: cellGroup,
57218
+ updateToken: updateToken
57092
57219
  })), columnGroup.updateColumnRowNumber(row);
57093
57220
  const height = table.getRowHeight(row);
57094
57221
  columnGroup.updateColumnHeight(height), y += height;
@@ -57115,30 +57242,33 @@
57115
57242
  height: y
57116
57243
  };
57117
57244
  }
57118
- function callCreateCellForPromiseValue(createCellArgs) {
57245
+ function callCreateCellForPromiseValue(createCellArgs, resolvedValue) {
57119
57246
  let padding, textAlign, textBaseline;
57120
57247
  const {
57121
- type: type,
57122
- value: value,
57123
- define: define,
57124
- table: table,
57125
- col: col,
57126
- row: row,
57127
- colWidth: colWidth,
57128
- cellWidth: cellWidth,
57129
- cellHeight: cellHeight,
57130
- columnGroup: columnGroup,
57131
- y: y,
57132
- cellLocation: cellLocation,
57133
- mayHaveIcon: mayHaveIcon,
57134
- customStyle: customStyle,
57135
- range: range,
57136
- customResult: customResult,
57137
- defaultRowHeight: defaultRowHeight
57138
- } = createCellArgs,
57139
- cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
57248
+ type: type,
57249
+ define: define,
57250
+ table: table,
57251
+ col: col,
57252
+ row: row,
57253
+ colWidth: colWidth,
57254
+ cellWidth: cellWidth,
57255
+ cellHeight: cellHeight,
57256
+ columnGroup: columnGroup,
57257
+ y: y,
57258
+ cellLocation: cellLocation,
57259
+ mayHaveIcon: mayHaveIcon,
57260
+ customStyle: customStyle,
57261
+ range: range,
57262
+ customResult: customResult,
57263
+ defaultRowHeight: defaultRowHeight,
57264
+ promiseValue: promiseValue,
57265
+ oldCellGroup: oldCellGroup,
57266
+ updateToken: updateToken
57267
+ } = createCellArgs;
57268
+ if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) return;
57269
+ const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
57140
57270
  cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
57141
- cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), cellTheme.group.width = colWidth, cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight, cellTheme._vtable.padding && (padding = cellTheme._vtable.padding), cellTheme.text.textAlign && (textAlign = cellTheme.text.textAlign), cellTheme.text.textBaseline && (textBaseline = cellTheme.text.textBaseline), "body" === cellLocation || cellTheme.group.fill || (cellTheme.group.fill = "#fff"), createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
57271
+ cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), cellTheme.group.width = colWidth, cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight, cellTheme._vtable.padding && (padding = cellTheme._vtable.padding), cellTheme.text.textAlign && (textAlign = cellTheme.text.textAlign), cellTheme.text.textBaseline && (textBaseline = cellTheme.text.textBaseline), "body" === cellLocation || cellTheme.group.fill || (cellTheme.group.fill = "#fff"), createCell(type, promiseValue, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, resolvedValue);
57142
57272
  }
57143
57273
  function dealMerge(range, mergeMap, table, forceUpdate) {
57144
57274
  let cellWidth = 0,
@@ -57164,7 +57294,7 @@
57164
57294
  width: width,
57165
57295
  height: height
57166
57296
  });
57167
- cellGroup.role = "cell", cellGroup.col = col, cellGroup.row = row, columnGroup.addChild(cellGroup);
57297
+ return cellGroup.role = "cell", cellGroup.col = col, cellGroup.row = row, columnGroup.addChild(cellGroup), cellGroup;
57168
57298
  }
57169
57299
 
57170
57300
  function createColGroup(containerGroup, xOrigin, yOrigin, colStart, colEnd, rowStart, rowEnd, cellLocation, table, rowLimit) {
@@ -57198,6 +57328,22 @@
57198
57328
  containerGroup.setAttribute("width", x), containerGroup.setAttribute("height", heightMax);
57199
57329
  }
57200
57330
 
57331
+ function fillVisibleBodyRows$1(proxy, distRow) {
57332
+ const {
57333
+ table: table
57334
+ } = proxy,
57335
+ bodyBottomRow = table.rowCount - 1 - table.bottomFrozenRowCount,
57336
+ visibleBodyHeight = table.tableNoFrameHeight - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
57337
+ let targetRow = distRow;
57338
+ for (; targetRow < bodyBottomRow && table.getRowsHeight(table.frozenRowCount, targetRow) < visibleBodyHeight;) {
57339
+ const nextRow = targetRow + 1;
57340
+ computeRowsHeight(table, nextRow, nextRow, !1), targetRow = nextRow;
57341
+ }
57342
+ return targetRow;
57343
+ }
57344
+ function syncVisibleBodyRows(proxy, targetRow) {
57345
+ targetRow <= proxy.totalRow || (proxy.totalRow = targetRow, proxy.totalActualBodyRowCount = Math.max(proxy.totalActualBodyRowCount, targetRow - proxy.bodyTopRow + 1));
57346
+ }
57201
57347
  function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
57202
57348
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
57203
57349
  const {
@@ -57209,10 +57355,12 @@
57209
57355
  rightBottomCornerGroup: rightBottomCornerGroup
57210
57356
  } = table.scenegraph;
57211
57357
  let distCol, distRow, distColForCompute, distRowForCompute;
57212
- proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight || (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.forceComputeAllRowHeight) ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
57358
+ proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);
57359
+ let bodyDistRow = Math.min(proxy.bodyBottomRow, distRow - table.bottomFrozenRowCount);
57360
+ 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && (computeRowsHeight(table, 0, "auto" === table.options.canvasHeight || (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.forceComputeAllRowHeight) ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), "autoHeight" === table.heightMode && (bodyDistRow = fillVisibleBodyRows$1(proxy, bodyDistRow), syncVisibleBodyRows(proxy, bodyDistRow))), distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
57213
57361
  x: table.getFrozenColsWidth(),
57214
57362
  y: table.getFrozenRowsHeight()
57215
- }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_e = null !== (_c = null === (_b = bodyGroup.firstChild) || void 0 === _b ? void 0 : _b.rowNumber) && void 0 !== _c ? _c : null === (_d = rowHeaderGroup.firstChild) || void 0 === _d ? void 0 : _d.rowNumber) && void 0 !== _e ? _e : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_o = null !== (_l = null !== (_j = null !== (_g = null === (_f = bodyGroup.lastChild) || void 0 === _f ? void 0 : _f.col) && void 0 !== _g ? _g : null === (_h = colHeaderGroup.lastChild) || void 0 === _h ? void 0 : _h.col) && void 0 !== _j ? _j : null === (_k = rowHeaderGroup.lastChild) || void 0 === _k ? void 0 : _k.col) && void 0 !== _l ? _l : null === (_m = cornerHeaderGroup.lastChild) || void 0 === _m ? void 0 : _m.col) && void 0 !== _o ? _o : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
57363
+ }), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, bodyDistRow, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, bodyDistRow, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, bodyDistRow, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, bodyDistRow, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, bodyDistRow, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_e = null !== (_c = null === (_b = bodyGroup.firstChild) || void 0 === _b ? void 0 : _b.rowNumber) && void 0 !== _c ? _c : null === (_d = rowHeaderGroup.firstChild) || void 0 === _d ? void 0 : _d.rowNumber) && void 0 !== _e ? _e : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_o = null !== (_l = null !== (_j = null !== (_g = null === (_f = bodyGroup.lastChild) || void 0 === _f ? void 0 : _f.col) && void 0 !== _g ? _g : null === (_h = colHeaderGroup.lastChild) || void 0 === _h ? void 0 : _h.col) && void 0 !== _j ? _j : null === (_k = rowHeaderGroup.lastChild) || void 0 === _k ? void 0 : _k.col) && void 0 !== _l ? _l : null === (_m = cornerHeaderGroup.lastChild) || void 0 === _m ? void 0 : _m.col) && void 0 !== _o ? _o : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
57216
57364
  }
57217
57365
 
57218
57366
  function getFirstChild(containerGroup) {
@@ -57691,6 +57839,7 @@
57691
57839
  });
57692
57840
  }
57693
57841
 
57842
+ let stickTextUpdateId = 0;
57694
57843
  function resetTextStick(table) {
57695
57844
  const {
57696
57845
  changedCells: changedCells
@@ -57706,6 +57855,8 @@
57706
57855
  }
57707
57856
  function handleTextStick(table) {
57708
57857
  const changedCells = resetTextStick(table),
57858
+ horizontalUpdateId = ++stickTextUpdateId,
57859
+ verticalUpdateId = ++stickTextUpdateId,
57709
57860
  {
57710
57861
  scrollTop: scrollTop,
57711
57862
  scrollLeft: scrollLeft,
@@ -57728,42 +57879,53 @@
57728
57879
  for (let row = 0; row < frozenRowCount && !(colEnd < colStart); row++) [colStart, colEnd].forEach(col => {
57729
57880
  const style = table._getCellStyle(col, row);
57730
57881
  if ((null == style ? void 0 : style.textStick) && "vertical" !== (null == style ? void 0 : style.textStick)) {
57731
- adjustCellContentHorizontalLayout(table.scenegraph.getCell(col, row), frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
57882
+ adjustCellContentHorizontalLayout(table.scenegraph.getCell(col, row), frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table, horizontalUpdateId, {
57883
+ colStart: colStart,
57884
+ colEnd: colEnd,
57885
+ rowStart: row,
57886
+ rowEnd: row
57887
+ });
57732
57888
  }
57733
57889
  });
57734
57890
  for (let col = 0; col < frozenColCount && !(rowEnd < rowStart); col++) [rowStart, rowEnd].forEach(row => {
57735
57891
  const style = table._getCellStyle(col, row);
57736
57892
  if ((null == style ? void 0 : style.textStick) && "horizontal" !== (null == style ? void 0 : style.textStick)) {
57737
- adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
57893
+ adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table, verticalUpdateId, {
57894
+ colStart: col,
57895
+ colEnd: col,
57896
+ rowStart: rowStart,
57897
+ rowEnd: rowEnd
57898
+ });
57738
57899
  }
57739
57900
  });
57740
57901
  for (let col = colStart; col <= colEnd && !(rowEnd < rowStart); col++) [rowStart, rowEnd].forEach(row => {
57741
57902
  const style = table._getCellStyle(col, row);
57742
57903
  if ((null == style ? void 0 : style.textStick) && "horizontal" !== (null == style ? void 0 : style.textStick)) {
57743
- adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
57904
+ adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table, verticalUpdateId, {
57905
+ colStart: col,
57906
+ colEnd: col,
57907
+ rowStart: rowStart,
57908
+ rowEnd: rowEnd
57909
+ });
57744
57910
  }
57745
57911
  });
57746
57912
  for (let row = rowStart; row <= rowEnd && !(colEnd < colStart); row++) [colStart, colEnd].forEach(col => {
57747
57913
  const style = table._getCellStyle(col, row);
57748
57914
  if ((null == style ? void 0 : style.textStick) && "vertical" !== (null == style ? void 0 : style.textStick)) {
57749
- adjustCellContentHorizontalLayout(table.scenegraph.getCell(col, row), frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
57915
+ adjustCellContentHorizontalLayout(table.scenegraph.getCell(col, row), frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table, horizontalUpdateId, {
57916
+ colStart: colStart,
57917
+ colEnd: colEnd,
57918
+ rowStart: row,
57919
+ rowEnd: row
57920
+ });
57750
57921
  }
57751
57922
  });
57752
57923
  }
57753
57924
  }
57754
- function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign, table) {
57755
- if (isNumber$3(cellGroup.mergeStartCol) && isNumber$3(cellGroup.mergeStartRow) && isNumber$3(cellGroup.mergeEndCol) && isNumber$3(cellGroup.mergeEndRow)) {
57756
- const {
57757
- colStart: colStart,
57758
- colEnd: colEnd,
57759
- rowStart: rowStart,
57760
- rowEnd: rowEnd
57761
- } = getCellMergeRange(cellGroup, table.scenegraph);
57762
- for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
57763
- const singleCellGroup = table.scenegraph.getCell(col, row);
57764
- "cell" === singleCellGroup.role && dealVertical(singleCellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);
57765
- }
57766
- } else dealVertical(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);
57925
+ function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign, table, updateId, visibleRange) {
57926
+ dealMergedCellGroups(cellGroup, table, visibleRange, updateId, "verticalStickUpdateId", singleCellGroup => {
57927
+ dealVertical(singleCellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);
57928
+ });
57767
57929
  }
57768
57930
  function dealVertical(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign) {
57769
57931
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
@@ -57821,19 +57983,31 @@
57821
57983
  });
57822
57984
  }
57823
57985
  }
57824
- function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign, table) {
57986
+ function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign, table, updateId, visibleRange) {
57987
+ dealMergedCellGroups(cellGroup, table, visibleRange, updateId, "horizontalStickUpdateId", singleCellGroup => {
57988
+ dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);
57989
+ });
57990
+ }
57991
+ function dealMergedCellGroups(cellGroup, table, visibleRange, updateId, updateIdKey, dealCell) {
57825
57992
  if (isNumber$3(cellGroup.mergeStartCol) && isNumber$3(cellGroup.mergeStartRow) && isNumber$3(cellGroup.mergeEndCol) && isNumber$3(cellGroup.mergeEndRow)) {
57826
57993
  const {
57827
- colStart: colStart,
57828
- colEnd: colEnd,
57829
- rowStart: rowStart,
57830
- rowEnd: rowEnd
57831
- } = getCellMergeRange(cellGroup, table.scenegraph);
57832
- for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
57994
+ colStart: colStart,
57995
+ colEnd: colEnd,
57996
+ rowStart: rowStart,
57997
+ rowEnd: rowEnd
57998
+ } = getCellMergeRange(cellGroup, table.scenegraph),
57999
+ visibleColStart = Math.max(colStart, visibleRange.colStart),
58000
+ visibleColEnd = Math.min(colEnd, visibleRange.colEnd),
58001
+ visibleRowStart = Math.max(rowStart, visibleRange.rowStart),
58002
+ visibleRowEnd = Math.min(rowEnd, visibleRange.rowEnd);
58003
+ for (let col = visibleColStart; col <= visibleColEnd; col++) for (let row = visibleRowStart; row <= visibleRowEnd; row++) {
57833
58004
  const singleCellGroup = table.scenegraph.getCell(col, row);
57834
- "cell" === singleCellGroup.role && dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);
58005
+ "cell" === singleCellGroup.role && singleCellGroup[updateIdKey] !== updateId && (singleCellGroup[updateIdKey] = updateId, dealCell(singleCellGroup));
57835
58006
  }
57836
- } else dealHorizontal(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);
58007
+ } else {
58008
+ if (cellGroup[updateIdKey] === updateId) return;
58009
+ cellGroup[updateIdKey] = updateId, dealCell(cellGroup);
58010
+ }
57837
58011
  }
57838
58012
  function dealHorizontal(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign) {
57839
58013
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
@@ -57933,7 +58107,9 @@
57933
58107
  };
57934
58108
  class SceneProxy {
57935
58109
  constructor(table) {
57936
- this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount), "adaptive" === this.table.heightMode && (this.rowLimit = this.table.rowCount), "adaptive" === this.table.widthMode && (this.colLimit = this.table.colCount);
58110
+ this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table;
58111
+ const defaultRowHeight = this.getEstimatedRowHeightForProxy();
58112
+ this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount), "adaptive" === this.table.heightMode && (this.rowLimit = this.table.rowCount), "adaptive" === this.table.widthMode && (this.colLimit = this.table.colCount);
57937
58113
  }
57938
58114
  get bodyLeftCol() {
57939
58115
  return this.table.frozenColCount;
@@ -57957,7 +58133,7 @@
57957
58133
  this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
57958
58134
  const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
57959
58135
  this.totalActualBodyRowCount = totalActualBodyRowCount, this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow, this.rowEnd = this.totalRow;
57960
- const defaultRowHeight = this.table.defaultRowHeight;
58136
+ const defaultRowHeight = this.getEstimatedRowHeightForProxy();
57961
58137
  this.taskRowCount = 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
57962
58138
  const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount,
57963
58139
  totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
@@ -57980,11 +58156,16 @@
57980
58156
  this.taskColCount = 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
57981
58157
  const widthLimit = 5 * this.table.tableNoFrameWidth;
57982
58158
  this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth), this.firstScreenColLimit = this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth));
57983
- const defaultRowHeight = this.table.defaultRowHeight;
58159
+ const defaultRowHeight = this.getEstimatedRowHeightForProxy();
57984
58160
  this.taskRowCount = 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
57985
58161
  const heightLimit = 5 * this.table.tableNoFrameHeight;
57986
58162
  this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight), this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));
57987
58163
  }
58164
+ getEstimatedRowHeightForProxy() {
58165
+ var _a;
58166
+ const minSingleRowHeight = null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a.minSingleRowHeight;
58167
+ return "autoHeight" === this.table.heightMode ? isNumber$3(minSingleRowHeight) && minSingleRowHeight > 0 ? minSingleRowHeight : 2 : this.table.defaultRowHeight;
58168
+ }
57988
58169
  createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
57989
58170
  createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
57990
58171
  }
@@ -58631,10 +58812,12 @@
58631
58812
  rowUpdatePos = isValid$1(rowUpdatePos) ? isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
58632
58813
  }
58633
58814
  let updateAfter;
58634
- if (scene.table._clearRowRangeHeightsMap(), verifyProxyRowStatus(scene), addRows.forEach(row => {
58815
+ scene.table._clearRowRangeHeightsMap(), verifyProxyRowStatus(scene), addRows.forEach(row => {
58635
58816
  const needUpdateAfter = addRow(row, scene, skipUpdateProxy);
58636
58817
  updateAfter = null != updateAfter ? updateAfter : needUpdateAfter, rowHeightsMap.insert(row);
58637
- }), resetRowNumberAndY(scene), addRows.length) {
58818
+ });
58819
+ const filledVisibleRowStart = fillVisibleBodyRows(scene);
58820
+ if (isNumber$3(filledVisibleRowStart) && (updateAfter = null != updateAfter ? updateAfter : filledVisibleRowStart, rowUpdatePos = isValid$1(rowUpdatePos) ? Math.min(rowUpdatePos, filledVisibleRowStart) : filledVisibleRowStart), resetRowNumberAndY(scene), addRows.length) {
58638
58821
  const pos = _getUpdateRowIndex(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
58639
58822
  rowUpdatePos = isValid$1(rowUpdatePos) ? isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
58640
58823
  }
@@ -58702,6 +58885,24 @@
58702
58885
  }
58703
58886
  if (!(row < proxy.rowStart)) return row > proxy.rowEnd ? proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit ? (proxy.rowEnd++, proxy.currentRow++, addRowCellGroup(row, scene), row) : void 0 : proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit ? (proxy.rowEnd++, proxy.currentRow++, addRowCellGroup(row, scene), row) : row;
58704
58887
  }
58888
+ function fillVisibleBodyRows(scene) {
58889
+ const {
58890
+ table: table,
58891
+ proxy: proxy
58892
+ } = scene;
58893
+ if ("autoHeight" !== table.heightMode) return;
58894
+ const bodyBottomRow = table.rowCount - 1 - table.bottomFrozenRowCount,
58895
+ visibleBodyHeight = table.tableNoFrameHeight - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
58896
+ let targetRow = Math.min(proxy.rowEnd, bodyBottomRow);
58897
+ for (computeRowsHeight(table, proxy.rowStart, targetRow, !1); targetRow < bodyBottomRow && table.getRowsHeight(table.frozenRowCount, targetRow) < visibleBodyHeight;) {
58898
+ const nextRow = targetRow + 1;
58899
+ computeRowsHeight(table, nextRow, nextRow, !1), targetRow = nextRow;
58900
+ }
58901
+ if (targetRow <= proxy.rowEnd) return;
58902
+ const startRow = proxy.rowEnd + 1;
58903
+ for (let row = startRow; row <= targetRow; row++) addRowCellGroup(row, scene);
58904
+ return proxy.rowEnd = targetRow, proxy.currentRow = Math.max(proxy.currentRow, targetRow), proxy.totalRow = Math.max(proxy.totalRow, targetRow), proxy.totalActualBodyRowCount = Math.max(proxy.totalActualBodyRowCount, targetRow - proxy.rowStart + 1), proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, startRow), startRow;
58905
+ }
58705
58906
  function resetRowNumber(scene) {
58706
58907
  function processCell(cellGroup, rowIndex) {
58707
58908
  cellGroup.row = rowIndex;
@@ -59561,6 +59762,7 @@
59561
59762
  },
59562
59763
  placement: baseIcon.tooltip.placement
59563
59764
  },
59765
+ appearDelay: baseIcon.tooltip.appearDelay,
59564
59766
  disappearDelay: baseIcon.tooltip.disappearDelay,
59565
59767
  style: Object.assign({}, null === (_a = scene.table.internalProps.theme) || void 0 === _a ? void 0 : _a.tooltipStyle, null === (_b = baseIcon.tooltip) || void 0 === _b ? void 0 : _b.style)
59566
59768
  };
@@ -60373,70 +60575,109 @@
60373
60575
  this.proxy.resize(), ("adaptive" === this.table.widthMode || this.table.autoFillWidth) && (0 === this.table.internalProps._widthResizedColMap.size ? this.recalculateColWidths() : this.dealWidthMode()), "adaptive" === this.table.heightMode ? 0 === this.table.internalProps._heightResizedRowMap.size ? this.recalculateRowHeights() : this.dealHeightMode() : this.table.autoFillHeight && this.dealHeightMode(), this.resetFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), ("adaptive" === this.table.widthMode || "adaptive" === this.table.heightMode || this.table.autoFillWidth || this.table.autoFillHeight || (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) || (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height)) && this.updateChartSizeForResizeColWidth(-1), this.proxy.progress(), this.updateNextFrame();
60374
60576
  }
60375
60577
  updateTableSize() {
60376
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
60578
+ var _a, _b, _c;
60377
60579
  const contentWidth = Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, this.bottomFrozenGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, this.leftBottomCornerGroup.attribute.width, 0) + Math.max(this.rightTopCornerGroup.attribute.width, this.rightFrozenGroup.attribute.width, this.rightBottomCornerGroup.attribute.width, 0),
60378
60580
  contentHeight = Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.height, 0) + Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.height, 0) + Math.max(this.leftBottomCornerGroup.attribute.height, this.bottomFrozenGroup.attribute.height, this.rightBottomCornerGroup.attribute.height, 0);
60379
60581
  let tableWidth = contentWidth,
60380
60582
  tableHeight = contentHeight;
60381
- if (tableWidth = (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, contentWidth), tableHeight = (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, contentHeight), this.tableGroup.setAttributes({
60583
+ tableWidth = (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, contentWidth), tableHeight = (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, contentHeight), this.tableGroup.setAttributes({
60382
60584
  x: this.table.tableX,
60383
60585
  y: this.table.tableY,
60384
60586
  width: tableWidth,
60385
60587
  height: tableHeight
60386
- }), this.tableGroup.border) {
60387
- const rectAttributes = null === (_c = this.tableGroup.border) || void 0 === _c ? void 0 : _c.attribute;
60388
- let borderTop, borderRight, borderBottom, borderLeft;
60389
- (null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (_d = rectAttributes.lineWidth) && void 0 !== _d ? _d : 0, borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (_e = rectAttributes.lineWidth) && void 0 !== _e ? _e : 0, borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (_f = rectAttributes.lineWidth) && void 0 !== _f ? _f : 0, borderLeft = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[3] : null !== (_g = rectAttributes.lineWidth) && void 0 !== _g ? _g : 0) : (borderTop = null !== (_h = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _h ? _h : 0, borderRight = null !== (_j = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _j ? _j : 0, borderBottom = null !== (_k = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _k ? _k : 0, borderLeft = null !== (_l = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _l ? _l : 0), "rect" === this.tableGroup.border.type ? (null === (_m = this.table.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? this.tableGroup.border.setAttributes({
60390
- x: this.table.tableX + borderLeft / 2,
60391
- y: this.table.tableY + borderTop / 2,
60392
- width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
60393
- height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
60394
- }) : this.tableGroup.border.setAttributes({
60395
- x: this.table.tableX - borderLeft / 2,
60396
- y: this.table.tableY - borderTop / 2,
60397
- width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
60398
- height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
60399
- }) : "group" === this.tableGroup.border.type && ((null === (_o = this.table.theme.frameStyle) || void 0 === _o ? void 0 : _o.innerBorder) ? (this.tableGroup.border.setAttributes({
60400
- x: this.table.tableX + borderLeft / 2,
60401
- y: this.table.tableY + borderTop / 2,
60402
- width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
60403
- height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
60404
- }), null === (_p = this.tableGroup.border.firstChild) || void 0 === _p || _p.setAttributes({
60588
+ });
60589
+ const hasFrozenCols = this.table.frozenColCount > 0,
60590
+ hasRightFrozenCols = this.table.rightFrozenColCount > 0,
60591
+ hasFrozenRows = this.table.frozenRowCount > 0,
60592
+ hasBottomFrozenRows = this.table.bottomFrozenRowCount > 0;
60593
+ if (hasBottomFrozenRows) {
60594
+ const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(),
60595
+ topFrozenBottom = Math.max(this.colHeaderGroup.attribute.y + this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.y + this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.y + this.rightTopCornerGroup.attribute.height),
60596
+ middleContentBottom = Math.max(this.rowHeaderGroup.attribute.y + this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.y + this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.y + this.rightFrozenGroup.attribute.height, topFrozenBottom),
60597
+ bottomFrozenY = Math.min(this.tableGroup.attribute.height - bottomFrozenRowsHeight, middleContentBottom);
60598
+ this.bottomFrozenGroup.setAttribute("y", bottomFrozenY), this.leftBottomCornerGroup.setAttributes({
60599
+ visible: hasFrozenCols,
60600
+ y: bottomFrozenY,
60601
+ height: bottomFrozenRowsHeight,
60602
+ width: hasFrozenCols ? this.table.getFrozenColsWidth() : 0
60603
+ }), this.rightBottomCornerGroup.setAttributes({
60604
+ visible: hasRightFrozenCols,
60405
60605
  x: 0,
60406
- y: 0,
60407
- width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
60408
- height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
60409
- })) : (this.tableGroup.border.setAttributes({
60410
- x: this.table.tableX - borderLeft / 2,
60411
- y: this.table.tableY - borderTop / 2,
60412
- width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
60413
- height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
60414
- }), null === (_q = this.tableGroup.border.firstChild) || void 0 === _q || _q.setAttributes({
60415
- x: borderLeft / 2,
60416
- y: borderTop / 2,
60417
- width: this.tableGroup.attribute.width,
60418
- height: this.tableGroup.attribute.height
60419
- })));
60420
- }
60421
- this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("y", this.tableGroup.attribute.height - this.table.getBottomFrozenRowsHeight()), this.leftBottomCornerGroup.setAttributes({
60422
- visible: !0,
60423
- y: this.tableGroup.attribute.height - this.table.getBottomFrozenRowsHeight(),
60424
- height: this.table.getBottomFrozenRowsHeight(),
60425
- width: this.table.getFrozenColsWidth()
60426
- }), this.rightBottomCornerGroup.setAttributes({
60427
- visible: !0,
60428
- y: this.tableGroup.attribute.height - this.table.getBottomFrozenRowsHeight(),
60429
- height: this.table.getBottomFrozenRowsHeight()
60430
- })), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("x", this.tableGroup.attribute.width - this.table.getRightFrozenColsWidth()), this.rightTopCornerGroup.setAttributes({
60431
- visible: !0,
60432
- x: this.tableGroup.attribute.width - this.table.getRightFrozenColsWidth(),
60433
- width: this.table.getRightFrozenColsWidth(),
60434
- height: this.table.getFrozenRowsHeight()
60606
+ y: bottomFrozenY,
60607
+ width: 0,
60608
+ height: bottomFrozenRowsHeight
60609
+ });
60610
+ } else this.leftBottomCornerGroup.setAttributes({
60611
+ visible: !1,
60612
+ width: 0,
60613
+ height: 0
60435
60614
  }), this.rightBottomCornerGroup.setAttributes({
60436
- visible: !0,
60437
- x: this.tableGroup.attribute.width - this.table.getRightFrozenColsWidth(),
60438
- width: this.table.getRightFrozenColsWidth()
60439
- })), this.updateDomContainer();
60615
+ visible: !1,
60616
+ width: 0,
60617
+ height: 0
60618
+ });
60619
+ if (hasRightFrozenCols) {
60620
+ const rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
60621
+ middleContentRight = Math.max(this.colHeaderGroup.attribute.x + this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.x + this.bodyGroup.attribute.width, this.bottomFrozenGroup.attribute.x + this.bottomFrozenGroup.attribute.width),
60622
+ rightFrozenX = Math.min(this.tableGroup.attribute.width - rightFrozenColsWidth, middleContentRight);
60623
+ this.rightFrozenGroup.setAttribute("x", rightFrozenX), this.rightTopCornerGroup.setAttributes({
60624
+ visible: hasFrozenRows,
60625
+ x: rightFrozenX,
60626
+ width: hasFrozenRows ? rightFrozenColsWidth : 0,
60627
+ height: hasFrozenRows ? this.table.getFrozenRowsHeight() : 0
60628
+ }), this.rightBottomCornerGroup.setAttributes({
60629
+ visible: hasBottomFrozenRows,
60630
+ x: rightFrozenX,
60631
+ width: hasBottomFrozenRows ? rightFrozenColsWidth : 0,
60632
+ height: hasBottomFrozenRows ? this.table.getBottomFrozenRowsHeight() : 0
60633
+ });
60634
+ } else this.rightTopCornerGroup.setAttributes({
60635
+ visible: !1,
60636
+ width: 0,
60637
+ height: 0
60638
+ });
60639
+ if (hasBottomFrozenRows && !(null === (_c = this.table.containerFit) || void 0 === _c ? void 0 : _c.height)) {
60640
+ const actualContentBottom = Math.max(this.colHeaderGroup.attribute.y + this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.y + this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.y + this.rightTopCornerGroup.attribute.height, this.rowHeaderGroup.attribute.y + this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.y + this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.y + this.rightFrozenGroup.attribute.height, this.leftBottomCornerGroup.attribute.y + this.leftBottomCornerGroup.attribute.height, this.bottomFrozenGroup.attribute.y + this.bottomFrozenGroup.attribute.height, this.rightBottomCornerGroup.attribute.y + this.rightBottomCornerGroup.attribute.height);
60641
+ actualContentBottom > 0 && actualContentBottom < this.tableGroup.attribute.height && this.tableGroup.setAttribute("height", actualContentBottom);
60642
+ }
60643
+ this.updateTableGroupBorder(), this.updateDomContainer();
60644
+ }
60645
+ updateTableGroupBorder() {
60646
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
60647
+ if (!this.tableGroup.border) return;
60648
+ const rectAttributes = null === (_a = this.tableGroup.border) || void 0 === _a ? void 0 : _a.attribute;
60649
+ let borderTop, borderRight, borderBottom, borderLeft;
60650
+ (null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (_b = rectAttributes.lineWidth) && void 0 !== _b ? _b : 0, borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (_c = rectAttributes.lineWidth) && void 0 !== _c ? _c : 0, borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (_d = rectAttributes.lineWidth) && void 0 !== _d ? _d : 0, borderLeft = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[3] : null !== (_e = rectAttributes.lineWidth) && void 0 !== _e ? _e : 0) : (borderTop = null !== (_f = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _f ? _f : 0, borderRight = null !== (_g = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _g ? _g : 0, borderBottom = null !== (_h = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _h ? _h : 0, borderLeft = null !== (_j = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _j ? _j : 0), "rect" === this.tableGroup.border.type ? (null === (_k = this.table.theme.frameStyle) || void 0 === _k ? void 0 : _k.innerBorder) ? this.tableGroup.border.setAttributes({
60651
+ x: this.table.tableX + borderLeft / 2,
60652
+ y: this.table.tableY + borderTop / 2,
60653
+ width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
60654
+ height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
60655
+ }) : this.tableGroup.border.setAttributes({
60656
+ x: this.table.tableX - borderLeft / 2,
60657
+ y: this.table.tableY - borderTop / 2,
60658
+ width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
60659
+ height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
60660
+ }) : "group" === this.tableGroup.border.type && ((null === (_l = this.table.theme.frameStyle) || void 0 === _l ? void 0 : _l.innerBorder) ? (this.tableGroup.border.setAttributes({
60661
+ x: this.table.tableX + borderLeft / 2,
60662
+ y: this.table.tableY + borderTop / 2,
60663
+ width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
60664
+ height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
60665
+ }), null === (_m = this.tableGroup.border.firstChild) || void 0 === _m || _m.setAttributes({
60666
+ x: 0,
60667
+ y: 0,
60668
+ width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
60669
+ height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
60670
+ })) : (this.tableGroup.border.setAttributes({
60671
+ x: this.table.tableX - borderLeft / 2,
60672
+ y: this.table.tableY - borderTop / 2,
60673
+ width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
60674
+ height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
60675
+ }), null === (_o = this.tableGroup.border.firstChild) || void 0 === _o || _o.setAttributes({
60676
+ x: borderLeft / 2,
60677
+ y: borderTop / 2,
60678
+ width: this.tableGroup.attribute.width,
60679
+ height: this.tableGroup.attribute.height
60680
+ })));
60440
60681
  }
60441
60682
  updateRowHeight(row, detaY, skipTableHeightMap) {
60442
60683
  detaY = Math.round(detaY), updateRowHeight(this, row, detaY, skipTableHeightMap), this.updateContainerHeight(row, detaY);
@@ -60733,7 +60974,7 @@
60733
60974
  var _a;
60734
60975
  const type = (null === (_a = this.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge) ? "text" : this.table.getCellType(col, row),
60735
60976
  cellGroup = this.getCell(col, row);
60736
- "image" !== type && "video" !== type || updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, this.table);
60977
+ "image" !== type && "video" !== type && "audio" !== type || updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, this.table);
60737
60978
  }
60738
60979
  createFrameBorder() {
60739
60980
  var _a, _b, _c, _d, _e;
@@ -61713,7 +61954,12 @@
61713
61954
  colMax = Math.max(sourceMergeInfo.end.col, targetMergeInfo.end.col, oldSourceMergeInfo.end.col, oldTargetMergeInfo.end.col),
61714
61955
  rowMin = Math.min(sourceMergeInfo.start.row, targetMergeInfo.start.row, oldSourceMergeInfo.start.row, oldTargetMergeInfo.start.row);
61715
61956
  let rowMax = Math.max(sourceMergeInfo.end.row, targetMergeInfo.end.row, oldSourceMergeInfo.end.row, oldTargetMergeInfo.end.row);
61716
- "row" === moveContext.moveType && "tree" === state.table.internalProps.layoutMap.rowHierarchyType && (rowMax = moveContext.targetIndex > moveContext.sourceIndex ? rowMax + moveContext.targetSize - 1 : rowMax + moveContext.sourceSize - 1), state.table.transpose || !state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) && "row" !== state.columnMove.movingColumnOrRow || (state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex), state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex)), "column" === moveContext.moveType ? clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table) : clearWidthsAndHeightsCache(0, -1, rowMin, rowMax, state.table), state.table.clearCellStyleCache(), state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) || "row" === state.columnMove.movingColumnOrRow ? state.table.scenegraph.updateHeaderPosition(state.table.scenegraph.proxy.colStart, state.table.scenegraph.proxy.colEnd, state.table.scenegraph.proxy.rowStart, state.table.scenegraph.proxy.rowEnd, moveContext.moveType) : "column" === moveContext.moveType ? state.table.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType) : state.table.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType), "adjustFrozenCount" === state.table.internalProps.frozenColDragHeaderMode && state.table.isListTable() && (state.table.isLeftFrozenColumn(state.columnMove.colTarget) && !state.table.isLeftFrozenColumn(state.columnMove.colSource) ? state.table.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isLeftFrozenColumn(state.columnMove.colSource) && !state.table.isLeftFrozenColumn(state.columnMove.colTarget) && (state.table.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1), state.table.isRightFrozenColumn(state.columnMove.colTarget) && !state.table.isRightFrozenColumn(state.columnMove.colSource) ? state.table.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isRightFrozenColumn(state.columnMove.colSource) && !state.table.isRightFrozenColumn(state.columnMove.colTarget) && (state.table.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1)), moveColResult = !0;
61957
+ if ("row" === moveContext.moveType && "tree" === state.table.internalProps.layoutMap.rowHierarchyType && (rowMax = moveContext.targetIndex > moveContext.sourceIndex ? rowMax + moveContext.targetSize - 1 : rowMax + moveContext.sourceSize - 1), state.table.isListTable() && !state.table.transpose && (state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) || "row" === state.columnMove.movingColumnOrRow)) {
61958
+ const sourceRecordPath = state.table.getRecordIndexByCell(0, moveContext.sourceIndex),
61959
+ targetRecordPath = state.table.getRecordIndexByCell(0, moveContext.targetIndex);
61960
+ state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex), state.changeCheckboxOrder(sourceRecordPath, targetRecordPath), state.changeRadioOrder(sourceRecordPath, targetRecordPath);
61961
+ }
61962
+ "column" === moveContext.moveType ? clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table) : clearWidthsAndHeightsCache(0, -1, rowMin, rowMax, state.table), state.table.clearCellStyleCache(), state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource) || "row" === state.columnMove.movingColumnOrRow ? state.table.scenegraph.updateHeaderPosition(state.table.scenegraph.proxy.colStart, state.table.scenegraph.proxy.colEnd, state.table.scenegraph.proxy.rowStart, state.table.scenegraph.proxy.rowEnd, moveContext.moveType) : "column" === moveContext.moveType ? state.table.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType) : state.table.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType), "adjustFrozenCount" === state.table.internalProps.frozenColDragHeaderMode && state.table.isListTable() && (state.table.isLeftFrozenColumn(state.columnMove.colTarget) && !state.table.isLeftFrozenColumn(state.columnMove.colSource) ? state.table.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isLeftFrozenColumn(state.columnMove.colSource) && !state.table.isLeftFrozenColumn(state.columnMove.colTarget) && (state.table.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1), state.table.isRightFrozenColumn(state.columnMove.colTarget) && !state.table.isRightFrozenColumn(state.columnMove.colSource) ? state.table.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : state.table.isRightFrozenColumn(state.columnMove.colSource) && !state.table.isRightFrozenColumn(state.columnMove.colTarget) && (state.table.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1)), moveColResult = !0;
61717
61963
  }
61718
61964
  }
61719
61965
  return state.columnMove.moving = !1, setTimeout(() => {
@@ -61888,20 +62134,71 @@
61888
62134
  null == radio || radio._handlePointerUp();
61889
62135
  }
61890
62136
  }
61891
- function changeRadioOrder(sourceIndex, targetIndex, state) {
61892
- const {
61893
- radioState: radioState,
61894
- table: table
61895
- } = state;
61896
- if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex), targetIndex = table.getRecordShowIndexByCell(0, targetIndex)), sourceIndex > targetIndex) {
61897
- const sourceRecord = radioState[sourceIndex];
61898
- for (let i = sourceIndex; i > targetIndex; i--) radioState[i] = radioState[i - 1];
61899
- radioState[targetIndex] = sourceRecord;
61900
- } else if (sourceIndex < targetIndex) {
61901
- const sourceRecord = radioState[sourceIndex];
61902
- for (let i = sourceIndex; i < targetIndex; i++) radioState[i] = radioState[i + 1];
61903
- radioState[targetIndex] = sourceRecord;
62137
+ function normalizeRecordPath$1(recordPath) {
62138
+ return Array.isArray(recordPath) ? recordPath : [recordPath];
62139
+ }
62140
+ function parseRecordPathKey(key) {
62141
+ return isNumber$3(key) ? [key] : key.split(",").map(item => Number(item));
62142
+ }
62143
+ function isSameRecordPath$1(source, target) {
62144
+ return source.length === target.length && source.every((item, index) => item === target[index]);
62145
+ }
62146
+ function isSameParentPath$1(source, target) {
62147
+ return source.length === target.length && source.slice(0, -1).every((item, index) => item === target[index]);
62148
+ }
62149
+ function isDescendantPath$1(path, ancestor) {
62150
+ return ancestor.length <= path.length && ancestor.every((item, index) => item === path[index]);
62151
+ }
62152
+ function getMovedRecordPath$1(path, source, target) {
62153
+ return target.concat(path.slice(source.length));
62154
+ }
62155
+ function getShiftedSiblingPath$1(path, parent, sourceIndex, targetIndex) {
62156
+ if (path.length <= parent.length || !isDescendantPath$1(path.slice(0, parent.length), parent)) return path;
62157
+ const siblingIndex = path[parent.length];
62158
+ if (sourceIndex < targetIndex && siblingIndex > sourceIndex && siblingIndex <= targetIndex) {
62159
+ const shifted = [...path];
62160
+ return shifted[parent.length] = siblingIndex - 1, shifted;
62161
+ }
62162
+ if (sourceIndex > targetIndex && siblingIndex >= targetIndex && siblingIndex < sourceIndex) {
62163
+ const shifted = [...path];
62164
+ return shifted[parent.length] = siblingIndex + 1, shifted;
61904
62165
  }
62166
+ return path;
62167
+ }
62168
+ function getChangedRecordPath(path, sourcePath, targetPath) {
62169
+ const parentPath = sourcePath.slice(0, -1),
62170
+ sourceIndex = sourcePath[sourcePath.length - 1],
62171
+ targetIndex = targetPath[targetPath.length - 1];
62172
+ return isDescendantPath$1(path, sourcePath) ? getMovedRecordPath$1(path, sourcePath, targetPath) : getShiftedSiblingPath$1(path, parentPath, sourceIndex, targetIndex);
62173
+ }
62174
+ function getRadioStateValue(recordPath) {
62175
+ return 1 === recordPath.length ? recordPath[0] : recordPath;
62176
+ }
62177
+ function getRadioStateKey(recordPath) {
62178
+ return recordPath.toString();
62179
+ }
62180
+ function changeRadioStateValue(value, sourcePath, targetPath) {
62181
+ if (isNumber$3(value)) return getRadioStateValue(getChangedRecordPath([value], sourcePath, targetPath));
62182
+ if (Array.isArray(value)) return getRadioStateValue(getChangedRecordPath(value, sourcePath, targetPath));
62183
+ if (isString$2(value)) return getRadioStateKey(getChangedRecordPath(parseRecordPathKey(value), sourcePath, targetPath));
62184
+ if (isObject$8(value)) {
62185
+ const nextValue = {};
62186
+ return Object.keys(value).forEach(key => {
62187
+ const nextPath = getChangedRecordPath(parseRecordPathKey(key), sourcePath, targetPath);
62188
+ nextValue[getRadioStateKey(nextPath)] = value[key];
62189
+ }), nextValue;
62190
+ }
62191
+ return value;
62192
+ }
62193
+ function changeRadioOrder(sourceRecordPath, targetRecordPath, state) {
62194
+ const {
62195
+ radioState: radioState
62196
+ } = state,
62197
+ sourcePath = normalizeRecordPath$1(sourceRecordPath),
62198
+ targetPath = normalizeRecordPath$1(targetRecordPath);
62199
+ !isSameRecordPath$1(sourcePath, targetPath) && isSameParentPath$1(sourcePath, targetPath) && Object.keys(radioState).forEach(field => {
62200
+ radioState[field] = changeRadioStateValue(radioState[field], sourcePath, targetPath);
62201
+ });
61905
62202
  }
61906
62203
 
61907
62204
  function setCheckedState(col, row, field, checked, state) {
@@ -62014,47 +62311,70 @@
62014
62311
  } = checkbox.attribute;
62015
62312
  indeterminate ? (checked || checkbox._handlePointerUp(), checkbox._handlePointerUp()) : oldChecked ? checked || checkbox._handlePointerUp() : checked && checkbox._handlePointerUp();
62016
62313
  }
62314
+ function setCheckboxStateByRecordIndex(recordIndex, field, checked, table) {
62315
+ setRecordCheckboxState(recordIndex, field, checked, table.stateManager.checkedState), table.internalProps.enableCheckboxCascade && "indeterminate" !== checked && (updateChildrenCheckboxStateByRecordIndex(recordIndex, field, checked, table), updateParentCheckboxStateByRecordIndex(recordIndex, field, table)), updateVisibleCheckboxCellByRecordIndex(recordIndex, field, checked, table), updateHeaderCheckboxStateByField(field, table), renderCheckboxStateUpdate(table);
62316
+ }
62317
+ function clearCheckboxState(field, table) {
62318
+ isValid$1(field) && (clearRecordCheckboxState(table.records, field, table), updateVisibleCheckboxCellsByField(field, !1, table), updateHeaderCheckboxStateByField(field, table), renderCheckboxStateUpdate(table));
62319
+ }
62017
62320
  function setCellCheckboxStateByAttribute(col, row, checked, table) {
62018
62321
  var _a, _b;
62019
62322
  const cellGroup = table.scenegraph.getCell(col, row),
62020
62323
  checkbox = (null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox")) || (null === (_b = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox-content")) || void 0 === _a ? void 0 : _a._checkboxGroup) || void 0 === _b ? void 0 : _b.getChildByName("checkbox"));
62021
62324
  checkbox && ("indeterminate" === checked ? (checkbox.setAttribute("indeterminate", !0), checkbox.setAttribute("checked", void 0)) : (checkbox.setAttribute("indeterminate", void 0), checkbox.setAttribute("checked", checked)));
62022
62325
  }
62023
- function changeCheckboxOrder(sourceIndex, targetIndex, state) {
62024
- const {
62025
- checkedState: checkedState,
62026
- table: table
62027
- } = state;
62028
- let source, target;
62029
- if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.isPivotTable() ? void 0 : table.getRecordIndexByCell(0, sourceIndex), target = table.isPivotTable() ? void 0 : table.getRecordIndexByCell(0, targetIndex)), isNumber$3(source) && isNumber$3(target)) {
62030
- if ((sourceIndex = source) > (targetIndex = target)) {
62031
- const sourceRecord = checkedState.get(sourceIndex.toString());
62032
- for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
62033
- checkedState.set(targetIndex.toString(), sourceRecord);
62034
- } else if (sourceIndex < targetIndex) {
62035
- const sourceRecord = checkedState.get(sourceIndex.toString());
62036
- for (let i = sourceIndex; i < targetIndex; i++) checkedState.set(i.toString(), checkedState.get((i + 1).toString()));
62037
- checkedState.set(targetIndex.toString(), sourceRecord);
62038
- }
62039
- } else if (isArray$5(source) && isArray$5(target)) if ((sourceIndex = source[source.length - 1]) > (targetIndex = target[target.length - 1])) {
62040
- const sourceRecord = checkedState.get(source.toString());
62041
- for (let i = sourceIndex; i > targetIndex; i--) {
62042
- const now = [...source];
62043
- now[now.length - 1] = i;
62044
- const last = [...source];
62045
- last[last.length - 1] = i - 1, checkedState.set(now.toString(), checkedState.get(last.toString()));
62046
- }
62047
- checkedState.set(target.toString(), sourceRecord);
62048
- } else if (sourceIndex < targetIndex) {
62049
- const sourceRecord = checkedState.get(source.toString());
62050
- for (let i = sourceIndex; i < targetIndex; i++) {
62051
- const now = [...source];
62052
- now[now.length - 1] = i;
62053
- const next = [...source];
62054
- next[next.length - 1] = i + 1, checkedState.set(now.toString(), checkedState.get(next.toString()));
62055
- }
62056
- checkedState.set(target.toString(), sourceRecord);
62326
+ function normalizeRecordPath(recordPath) {
62327
+ return isArray$5(recordPath) ? recordPath : [recordPath];
62328
+ }
62329
+ function parseCheckboxStateKey(key) {
62330
+ return isNumber$3(key) ? [key] : key.split(",").map(item => Number(item));
62331
+ }
62332
+ function stringifyRecordPath(recordPath) {
62333
+ return recordPath.toString();
62334
+ }
62335
+ function isSameRecordPath(source, target) {
62336
+ return source.length === target.length && source.every((item, index) => item === target[index]);
62337
+ }
62338
+ function isSameParentPath(source, target) {
62339
+ return source.length === target.length && source.slice(0, -1).every((item, index) => item === target[index]);
62340
+ }
62341
+ function isDescendantPath(path, ancestor) {
62342
+ return ancestor.length <= path.length && ancestor.every((item, index) => item === path[index]);
62343
+ }
62344
+ function getMovedRecordPath(path, source, target) {
62345
+ return target.concat(path.slice(source.length));
62346
+ }
62347
+ function getShiftedSiblingPath(path, parent, sourceIndex, targetIndex) {
62348
+ if (path.length <= parent.length || !isDescendantPath(path.slice(0, parent.length), parent)) return path;
62349
+ const siblingIndex = path[parent.length];
62350
+ if (sourceIndex < targetIndex && siblingIndex > sourceIndex && siblingIndex <= targetIndex) {
62351
+ const shifted = [...path];
62352
+ return shifted[parent.length] = siblingIndex - 1, shifted;
62057
62353
  }
62354
+ if (sourceIndex > targetIndex && siblingIndex >= targetIndex && siblingIndex < sourceIndex) {
62355
+ const shifted = [...path];
62356
+ return shifted[parent.length] = siblingIndex + 1, shifted;
62357
+ }
62358
+ return path;
62359
+ }
62360
+ function changeCheckboxOrder(sourceRecordPath, targetRecordPath, state) {
62361
+ const {
62362
+ checkedState: checkedState
62363
+ } = state,
62364
+ sourcePath = normalizeRecordPath(sourceRecordPath),
62365
+ targetPath = normalizeRecordPath(targetRecordPath);
62366
+ if (isSameRecordPath(sourcePath, targetPath) || !isSameParentPath(sourcePath, targetPath)) return;
62367
+ const parentPath = sourcePath.slice(0, -1),
62368
+ sourceIndex = sourcePath[sourcePath.length - 1],
62369
+ targetIndex = targetPath[targetPath.length - 1],
62370
+ nextCheckedState = new Map();
62371
+ checkedState.forEach((value, key) => {
62372
+ const keyPath = parseCheckboxStateKey(key);
62373
+ let nextPath;
62374
+ nextPath = isDescendantPath(keyPath, sourcePath) ? getMovedRecordPath(keyPath, sourcePath, targetPath) : getShiftedSiblingPath(keyPath, parentPath, sourceIndex, targetIndex), nextCheckedState.set(stringifyRecordPath(nextPath), value);
62375
+ }), checkedState.clear(), nextCheckedState.forEach((value, key) => {
62376
+ checkedState.set(key, value);
62377
+ });
62058
62378
  }
62059
62379
  function getGroupCheckboxState(table) {
62060
62380
  const result = [],
@@ -62067,6 +62387,115 @@
62067
62387
  }
62068
62388
  }), result;
62069
62389
  }
62390
+ function normalizeRecordIndex(recordIndex) {
62391
+ return isArray$5(recordIndex) && 1 === recordIndex.length ? recordIndex[0] : recordIndex;
62392
+ }
62393
+ function setRecordCheckboxState(recordIndex, field, checked, checkedState) {
62394
+ const dataIndex = normalizeRecordIndex(recordIndex).toString();
62395
+ checkedState.get(dataIndex) ? checkedState.get(dataIndex)[field] = checked : checkedState.set(dataIndex, {
62396
+ [field]: checked
62397
+ });
62398
+ }
62399
+ function clearRecordCheckboxState(records, field, table, parentIndex = []) {
62400
+ isArray$5(records) && records.forEach((record, index) => {
62401
+ const recordIndex = parentIndex.length ? parentIndex.concat(index) : [index];
62402
+ !1 !== getRecordCheckboxState(recordIndex, record, field, table) && setRecordCheckboxState(recordIndex, field, !1, table.stateManager.checkedState), isArray$5(null == record ? void 0 : record.children) && clearRecordCheckboxState(record.children, field, table, recordIndex);
62403
+ });
62404
+ }
62405
+ function updateVisibleCheckboxCellByRecordIndex(recordIndex, field, checked, table) {
62406
+ var _a, _b;
62407
+ const bodyRowIndex = null === (_b = (_a = table).getBodyRowIndexByRecordIndex) || void 0 === _b ? void 0 : _b.call(_a, recordIndex);
62408
+ if (!isNumber$3(bodyRowIndex) || bodyRowIndex < 0) return;
62409
+ const row = bodyRowIndex + table.columnHeaderLevelCount;
62410
+ getCheckboxColsByField(field, row, table).forEach(col => {
62411
+ setCellCheckboxStateByAttribute(col, row, checked, table);
62412
+ });
62413
+ }
62414
+ function updateVisibleCheckboxCellsByField(field, checked, table) {
62415
+ const cols = getCheckboxColsByField(field, table.columnHeaderLevelCount, table);
62416
+ for (let row = table.columnHeaderLevelCount; row < table.rowCount; row++) cols.forEach(col => {
62417
+ setCellCheckboxStateByAttribute(col, row, checked, table);
62418
+ });
62419
+ }
62420
+ function renderCheckboxStateUpdate(table) {
62421
+ const renderAsync = table.renderAsync;
62422
+ isFunction$3(renderAsync) ? renderAsync.call(table) : table.render();
62423
+ }
62424
+ function updateHeaderCheckboxStateByField(field, table) {
62425
+ const fieldKey = field;
62426
+ let hasChecked = !1,
62427
+ hasUnchecked = !1,
62428
+ hasRecord = !1;
62429
+ traverseRecords(table.records, (record, recordIndex) => {
62430
+ const state = getRecordCheckboxState(recordIndex, record, field, table);
62431
+ hasRecord = !0, !0 === state ? hasChecked = !0 : "indeterminate" === state ? (hasChecked = !0, hasUnchecked = !0) : hasUnchecked = !0;
62432
+ });
62433
+ const checked = !(!hasRecord || !hasChecked || hasUnchecked) || !!hasChecked && "indeterminate";
62434
+ table.stateManager.headerCheckedState[fieldKey] = checked, updateVisibleHeaderCheckboxCellByField(field, checked, table);
62435
+ }
62436
+ function updateVisibleHeaderCheckboxCellByField(field, checked, table) {
62437
+ for (let row = 0; row < table.columnHeaderLevelCount; row++) for (let col = 0; col < table.colCount; col++) table.getHeaderField(col, row) === field && "checkbox" === table.getCellType(col, row) && table.scenegraph.updateHeaderCheckboxCellState(col, row, checked);
62438
+ }
62439
+ function getCheckboxColsByField(field, row, table) {
62440
+ const cols = [];
62441
+ for (let col = 0; col < table.colCount; col++) {
62442
+ if (table.isHeader(col, row)) continue;
62443
+ const define = table.getBodyColumnDefine(col, row);
62444
+ (null == define ? void 0 : define.field) === field && "checkbox" === table.getCellType(col, row) && cols.push(col);
62445
+ }
62446
+ return cols;
62447
+ }
62448
+ function updateChildrenCheckboxStateByRecordIndex(recordIndex, field, checked, table) {
62449
+ var _a;
62450
+ const record = getRecordByRecordIndex(table.records, recordIndex);
62451
+ (null === (_a = null == record ? void 0 : record.children) || void 0 === _a ? void 0 : _a.length) && record.children.forEach((child, childIndex) => {
62452
+ const childRecordIndex = normalizeRecordIndexToArray(recordIndex).concat(childIndex);
62453
+ setRecordCheckboxState(childRecordIndex, field, checked, table.stateManager.checkedState), updateVisibleCheckboxCellByRecordIndex(childRecordIndex, field, checked, table), updateChildrenCheckboxStateByRecordIndex(childRecordIndex, field, checked, table);
62454
+ });
62455
+ }
62456
+ function updateParentCheckboxStateByRecordIndex(recordIndex, field, table) {
62457
+ var _a;
62458
+ const recordIndexPath = normalizeRecordIndexToArray(recordIndex);
62459
+ for (let level = recordIndexPath.length - 1; level > 0; level--) {
62460
+ const parentIndex = recordIndexPath.slice(0, level),
62461
+ parentRecord = getRecordByRecordIndex(table.records, parentIndex);
62462
+ if (!(null === (_a = null == parentRecord ? void 0 : parentRecord.children) || void 0 === _a ? void 0 : _a.length)) continue;
62463
+ const childStates = parentRecord.children.map((child, childIndex) => {
62464
+ const childRecordIndex = parentIndex.concat(childIndex),
62465
+ childState = getRecordCheckboxState(childRecordIndex, child, field, table);
62466
+ return setRecordCheckboxState(childRecordIndex, field, childState, table.stateManager.checkedState), childState;
62467
+ }),
62468
+ allChecked = childStates.every(state => !0 === state),
62469
+ allUnchecked = childStates.every(state => !0 !== state && "indeterminate" !== state),
62470
+ parentState = !!allChecked || !allUnchecked && "indeterminate";
62471
+ setRecordCheckboxState(parentIndex, field, parentState, table.stateManager.checkedState), updateVisibleCheckboxCellByRecordIndex(parentIndex, field, parentState, table);
62472
+ }
62473
+ }
62474
+ function getRecordCheckboxState(recordIndex, record, field, table) {
62475
+ var _a;
62476
+ const fieldKey = field,
62477
+ dataIndex = normalizeRecordIndex(recordIndex).toString(),
62478
+ cachedState = null === (_a = table.stateManager.checkedState.get(dataIndex)) || void 0 === _a ? void 0 : _a[fieldKey];
62479
+ if (isValid$1(cachedState)) return cachedState;
62480
+ const value = null == record ? void 0 : record[fieldKey];
62481
+ return isObject$8(value) && isValid$1(value.checked) ? value.checked : "boolean" == typeof value && value;
62482
+ }
62483
+ function getRecordByRecordIndex(records, recordIndex) {
62484
+ const recordIndexPath = normalizeRecordIndexToArray(recordIndex);
62485
+ let record,
62486
+ currentRecords = records;
62487
+ for (let i = 0; i < recordIndexPath.length; i++) record = null == currentRecords ? void 0 : currentRecords[recordIndexPath[i]], currentRecords = null == record ? void 0 : record.children;
62488
+ return record;
62489
+ }
62490
+ function normalizeRecordIndexToArray(recordIndex) {
62491
+ return isArray$5(recordIndex) ? recordIndex : [recordIndex];
62492
+ }
62493
+ function traverseRecords(records, handler, parentIndex = []) {
62494
+ isArray$5(records) && records.forEach((record, index) => {
62495
+ const recordIndex = parentIndex.length ? parentIndex.concat(index) : index;
62496
+ handler(record, recordIndex), isArray$5(null == record ? void 0 : record.children) && traverseRecords(record.children, handler, isArray$5(recordIndex) ? recordIndex : [recordIndex]);
62497
+ });
62498
+ }
62070
62499
  function initRecordCheckState(records, state) {
62071
62500
  const table = state.table,
62072
62501
  start = table.isPivotTable() ? 0 : table.internalProps.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
@@ -62498,6 +62927,7 @@
62498
62927
  placement: inlineIcon.attribute.tooltip.placement
62499
62928
  },
62500
62929
  style: Object.assign({}, null === (_e = this.table.internalProps.theme) || void 0 === _e ? void 0 : _e.tooltipStyle, null === (_f = inlineIcon.tooltip) || void 0 === _f ? void 0 : _f.style, null === (_h = null === (_g = inlineIcon.attribute) || void 0 === _g ? void 0 : _g.tooltip) || void 0 === _h ? void 0 : _h.style),
62930
+ appearDelay: inlineIcon.attribute.tooltip.appearDelay,
62501
62931
  disappearDelay: inlineIcon.attribute.tooltip.disappearDelay
62502
62932
  };
62503
62933
  this.table.internalProps.tooltipHandler.isBinded(tooltipOptions) || this.table.showTooltip(col, row, tooltipOptions);
@@ -63082,16 +63512,117 @@
63082
63512
  syncRadioState(col, row, field, radioType, indexInCell, isChecked) {
63083
63513
  return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
63084
63514
  }
63085
- changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
63086
- this.checkedState.size && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
63515
+ changeCheckboxOrder(sourceRecordPath, targetRecordPath) {
63516
+ this.checkedState.size && changeCheckboxOrder(sourceRecordPath, targetRecordPath, this);
63517
+ }
63518
+ changeRadioOrder(sourceRecordPath, targetRecordPath) {
63519
+ Object.keys(this.radioState).length && changeRadioOrder(sourceRecordPath, targetRecordPath, this);
63087
63520
  }
63088
63521
  setCustomSelectRanges(customSelectRanges) {
63089
63522
  deletaCustomSelectRanges(this), addCustomSelectRanges(customSelectRanges, this);
63090
63523
  }
63091
63524
  };
63092
63525
 
63526
+ const AUDIO_EXTENSIONS = new Set(["mp3", "wav", "oga", "m4a", "aac", "flac", "opus"]);
63527
+ function isAudioUrl(value) {
63528
+ if ("string" != typeof value) return !1;
63529
+ const trimmedValue = value.trim(),
63530
+ queryIndex = trimmedValue.indexOf("?"),
63531
+ hashIndex = trimmedValue.indexOf("#");
63532
+ let endIndex = trimmedValue.length;
63533
+ queryIndex >= 0 && (endIndex = queryIndex), hashIndex >= 0 && hashIndex < endIndex && (endIndex = hashIndex);
63534
+ const path = trimmedValue.slice(0, endIndex),
63535
+ dotIndex = path.lastIndexOf(".");
63536
+ return !(dotIndex < 0 || dotIndex === path.length - 1) && AUDIO_EXTENSIONS.has(path.slice(dotIndex + 1).toLowerCase());
63537
+ }
63538
+
63539
+ const MEDIA_PREVIEW_MANAGER_KEY = "__vtable_media_preview_manager__";
63540
+ function formatAudioTime(time) {
63541
+ if (!Number.isFinite(time) || time < 0) return "0:00";
63542
+ return `${Math.floor(time / 60)}:${Math.floor(time % 60).toString().padStart(2, "0")}`;
63543
+ }
63544
+ function updateAudioProgressStyle(progress, value) {
63545
+ progress.style.background = `linear-gradient(\n to right,\n #2563EB 0%,\n #2563EB ${value}%,\n #D1D5DB ${value}%,\n #D1D5DB 100%\n )`;
63546
+ }
63547
+ function ensureAudioPreviewStyle() {
63548
+ const styleId = "vtable-audio-preview-style";
63549
+ if (document.getElementById(styleId)) return;
63550
+ const style = document.createElement("style");
63551
+ style.id = styleId, style.textContent = "\n .vtable-audio-preview-progress {\n -webkit-appearance: none;\n appearance: none;\n }\n .vtable-audio-preview-progress::-webkit-slider-runnable-track {\n height: 4px;\n border-radius: 999px;\n background: transparent;\n }\n .vtable-audio-preview-progress::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 12px;\n height: 12px;\n margin-top: -4px;\n border-radius: 50%;\n border: 0;\n background: #2563EB;\n }\n .vtable-audio-preview-progress::-moz-range-track {\n height: 4px;\n border-radius: 999px;\n background: transparent;\n }\n .vtable-audio-preview-progress::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 0;\n background: #2563EB;\n }\n ", document.head.appendChild(style);
63552
+ }
63553
+ function createAudioPreview(cellValue) {
63554
+ ensureAudioPreviewStyle();
63555
+ const audio = document.createElement("audio");
63556
+ audio.src = cellValue, audio.preload = "auto";
63557
+ let released = !1;
63558
+ const wrapper = document.createElement("div");
63559
+ wrapper.style.width = "80%", wrapper.style.maxWidth = "640px", wrapper.style.height = "54px", wrapper.style.boxSizing = "border-box", wrapper.style.padding = "0 16px", wrapper.style.borderRadius = "27px", wrapper.style.background = "#F8FAFC", wrapper.style.display = "flex", wrapper.style.alignItems = "center", wrapper.style.gap = "10px", wrapper.style.boxShadow = "0 8px 24px rgba(15, 23, 42, 0.16)";
63560
+ const playButton = document.createElement("button");
63561
+ playButton.type = "button", playButton.textContent = "▶", playButton.style.width = "34px", playButton.style.height = "34px", playButton.style.border = "1px solid #CBD5E1", playButton.style.borderRadius = "8px", playButton.style.background = "#EFF6FF", playButton.style.color = "#0F172A", playButton.style.cursor = "pointer", playButton.style.flex = "0 0 auto", playButton.style.fontSize = "14px";
63562
+ const timeLabel = document.createElement("span");
63563
+ timeLabel.textContent = "0:00 / 0:00", timeLabel.style.color = "#0F172A", timeLabel.style.font = "14px sans-serif", timeLabel.style.whiteSpace = "nowrap";
63564
+ const progress = document.createElement("input");
63565
+ progress.className = "vtable-audio-preview-progress", progress.type = "range", progress.min = "0", progress.max = "100", progress.value = "0", progress.step = "0.1", progress.style.flex = "1 1 auto", progress.style.height = "4px", progress.style.borderRadius = "999px", progress.style.outline = "none", progress.style.cursor = "pointer", progress.style.accentColor = "#2563EB", updateAudioProgressStyle(progress, 0);
63566
+ const updateProgress = () => {
63567
+ const duration = Number.isFinite(audio.duration) ? audio.duration : 0,
63568
+ currentTime = audio.currentTime || 0,
63569
+ value = duration > 0 ? Math.min(100, currentTime / duration * 100) : 0;
63570
+ progress.disabled = duration <= 0, progress.style.cursor = duration > 0 ? "pointer" : "default", progress.value = `${value}`, timeLabel.textContent = `${formatAudioTime(currentTime)} / ${formatAudioTime(duration)}`, updateAudioProgressStyle(progress, value);
63571
+ };
63572
+ return playButton.addEventListener("click", e => {
63573
+ if (e.stopPropagation(), audio.paused) {
63574
+ const playPromise = audio.play();
63575
+ playPromise && playPromise.catch(error => {
63576
+ released || "AbortError" === (null == error ? void 0 : error.name) || (playButton.textContent = "▶");
63577
+ });
63578
+ } else audio.pause();
63579
+ }), progress.addEventListener("click", e => {
63580
+ e.stopPropagation();
63581
+ }), progress.addEventListener("input", () => {
63582
+ const duration = Number.isFinite(audio.duration) ? audio.duration : 0,
63583
+ value = Number(progress.value);
63584
+ duration > 0 && Number.isFinite(value) && (audio.currentTime = duration * value / 100), updateProgress();
63585
+ }), audio.addEventListener("loadedmetadata", updateProgress), audio.addEventListener("durationchange", updateProgress), audio.addEventListener("timeupdate", updateProgress), audio.addEventListener("play", () => {
63586
+ playButton.textContent = "❚❚";
63587
+ }), audio.addEventListener("pause", () => {
63588
+ playButton.textContent = "▶";
63589
+ }), audio.addEventListener("ended", () => {
63590
+ audio.currentTime = 0, playButton.textContent = "▶", updateProgress();
63591
+ }), wrapper.appendChild(playButton), wrapper.appendChild(timeLabel), wrapper.appendChild(progress), wrapper.appendChild(audio), {
63592
+ element: wrapper,
63593
+ destroy: () => {
63594
+ released = !0, audio.pause(), audio.removeAttribute("src"), audio.load();
63595
+ }
63596
+ };
63597
+ }
63598
+ function createMediaPreviewManager(table) {
63599
+ const manager = {
63600
+ closePreview: null,
63601
+ registered: !1,
63602
+ close() {
63603
+ const closePreview = manager.closePreview;
63604
+ manager.closePreview = null, null == closePreview || closePreview();
63605
+ },
63606
+ open(closePreview) {
63607
+ manager.close(), manager.closePreview = closePreview;
63608
+ },
63609
+ release() {
63610
+ manager.close(), manager.registered = !1;
63611
+ },
63612
+ ensureRegistered() {
63613
+ manager.registered || (table.addReleaseObj(manager), manager.registered = !0);
63614
+ }
63615
+ };
63616
+ return manager;
63617
+ }
63618
+ function getMediaPreviewManager(table) {
63619
+ const tableWithManager = table;
63620
+ tableWithManager[MEDIA_PREVIEW_MANAGER_KEY] || (tableWithManager[MEDIA_PREVIEW_MANAGER_KEY] = createMediaPreviewManager(table));
63621
+ const manager = tableWithManager[MEDIA_PREVIEW_MANAGER_KEY];
63622
+ return manager.ensureRegistered(), manager;
63623
+ }
63093
63624
  function bindMediaClick(table) {
63094
- "browser" === Env$1.mode && table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
63625
+ "browser" === Env$1.mode && (getMediaPreviewManager(table), table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
63095
63626
  const {
63096
63627
  col: col,
63097
63628
  row: row
@@ -63147,25 +63678,57 @@
63147
63678
  clickToPreview: clickToPreview
63148
63679
  } = columnDefine;
63149
63680
  if (!1 === clickToPreview) return;
63150
- const overlay = document.createElement("div");
63151
- overlay.style.width = "100%", overlay.style.height = "100%", overlay.style.position = "fixed", overlay.style.top = "0", overlay.style.left = "0", overlay.style.backgroundColor = "rgba(30, 30, 30, 0.4)", overlay.style.display = "flex", overlay.style.justifyContent = "center", overlay.style.alignItems = "center", overlay.style.overflow = "hidden", overlay.style.zIndex = "9999", overlay.addEventListener("click", e => {
63152
- e.target === overlay && document.body.removeChild(overlay);
63681
+ const previewManager = getMediaPreviewManager(table),
63682
+ overlay = document.createElement("div");
63683
+ overlay.style.width = "100%", overlay.style.height = "100%", overlay.style.position = "fixed", overlay.style.top = "0", overlay.style.left = "0", overlay.style.backgroundColor = "rgba(30, 30, 30, 0.4)", overlay.style.display = "flex", overlay.style.justifyContent = "center", overlay.style.alignItems = "center", overlay.style.overflow = "hidden", overlay.style.zIndex = "9999";
63684
+ const closeOverlay = () => {
63685
+ overlay.parentNode && document.body.removeChild(overlay);
63686
+ };
63687
+ previewManager.open(closeOverlay), overlay.addEventListener("click", e => {
63688
+ e.target === overlay && previewManager.close();
63153
63689
  });
63154
63690
  const image = new Image();
63155
63691
  image.src = cellValue, image.style.maxWidth = "80%", image.style.maxHeight = "80%", image.style.backgroundColor = "#FFF", overlay.appendChild(image), document.body.appendChild(overlay);
63692
+ } else if ("audio" === cellType || "video" === cellType && isAudioUrl(cellValue)) {
63693
+ const {
63694
+ clickToPreview: clickToPreview
63695
+ } = columnDefine;
63696
+ if (!1 === clickToPreview) return;
63697
+ const previewManager = getMediaPreviewManager(table),
63698
+ overlay = document.createElement("div");
63699
+ overlay.style.width = "100%", overlay.style.height = "100%", overlay.style.position = "fixed", overlay.style.top = "0", overlay.style.left = "0", overlay.style.backgroundColor = "rgba(30, 30, 30, 0.4)", overlay.style.display = "flex", overlay.style.justifyContent = "center", overlay.style.alignItems = "center", overlay.style.overflow = "hidden", overlay.style.zIndex = "9999";
63700
+ const audioPreview = createAudioPreview(cellValue),
63701
+ closeOverlay = () => {
63702
+ audioPreview.destroy(), overlay.parentNode && document.body.removeChild(overlay);
63703
+ };
63704
+ previewManager.open(closeOverlay), overlay.addEventListener("click", e => {
63705
+ e.target === overlay && previewManager.close();
63706
+ }), overlay.appendChild(audioPreview.element), document.body.appendChild(overlay);
63156
63707
  } else if ("video" === cellType) {
63157
63708
  const {
63158
63709
  clickToPreview: clickToPreview
63159
63710
  } = columnDefine;
63160
63711
  if (!1 === clickToPreview) return;
63161
- const overlay = document.createElement("div");
63162
- overlay.style.width = "100%", overlay.style.height = "100%", overlay.style.position = "fixed", overlay.style.top = "0", overlay.style.left = "0", overlay.style.backgroundColor = "rgba(30, 30, 30, 0.4)", overlay.style.display = "flex", overlay.style.justifyContent = "center", overlay.style.alignItems = "center", overlay.style.overflow = "hidden", overlay.style.zIndex = "9999", overlay.addEventListener("click", e => {
63163
- e.target === overlay && document.body.removeChild(overlay);
63164
- });
63712
+ const previewManager = getMediaPreviewManager(table),
63713
+ overlay = document.createElement("div");
63714
+ overlay.style.width = "100%", overlay.style.height = "100%", overlay.style.position = "fixed", overlay.style.top = "0", overlay.style.left = "0", overlay.style.backgroundColor = "rgba(30, 30, 30, 0.4)", overlay.style.display = "flex", overlay.style.justifyContent = "center", overlay.style.alignItems = "center", overlay.style.overflow = "hidden", overlay.style.zIndex = "9999";
63165
63715
  const video = document.createElement("video");
63166
- video.src = cellValue, video.style.maxWidth = "80%", video.style.maxHeight = "80%", video.setAttribute("preload", "auto"), video.setAttribute("controls", "true"), overlay.appendChild(video), document.body.appendChild(overlay);
63716
+ video.src = cellValue, video.style.maxWidth = "80%", video.style.maxHeight = "80%", video.setAttribute("preload", "auto"), video.setAttribute("controls", "true");
63717
+ const closeOverlay = () => {
63718
+ try {
63719
+ video.pause();
63720
+ } catch (err) {}
63721
+ video.removeAttribute("src");
63722
+ try {
63723
+ video.load();
63724
+ } catch (err) {}
63725
+ overlay.parentNode && document.body.removeChild(overlay);
63726
+ };
63727
+ previewManager.open(closeOverlay), overlay.appendChild(video), overlay.addEventListener("click", e => {
63728
+ e.target === overlay && previewManager.close();
63729
+ }), document.body.appendChild(overlay);
63167
63730
  }
63168
- });
63731
+ }));
63169
63732
  }
63170
63733
 
63171
63734
  function bindDrillEvent(table) {
@@ -65429,7 +65992,9 @@
65429
65992
 
65430
65993
  class BodyHelper {
65431
65994
  constructor(_table) {
65432
- this._table = _table;
65995
+ this._table = _table, this.updateIcons();
65996
+ }
65997
+ updateIcons() {
65433
65998
  const regedIcons = get$4();
65434
65999
  this.expandIcon = regedIcons[InternalIconName.expandIconName], this.collapseIcon = regedIcons[InternalIconName.collapseIconName];
65435
66000
  }
@@ -65471,6 +66036,7 @@
65471
66036
  return TextStyle;
65472
66037
  case "image":
65473
66038
  case "video":
66039
+ case "audio":
65474
66040
  return ImageStyle$1;
65475
66041
  case "chart":
65476
66042
  case "sparkline":
@@ -66192,7 +66758,9 @@
66192
66758
 
66193
66759
  class HeaderHelper {
66194
66760
  constructor(_table) {
66195
- this._table = _table;
66761
+ this._table = _table, this.updateIcons();
66762
+ }
66763
+ updateIcons() {
66196
66764
  const regedIcons = get$4();
66197
66765
  this.freezeIcon = regedIcons[InternalIconName.freezeIconName], this.frozenIcon = regedIcons[InternalIconName.frozenIconName], this.frozenCurrentIcon = regedIcons[InternalIconName.frozenCurrentIconName], this.normalIcon = regedIcons[InternalIconName.normalIconName], this.upIcon = regedIcons[InternalIconName.upwardIconName], this.downIcon = regedIcons[InternalIconName.downwardIconName], this.dropDownAbsoluteIcon = regedIcons[InternalIconName.dropdownIconName], this.expandIcon = regedIcons[InternalIconName.expandIconName], this.collapseIcon = regedIcons[InternalIconName.collapseIconName];
66198
66766
  }
@@ -66427,6 +66995,7 @@
66427
66995
  return TextHeaderStyle;
66428
66996
  case "image":
66429
66997
  case "video":
66998
+ case "audio":
66430
66999
  return ImageStyle;
66431
67000
  case "checkbox":
66432
67001
  return CheckboxStyle;
@@ -66654,7 +67223,9 @@
66654
67223
 
66655
67224
  class RowSeriesNumberHelper {
66656
67225
  constructor(_table) {
66657
- this._table = _table;
67226
+ this._table = _table, this.updateIcons();
67227
+ }
67228
+ updateIcons() {
66658
67229
  const regedIcons = get$4();
66659
67230
  this.dragReorderIconName = regedIcons[InternalIconName.dragReorderIconName];
66660
67231
  }
@@ -67405,8 +67976,9 @@
67405
67976
  let PluginManager$1 = class PluginManager {
67406
67977
  constructor(table, options) {
67407
67978
  var _a;
67408
- this.plugins = new Map(), this.pluginEventMap = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
67409
- this.register(plugin), this._bindTableEventForPlugin(plugin);
67979
+ this.plugins = new Map(), this.pluginEventMap = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.forEach(plugin => {
67980
+ var _a;
67981
+ this.register(plugin), null === (_a = plugin.init) || void 0 === _a || _a.call(plugin, this.table, options), this._bindTableEventForPlugin(plugin);
67410
67982
  });
67411
67983
  }
67412
67984
  register(plugin) {
@@ -67431,16 +68003,17 @@
67431
68003
  this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
67432
68004
  });
67433
68005
  }
67434
- removeOrAddPlugins(plugins) {
68006
+ removeOrAddPlugins(plugins, options = this.table.options) {
67435
68007
  Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
67436
- var _a;
68008
+ var _a, _b;
67437
68009
  null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
67438
68010
  this.table.off(id);
67439
- }), this.release(), this.plugins.delete(plugin.id);
68011
+ }), this.pluginEventMap.delete(plugin.id), null === (_b = plugin.release) || void 0 === _b || _b.call(plugin, this.table), this.plugins.delete(plugin.id);
67440
68012
  });
67441
68013
  const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
67442
68014
  null == addedPlugins || addedPlugins.forEach(plugin => {
67443
- this.register(plugin), this._bindTableEventForPlugin(plugin);
68015
+ var _a;
68016
+ this.register(plugin), null === (_a = plugin.init) || void 0 === _a || _a.call(plugin, this.table, options), this._bindTableEventForPlugin(plugin);
67444
68017
  });
67445
68018
  }
67446
68019
  updatePlugins(plugins) {
@@ -67463,6 +68036,9 @@
67463
68036
  isTouchEvent: isTouchEvent$1
67464
68037
  } = event,
67465
68038
  rangeReg = /^\$(\d+)\$(\d+)$/;
68039
+ function normalizeCellType(cellType) {
68040
+ return isValid$1(cellType) ? cellType : "text";
68041
+ }
67466
68042
  importStyle$2();
67467
68043
  class BaseTable extends EventTarget$2 {
67468
68044
  static get EVENT_TYPE() {
@@ -67470,7 +68046,7 @@
67470
68046
  }
67471
68047
  constructor(container, options = {}) {
67472
68048
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
67473
- if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.5", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
68049
+ if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.7", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
67474
68050
  const g = window;
67475
68051
  g[this.id] = this;
67476
68052
  const registry = g.__vtable__ || (g.__vtable__ = {
@@ -67565,7 +68141,7 @@
67565
68141
  var _a, _b;
67566
68142
  return "node" === Env$1.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_b = null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : that.internalProps.pixelRatio) && void 0 !== _b ? _b : window.devicePixelRatio);
67567
68143
  }
67568
- }, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_r = options.theme) && void 0 !== _r ? _r : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_s = options.allowFrozenColCount) && void 0 !== _s ? _s : 0, internalProps.limitMaxAutoWidth = null !== (_t = options.limitMaxAutoWidth) && void 0 !== _t ? _t : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, this.scenegraph = new Scenegraph$1(this), this.stateManager = new StateManager$1(this), this.eventManager = new EventManager$1(this), this.animationManager = new TableAnimationManager(this), options.legends) {
68144
+ }, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_r = options.theme) && void 0 !== _r ? _r : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), this._updateFunctionalIcons(), container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_s = options.allowFrozenColCount) && void 0 !== _s ? _s : 0, internalProps.limitMaxAutoWidth = null !== (_t = options.limitMaxAutoWidth) && void 0 !== _t ? _t : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, this.scenegraph = new Scenegraph$1(this), this.stateManager = new StateManager$1(this), this.eventManager = new EventManager$1(this), this.animationManager = new TableAnimationManager(this), options.legends) {
67569
68145
  internalProps.legends = [];
67570
68146
  const createLegend = Factory.getFunction("createLegend");
67571
68147
  if (Array.isArray(options.legends)) {
@@ -68529,7 +69105,7 @@
68529
69105
  height: !1
68530
69106
  }), this.customRender = customRender, this.contentOffsetX = null != translateX ? translateX : 0, this.contentOffsetY = null != translateY ? translateY : 0, this.canvasWidth = isNumber$3(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$3(canvasHeight) ? canvasHeight : void 0;
68531
69107
  const internalProps = this.internalProps;
68532
- if ("node" === Env$1.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.groupTitleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_l = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _l ? _l : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _m ? _m : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_o = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _o ? _o : enableTreeStickCell, (null == updateConfig ? void 0 : updateConfig.clearColWidthCache) && (internalProps._widthResizedColMap.clear(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}), (null == updateConfig ? void 0 : updateConfig.clearRowHeightCache) && (internalProps._heightResizedRowMap.clear(), internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map()), internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_p = options.theme) && void 0 !== _p ? _p : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_q = options.allowFrozenColCount) && void 0 !== _q ? _q : 0, internalProps.limitMaxAutoWidth = null !== (_r = options.limitMaxAutoWidth) && void 0 !== _r ? _r : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_s = internalProps.legends) || void 0 === _s || _s.forEach(legend => {
69108
+ if ("node" === Env$1.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.groupTitleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_l = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _l ? _l : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _m ? _m : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_o = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _o ? _o : enableTreeStickCell, (null == updateConfig ? void 0 : updateConfig.clearColWidthCache) && (internalProps._widthResizedColMap.clear(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}), (null == updateConfig ? void 0 : updateConfig.clearRowHeightCache) && (internalProps._heightResizedRowMap.clear(), internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map()), internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_p = options.theme) && void 0 !== _p ? _p : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), this._updateFunctionalIcons(), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_q = options.allowFrozenColCount) && void 0 !== _q ? _q : 0, internalProps.limitMaxAutoWidth = null !== (_r = options.limitMaxAutoWidth) && void 0 !== _r ? _r : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_s = internalProps.legends) || void 0 === _s || _s.forEach(legend => {
68533
69109
  null == legend || legend.release();
68534
69110
  }), null === (_t = internalProps.title) || void 0 === _t || _t.release(), internalProps.title = null, null === (_u = internalProps.emptyTip) || void 0 === _u || _u.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
68535
69111
  internalProps.legends = [];
@@ -68801,7 +69377,13 @@
68801
69377
  colMax = Math.max(sourceMergeInfo.end.col, targetMergeInfo.end.col, oldSourceMergeInfo.end.col, oldTargetMergeInfo.end.col),
68802
69378
  rowMin = Math.min(sourceMergeInfo.start.row, targetMergeInfo.start.row, oldSourceMergeInfo.start.row, oldTargetMergeInfo.start.row);
68803
69379
  let rowMax = Math.max(sourceMergeInfo.end.row, targetMergeInfo.end.row, oldSourceMergeInfo.end.row, oldTargetMergeInfo.end.row);
68804
- if ("row" === moveContext.moveType && "tree" === this.internalProps.layoutMap.rowHierarchyType && (rowMax = moveContext.targetIndex > moveContext.sourceIndex ? rowMax + moveContext.targetSize - 1 : rowMax + moveContext.sourceSize - 1), this.transpose || !this.isSeriesNumberInBody(args.source.col, args.source.row) && "row" !== args.movingColumnOrRow || (this.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex), this.stateManager.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex)), "column" === moveContext.moveType) for (let col = colMin; col <= colMax; col++) this._clearColRangeWidthsMap(col);else for (let row = rowMin; row <= rowMax; row++) this._clearRowRangeHeightsMap(row);
69380
+ if ("row" === moveContext.moveType && "tree" === this.internalProps.layoutMap.rowHierarchyType && (rowMax = moveContext.targetIndex > moveContext.sourceIndex ? rowMax + moveContext.targetSize - 1 : rowMax + moveContext.sourceSize - 1), this.isListTable() && !this.transpose && (this.isSeriesNumberInBody(args.source.col, args.source.row) || "row" === args.movingColumnOrRow)) {
69381
+ const listTable = this,
69382
+ sourceRecordPath = listTable.getRecordIndexByCell(args.source.col, moveContext.sourceIndex),
69383
+ targetRecordPath = listTable.getRecordIndexByCell(args.target.col, moveContext.targetIndex);
69384
+ this.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex), this.stateManager.changeCheckboxOrder(sourceRecordPath, targetRecordPath), this.stateManager.changeRadioOrder(sourceRecordPath, targetRecordPath);
69385
+ }
69386
+ if ("column" === moveContext.moveType) for (let col = colMin; col <= colMax; col++) this._clearColRangeWidthsMap(col);else for (let row = rowMin; row <= rowMax; row++) this._clearRowRangeHeightsMap(row);
68805
69387
  return this.clearCellStyleCache(), this.isSeriesNumberInBody(args.source.col, args.source.row) || "row" === args.movingColumnOrRow ? this.scenegraph.updateHeaderPosition(this.scenegraph.proxy.colStart, this.scenegraph.proxy.colEnd, this.scenegraph.proxy.rowStart, this.scenegraph.proxy.rowEnd, moveContext.moveType) : "column" === moveContext.moveType ? this.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType) : this.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType), "adjustFrozenCount" === this.internalProps.frozenColDragHeaderMode && this.isListTable() && (this.isLeftFrozenColumn(args.target.col) && !this.isLeftFrozenColumn(args.source.col) ? this.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : this.isLeftFrozenColumn(args.source.col) && !this.isLeftFrozenColumn(args.target.col) && (this.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1), this.isRightFrozenColumn(args.target.col) && !this.isRightFrozenColumn(args.source.col) ? this.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1 : this.isRightFrozenColumn(args.source.col) && !this.isRightFrozenColumn(args.target.col) && (this.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1)), null === (_e = (_d = this.scenegraph).updateNextFrame) || void 0 === _e || _e.call(_d), !0;
68806
69388
  } finally {
68807
69389
  this.stateManager.columnMove.movingColumnOrRow = prevMoving;
@@ -68844,18 +69426,22 @@
68844
69426
  updateAutoWrapText(autoWrapText) {
68845
69427
  this.internalProps.autoWrapText !== autoWrapText && (this.internalProps.autoWrapText = autoWrapText, this.options.autoWrapText = autoWrapText, this.scenegraph.clearCells(), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.render());
68846
69428
  }
69429
+ _updateFunctionalIcons() {
69430
+ var _a, _b, _c;
69431
+ setIconColor(this.internalProps.theme.functionalIconsStyle), null === (_a = this.internalProps.headerHelper) || void 0 === _a || _a.updateIcons(), null === (_b = this.internalProps.bodyHelper) || void 0 === _b || _b.updateIcons(), null === (_c = this.internalProps.rowSeriesNumberHelper) || void 0 === _c || _c.updateIcons();
69432
+ }
68847
69433
  get theme() {
68848
69434
  return this.internalProps.theme;
68849
69435
  }
68850
69436
  set theme(theme) {
68851
- this.internalProps.theme = themes.of(null != theme ? theme : themes.DEFAULT), this.internalProps.theme.isPivot = this.isPivotTable(), this.options.theme = theme, setIconColor(this.internalProps.theme.functionalIconsStyle);
69437
+ this.internalProps.theme = themes.of(null != theme ? theme : themes.DEFAULT), this.internalProps.theme.isPivot = this.isPivotTable(), this.options.theme = theme, this._updateFunctionalIcons();
68852
69438
  }
68853
69439
  updateTheme(theme) {
68854
69440
  const oldHoverState = {
68855
69441
  col: this.stateManager.hover.cellPos.col,
68856
69442
  row: this.stateManager.hover.cellPos.row
68857
69443
  };
68858
- this.internalProps.theme = themes.of(null != theme ? theme : themes.DEFAULT), this.internalProps.theme.isPivot = this.isPivotTable(), setIconColor(this.internalProps.theme.functionalIconsStyle), this.options.theme = theme, this.scenegraph.updateComponent(), this.scenegraph.updateStageBackground(), this.scenegraph.clearCells(), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.render();
69444
+ this.internalProps.theme = themes.of(null != theme ? theme : themes.DEFAULT), this.internalProps.theme.isPivot = this.isPivotTable(), this._updateFunctionalIcons(), this.options.theme = theme, this.scenegraph.updateComponent(), this.scenegraph.updateStageBackground(), this.scenegraph.clearCells(), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.render();
68859
69445
  }
68860
69446
  getBodyField(col, row) {
68861
69447
  return this.internalProps.layoutMap.getBody(col, row).field;
@@ -68867,19 +69453,19 @@
68867
69453
  getBodyColumnType(col, row) {
68868
69454
  var _a, _b;
68869
69455
  const cellType = null !== (_b = null === (_a = this.internalProps.layoutMap.getBody(col, row)) || void 0 === _a ? void 0 : _a.cellType) && void 0 !== _b ? _b : "text";
68870
- return getProp("cellType", {
69456
+ return normalizeCellType(getProp("cellType", {
68871
69457
  cellType: cellType
68872
- }, col, row, this);
69458
+ }, col, row, this));
68873
69459
  }
68874
69460
  getCellType(col, row) {
68875
69461
  let cellType;
68876
69462
  if (this.isSeriesNumberInHeader(col, row)) {
68877
69463
  const seriesHeaderCellType = this.internalProps.layoutMap.getSeriesNumberHeader(col, row).cellType;
68878
- return "radio" === seriesHeaderCellType ? "text" : seriesHeaderCellType;
69464
+ return normalizeCellType("radio" === seriesHeaderCellType ? "text" : seriesHeaderCellType);
68879
69465
  }
68880
- return cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, getProp("cellType", {
69466
+ return cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, normalizeCellType(getProp("cellType", {
68881
69467
  cellType: cellType
68882
- }, col, row, this);
69468
+ }, col, row, this));
68883
69469
  }
68884
69470
  getHeaderField(col, row) {
68885
69471
  return this.internalProps.layoutMap.getHeaderField(col, row);
@@ -72459,6 +73045,7 @@
72459
73045
  } = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
72460
73046
  return title;
72461
73047
  }
73048
+ if (table.internalProps.layoutMap.isAggregation(col, row)) return "";
72462
73049
  let value;
72463
73050
  if (this.internalProps.groupBy) {
72464
73051
  const record = table.getCellRawRecord(col, row);
@@ -72506,6 +73093,7 @@
72506
73093
  } = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
72507
73094
  return title;
72508
73095
  }
73096
+ if (table.internalProps.layoutMap.isAggregation(col, row)) return "";
72509
73097
  const {
72510
73098
  format: format
72511
73099
  } = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
@@ -72603,7 +73191,7 @@
72603
73191
  }) {
72604
73192
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
72605
73193
  const internalProps = this.internalProps;
72606
- if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
73194
+ if (this.pluginManager.removeOrAddPlugins(options.plugins, options), super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
72607
73195
  addRecordRule: options.addRecordRule
72608
73196
  }, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$1(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
72609
73197
  const releaseObj = internalProps.releaseList[i];
@@ -72894,6 +73482,15 @@
72894
73482
  setCellCheckboxState(col, row, checked) {
72895
73483
  setCellCheckboxState(col, row, checked, this);
72896
73484
  }
73485
+ setCellCheckboxStateByRecordIndex(recordIndex, field, checked) {
73486
+ setCheckboxStateByRecordIndex(recordIndex, field, checked, this);
73487
+ }
73488
+ clearCheckboxState(field) {
73489
+ clearCheckboxState(field, this);
73490
+ }
73491
+ clearAllCheckboxState(field) {
73492
+ this.clearCheckboxState(field);
73493
+ }
72897
73494
  setCellRadioState(col, row, index) {
72898
73495
  setCellRadioState(col, row, index, this);
72899
73496
  }
@@ -72912,9 +73509,11 @@
72912
73509
  this.stateManager.endResizeIfResizing(), clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
72913
73510
  "undefined" != typeof window && window.performance.now();
72914
73511
  const oldHoverState = {
72915
- col: this.stateManager.hover.cellPos.col,
72916
- row: this.stateManager.hover.cellPos.row
72917
- };
73512
+ col: this.stateManager.hover.cellPos.col,
73513
+ row: this.stateManager.hover.cellPos.row
73514
+ },
73515
+ oldScrollLeft = this.stateManager.scroll.horizontalBarPos,
73516
+ oldScrollTop = this.stateManager.scroll.verticalBarPos;
72918
73517
  if (this.scenegraph.clearCells(), void 0 !== sort && (null === sort || !Array.isArray(sort) && isValid$1(sort.field) || Array.isArray(sort)) && (this.internalProps.sortState = this.internalProps.multipleSort ? Array.isArray(sort) ? sort : [sort] : sort, this.stateManager.setSortState(this.sortState)), records) {
72919
73518
  if (_setRecords(this, records), this.sortState) {
72920
73519
  const sortState = Array.isArray(this.sortState) ? this.sortState : [this.sortState];
@@ -72930,13 +73529,13 @@
72930
73529
  }
72931
73530
  this.refreshRowColCount();
72932
73531
  } else _setRecords(this, records);
72933
- this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize();
73532
+ this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.stateManager.scroll.horizontalBarPos = 0, this.stateManager.scroll.verticalBarPos = 0, this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize();
72934
73533
  if ((null !== (_c = this.options.componentLayoutOrder) && void 0 !== _c ? _c : ["legend", "title"]).forEach(component => {
72935
73534
  var _a, _b;
72936
73535
  "legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
72937
73536
  null == legend || legend.resize();
72938
73537
  }) : "title" === component && (null === (_b = this.internalProps.title) || void 0 === _b || _b.resize());
72939
- }), this.scenegraph.resize(), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();else {
73538
+ }), this.scenegraph.resize(), oldScrollLeft && this.stateManager.setScrollLeft(oldScrollLeft, void 0, !1), oldScrollTop && this.stateManager.setScrollTop(oldScrollTop, void 0, !1), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();else {
72940
73539
  const EmptyTip = Factory.getComponent("emptyTip");
72941
73540
  this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_e = this.internalProps.emptyTip) || void 0 === _e || _e.resetVisible();
72942
73541
  }
@@ -73252,9 +73851,11 @@
73252
73851
  }, 0));
73253
73852
  }
73254
73853
  updateRecords(records, recordIndexs, triggerEvent = !0) {
73255
- listTableUpdateRecords(records, recordIndexs, this), triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
73854
+ var _a;
73855
+ const updateRecordIndexs = null !== (_a = null != recordIndexs ? recordIndexs : null == records ? void 0 : records.map((_, index) => index)) && void 0 !== _a ? _a : [];
73856
+ listTableUpdateRecords(records, updateRecordIndexs, this), triggerEvent && this.fireListeners(TABLE_EVENT_TYPE.UPDATE_RECORD, {
73256
73857
  records: records,
73257
- recordIndexs: recordIndexs,
73858
+ recordIndexs: updateRecordIndexs,
73258
73859
  updateCount: records.length
73259
73860
  });
73260
73861
  }
@@ -75162,12 +75763,30 @@
75162
75763
  }
75163
75764
  release() {
75164
75765
  var _a, _b;
75766
+ this._clearPendingBind();
75165
75767
  const tooltipInstances = this._tooltipInstances;
75166
75768
  for (const k in tooltipInstances) null === (_b = null === (_a = tooltipInstances[k]) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a);
75167
- delete this._tooltipInstances, this._attachInfo = null;
75769
+ delete this._tooltipInstances, this._attachInfo = null, this._pendingInfo = null;
75168
75770
  }
75169
75771
  _bindToCell(col, row, tooltipOptions) {
75772
+ this._clearPendingBind();
75773
+ const appearDelay = null == tooltipOptions ? void 0 : tooltipOptions.appearDelay;
75774
+ if (tooltipOptions && appearDelay && appearDelay > 0) {
75775
+ this._unbindAttachedTooltip();
75776
+ const id = setTimeout(() => {
75777
+ this._pendingInfo = null, this._bindToCellImmediately(col, row, tooltipOptions);
75778
+ }, appearDelay);
75779
+ this._pendingInfo = {
75780
+ id: id,
75781
+ col: col,
75782
+ row: row,
75783
+ tooltipOptions: tooltipOptions
75784
+ };
75785
+ } else this._bindToCellImmediately(col, row, tooltipOptions);
75786
+ }
75787
+ _bindToCellImmediately(col, row, tooltipOptions) {
75170
75788
  var _a;
75789
+ if (!tooltipOptions) return void this._unbindAttachedTooltip();
75171
75790
  const info = this._attachInfo,
75172
75791
  instance = this._getTooltipInstanceInfo(col, row);
75173
75792
  if (!info || instance && info.instance === instance || (null === (_a = info.instance) || void 0 === _a || _a.unbindTooltipElement(), this._attachInfo = null), !instance) return;
@@ -75180,6 +75799,17 @@
75180
75799
  };
75181
75800
  }
75182
75801
  }
75802
+ _clearPendingBind() {
75803
+ this._pendingInfo && (clearTimeout(this._pendingInfo.id), this._pendingInfo = null);
75804
+ }
75805
+ _unbindAttachedTooltip() {
75806
+ const info = this._attachInfo;
75807
+ if (!info) return;
75808
+ const {
75809
+ instance: instance
75810
+ } = info;
75811
+ null == instance || instance.unbindTooltipElement(), this._attachInfo = null;
75812
+ }
75183
75813
  _move(col, row, tooltipOptions) {
75184
75814
  const info = this._attachInfo;
75185
75815
  if (!info || !cellInRange(info.range, col, row)) return;
@@ -75197,14 +75827,10 @@
75197
75827
  this._attachInfo.tooltipOptions.position = position, this._attachInfo.tooltipOptions.referencePosition = referencePosition, null == instance || instance.locateTooltipElement(col, row, position, referencePosition, this.confine);
75198
75828
  }
75199
75829
  _unbindFromCell() {
75200
- const info = this._attachInfo;
75201
- if (!info) return;
75202
- const {
75203
- instance: instance
75204
- } = info;
75205
- null == instance || instance.unbindTooltipElement(), this._attachInfo = null;
75830
+ this._clearPendingBind(), this._unbindAttachedTooltip();
75206
75831
  }
75207
75832
  _isBindCell(col, row) {
75833
+ if (this._pendingInfo && this._pendingInfo.col === col && this._pendingInfo.row === row) return !0;
75208
75834
  const info = this._attachInfo;
75209
75835
  return !!info && cellInRange(info.range, col, row);
75210
75836
  }
@@ -75295,8 +75921,8 @@
75295
75921
  return tooltipInstances && tooltipInstances["bubble-tooltip"] || tooltipInstances && (tooltipInstances["bubble-tooltip"] = TOOLTIP_INSTANCE_FACTORY["bubble-tooltip"](table));
75296
75922
  }
75297
75923
  isBinded(tooltipOptions) {
75298
- var _a;
75299
- return JSON.stringify(tooltipOptions) === JSON.stringify(null === (_a = this._attachInfo) || void 0 === _a ? void 0 : _a.tooltipOptions);
75924
+ var _a, _b;
75925
+ return JSON.stringify(tooltipOptions) === JSON.stringify(null === (_a = this._attachInfo) || void 0 === _a ? void 0 : _a.tooltipOptions) || JSON.stringify(tooltipOptions) === JSON.stringify(null === (_b = this._pendingInfo) || void 0 === _b ? void 0 : _b.tooltipOptions);
75300
75926
  }
75301
75927
  }
75302
75928
 
@@ -75561,7 +76187,7 @@
75561
76187
  cornerRadius: cellTheme.group.cornerRadius
75562
76188
  })).role = "cell", cellGroup.col = col, cellGroup.row = row, cellGroup = null !== (_0 = null == columnGroup ? void 0 : columnGroup.addCellGroup(cellGroup)) && void 0 !== _0 ? _0 : cellGroup);
75563
76189
  }
75564
- if (cellGroup.AABBBounds.width(), isNoChartDataRenderNothing && Array.isArray(table.getCellValue(col, row)) || !isNoChartDataRenderNothing) {
76190
+ if (cellGroup.AABBBounds.width(), isNoChartDataRenderNothing && Array.isArray(dataValue) || !isNoChartDataRenderNothing) {
75565
76191
  const chartGroup = new Chart(isShareChartSpec, {
75566
76192
  stroke: !1,
75567
76193
  x: padding[3],
@@ -75575,7 +76201,7 @@
75575
76201
  height: height - padding[2] - padding[0],
75576
76202
  chartInstance: chartInstance,
75577
76203
  dataId: dataId,
75578
- data: table.getCellValue(col, row) || [],
76204
+ data: dataValue || [],
75579
76205
  cellPadding: padding,
75580
76206
  dpr: table.internalProps.pixelRatio,
75581
76207
  detectPickChartItem: null === (_2 = table.options.customConfig) || void 0 === _2 ? void 0 : _2.detectPickChartItem,
@@ -75666,8 +76292,9 @@
75666
76292
  }
75667
76293
  }
75668
76294
 
75669
- function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, isCheckboxTree) {
76295
+ function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, isCheckboxTree, cellValue) {
75670
76296
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
76297
+ const value = arguments.length >= 20 ? cellValue : table.getCellValue(col, row);
75671
76298
  if (!cellGroup) {
75672
76299
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
75673
76300
  isAsync && (cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0)) && "cell" === cellGroup.role && cellGroup.setAttributes({
@@ -75728,7 +76355,7 @@
75728
76355
  "middle" === textBaseline ? child.setAttribute("y", (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", height - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]);
75729
76356
  });
75730
76357
  }
75731
- const checkboxComponent = createCheckbox(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, isCheckboxTree);
76358
+ const checkboxComponent = createCheckbox(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, isCheckboxTree, value);
75732
76359
  if (1 !== cellContentLeftIcons.length || cellContentLeftIcons[0].name !== InternalIconName.expandIconName && cellContentLeftIcons[0].name !== InternalIconName.collapseIconName) checkboxComponent && cellGroup.appendChild(checkboxComponent), checkboxComponent.render();else {
75733
76360
  const checkContent = new CheckboxContent({
75734
76361
  x: 0,
@@ -75763,7 +76390,7 @@
75763
76390
  }
75764
76391
  return width -= padding[1] + padding[3] + iconWidth, height -= padding[0] + padding[2], "center" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + (width - checkboxComponent.AABBBounds.width()) / 2) : "right" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + width - checkboxComponent.AABBBounds.width()) : checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth), "middle" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + (height - checkboxComponent.AABBBounds.height()) / 2) : "bottom" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + height - checkboxComponent.AABBBounds.height()) : checkboxComponent.setAttribute("y", padding[0]), cellGroup;
75765
76392
  }
75766
- function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree) {
76393
+ function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree, cellValue) {
75767
76394
  var _a, _b, _c, _d;
75768
76395
  const style = table._getCellStyle(col, row),
75769
76396
  size = getProp("size", style, col, row, table),
@@ -75777,7 +76404,7 @@
75777
76404
  disableCheckedStroke = getProp("disableCheckedStroke", style, col, row, table),
75778
76405
  checkIconImage = getProp("checkIconImage", style, col, row, table),
75779
76406
  indeterminateIconImage = getProp("indeterminateIconImage", style, col, row, table),
75780
- value = table.getCellValue(col, row),
76407
+ value = cellValue,
75781
76408
  dataValue = table.getCellOriginValue(col, row);
75782
76409
  let isChecked,
75783
76410
  isDisabled,
@@ -75852,11 +76479,12 @@
75852
76479
  return checkbox.name = "checkbox", checkbox;
75853
76480
  }
75854
76481
 
75855
- function createRadioCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define, range) {
75856
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
76482
+ function createRadioCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, cellValue) {
76483
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
76484
+ const value = arguments.length >= 18 ? cellValue : table.getCellValue(col, row);
75857
76485
  if (!cellGroup) {
75858
76486
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
75859
- (cellGroup = new Group$1({
76487
+ isAsync && (cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0)) && "cell" === cellGroup.role && cellGroup.setAttributes({
75860
76488
  x: xOrigin,
75861
76489
  y: yOrigin,
75862
76490
  width: width,
@@ -75871,17 +76499,32 @@
75871
76499
  lineCap: "butt",
75872
76500
  clip: !0,
75873
76501
  cornerRadius: cellTheme.group.cornerRadius
75874
- })).role = "cell", cellGroup.col = col, cellGroup.row = row, cellGroup = null !== (_o = null == columnGroup ? void 0 : columnGroup.addCellGroup(cellGroup)) && void 0 !== _o ? _o : cellGroup;
76502
+ }), cellGroup && "cell" === cellGroup.role || ((cellGroup = new Group$1({
76503
+ x: xOrigin,
76504
+ y: yOrigin,
76505
+ width: width,
76506
+ height: height,
76507
+ lineWidth: null !== (_p = null === (_o = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _o ? void 0 : _o.lineWidth) && void 0 !== _p ? _p : void 0,
76508
+ fill: null !== (_r = null === (_q = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _q ? void 0 : _q.fill) && void 0 !== _r ? _r : void 0,
76509
+ stroke: null !== (_t = null === (_s = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _s ? void 0 : _s.stroke) && void 0 !== _t ? _t : void 0,
76510
+ strokeArrayWidth: strokeArrayWidth,
76511
+ strokeArrayColor: null !== (_v = null === (_u = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _u ? void 0 : _u.strokeArrayColor) && void 0 !== _v ? _v : void 0,
76512
+ cursor: null !== (_x = null === (_w = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _w ? void 0 : _w.cursor) && void 0 !== _x ? _x : void 0,
76513
+ lineDash: null !== (_z = null === (_y = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _y ? void 0 : _y.lineDash) && void 0 !== _z ? _z : void 0,
76514
+ lineCap: "butt",
76515
+ clip: !0,
76516
+ cornerRadius: cellTheme.group.cornerRadius
76517
+ })).role = "cell", cellGroup.col = col, cellGroup.row = row, cellGroup = null !== (_0 = null == columnGroup ? void 0 : columnGroup.addCellGroup(cellGroup)) && void 0 !== _0 ? _0 : cellGroup);
75875
76518
  }
75876
76519
  const {
75877
76520
  width: radioWidth,
75878
76521
  height: radioHeight
75879
- } = createRadio(col, row, colWidth, width, height, padding, cellTheme, define, cellGroup, range, table);
76522
+ } = createRadio(col, row, colWidth, width, height, padding, cellTheme, define, cellGroup, range, table, value);
75880
76523
  return width -= padding[1] + padding[3], height -= padding[0] + padding[2], cellGroup.forEachChildren(radioComponent => {
75881
76524
  "center" === textAlign ? radioComponent.setAttribute("x", padding[3] + radioComponent.attribute.x + (width - radioWidth) / 2) : "right" === textAlign ? radioComponent.setAttribute("x", padding[3] + radioComponent.attribute.x + width - radioWidth) : radioComponent.setAttribute("x", padding[3] + radioComponent.attribute.x), "middle" === textBaseline ? radioComponent.setAttribute("y", padding[0] + radioComponent.attribute.y + (height - radioHeight) / 2) : "bottom" === textBaseline ? radioComponent.setAttribute("y", padding[0] + radioComponent.attribute.y + height - radioHeight) : radioComponent.setAttribute("y", padding[0] + radioComponent.attribute.y);
75882
76525
  }), cellGroup;
75883
76526
  }
75884
- function createRadio(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, cellGroup, range, table) {
76527
+ function createRadio(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, cellGroup, range, table, cellValue) {
75885
76528
  var _a, _b, _c, _d;
75886
76529
  const style = table._getCellStyle(col, row);
75887
76530
  let size = getProp("size", style, col, row, table),
@@ -75897,7 +76540,7 @@
75897
76540
  disableCheckedFill = getProp("disableCheckedFill", style, col, row, table),
75898
76541
  disableCheckedStroke = getProp("disableCheckedStroke", style, col, row, table);
75899
76542
  isNumber$3(outerRadius) ? size = 2 * outerRadius : outerRadius = Math.round(size / 2), (!isNumber$3(innerRadius) || innerRadius < 0) && (innerRadius = Math.round(outerRadius / 7 * 3));
75900
- const value = table.getCellValue(col, row),
76543
+ const value = cellValue,
75901
76544
  dataValue = table.getCellOriginValue(col, row),
75902
76545
  hierarchyOffset = getHierarchyOffset(col, row, table),
75903
76546
  cellStyle = table._getCellStyle(col, row),
@@ -75993,8 +76636,9 @@
75993
76636
  return null !== (_a = null != isDisabled ? isDisabled : globalDisable) && void 0 !== _a && _a;
75994
76637
  }
75995
76638
 
75996
- function createSwitchCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync) {
76639
+ function createSwitchCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, cellValue) {
75997
76640
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
76641
+ const value = arguments.length >= 19 ? cellValue : table.getCellValue(col, row);
75998
76642
  if (!cellGroup) {
75999
76643
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
76000
76644
  isAsync && (cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0)) && "cell" === cellGroup.role && cellGroup.setAttributes({
@@ -76050,10 +76694,10 @@
76050
76694
  "middle" === textBaseline ? child.setAttribute("y", (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", height - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]);
76051
76695
  });
76052
76696
  }
76053
- const switchComponent = createSwitch(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table);
76697
+ const switchComponent = createSwitch(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, value);
76054
76698
  return switchComponent && cellGroup.appendChild(switchComponent), switchComponent.render(), width -= padding[1] + padding[3] + iconWidth, height -= padding[0] + padding[2], "center" === textAlign ? switchComponent.setAttribute("x", padding[3] + cellLeftIconWidth + (width - switchComponent.AABBBounds.width()) / 2) : "right" === textAlign ? switchComponent.setAttribute("x", padding[3] + cellLeftIconWidth + width - switchComponent.AABBBounds.width()) : switchComponent.setAttribute("x", padding[3] + cellLeftIconWidth), "middle" === textBaseline ? switchComponent.setAttribute("y", padding[0] + (height - switchComponent.AABBBounds.height()) / 2) : "bottom" === textBaseline ? switchComponent.setAttribute("y", padding[0] + height - switchComponent.AABBBounds.height()) : switchComponent.setAttribute("y", padding[0]), cellGroup;
76055
76699
  }
76056
- function createSwitch(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table) {
76700
+ function createSwitch(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, cellValue) {
76057
76701
  var _a, _b, _c, _d;
76058
76702
  const style = table._getCellStyle(col, row),
76059
76703
  spaceBetweenTextAndCircle = getProp("spaceBetweenTextAndCircle", style, col, row, table),
@@ -76065,7 +76709,7 @@
76065
76709
  disableCheckedFill = getProp("disableCheckedFill", style, col, row, table),
76066
76710
  disableUncheckedFill = getProp("disableUncheckedFill", style, col, row, table),
76067
76711
  circleFill = getProp("circleFill", style, col, row, table),
76068
- value = table.getCellValue(col, row),
76712
+ value = cellValue,
76069
76713
  dataValue = table.getCellOriginValue(col, row);
76070
76714
  let isChecked,
76071
76715
  isDisabled,
@@ -76156,8 +76800,9 @@
76156
76800
 
76157
76801
  const xScale = new PointScale(),
76158
76802
  yScale = new LinearScale();
76159
- function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme, isAsync) {
76803
+ function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme, isAsync, cellValue) {
76160
76804
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
76805
+ const value = arguments.length >= 13 ? cellValue : table.getCellValue(col, row);
76161
76806
  if (!cellGroup) {
76162
76807
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
76163
76808
  isAsync && (cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0)) && "cell" === cellGroup.role && cellGroup.setAttributes({
@@ -76192,13 +76837,13 @@
76192
76837
  cornerRadius: cellTheme.group.cornerRadius
76193
76838
  })).role = "cell", cellGroup.col = col, cellGroup.row = row, cellGroup = null !== (_0 = null == columnGroup ? void 0 : columnGroup.addCellGroup(cellGroup)) && void 0 !== _0 ? _0 : cellGroup);
76194
76839
  }
76195
- const chartGroup = createSparkLine(col, row, width, height, padding, table);
76840
+ const chartGroup = createSparkLine(col, row, width, height, padding, table, value);
76196
76841
  return chartGroup && cellGroup.appendChild(chartGroup), cellGroup;
76197
76842
  }
76198
- function createSparkLine(col, row, width, height, padding, table) {
76843
+ function createSparkLine(col, row, width, height, padding, table, cellValue) {
76199
76844
  let sparklineSpec, chartGroup;
76200
76845
  const chartSpecRaw = table.internalProps.layoutMap.getBody(col, row).sparklineSpec,
76201
- dataValue = table.getCellValue(col, row);
76846
+ dataValue = cellValue;
76202
76847
  if (!Array.isArray(dataValue)) return;
76203
76848
  const x = padding[3],
76204
76849
  y = padding[0];
@@ -76209,7 +76854,7 @@
76209
76854
  col: col,
76210
76855
  row: row,
76211
76856
  dataValue: table.getCellOriginValue(col, row) || "",
76212
- value: table.getCellValue(col, row) || "",
76857
+ value: dataValue || "",
76213
76858
  rect: table.getCellRangeRelativeRect(table.getCellRange(col, row)),
76214
76859
  table: table
76215
76860
  };
@@ -76352,15 +76997,91 @@
76352
76997
  return numbers;
76353
76998
  }
76354
76999
 
77000
+ const audioIconSvg = '<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="42" height="42" rx="10" fill="#F8FAFF" fill-opacity="0.92"/><rect x="3.75" y="3.75" width="40.5" height="40.5" rx="9.25" stroke="#1D4ED8" stroke-opacity="0.22" stroke-width="1.5"/><path d="M16 30H12C10.8954 30 10 29.1046 10 28V20C10 18.8954 10.8954 18 12 18H16L26 10V38L16 30Z" fill="#EAF1FF" stroke="#0F172A" stroke-opacity="0.24" stroke-width="5.5" stroke-linejoin="round"/><path d="M31.5 18.5C33.3 21.3 33.3 26.7 31.5 29.5" stroke="#0F172A" stroke-opacity="0.24" stroke-width="5.5" stroke-linecap="round"/><path d="M36 15C39.2 20.4 39.2 27.6 36 33" stroke="#0F172A" stroke-opacity="0.24" stroke-width="5.5" stroke-linecap="round"/><path d="M16 30H12C10.8954 30 10 29.1046 10 28V20C10 18.8954 10.8954 18 12 18H16L26 10V38L16 30Z" fill="#EAF1FF" stroke="#2563EB" stroke-width="3.2" stroke-linejoin="round"/><path d="M31.5 18.5C33.3 21.3 33.3 26.7 31.5 29.5" stroke="#2563EB" stroke-width="3.2" stroke-linecap="round"/><path d="M36 15C39.2 20.4 39.2 27.6 36 33" stroke="#2563EB" stroke-width="3.2" stroke-linecap="round"/></svg>';
77001
+ function createAudioCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, _cellValue) {
77002
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
77003
+ const headerStyle = table._getCellStyle(col, row),
77004
+ functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
77005
+ (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.imageMargin) ? padding = getQuadProps(null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.imageMargin) : isValid$1(functionalPadding) && (padding = functionalPadding), (null === (_c = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _c ? void 0 : _c.textAlign) && (textAlign = cellTheme.text.textAlign), (null === (_d = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _d ? void 0 : _d.textBaseline) && (textBaseline = cellTheme.text.textBaseline);
77006
+ const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
77007
+ let cellGroup, cellIcons;
77008
+ if (isAsync && (cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0), cellGroup && "cell" === cellGroup.role && cellGroup.setAttributes({
77009
+ x: xOrigin,
77010
+ y: yOrigin,
77011
+ width: width,
77012
+ height: height,
77013
+ lineWidth: null !== (_f = null === (_e = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _e ? void 0 : _e.lineWidth) && void 0 !== _f ? _f : void 0,
77014
+ fill: null !== (_h = null === (_g = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _g ? void 0 : _g.fill) && void 0 !== _h ? _h : void 0,
77015
+ stroke: null !== (_k = null === (_j = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _j ? void 0 : _j.stroke) && void 0 !== _k ? _k : void 0,
77016
+ strokeArrayWidth: strokeArrayWidth,
77017
+ strokeArrayColor: null !== (_m = null === (_l = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _l ? void 0 : _l.strokeArrayColor) && void 0 !== _m ? _m : void 0,
77018
+ cursor: null !== (_p = null === (_o = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _o ? void 0 : _o.cursor) && void 0 !== _p ? _p : void 0,
77019
+ lineDash: null !== (_r = null === (_q = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _q ? void 0 : _q.lineDash) && void 0 !== _r ? _r : void 0,
77020
+ lineCap: "butt",
77021
+ clip: !0,
77022
+ cornerRadius: cellTheme.group.cornerRadius
77023
+ })), cellGroup && "cell" === cellGroup.role || (cellGroup = new Group$1({
77024
+ x: xOrigin,
77025
+ y: yOrigin,
77026
+ width: width,
77027
+ height: height,
77028
+ lineWidth: null !== (_t = null === (_s = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _s ? void 0 : _s.lineWidth) && void 0 !== _t ? _t : void 0,
77029
+ fill: null !== (_v = null === (_u = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _u ? void 0 : _u.fill) && void 0 !== _v ? _v : void 0,
77030
+ stroke: null !== (_x = null === (_w = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _w ? void 0 : _w.stroke) && void 0 !== _x ? _x : void 0,
77031
+ strokeArrayWidth: strokeArrayWidth,
77032
+ strokeArrayColor: null !== (_z = null === (_y = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _y ? void 0 : _y.strokeArrayColor) && void 0 !== _z ? _z : void 0,
77033
+ cursor: null !== (_1 = null === (_0 = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _0 ? void 0 : _0.cursor) && void 0 !== _1 ? _1 : void 0,
77034
+ lineDash: null !== (_3 = null === (_2 = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _2 ? void 0 : _2.lineDash) && void 0 !== _3 ? _3 : void 0,
77035
+ lineCap: "butt",
77036
+ clip: !0,
77037
+ cornerRadius: cellTheme.group.cornerRadius
77038
+ }), cellGroup.role = "cell", cellGroup.col = col, cellGroup.row = row, cellGroup = null !== (_4 = null == columnGroup ? void 0 : columnGroup.addCellGroup(cellGroup)) && void 0 !== _4 ? _4 : cellGroup), mayHaveIcon) {
77039
+ let iconCol = col,
77040
+ iconRow = row;
77041
+ range && (iconCol = range.start.col, iconRow = range.start.row), cellIcons = table.getCellIcons(iconCol, iconRow);
77042
+ }
77043
+ let cellLeftIconWidth = 0,
77044
+ cellRightIconWidth = 0;
77045
+ if (Array.isArray(cellIcons) && 0 !== cellIcons.length) {
77046
+ const {
77047
+ leftIconWidth: leftIconWidth,
77048
+ rightIconWidth: rightIconWidth,
77049
+ absoluteRightIconWidth: absoluteRightIconWidth
77050
+ } = dealWithIconLayout(cellIcons, cellGroup, range, table);
77051
+ cellLeftIconWidth = leftIconWidth, cellRightIconWidth = rightIconWidth, cellGroup.forEachChildren(child => {
77052
+ "icon-left" === child.role ? child.setAttribute("x", child.attribute.x + padding[3]) : "icon-right" === child.role ? child.setAttribute("x", child.attribute.x + width - rightIconWidth - padding[1]) : "icon-absolute-right" === child.role && child.setAttribute("x", child.attribute.x + width - absoluteRightIconWidth - padding[1]);
77053
+ }), cellGroup.forEachChildren(child => {
77054
+ "middle" === textBaseline ? child.setAttribute("y", (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", height - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]);
77055
+ });
77056
+ }
77057
+ cellGroup._cellLeftIconWidth = cellLeftIconWidth, cellGroup._cellRightIconWidth = cellRightIconWidth;
77058
+ const availableWidth = Math.max(1, width - padding[1] - padding[3] - cellLeftIconWidth - cellRightIconWidth),
77059
+ availableHeight = Math.max(1, height - padding[0] - padding[2]),
77060
+ iconSize = Math.max(1, Math.min(availableWidth, availableHeight, 32)),
77061
+ pos = calcStartPosition(cellLeftIconWidth, 0, width - cellLeftIconWidth - cellRightIconWidth, height, iconSize, iconSize, textAlign, textBaseline, padding);
77062
+ removeCellMediaChildren(cellGroup);
77063
+ const image = markCellMedia(createImage({
77064
+ x: pos.x,
77065
+ y: pos.y,
77066
+ width: iconSize,
77067
+ height: iconSize,
77068
+ image: audioIconSvg,
77069
+ cursor: "pointer"
77070
+ }), "image");
77071
+ return image.name = "image", image.keepAspectRatio = !0, image.isAudioIcon = !0, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), cellGroup;
77072
+ }
77073
+
76355
77074
  const regedIcons = get$4();
76356
- function releaseVideoResource(video) {
76357
- try {
76358
- video.pause();
76359
- } catch (err) {}
76360
- video.removeAttribute("src");
76361
- try {
76362
- video.load();
76363
- } catch (err) {}
77075
+ function updateVideoMediaDxDy(startCol, endCol, startRow, endRow, table) {
77076
+ for (let col = startCol; col <= endCol; col++) for (let row = startRow; row <= endRow; row++) {
77077
+ const cellGroup = table.scenegraph.getCell(col, row);
77078
+ cellGroup && cellGroup.forEachChildren(child => {
77079
+ isCellMedia(child) && child.setAttributes({
77080
+ dx: -table.getColsWidth(cellGroup.mergeStartCol, col - 1),
77081
+ dy: -table.getRowsHeight(cellGroup.mergeStartRow, row - 1)
77082
+ });
77083
+ });
77084
+ }
76364
77085
  }
76365
77086
  function getVideoFirstFrameTimeout(table) {
76366
77087
  var _a;
@@ -76375,7 +77096,7 @@
76375
77096
  function snapshotVideoFirstFrame(video, image, table) {
76376
77097
  const displayWidth = image.attribute.width,
76377
77098
  displayHeight = image.attribute.height;
76378
- if ("number" != typeof displayWidth || "number" != typeof displayHeight || displayWidth <= 0 || displayHeight <= 0) return !1;
77099
+ if (video.videoWidth <= 0 || video.videoHeight <= 0 || "number" != typeof displayWidth || "number" != typeof displayHeight || displayWidth <= 0 || displayHeight <= 0) return !1;
76379
77100
  const canvas = document.createElement("canvas"),
76380
77101
  context = canvas.getContext("2d");
76381
77102
  if (!context) return !1;
@@ -76411,7 +77132,7 @@
76411
77132
  height: viewBoxHeight
76412
77133
  } : void 0;
76413
77134
  }
76414
- function createVideoCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync) {
77135
+ function createVideoCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, cellValue) {
76415
77136
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
76416
77137
  const headerStyle = table._getCellStyle(col, row),
76417
77138
  functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
@@ -76466,10 +77187,26 @@
76466
77187
  "icon-left" === child.role ? child.setAttribute("x", child.attribute.x + padding[3]) : "icon-right" === child.role ? child.setAttribute("x", child.attribute.x + width - rightIconWidth - padding[1]) : "icon-absolute-right" === child.role && child.setAttribute("x", child.attribute.x + width - absoluteRightIconWidth - padding[1]);
76467
77188
  }), cellGroup.forEachChildren(child => {
76468
77189
  "middle" === textBaseline ? child.setAttribute("y", (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", height - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]);
76469
- }), cellGroup._cellLeftIconWidth = cellLeftIconWidth, cellGroup._cellRightIconWidth = cellRightIconWidth;
77190
+ });
76470
77191
  }
76471
- const value = table.getCellValue(col, row),
76472
- video = document.createElement("video");
77192
+ cellGroup._cellLeftIconWidth = cellLeftIconWidth, cellGroup._cellRightIconWidth = cellRightIconWidth;
77193
+ const value = arguments.length >= 18 ? cellValue : table.getCellValue(col, row);
77194
+ if (removeCellMediaChildren(cellGroup), isAudioUrl(value)) {
77195
+ const availableWidth = Math.max(1, width - padding[1] - padding[3] - cellLeftIconWidth - cellRightIconWidth),
77196
+ availableHeight = Math.max(1, height - padding[0] - padding[2]),
77197
+ iconSize = Math.max(1, Math.min(availableWidth, availableHeight, 32)),
77198
+ pos = calcStartPosition(cellLeftIconWidth, 0, width - cellLeftIconWidth - cellRightIconWidth, height, iconSize, iconSize, textAlign, textBaseline, padding),
77199
+ image = markCellMedia(createImage({
77200
+ x: pos.x,
77201
+ y: pos.y,
77202
+ width: iconSize,
77203
+ height: iconSize,
77204
+ image: audioIconSvg,
77205
+ cursor: "pointer"
77206
+ }), "image");
77207
+ return image.name = "image", image.keepAspectRatio = !0, image.isAudioIcon = !0, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), cellGroup;
77208
+ }
77209
+ const video = document.createElement("video");
76473
77210
  video.muted = !0, video.playsInline = !0;
76474
77211
  const shouldSnapshot = !0 === (null === (_7 = table.options.customConfig) || void 0 === _7 ? void 0 : _7.videoFirstFrameSnapshot);
76475
77212
  let loadTimer,
@@ -76480,7 +77217,7 @@
76480
77217
  releaseCurrentVideo = () => {
76481
77218
  videoReleased || (videoReleased = !0, clearVideoLoadTimer(), releaseVideoResource(video));
76482
77219
  },
76483
- isCurrentImage = () => cellGroup.getChildByName("image", !0) === image,
77220
+ isCurrentImage = () => getCellMediaImage(cellGroup) === image,
76484
77221
  handleVideoLoadFail = () => {
76485
77222
  videoReleased || (isCurrentImage() && ((() => {
76486
77223
  var _a, _b;
@@ -76512,7 +77249,7 @@
76512
77249
  y: pos.y,
76513
77250
  width: imageWidth,
76514
77251
  height: imageHeight
76515
- }), isMerge && updateImageDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
77252
+ }), isMerge && updateVideoMediaDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
76516
77253
  }
76517
77254
  })(), table.scenegraph.updateNextFrame()), shouldSnapshot && releaseCurrentVideo());
76518
77255
  };
@@ -76521,6 +77258,7 @@
76521
77258
  if (!isCurrentImage()) return void releaseCurrentVideo();
76522
77259
  const scenegraph = table.scenegraph;
76523
77260
  if (!scenegraph) return;
77261
+ if (video.videoWidth <= 0 || video.videoHeight <= 0) return void handleVideoLoadFail();
76524
77262
  imageAutoSizing && _adjustWidthHeight(col, row, video.videoWidth, video.videoHeight, scenegraph, padding, cellGroup);
76525
77263
  const {
76526
77264
  width: cellWidth,
@@ -76547,7 +77285,7 @@
76547
77285
  height: cellHeight - padding[2] - padding[0],
76548
77286
  dy: 0
76549
77287
  });
76550
- isMerge && updateImageDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
77288
+ isMerge && updateVideoMediaDxDy(cellGroup.mergeStartCol, cellGroup.mergeEndCol, cellGroup.mergeStartRow, cellGroup.mergeEndRow, table);
76551
77289
  const {
76552
77290
  width: width,
76553
77291
  height: height
@@ -76555,11 +77293,10 @@
76555
77293
  iconSize = Math.floor(Math.min(width - padding[1] - padding[3], height - padding[2] - padding[0]) / 2),
76556
77294
  anchorX = 0 + (width > image.attribute.width ? image.attribute.x - 0 + image.attribute.width / 2 : width / 2),
76557
77295
  anchorY = 0 + (height > image.attribute.height ? image.attribute.y - 0 + image.attribute.height / 2 : height / 2),
76558
- imageGraphic = cellGroup.getChildByName("image", !0),
76559
77296
  {
76560
77297
  dx: dx,
76561
77298
  dy: dy
76562
- } = imageGraphic.attribute,
77299
+ } = image.attribute,
76563
77300
  playIcon = new Icon$1({
76564
77301
  x: anchorX - iconSize / 2,
76565
77302
  y: anchorY - iconSize / 2,
@@ -76570,16 +77307,16 @@
76570
77307
  dx: dx,
76571
77308
  dy: dy
76572
77309
  });
76573
- playIcon.name = "play-icon", cellGroup.appendChild(playIcon), shouldSnapshot && snapshotVideoFirstFrame(video, image, table) && releaseCurrentVideo(), scenegraph.updateNextFrame();
77310
+ markCellMedia(playIcon, "play-icon"), playIcon.name = "play-icon", cellGroup.appendChild(playIcon), shouldSnapshot && snapshotVideoFirstFrame(video, image, table) && releaseCurrentVideo(), scenegraph.updateNextFrame();
76574
77311
  }), video.addEventListener("error", handleVideoLoadFail), video.addEventListener("abort", handleVideoLoadFail);
76575
- const image = createImage({
77312
+ const image = markCellMedia(createImage({
76576
77313
  x: padding[3],
76577
77314
  y: padding[0],
76578
- width: width - padding[1] - padding[3],
76579
- height: height - padding[2] - padding[0],
77315
+ width: Math.max(1, width - padding[1] - padding[3]),
77316
+ height: Math.max(1, height - padding[2] - padding[0]),
76580
77317
  image: video,
76581
77318
  cursor: "pointer"
76582
- });
77319
+ }), "image");
76583
77320
  image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), image.successCallback = () => {
76584
77321
  const scenegraph = table.scenegraph;
76585
77322
  scenegraph && isDamagePic(image) && (updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), scenegraph.updateNextFrame());
@@ -77164,8 +77901,9 @@
77164
77901
  scale.niceMax(target.targetTicks.length);
77165
77902
  }
77166
77903
 
77167
- function createButtonCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync) {
77904
+ function createButtonCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, cellValue) {
77168
77905
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
77906
+ const value = arguments.length >= 19 ? cellValue : table.getCellValue(col, row);
77169
77907
  if (!cellGroup) {
77170
77908
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
77171
77909
  isAsync && (cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0)) && "cell" === cellGroup.role && cellGroup.setAttributes({
@@ -77221,10 +77959,10 @@
77221
77959
  "middle" === textBaseline ? child.setAttribute("y", (height - child.AABBBounds.height()) / 2) : "bottom" === textBaseline ? child.setAttribute("y", height - child.AABBBounds.height() - padding[2]) : child.setAttribute("y", padding[0]);
77222
77960
  });
77223
77961
  }
77224
- const buttonComponent = createButton(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table);
77962
+ const buttonComponent = createButton(col, row, colWidth - iconWidth, width, height, padding, cellTheme, define, table, value);
77225
77963
  return buttonComponent && cellGroup.appendChild(buttonComponent), width -= padding[1] + padding[3] + iconWidth, height -= padding[0] + padding[2], "center" === textAlign ? buttonComponent.setAttribute("x", padding[3] + cellLeftIconWidth + (width - buttonComponent.AABBBounds.width()) / 2) : "right" === textAlign ? buttonComponent.setAttribute("x", padding[3] + cellLeftIconWidth + width - buttonComponent.AABBBounds.width()) : buttonComponent.setAttribute("x", padding[3] + cellLeftIconWidth), "middle" === textBaseline ? buttonComponent.setAttribute("y", padding[0] + (height - buttonComponent.AABBBounds.height()) / 2) : "bottom" === textBaseline ? buttonComponent.setAttribute("y", padding[0] + height - buttonComponent.AABBBounds.height()) : buttonComponent.setAttribute("y", padding[0]), cellGroup;
77226
77964
  }
77227
- function createButton(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table) {
77965
+ function createButton(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, cellValue) {
77228
77966
  var _a, _b;
77229
77967
  const style = table._getCellStyle(col, row),
77230
77968
  buttonColor = getProp("buttonColor", style, col, row, table),
@@ -77238,7 +77976,7 @@
77238
77976
  buttonDisableColor = getProp("buttonDisableColor", style, col, row, table),
77239
77977
  buttonDisableBorderColor = getProp("buttonDisableBorderColor", style, col, row, table),
77240
77978
  buttonTextDisableColor = getProp("buttonTextDisableColor", style, col, row, table),
77241
- value = table.getCellValue(col, row),
77979
+ value = cellValue,
77242
77980
  dataValue = table.getCellOriginValue(col, row),
77243
77981
  hierarchyOffset = getHierarchyOffset(col, row, table),
77244
77982
  cellStyle = table._getCellStyle(col, row),
@@ -77349,8 +78087,11 @@
77349
78087
  const registerVideoCell = () => {
77350
78088
  Factory.registerFunction("createVideoCellGroup", createVideoCellGroup);
77351
78089
  };
78090
+ const registerAudioCell = () => {
78091
+ Factory.registerFunction("createAudioCellGroup", createAudioCellGroup);
78092
+ };
77352
78093
 
77353
- registerAxis(), registerEmptyTip(), registerLegend(), registerMenu(), registerTitle(), registerTooltip(), registerListTreeStickCellPlugin(), registerCustomCellStylePlugin(), registerAnimation(), registerChartCell(), registerCheckboxCell(), registerImageCell(), registerProgressBarCell(), registerRadioCell(), registerSwitchCell(), registerButtonCell(), registerSparkLineCell(), registerTextCell(), registerVideoCell();
78094
+ registerAxis(), registerEmptyTip(), registerLegend(), registerMenu(), registerTitle(), registerTooltip(), registerListTreeStickCellPlugin(), registerCustomCellStylePlugin(), registerAnimation(), registerAudioCell(), registerChartCell(), registerCheckboxCell(), registerImageCell(), registerProgressBarCell(), registerRadioCell(), registerSwitchCell(), registerButtonCell(), registerSparkLineCell(), registerTextCell(), registerVideoCell();
77354
78095
  class ListTableAll extends ListTable {}
77355
78096
 
77356
78097
  class Circle extends Circle$1 {
@@ -80016,6 +80757,18 @@
80016
80757
  const LOCATE_ICON_BG_HOVER = '#4080ff';
80017
80758
  const LOCATE_ICON_ARROW = '#4e5969';
80018
80759
  const LOCATE_ICON_ARROW_HOVER = '#ffffff';
80760
+ const isSameSubTaskIndex = (source, target) => {
80761
+ if (!isValid$1(target)) {
80762
+ return true;
80763
+ }
80764
+ if (Array.isArray(source) || Array.isArray(target)) {
80765
+ return (Array.isArray(source) &&
80766
+ Array.isArray(target) &&
80767
+ source.length === target.length &&
80768
+ source.every((value, index) => value === target[index]));
80769
+ }
80770
+ return source === target;
80771
+ };
80019
80772
  class TaskBar {
80020
80773
  formatMilestoneText(text, record) {
80021
80774
  if (!text) {
@@ -80952,8 +81705,7 @@
80952
81705
  return null;
80953
81706
  }
80954
81707
  for (let i = 0; i < this.barContainer.childrenCount; i++) {
80955
- if (c.task_index === index &&
80956
- (!isValid$1(sub_task_index) || (isValid$1(sub_task_index) && c.sub_task_index === sub_task_index))) {
81708
+ if (c.task_index === index && isSameSubTaskIndex(c.sub_task_index, sub_task_index)) {
80957
81709
  return c;
80958
81710
  }
80959
81711
  c = c._next;
@@ -84456,14 +85208,16 @@
84456
85208
  if (this._gantt.parsedOptions.tasksShowMode !== TasksShowMode.Tasks_Separate &&
84457
85209
  Math.abs(Math.round(deltaY / this._gantt.parsedOptions.rowHeight)) >= 1) {
84458
85210
  const indexs = getTaskIndexsByTaskY(targetEndY, this._gantt);
84459
- this._gantt._dragOrderTaskRecord(target.task_index, target.sub_task_index, indexs.task_index, indexs.sub_task_index);
84460
- if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate) {
84461
- this._gantt.taskListTableInstance.renderWithRecreateCells();
84462
- this._gantt.scenegraph.refreshTaskBarsAndGrid();
84463
- }
84464
- else {
84465
- this._gantt.scenegraph.taskBar.refresh();
84466
- this._gantt.scenegraph.dependencyLink.refresh();
85211
+ if (!Array.isArray(target.sub_task_index) && !Array.isArray(indexs.sub_task_index)) {
85212
+ this._gantt._dragOrderTaskRecord(target.task_index, target.sub_task_index, indexs.task_index, indexs.sub_task_index);
85213
+ if (this._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate) {
85214
+ this._gantt.taskListTableInstance.renderWithRecreateCells();
85215
+ this._gantt.scenegraph.refreshTaskBarsAndGrid();
85216
+ }
85217
+ else {
85218
+ this._gantt.scenegraph.taskBar.refresh();
85219
+ this._gantt.scenegraph.dependencyLink.refresh();
85220
+ }
84467
85221
  }
84468
85222
  }
84469
85223
  else {
@@ -85107,6 +85861,8 @@
85107
85861
  };
85108
85862
  parent[startDateField] = formatDateValue(earliestStart);
85109
85863
  parent[endDateField] = formatDateValue(latestEnd);
85864
+ const parentRecordIndex = parentPath.length === 0 ? childIndex : [...parentPath, childIndex];
85865
+ this._gantt._updateRecordToListTable(parent, parentRecordIndex);
85110
85866
  }
85111
85867
  }
85112
85868
  }
@@ -87083,7 +87839,7 @@
87083
87839
  }
87084
87840
  _refreshTaskBar(taskShowIndex, sub_task_index) {
87085
87841
  this.scenegraph.taskBar.updateTaskBarNode(taskShowIndex, sub_task_index);
87086
- this.scenegraph.refreshRecordLinkNodes(taskShowIndex, undefined, this.scenegraph.taskBar.getTaskBarNodeByIndex(taskShowIndex, sub_task_index));
87842
+ this.scenegraph.refreshRecordLinkNodes(taskShowIndex, sub_task_index, this.scenegraph.taskBar.getTaskBarNodeByIndex(taskShowIndex, sub_task_index));
87087
87843
  this.scenegraph.updateNextFrame();
87088
87844
  }
87089
87845
  _updateRecordToListTable(record, index) {
@@ -87216,6 +87972,7 @@
87216
87972
  this._refreshSortedTaskBarsAfterRecordUpdate(recordIndex, index);
87217
87973
  }
87218
87974
  else if (Array.isArray(sub_task_index)) {
87975
+ this._updateRecordToListTable(taskRecord, sub_task_index);
87219
87976
  this.stateManager.updateProjectTaskTimes(sub_task_index);
87220
87977
  }
87221
87978
  }
@@ -87234,6 +87991,7 @@
87234
87991
  this._refreshSortedTaskBarsAfterRecordUpdate(recordIndex, index);
87235
87992
  }
87236
87993
  else if (Array.isArray(sub_task_index)) {
87994
+ this._updateRecordToListTable(taskRecord, sub_task_index);
87237
87995
  this.stateManager.updateProjectTaskTimes(sub_task_index);
87238
87996
  }
87239
87997
  }
@@ -87255,6 +88013,7 @@
87255
88013
  this._refreshSortedTaskBarsAfterRecordUpdate(recordIndex, index);
87256
88014
  }
87257
88015
  else if (Array.isArray(sub_task_index)) {
88016
+ this._updateRecordToListTable(taskRecord, sub_task_index);
87258
88017
  this.stateManager.updateProjectTaskTimes(sub_task_index);
87259
88018
  }
87260
88019
  }
@@ -87263,6 +88022,11 @@
87263
88022
  const progressField = this.parsedOptions.progressField;
87264
88023
  if (progressField) {
87265
88024
  taskRecord[progressField] = progress;
88025
+ if (Array.isArray(sub_task_index)) {
88026
+ this._updateRecordToListTable(taskRecord, sub_task_index);
88027
+ this._refreshTaskBar(index, sub_task_index);
88028
+ return;
88029
+ }
87266
88030
  const recordIndex = this.getRecordIndexByTaskShowIndex(index);
87267
88031
  this._updateRecordToListTable(taskRecord, Array.isArray(recordIndex) ? recordIndex : index);
87268
88032
  if (!this._refreshSortedTaskBarsAfterRecordUpdate(recordIndex, index)) {
@@ -87276,7 +88040,7 @@
87276
88040
  updateTaskRecord(record, task_index, sub_task_index) {
87277
88041
  if (isValid$1(sub_task_index)) {
87278
88042
  const index = typeof task_index === 'number' ? task_index : task_index[0];
87279
- this._updateRecordToListTable(record, [index, sub_task_index]);
88043
+ this._updateRecordToListTable(record, Array.isArray(sub_task_index) ? sub_task_index : [index, sub_task_index]);
87280
88044
  this._refreshTaskBar(index, sub_task_index);
87281
88045
  return;
87282
88046
  }
@@ -87507,8 +88271,11 @@
87507
88271
  set scrollLeft(value) {
87508
88272
  this.stateManager.setScrollLeft(value);
87509
88273
  }
87510
- getTaskBarRelativeRect(index) {
87511
- const taskBarNode = this.scenegraph.taskBar.getTaskBarNodeByIndex(index);
88274
+ getTaskBarRelativeRect(index, sub_task_index) {
88275
+ const taskBarNode = this.scenegraph.taskBar.getTaskBarNodeByIndex(index, sub_task_index);
88276
+ if (!taskBarNode) {
88277
+ return null;
88278
+ }
87512
88279
  const left = taskBarNode.attribute.x +
87513
88280
  this.taskListTableInstance.tableNoFrameWidth +
87514
88281
  this.taskListTableInstance.tableX +
@@ -87662,7 +88429,7 @@
87662
88429
  PluginManager: PluginManager
87663
88430
  });
87664
88431
 
87665
- const version = "1.26.5";
88432
+ const version = "1.26.7";
87666
88433
 
87667
88434
  exports.Gantt = Gantt;
87668
88435
  exports.TABLE_EVENT_TYPE = TABLE_EVENT_TYPE;