@visactor/vtable-sheet 1.23.1 → 1.23.3-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3045,7 +3045,8 @@
3045
3045
  this.element.value = void 0 !== value ? value : "";
3046
3046
  }
3047
3047
  getValue() {
3048
- return this.element.value;
3048
+ var _a;
3049
+ return null === (_a = this.element) || void 0 === _a ? void 0 : _a.value;
3049
3050
  }
3050
3051
  prepareEdit({
3051
3052
  referencePosition: referencePosition,
@@ -24511,7 +24512,7 @@
24511
24512
  this._sliderRenderBounds = null, this._sliderLimitRange = null;
24512
24513
  }
24513
24514
  release(all) {
24514
- super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
24515
+ super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
24515
24516
  passive: !1
24516
24517
  }), this._clearDragEvents();
24517
24518
  }
@@ -26094,17 +26095,21 @@
26094
26095
  } = this.attribute.label;
26095
26096
  textStyle = isFunction$4(textStyle) ? merge({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
26096
26097
  const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
26097
- return textStyle = merge(labelAlign, textStyle), isFunction$4(textStyle.text) && (textStyle.text = textStyle.text({
26098
+ textStyle = merge(labelAlign, textStyle), isFunction$4(textStyle.text) && (textStyle.text = textStyle.text({
26098
26099
  label: tickDatum.label,
26099
26100
  value: tickDatum.rawValue,
26100
26101
  index: tickDatum.index,
26101
26102
  layer: layer
26102
- })), Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
26103
+ }));
26104
+ let reactStyle = textStyle.react;
26105
+ return isFunction$4(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
26103
26106
  text: null != text ? text : textContent,
26104
26107
  _originText: tickDatum.label,
26105
26108
  lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
26106
26109
  type: type
26107
- }), textStyle);
26110
+ }), textStyle), {
26111
+ react: reactStyle
26112
+ });
26108
26113
  }
26109
26114
  getLabelPosition(point, vector, text, style) {
26110
26115
  return point;
@@ -27133,6 +27138,8 @@
27133
27138
  this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
27134
27139
  timeline.tick(delta);
27135
27140
  }), this.emit("tick", delta));
27141
+ }, this._handleGraphTick = () => {
27142
+ this.initHandler(!1);
27136
27143
  }, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
27137
27144
  }
27138
27145
  bindStage(stage) {
@@ -27142,9 +27149,7 @@
27142
27149
  this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
27143
27150
  }
27144
27151
  init() {
27145
- this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
27146
- this.initHandler(!1);
27147
- }), application.global.env && this.initHandler(!1);
27152
+ this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
27148
27153
  }
27149
27154
  addTimeline(timeline) {
27150
27155
  this.timelines.push(timeline);
@@ -27217,7 +27222,7 @@
27217
27222
  }
27218
27223
  release() {
27219
27224
  var _a;
27220
- this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
27225
+ this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
27221
27226
  }
27222
27227
  checkSkip(delta) {
27223
27228
  var _a, _b, _c;
@@ -37477,7 +37482,7 @@
37477
37482
  }(IconPosition || (IconPosition = {}));
37478
37483
  var IconFuncTypeEnum;
