@visactor/vtable 1.19.4-alpha.0 → 1.19.4-alpha.2

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 (133) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +14 -9
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/core/BaseTable.js +43 -33
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/core/record-helper.js +6 -6
  7. package/cjs/core/record-helper.js.map +1 -1
  8. package/cjs/core/tableHelper.js +1 -1
  9. package/cjs/core/tableHelper.js.map +1 -1
  10. package/cjs/data/CachedDataSource.js +1 -1
  11. package/cjs/data/CachedDataSource.js.map +1 -1
  12. package/cjs/data/DataSource.js +2 -11
  13. package/cjs/data/DataSource.js.map +1 -1
  14. package/cjs/dataset/dataset.js +20 -18
  15. package/cjs/dataset/dataset.js.map +1 -1
  16. package/cjs/event/event.js +1 -1
  17. package/cjs/event/event.js.map +1 -1
  18. package/cjs/event/helper.js +30 -22
  19. package/cjs/event/helper.js.map +1 -1
  20. package/cjs/event/listener/table-group.js +6 -4
  21. package/cjs/event/listener/table-group.js.map +1 -1
  22. package/cjs/event/self-event-listener/list-table/checkbox.js +5 -5
  23. package/cjs/event/self-event-listener/list-table/checkbox.js.map +1 -1
  24. package/cjs/index.d.ts +1 -1
  25. package/cjs/index.js +1 -1
  26. package/cjs/index.js.map +1 -1
  27. package/cjs/layout/cell-range/simple-cell-range.js +1 -2
  28. package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
  29. package/cjs/layout/layout-helper.js +1 -1
  30. package/cjs/layout/layout-helper.js.map +1 -1
  31. package/cjs/layout/simple-header-layout.js +3 -3
  32. package/cjs/layout/simple-header-layout.js.map +1 -1
  33. package/cjs/scenegraph/graphic/chart.js +7 -2
  34. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  35. package/cjs/scenegraph/group-creater/cell-helper.js +6 -5
  36. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  37. package/cjs/scenegraph/group-creater/column-helper.js +3 -3
  38. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  39. package/cjs/scenegraph/group-creater/init-scenegraph.js +1 -1
  40. package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  41. package/cjs/scenegraph/layout/update-height.js +1 -1
  42. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  43. package/cjs/scenegraph/layout/update-width.js +1 -1
  44. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  45. package/cjs/scenegraph/utils/get-hierarchy-offset.js +1 -1
  46. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  47. package/cjs/state/cell-move/index.js +12 -4
  48. package/cjs/state/cell-move/index.js.map +1 -1
  49. package/cjs/state/checkbox/checkbox.js +5 -5
  50. package/cjs/state/checkbox/checkbox.js.map +1 -1
  51. package/cjs/state/hover/update-position.js +2 -2
  52. package/cjs/state/hover/update-position.js.map +1 -1
  53. package/cjs/state/state.d.ts +2 -0
  54. package/cjs/state/state.js +4 -0
  55. package/cjs/state/state.js.map +1 -1
  56. package/cjs/tools/util.d.ts +2 -1
  57. package/cjs/tools/util.js +14 -3
  58. package/cjs/tools/util.js.map +1 -1
  59. package/cjs/ts-types/base-table.d.ts +7 -1
  60. package/cjs/ts-types/base-table.js.map +1 -1
  61. package/cjs/ts-types/list-table/define/checkbox-define.d.ts +0 -1
  62. package/cjs/ts-types/list-table/define/checkbox-define.js.map +1 -1
  63. package/cjs/ts-types/table-engine.d.ts +8 -0
  64. package/cjs/ts-types/table-engine.js.map +1 -1
  65. package/cjs/vrender.js.map +1 -1
  66. package/dist/vtable.js +365 -250
  67. package/dist/vtable.min.js +2 -2
  68. package/es/ListTable.d.ts +1 -0
  69. package/es/ListTable.js +13 -8
  70. package/es/ListTable.js.map +1 -1
  71. package/es/core/BaseTable.js +43 -33
  72. package/es/core/BaseTable.js.map +1 -1
  73. package/es/core/record-helper.js +6 -6
  74. package/es/core/record-helper.js.map +1 -1
  75. package/es/core/tableHelper.js +1 -1
  76. package/es/core/tableHelper.js.map +1 -1
  77. package/es/data/CachedDataSource.js +1 -1
  78. package/es/data/CachedDataSource.js.map +1 -1
  79. package/es/data/DataSource.js +3 -12
  80. package/es/data/DataSource.js.map +1 -1
  81. package/es/dataset/dataset.js +20 -18
  82. package/es/dataset/dataset.js.map +1 -1
  83. package/es/event/event.js +1 -1
  84. package/es/event/event.js.map +1 -1
  85. package/es/event/helper.js +30 -22
  86. package/es/event/helper.js.map +1 -1
  87. package/es/event/listener/table-group.js +6 -4
  88. package/es/event/listener/table-group.js.map +1 -1
  89. package/es/event/self-event-listener/list-table/checkbox.js +5 -5
  90. package/es/event/self-event-listener/list-table/checkbox.js.map +1 -1
  91. package/es/index.d.ts +1 -1
  92. package/es/index.js +1 -1
  93. package/es/index.js.map +1 -1
  94. package/es/layout/cell-range/simple-cell-range.js +1 -2
  95. package/es/layout/cell-range/simple-cell-range.js.map +1 -1
  96. package/es/layout/layout-helper.js +1 -1
  97. package/es/layout/layout-helper.js.map +1 -1
  98. package/es/layout/simple-header-layout.js +3 -3
  99. package/es/layout/simple-header-layout.js.map +1 -1
  100. package/es/scenegraph/graphic/chart.js +8 -1
  101. package/es/scenegraph/graphic/chart.js.map +1 -1
  102. package/es/scenegraph/group-creater/cell-helper.js +5 -4
  103. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  104. package/es/scenegraph/group-creater/column-helper.js +2 -2
  105. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  106. package/es/scenegraph/group-creater/init-scenegraph.js +1 -1
  107. package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
  108. package/es/scenegraph/layout/update-height.js +1 -1
  109. package/es/scenegraph/layout/update-height.js.map +1 -1
  110. package/es/scenegraph/layout/update-width.js +1 -1
  111. package/es/scenegraph/layout/update-width.js.map +1 -1
  112. package/es/scenegraph/utils/get-hierarchy-offset.js +1 -1
  113. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  114. package/es/state/cell-move/index.js +13 -3
  115. package/es/state/cell-move/index.js.map +1 -1
  116. package/es/state/checkbox/checkbox.js +5 -5
  117. package/es/state/checkbox/checkbox.js.map +1 -1
  118. package/es/state/hover/update-position.js +2 -2
  119. package/es/state/hover/update-position.js.map +1 -1
  120. package/es/state/state.d.ts +2 -0
  121. package/es/state/state.js +4 -0
  122. package/es/state/state.js.map +1 -1
  123. package/es/tools/util.d.ts +2 -1
  124. package/es/tools/util.js +13 -0
  125. package/es/tools/util.js.map +1 -1
  126. package/es/ts-types/base-table.d.ts +7 -1
  127. package/es/ts-types/base-table.js.map +1 -1
  128. package/es/ts-types/list-table/define/checkbox-define.d.ts +0 -1
  129. package/es/ts-types/list-table/define/checkbox-define.js.map +1 -1
  130. package/es/ts-types/table-engine.d.ts +8 -0
  131. package/es/ts-types/table-engine.js.map +1 -1
  132. package/es/vrender.js.map +1 -1
  133. package/package.json +8 -8
package/dist/vtable.js CHANGED
@@ -9856,7 +9856,7 @@
9856
9856
  }
9857
9857
  removeChild(child) {
9858
9858
  const data = super.removeChild(child);
9859
- return child.stage = null, this.getGraphicService().onRemove(child), this.addUpdateBoundTag(), data;
9859
+ return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
9860
9860
  }
