@visactor/vtable 1.4.2-alpha.2 → 1.4.2-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/cjs/ListTable.js +1 -1
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/components/tooltip/logic/BubbleTooltipElement.js +2 -0
  4. package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  5. package/cjs/core/BaseTable.d.ts +3 -2
  6. package/cjs/core/BaseTable.js +22 -150
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/core/utils/get-cell-position.d.ts +42 -0
  9. package/cjs/core/utils/get-cell-position.js +204 -0
  10. package/cjs/core/utils/get-cell-position.js.map +1 -0
  11. package/cjs/edit/edit-manager.d.ts +1 -1
  12. package/cjs/edit/edit-manager.js +7 -6
  13. package/cjs/edit/edit-manager.js.map +1 -1
  14. package/cjs/event/event.js +7 -3
  15. package/cjs/event/event.js.map +1 -1
  16. package/cjs/event/listener/container-dom.js +92 -86
  17. package/cjs/event/listener/container-dom.js.map +1 -1
  18. package/cjs/event/listener/table-group.js +29 -20
  19. package/cjs/event/listener/table-group.js.map +1 -1
  20. package/cjs/index.d.ts +3 -3
  21. package/cjs/index.js +12 -8
  22. package/cjs/index.js.map +1 -1
  23. package/cjs/layout/layout-helper.js +2 -2
  24. package/cjs/layout/layout-helper.js.map +1 -1
  25. package/cjs/layout/pivot-header-layout.js +182 -53
  26. package/cjs/layout/pivot-header-layout.js.map +1 -1
  27. package/cjs/layout/simple-header-layout.d.ts +3 -0
  28. package/cjs/layout/simple-header-layout.js +28 -22
  29. package/cjs/layout/simple-header-layout.js.map +1 -1
  30. package/cjs/scenegraph/component/custom.js +4 -2
  31. package/cjs/scenegraph/component/custom.js.map +1 -1
  32. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +63 -57
  33. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  34. package/cjs/scenegraph/group-creater/cell-helper.js +13 -11
  35. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  36. package/cjs/scenegraph/group-creater/progress/proxy.js +8 -8
  37. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  38. package/cjs/state/cell-move/index.js +4 -1
  39. package/cjs/state/cell-move/index.js.map +1 -1
  40. package/cjs/state/sort/index.js +7 -3
  41. package/cjs/state/sort/index.js.map +1 -1
  42. package/cjs/state/state.d.ts +1 -1
  43. package/cjs/state/state.js +10 -6
  44. package/cjs/state/state.js.map +1 -1
  45. package/cjs/tools/util.d.ts +1 -0
  46. package/cjs/tools/util.js +11 -2
  47. package/cjs/tools/util.js.map +1 -1
  48. package/cjs/ts-types/base-table.d.ts +2 -0
  49. package/cjs/ts-types/base-table.js.map +1 -1
  50. package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -0
  51. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  52. package/cjs/ts-types/table-engine.d.ts +1 -1
  53. package/cjs/ts-types/table-engine.js.map +1 -1
  54. package/cjs/vrender.js.map +1 -1
  55. package/dist/vtable.js +741 -425
  56. package/dist/vtable.min.js +2 -2
  57. package/es/ListTable.js +1 -1
  58. package/es/ListTable.js.map +1 -1
  59. package/es/components/tooltip/logic/BubbleTooltipElement.js +3 -1
  60. package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
  61. package/es/core/BaseTable.d.ts +3 -2
  62. package/es/core/BaseTable.js +24 -150
  63. package/es/core/BaseTable.js.map +1 -1
  64. package/es/core/utils/get-cell-position.d.ts +42 -0
  65. package/es/core/utils/get-cell-position.js +192 -0
  66. package/es/core/utils/get-cell-position.js.map +1 -0
  67. package/es/edit/edit-manager.d.ts +1 -1
  68. package/es/edit/edit-manager.js +7 -6
  69. package/es/edit/edit-manager.js.map +1 -1
  70. package/es/event/event.js +6 -2
  71. package/es/event/event.js.map +1 -1
  72. package/es/event/listener/container-dom.js +92 -86
  73. package/es/event/listener/container-dom.js.map +1 -1
  74. package/es/event/listener/table-group.js +29 -20
  75. package/es/event/listener/table-group.js.map +1 -1
  76. package/es/index.d.ts +3 -3
  77. package/es/index.js +3 -3
  78. package/es/index.js.map +1 -1
  79. package/es/layout/layout-helper.js +2 -2
  80. package/es/layout/layout-helper.js.map +1 -1
  81. package/es/layout/pivot-header-layout.js +182 -53
  82. package/es/layout/pivot-header-layout.js.map +1 -1
  83. package/es/layout/simple-header-layout.d.ts +3 -0
  84. package/es/layout/simple-header-layout.js +28 -22
  85. package/es/layout/simple-header-layout.js.map +1 -1
  86. package/es/scenegraph/component/custom.js +4 -2
  87. package/es/scenegraph/component/custom.js.map +1 -1
  88. package/es/scenegraph/graphic/contributions/group-contribution-render.js +63 -57
  89. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  90. package/es/scenegraph/group-creater/cell-helper.js +13 -11
  91. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  92. package/es/scenegraph/group-creater/progress/proxy.js +8 -8
  93. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  94. package/es/state/cell-move/index.js +4 -1
  95. package/es/state/cell-move/index.js.map +1 -1
  96. package/es/state/sort/index.js +7 -3
  97. package/es/state/sort/index.js.map +1 -1
  98. package/es/state/state.d.ts +1 -1
  99. package/es/state/state.js +10 -6
  100. package/es/state/state.js.map +1 -1
  101. package/es/tools/util.d.ts +1 -0
  102. package/es/tools/util.js +9 -0
  103. package/es/tools/util.js.map +1 -1
  104. package/es/ts-types/base-table.d.ts +2 -0
  105. package/es/ts-types/base-table.js.map +1 -1
  106. package/es/ts-types/list-table/define/basic-define.d.ts +1 -0
  107. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  108. package/es/ts-types/table-engine.d.ts +1 -1
  109. package/es/ts-types/table-engine.js.map +1 -1
  110. package/es/vrender.js.map +1 -1
  111. package/package.json +4 -4
package/dist/vtable.js CHANGED
@@ -44247,6 +44247,14 @@
44247
44247
  }
44248
44248
  return result;
44249
44249
  }
44250
+ function isDivSelected(div) {
44251
+ const selection = window.getSelection();
44252
+ if (selection.rangeCount) {
44253
+ const range = selection.getRangeAt(0);
44254
+ return range.endOffset > range.startOffset && div.contains(range.commonAncestorContainer);
44255
+ }
44256
+ return false;
44257
+ }
44250
44258
 
44251
44259
  const isNode = typeof window === 'undefined' || typeof window.window === 'undefined';
44252
44260
  let arrayFind;
@@ -51139,6 +51147,9 @@
51139
51147
  }
51140
51148
  function onBeforeAttributeUpdate(val, attribute) {
51141
51149
  const graphic = this;
51150
+ if (graphic.skipMergeUpdate) {
51151
+ return;
51152
+ }
51142
51153
  const cellGroup = getTargetCell(graphic);
51143
51154
  const table = cellGroup.stage.table;
51144
51155
  graphic.skipAttributeUpdate = true;
@@ -51153,7 +51164,7 @@
51153
51164
  if (col === cellGroup.col && row === cellGroup.row) {
51154
51165
  continue;
51155
51166
  }
51156
- const cell = table.scenegraph.getCell(col, row);
51167
+ const cell = table.scenegraph.highPerformanceGetCell(col, row);
51157
51168
  if (cell.role === 'cell') {
51158
51169
  const target = cell.getChildByName(graphic.name, true);
51159
51170
  if (!target || target.skipAttributeUpdate) {
@@ -54747,11 +54758,14 @@
54747
54758
  function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
54748
54759
  for (let col = range.start.col; col <= range.end.col; col++) {
54749
54760
  for (let row = range.start.row; row <= range.end.row; row++) {
54750
- const cellGroup = table.scenegraph.getCell(col, row, true);
54751
- if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {
54761
+ const cellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
54762
+ if (cellGroup.role !== 'cell') {
54763
+ continue;
54764
+ }
54765
+ if (range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {
54752
54766
  updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline);
54753
54767
  }
54754
- if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {
54768
+ if (range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {
54755
54769
  updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph);
54756
54770
  }
54757
54771
  cellGroup.contentWidth = cellWidth;
@@ -54768,26 +54782,34 @@
54768
54782
  const dy = -table.getRowsHeight(range.start.row, row - 1);
54769
54783
  cellGroup.forEachChildren((child) => {
54770
54784
  if (typeof child._dx === 'number') {
54785
+ child.skipMergeUpdate = true;
54771
54786
  child.setAttributes({
54772
54787
  dx: (child._dx ?? 0) + dx
54773
54788
  });
54789
+ child.skipMergeUpdate = false;
54774
54790
  }
54775
54791
  else {
54792
+ child.skipMergeUpdate = true;
54776
54793
  child._dx = child.attribute.dx ?? 0;
54777
54794
  child.setAttributes({
54778
54795
  dx: (child.attribute.dx ?? 0) + dx
54779
54796
  });
54797
+ child.skipMergeUpdate = false;
54780
54798
  }
54781
54799
  if (typeof child._dy === 'number') {
54800
+ child.skipMergeUpdate = true;
54782
54801
  child.setAttributes({
54783
54802
  dy: (child._dy ?? 0) + dy
54784
54803
  });
54804
+ child.skipMergeUpdate = false;
54785
54805
  }
54786
54806
  else {
54787
54807
  child._dy = child.attribute.dy ?? 0;
54808
+ child.skipMergeUpdate = true;
54788
54809
  child.setAttributes({
54789
54810
  dy: (child.attribute.dy ?? 0) + dy
54790
54811
  });
54812
+ child.skipMergeUpdate = false;
54791
54813
  }
54792
54814
  });
54793
54815
  const lineWidth = cellGroup.attribute.strokeArrayWidth ?? cellGroup.attribute.lineWidth;
@@ -54807,11 +54829,13 @@
54807
54829
  }
54808
54830
  const widthChange = rangeWidth !== cellGroup.attribute.width;
54809
54831
  const heightChange = rangeHeight !== cellGroup.attribute.height;
54832
+ cellGroup.skipMergeUpdate = true;
54810
54833
  cellGroup.setAttributes({
54811
54834
  width: rangeWidth,
54812
54835
  height: rangeHeight,
54813
54836
  strokeArrayWidth: newLineWidth
54814
54837
  });
54838
+ cellGroup.skipMergeUpdate = false;
54815
54839
  cellGroup.mergeStartCol = range.start.col;
54816
54840
  cellGroup.mergeStartRow = range.start.row;
54817
54841
  cellGroup.mergeEndCol = range.end.col;
@@ -59196,21 +59220,9 @@
59196
59220
  return;
59197
59221
  }
59198
59222
  const bottomRight = table?.theme.cellBorderClipDirection === 'bottom-right';
59199
- let deltaWidth = 0;
59200
- let deltaHeight = 0;
59201
59223
  if (bottomRight) {
59202
59224
  x = Math.floor(x) - 0.5;
59203
59225
  y = Math.floor(y) - 0.5;
59204
- if (group.role === 'cell') {
59205
- const col = group.col;
59206
- const row = group.row;
59207
- if (table && col === table.colCount - 1) {
59208
- deltaWidth = 1;
59209
- }
59210
- if (table && row === table.rowCount - 1) {
59211
- deltaHeight = 1;
59212
- }
59213
- }
59214
59226
  }
59215
59227
  else {
59216
59228
  x = Math.floor(x) + 0.5;
@@ -59220,7 +59232,7 @@
59220
59232
  width = Math.round(width);
59221
59233
  height = Math.round(height);
59222
59234
  }
59223
- const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
59235
+ const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height), bottomRight);
59224
59236
  widthForStroke = widthFroDraw;
59225
59237
  heightForStroke = heightFroDraw;
59226
59238
  }
@@ -59268,6 +59280,8 @@
59268
59280
  const isPart = Array.isArray(part);
59269
59281
  const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;
59270
59282
  context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);
59283
+ const oldLineCap = context.lineCap;
59284
+ context.lineCap = 'square';
59271
59285
  const { lineDash = groupAttribute.lineDash } = group.attribute;
59272
59286
  let isDash = false;
59273
59287
  if (lineDash.length && lineDash.some((dash) => Array.isArray(dash))) {
@@ -59275,15 +59289,21 @@
59275
59289
  }
59276
59290
  context.beginPath();
59277
59291
  context.moveTo(x, y);
59278
- if ((isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0])) {
59292
+ const strokeTop = (isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0]);
59293
+ const strokeRight = (isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1]);
59294
+ const strokeBottom = (isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2]);
59295
+ const strokeLeft = (isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3]);
59296
+ if (strokeTop) {
59297
+ const deltaLeft = strokeLeft ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
59298
+ const deltaRight = strokeRight ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
59279
59299
  if (isPart && Array.isArray(part[0])) {
59280
- context.moveTo(x + width * part[0][0], y);
59281
- context.lineTo(x + width * (part[0][1] - part[0][0]), y);
59282
- context.moveTo(x + width, y);
59300
+ context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[0][0], y);
59301
+ context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[0][1] - part[0][0]), y);
59302
+ context.moveTo(x + width + deltaRight, y);
59283
59303
  }