37479
37484
  !function (IconFuncTypeEnum) {
37480
- IconFuncTypeEnum.frozen = "frozen", IconFuncTypeEnum.sort = "sort", IconFuncTypeEnum.dropDown = "dropDown", IconFuncTypeEnum.dropDownState = "dropDownState", IconFuncTypeEnum.play = "play", IconFuncTypeEnum.damagePic = "damagePic", IconFuncTypeEnum.expand = "expand", IconFuncTypeEnum.collapse = "collapse", IconFuncTypeEnum.drillDown = "drillDown", IconFuncTypeEnum.drillUp = "drillUp", IconFuncTypeEnum.dragReorder = "dragReorder";
37485
+ IconFuncTypeEnum.frozen = "frozen", IconFuncTypeEnum.sort = "sort", IconFuncTypeEnum.dropDown = "dropDown", IconFuncTypeEnum.dropDownState = "dropDownState", IconFuncTypeEnum.play = "play", IconFuncTypeEnum.damagePic = "damagePic", IconFuncTypeEnum.imageDamagePic = "imageDamagePic", IconFuncTypeEnum.videoDamagePic = "videoDamagePic", IconFuncTypeEnum.expand = "expand", IconFuncTypeEnum.collapse = "collapse", IconFuncTypeEnum.drillDown = "drillDown", IconFuncTypeEnum.drillUp = "drillUp", IconFuncTypeEnum.dragReorder = "dragReorder";
37481
37486
  }(IconFuncTypeEnum || (IconFuncTypeEnum = {}));
37482
37487
  var InternalIconName;
37483
37488
  !function (InternalIconName) {
@@ -45230,7 +45235,7 @@
45230
45235
  image: value,
45231
45236
  cursor: "pointer"
45232
45237
  });
45233
- return 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(() => {
45238
+ 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(() => {
45234
45239
  image.setAttribute("opacity", 1), updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
45235
45240
  }, 0)) : image.successCallback = () => {
45236
45241
  updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
@@ -45238,8 +45243,12 @@
45238
45243
  updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, table);
45239
45244
  }, image.failCallback = () => {
45240
45245
  const regedIcons = get$2();
45241
- image.image = regedIcons.damage_pic.svg;
45242
- }, cellGroup.appendChild(image), cellGroup;
45246
+ image.image = regedIcons.image_damage_pic ? regedIcons.image_damage_pic.svg : regedIcons.damage_pic.svg;
45247
+ }, "string" == typeof value && !(value.startsWith("<svg") || isValidUrl$1(value) || value.includes("/") || isBase64$1(value))) {
45248
+ const regedIcons = get$2();
45249
+ image.image = regedIcons.image_damage_pic ? regedIcons.image_damage_pic.svg : regedIcons.damage_pic.svg;
45250
+ }
45251
+ return cellGroup.appendChild(image), cellGroup;
45243
45252
  }
45244
45253
  function _adjustWidthHeight(col, row, width, height, scene, padding, cellGroup) {
45245
45254
  let needInvalidate = !1,
@@ -45383,7 +45392,7 @@
45383
45392
  }
45384
45393
  function isDamagePic(image) {
45385
45394
  const regedIcons = get$2();
45386
- return image.attribute.image === regedIcons.damage_pic.svg;
45395
+ return image.attribute.image === regedIcons.damage_pic.svg || regedIcons.image_damage_pic && image.attribute.image === regedIcons.image_damage_pic.svg || regedIcons.video_damage_pic && image.attribute.image === regedIcons.video_damage_pic.svg;
45387
45396
  }
45388
45397
 
45389
45398
  function dealPromiseData(dataPromise, tabel, callback) {
@@ -45500,7 +45509,7 @@
45500
45509
  };
45501
45510
  }
45502
45511
  function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
45503
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
45512
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
45504
45513
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0);
45505
45514
  if ("cell" !== oldCellGroup.role && !addNew) return;
45506
45515
  const cellLocation = table.getCellLocation(col, row);
@@ -45609,7 +45618,7 @@
45609
45618
  return oldCellGroup;
45610
45619
  }
45611
45620
  if (!addNew && "empty" === oldCellGroup.role) return;
45612
- const type = isVtableMerge || isCustomMerge ? "text" : table.isHeader(col, row) ? null !== (_s = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _s ? _s : "text" : null !== (_t = table.getBodyColumnType(col, row)) && void 0 !== _t ? _t : "text",
45621
+ const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row),
45613
45622
  padding = cellTheme._vtable.padding,
45614
45623
  textAlign = cellTheme.text.textAlign,
45615
45624
  textBaseline = cellTheme.text.textBaseline;