9861
9861
  removeAllChild(deep = !1) {
9862
9862
  this.forEachChildren(child => {
@@ -12786,9 +12786,10 @@
12786
12786
  return super.needUpdateTag(key, POLYGON_UPDATE_TAG_KEY);
12787
12787
  }
12788
12788
  toCustomPath() {
12789
- const points = this.attribute.points,
12790
- path = new CustomPath2D();
12791
- return points.forEach((point, index) => {
12789
+ let path = super.toCustomPath();
12790
+ if (path) return path;
12791
+ const points = this.attribute.points;
12792
+ return path = new CustomPath2D(), points.forEach((point, index) => {
12792
12793
  0 === index ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y);
12793
12794
  }), path.closePath(), path;
12794
12795
  }
@@ -16048,6 +16049,7 @@
16048
16049
  drawContext.updateBounds ? this.useDirtyBounds = !0 : this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;
16049
16050
  }
16050
16051
  draw(renderService, drawContext) {
16052
+ var _a;
16051
16053
  this.prepareForDraw(renderService, drawContext), drawContext.drawContribution = this, this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap, this.currentRenderService = renderService;
16052
16054
  const {
16053
16055
  context: context,
@@ -16062,7 +16064,7 @@
16062
16064
  dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
16063
16065
  }
16064
16066
  const d = context.dpr % 1;
16065
- (d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), renderService.renderTreeRoots.sort((a, b) => {
16067
+ (d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearScreen.call(renderService.drawParams), renderService.renderTreeRoots.sort((a, b) => {
16066
16068
  var _a, _b;
16067
16069
  return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
16068
16070
  }).forEach(group => {
@@ -16741,13 +16743,16 @@
16741
16743
  } else this._skipRender = 1;
16742
16744
  }, this.beforeRender = stage => {
16743
16745
  this._beforeRender && this._beforeRender(stage);
16746
+ }, this.afterClearScreen = drawParams => {
16747
+ this._afterClearScreen && this._afterClearScreen(drawParams);
16744
16748
  }, this.afterRender = stage => {
16745
16749
  this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
16746
16750
  }, this.afterTickCb = () => {
16747
16751
  this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
16748
16752
  }, this.params = params, this.theme = new Theme(), this.hooks = {
16749
16753
  beforeRender: new SyncHook(["stage"]),
16750
- afterRender: new SyncHook(["stage"])
16754
+ afterRender: new SyncHook(["stage"]),
16755
+ afterClearScreen: new SyncHook(["stage"])
16751
16756
  }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
16752
16757
  width: params.width,
16753
16758
  height: params.height,
@@ -16759,7 +16764,7 @@
16759
16764
  canvas: params.canvas
16760
16765
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
16761
16766
  main: !0
16762
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
16767
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
16763
16768
  tickRenderMode: "effect"
16764
16769
  }), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
16765
16770
  background: this._background
@@ -17154,7 +17159,7 @@
17154
17159
  return this._cursor;
17155
17160
  }
17156
17161
  eventPointTransform(e) {
17157
- const point = this.global.mapToCanvasPoint(e, this.window.getContext().canvas.nativeCanvas);
17162
+ const point = this.global.mapToCanvasPoint(e, this.window);
17158
17163
  return this.stage.window.pointTransform(point.x, point.y);
17159
17164
  }
17160
17165
  pauseTriggerEvent() {
@@ -24557,6 +24562,14 @@
24557
24562
  state.executor.stop();
24558
24563
  }), this.stateList = null;
24559
24564
  }
24565
+ reApplyState(state) {
24566
+ var _a;
24567
+ const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
24568
+ if (stateInfo) {
24569
+ const stateList = this.stateList.slice();
24570
+ stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
24571
+ }
24572
+ }
24560
24573
  }
24561
24574
 
24562
24575
  class GraphicStateExtension {
@@ -24587,11 +24600,20 @@
24587
24600
  applyUnhighlightState(animationConfig, callback) {
24588
24601
  return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
24589
24602
  }
24590
- stopAnimationState(state, type) {
24591
- return this._getAnimationStateManager(this).stopState(state, type), this;
24603
+ stopAnimationState(state, type, deep = !1) {
24604
+ return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
24605
+ child.stopAnimationState(state, type, deep);
24606
+ }), this;
24592
24607
  }
24593
24608
  clearAnimationStates() {
24594
- return this._getAnimationStateManager(this).clearState(), this;
24609
+ const stateManager = this._animationStateManager;
24610
+ return stateManager && stateManager.clearState(), this;
24611
+ }
24612
+ reApplyAnimationState(state, deep = !1) {
24613
+ const stateManager = this._animationStateManager;
24614
+ return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
24615
+ child.reApplyAnimationState(state, deep);
24616
+ }), this;
24595
24617
  }
24596
24618
  static extend(graphic) {
24597
24619
  return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
@@ -24644,6 +24666,21 @@
24644
24666
  getGraphicAttribute(key, prev = !1) {
24645
24667
  return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
24646
24668
  }
24669
+ pauseAnimation(deep = !1) {
24670
+ this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
24671
+ child.pauseAnimation(deep);
24672
+ });
24673
+ }
24674
+ resumeAnimation(deep = !1) {
24675
+ this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
24676
+ child.resumeAnimation(deep);
24677
+ });
24678
+ }
24679
+ stopAnimation(deep = !1) {
24680
+ this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
24681
+ child.stopAnimation(deep);
24682
+ });
24683
+ }
24647
24684
  }
24648
24685
 
24649
24686
  function registerAnimate() {
@@ -25205,7 +25242,7 @@
25205
25242
  super(from, to, duration, easing, params);
25206
25243
  }