59284
59304
  else {
59285
- context.moveTo(x, y);
59286
- context.lineTo(x + width, y);
59305
+ context.moveTo(x - deltaLeft, y);
59306
+ context.lineTo(x + width + deltaRight, y);
59287
59307
  }
59288
59308
  if (isSplitDraw || isDash) {
59289
59309
  if (strokeArrayColor && strokeArrayColor[0]) {
@@ -59307,15 +59327,17 @@
59307
59327
  else {
59308
59328
  context.moveTo(x + width, y);
59309
59329
  }
59310
- if ((isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1])) {
59330
+ if (strokeRight) {
59331
+ const deltaTop = strokeTop ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
59332
+ const deltaBottom = strokeBottom ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
59311
59333
  if (isPart && Array.isArray(part[1])) {
59312
- context.moveTo(x + width, y + height * part[1][0]);
59313
- context.lineTo(x + width, y + height * (part[1][1] - part[1][0]));
59314
- context.moveTo(x + width, y + height);
59334
+ context.moveTo(x + width, y - deltaTop + height * part[1][0]);
59335
+ context.lineTo(x + width, y - deltaTop + (height + deltaTop + deltaBottom) * (part[1][1] - part[1][0]));
59336
+ context.moveTo(x + width, y + height + deltaBottom);
59315
59337
  }
59316
59338
  else {
59317
- context.moveTo(x + width, y);
59318
- context.lineTo(x + width, y + height);
59339
+ context.moveTo(x + width, y - deltaTop);
59340
+ context.lineTo(x + width, y + height + deltaBottom);
59319
59341
  }
59320
59342
  if (isSplitDraw || isDash) {
59321
59343
  if (strokeArrayColor && strokeArrayColor[1]) {
@@ -59339,15 +59361,17 @@
59339
59361
  else {
59340
59362
  context.moveTo(x + width, y + height);
59341
59363
  }
59342
- if ((isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2])) {
59364
+ if (strokeBottom) {
59365
+ const deltaLeft = strokeLeft ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
59366
+ const deltaRight = strokeRight ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
59343
59367
  if (isPart && Array.isArray(part[2])) {
59344
- context.moveTo(x + width * part[2][0], y + height);
59345
- context.lineTo(x + width * (part[2][1] - part[2][0]), y + height);
59346
- context.moveTo(x, y + height);
59368
+ context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[2][0], y + height);
59369
+ context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[2][1] - part[2][0]), y + height);
59370
+ context.moveTo(x - deltaLeft, y + height);
59347
59371
  }
59348
59372
  else {
59349
- context.moveTo(x, y + height);
59350
- context.lineTo(x + width, y + height);
59373
+ context.moveTo(x - deltaLeft, y + height);
59374
+ context.lineTo(x + width + deltaRight, y + height);
59351
59375
  }
59352
59376
  if (isSplitDraw || isDash) {
59353
59377
  if (strokeArrayColor && strokeArrayColor[2]) {
@@ -59371,15 +59395,17 @@
59371
59395
  else {
59372
59396
  context.moveTo(x, y + height);
59373
59397
  }
59374
- if ((isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3])) {
59398
+ if (strokeLeft) {
59399
+ const deltaTop = strokeTop ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
59400
+ const deltaBottom = strokeBottom ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
59375
59401
  if (isPart && Array.isArray(part[3])) {
59376
- context.moveTo(x, y + height * part[3][0]);
59377
- context.lineTo(x, y + height * (part[3][1] - part[3][0]));
59378
- context.moveTo(x, y);
59402
+ context.moveTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * part[3][0]);
59403
+ context.lineTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * (part[3][1] - part[3][0]));
59404
+ context.moveTo(x, y - deltaTop);
59379
59405
  }
59380
59406
  else {
59381
- context.moveTo(x, y);
59382
- context.lineTo(x, y + height);
59407
+ context.moveTo(x, y - deltaTop);
59408
+ context.lineTo(x, y + height + deltaBottom);
59383
59409
  }
59384
59410
  if (isSplitDraw || isDash) {
59385
59411
  if (strokeArrayColor && strokeArrayColor[3]) {
@@ -59410,6 +59436,7 @@
59410
59436
  context.stroke();
59411
59437
  }
59412
59438
  context.lineDashOffset = 0;
59439
+ context.lineCap = oldLineCap;
59413
59440
  context.setLineDash([]);
59414
59441
  }
59415
59442
  let DashGroupBeforeRenderContribution = class DashGroupBeforeRenderContribution {
@@ -59461,27 +59488,17 @@
59461
59488
  let heightForStroke;
59462
59489
  if (lineWidth & 1) {
59463
59490
  const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';
59464
- let deltaWidth = 0;
59465
- let deltaHeight = 0;
59491
+ const deltaWidth = 0;
59492
+ const deltaHeight = 0;
59466
59493
  if (bottomRight) {
59467
59494
  x = Math.floor(x) - 0.5;
59468
59495
  y = Math.floor(y) - 0.5;
59469
- if (group.role === 'cell') {
59470
- const col = group.col;
59471
- const row = group.row;
59472
- if (table && col === table.colCount - 1) {
59473
- deltaWidth = 1;
59474
- }
59475
- if (table && row === table.rowCount - 1) {
59476
- deltaHeight = 1;
59477
- }
59478
- }
59479
59496
  }
59480
59497
  else {
59481
59498
  x = Math.floor(x) + 0.5;
59482
59499
  y = Math.floor(y) + 0.5;
59483
59500
  }
59484
- const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
59501
+ const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight), bottomRight);
59485
59502
  widthForStroke = widthFroDraw;
59486
59503
  heightForStroke = heightFroDraw;
59487
59504
  }
@@ -59563,29 +59580,19 @@
59563
59580
  width = Math.round(width);
59564
59581
  height = Math.round(height);
59565
59582
  }
59566
- const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
59567
59583
  context.beginPath();
59568
59584
  const bottomRight = table?.theme.cellBorderClipDirection === 'bottom-right';
59569
- let deltaWidth = 0;
59570
- let deltaHeight = 0;
59585
+ const deltaWidth = 0;
59586
+ const deltaHeight = 0;
59571
59587
  if (bottomRight) {
59572
59588
  x = Math.floor(x) - 0.5;
59573
59589
  y = Math.floor(y) - 0.5;
59574
- if (group.role === 'cell') {
59575
- const col = group.col;
59576
- const row = group.row;
59577
- if (table && col === table.colCount - 1) {
59578
- deltaWidth = 1;
59579
- }
59580
- if (table && row === table.rowCount - 1) {
59581
- deltaHeight = 1;
59582
- }
59583
- }
59584
59590
  }
59585
59591
  else {
59586
59592
  x = Math.floor(x) + 0.5;
59587
59593
  y = Math.floor(y) + 0.5;
59588
59594
  }
59595
+ const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height), bottomRight);
59589
59596
  if (cornerRadius) {
59590
59597
  createRectPath(context, x, y, widthFroDraw + deltaWidth, heightFroDraw + deltaHeight, cornerRadius);
59591
59598
  }
@@ -59743,7 +59750,7 @@
59743
59750
  ClipBodyGroupAfterRenderContribution = __decorate([
59744
59751
  injectable()
59745
59752
  ], ClipBodyGroupAfterRenderContribution);