@@ -46155,7 +46164,6 @@
46155
46164
  table.isPivotTable() && (layoutMap.disableUseGetBodyCache(), layoutMap.disableUseHeaderPathCache());
46156
46165
  }
46157
46166
  function computeRowHeight(row, startCol, endCol, table) {
46158
- var _a;
46159
46167
  if (!(table.isAutoRowHeight(row) || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
46160
46168
  let maxHeight;
46161
46169
  if (table.options.customComputeRowHeight) {
@@ -46198,7 +46206,7 @@
46198
46206
  }
46199
46207
  }
46200
46208
  if (table.isPivotChart() && (table.isLeftFrozenColumn(col) && table.isBottomFrozenRow(row) || table.isRightFrozenColumn(col) && table.isBottomFrozenRow(row))) continue;
46201
- const cellType = table.isHeader(col, row) ? null === (_a = table._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.headerType : table.getBodyColumnType(col, row),
46209
+ const cellType = table.getCellType(col, row),
46202
46210
  textHeight = computeTextHeight(col, row, cellType, table);
46203
46211
  maxHeight = isValid$2(maxHeight) ? Math.max(textHeight, maxHeight) : textHeight;
46204
46212
  }
@@ -46445,12 +46453,12 @@
46445
46453
  cell && updateCellHeight(scene, cell, col, row, height, detaY);
46446
46454
  }
46447
46455
  function updateCellHeight(scene, cell, col, row, distHeight, detaY, isHeader) {
46448
- var _a, _b, _c, _d, _e;
46456
+ var _a, _b, _c;
46449
46457
  if (cell.attribute.height === distHeight && !cell.needUpdateHeight) return;
46450
46458
  cell.needUpdateHeight = !1, cell.setAttribute("height", distHeight);
46451
46459
  const isVtableMerge = null === (_a = scene.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge,
46452
46460
  isCustomMerge = !!scene.table.getCustomMerge(col, row),
46453
- type = isVtableMerge || isCustomMerge ? "text" : scene.table.isHeader(col, row) ? null !== (_b = scene.table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _b ? _b : "text" : null !== (_c = scene.table.getBodyColumnType(col, row)) && void 0 !== _c ? _c : "text";
46461
+ type = isVtableMerge || isCustomMerge ? "text" : scene.table.getCellType(col, row);
46454
46462
  if ("progressbar" === type) {
46455
46463
  const columnDefine = scene.table.getBodyColumnDefine(col, row),
46456
46464
  style = scene.table._getCellStyle(col, row),
@@ -46467,7 +46475,7 @@
46467
46475
  const headerStyle = scene.table._getCellStyle(col, row),
46468
46476
  padding = getQuadProps(getProp("padding", headerStyle, col, row, scene.table));
46469
46477
  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);
46470
- } else if ("image" === type || "video" === type) updateImageCellContentWhileResize(cell, col, row, 0, detaY, scene.table);else if ("axis" === (null === (_d = cell.firstChild) || void 0 === _d ? void 0 : _d.name)) null === (_e = cell.firstChild) || void 0 === _e || _e.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
46478
+ } 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 {
46471
46479
  let renderDefault = !0;
46472
46480
  const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
46473
46481
  if (customContainer) {
@@ -46640,7 +46648,7 @@
46640
46648
  }
46641
46649
  }
46642
46650
  function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHeader, autoWrapText) {
46643
- var _a, _b, _c, _d, _e, _f, _g;
46651
+ var _a, _b, _c, _d, _e;
46644
46652
  if (cell.attribute.width === distWidth && !cell.needUpdateWidth) return !1;
46645
46653
  cell.needUpdateWidth = !1, cell.setAttribute("width", distWidth);
46646
46654
  const cellGroup = cell;
@@ -46648,7 +46656,7 @@
46648
46656
  const autoRowHeight = scene.table.isAutoRowHeight(row),
46649
46657
  isVtableMerge = null === (_a = scene.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge,
46650
46658
  isCustomMerge = !!scene.table.getCustomMerge(col, row),
46651
- type = isVtableMerge || isCustomMerge ? "text" : scene.table.isHeader(col, row) ? null !== (_b = scene.table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _b ? _b : "text" : null !== (_c = scene.table.getBodyColumnType(col, row)) && void 0 !== _c ? _c : "text";
46659
+ type = isVtableMerge || isCustomMerge ? "text" : scene.table.getCellType(col, row);
46652
46660
  let isHeightChange = !1;
46653
46661
  if ("progressbar" === type) {
46654
46662
  const columnDefine = scene.table.getBodyColumnDefine(col, row),
@@ -46668,15 +46676,15 @@
46668
46676
  const headerStyle = scene.table._getCellStyle(col, row),
46669
46677
  padding = getQuadProps(getProp("padding", headerStyle, col, row, scene.table));
46670
46678
  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);
46671
- } else if ("image" === type || "video" === type) updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);else if ("axis" === (null === (_d = cellGroup.firstChild) || void 0 === _d ? void 0 : _d.name)) {
46679
+ } 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)) {
46672
46680
  const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row),