25207
25244
  onBind() {
25208
- var _a, _b;
25245
+ var _a, _b, _c;
25209
25246
  super.onBind();
25210
25247
  const {
25211
25248
  from: from,
@@ -25214,7 +25251,7 @@
25214
25251
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
25215
25252
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
25216
25253
  const finalAttribute = this.target.getFinalAttribute();
25217
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
25254
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
25218
25255
  }
25219
25256
  onEnd(cb) {
25220
25257
  super.onEnd(cb);
@@ -25312,7 +25349,7 @@
25312
25349
  super(from, to, duration, easing, params);
25313
25350
  }
25314
25351
  onBind() {
25315
- var _a, _b;
25352
+ var _a, _b, _c;
25316
25353
  super.onBind();
25317
25354
  const {
25318
25355
  from: from,
@@ -25321,7 +25358,7 @@
25321
25358
  fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
25322
25359
  this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
25323
25360
  const finalAttribute = this.target.getFinalAttribute();
25324
- finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
25361
+ finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
25325
25362
  }
25326
25363
  onEnd(cb) {
25327
25364
  super.onEnd(cb);
@@ -27172,16 +27209,15 @@
27172
27209
  changedY = 0;
27173
27210
  "negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
27174
27211
  const point = isFunction$7(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
27175
- fromX = point && isValidNumber$3(point.x) ? point.x : changedX,
27176
- fromY = point && isValidNumber$3(point.y) ? point.y : changedY,
27177
- finalAttrs = graphic.getFinalAttribute(),
27178
- finalAttrsX = excludeChannels.includes("x") ? graphic.attribute.x : finalAttrs.x,
27179
- finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
27212
+ finalAttrsX = graphic.getGraphicAttribute("x"),
27213
+ finalAttrsY = graphic.getGraphicAttribute("y"),
27214
+ fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$3(point.x) ? point.x : changedX,
27215
+ fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$3(point.y) ? point.y : changedY;
27180
27216
  switch (direction) {
27181
27217
  case "x":
27182
27218
  return {
27183
27219
  from: {
27184
- x: fromX
27220
+ x: excludeChannels.includes("x") ? finalAttrsX : fromX
27185
27221
  },
27186
27222
  to: {
27187
27223
  x: finalAttrsX
@@ -27229,7 +27265,7 @@
27229
27265
  case "x":
27230
27266
  return {
27231
27267
  from: {
27232
- x: graphic.attribute.x
27268
+ x: graphic.getGraphicAttribute("x")
27233
27269
  },
27234
27270
  to: {
27235
27271
  x: fromX
@@ -27238,7 +27274,7 @@
27238
27274
  case "y":
27239
27275
  return {
27240
27276
  from: {
27241
- y: graphic.attribute.y
27277
+ y: graphic.getGraphicAttribute("y")
27242
27278
  },
27243
27279
  to: {
27244
27280
  y: fromY
@@ -27247,8 +27283,8 @@
27247
27283
  default:
27248
27284
  return {
27249
27285
  from: {
27250
- x: graphic.attribute.x,
27251
- y: graphic.attribute.y
27286
+ x: graphic.getGraphicAttribute("x"),
27287
+ y: graphic.getGraphicAttribute("y")
27252
27288
  },
27253
27289
  to: {
27254
27290
  x: fromX,
@@ -27466,9 +27502,8 @@
27466
27502
  w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
27467
27503
  width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
27468
27504
  this.rect.setAttributes({
27469
- x: x,
27470
- width: width,
27471
- dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
27505
+ x: x + Math.min(parentAttr.x1 - parentAttr.x, 0),
27506
+ width: width
27472
27507
  }, !1, {
27473
27508
  type: AttributeUpdateType.ANIMATE_PLAY,
27474
27509
  animationState: {
@@ -27485,9 +27520,8 @@
27485
27520
  const h = Math.min(parentHeight - currentY, maxLength);
27486
27521
  let height;
27487
27522
  y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
27488
- y: y,
27489
- height: height,
27490
- dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
27523
+ y: y + Math.min(parentAttr.y1 - parentAttr.y, 0),
27524
+ height: height
27491
27525
  }, !1, {
27492
27526
  type: AttributeUpdateType.ANIMATE_PLAY,
27493
27527
  animationState: {
@@ -34605,6 +34639,21 @@
34605
34639
  obj[childrenProperty].forEach((child) => traverseObject(child, childrenProperty, callback));
34606
34640
  }
34607
34641
  }
34642
+ function computeChildrenNodeLength(indexKey, hierarchyState, nodeData) {
34643
+ let size = 0;
34644
+ if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) {
34645
+ return size;
34646
+ }
34647
+ const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
34648
+ if (children) {
34649
+ for (let i = 0; i < children.length; i++) {
34650
+ size += 1;
34651
+ const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
34652
+ size += computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
34653
+ }
34654
+ }
34655
+ return size;
34656
+ }
34608
34657
 
34609
34658
  const isNode = typeof window === 'undefined' || typeof window.window === 'undefined';
34610
34659
  let arrayFind;
@@ -37286,21 +37335,7 @@
37286
37335
  this.hasHierarchyStateExpand = true;
37287
37336
  }
37288
37337
  else if (state === HierarchyState.expand) {
37289
- let childrenLength = 0;
37290
- const computeChildrenNodeLength = (indexKey, hierarchyState, nodeData) => {
37291
- if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) {
37292
- return;
37293
- }
37294
- const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
37295
- if (children) {
37296
- for (let i = 0; i < children.length; i++) {
37297
- childrenLength += 1;
37298
- const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
37299
- computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
37300
- }
37301
- }
37302
- };
37303
- computeChildrenNodeLength(indexed, state, data);
37338
+ const childrenLength = computeChildrenNodeLength(indexed, state, data);
37304
37339
  this.currentIndexedData.splice(this.currentIndexedData.indexOf(indexed) + 1, childrenLength);
37305
37340
  data.hierarchyState = HierarchyState.collapse;
37306
37341
  }
@@ -39662,7 +39697,7 @@
39662
39697
  }
39663
39698
  cacheBeforeChangedRecord(dataIndex, table) {
39664
39699
  const originRecord = this.getOriginalRecord(dataIndex);
39665
- if (table.options.groupBy) {
39700
+ if (table.internalProps.groupBy) {
39666
39701
  dataIndex = this.getOriginRecordIndexForGroup(dataIndex);
39667
39702
  }
39668
39703
  if (!this.beforeChangedRecordsMap.has(dataIndex.toString())) {
@@ -40225,7 +40260,7 @@
40225
40260
  if (table.options.hierarchyExpandLevel) {
40226
40261
  return table.options.hierarchyExpandLevel;
40227
40262
  }
40228
- else if (table.options.groupBy) {
40263
+ else if (table.internalProps.groupBy) {
40229
40264
  return Infinity;
40230
40265
  }
40231
40266
  return table._hasHierarchyTreeHeader?.() ? 1 : undefined;
@@ -42336,7 +42371,7 @@
42336
42371
  }
42337
42372
  }
42338
42373
  else {
42339
- if (table.options.groupBy ||
42374
+ if (table.internalProps.groupBy ||
42340
42375
  table.getBodyColumnDefine(col, row)?.tree) {
42341
42376
  const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row));
42342
42377
  const groupLength = table.dataSource.getGroupLength() ?? 0;
@@ -43617,11 +43652,11 @@
43617
43652
  isVtableMerge = vtableMerge;
43618
43653
  if (vtableMerge) {
43619
43654
  mayHaveIcon = true;
43620
- if (table.options.groupTitleCustomLayout) {
43621
- customResult = dealWithCustom(table.options.groupTitleCustomLayout, undefined, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
43655
+ if (table.internalProps.groupTitleCustomLayout) {
43656
+ customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, undefined, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
43622
43657
  }
43623
- if (table.options.groupTitleFieldFormat) {
43624
- value = table.options.groupTitleFieldFormat(rawRecord, col, row, table);
43658
+ if (table.internalProps.groupTitleFieldFormat) {
43659
+ value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table);
43625
43660
  }
43626
43661
  else if (vtableMergeName !== undefined) {
43627
43662
  value = vtableMergeName;
@@ -43660,8 +43695,11 @@
43660
43695
  });
43661
43696
  const textMark = oldCellGroup.getChildByName('text');
43662
43697
  if (forceFastUpdate && textMark) {
43698
+ const textAlign = cellTheme.text.textAlign;
43699
+ const hierarchyOffset = getHierarchyOffset(col, row, table);
43663
43700
  const attribute = {
43664
- textBaseline: 'top'
43701
+ textBaseline: 'top',
43702
+ dx: textAlign === 'left' ? hierarchyOffset : 0
43665
43703
  };
43666
43704
  textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
43667
43705
  }
@@ -43722,8 +43760,8 @@
43722
43760
  const type = isVtableMerge || isCustomMerge
43723
43761
  ? 'text'
43724
43762
  : table.isHeader(col, row)
43725
- ? (table._getHeaderLayoutMap(col, row).headerType ?? 'text')
43726
- : (table.getBodyColumnType(col, row) ?? 'text');
43763
+ ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
43764
+ : table.getBodyColumnType(col, row) ?? 'text';
43727
43765
  const padding = cellTheme._vtable.padding;
43728
43766
  const textAlign = cellTheme.text.textAlign;
43729
43767
  const textBaseline = cellTheme.text.textBaseline;
@@ -45094,8 +45132,8 @@
45094
45132
  let customLayout;
45095
45133
  const cellLocation = scene.table.getCellLocation(col, row);
45096
45134
  const { vtableMerge } = scene.table.getCellRawRecord(col, row) || {};
45097
- if (vtableMerge && scene.table.options.groupTitleCustomLayout) {
45098
- customLayout = scene.table.options.groupTitleCustomLayout;
45135
+ if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) {
45136
+ customLayout = scene.table.internalProps.groupTitleCustomLayout;
45099
45137
  }
45100
45138
  else if (cellLocation !== 'body') {
45101
45139
  const define = scene.table.getHeaderDefine(col, row);
@@ -45451,8 +45489,8 @@
45451
45489
  let customLayout;
45452
45490
  const cellType = scene.table.getCellLocation(col, row);
45453
45491
  const { vtableMerge } = scene.table.getCellRawRecord(col, row) || {};
45454
- if (vtableMerge && scene.table.options.groupTitleCustomLayout) {
45455
- customLayout = scene.table.options.groupTitleCustomLayout;
45492
+ if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) {
45493
+ customLayout = scene.table.internalProps.groupTitleCustomLayout;
45456
45494
  }
45457
45495
  else if (cellType !== 'body') {
45458
45496
  const define = scene.table.getHeaderDefine(col, row);
@@ -47131,6 +47169,114 @@
47131
47169
  return c > 3 && r && Object.defineProperty(target, key, r), r;
47132
47170
  }
47133
47171
 
47172
+ function getCellHoverColor(cellGroup, table) {
47173
+ let colorKey;
47174
+ if (cellGroup.role === 'cell' &&
47175
+ isValid$3(cellGroup.mergeStartCol) &&
47176
+ isValid$3(cellGroup.mergeStartRow) &&
47177
+ isValid$3(cellGroup.mergeEndCol) &&
47178
+ isValid$3(cellGroup.mergeEndRow)) {
47179
+ const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
47180
+ for (let col = colStart; col <= colEnd; col++) {
47181
+ for (let row = rowStart; row <= rowEnd; row++) {
47182
+ const key = isCellHover(table.stateManager, col, row, cellGroup);
47183
+ if (key && (!colorKey || key === 'cellBgColor')) {
47184
+ colorKey = key;
47185
+ }
47186
+ }
47187
+ }
47188
+ }
47189
+ else if (cellGroup.role === 'cell') {
47190
+ colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
47191
+ }
47192
+ if (!colorKey) {
47193
+ return undefined;
47194
+ }
47195
+ let hoverStyle;
47196
+ const layout = table.internalProps.layoutMap;
47197
+ if (layout.isCornerHeader(cellGroup.col, cellGroup.row)) {
47198
+ hoverStyle = table.theme.cornerHeaderStyle?.hover || table.theme.headerStyle?.hover;
47199
+ }
47200
+ else if (layout.isColumnHeader(cellGroup.col, cellGroup.row)) {
47201
+ hoverStyle = table.theme.headerStyle?.hover;
47202
+ }
47203
+ else if (layout.isRowHeader(cellGroup.col, cellGroup.row)) {
47204
+ hoverStyle = table.theme.rowHeaderStyle?.hover;
47205
+ }
47206
+ else if (layout.isBottomFrozenRow(cellGroup.col, cellGroup.row)) {
47207
+ hoverStyle =
47208
+ table.theme.bottomFrozenStyle?.hover ||
47209
+ (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.headerStyle?.hover);
47210
+ }
47211
+ else if (layout.isRightFrozenColumn(cellGroup.col, cellGroup.row)) {
47212
+ hoverStyle =
47213
+ table.theme.rightFrozenStyle?.hover ||
47214
+ (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.rowHeaderStyle?.hover);
47215
+ }
47216
+ else if (!table.isHeader(cellGroup.col, cellGroup.row)) {
47217
+ hoverStyle = table.theme.bodyStyle?.hover;
47218
+ }
47219
+ const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
47220
+ return fillColor;
47221
+ }
47222
+ function isCellHover(state, col, row, cellGroup) {
47223
+ const { highlightScope, disableHeader, cellPos } = state.hover;
47224
+ const table = state.table;
47225
+ const isHeader = table.isHeader(col, row);
47226
+ if (isHeader && disableHeader) {
47227
+ return undefined;
47228
+ }
47229
+ let hoverMode;
47230
+ if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
47231
+ hoverMode = 'cellBgColor';
47232
+ }
47233
+ else if (highlightScope === HighlightScope.column && cellPos.col === col) {
47234
+ if (cellPos.col === col && cellPos.row === row) {
47235
+ hoverMode = 'cellBgColor';
47236
+ }
47237
+ else {
47238
+ hoverMode = 'inlineColumnBgColor';
47239
+ }
47240
+ }
47241
+ else if (highlightScope === HighlightScope.row && cellPos.row === row) {
47242
+ if (cellPos.col === col && cellPos.row === row) {
47243
+ hoverMode = 'cellBgColor';
47244
+ }
47245
+ else {
47246
+ hoverMode = 'inlineRowBgColor';
47247
+ }
47248
+ }
47249
+ else if (highlightScope === HighlightScope.cross) {
47250
+ if (cellPos.col === col && cellPos.row === row) {
47251
+ hoverMode = 'cellBgColor';
47252
+ }
47253
+ else if (cellPos.col === col) {
47254
+ hoverMode = 'inlineColumnBgColor';
47255
+ }
47256
+ else if (cellPos.row === row) {
47257
+ hoverMode = 'inlineRowBgColor';
47258
+ }
47259
+ }
47260
+ if (hoverMode) {
47261
+ let cellDisable;
47262
+ if (isHeader) {
47263
+ const define = table.getHeaderDefine(col, row);
47264
+ cellDisable = define?.disableHeaderHover;
47265
+ if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
47266
+ cellDisable = true;
47267
+ }
47268
+ }
47269
+ else {
47270
+ const define = table.getBodyColumnDefine(col, row);
47271
+ cellDisable = define?.disableHover;
47272
+ }
47273
+ if (cellDisable) {
47274
+ hoverMode = undefined;
47275
+ }
47276
+ }
47277
+ return hoverMode;
47278
+ }
47279
+
47134
47280
  const CHART_NUMBER_TYPE = genNumberType();
47135
47281
  class Chart extends Rect$2 {
47136
47282
  type = 'chart';
@@ -47166,6 +47312,7 @@
47166
47312
  activate(table) {
47167
47313
  this.active = true;
47168
47314
  const { col, row } = this.parent;
47315
+ const hoverColor = getCellHoverColor(this.parent, table);
47169
47316
  const { x1, y1, x2, y2 } = this.getViewBox();
47170
47317
  const tableBound = getTableBounds(col, row, table);
47171
47318
  const clipBound = tableBound.intersect({
@@ -47214,6 +47361,15 @@
47214
47361
  ctx.inuse = false;
47215
47362
  stage.needRender = false;
47216
47363
  chartStage.resumeRender();
47364
+ },
47365
+ afterClearScreen(drawParams) {
47366
+ const { context, layer, viewBox } = drawParams;
47367
+ if (layer.main) {
47368
+ context.beginPath();
47369
+ context.fillStyle = hoverColor;
47370
+ context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1);
47371
+ context.fill();
47372
+ }
47217
47373
  }
47218
47374
  }));
47219
47375
  const chartStage = this.activeChartInstance.getStage();
@@ -47684,114 +47840,6 @@
47684
47840
  injectable()
47685
47841
  ], AfterGifImageRenderContribution);
47686
47842
 
47687
- function getCellHoverColor(cellGroup, table) {
47688
- let colorKey;
47689
- if (cellGroup.role === 'cell' &&
47690
- isValid$3(cellGroup.mergeStartCol) &&
47691
- isValid$3(cellGroup.mergeStartRow) &&
47692
- isValid$3(cellGroup.mergeEndCol) &&
47693
- isValid$3(cellGroup.mergeEndRow)) {
47694
- const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
47695
- for (let col = colStart; col <= colEnd; col++) {
47696
- for (let row = rowStart; row <= rowEnd; row++) {
47697
- const key = isCellHover(table.stateManager, col, row, cellGroup);
47698
- if (key && (!colorKey || key === 'cellBgColor')) {
47699
- colorKey = key;
47700
- }
47701
- }
47702
- }
47703
- }
47704
- else if (cellGroup.role === 'cell') {
47705
- colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup);
47706
- }
47707
- if (!colorKey) {
47708
- return undefined;
47709
- }
47710
- let hoverStyle;
47711
- const layout = table.internalProps.layoutMap;
47712
- if (layout.isCornerHeader(cellGroup.col, cellGroup.row)) {
47713
- hoverStyle = table.theme.cornerHeaderStyle?.hover || table.theme.headerStyle?.hover;
47714
- }
47715
- else if (layout.isColumnHeader(cellGroup.col, cellGroup.row)) {
47716
- hoverStyle = table.theme.headerStyle?.hover;
47717
- }
47718
- else if (layout.isRowHeader(cellGroup.col, cellGroup.row)) {
47719
- hoverStyle = table.theme.rowHeaderStyle?.hover;
47720
- }
47721
- else if (layout.isBottomFrozenRow(cellGroup.col, cellGroup.row)) {
47722
- hoverStyle =
47723
- table.theme.bottomFrozenStyle?.hover ||
47724
- (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.headerStyle?.hover);
47725
- }
47726
- else if (layout.isRightFrozenColumn(cellGroup.col, cellGroup.row)) {
47727
- hoverStyle =
47728
- table.theme.rightFrozenStyle?.hover ||
47729
- (table.isListTable() ? table.theme.bodyStyle?.hover : table.theme.rowHeaderStyle?.hover);
47730
- }
47731
- else if (!table.isHeader(cellGroup.col, cellGroup.row)) {
47732
- hoverStyle = table.theme.bodyStyle?.hover;
47733
- }
47734
- const fillColor = getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
47735
- return fillColor;
47736
- }
47737
- function isCellHover(state, col, row, cellGroup) {
47738
- const { highlightScope, disableHeader, cellPos } = state.hover;
47739
- const table = state.table;
47740
- const isHeader = table.isHeader(col, row);
47741
- if (isHeader && disableHeader) {
47742
- return undefined;
47743
- }
47744
- let hoverMode;
47745
- if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
47746
- hoverMode = 'cellBgColor';
47747
- }
47748
- else if (highlightScope === HighlightScope.column && cellPos.col === col) {
47749
- if (cellPos.col === col && cellPos.row === row) {
47750
- hoverMode = 'cellBgColor';
47751
- }
47752
- else {
47753
- hoverMode = 'inlineColumnBgColor';
47754
- }
47755
- }
47756
- else if (highlightScope === HighlightScope.row && cellPos.row === row) {
47757
- if (cellPos.col === col && cellPos.row === row) {
47758
- hoverMode = 'cellBgColor';
47759
- }
47760
- else {
47761
- hoverMode = 'inlineRowBgColor';
47762
- }
47763
- }
47764
- else if (highlightScope === HighlightScope.cross) {
47765
- if (cellPos.col === col && cellPos.row === row) {
47766
- hoverMode = 'cellBgColor';
47767
- }
47768
- else if (cellPos.col === col) {
47769
- hoverMode = 'inlineColumnBgColor';
47770
- }
47771
- else if (cellPos.row === row) {
47772
- hoverMode = 'inlineRowBgColor';
47773
- }
47774
- }
47775
- if (hoverMode) {
47776
- let cellDisable;
47777
- if (isHeader) {
47778
- const define = table.getHeaderDefine(col, row);
47779
- cellDisable = define?.disableHeaderHover;
47780
- if (cellGroup.firstChild && cellGroup.firstChild.name === 'axis' && table.options.hover?.disableAxisHover) {
47781
- cellDisable = true;
47782
- }
47783
- }
47784
- else {
47785
- const define = table.getBodyColumnDefine(col, row);
47786
- cellDisable = define?.disableHover;
47787
- }
47788
- if (cellDisable) {
47789
- hoverMode = undefined;
47790
- }
47791
- }
47792
- return hoverMode;
47793
- }
47794
-
47795
47843
  function getCellSelectColor(cellGroup, table) {
47796
47844
  let colorKey;
47797
47845
  if (cellGroup.role === 'cell' &&
@@ -49724,11 +49772,11 @@
49724
49772
  isVtableMerge = vtableMerge;
49725
49773
  if (vtableMerge) {
49726
49774
  mayHaveIcon = true;
49727
- if (table.options.groupTitleCustomLayout) {
49728
- customResult = dealWithCustom(table.options.groupTitleCustomLayout, undefined, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
49775
+ if (table.internalProps.groupTitleCustomLayout) {
49776
+ customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, undefined, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
49729
49777
  }
49730
- if (table.options.groupTitleFieldFormat) {
49731
- value = table.options.groupTitleFieldFormat(rawRecord, col, row, table);
49778
+ if (table.internalProps.groupTitleFieldFormat) {
49779
+ value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table);
49732
49780
  }
49733
49781
  else if (vtableMergeName !== undefined) {
49734
49782
  value = vtableMergeName;
@@ -49737,9 +49785,9 @@
49737
49785
  }
49738
49786
  const type = isVtableMerge || isCustomMerge
49739
49787
  ? 'text'
49740
- : ((table.isHeader(col, row)
49741
- ? (table._getHeaderLayoutMap(col, row).headerType ?? 'text')
49742
- : table.getBodyColumnType(col, row)) ?? 'text');
49788
+ : (table.isHeader(col, row)
49789
+ ? table._getHeaderLayoutMap(col, row).headerType ?? 'text'
49790
+ : table.getBodyColumnType(col, row)) ?? 'text';
49743
49791
  if (isPromise(value)) {
49744
49792
  createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
49745
49793
  dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
@@ -53786,7 +53834,7 @@
53786
53834
  const height = scene.table.tableNoFrameHeight;
53787
53835
  scene.tableGroup = new Group$1({ x: 0, y: 0, width, height, clip: true, pickable: false });
53788
53836
  scene.tableGroup.role = 'table';
53789
- const colHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
53837
+ const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
53790
53838
  colHeaderGroup.role = 'col-header';
53791
53839
  scene.colHeaderGroup = colHeaderGroup;
53792
53840
  const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
@@ -56211,6 +56259,8 @@
56211
56259
  if (prevHoverCellCol === col && prevHoverCellRow === row) {
56212
56260
  return;
56213
56261
  }
56262
+ cellPos.col = col;
56263
+ cellPos.row = row;
56214
56264
  if (!state.table.options.customConfig?.disableBuildInChartActive) {
56215
56265
  scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow);
56216
56266
  scenegraph.activateChart(col, row);
@@ -56251,8 +56301,6 @@
56251
56301
  if (highlightScope !== HighlightScope.none && !disableHeader) {
56252
56302
  scenegraph.showHoverIcon(col, row);
56253
56303
  }
56254
- cellPos.col = col;
56255
- cellPos.row = row;
56256
56304
  if (updateScenegraph) {
56257
56305
  state.table.scenegraph.updateNextFrame();
56258
56306
  }
@@ -57000,6 +57048,12 @@
57000
57048
  state.columnMove.moving = true;
57001
57049
  state.columnMove.colSource = col;
57002
57050
  state.columnMove.rowSource = row;
57051
+ if (state.table.isListTable()) {
57052
+ const nodeIndex = state.table.getRecordIndexByCell(col, row);
57053
+ const nodeData = state.table.getRecordByCell(col, row);
57054
+ const hierarchyState = state.table.getRecordHierarchyState(col, row);
57055
+ state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
57056
+ }
57003
57057
  state.columnMove.x = x - state.table.tableX;
57004
57058
  state.columnMove.y = y - state.table.tableY;
57005
57059
  const cellLocation = state.table.getCellLocation(col, row);
@@ -57042,6 +57096,12 @@
57042
57096
  state.columnMove.y = y - state.table.tableY;
57043
57097
  state.columnMove.colTarget = targetCell.col;
57044
57098
  state.columnMove.rowTarget = targetCell.row;
57099
+ if (state.table.isListTable()) {
57100
+ const nodeIndex = state.table.getRecordIndexByCell(targetCell.col, targetCell.row);
57101
+ const nodeData = state.table.getRecordByCell(targetCell.col, targetCell.row);
57102
+ const hierarchyState = state.table.getRecordHierarchyState(targetCell.col, targetCell.row);
57103
+ state.columnMove.rowTargetSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
57104
+ }
57045
57105
  state.updateCursor('grabbing');
57046
57106
  let lineX;
57047
57107
  let backX;
@@ -57620,9 +57680,11 @@
57620
57680
  }
57621
57681
  function setHeaderCheckedState(field, checked, state) {
57622
57682
  state.headerCheckedState[field] = checked;
57623
- state.checkedState?.forEach(recordCheckState => {
57624
- recordCheckState[field] = checked;
57625
- });
57683
+ if (state.table.internalProps.enableCheckboxCascade) {
57684
+ state.checkedState?.forEach(recordCheckState => {
57685
+ recordCheckState[field] = checked;
57686
+ });
57687
+ }
57626
57688
  }
57627
57689
  function syncCheckedState(col, row, field, checked, state) {
57628
57690
  if (state.table.isHeader(col, row)) {
@@ -57650,7 +57712,7 @@
57650
57712
  if (state.checkedState.get(dataIndex)) {
57651
57713
  state.checkedState.get(dataIndex)[field] = checked;
57652
57714
  }
57653
- else if (dataIndex.includes(',')) {
57715
+ else if (state.table.internalProps.enableCheckboxCascade && dataIndex.includes(',')) {
57654
57716
  const parentDataIndex = dataIndex.split(',').slice(0, -1).join(',');
57655
57717
  if (state.checkedState.has(parentDataIndex) && state.checkedState.get(parentDataIndex)[field] === true) {
57656
57718
  state.checkedState.set(dataIndex, {
@@ -57729,7 +57791,7 @@
57729
57791
  ? state.table.getCustomMerge(tableIndex, row)
57730
57792
  : state.table.getCustomMerge(col, tableIndex);
57731
57793
  const data = state.table.dataSource?.get(index);
57732
- if (mergeCell || (!state.table.internalProps.rowSeriesNumber?.enableTreeCheckbox && data?.vtableMerge)) {
57794
+ if (mergeCell || (!state.table.internalProps.enableCheckboxCascade && data?.vtableMerge)) {
57733
57795
  return;
57734
57796
  }
57735
57797
  if (check_state?.[field] !== true) {
@@ -58165,6 +58227,8 @@
58165
58227
  colTarget: -1,
58166
58228
  rowSource: -1,
58167
58229
  rowTarget: -1,
58230
+ rowSourceSize: 0,
58231
+ rowTargetSize: 0,
58168
58232
  x: 0,
58169
58233
  y: 0,
58170
58234
  moving: false
@@ -58245,6 +58309,8 @@
58245
58309
  colTarget: -1,
58246
58310
  rowSource: -1,
58247
58311
  rowTarget: -1,
58312
+ rowSourceSize: 0,
58313
+ rowTargetSize: 0,
58248
58314
  x: 0,
58249
58315
  y: 0,
58250
58316
  moving: false
@@ -59675,11 +59741,14 @@
59675
59741
  table.stateManager.columnMove?.colTarget !== -1 &&
59676
59742
  table.stateManager.columnMove?.rowTarget !== -1) {
59677
59743
  if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
59744
+ const { colSource, rowSource, colTarget, rowTarget } = table.stateManager.columnMove;
59745
+ const rowSourceSize = table.stateManager.columnMove.rowSourceSize ?? 0;
59746
+ const rowTargetSize = table.stateManager.columnMove.rowTargetSize ?? 0;
59678
59747
  table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
59679
- target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
59748
+ target: { col: colTarget, row: rowTarget + rowTargetSize - rowSourceSize },
59680
59749
  source: {
59681
- col: table.stateManager.columnMove.colSource,
59682
- row: table.stateManager.columnMove.rowSource
59750
+ col: colSource,
59751
+ row: rowSource
59683
59752
  },
59684
59753
  event: e
59685
59754
  });
@@ -59687,8 +59756,13 @@
59687
59756
  }
59688
59757
  else if (!endMoveColSuccess) {
59689
59758
  if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL)) {
59759
+ const rowSourceSize = table.stateManager.columnMove.rowSourceSize ?? 0;
59760
+ const rowTargetSize = table.stateManager.columnMove.rowTargetSize ?? 0;
59690
59761
  table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL, {
59691
- target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
59762
+ target: {
59763
+ col: table.stateManager.columnMove.colTarget,
59764
+ row: table.stateManager.columnMove.rowTarget + rowTargetSize - rowSourceSize
59765
+ },
59692
59766
  source: {
59693
59767
  col: table.stateManager.columnMove.colSource,
59694
59768
  row: table.stateManager.columnMove.rowSource
@@ -60313,19 +60387,23 @@
60313
60387
  };
60314
60388
  if (table.isHeader(col, row)) {
60315
60389
  table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked);
60316
- const cellType = table.getCellType(col, row);
60317
- if (cellType === 'checkbox') {
60318
- table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
60390
+ if (table.internalProps.enableCheckboxCascade) {
60391
+ const cellType = table.getCellType(col, row);
60392
+ if (cellType === 'checkbox') {
60393
+ table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
60394
+ }
60319
60395
  }
60320
60396
  }
60321
60397
  else {
60322
60398
  table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked);
60323
- const cellType = table.getCellType(col, row);
60324
- if (cellType === 'checkbox') {
60325
- const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field];
60326
- const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field, col, row);
60327
- if (oldHeaderCheckedState !== newHeaderCheckedState) {
60328
- table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
60399
+ if (table.internalProps.enableCheckboxCascade) {
60400
+ const cellType = table.getCellType(col, row);
60401
+ if (cellType === 'checkbox') {
60402
+ const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field];
60403
+ const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field, col, row);
60404
+ if (oldHeaderCheckedState !== newHeaderCheckedState) {
60405
+ table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
60406
+ }
60329
60407
  }
60330
60408
  }
60331
60409
  }
@@ -61665,8 +61743,7 @@
61665
61743
  function bindGroupTitleCheckboxChange(table) {
61666
61744
  table.on('checkbox_state_change', args => {
61667
61745
  const { col, row, checked, field } = args;
61668
- if (!table.internalProps.layoutMap.isSeriesNumber(col, row) ||
61669
- table.internalProps.rowSeriesNumber?.enableTreeCheckbox !== true) {
61746
+ if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || table.internalProps.enableCheckboxCascade !== true) {
61670
61747
  return;
61671
61748
  }
61672
61749
  if (table.isHeader(col, row)) {
@@ -61710,6 +61787,9 @@
61710
61787
  });
61711
61788
  }
61712
61789
  function bindGroupCheckboxTreeChange(table) {
61790
+ if (table.internalProps.enableCheckboxCascade !== true) {
61791
+ return;
61792
+ }
61713
61793
  table.on('checkbox_state_change', args => {
61714
61794
  const { col, row, checked, field } = args;
61715
61795
  const isCheckboxAndTree = table.internalProps.columns.some(column => column.tree);
@@ -61876,6 +61956,9 @@
61876
61956
  });
61877
61957
  }
61878
61958
  function bindHeaderCheckboxChange(table) {
61959
+ if (table.internalProps.enableCheckboxCascade !== true) {
61960
+ return;
61961
+ }
61879
61962
  table.on('checkbox_state_change', args => {
61880
61963
  const { col, row, checked, field } = args;
61881
61964
  if (table.isHeader(col, row)) {
@@ -62221,7 +62304,7 @@
62221
62304
  }
62222
62305
  checkColumnResize(eventArgsSet, update) {
62223
62306
  const { eventArgs } = eventArgsSet;
62224
- if (this.table.options.enableTreeStickCell && !eventArgs) {
62307
+ if (this.table.internalProps.enableTreeStickCell && !eventArgs) {
62225
62308
  return false;
62226
62309
  }
62227
62310
  const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs?.targetCell);
@@ -65218,7 +65301,7 @@
65218
65301
  return count;
65219
65302
  }
65220
65303
  function checkHasTreeDefine(layoutMap) {
65221
- if (layoutMap._table.options.groupBy) {
65304
+ if (layoutMap._table.internalProps.groupBy) {
65222
65305
  return true;
65223
65306
  }
65224
65307
  const { columns } = layoutMap._table.options;
@@ -67052,7 +67135,7 @@
67052
67135
  return TABLE_EVENT_TYPE;
67053
67136
  }
67054
67137
  options;
67055
- version = "1.19.4-alpha.0";
67138
+ version = "1.19.4-alpha.2";
67056
67139
  pagination;
67057
67140
  id = `VTable${Date.now()}`;
67058
67141
  headerStyleCache;
@@ -67093,6 +67176,7 @@
67093
67176
  vglobal.isImageAnonymous = false;
67094
67177
  }
67095
67178
  const { frozenColCount = 0, unfreezeAllOnExceedsMaxWidth, frozenRowCount, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, containerFit = { width: false, height: false }, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, enableCheckboxCascade, columnResizeMode, rowResizeMode = 'none', resize, dragHeaderMode, dragOrder, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight, clearDOM = true } = options;
67179
+ const { groupConfig, groupBy, groupTitleFieldFormat, groupTitleCustomLayout, enableTreeStickCell } = options;
67096
67180
  this.container = container;
67097
67181
  this.options = options;
67098
67182
  this._widthMode = widthMode;
@@ -67178,13 +67262,20 @@
67178
67262
  internalProps.keyboardOptions = keyboardOptions;
67179
67263
  internalProps.eventOptions = eventOptions;
67180
67264
  internalProps.rowSeriesNumber = rowSeriesNumber;
67181
- internalProps.enableCheckboxCascade = enableCheckboxCascade;
67265
+ internalProps.enableCheckboxCascade = enableCheckboxCascade ?? rowSeriesNumber?.enableTreeCheckbox ?? true;
67182
67266
  internalProps.columnResizeMode = resize?.columnResizeMode ?? columnResizeMode;
67183
67267
  internalProps.rowResizeMode = resize?.rowResizeMode ?? rowResizeMode;
67184
67268
  internalProps.dragHeaderMode = dragOrder?.dragHeaderMode ?? dragHeaderMode ?? 'none';
67185
67269
  internalProps.renderChartAsync = renderChartAsync;
67186
67270
  setBatchRenderChartCount(renderChartAsyncBatchCount);
67187
67271
  internalProps.overscrollBehavior = overscrollBehavior ?? 'auto';
67272
+ internalProps.groupBy = groupConfig?.groupBy ?? groupBy;
67273
+ internalProps.titleCheckbox = groupConfig?.titleCheckbox;
67274
+ internalProps.groupTitleFieldFormat =
67275
+ groupConfig?.titleFieldFormat ?? groupTitleFieldFormat;
67276
+ internalProps.groupTitleCustomLayout =
67277
+ groupConfig?.titleCustomLayout ?? groupTitleCustomLayout;
67278
+ internalProps.enableTreeStickCell = groupConfig?.enableTreeStickCell ?? enableTreeStickCell;
67188
67279
  internalProps._rowHeightsMap = new NumberRangeMap(this);
67189
67280
  internalProps._rowRangeHeightsMap = new Map();
67190
67281
  internalProps._colRangeWidthsMap = new Map();
@@ -68557,6 +68648,7 @@
68557
68648
  this.options = options;
68558
68649
  this._hasAutoImageColumn = undefined;
68559
68650
  const { frozenColCount = 0, unfreezeAllOnExceedsMaxWidth, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, enableCheckboxCascade, columnResizeMode, rowResizeMode = 'none', resize, dragHeaderMode, dragOrder, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, containerFit, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
68651
+ const { groupConfig, groupBy, groupTitleFieldFormat, groupTitleCustomLayout, enableTreeStickCell } = options;
68560
68652
  if (pixelRatio && pixelRatio !== this.internalProps.pixelRatio) {
68561
68653
  this.internalProps.pixelRatio = pixelRatio;
68562
68654
  }
@@ -68615,7 +68707,7 @@
68615
68707
  internalProps.keyboardOptions = keyboardOptions;
68616
68708
  internalProps.eventOptions = eventOptions;
68617
68709
  internalProps.rowSeriesNumber = rowSeriesNumber;
68618
- internalProps.enableCheckboxCascade = enableCheckboxCascade;
68710
+ internalProps.enableCheckboxCascade = enableCheckboxCascade ?? rowSeriesNumber?.enableTreeCheckbox ?? true;
68619
68711
  internalProps.columnResizeMode = resize?.columnResizeMode ?? columnResizeMode;
68620
68712
  internalProps.rowResizeMode = resize?.rowResizeMode ?? rowResizeMode;
68621
68713
  internalProps.dragHeaderMode = dragOrder?.dragHeaderMode ?? dragHeaderMode ?? 'none';
@@ -68623,6 +68715,13 @@
68623
68715
  setBatchRenderChartCount(renderChartAsyncBatchCount);
68624
68716
  internalProps.overscrollBehavior = overscrollBehavior ?? 'auto';
68625
68717
  internalProps.cellTextOverflows = {};
68718
+ internalProps.groupBy = groupConfig?.groupBy ?? groupBy;
68719
+ internalProps.titleCheckbox = groupConfig?.titleCheckbox;
68720
+ internalProps.groupTitleFieldFormat =
68721
+ groupConfig?.titleFieldFormat ?? groupTitleFieldFormat;
68722
+ internalProps.groupTitleCustomLayout =
68723
+ groupConfig?.titleCustomLayout ?? groupTitleCustomLayout;
68724
+ internalProps.enableTreeStickCell = groupConfig?.enableTreeStickCell ?? enableTreeStickCell;
68626
68725
  internalProps._rowHeightsMap = new NumberRangeMap(this);
68627
68726
  internalProps._rowRangeHeightsMap = new Map();
68628
68727
  internalProps._colRangeWidthsMap = new Map();
@@ -69293,7 +69392,7 @@
69293
69392
  icons = this.internalProps.headerHelper.getIcons(col, row);
69294
69393
  }
69295
69394
  else if (this.internalProps.layoutMap.isSeriesNumber(col, row)) {
69296
- if (!this.options.groupBy || !this.getCellRawRecord(col, row)?.vtableMerge) {
69395
+ if (!this.internalProps.groupBy || !this.getCellRawRecord(col, row)?.vtableMerge) {
69297
69396
  const dragOrder = this.internalProps.layoutMap.getSeriesNumberBody(col, row)?.define
69298
69397
  ?.dragOrder;
69299
69398
  if (dragOrder) {
@@ -71893,7 +71992,7 @@
71893
71992
  return;
71894
71993
  }
71895
71994
  const cellRecord = layout._table.getCellRawRecord(col, row);
71896
- if (layout._table.internalProps.rowSeriesNumber?.enableTreeCheckbox) {
71995
+ if (layout._table.internalProps.titleCheckbox && layout._table.internalProps.rowSeriesNumber) {
71897
71996
  if (cellRecord?.vtableMerge && col >= layout.leftRowSeriesNumberColumnCount) {
71898
71997
  cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount;
71899
71998
  cellRange.end.col = layout.colCount - 1;
@@ -72076,7 +72175,7 @@
72076
72175
  title: rowSeriesNumber.title,
72077
72176
  define: merge$1({ field: '_vtable_rowSeries_number' }, rowSeriesNumber),
72078
72177
  cellType: rowSeriesNumber.cellType ?? 'text',
72079
- headerType: rowSeriesNumber.cellType === 'checkbox' ? 'checkbox' : 'text',
72178
+ headerType: rowSeriesNumber.headerType ?? (rowSeriesNumber.cellType === 'checkbox' ? 'checkbox' : 'text'),
72080
72179
  style: rowSeriesNumber.style,
72081
72180
  width: rowSeriesNumber.width,
72082
72181
  format: rowSeriesNumber.format,
@@ -73702,11 +73801,11 @@
73702
73801
  if (oldCellUpdateType === 'group') {
73703
73802
  return oldCellUpdateType;
73704
73803
  }
73705
- if (oldCellUpdateType === 'sort' && !table.options.groupBy) {
73804
+ if (oldCellUpdateType === 'sort' && !table.internalProps.groupBy) {
73706
73805
  return oldCellUpdateType;
73707
73806
  }
73708
73807
  let cellUpdateType = 'normal';
73709
- if (table.options.groupBy) {
73808
+ if (table.internalProps.groupBy) {
73710
73809
  cellUpdateType = 'group';
73711
73810
  }
73712
73811
  else if (!table.isHeader(col, row) && table.dataSource.lastOrderField) {
@@ -73729,7 +73828,7 @@
73729
73828
  }
73730
73829
  }
73731
73830
  function listTableAddRecord(record, recordIndex, table) {
73732
- if (table.options.groupBy) {
73831
+ if (table.internalProps.groupBy) {
73733
73832
  table.dataSource.addRecordsForGroup?.([record], recordIndex);
73734
73833
  table.refreshRowColCount();
73735
73834
  table.internalProps.layoutMap.clearCellRangeMap();
@@ -73830,7 +73929,7 @@
73830
73929
  }
73831
73930
  }
73832
73931
  function listTableAddRecords(records, recordIndex, table) {
73833
- if (table.options.groupBy) {
73932
+ if (table.internalProps.groupBy) {
73834
73933
  table.dataSource.addRecordsForGroup?.(records, recordIndex);
73835
73934
  table.refreshRowColCount();
73836
73935
  table.internalProps.layoutMap.clearCellRangeMap();
@@ -73948,7 +74047,7 @@
73948
74047
  }
73949
74048
  function listTableDeleteRecords(recordIndexs, table) {
73950
74049
  if (recordIndexs?.length > 0) {
73951
- if (table.options.groupBy) {
74050
+ if (table.internalProps.groupBy) {
73952
74051
  table.dataSource.deleteRecordsForGroup?.(recordIndexs);
73953
74052
  table.refreshRowColCount();
73954
74053
  table.internalProps.layoutMap.clearCellRangeMap();
@@ -74076,7 +74175,7 @@
74076
74175
  }
74077
74176
  function listTableUpdateRecords(records, recordIndexs, table) {
74078
74177
  if (recordIndexs?.length > 0) {
74079
- if (table.options.groupBy) {
74178
+ if (table.internalProps.groupBy) {
74080
74179
  table.dataSource.updateRecordsForGroup?.(records, recordIndexs);
74081
74180
  table.refreshRowColCount();
74082
74181
  table.internalProps.layoutMap.clearCellRangeMap();
@@ -74263,14 +74362,15 @@
74263
74362
  this.pagination = options.pagination;
74264
74363
  internalProps.sortState = options.sortState;
74265
74364
  internalProps.multipleSort = !!options.multipleSort;
74266
- internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {};
74365
+ internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy) : {};
74267
74366
  internalProps.columns = options.columns
74268
74367
  ? cloneDeepSpec(options.columns, ['children'])
74269
74368
  : options.header
74270
74369
  ? cloneDeepSpec(options.header, ['children'])
74271
74370
  : [];
74272
74371
  generateAggregationForColumn(this);
74273
- internalProps.enableTreeNodeMerge = options.enableTreeNodeMerge ?? isValid$3(options.groupBy) ?? false;
74372
+ internalProps.enableTreeNodeMerge =
74373
+ options.enableTreeNodeMerge ?? isValid$3(this.internalProps.groupBy) ?? false;
74274
74374
  this.internalProps.headerHelper.setTableColumnsEditor();
74275
74375
  this.showHeader = options.showHeader ?? true;
74276
74376
  this.internalProps.columnWidthConfig = options.columnWidthConfig;
@@ -74304,7 +74404,7 @@
74304
74404
  this.internalProps.emptyTip?.resetVisible();
74305
74405
  }
74306
74406
  }
74307
- if (options.enableTreeStickCell) {
74407
+ if (this.internalProps.enableTreeStickCell) {
74308
74408
  const ListTreeStickCellPlugin = Factory.getComponent('listTreeStickCellPlugin');
74309
74409
  this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
74310
74410
  }
@@ -74423,7 +74523,7 @@
74423
74523
  return title;
74424
74524
  }
74425
74525
  let value;
74426
- if (this.options.groupBy) {
74526
+ if (this.internalProps.groupBy) {
74427
74527
  const record = table.getCellRawRecord(col, row);
74428
74528
  if (record?.vtableMerge) {
74429
74529
  return '';
@@ -74568,7 +74668,9 @@
74568
74668
  options.dragOrder?.frozenColDragHeaderMode ?? options.frozenColDragHeaderMode;
74569
74669
  this.pagination = options.pagination;
74570
74670
  internalProps.sortState = options.sortState;
74571
- internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {};
74671
+ internalProps.dataConfig = this.internalProps.groupBy
74672
+ ? getGroupByDataConfig(this.internalProps.groupBy)
74673
+ : {};
74572
74674
  this.showHeader = options.showHeader ?? true;
74573
74675
  internalProps.columns = options.columns
74574
74676
  ? cloneDeepSpec(options.columns, ['children'])
@@ -74576,7 +74678,8 @@
74576
74678
  ? cloneDeepSpec(options.header, ['children'])
74577
74679
  : [];
74578
74680
  generateAggregationForColumn(this);
74579
- internalProps.enableTreeNodeMerge = options.enableTreeNodeMerge ?? isValid$3(options.groupBy) ?? false;
74681
+ internalProps.enableTreeNodeMerge =
74682
+ options.enableTreeNodeMerge ?? isValid$3(this.internalProps.groupBy) ?? false;
74580
74683
  this.internalProps.headerHelper.setTableColumnsEditor();
74581
74684
  this.transpose = options.transpose ?? false;
74582
74685
  this.refreshHeader();
@@ -74821,7 +74924,9 @@
74821
74924
  if (this.isHeader(col, row)) {
74822
74925
  return this._getHeaderLayoutMap(col, row)?.hierarchyState;
74823
74926
  }
74824
- if (!this.options.groupBy || (isArray$7(this.options.groupBy) && this.options.groupBy.length === 0)) {
74927
+ if (!this.internalProps.groupBy ||
74928
+ (isArray$7(this.internalProps.groupBy) &&
74929
+ this.internalProps.groupBy.length === 0)) {
74825
74930
  const define = this.getBodyColumnDefine(col, row);
74826
74931
  if (!define.tree) {
74827
74932
  return HierarchyState.none;
@@ -74830,6 +74935,16 @@
74830
74935
  const index = this.getRecordShowIndexByCell(col, row);
74831
74936
  return this.dataSource.getHierarchyState(index);
74832
74937
  }
74938
+ getRecordHierarchyState(col, row) {
74939
+ let recordIndex;
74940
+ if (this.transpose) {
74941
+ this.getRecordShowIndexByCell(col, 0);
74942
+ }
74943
+ else {
74944
+ recordIndex = this.getRecordShowIndexByCell(0, row);
74945
+ }
74946
+ return this.dataSource.getHierarchyState(recordIndex);
74947
+ }
74833
74948
  toggleHierarchyState(col, row, recalculateColWidths = true) {
74834
74949
  this.stateManager.updateHoverIcon(col, row, undefined, undefined);
74835
74950
  const hierarchyState = this.getHierarchyState(col, row);
@@ -75271,7 +75386,7 @@
75271
75386
  return this.internalProps.layoutMap.isAggregation(col, row);
75272
75387
  }
75273
75388
  getGroupTitleLevel(col, row) {
75274
- if (!this.options.groupBy) {
75389
+ if (!this.internalProps.groupBy) {
75275
75390
  return undefined;
75276
75391
  }
75277
75392
  const indexArr = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row));
@@ -87034,7 +87149,7 @@
87034
87149
  const newCellAggregator = new SumAggregator({
87035
87150
  key: indicator,
87036
87151
  field: indicator,
87037
- isRecord: true,
87152
+ isRecord: true
87038
87153
  });
87039
87154
  newCellAggregator.changedValue = newValue;
87040
87155
  this.recalculateTotals(rowKey, colKey, indicator, newCellAggregator);
@@ -87107,6 +87222,25 @@
87107
87222
  if (this.totals?.row?.showGrandTotals) {
87108
87223
  if (this.tree[this.rowGrandTotalLabel]?.[flatColKey]?.[indicatorIndex]) {
87109
87224
  addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColKey][indicatorIndex], this.rowGrandTotalLabel, flatColKey);
87225
+ if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
87226
+ for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
87227
+ const colDimension = this.totals.column.subTotalsDimensions[j];
87228
+ const colDimensionIndex = this.columns.indexOf(colDimension);
87229
+ if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
87230
+ const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
87231
+ colSubTotalKeyParts.push(this.colSubTotalLabel);
87232
+ const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
87233
+ if (this.tree[this.rowGrandTotalLabel]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87234
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
87235
+ }
87236
+ }
87237
+ }
87238
+ }
87239
+ if (this.totals?.column?.showGrandTotals) {
87240
+ if (this.tree[this.rowGrandTotalLabel]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87241
+ addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
87242
+ }
87243
+ }
87110
87244
  }
87111
87245
  if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
87112
87246
  for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
@@ -87116,43 +87250,24 @@
87116
87250
  const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
87117
87251
  colSubTotalKeyParts.push(this.colSubTotalLabel);
87118
87252
  const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
87119
- if (this.tree[this.rowGrandTotalLabel]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87120
- addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][flatColSubTotalKey][indicatorIndex], this.rowGrandTotalLabel, flatColSubTotalKey);
87253
+ if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87254
+ addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
87121
87255
  }
87122
87256
  }
87123
87257
  }
87124
87258
  }
87125
87259
  if (this.totals?.column?.showGrandTotals) {
87126
- if (this.tree[this.rowGrandTotalLabel]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87127
- addAggregatorToResetSet(this.tree[this.rowGrandTotalLabel][this.colGrandTotalLabel][indicatorIndex], this.rowGrandTotalLabel, this.colGrandTotalLabel);
87260
+ if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87261
+ addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
87128
87262
  }
87129
87263
  }
87130
- }
87131
- if (this.totals?.column?.subTotalsDimensions && this.totals.column.showSubTotals !== false) {
87132
- for (let j = 0; j < this.totals.column.subTotalsDimensions.length; j++) {
87133
- const colDimension = this.totals.column.subTotalsDimensions[j];
87134
- const colDimensionIndex = this.columns.indexOf(colDimension);
87135
- if (colDimensionIndex >= 0 && colDimensionIndex < colKeyParts.length) {
87136
- const colSubTotalKeyParts = colKeyParts.slice(0, colDimensionIndex + 1);
87137
- colSubTotalKeyParts.push(this.colSubTotalLabel);
87138
- const flatColSubTotalKey = colSubTotalKeyParts.join(this.stringJoinChar);
87139
- if (this.tree[flatRowKey]?.[flatColSubTotalKey]?.[indicatorIndex]) {
87140
- addAggregatorToResetSet(this.tree[flatRowKey][flatColSubTotalKey][indicatorIndex], flatRowKey, flatColSubTotalKey);
87141
- }
87264
+ aggregatorsToReset.forEach(agg => {
87265
+ if (newCellAggregator && subTotalAggregators.has(agg)) {
87266
+ agg.push(newCellAggregator);
87142
87267
  }
87143
- }
87144
- }
87145
- if (this.totals?.column?.showGrandTotals) {
87146
- if (this.tree[flatRowKey]?.[this.colGrandTotalLabel]?.[indicatorIndex]) {
87147
- addAggregatorToResetSet(this.tree[flatRowKey][this.colGrandTotalLabel][indicatorIndex], flatRowKey, this.colGrandTotalLabel);
87148
- }
87268
+ agg.recalculate();
87269
+ });
87149
87270
  }
87150
- aggregatorsToReset.forEach(agg => {
87151
- if (newCellAggregator && subTotalAggregators.has(agg)) {
87152
- agg.push(newCellAggregator);
87153
- }
87154
- agg.recalculate();
87155
- });
87156
87271
  }
87157
87272
  changeRecordFieldValue(fieldName, oldValue, value) {
87158
87273
  let isIndicatorName = false;
@@ -90725,7 +90840,7 @@
90725
90840
  }
90726
90841
 
90727
90842
  registerForVrender();
90728
- const version = "1.19.4-alpha.0";
90843
+ const version = "1.19.4-alpha.2";
90729
90844
  function getIcons() {
90730
90845
  return get$2();
90731
90846
  }