59746
- function getCellSizeForDraw(group, width, height) {
59753
+ function getCellSizeForDraw(group, width, height, bottomRight) {
59747
59754
  const table = group.stage.table;
59748
59755
  if (group.role === 'cell') {
59749
59756
  let col = group.col;
@@ -59753,24 +59760,24 @@
59753
59760
  col = mergeInfo.end.col;
59754
59761
  row = mergeInfo.end.row;
59755
59762
  }
59756
- if (table && col === table.colCount - 1) {
59763
+ if (table && col === table.colCount - 1 && !bottomRight) {
59757
59764
  width -= 1;
59758
59765
  }
59759
- else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {
59766
+ else if (table && col === table.frozenColCount - 1 && table.scrollLeft && !bottomRight) {
59760
59767
  width -= 1;
59761
59768
  }
59762
- if (table && row === table.rowCount - 1) {
59769
+ if (table && row === table.rowCount - 1 && !bottomRight) {
59763
59770
  height -= 1;
59764
59771
  }
59765
- else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {
59772
+ else if (table && row === table.frozenRowCount - 1 && table.scrollTop && !bottomRight) {
59766
59773
  height -= 1;
59767
59774
  }
59768
59775
  }
59769
59776
  else if (group.role === 'corner-frozen') {
59770
- if (table && table.scrollLeft) {
59777
+ if (table && table.scrollLeft && !bottomRight) {
59771
59778
  width -= 1;
59772
59779
  }
59773
- if (table && table.scrollTop) {
59780
+ if (table && table.scrollTop && !bottomRight) {
59774
59781
  height -= 1;
59775
59782
  }
59776
59783
  }
@@ -61874,6 +61881,7 @@
61874
61881
  this.totalActualBodyColCount = totalActualBodyColCount;
61875
61882
  this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1;
61876
61883
  this.colStart = this.bodyLeftCol;
61884
+ this.colEnd = this.totalCol;
61877
61885
  const defaultColWidth = this.table.defaultColWidth;
61878
61886
  this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;
61879
61887
  const totalBodyWidth = defaultColWidth * totalActualBodyColCount;
@@ -61892,6 +61900,7 @@
61892
61900
  this.totalActualBodyRowCount = totalActualBodyRowCount;
61893
61901
  this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1;
61894
61902
  this.rowStart = this.bodyTopRow;
61903
+ this.rowEnd = this.totalRow;
61895
61904
  const defaultRowHeight = this.table.defaultRowHeight;
61896
61905
  this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;
61897
61906
  const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;
@@ -61966,6 +61975,7 @@
61966
61975
  createRowCellGroup(onceCount) {
61967
61976
  const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
61968
61977
  computeRowsHeight(this.table, this.currentRow + 1, endRow, false);
61978
+ this.rowEnd = endRow;
61969
61979
  if (this.table.frozenColCount) {
61970
61980
  let maxHeight = 0;
61971
61981
  for (let col = 0; col < this.table.frozenColCount; col++) {
@@ -61998,7 +62008,6 @@
61998
62008
  }
61999
62009
  this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);
62000
62010
  this.currentRow = endRow;
62001
- this.rowEnd = endRow;
62002
62011
  this.rowUpdatePos = this.rowEnd;
62003
62012
  this.table.scenegraph.updateContainer();
62004
62013
  this.table.scenegraph.updateBorderSizeAndPosition();
@@ -62006,6 +62015,7 @@
62006
62015
  createColGroup(onceCount) {
62007
62016
  const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
62008
62017
  computeColsWidth(this.table, this.currentCol + 1, endCol);
62018
+ this.colEnd = endCol;
62009
62019
  for (let row = 0; row < this.table.rowCount; row++) {
62010
62020
  const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
62011
62021
  if (cellGroup.role === 'cell' && isNumber$2(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {
@@ -62043,7 +62053,6 @@
62043
62053
  const yOrigin = lastColumnGroup.attribute.y;
62044
62054
  createColGroup(this.table.scenegraph.bodyGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.rowStart, this.rowEnd, 'body', this.table);
62045
62055
  this.currentCol = endCol;
62046
- this.colEnd = endCol;
62047
62056
  this.colUpdatePos = this.colEnd;
62048
62057
  this.table.scenegraph.updateContainer();
62049
62058
  this.table.scenegraph.updateBorderSizeAndPosition();
@@ -66137,7 +66146,9 @@
66137
66146
  table.internalProps.useOneRowHeightFillAll = false;
66138
66147
  table.internalProps.layoutMap.clearCellRangeMap();
66139
66148
  table.scenegraph.sortCell();
66149
+ const isHasSelected = !!table.stateManager.select.ranges?.length;
66140
66150
  table.stateManager.updateSelectPos(-1, -1);
66151
+ table.stateManager.endSelectCells(true, isHasSelected);
66141
66152
  }
66142
66153
  function executeSort(newState, table, headerDefine) {
66143
66154
  const hd = table.internalProps.layoutMap.headerObjects.find((col) => col && col.field === newState.field);
@@ -66604,7 +66615,9 @@
66604
66615
  ? state.columnMove.y
66605
66616
  : 0;
66606
66617
  state.table.scenegraph.component.showMoveCol(col, row, delta);
66618
+ const isHasSelected = !!state.select.ranges?.length;
66607
66619
  state.table.stateManager.updateSelectPos(-1, -1);
66620
+ state.table.stateManager.endSelectCells(true, isHasSelected);
66608
66621
  state.table.scenegraph.updateNextFrame();
66609
66622
  }
66610
66623
  function updateMoveCol(col, row, x, y, state) {
@@ -67789,7 +67802,7 @@
67789
67802
  isSelecting() {
67790
67803
  return this.select.selecting;
67791
67804
  }
67792
- endSelectCells(fireListener = true) {
67805
+ endSelectCells(fireListener = true, fireClear = true) {
67793
67806
  if (this.select.selecting) {
67794
67807
  this.select.selecting = false;
67795
67808
  if (this.select.ranges.length === 0) {
@@ -67825,7 +67838,7 @@
67825
67838
  row: lastRow
67826
67839
  });
67827
67840
  }
67828
- else if (fireListener) {
67841
+ else if (fireClear) {
67829
67842
  if (this.select.ranges.length === 0) {
67830
67843
  this.table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CLEAR, {});
67831
67844
  }
@@ -67846,7 +67859,9 @@
67846
67859
  this.columnResize.x = x;
67847
67860
  this.columnResize.isRightFrozen = isRightFrozen;
67848
67861
  this.table.scenegraph.component.showResizeCol(col, y, isRightFrozen);
67862
+ const isHasSelected = !!this.select.ranges?.length;
67849
67863
  this.updateSelectPos(-1, -1);
67864
+ this.endSelectCells(true, isHasSelected);
67850
67865
  this.table.scenegraph.updateNextFrame();
67851
67866
  }
67852
67867
  updateResizeCol(xInTable, yInTable) {
@@ -67866,7 +67881,9 @@
67866
67881
  this.rowResize.y = y;
67867
67882
  this.rowResize.isBottomFrozen = isBottomFrozen;
67868
67883
  this.table.scenegraph.component.showResizeRow(row, x, isBottomFrozen);
67884
+ const isHasSelected = !!this.select.ranges?.length;
67869
67885
  this.updateSelectPos(-1, -1);
67886
+ this.endSelectCells(true, isHasSelected);
67870
67887
  this.table.scenegraph.updateNextFrame();
67871
67888
  }
67872
67889
  updateResizeRow(xInTable, yInTable) {
@@ -68780,11 +68797,16 @@
68780
68797
  }
68781
68798
  }
68782
68799
  }
68783
- table.editorManager?.completeEdit(e.nativeEvent);
68800
+ const isCompleteEdit = table.editorManager?.completeEdit(e.nativeEvent);
68801
+ if (isCompleteEdit === false) {
68802
+ return;
68803
+ }
68784
68804
  stateManager.updateInteractionState(InteractionState.default);
68785
68805
  eventManager.dealTableHover();
68786
68806
  if (table.options.select?.outsideClickDeselect) {
68807
+ const isHasSelected = !!stateManager.select.ranges?.length;
68787
68808
  eventManager.dealTableSelect();
68809
+ stateManager.endSelectCells(true, isHasSelected);
68788
68810
  }
68789
68811
  });
68790
68812
  table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
@@ -68810,7 +68832,10 @@
68810
68832
  if (eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
68811
68833
  stateManager.hideMenu();
68812
68834
  }
68813
- table.editorManager?.completeEdit(e.nativeEvent);
68835
+ const isCompleteEdit = table.editorManager?.completeEdit(e.nativeEvent);
68836
+ if (isCompleteEdit === false) {
68837
+ return;
68838
+ }
68814
68839
  const hitIcon = eventArgsSet?.eventArgs?.target?.role?.startsWith('icon')
68815
68840
  ? eventArgsSet.eventArgs.target
68816
68841
  : e.target.role?.startsWith('icon')
@@ -68993,8 +69018,9 @@
68993
69018
  const eventArgsSet = getCellEventArgsSet(e);
68994
69019
  if (eventManager.touchSetTimeout) {
68995
69020
  clearTimeout(eventManager.touchSetTimeout);
69021
+ const isHasSelected = !!stateManager.select.ranges?.length;
68996
69022
  eventManager.dealTableSelect(eventArgsSet);
68997
- stateManager.endSelectCells();
69023
+ stateManager.endSelectCells(true, isHasSelected);
68998
69024
  eventManager.touchSetTimeout = undefined;
68999
69025
  }
69000
69026
  }
@@ -69034,11 +69060,15 @@
69034
69060
  if (eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
69035
69061
  stateManager.hideMenu();
69036
69062
  }
69037
- table.editorManager?.completeEdit(e.nativeEvent);
69063
+ const isCompleteEdit = table.editorManager?.completeEdit(e.nativeEvent);
69064
+ if (isCompleteEdit === false) {
69065
+ return;
69066
+ }
69038
69067
  const hitIcon = e.target.role?.startsWith('icon') ? e.target : undefined;
69039
69068
  eventManager.downIcon = hitIcon;
69040
69069
  if (!hitIcon &&
69041
69070
  !eventManager.checkCellFillhandle(eventArgsSet) &&
69071
+ !stateManager.columnResize.resizing &&
69042
69072
  eventManager.checkColumnResize(eventArgsSet, true)) {
69043
69073
  table.scenegraph.updateChartState(null);
69044
69074
  stateManager.updateInteractionState(InteractionState.grabing);
@@ -69072,10 +69102,11 @@
69072
69102
  !target.isDescendantsOf(table.scenegraph.tableGroup)) {
69073
69103
  stateManager.updateInteractionState(InteractionState.default);
69074
69104
  eventManager.dealTableHover();
69075
- stateManager.endSelectCells();
69105
+ const isHasSelected = !!stateManager.select.ranges?.length;
69076
69106
  if (table.options.select?.blankAreaClickDeselect ?? true) {
69077
69107
  eventManager.dealTableSelect();
69078
69108
  }
69109
+ stateManager.endSelectCells(true, isHasSelected);
69079
69110
  stateManager.updateCursor();
69080
69111
  table.scenegraph.updateChartState(null);
69081
69112
  }
@@ -69666,21 +69697,21 @@
69666
69697
  table.editorManager.cancelEdit();
69667
69698
  }
69668
69699
  else if (e.key === 'Enter') {
69669
- if (table.editorManager?.editingEditor) {
69700
+ if (table.editorManager.editingEditor) {
69701
+ handleKeydownListener(e);
69670
69702
  table.editorManager.completeEdit();
69671
69703
  table.getElement().focus();
69704
+ return;
69672
69705
  }
69673
- else {
69674
- if ((table.options.keyboardOptions?.editCellOnEnter ?? true) &&
69675
- (table.stateManager.select.ranges?.length ?? 0) === 1) {
69676
- const startCol = table.stateManager.select.ranges[0].start.col;
69677
- const startRow = table.stateManager.select.ranges[0].start.row;
69678
- const endCol = table.stateManager.select.ranges[0].end.col;
69679
- const endRow = table.stateManager.select.ranges[0].end.row;
69680
- if (startCol === endCol && startRow === endRow) {
69681
- if (table.getEditor(startCol, startRow)) {
69682
- table.editorManager.startEditCell(startCol, startRow);
69683
- }
69706
+ if ((table.options.keyboardOptions?.editCellOnEnter ?? true) &&
69707
+ (table.stateManager.select.ranges?.length ?? 0) === 1) {
69708
+ const startCol = table.stateManager.select.ranges[0].start.col;
69709
+ const startRow = table.stateManager.select.ranges[0].start.row;
69710
+ const endCol = table.stateManager.select.ranges[0].end.col;
69711
+ const endRow = table.stateManager.select.ranges[0].end.row;
69712
+ if (startCol === endCol && startRow === endRow) {
69713
+ if (table.getEditor(startCol, startRow)) {
69714
+ table.editorManager.startEditCell(startCol, startRow);
69684
69715
  }
69685
69716
  }
69686
69717
  }
@@ -69714,6 +69745,9 @@
69714
69745
  }
69715
69746
  }
69716
69747
  }
69748
+ handleKeydownListener(e);
69749
+ });
69750
+ function handleKeydownListener(e) {
69717
69751
  if (table.hasListeners(TABLE_EVENT_TYPE.KEYDOWN)) {
69718
69752
  const cellsEvent = {
69719
69753
  keyCode: e.keyCode ?? e.which,
@@ -69723,7 +69757,7 @@
69723
69757
  };
69724
69758
  table.fireListeners(TABLE_EVENT_TYPE.KEYDOWN, cellsEvent);
69725
69759
  }
69726
- });
69760
+ }
69727
69761
  handler.on(table.getElement(), 'copy', (e) => {
69728
69762
  if (table.keyboardOptions?.copySelected) {
69729
69763
  const data = table.getCopyValue();
@@ -69850,6 +69884,8 @@
69850
69884
  table.resize();
69851
69885
  }
69852
69886
  });
69887
+ const regex = /<tr[^>]*>([\s\S]*?)<\/tr>/g;
69888
+ const cellRegex = /<td[^>]*>([\s\S]*?)<\/td>/g;
69853
69889
  function pasteHtmlToTable(item) {
69854
69890
  const ranges = table.stateManager.select.ranges;
69855
69891
  const selectRangeLength = ranges.length;
@@ -69863,11 +69899,9 @@
69863
69899
  item.getType('text/html').then((blob) => {
69864
69900
  blob.text().then((pastedData) => {
69865
69901
  if (pastedData && /(<table)|(<TABLE)/g.test(pastedData)) {
69866
- const regex = /<tr[^>]*>(.*?)<\/tr>/gs;
69867
69902
  const matches = Array.from(pastedData.matchAll(regex));
69868
69903
  for (const match of matches) {
69869
69904
  const rowContent = match[1];
69870
- const cellRegex = /<td[^>]*>(.*?)<\/td>/gs;
69871
69905
  const cellMatches = Array.from(rowContent.matchAll(cellRegex));
69872
69906
  const rowValues = cellMatches.map(cellMatch => {
69873
69907
  return (cellMatch[1]
@@ -70454,7 +70488,9 @@
70454
70488
  drillClick(this.table);
70455
70489
  }
70456
70490
  else if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
70457
- this.table.stateManager.updateSelectPos(-1, -1);
70491
+ const isHasSelected = !!stateManager.select.ranges?.length;
70492
+ stateManager.updateSelectPos(-1, -1);
70493
+ stateManager.endSelectCells(true, isHasSelected);
70458
70494
  this.table.toggleHierarchyState(col, row);
70459
70495
  }
70460
70496
  });
@@ -72150,6 +72186,12 @@
72150
72186
  messageElement.addEventListener('wheel', e => {
72151
72187
  e.stopPropagation();
72152
72188
  });
72189
+ messageElement.addEventListener('copy', e => {
72190
+ const isSelected = isDivSelected(messageElement);
72191
+ if (isSelected) {
72192
+ e.stopPropagation();
72193
+ }
72194
+ });
72153
72195
  }
72154
72196
  bindToCell(table, col, row, tooltipInstanceInfo, confine) {
72155
72197
  this._disappearDelay = tooltipInstanceInfo?.disappearDelay;
@@ -74617,13 +74659,18 @@
74617
74659
  }
74618
74660
  else {
74619
74661
  keys.push(indicatorObj.indicatorKey);
74620
- if (indicatorObj.chartSpec) {
74662
+ if (indicatorObj.chartSpec ||
74663
+ indicatorObj.sparklineSpec) {
74621
74664
  if (table.internalProps.dataConfig?.aggregationRules) {
74622
- table.internalProps.dataConfig?.aggregationRules.push({
74623
- field: indicatorObj.indicatorKey,
74624
- indicatorKey: indicatorObj.indicatorKey,
74625
- aggregationType: AggregationType.NONE
74626
- });
74665
+ if (!table.internalProps.dataConfig.aggregationRules.find(aggregation => {
74666
+ return aggregation.indicatorKey === indicatorObj.indicatorKey;
74667
+ })) {
74668
+ table.internalProps.dataConfig.aggregationRules.push({
74669
+ field: indicatorObj.indicatorKey,
74670
+ indicatorKey: indicatorObj.indicatorKey,
74671
+ aggregationType: AggregationType.NONE
74672
+ });
74673
+ }
74627
74674
  }
74628
74675
  else if (table.internalProps.dataConfig) {
74629
74676
  table.internalProps.dataConfig.aggregationRules = [
@@ -74703,6 +74750,246 @@
74703
74750
  return customTree;
74704
74751
  }
74705
74752
 
74753
+ function getRowAt(absoluteY, _this) {
74754
+ const frozen = _getTargetFrozenRowAt(_this, absoluteY);
74755
+ if (frozen) {
74756
+ return frozen;
74757
+ }
74758
+ let row = getTargetRowAt(absoluteY, _this);
74759
+ if (!row) {
74760
+ row = {
74761
+ top: -1,
74762
+ row: -1,
74763
+ bottom: -1,
74764
+ height: -1
74765
+ };
74766
+ }
74767
+ return row;
74768
+ }
74769
+ function getColAt(absoluteX, _this) {
74770
+ const frozen = _getTargetFrozenColAt(_this, absoluteX);
74771
+ if (frozen) {
74772
+ return frozen;
74773
+ }
74774
+ let col = getTargetColAt(absoluteX, _this);
74775
+ if (!col) {
74776
+ col = {
74777
+ left: -1,
74778
+ col: -1,
74779
+ right: -1,
74780
+ width: 1
74781
+ };
74782
+ }
74783
+ return col;
74784
+ }
74785
+ function getCellAt(absoluteX, absoluteY, _this) {
74786
+ const rowInfo = getRowAt(absoluteY, _this);
74787
+ const { row, top, bottom, height } = rowInfo;
74788
+ const colInfo = getColAt(absoluteX, _this);
74789
+ const { col, left, right, width } = colInfo;
74790
+ const rect = {
74791
+ left,
74792
+ right,
74793
+ top,
74794
+ bottom,
74795
+ width,
74796
+ height
74797
+ };
74798
+ return {
74799
+ row,
74800
+ col,
74801
+ rect
74802
+ };
74803
+ }
74804
+ function getTargetColAt(absoluteX, _this) {
74805
+ if (absoluteX === 0) {
74806
+ return { left: 0, col: 0, right: 0, width: 0 };
74807
+ }
74808
+ const findBefore = (startCol, startRight) => {
74809
+ let right = startRight;
74810
+ for (let col = startCol; col >= 0; col--) {
74811
+ const width = _this.getColWidth(col);
74812
+ const left = right - width;
74813
+ if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
74814
+ return {
74815
+ left,
74816
+ col,
74817
+ right,
74818
+ width
74819
+ };
74820
+ }
74821
+ right = left;
74822
+ }
74823
+ return null;
74824
+ };
74825
+ const findAfter = (startCol, startRight) => {
74826
+ let left = startRight - _this.getColWidth(startCol);
74827
+ const { colCount } = _this.internalProps;
74828
+ for (let col = startCol; col < colCount; col++) {
74829
+ const width = _this.getColWidth(col);
74830
+ const right = left + width;
74831
+ if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
74832
+ return {
74833
+ left,
74834
+ col,
74835
+ right,
74836
+ width
74837
+ };
74838
+ }
74839
+ left = right;
74840
+ }
74841
+ return null;
74842
+ };
74843
+ const candCol = computeTargetColByX(absoluteX, _this);
74844
+ const right = _this.getColsWidth(0, candCol);
74845
+ if (absoluteX >= right) {
74846
+ return findAfter(candCol, right);
74847
+ }
74848
+ return findBefore(candCol, right);
74849
+ }
74850
+ function getTargetRowAt(absoluteY, _this) {
74851
+ if (absoluteY === 0) {
74852
+ return { top: 0, row: 0, bottom: 0, height: 0 };
74853
+ }
74854
+ const findBefore = (startRow, startBottom) => {
74855
+ let bottom = startBottom;
74856
+ for (let row = startRow; row >= 0; row--) {
74857
+ const height = _this.getRowHeight(row);
74858
+ const top = bottom - height;
74859
+ if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
74860
+ return {
74861
+ top,
74862
+ row,
74863
+ bottom,
74864
+ height
74865
+ };
74866
+ }
74867
+ bottom = top;
74868
+ }
74869
+ return null;
74870
+ };
74871
+ const findAfter = (startRow, startBottom) => {
74872
+ let top = startBottom - _this.getRowHeight(startRow);
74873
+ const { rowCount } = _this.internalProps;
74874
+ for (let row = startRow; row < rowCount; row++) {
74875
+ const height = _this.getRowHeight(row);
74876
+ const bottom = top + height;
74877
+ if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
74878
+ return {
74879
+ top,
74880
+ row,
74881
+ bottom,
74882
+ height
74883
+ };
74884
+ }
74885
+ top = bottom;
74886
+ }
74887
+ return null;
74888
+ };
74889
+ const candRow = computeTargetRowByY(absoluteY, _this);
74890
+ const bottom = _this.getRowsHeight(0, candRow);
74891
+ if (absoluteY >= bottom) {
74892
+ return findAfter(candRow, bottom);
74893
+ }
74894
+ return findBefore(candRow, bottom);
74895
+ }
74896
+ function getTargetColAtConsiderRightFrozen(absoluteX, isConsider, _this) {
74897
+ if (absoluteX === 0) {
74898
+ return { left: 0, col: 0, right: 0, width: 0 };
74899
+ }
74900
+ if (isConsider &&
74901
+ absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() &&
74902
+ absoluteX < _this.tableNoFrameWidth) {
74903
+ for (let i = 0; i < _this.rightFrozenColCount; i++) {
74904
+ if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) {
74905
+ return {
74906
+ col: _this.colCount - i - 1,
74907
+ left: undefined,
74908
+ right: undefined,
74909
+ width: undefined
74910
+ };
74911
+ }
74912
+ }
74913
+ }
74914
+ return getTargetColAt(absoluteX, _this);
74915
+ }
74916
+ function getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider, _this) {
74917
+ if (absoluteY === 0) {
74918
+ return { top: 0, row: 0, bottom: 0, height: 0 };
74919
+ }
74920
+ if (isConsider &&
74921
+ absoluteY > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() &&
74922
+ absoluteY < _this.tableNoFrameHeight) {
74923
+ for (let i = 0; i < _this.rightFrozenColCount; i++) {
74924
+ if (absoluteY > _this.tableNoFrameHeight - _this.getRowsHeight(_this.rowCount - i - 1, _this.rowCount - 1)) {
74925
+ return {
74926
+ row: _this.rowCount - i - 1,
74927
+ top: undefined,
74928
+ bottom: undefined,
74929
+ height: undefined
74930
+ };
74931
+ }
74932
+ }
74933
+ }
74934
+ return getTargetRowAt(absoluteY, _this);
74935
+ }
74936
+ function computeTargetRowByY(absoluteY, _this) {
74937
+ let defaultRowHeight = _this.internalProps.defaultRowHeight;
74938
+ if (_this._rowRangeHeightsMap.get(`$0$${_this.rowCount - 1}`)) {
74939
+ defaultRowHeight = _this._rowRangeHeightsMap.get(`$0$${_this.rowCount - 1}`) / _this.rowCount;
74940
+ }
74941
+ return Math.min(Math.ceil(absoluteY / defaultRowHeight), _this.rowCount - 1);
74942
+ }
74943
+ function computeTargetColByX(absoluteX, _this) {
74944
+ if (_this._colRangeWidthsMap.get(`$0$${_this.colCount - 1}`)) {
74945
+ let startCol = 0;
74946
+ let endCol = _this.colCount - 1;
74947
+ while (endCol - startCol > 1) {
74948
+ const midCol = Math.floor((startCol + endCol) / 2);
74949
+ if (absoluteX < _this._colRangeWidthsMap.get(`$0$${midCol}`)) {
74950
+ endCol = midCol;
74951
+ }
74952
+ else if (absoluteX > _this._colRangeWidthsMap.get(`$0$${midCol}`)) {
74953
+ startCol = midCol;
74954
+ }
74955
+ else {
74956
+ return midCol;
74957
+ }
74958
+ }
74959
+ return endCol;
74960
+ }
74961
+ return Math.min(Math.ceil(absoluteX / _this.internalProps.defaultColWidth), _this.colCount - 1);
74962
+ }
74963
+ function getCellAtRelativePosition(x, y, _this) {
74964
+ x -= _this.tableX;
74965
+ y -= _this.tableY;
74966
+ let bottomFrozen = false;
74967
+ if (y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight) {
74968
+ bottomFrozen = true;
74969
+ }
74970
+ let rightFrozen = false;
74971
+ if (x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth) {
74972
+ rightFrozen = true;
74973
+ }
74974
+ const colInfo = getTargetColAtConsiderRightFrozen(rightFrozen ? x : x + _this.scrollLeft, rightFrozen, _this);
74975
+ const rowInfo = getTargetRowAtConsiderBottomFrozen(bottomFrozen ? y : y + _this.scrollTop, bottomFrozen, _this);
74976
+ const { row, top, bottom, height } = rowInfo;
74977
+ const { col, left, right, width } = colInfo;
74978
+ const rect = {
74979
+ left,
74980
+ right,
74981
+ top,
74982
+ bottom,
74983
+ width,
74984
+ height
74985
+ };
74986
+ return {
74987
+ row,
74988
+ col,
74989
+ rect
74990
+ };
74991
+ }
74992
+
74706
74993
  const { toBoxArray } = style;
74707
74994
  const { isTouchEvent } = event;
74708
74995
  const rangeReg = /^\$(\d+)\$(\d+)$/;
@@ -74735,7 +75022,7 @@
74735
75022
  return TABLE_EVENT_TYPE;
74736
75023
  }
74737
75024
  options;
74738
- version = "1.4.2-alpha.2";
75025
+ version = "1.4.2-alpha.4";
74739
75026
  pagination;
74740
75027
  id = `VTable${Date.now()}`;
74741
75028
  headerStyleCache;
@@ -75720,55 +76007,16 @@
75720
76007
  return null;
75721
76008
  }
75722
76009
  getRowAt(absoluteY) {
75723
- const frozen = _getTargetFrozenRowAt(this, absoluteY);
75724
- if (frozen) {
75725
- return frozen;
75726
- }
75727
- let row = this.getTargetRowAt(absoluteY);
75728
- if (!row) {
75729
- row = {
75730
- top: -1,
75731
- row: -1,
75732
- bottom: -1,
75733
- height: -1
75734
- };
75735
- }
75736
- return row;
76010
+ return getRowAt(absoluteY, this);
75737
76011
  }
75738
76012
  getColAt(absoluteX) {
75739
- const frozen = _getTargetFrozenColAt(this, absoluteX);
75740
- if (frozen) {
75741
- return frozen;
75742
- }
75743
- let col = this.getTargetColAt(absoluteX);
75744
- if (!col) {
75745
- col = {
75746
- left: -1,
75747
- col: -1,
75748
- right: -1,
75749
- width: 1
75750
- };
75751
- }
75752
- return col;
76013
+ return getColAt(absoluteX, this);
75753
76014
  }
75754
76015
  getCellAt(absoluteX, absoluteY) {
75755
- const rowInfo = this.getRowAt(absoluteY);
75756
- const { row, top, bottom, height } = rowInfo;
75757
- const colInfo = this.getColAt(absoluteX);
75758
- const { col, left, right, width } = colInfo;
75759
- const rect = {
75760
- left,
75761
- right,
75762
- top,
75763
- bottom,
75764
- width,
75765
- height
75766
- };
75767
- return {
75768
- row,
75769
- col,
75770
- rect
75771
- };
76016
+ return getCellAt(absoluteX, absoluteY, this);
76017
+ }
76018
+ getCellAtRelativePosition(relativeX, relativeY) {
76019
+ return getCellAtRelativePosition(relativeX, relativeY, this);
75772
76020
  }
75773
76021
  _checkRowCol(col, row) {
75774
76022
  if (col >= 0 && col < this.colCount && row >= 0 && row < this.rowCount) {
@@ -76214,170 +76462,24 @@
76214
76462
  return this.internalProps.theme;
76215
76463
  }
76216
76464
  getTargetColAt(absoluteX) {
76217
- if (absoluteX === 0) {
76218
- return { left: 0, col: 0, right: 0, width: 0 };
76219
- }
76220
- const findBefore = (startCol, startRight) => {
76221
- let right = startRight;
76222
- for (let col = startCol; col >= 0; col--) {
76223
- const width = this.getColWidth(col);
76224
- const left = right - width;
76225
- if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
76226
- return {
76227
- left,
76228
- col,
76229
- right,
76230
- width
76231
- };
76232
- }
76233
- right = left;
76234
- }
76235
- return null;
76236
- };
76237
- const findAfter = (startCol, startRight) => {
76238
- let left = startRight - this.getColWidth(startCol);
76239
- const { colCount } = this.internalProps;
76240
- for (let col = startCol; col < colCount; col++) {
76241
- const width = this.getColWidth(col);
76242
- const right = left + width;
76243
- if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
76244
- return {
76245
- left,
76246
- col,
76247
- right,
76248
- width
76249
- };
76250
- }
76251
- left = right;
76252
- }
76253
- return null;
76254
- };
76255
- const candCol = this.computeTargetColByX(absoluteX);
76256
- const right = this.getColsWidth(0, candCol);
76257
- if (absoluteX >= right) {
76258
- return findAfter(candCol, right);
76259
- }
76260
- return findBefore(candCol, right);
76465
+ return getTargetColAt(absoluteX, this);
76261
76466
  }
76262
76467
  getTargetRowAt(absoluteY) {
76263
- if (absoluteY === 0) {
76264
- return { top: 0, row: 0, bottom: 0, height: 0 };
76265
- }
76266
- const findBefore = (startRow, startBottom) => {
76267
- let bottom = startBottom;
76268
- for (let row = startRow; row >= 0; row--) {
76269
- const height = this.getRowHeight(row);
76270
- const top = bottom - height;
76271
- if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
76272
- return {
76273
- top,
76274
- row,
76275
- bottom,
76276
- height
76277
- };
76278
- }
76279
- bottom = top;
76280
- }
76281
- return null;
76282
- };
76283
- const findAfter = (startRow, startBottom) => {
76284
- let top = startBottom - this.getRowHeight(startRow);
76285
- const { rowCount } = this.internalProps;
76286
- for (let row = startRow; row < rowCount; row++) {
76287
- const height = this.getRowHeight(row);
76288
- const bottom = top + height;
76289
- if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
76290
- return {
76291
- top,
76292
- row,
76293
- bottom,
76294
- height
76295
- };
76296
- }
76297
- top = bottom;
76298
- }
76299
- return null;
76300
- };
76301
- const candRow = this.computeTargetRowByY(absoluteY);
76302
- const bottom = this.getRowsHeight(0, candRow);
76303
- if (absoluteY >= bottom) {
76304
- return findAfter(candRow, bottom);
76305
- }
76306
- return findBefore(candRow, bottom);
76468
+ return getTargetRowAt(absoluteY, this);
76307
76469
  }
76308
76470
  getTargetColAtConsiderRightFrozen(absoluteX, isConsider) {
76309
- if (absoluteX === 0) {
76310
- return { left: 0, col: 0, right: 0, width: 0 };
76311
- }
76312
- if (isConsider &&
76313
- absoluteX > this.tableNoFrameWidth - this.getRightFrozenColsWidth() &&
76314
- absoluteX < this.tableNoFrameWidth) {
76315
- for (let i = 0; i < this.rightFrozenColCount; i++) {
76316
- if (absoluteX > this.tableNoFrameWidth - this.getColsWidth(this.colCount - i - 1, this.colCount - 1)) {
76317
- return {
76318
- col: this.colCount - i - 1,
76319
- left: undefined,
76320
- right: undefined,
76321
- width: undefined
76322
- };
76323
- }
76324
- }
76325
- }
76326
- return this.getTargetColAt(absoluteX);
76471
+ return getTargetColAtConsiderRightFrozen(absoluteX, isConsider, this);
76327
76472
  }
76328
76473
  getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider) {
76329
- if (absoluteY === 0) {
76330
- return { top: 0, row: 0, bottom: 0, height: 0 };
76331
- }
76332
- if (isConsider &&
76333
- absoluteY > this.tableNoFrameHeight - this.getBottomFrozenRowsHeight() &&
76334
- absoluteY < this.tableNoFrameHeight) {
76335
- for (let i = 0; i < this.rightFrozenColCount; i++) {
76336
- if (absoluteY > this.tableNoFrameHeight - this.getRowsHeight(this.rowCount - i - 1, this.rowCount - 1)) {
76337
- return {
76338
- row: this.rowCount - i - 1,
76339
- top: undefined,
76340
- bottom: undefined,
76341
- height: undefined
76342
- };
76343
- }
76344
- }
76345
- }
76346
- return this.getTargetRowAt(absoluteY);
76347
- }
76348
- computeTargetRowByY(absoluteY) {
76349
- let defaultRowHeight = this.internalProps.defaultRowHeight;
76350
- if (this._rowRangeHeightsMap.get(`$0$${this.rowCount - 1}`)) {
76351
- defaultRowHeight = this._rowRangeHeightsMap.get(`$0$${this.rowCount - 1}`) / this.rowCount;
76352
- }
76353
- return Math.min(Math.ceil(absoluteY / defaultRowHeight), this.rowCount - 1);
76354
- }
76355
- computeTargetColByX(absoluteX) {
76356
- if (this._colRangeWidthsMap.get(`$0$${this.colCount - 1}`)) {
76357
- let startCol = 0;
76358
- let endCol = this.colCount - 1;
76359
- while (endCol - startCol > 1) {
76360
- const midCol = Math.floor((startCol + endCol) / 2);
76361
- if (absoluteX < this._colRangeWidthsMap.get(`$0$${midCol}`)) {
76362
- endCol = midCol;
76363
- }
76364
- else if (absoluteX > this._colRangeWidthsMap.get(`$0$${midCol}`)) {
76365
- startCol = midCol;
76366
- }
76367
- else {
76368
- return midCol;
76369
- }
76370
- }
76371
- return endCol;
76372
- }
76373
- return Math.min(Math.ceil(absoluteX / this.internalProps.defaultColWidth), this.colCount - 1);
76474
+ return getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider, this);
76374
76475
  }
76375
76476
  clearSelected() {
76376
76477
  this.stateManager.updateSelectPos(-1, -1);
76377
76478
  }
76378
76479
  selectCell(col, row, isShift, isCtrl) {
76480
+ const isHasSelected = !!this.stateManager.select.ranges?.length;
76379
76481
  this.stateManager.updateSelectPos(col, row, isShift, isCtrl);
76380
- this.stateManager.endSelectCells();
76482
+ this.stateManager.endSelectCells(true, isHasSelected);
76381
76483
  }
76382
76484
  selectCells(cellRanges) {
76383
76485
  const { scrollLeft, scrollTop } = this;
@@ -76390,7 +76492,7 @@
76390
76492
  this.stateManager.updateInteractionState(InteractionState.grabing);
76391
76493
  this.stateManager.updateSelectPos(cellRange.end.col, cellRange.end.row, false, index >= 1, false, false, true);
76392
76494
  }
76393
- this.stateManager.endSelectCells(false);
76495
+ this.stateManager.endSelectCells(false, false);
76394
76496
  this.stateManager.updateInteractionState(InteractionState.default);
76395
76497
  });