46673
46681
  cellStyle = scene.table._getCellStyle(col, row),
46674
46682
  padding = getQuadProps(getProp("padding", cellStyle, col, row, scene.table));
46675
46683
  if (axisConfig) {
46676
- const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_e = axisConfig.__vtableBodyChartCellPadding) && void 0 !== _e ? _e : padding, scene.table);
46684
+ const axis = new (Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, null !== (_c = axisConfig.__vtableBodyChartCellPadding) && void 0 !== _c ? _c : padding, scene.table);
46677
46685
  cellGroup.clear(), cellGroup.appendChild(axis.component), axis.overlap();
46678
46686
  }
46679
- } else if ("axis" === (null === (_f = cell.firstChild) || void 0 === _f ? void 0 : _f.name)) null === (_g = cell.firstChild) || void 0 === _g || _g.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
46687
+ } else if ("axis" === (null === (_d = cell.firstChild) || void 0 === _d ? void 0 : _d.name)) null === (_e = cell.firstChild) || void 0 === _e || _e.originAxis.resize(cell.attribute.width, cell.attribute.height);else {
46680
46688
  let renderDefault = !0;
46681
46689
  const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) || cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
46682
46690
  if (customContainer) {
@@ -50214,7 +50222,7 @@
50214
50222
  return table.internalProps.transpose && "auto" === width && ("only-header" === table.columnWidthComputeMode && col >= table.rowHeaderLevelCount || "only-body" === table.columnWidthComputeMode && col < table.rowHeaderLevelCount) && (width = table.getDefaultColumnWidth(col)), forceCompute && !table.internalProps.transpose ? computeAutoColWidth(width, col, startRow, endRow, forceCompute, table) : "number" == typeof width ? width : "auto" !== width && "string" == typeof width ? table._adjustColWidth(col, table._colWidthDefineToPxWidth(width)) : computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);
50215
50223
  }
50216
50224
  function computeAutoColWidth(widthDeifne, col, startRow, endRow, forceCompute, table) {
50217
- var _a, _b, _c, _d, _e;
50225
+ var _a, _b, _c, _d;
50218
50226
  let maxWidth = 0,
50219
50227
  deltaRow = 1,
50220
50228
  prepareDeltaRow = 1;
@@ -50246,7 +50254,7 @@
50246
50254
  maxWidth = Math.max(indicatorWidth, maxWidth);
50247
50255
  continue;
50248
50256
  }
50249
- const cellType = table.isHeader(col, row) ? null === (_a = table._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.headerType : table.getBodyColumnType(col, row);
50257
+ const cellType = table.getCellType(col, row);
50250
50258
  if (isValid$2(cellType) && "text" !== cellType && "link" !== cellType && "progressbar" !== cellType && "checkbox" !== cellType && "radio" !== cellType && "switch" !== cellType && "button" !== cellType) {
50251
50259
  maxWidth = Math.max(maxWidth, table.getColWidthDefinedNumber(col) || 0);
50252
50260
  continue;
@@ -50255,14 +50263,14 @@
50255
50263
  const layoutMap = table.internalProps.layoutMap;
50256
50264
  if (layoutMap.isHeader(col, row)) {
50257
50265
  const hd = layoutMap.getHeader(col, row);
50258
- if ("only-body" === (null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.columnWidthComputeMode)) continue;
50259
- isValid$2(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_c = hd.hierarchyLevel) && void 0 !== _c ? _c : 0) * ("tree" === layoutMap.rowHierarchyType && null !== (_d = layoutMap.rowHierarchyIndent) && void 0 !== _d ? _d : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
50266
+ if ("only-body" === (null === (_a = null == hd ? void 0 : hd.define) || void 0 === _a ? void 0 : _a.columnWidthComputeMode)) continue;
50267
+ isValid$2(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_b = hd.hierarchyLevel) && void 0 !== _b ? _b : 0) * ("tree" === layoutMap.rowHierarchyType && null !== (_c = layoutMap.rowHierarchyIndent) && void 0 !== _c ? _c : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
50260
50268
  } else if (table.isListTable()) {
50261
50269
  deltaRow = prepareDeltaRow;
50262
50270
  const define = table.getBodyColumnDefine(col, row);
50263
50271
  if (null == define ? void 0 : define.tree) {
50264
50272
  const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row));
50265
- cellHierarchyIndent = Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none ? (indexArr.length - 1) * (null !== (_e = layoutMap.hierarchyIndent) && void 0 !== _e ? _e : 0) : 0, layoutMap.hierarchyTextStartAlignment && !table.internalProps.bodyHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth());
50273
+ cellHierarchyIndent = Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none ? (indexArr.length - 1) * (null !== (_d = layoutMap.hierarchyIndent) && void 0 !== _d ? _d : 0) : 0, layoutMap.hierarchyTextStartAlignment && !table.internalProps.bodyHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth());
50266
50274
  }
50267
50275
  }
50268
50276
  const textWidth = computeTextWidth(col, row, cellType, table);
@@ -50516,7 +50524,6 @@
50516
50524
  emptyGroup.role = "empty";
50517
50525
 
50518
50526
  function createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, mergeMap, defaultRowHeight, table, rowLimit) {
50519
- var _a, _b;
50520
50527
  let padding,
50521
50528
  textAlign,
50522
50529
  textBaseline,
@@ -50570,7 +50577,7 @@
50570
50577
  } = null != rawRecord ? rawRecord : {};
50571
50578
  isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.internalProps.groupTitleCustomLayout && (customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, void 0, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), table.internalProps.groupTitleFieldFormat ? value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table) : void 0 !== vtableMergeName && (value = vtableMergeName));
50572
50579
  }
50573
- const type = isVtableMerge || isCustomMerge ? "text" : null !== (_b = table.isHeader(col, row) ? null !== (_a = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _a ? _a : "text" : table.getBodyColumnType(col, row)) && void 0 !== _b ? _b : "text";
50580
+ const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row);
50574
50581
  if (isPromise(value)) {
50575
50582
  createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup), dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
50576
50583
  type: type,
@@ -54064,7 +54071,7 @@
54064
54071
  }
54065
54072
  updateCellContentWhileResize(col, row) {
54066
54073
  var _a;
54067
- const type = (null === (_a = this.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge) ? "text" : this.table.isHeader(col, row) ? this.table._getHeaderLayoutMap(col, row).headerType : this.table.getBodyColumnType(col, row),
54074
+ const type = (null === (_a = this.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge) ? "text" : this.table.getCellType(col, row),
54068
54075
  cellGroup = this.getCell(col, row);
54069
54076
  "image" !== type && "video" !== type || updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, this.table);
54070
54077
  }
@@ -56389,9 +56396,8 @@
56389
56396
  row: row
56390
56397
  } = e;