76396
76498
  this.setScrollTop(scrollTop);
@@ -77608,6 +77710,14 @@
77608
77710
  get headerDomContainer() {
77609
77711
  return this.internalProps.headerDomContainer;
77610
77712
  }
77713
+ showMoverLine(col, row) {
77714
+ this.scenegraph.component.showMoveCol(col, row, 0);
77715
+ this.scenegraph.renderSceneGraph();
77716
+ }
77717
+ hideMoverLine(col, row) {
77718
+ this.scenegraph.component.hideMoveCol();
77719
+ this.scenegraph.renderSceneGraph();
77720
+ }
77611
77721
  }
77612
77722
 
77613
77723
  var core = /*#__PURE__*/Object.freeze({
@@ -78082,8 +78192,10 @@
78082
78192
  seqId = 0;
78083
78193
  _headerObjects;
78084
78194
  _headerObjectMap;
78195
+ _headerObjectsIncludeHided;
78085
78196
  _headerCellIds;
78086
78197
  _columns;
78198
+ _columnsIncludeHided;
78087
78199
  rowSeriesNumberColumn;
78088
78200
  leftRowSeriesNumberColumn;
78089
78201
  rightRowSeriesNumberColumn;
@@ -78107,11 +78219,15 @@
78107
78219
  this._showHeader = showHeader;
78108
78220
  this._table = table;
78109
78221
  this._columns = [];
78222
+ this._columnsIncludeHided = [];
78110
78223
  this._headerCellIds = [];
78111
78224
  this.hierarchyIndent = hierarchyIndent ?? 20;
78112
78225
  this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment;
78113
78226
  this.columnTree = new DimensionTree(columns, { seqId: 0 });
78114
- this._headerObjects = this._addHeaders(0, columns, []);
78227
+ this._headerObjectsIncludeHided = this._addHeaders(0, columns, []);
78228
+ this._headerObjects = this._headerObjectsIncludeHided.filter(col => {
78229
+ return col.define.hide !== true;
78230
+ });
78115
78231
  this._headerObjectMap = this._headerObjects.reduce((o, e) => {
78116
78232
  o[e.id] = e;
78117
78233
  return o;
@@ -78685,6 +78801,9 @@
78685
78801
  get columnObjects() {
78686
78802
  return this._columns;
78687
78803
  }
78804
+ get headerObjectsIncludeHided() {
78805
+ return this._headerObjectsIncludeHided;
78806
+ }
78688
78807
  get columnWidths() {
78689
78808
  if (this.leftRowSeriesNumberColumnCount) {
78690
78809
  const widths = this.leftRowSeriesNumberColumn.map(item => {
@@ -79033,28 +79152,31 @@
79033
79152
  this._addHeaders(row + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader).forEach(c => results.push(c));
79034
79153
  }
79035
79154
  else {
79036
- const colDef = hd;
79037
- this._columns.push({
79155
+ const colDef = {
79038
79156
  id: this.seqId++,
79039
- field: colDef.field,
79040
- fieldFormat: colDef.fieldFormat,
79041
- width: colDef.width,
79042
- minWidth: colDef.minWidth,
79043
- maxWidth: colDef.maxWidth,
79044
- icon: colDef.icon,
79045
- cellType: colDef.cellType ?? colDef.columnType ?? 'text',
79046
- chartModule: 'chartModule' in colDef ? colDef.chartModule : null,
79047
- chartSpec: 'chartSpec' in colDef ? colDef.chartSpec : null,
79048
- sparklineSpec: 'sparklineSpec' in colDef ? colDef.sparklineSpec : DefaultSparklineSpec,
79049
- style: colDef.style,
79050
- define: colDef,
79051
- columnWidthComputeMode: colDef.columnWidthComputeMode,
79052
- disableColumnResize: colDef?.disableColumnResize,
79053
- aggregation: this._getAggregationForColumn(colDef, col),
79157
+ field: hd.field,
79158
+ fieldFormat: hd.fieldFormat,
79159
+ width: hd.width,
79160
+ minWidth: hd.minWidth,
79161
+ maxWidth: hd.maxWidth,
79162
+ icon: hd.icon,
79163
+ cellType: hd.cellType ?? hd.columnType ?? 'text',
79164
+ chartModule: 'chartModule' in hd ? hd.chartModule : null,
79165
+ chartSpec: 'chartSpec' in hd ? hd.chartSpec : null,
79166
+ sparklineSpec: 'sparklineSpec' in hd ? hd.sparklineSpec : DefaultSparklineSpec,
79167
+ style: hd.style,
79168
+ define: hd,
79169
+ columnWidthComputeMode: hd.columnWidthComputeMode,
79170
+ disableColumnResize: hd?.disableColumnResize,
79171
+ aggregation: this._getAggregationForColumn(hd, col),
79054
79172
  isChildNode: row >= 1
79055
- });
79056
- for (let r = row + 1; r < this._headerCellIds.length; r++) {
79057
- this._headerCellIds[r][col] = id;
79173
+ };
79174
+ this._columnsIncludeHided.push(colDef);
79175
+ if (hd.hide !== true) {
79176
+ this._columns.push(colDef);
79177
+ for (let r = row + 1; r < this._headerCellIds.length; r++) {
79178
+ this._headerCellIds[r][col] = id;
79179
+ }
79058
79180
  }
79059
79181
  }
79060
79182
  });
@@ -79593,18 +79715,18 @@
79593
79715
  }
79594
79716
  completeEdit(e) {
79595
79717
  if (!this.editingEditor) {
79596
- return;
79718
+ return true;
79597
79719
  }
79598
79720
  const target = e?.target;
79599
79721
  const { editingEditor: editor } = this;
79600
79722
  if (target) {
79601
79723
  if (editor.targetIsOnEditor) {
79602
79724
  if (editor.targetIsOnEditor(target)) {
79603
- return;
79725
+ return false;
79604
79726
  }
79605
79727
  }
79606
79728
  else if (!editor.isEditorElement || editor.isEditorElement(target)) {
79607
- return;
79729
+ return false;
79608
79730
  }
79609
79731
  }
79610
79732
  if (!this.editingEditor.getValue) ;
@@ -79624,7 +79746,9 @@
79624
79746
  this.editingEditor.exit?.();
79625
79747
  this.editingEditor.onEnd?.();
79626
79748
  this.editingEditor = null;
79749
+ return true;
79627
79750
  }
79751
+ return false;
79628
79752
  }
79629
79753
  cancelEdit() {
79630
79754
  if (this.editingEditor) {
@@ -80478,7 +80602,7 @@
80478
80602
  }
80479
80603
  if (order && field && order !== 'normal') {
80480
80604
  const sortFunc = this._getSortFuncFromHeaderOption(undefined, field);
80481
- const hd = this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
80605
+ const hd = this.internalProps.layoutMap.headerObjectsIncludeHided.find((col) => col && col.field === field);
80482
80606
  if (hd.define.sort !== false) {
80483
80607
  this.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
80484
80608
  }
@@ -81297,58 +81421,54 @@
81297
81421
  });
81298
81422
  }
81299
81423
  this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
81300
- if (this.cornerSetting.titleOnDimension === 'column') {
81301
- let colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
81424
+ let colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
81425
+ if (this.dataset &&
81426
+ (this.dataset.records?.length ?? 0) === 0 &&
81427
+ !this.dataset.customColTree &&
81428
+ !this.dataset.customRowTree) {
81429
+ colDimensionKeys = this.columnsDefine.map(define => {
81430
+ if (typeof define === 'string') {
81431
+ return define;
81432
+ }
81433
+ return define.dimensionKey;
81434
+ });
81435
+ if (this.indicatorsAsCol) {
81436
+ colDimensionKeys.push(this.indicatorDimensionKey);
81437
+ }
81438
+ }
81439
+ colDimensionKeys = this.columnHeaderTitle ? [''].concat(colDimensionKeys) : colDimensionKeys;
81440
+ let rowDimensionKeys;
81441
+ let extensionRowDimensions = [];
81442
+ if (this.rowHierarchyType === 'tree' && this.extensionRows?.length >= 1) {
81443
+ const rowTreeFirstKey = [];
81444
+ rowTreeFirstKey.push(this.rowDimensionKeys[0]);
81445
+ this._extensionRowDimensionKeys.forEach(extensionRowKeys => {
81446
+ rowTreeFirstKey.push(extensionRowKeys[0]);
81447
+ });
81448
+ extensionRowDimensions = this.extensionRows.reduce((dimensions, cur) => {
81449
+ return dimensions.concat(cur.rows);
81450
+ }, []);
81451
+ rowDimensionKeys = this.rowHeaderTitle ? [''].concat(rowTreeFirstKey) : rowTreeFirstKey;
81452
+ }
81453
+ else {
81454
+ rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
81302
81455
  if (this.dataset &&
81303
81456
  (this.dataset.records?.length ?? 0) === 0 &&
81304
81457
  !this.dataset.customColTree &&
81305
81458
  !this.dataset.customRowTree) {
81306
- colDimensionKeys = this.columnsDefine.map(define => {
81459
+ rowDimensionKeys = this.rowsDefine.map(define => {
81307
81460
  if (typeof define === 'string') {
81308
81461
  return define;
81309
81462
  }
81310
81463
  return define.dimensionKey;
81311
81464
  });
81312
- if (this.indicatorsAsCol) {
81313
- colDimensionKeys.push(this.indicatorDimensionKey);
81314
- }
81315
- }
81316
- this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [''].concat(colDimensionKeys) : colDimensionKeys, this.columnsDefine);
81317
- }
81318
- else if (this.cornerSetting.titleOnDimension === 'row') {
81319
- if (this.rowHierarchyType === 'tree' && this.extensionRows?.length >= 1) {
81320
- const rowTreeFirstKey = [];
81321
- rowTreeFirstKey.push(this.rowDimensionKeys[0]);
81322
- this._extensionRowDimensionKeys.forEach(extensionRowKeys => {
81323
- rowTreeFirstKey.push(extensionRowKeys[0]);
81324
- });
81325
- const extensionRowDimensions = this.extensionRows.reduce((dimensions, cur) => {
81326
- return dimensions.concat(cur.rows);
81327
- }, []);
81328
- this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [''].concat(rowTreeFirstKey) : rowTreeFirstKey, this.rowsDefine.concat(extensionRowDimensions));
81329
- }
81330
- else {
81331
- let rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
81332
- if (this.dataset &&
81333
- (this.dataset.records?.length ?? 0) === 0 &&
81334
- !this.dataset.customColTree &&
81335
- !this.dataset.customRowTree) {
81336
- rowDimensionKeys = this.rowsDefine.map(define => {
81337
- if (typeof define === 'string') {
81338
- return define;
81339
- }
81340
- return define.dimensionKey;
81341
- });
81342
- if (!this.indicatorsAsCol) {
81343
- rowDimensionKeys.push(this.indicatorDimensionKey);
81344
- }
81465
+ if (!this.indicatorsAsCol) {
81466
+ rowDimensionKeys.push(this.indicatorDimensionKey);
81345
81467
  }
81346
- this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [''].concat(rowDimensionKeys) : rowDimensionKeys, this.rowsDefine);
81347
81468
  }
81469
+ rowDimensionKeys = this.rowHeaderTitle ? [''].concat(rowDimensionKeys) : rowDimensionKeys;
81348
81470
  }
81349
- else {
81350
- this.cornerHeaderObjs = this._addCornerHeaders(null, undefined);
81351
- }
81471
+ this.cornerHeaderObjs = this._addCornerHeaders(colDimensionKeys, rowDimensionKeys, this.columnsDefine.concat(...this.rowsDefine, ...extensionRowDimensions));
81352
81472
  this.colIndex = 0;
81353
81473
  this._headerObjectMap = this._headerObjects.reduce((o, e) => {
81354
81474
  o[e.id] = e;
@@ -81581,63 +81701,257 @@
81581
81701
  dealHeaderForTreeMode(hd, _headerCellIds, results, roots, row, totalLevel, show, dimensions, this);
81582
81702
  }
81583
81703
  }
81584
- _addCornerHeaders(dimensionKeys, dimensions) {
81704
+ _addCornerHeaders(colDimensionKeys, rowDimensionKeys, dimensions) {
81585
81705
  const results = [];
81586
- if (dimensionKeys) {
81587
- dimensionKeys.forEach((dimensionKey, key) => {
81588
- const id = ++this.sharedVar.seqId;
81589
- const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
81590
- const cell = {
81591
- id,
81592
- title: dimensionKey === this.indicatorDimensionKey
81593
- ? this.indicatorTitle
81594
- : dimensionInfo
81595
- ? dimensionInfo.title
81596
- : dimensionKey === 'axis'
81597
- ? ''
81598
- : dimensionKey,
81599
- field: dimensionKey,
81600
- style: this.cornerSetting.headerStyle,
81601
- headerType: this.cornerSetting.headerType ?? 'text',
81602
- showSort: dimensionInfo?.showSortInCorner,
81603
- sort: dimensionInfo?.sort,
81604
- define: {
81706
+ if (this.cornerSetting.titleOnDimension === 'all') {
81707
+ if (this.indicatorsAsCol) {
81708
+ let indicatorAtIndex = -1;
81709
+ if (colDimensionKeys) {
81710
+ colDimensionKeys.forEach((dimensionKey, key) => {
81711
+ if (dimensionKey === this.indicatorDimensionKey) {
81712
+ indicatorAtIndex = key;
81713
+ }
81714
+ const id = ++this.sharedVar.seqId;
81715
+ const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
81716
+ const cell = {
81717
+ id,
81718
+ title: dimensionKey === this.indicatorDimensionKey
81719
+ ? this.indicatorTitle
81720
+ : dimensionInfo
81721
+ ? dimensionInfo.title
81722
+ : dimensionKey === 'axis'
81723
+ ? ''
81724
+ : dimensionKey,
81725
+ field: dimensionKey,
81726
+ style: this.cornerSetting.headerStyle,
81727
+ headerType: this.cornerSetting.headerType ?? 'text',
81728
+ showSort: dimensionInfo?.showSortInCorner,
81729
+ sort: dimensionInfo?.sort,
81730
+ define: {
81731
+ showSort: dimensionInfo?.showSortInCorner,
81732
+ sort: dimensionInfo?.sort,
81733
+ dimensionKey: dimensionKey,
81734
+ id,
81735
+ value: dimensionKey,
81736
+ headerEditor: this.cornerSetting.headerEditor,
81737
+ disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
81738
+ disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
81739
+ },
81740
+ dropDownMenu: dimensionInfo?.cornerDropDownMenu,
81741
+ pivotInfo: {
81742
+ value: dimensionInfo?.title ?? '',
81743
+ dimensionKey,
81744
+ isPivotCorner: true
81745
+ },
81746
+ description: dimensionInfo?.cornerDescription
81747
+ };
81748
+ results[id] = cell;
81749
+ this._headerObjects[id] = cell;
81750
+ if (!this._cornerHeaderCellFullPathIds[key]) {
81751
+ this._cornerHeaderCellFullPathIds[key] = [];
81752
+ }
81753
+ for (let r = 0; r < this.rowHeaderLevelCount; r++) {
81754
+ this._cornerHeaderCellFullPathIds[key][r] = id;
81755
+ }
81756
+ });
81757
+ }
81758
+ if (rowDimensionKeys) {
81759
+ rowDimensionKeys.forEach((dimensionKey, key) => {
81760
+ const id = ++this.sharedVar.seqId;
81761
+ const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
81762
+ const cell = {
81763
+ id,
81764
+ title: dimensionKey === this.indicatorDimensionKey
81765
+ ? this.indicatorTitle
81766
+ : dimensionInfo
81767
+ ? dimensionInfo.title
81768
+ : dimensionKey === 'axis'
81769
+ ? ''
81770
+ : dimensionKey,
81771
+ field: dimensionKey,
81772
+ style: this.cornerSetting.headerStyle,
81773
+ headerType: this.cornerSetting.headerType ?? 'text',
81774
+ showSort: dimensionInfo?.showSortInCorner,
81775
+ sort: dimensionInfo?.sort,
81776
+ define: {
81777
+ showSort: dimensionInfo?.showSortInCorner,
81778
+ sort: dimensionInfo?.sort,
81779
+ dimensionKey: dimensionKey,
81780
+ id,
81781
+ value: dimensionKey,
81782
+ headerEditor: this.cornerSetting.headerEditor,
81783
+ disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
81784
+ disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
81785
+ },
81786
+ dropDownMenu: dimensionInfo?.cornerDropDownMenu,
81787
+ pivotInfo: {
81788
+ value: dimensionInfo?.title ?? '',
81789
+ dimensionKey,
81790
+ isPivotCorner: true
81791
+ },
81792
+ description: dimensionInfo?.cornerDescription
81793
+ };
81794
+ results[id] = cell;
81795
+ this._headerObjects[id] = cell;
81796
+ if (!this._cornerHeaderCellFullPathIds[indicatorAtIndex]) {
81797
+ this._cornerHeaderCellFullPathIds[indicatorAtIndex] = [];
81798
+ }
81799
+ this._cornerHeaderCellFullPathIds[indicatorAtIndex][key] = id;
81800
+ });
81801
+ }
81802
+ }
81803
+ else {
81804
+ let indicatorAtIndex = -1;
81805
+ if (rowDimensionKeys) {
81806
+ rowDimensionKeys.forEach((dimensionKey, key) => {
81807
+ if (dimensionKey === this.indicatorDimensionKey) {
81808
+ indicatorAtIndex = key;
81809
+ }
81810
+ const id = ++this.sharedVar.seqId;
81811
+ const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
81812
+ const cell = {
81813
+ id,
81814
+ title: dimensionKey === this.indicatorDimensionKey
81815
+ ? this.indicatorTitle
81816
+ : dimensionInfo
81817
+ ? dimensionInfo.title
81818
+ : dimensionKey === 'axis'
81819
+ ? ''
81820
+ : dimensionKey,
81821
+ field: dimensionKey,
81822
+ style: this.cornerSetting.headerStyle,
81823
+ headerType: this.cornerSetting.headerType ?? 'text',
81824
+ showSort: dimensionInfo?.showSortInCorner,
81825
+ sort: dimensionInfo?.sort,
81826
+ define: {
81827
+ showSort: dimensionInfo?.showSortInCorner,
81828
+ sort: dimensionInfo?.sort,
81829
+ dimensionKey: dimensionKey,
81830
+ id,
81831
+ value: dimensionKey,
81832
+ headerEditor: this.cornerSetting.headerEditor,
81833
+ disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
81834
+ disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
81835
+ },
81836
+ dropDownMenu: dimensionInfo?.cornerDropDownMenu,
81837
+ pivotInfo: {
81838
+ value: dimensionInfo?.title ?? '',
81839
+ dimensionKey,
81840
+ isPivotCorner: true
81841
+ },
81842
+ description: dimensionInfo?.cornerDescription
81843
+ };
81844
+ results[id] = cell;
81845
+ this._headerObjects[id] = cell;
81846
+ for (let r = 0; r < this.columnHeaderLevelCount; r++) {
81847
+ if (!this._cornerHeaderCellFullPathIds[r]) {
81848
+ this._cornerHeaderCellFullPathIds[r] = [];
81849
+ }
81850
+ this._cornerHeaderCellFullPathIds[r][key] = id;
81851
+ }
81852
+ });
81853
+ }
81854
+ if (colDimensionKeys) {
81855
+ colDimensionKeys.forEach((dimensionKey, key) => {
81856
+ const id = ++this.sharedVar.seqId;
81857
+ const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
81858
+ const cell = {
81859
+ id,
81860
+ title: dimensionKey === this.indicatorDimensionKey
81861
+ ? this.indicatorTitle
81862
+ : dimensionInfo
81863
+ ? dimensionInfo.title
81864
+ : dimensionKey === 'axis'
81865
+ ? ''
81866
+ : dimensionKey,
81867
+ field: dimensionKey,
81868
+ style: this.cornerSetting.headerStyle,
81869
+ headerType: this.cornerSetting.headerType ?? 'text',
81870
+ showSort: dimensionInfo?.showSortInCorner,
81871
+ sort: dimensionInfo?.sort,
81872
+ define: {
81873
+ showSort: dimensionInfo?.showSortInCorner,
81874
+ sort: dimensionInfo?.sort,
81875
+ dimensionKey: dimensionKey,
81876
+ id,
81877
+ value: dimensionKey,
81878
+ headerEditor: this.cornerSetting.headerEditor,
81879
+ disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
81880
+ disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
81881
+ },
81882
+ dropDownMenu: dimensionInfo?.cornerDropDownMenu,
81883
+ pivotInfo: {
81884
+ value: dimensionInfo?.title ?? '',
81885
+ dimensionKey,
81886
+ isPivotCorner: true
81887
+ },
81888
+ description: dimensionInfo?.cornerDescription
81889
+ };
81890
+ results[id] = cell;
81891
+ this._headerObjects[id] = cell;
81892
+ this._cornerHeaderCellFullPathIds[key][indicatorAtIndex] = id;
81893
+ });
81894
+ }
81895
+ }
81896
+ }
81897
+ else if (this.cornerSetting.titleOnDimension === 'row' || this.cornerSetting.titleOnDimension === 'column') {
81898
+ const dimensionKeys = this.cornerSetting?.titleOnDimension === 'row' ? rowDimensionKeys : colDimensionKeys;
81899
+ if (dimensionKeys) {
81900
+ dimensionKeys.forEach((dimensionKey, key) => {
81901
+ const id = ++this.sharedVar.seqId;
81902
+ const dimensionInfo = dimensions.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === dimensionKey);
81903
+ const cell = {
81904
+ id,
81905
+ title: dimensionKey === this.indicatorDimensionKey
81906
+ ? this.indicatorTitle
81907
+ : dimensionInfo
81908
+ ? dimensionInfo.title
81909
+ : dimensionKey === 'axis'
81910
+ ? ''
81911
+ : dimensionKey,
81912
+ field: dimensionKey,
81913
+ style: this.cornerSetting.headerStyle,
81914
+ headerType: this.cornerSetting.headerType ?? 'text',
81605
81915
  showSort: dimensionInfo?.showSortInCorner,
81606
81916
  sort: dimensionInfo?.sort,
81607
- dimensionKey: dimensionKey,
81608
- id,
81609
- value: dimensionKey,
81610
- headerEditor: this.cornerSetting.headerEditor,
81611
- disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
81612
- disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
81613
- },
81614
- dropDownMenu: dimensionInfo?.cornerDropDownMenu,
81615
- pivotInfo: {
81616
- value: dimensionInfo?.title ?? '',
81617
- dimensionKey,
81618
- isPivotCorner: true
81619
- },
81620
- description: dimensionInfo?.cornerDescription
81621
- };
81622
- results[id] = cell;
81623
- this._headerObjects[id] = cell;
81624
- if (this.cornerSetting.titleOnDimension === 'column') {
81625
- if (!this._cornerHeaderCellFullPathIds[key]) {
81626
- this._cornerHeaderCellFullPathIds[key] = [];
81627
- }
81628
- for (let r = 0; r < this.rowHeaderLevelCount; r++) {
81629
- this._cornerHeaderCellFullPathIds[key][r] = id;
81917
+ define: {
81918
+ showSort: dimensionInfo?.showSortInCorner,
81919
+ sort: dimensionInfo?.sort,
81920
+ dimensionKey: dimensionKey,
81921
+ id,
81922
+ value: dimensionKey,
81923
+ headerEditor: this.cornerSetting.headerEditor,
81924
+ disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
81925
+ disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
81926
+ },
81927
+ dropDownMenu: dimensionInfo?.cornerDropDownMenu,
81928
+ pivotInfo: {
81929
+ value: dimensionInfo?.title ?? '',
81930
+ dimensionKey,
81931
+ isPivotCorner: true
81932
+ },
81933
+ description: dimensionInfo?.cornerDescription
81934
+ };
81935
+ results[id] = cell;
81936
+ this._headerObjects[id] = cell;
81937
+ if (this.cornerSetting.titleOnDimension === 'column') {
81938
+ if (!this._cornerHeaderCellFullPathIds[key]) {
81939
+ this._cornerHeaderCellFullPathIds[key] = [];
81940
+ }
81941
+ for (let r = 0; r < this.rowHeaderLevelCount; r++) {
81942
+ this._cornerHeaderCellFullPathIds[key][r] = id;
81943
+ }
81630
81944
  }
81631
- }
81632
- else if (this.cornerSetting.titleOnDimension === 'row') {
81633
- for (let r = 0; r < this.columnHeaderLevelCount; r++) {
81634
- if (!this._cornerHeaderCellFullPathIds[r]) {
81635
- this._cornerHeaderCellFullPathIds[r] = [];
81945
+ else if (this.cornerSetting.titleOnDimension === 'row') {
81946
+ for (let r = 0; r < this.columnHeaderLevelCount; r++) {
81947
+ if (!this._cornerHeaderCellFullPathIds[r]) {
81948
+ this._cornerHeaderCellFullPathIds[r] = [];
81949
+ }
81950
+ this._cornerHeaderCellFullPathIds[r][key] = id;
81636
81951
  }
81637
- this._cornerHeaderCellFullPathIds[r][key] = id;
81638
81952
  }
81639
- }
81640
- });
81953
+ });
81954
+ }
81641
81955
  }
81642
81956
  else {
81643
81957
  const id = ++this.sharedVar.seqId;
@@ -82038,7 +82352,8 @@
82038
82352
  if (this.cornerSetting.titleOnDimension === 'row') {
82039
82353
  count = 1;
82040
82354
  }
82041
- else if ((this.dataset.records?.length ?? 0) === 0 && this.cornerSetting.titleOnDimension === 'column') {
82355
+ else if ((this.dataset.records?.length ?? 0) === 0 &&
82356
+ (this.cornerSetting.titleOnDimension === 'column' || this.cornerSetting.titleOnDimension === 'all')) {
82042
82357
  count = this.columnsDefine.length ?? 0;
82043
82358
  }
82044
82359
  }
@@ -82046,7 +82361,7 @@
82046
82361
  (this.dataset.records?.length ?? 0) === 0 &&
82047
82362
  !this.dataset.customColTree &&
82048
82363
  !this.dataset.customRowTree) {
82049
- if (this.cornerSetting.titleOnDimension === 'column') {
82364
+ if (this.cornerSetting.titleOnDimension === 'column' || this.cornerSetting.titleOnDimension === 'all') {
82050
82365
  count = this.columnsDefine.length ?? 0;
82051
82366
  if (!this.hideIndicatorName && this.indicatorsAsCol) {
82052
82367
  count++;
@@ -82084,7 +82399,8 @@
82084
82399
  if (this.cornerSetting.titleOnDimension === 'column') {
82085
82400
  count = 1;
82086
82401
  }
82087
- else if ((this.dataset.records?.length ?? 0) === 0 && this.cornerSetting.titleOnDimension === 'row') {
82402
+ else if ((this.dataset.records?.length ?? 0) === 0 &&
82403
+ (this.cornerSetting.titleOnDimension === 'row' || this.cornerSetting.titleOnDimension === 'all')) {
82088
82404
  count = this.rowsDefine.length ?? 0;
82089
82405
  }
82090
82406
  }
@@ -82092,7 +82408,7 @@
82092
82408
  (this.dataset.records?.length ?? 0) === 0 &&
82093
82409
  !this.dataset.customColTree &&
82094
82410
  !this.dataset.customRowTree) {
82095
- if (this.cornerSetting.titleOnDimension === 'row') {
82411
+ if (this.cornerSetting.titleOnDimension === 'row' || this.cornerSetting.titleOnDimension === 'all') {
82096
82412
  count = this.rowsDefine.length;
82097
82413
  if (!this.hideIndicatorName && !this.indicatorsAsCol) {
82098
82414
  count++;
@@ -88383,7 +88699,7 @@
88383
88699
  }
88384
88700
 
88385
88701
  registerForVrender();
88386
- const version = "1.4.2-alpha.2";
88702
+ const version = "1.4.2-alpha.4";
88387
88703
  function getIcons() {
88388
88704
  return get$2();
88389
88705
  }