56391
56398
  if ("image" === e.target.type && e.target.role && e.target.role.startsWith("icon")) return;
56392
- let cellType;
56393
- cellType = table.internalProps.layoutMap.isHeader(col, row) ? table.isPivotTable() ? table._getHeaderLayoutMap(col, row).headerType : table.getHeaderDefine(col, row).headerType : table.getBodyColumnType(col, row);
56394
- const columnDefine = table.isHeader(col, row) ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row),
56399
+ const cellType = table.getCellType(col, row),
56400
+ columnDefine = table.isHeader(col, row) ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row),
56395
56401
  cellValue = table.getCellValue(col, row),
56396
56402
  cellOriginValue = table.getCellOriginValue(col, row);
56397
56403
  if ("link" === cellType) {
@@ -56419,7 +56425,9 @@
56419
56425
  if (rowData && rowData.vtableMerge) return;
56420
56426
  const data = Object.assign({
56421
56427
  __value: cellValue,
56422
- __dataValue: cellOriginValue
56428
+ __dataValue: cellOriginValue,
56429
+ value: cellValue,
56430
+ dataValue: cellOriginValue
56423
56431
  }, rowData);
56424
56432
  if (isFunction$4(templateLink)) url = templateLink(data, col, row, table);else {
56425
56433
  const re = /\{\s*(\S+?)\s*\}/g;
@@ -60385,7 +60393,7 @@
60385
60393
  paddingForAxis = null !== (_e = null === (_d = layoutMap.getBody(table.columnHeaderLevelCount, row).style) || void 0 === _d ? void 0 : _d.padding) && void 0 !== _e ? _e : table.theme.bodyStyle.padding;
60386
60394
  }
60387
60395
  if ((!hd || hd.isEmpty) && (layoutMap.isLeftBottomCorner(col, row) || layoutMap.isRightBottomCorner(col, row) || layoutMap.isCornerHeader(col, row) || layoutMap.isRightTopCorner(col, row))) return EMPTY_STYLE;
60388
- const styleClass = table.internalProps.headerHelper.getStyleClass((null == hd ? void 0 : hd.headerType) || "text");
60396
+ const styleClass = table.internalProps.headerHelper.getStyleClass(table.getCellType(col, row));
60389
60397
  if (layoutMap.isBottomFrozenRow(col, row) && table.theme.bottomFrozenStyle) cacheStyle = of(paddingForAxis ? {
60390
60398
  padding: paddingForAxis
60391
60399
  } : {}, table.theme.bottomFrozenStyle, {
@@ -60570,7 +60578,7 @@
60570
60578
  }
60571
60579
  constructor(container, options = {}) {
60572
60580
  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;
60573
- if (super(), this.showFrozenIcon = !0, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.23.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60581
+ if (super(), this.showFrozenIcon = !0, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.23.3-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
60574
60582
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60575
60583
  options: options,
60576
60584
  container: container
@@ -61509,17 +61517,18 @@
61509
61517
  this.release();
61510
61518
  }
61511
61519
  release() {
61512
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
61520
+ 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;
61521
+ null === (_c = null === (_b = null === (_a = this.scenegraph) || void 0 === _a ? void 0 : _a.component) || void 0 === _b ? void 0 : _b.vScrollBar) || void 0 === _c || _c.release(), null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.hScrollBar) || void 0 === _f || _f.release(), this.animationManager.clear(), this.animationManager.ticker.release(), null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.stage) || void 0 === _h ? void 0 : _h.ticker) || void 0 === _j || _j.release();
61513
61522
  const internalProps = this.internalProps;
61514
61523
  if (this.isReleased) return;
61515
- null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a), null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c), null === (_e = super.release) || void 0 === _e || _e.call(this), this.pluginManager.release(), null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f), this.eventManager.release(), null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h), null === (_k = internalProps.legends) || void 0 === _k || _k.forEach(legend => {
61524
+ null === (_l = null === (_k = internalProps.tooltipHandler) || void 0 === _k ? void 0 : _k.release) || void 0 === _l || _l.call(_k), null === (_o = null === (_m = internalProps.menuHandler) || void 0 === _m ? void 0 : _m.release) || void 0 === _o || _o.call(_m), null === (_p = super.release) || void 0 === _p || _p.call(this), this.pluginManager.release(), null === (_r = null === (_q = internalProps.handler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q), this.eventManager.release(), null === (_t = null === (_s = internalProps.focusControl) || void 0 === _s ? void 0 : _s.release) || void 0 === _t || _t.call(_s), null === (_u = internalProps.legends) || void 0 === _u || _u.forEach(legend => {
61516
61525
  null == legend || legend.release();
61517
- }), null === (_l = internalProps.title) || void 0 === _l || _l.release(), internalProps.title = null, null === (_m = internalProps.emptyTip) || void 0 === _m || _m.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
61526
+ }), null === (_v = internalProps.title) || void 0 === _v || _v.release(), internalProps.title = null, null === (_w = internalProps.emptyTip) || void 0 === _w || _w.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
61518
61527
  var _a;
61519
61528
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
61520
61529
  }), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
61521
- const parentElement = null === (_o = internalProps.element) || void 0 === _o ? void 0 : _o.parentElement;
61522
- parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_r = null === (_q = null === (_p = this.editorManager) || void 0 === _p ? void 0 : _p.editingEditor) || void 0 === _q ? void 0 : _q.onEnd) || void 0 === _r || _r.call(_q), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_s = this.reactCustomLayout) || void 0 === _s || _s.clearCache(), clearChartRenderQueue();
61530
+ const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
61531
+ parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_0 = null === (_z = null === (_y = this.editorManager) || void 0 === _y ? void 0 : _y.editingEditor) || void 0 === _z ? void 0 : _z.onEnd) || void 0 === _0 || _0.call(_z), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_1 = this.reactCustomLayout) || void 0 === _1 || _1.clearCache(), clearChartRenderQueue();
61523
61532
  }
61524
61533
  fireListeners(type, event) {
61525
61534
  return super.fireListeners(type, event);
@@ -69132,7 +69141,8 @@
69132
69141
  });
69133
69142
  playIcon.name = "play-icon", cellGroup.appendChild(playIcon), table.scenegraph.updateNextFrame();
69134
69143
  }), video.onerror = () => {
69135
- image.image = regedIcons.damage_pic.svg;
69144
+ const regedIcons = get$2();
69145
+ image.image = regedIcons.video_damage_pic ? regedIcons.video_damage_pic.svg : regedIcons.damage_pic.svg;
69136
69146
  }, video.src = value, video.setAttribute("preload", "auto");
69137
69147
  const image = createImage({
69138
69148
  x: padding[3],
@@ -69142,7 +69152,9 @@
69142
69152
  image: video,
69143
69153
  cursor: "pointer"
69144
69154
  });
69145
- return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), cellGroup;
69155
+ return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), image.successCallback = () => {
69156
+ isDamagePic(image) && (updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame());
69157
+ }, cellGroup;
69146
69158
  }
69147
69159
 
69148
69160
  function createMark(marked, cellGroup, table) {
@@ -87581,7 +87593,7 @@
87581
87593
  });
87582
87594
  this.sheet
87583
87595
  .getActiveSheet()
87584
- .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value);
87596
+ .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value, false, false);
87585
87597
  });
87586
87598
  }
87587
87599
  catch (error) {
@@ -87600,7 +87612,7 @@
87600
87612
  });
87601
87613
  this.sheet
87602
87614
  .getActiveSheet()
87603
- .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value);
87615
+ .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value, false, false);
87604
87616
  });
87605
87617
  }
87606
87618
  catch (error) {
@@ -87619,7 +87631,7 @@
87619
87631
  });
87620
87632
  this.sheet
87621
87633
  .getActiveSheet()
87622
- .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value);
87634
+ .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value, false, false);
87623
87635
  });
87624
87636
  }
87625
87637
  catch (error) {
@@ -87638,7 +87650,7 @@
87638
87650
  });
87639
87651
  this.sheet
87640
87652
  .getActiveSheet()
87641
- .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value);
87653
+ .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value, false, false);
87642
87654
  });
87643
87655
  }
87644
87656
  catch (error) {
@@ -87660,7 +87672,7 @@
87660
87672
  const result = this.getCellValue(cell);
87661
87673
  this.sheet
87662
87674
  .getActiveSheet()
87663
- .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value);
87675
+ .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value, false, false);
87664
87676
  }
87665
87677
  }
87666
87678
  catch (error) {
@@ -87680,7 +87692,7 @@
87680
87692
  const result = this.getCellValue(cell);
87681
87693
  this.sheet
87682
87694
  .getActiveSheet()
87683
- .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value);
87695
+ .tableInstance?.changeCellValue(cell.col, cell.row, result.error ? '#ERROR!' : result.value, false, false);
87684
87696
  }
87685
87697
  }
87686
87698
  catch (error) {
@@ -89614,11 +89626,17 @@
89614
89626
  table.scenegraph.updateNextFrame();
89615
89627
  }
89616
89628
  function createFormulaDetectionOptions(sheetDefine, options, vtableSheet) {
89629
+ const getActiveSheetKey = () => {
89630
+ return (vtableSheet?.getActiveSheet?.()?.getKey?.() ||
89631
+ vtableSheet?.sheetManager?.getActiveSheet?.()?.sheetKey ||
89632
+ sheetDefine?.sheetKey ||
89633
+ 'Sheet1');
89634
+ };
89617
89635
  return {
89618
89636
  isFormulaCell: (col, row, cellData, table) => {
89619
89637
  if (vtableSheet?.formulaManager) {
89620
89638
  try {
89621
- const sheetName = vtableSheet.sheetManager?._activeSheetKey || 'Sheet1';
89639
+ const sheetName = getActiveSheetKey();
89622
89640
  return vtableSheet.formulaManager.isCellFormula({
89623
89641
  sheet: sheetName,
89624
89642
  row: row,
@@ -89637,7 +89655,7 @@
89637
89655
  getCellFormula: (col, row, cellData, table) => {
89638
89656
  if (vtableSheet?.formulaManager) {
89639
89657
  try {
89640
- const sheetName = vtableSheet.sheetManager?._activeSheetKey || 'Sheet1';
89658
+ const sheetName = getActiveSheetKey();
89641
89659
  return vtableSheet.formulaManager.getCellFormula({
89642
89660
  sheet: sheetName,
89643
89661
  row: row,
@@ -89656,7 +89674,7 @@
89656
89674
  setCellFormula: (col, row, formula, table) => {
89657
89675
  if (vtableSheet?.formulaManager) {
89658
89676
  try {
89659
- const sheetName = vtableSheet.sheetManager?._activeSheetKey || 'Sheet1';
89677
+ const sheetName = getActiveSheetKey();
89660
89678
  vtableSheet.formulaManager.setCellContent({
89661
89679
  sheet: sheetName,
89662
89680
  row: row,
@@ -92947,7 +92965,7 @@
92947
92965
  importStyle();
92948
92966
  }
92949
92967
 
92950
- const version = "1.23.1";
92968
+ const version = "1.23.3-alpha.0";
92951
92969
  importStyles();
92952
92970
 
92953
92971
  exports.TYPES = index;