@visactor/vtable 0.19.0 → 0.19.1
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.
- package/cjs/ListTable.js +4 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -1
- package/cjs/PivotChart.js +2 -1
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +2 -2
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.js +12 -7
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +0 -1
- package/cjs/core/BaseTable.js +12 -12
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +43 -42
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.js +8 -8
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/listener/container-dom.js +2 -2
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/header-helper/header-helper.js +2 -2
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.d.ts +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +3 -1
- package/cjs/layout/pivot-header-layout.js +55 -38
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/row-height-map.d.ts +1 -0
- package/cjs/layout/row-height-map.js +3 -0
- package/cjs/layout/row-height-map.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +7 -7
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +1 -0
- package/cjs/scenegraph/graphic/group.js +10 -0
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +6 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +4 -3
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -5
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +7 -3
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +6 -2
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +7 -9
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +4 -2
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +4 -2
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +2 -1
- package/cjs/scenegraph/stick-text/index.js +13 -5
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +3 -2
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.js +8 -4
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/state/hover/update-cell.js +8 -4
- package/cjs/state/hover/update-cell.js.map +1 -1
- package/cjs/state/state.js +1 -2
- package/cjs/themes/component.d.ts +5 -5
- package/cjs/tools/merge-range.d.ts +8 -0
- package/cjs/tools/merge-range.js +19 -0
- package/cjs/tools/merge-range.js.map +1 -0
- package/cjs/ts-types/component/axis.d.ts +2 -15
- package/cjs/ts-types/component/axis.js.map +1 -1
- package/cjs/ts-types/customElement.d.ts +1 -0
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +265 -138
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +4 -4
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -1
- package/es/PivotChart.js +2 -1
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +2 -2
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.js +12 -7
- package/es/components/axis/axis.js.map +1 -1
- package/es/core/BaseTable.d.ts +0 -1
- package/es/core/BaseTable.js +12 -12
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +43 -42
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.js +8 -8
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/listener/container-dom.js +2 -2
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/header-helper/header-helper.js +3 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.d.ts +1 -1
- package/es/layout/pivot-header-layout.d.ts +3 -1
- package/es/layout/pivot-header-layout.js +54 -38
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/row-height-map.d.ts +1 -0
- package/es/layout/row-height-map.js +3 -0
- package/es/layout/row-height-map.js.map +1 -1
- package/es/scenegraph/component/custom.js +7 -7
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +1 -0
- package/es/scenegraph/graphic/group.js +10 -0
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +6 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +4 -3
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +6 -5
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +7 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +6 -1
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +7 -9
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +4 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +4 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.js +2 -1
- package/es/scenegraph/stick-text/index.js +12 -4
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +3 -2
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/hover/is-cell-hover.js +8 -3
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/state/hover/update-cell.js +8 -3
- package/es/state/hover/update-cell.js.map +1 -1
- package/es/state/state.js +1 -2
- package/es/themes/component.d.ts +5 -5
- package/es/tools/merge-range.d.ts +8 -0
- package/es/tools/merge-range.js +13 -0
- package/es/tools/merge-range.js.map +1 -0
- package/es/ts-types/component/axis.d.ts +2 -15
- package/es/ts-types/component/axis.js.map +1 -1
- package/es/ts-types/customElement.d.ts +1 -0
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -30606,14 +30606,18 @@
|
|
|
30606
30606
|
this.type = option.type ?? 'band';
|
|
30607
30607
|
this.option = merge({}, getCommonAxis(option.__vtableChartTheme), getTableAxisTheme(this.orient, table.theme), getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme), option);
|
|
30608
30608
|
if (this.orient === 'left' || this.orient === 'right') {
|
|
30609
|
+
const innerOffsetTop = this.option.innerOffset?.top ?? 0;
|
|
30610
|
+
const innerOffsetBottom = this.option.innerOffset?.bottom ?? 0;
|
|
30609
30611
|
this.width = width;
|
|
30610
|
-
this.height = height - padding[2];
|
|
30611
|
-
this.y = padding[0];
|
|
30612
|
+
this.height = height - padding[2] - innerOffsetBottom;
|
|
30613
|
+
this.y = padding[0] + innerOffsetTop;
|
|
30612
30614
|
}
|
|
30613
30615
|
else if (this.orient === 'top' || this.orient === 'bottom') {
|
|
30614
|
-
|
|
30616
|
+
const innerOffsetLeft = this.option.innerOffset?.left ?? 0;
|
|
30617
|
+
const innerOffsetRight = this.option.innerOffset?.right ?? 0;
|
|
30618
|
+
this.width = width - padding[1] - innerOffsetRight;
|
|
30615
30619
|
this.height = height;
|
|
30616
|
-
this.x = padding[3];
|
|
30620
|
+
this.x = padding[3] + innerOffsetLeft;
|
|
30617
30621
|
}
|
|
30618
30622
|
this.visible = option.visible ?? true;
|
|
30619
30623
|
this.inverse = 'inverse' in option ? !!option.inverse : false;
|
|
@@ -32497,6 +32501,22 @@
|
|
|
32497
32501
|
}
|
|
32498
32502
|
return null;
|
|
32499
32503
|
}
|
|
32504
|
+
addCellGroup(cellGroup) {
|
|
32505
|
+
if (this.childrenCount === 0 || this.lastChild.row === cellGroup.row - 1) {
|
|
32506
|
+
this.addChild(cellGroup);
|
|
32507
|
+
}
|
|
32508
|
+
else {
|
|
32509
|
+
let c = this._firstChild;
|
|
32510
|
+
for (let i = 0; i < this.childrenCount; i++) {
|
|
32511
|
+
if (c.row === cellGroup.row - 1) {
|
|
32512
|
+
this.insertAfter(cellGroup, c);
|
|
32513
|
+
return;
|
|
32514
|
+
}
|
|
32515
|
+
c = c._next;
|
|
32516
|
+
}
|
|
32517
|
+
this.addChild(cellGroup);
|
|
32518
|
+
}
|
|
32519
|
+
}
|
|
32500
32520
|
getChildAt(index) {
|
|
32501
32521
|
const child = super.getChildAt(index);
|
|
32502
32522
|
if (child && child.name === 'border-rect') {
|
|
@@ -32739,6 +32759,7 @@
|
|
|
32739
32759
|
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
32740
32760
|
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
32741
32761
|
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
32762
|
+
lineDash: cellTheme?.group?.lineDash ?? undefined,
|
|
32742
32763
|
lineCap: 'square',
|
|
32743
32764
|
clip: true,
|
|
32744
32765
|
cornerRadius: cellTheme.group.cornerRadius
|
|
@@ -32746,7 +32767,7 @@
|
|
|
32746
32767
|
cellGroup.role = 'cell';
|
|
32747
32768
|
cellGroup.col = col;
|
|
32748
32769
|
cellGroup.row = row;
|
|
32749
|
-
columnGroup?.
|
|
32770
|
+
columnGroup?.addCellGroup(cellGroup);
|
|
32750
32771
|
}
|
|
32751
32772
|
cellGroup.AABBBounds.width();
|
|
32752
32773
|
const chartGroup = new Chart({
|
|
@@ -33129,6 +33150,7 @@
|
|
|
33129
33150
|
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
33130
33151
|
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
33131
33152
|
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
33153
|
+
lineDash: cellTheme?.group?.lineDash ?? undefined,
|
|
33132
33154
|
lineCap: 'square',
|
|
33133
33155
|
clip: true,
|
|
33134
33156
|
cornerRadius: cellTheme.group.cornerRadius
|
|
@@ -33136,7 +33158,7 @@
|
|
|
33136
33158
|
cellGroup.role = 'cell';
|
|
33137
33159
|
cellGroup.col = col;
|
|
33138
33160
|
cellGroup.row = row;
|
|
33139
|
-
columnGroup?.
|
|
33161
|
+
columnGroup?.addCellGroup(cellGroup);
|
|
33140
33162
|
const value = table.getCellValue(col, row);
|
|
33141
33163
|
const image = createImage({
|
|
33142
33164
|
x: padding[3],
|
|
@@ -33777,6 +33799,7 @@
|
|
|
33777
33799
|
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
33778
33800
|
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
33779
33801
|
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
33802
|
+
lineDash: cellTheme?.group?.lineDash ?? undefined,
|
|
33780
33803
|
lineCap: 'square',
|
|
33781
33804
|
clip: true,
|
|
33782
33805
|
cornerRadius: cellTheme.group.cornerRadius
|
|
@@ -33784,7 +33807,7 @@
|
|
|
33784
33807
|
cellGroup.role = 'cell';
|
|
33785
33808
|
cellGroup.col = col;
|
|
33786
33809
|
cellGroup.row = row;
|
|
33787
|
-
columnGroup?.
|
|
33810
|
+
columnGroup?.addCellGroup(cellGroup);
|
|
33788
33811
|
}
|
|
33789
33812
|
const chartGroup = createSparkLine(col, row, width, height, padding, table);
|
|
33790
33813
|
if (chartGroup) {
|
|
@@ -34539,11 +34562,11 @@
|
|
|
34539
34562
|
child.setAttribute('x', child.attribute.x + detaX);
|
|
34540
34563
|
}
|
|
34541
34564
|
else if (child.name === 'content' || child.name === 'text') {
|
|
34542
|
-
child.
|
|
34543
|
-
if (
|
|
34565
|
+
const childTextAlign = child.attribute.textAlign ?? textAlign;
|
|
34566
|
+
if (childTextAlign === 'center') {
|
|
34544
34567
|
child.setAttribute('x', padding[3] + leftIconWidth + (distWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth) / 2);
|
|
34545
34568
|
}
|
|
34546
|
-
else if (
|
|
34569
|
+
else if (childTextAlign === 'right') {
|
|
34547
34570
|
child.setAttribute('x', padding[3] + distWidth - (padding[1] + padding[3]) - rightIconWidth);
|
|
34548
34571
|
}
|
|
34549
34572
|
else ;
|
|
@@ -34686,6 +34709,7 @@
|
|
|
34686
34709
|
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
34687
34710
|
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
34688
34711
|
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
34712
|
+
lineDash: cellTheme?.group?.lineDash ?? undefined,
|
|
34689
34713
|
lineCap: 'square',
|
|
34690
34714
|
clip: true,
|
|
34691
34715
|
cornerRadius: cellTheme.group.cornerRadius
|
|
@@ -34693,7 +34717,7 @@
|
|
|
34693
34717
|
cellGroup.role = 'cell';
|
|
34694
34718
|
cellGroup.col = col;
|
|
34695
34719
|
cellGroup.row = row;
|
|
34696
|
-
columnGroup?.
|
|
34720
|
+
columnGroup?.addCellGroup(cellGroup);
|
|
34697
34721
|
if (customElementsGroup) {
|
|
34698
34722
|
cellGroup.appendChild(customElementsGroup);
|
|
34699
34723
|
}
|
|
@@ -34757,6 +34781,7 @@
|
|
|
34757
34781
|
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
34758
34782
|
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
34759
34783
|
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
34784
|
+
lineDash: cellTheme?.group?.lineDash ?? undefined,
|
|
34760
34785
|
lineCap: 'square',
|
|
34761
34786
|
clip: true,
|
|
34762
34787
|
cornerRadius: cellTheme.group.cornerRadius
|
|
@@ -34764,7 +34789,7 @@
|
|
|
34764
34789
|
cellGroup.role = 'cell';
|
|
34765
34790
|
cellGroup.col = col;
|
|
34766
34791
|
cellGroup.row = row;
|
|
34767
|
-
columnGroup?.
|
|
34792
|
+
columnGroup?.addCellGroup(cellGroup);
|
|
34768
34793
|
const value = table.getCellValue(col, row);
|
|
34769
34794
|
const video = document.createElement('video');
|
|
34770
34795
|
video.addEventListener('loadeddata', () => {
|
|
@@ -34849,6 +34874,7 @@
|
|
|
34849
34874
|
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
34850
34875
|
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
34851
34876
|
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
34877
|
+
lineDash: cellTheme?.group?.lineDash ?? undefined,
|
|
34852
34878
|
lineCap: 'square',
|
|
34853
34879
|
clip: true,
|
|
34854
34880
|
cornerRadius: cellTheme.group.cornerRadius
|
|
@@ -34856,7 +34882,7 @@
|
|
|
34856
34882
|
cellGroup.role = 'cell';
|
|
34857
34883
|
cellGroup.col = col;
|
|
34858
34884
|
cellGroup.row = row;
|
|
34859
|
-
columnGroup?.
|
|
34885
|
+
columnGroup?.addCellGroup(cellGroup);
|
|
34860
34886
|
}
|
|
34861
34887
|
const checkboxComponent = createCheckbox(col, row, colWidth, width, height, padding, cellTheme, define, table);
|
|
34862
34888
|
if (checkboxComponent) {
|
|
@@ -35178,6 +35204,12 @@
|
|
|
35178
35204
|
cornerRadius: cellTheme?.group?.cornerRadius ?? 0,
|
|
35179
35205
|
y: table.scenegraph.getCellGroupY(row)
|
|
35180
35206
|
});
|
|
35207
|
+
oldCellGroup.forEachChildren((child) => {
|
|
35208
|
+
child.setAttributes({
|
|
35209
|
+
dx: 0,
|
|
35210
|
+
dy: 0
|
|
35211
|
+
});
|
|
35212
|
+
});
|
|
35181
35213
|
const textMark = oldCellGroup.getChildByName('text');
|
|
35182
35214
|
if (textMark) {
|
|
35183
35215
|
const text = table.getCellValue(col, row);
|
|
@@ -35607,6 +35639,7 @@
|
|
|
35607
35639
|
pickable: !!element.pickable,
|
|
35608
35640
|
cursor: element.cursor
|
|
35609
35641
|
});
|
|
35642
|
+
arc.name = element.name;
|
|
35610
35643
|
customGroup.appendChild(arc);
|
|
35611
35644
|
break;
|
|
35612
35645
|
case 'text':
|
|
@@ -35629,6 +35662,7 @@
|
|
|
35629
35662
|
pickable: !!element.pickable,
|
|
35630
35663
|
fill: element.color ?? element.fill
|
|
35631
35664
|
}, element));
|
|
35665
|
+
text.name = element.name;
|
|
35632
35666
|
customGroup.appendChild(text);
|
|
35633
35667
|
break;
|
|
35634
35668
|
case 'rect':
|
|
@@ -35645,6 +35679,7 @@
|
|
|
35645
35679
|
pickable: !!element.pickable,
|
|
35646
35680
|
cursor: element.cursor
|
|
35647
35681
|
});
|
|
35682
|
+
rect.name = element.name;
|
|
35648
35683
|
customGroup.appendChild(rect);
|
|
35649
35684
|
break;
|
|
35650
35685
|
case 'circle':
|
|
@@ -35659,6 +35694,7 @@
|
|
|
35659
35694
|
pickable: !!element.pickable,
|
|
35660
35695
|
cursor: element.cursor
|
|
35661
35696
|
});
|
|
35697
|
+
circle.name = element.name;
|
|
35662
35698
|
customGroup.appendChild(circle);
|
|
35663
35699
|
break;
|
|
35664
35700
|
case 'icon':
|
|
@@ -35676,6 +35712,7 @@
|
|
|
35676
35712
|
pickable: !!element.pickable,
|
|
35677
35713
|
cursor: element.cursor
|
|
35678
35714
|
});
|
|
35715
|
+
icon.name = element.name;
|
|
35679
35716
|
icon.role = 'icon-custom';
|
|
35680
35717
|
customGroup.appendChild(icon);
|
|
35681
35718
|
break;
|
|
@@ -35695,6 +35732,7 @@
|
|
|
35695
35732
|
cursor: element.cursor,
|
|
35696
35733
|
shape: element.shape
|
|
35697
35734
|
});
|
|
35735
|
+
image.name = element.name;
|
|
35698
35736
|
image.role = 'image-custom';
|
|
35699
35737
|
customGroup.appendChild(image);
|
|
35700
35738
|
break;
|
|
@@ -35705,6 +35743,7 @@
|
|
|
35705
35743
|
pickable: !!element.pickable,
|
|
35706
35744
|
cursor: element.cursor
|
|
35707
35745
|
});
|
|
35746
|
+
line.name = element.name;
|
|
35708
35747
|
customGroup.appendChild(line);
|
|
35709
35748
|
break;
|
|
35710
35749
|
}
|
|
@@ -36817,7 +36856,7 @@
|
|
|
36817
36856
|
const oldRowHeights = [];
|
|
36818
36857
|
const newHeights = [];
|
|
36819
36858
|
if (update) {
|
|
36820
|
-
for (let row =
|
|
36859
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
36821
36860
|
oldRowHeights[row] = table.getRowHeight(row);
|
|
36822
36861
|
}
|
|
36823
36862
|
}
|
|
@@ -36907,9 +36946,13 @@
|
|
|
36907
36946
|
}
|
|
36908
36947
|
}
|
|
36909
36948
|
else {
|
|
36910
|
-
table.
|
|
36911
|
-
|
|
36912
|
-
|
|
36949
|
+
if (table.rowCount !== table.rowHeightsMap.length) {
|
|
36950
|
+
table.clearRowHeightCache();
|
|
36951
|
+
}
|
|
36952
|
+
if (update) {
|
|
36953
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
36954
|
+
newHeights[row] = table.getRowHeight(row);
|
|
36955
|
+
}
|
|
36913
36956
|
}
|
|
36914
36957
|
}
|
|
36915
36958
|
if ((rowStart === 0 && rowEnd === table.rowCount - 1) || isClearRowRangeHeightsMap) {
|
|
@@ -36958,7 +37001,7 @@
|
|
|
36958
37001
|
let actualHeight = 0;
|
|
36959
37002
|
let actualHeaderHeight = 0;
|
|
36960
37003
|
for (let row = 0; row < table.rowCount; row++) {
|
|
36961
|
-
const rowHeight = update ? newHeights[row] : table.getRowHeight(row);
|
|
37004
|
+
const rowHeight = update ? newHeights[row] ?? table.getRowHeight(row) : table.getRowHeight(row);
|
|
36962
37005
|
if (row < table.columnHeaderLevelCount ||
|
|
36963
37006
|
(table.isPivotChart() && row >= table.rowCount - table.bottomFrozenRowCount)) {
|
|
36964
37007
|
actualHeaderHeight += rowHeight;
|
|
@@ -36998,7 +37041,7 @@
|
|
|
36998
37041
|
}
|
|
36999
37042
|
}
|
|
37000
37043
|
if (update) {
|
|
37001
|
-
for (let row =
|
|
37044
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
37002
37045
|
const newRowHeight = newHeights[row] ?? table.getRowHeight(row);
|
|
37003
37046
|
if (newRowHeight !== oldRowHeights[row]) {
|
|
37004
37047
|
table._setRowHeight(row, newRowHeight);
|
|
@@ -37366,6 +37409,29 @@
|
|
|
37366
37409
|
};
|
|
37367
37410
|
}
|
|
37368
37411
|
|
|
37412
|
+
function getCellMergeRange(cellGroup, scene) {
|
|
37413
|
+
const { mergeStartCol, mergeEndCol, mergeStartRow, mergeEndRow, col, row } = cellGroup;
|
|
37414
|
+
const { colStart, colEnd, rowStart, rowEnd, bodyLeftCol, bodyRightCol, bodyTopRow, bodyBottomRow } = scene.proxy;
|
|
37415
|
+
let cellRangeColStart = mergeStartCol;
|
|
37416
|
+
let cellRangeColEnd = mergeEndCol;
|
|
37417
|
+
let cellRangeRowStart = mergeStartRow;
|
|
37418
|
+
let cellRangeRowEnd = mergeEndRow;
|
|
37419
|
+
if (col >= bodyLeftCol && col <= bodyRightCol) {
|
|
37420
|
+
cellRangeColStart = Math.max(cellGroup.mergeStartCol, colStart);
|
|
37421
|
+
cellRangeColEnd = Math.min(cellGroup.mergeEndCol, colEnd);
|
|
37422
|
+
}
|
|
37423
|
+
if (row >= bodyTopRow && row <= bodyBottomRow) {
|
|
37424
|
+
cellRangeRowStart = Math.max(cellGroup.mergeStartRow, rowStart);
|
|
37425
|
+
cellRangeRowEnd = Math.min(cellGroup.mergeEndRow, rowEnd);
|
|
37426
|
+
}
|
|
37427
|
+
return {
|
|
37428
|
+
colStart: cellRangeColStart,
|
|
37429
|
+
colEnd: cellRangeColEnd,
|
|
37430
|
+
rowStart: cellRangeRowStart,
|
|
37431
|
+
rowEnd: cellRangeRowEnd
|
|
37432
|
+
};
|
|
37433
|
+
}
|
|
37434
|
+
|
|
37369
37435
|
function updateRowHeight(scene, row, detaY, skipTableHeightMap) {
|
|
37370
37436
|
if (!skipTableHeightMap) {
|
|
37371
37437
|
scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);
|
|
@@ -37496,8 +37562,9 @@
|
|
|
37496
37562
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
37497
37563
|
distHeight += table.getRowHeight(row);
|
|
37498
37564
|
}
|
|
37499
|
-
|
|
37500
|
-
|
|
37565
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
37566
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
37567
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
37501
37568
|
const singleCellGroup = table.scenegraph.getCell(col, row);
|
|
37502
37569
|
singleCellGroup.forEachChildren((child) => {
|
|
37503
37570
|
child.setAttributes({
|
|
@@ -37802,8 +37869,9 @@
|
|
|
37802
37869
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
37803
37870
|
cellHeight += table.getRowHeight(row);
|
|
37804
37871
|
}
|
|
37805
|
-
|
|
37806
|
-
|
|
37872
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
37873
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
37874
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
37807
37875
|
const singleCellGroup = table.scenegraph.getCell(col, row);
|
|
37808
37876
|
singleCellGroup.forEachChildren((child) => {
|
|
37809
37877
|
child.setAttributes({
|
|
@@ -39299,8 +39367,9 @@
|
|
|
39299
39367
|
isValid$1(cellGroup.mergeStartRow) &&
|
|
39300
39368
|
isValid$1(cellGroup.mergeEndCol) &&
|
|
39301
39369
|
isValid$1(cellGroup.mergeEndRow)) {
|
|
39302
|
-
|
|
39303
|
-
|
|
39370
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
39371
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
39372
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
39304
39373
|
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
39305
39374
|
if (key && (!colorKey || key === 'cellBgColor')) {
|
|
39306
39375
|
colorKey = key;
|
|
@@ -41523,6 +41592,10 @@
|
|
|
41523
41592
|
}
|
|
41524
41593
|
updateCellGroupPosition(cellGroup, newRow, y) {
|
|
41525
41594
|
cellGroup.row = newRow;
|
|
41595
|
+
cellGroup.mergeStartCol = undefined;
|
|
41596
|
+
cellGroup.mergeStartRow = undefined;
|
|
41597
|
+
cellGroup.mergeEndCol = undefined;
|
|
41598
|
+
cellGroup.mergeEndRow = undefined;
|
|
41526
41599
|
cellGroup.setAttribute('y', y);
|
|
41527
41600
|
cellGroup.needUpdate = true;
|
|
41528
41601
|
cellGroup.needUpdateForAutoRowHeight = true;
|
|
@@ -41585,10 +41658,15 @@
|
|
|
41585
41658
|
if (cacheCellGroup.row === row) {
|
|
41586
41659
|
return cacheCellGroup;
|
|
41587
41660
|
}
|
|
41588
|
-
|
|
41589
|
-
|
|
41661
|
+
const prev = cacheCellGroup._prev;
|
|
41662
|
+
const next = cacheCellGroup._next;
|
|
41663
|
+
if (cacheCellGroup.row > row && prev && prev.row === row - 1) {
|
|
41664
|
+
return getCellByCache(prev, row);
|
|
41665
|
+
}
|
|
41666
|
+
if (cacheCellGroup.row < row && next && next.row === row + 1) {
|
|
41667
|
+
return getCellByCache(next, row);
|
|
41590
41668
|
}
|
|
41591
|
-
return
|
|
41669
|
+
return null;
|
|
41592
41670
|
}
|
|
41593
41671
|
|
|
41594
41672
|
function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, sourceMergeInfo, targetMergeInfo, table) {
|
|
@@ -42624,8 +42702,9 @@
|
|
|
42624
42702
|
isNumber$2(cellGroup.mergeStartRow) &&
|
|
42625
42703
|
isNumber$2(cellGroup.mergeEndCol) &&
|
|
42626
42704
|
isNumber$2(cellGroup.mergeEndRow)) {
|
|
42627
|
-
|
|
42628
|
-
|
|
42705
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42706
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
42707
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
42629
42708
|
const singleCellGroup = table.scenegraph.getCell(col, row);
|
|
42630
42709
|
dealVertical(singleCellGroup, minTop, maxTop, changedCells);
|
|
42631
42710
|
}
|
|
@@ -42685,8 +42764,9 @@
|
|
|
42685
42764
|
isNumber$2(cellGroup.mergeStartRow) &&
|
|
42686
42765
|
isNumber$2(cellGroup.mergeEndCol) &&
|
|
42687
42766
|
isNumber$2(cellGroup.mergeEndRow)) {
|
|
42688
|
-
|
|
42689
|
-
|
|
42767
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42768
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
42769
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
42690
42770
|
const singleCellGroup = table.scenegraph.getCell(col, row);
|
|
42691
42771
|
dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells);
|
|
42692
42772
|
}
|
|
@@ -43628,9 +43708,10 @@
|
|
|
43628
43708
|
isValid$1(cellGroup.mergeStartRow) &&
|
|
43629
43709
|
isValid$1(cellGroup.mergeEndCol) &&
|
|
43630
43710
|
isValid$1(cellGroup.mergeEndRow)) {
|
|
43631
|
-
|
|
43632
|
-
|
|
43633
|
-
|
|
43711
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, scene);
|
|
43712
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
43713
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
43714
|
+
updateCellGroupIcon(scene.highPerformanceGetCell(col, row), filter, dealer);
|
|
43634
43715
|
}
|
|
43635
43716
|
}
|
|
43636
43717
|
}
|
|
@@ -45195,14 +45276,15 @@
|
|
|
45195
45276
|
}
|
|
45196
45277
|
|
|
45197
45278
|
function updateCell(scenegraph, col, row) {
|
|
45198
|
-
const cellGroup = scenegraph.
|
|
45279
|
+
const cellGroup = scenegraph.highPerformanceGetCell(col, row);
|
|
45199
45280
|
if (isValid$1(cellGroup.mergeStartCol) &&
|
|
45200
45281
|
isValid$1(cellGroup.mergeStartRow) &&
|
|
45201
45282
|
isValid$1(cellGroup.mergeEndCol) &&
|
|
45202
45283
|
isValid$1(cellGroup.mergeEndRow)) {
|
|
45203
|
-
|
|
45204
|
-
|
|
45205
|
-
|
|
45284
|
+
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, scenegraph);
|
|
45285
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
45286
|
+
for (let row = rowStart; row <= rowEnd; row++) {
|
|
45287
|
+
const mergeCell = scenegraph.highPerformanceGetCell(col, row);
|
|
45206
45288
|
mergeCell.addUpdateBoundTag();
|
|
45207
45289
|
}
|
|
45208
45290
|
}
|
|
@@ -47991,9 +48073,9 @@
|
|
|
47991
48073
|
if (table.editorManager.editingEditor) {
|
|
47992
48074
|
table.editorManager.completeEdit();
|
|
47993
48075
|
table.getElement().focus();
|
|
47994
|
-
|
|
47995
|
-
|
|
47996
|
-
|
|
48076
|
+
if (table.getEditor(targetCol, targetRow)) {
|
|
48077
|
+
table.editorManager.startEditCell(targetCol, targetRow);
|
|
48078
|
+
}
|
|
47997
48079
|
}
|
|
47998
48080
|
}
|
|
47999
48081
|
}
|
|
@@ -49648,7 +49730,10 @@
|
|
|
49648
49730
|
getSortIcon(order, _table, col, row) {
|
|
49649
49731
|
const icon = order === 'asc' ? this.downIcon : order === 'desc' ? this.upIcon : this.normalIcon;
|
|
49650
49732
|
const headerC = _table.getHeaderDefine(col, row);
|
|
49651
|
-
if (!headerC ||
|
|
49733
|
+
if (!headerC ||
|
|
49734
|
+
headerC.showSort === false ||
|
|
49735
|
+
(!isValid$1(headerC.showSort) && !headerC.sort) ||
|
|
49736
|
+
(headerC.columns && headerC.columns.length > 0)) {
|
|
49652
49737
|
return null;
|
|
49653
49738
|
}
|
|
49654
49739
|
return icon;
|
|
@@ -51381,6 +51466,9 @@
|
|
|
51381
51466
|
this.totalSum = 0;
|
|
51382
51467
|
this.table = table;
|
|
51383
51468
|
}
|
|
51469
|
+
get length() {
|
|
51470
|
+
return this.data.size;
|
|
51471
|
+
}
|
|
51384
51472
|
clear() {
|
|
51385
51473
|
this.data.clear();
|
|
51386
51474
|
this.cumulativeSum.clear();
|
|
@@ -51604,7 +51692,6 @@
|
|
|
51604
51692
|
class BaseTable extends EventTarget$1 {
|
|
51605
51693
|
internalProps;
|
|
51606
51694
|
showFrozenIcon = true;
|
|
51607
|
-
showSort = true;
|
|
51608
51695
|
padding;
|
|
51609
51696
|
globalDropDownMenu;
|
|
51610
51697
|
tableNoFrameWidth;
|
|
@@ -51627,7 +51714,7 @@
|
|
|
51627
51714
|
return TABLE_EVENT_TYPE;
|
|
51628
51715
|
}
|
|
51629
51716
|
options;
|
|
51630
|
-
version = "0.19.
|
|
51717
|
+
version = "0.19.1";
|
|
51631
51718
|
pagination;
|
|
51632
51719
|
id = `VTable${Date.now()}`;
|
|
51633
51720
|
headerStyleCache;
|
|
@@ -52253,7 +52340,6 @@
|
|
|
52253
52340
|
}
|
|
52254
52341
|
else {
|
|
52255
52342
|
absoluteLeft = this.getColsWidth(0, col - 1) || 0;
|
|
52256
|
-
absoluteLeft += this.scrollLeft;
|
|
52257
52343
|
}
|
|
52258
52344
|
}
|
|
52259
52345
|
else {
|
|
@@ -52267,7 +52353,6 @@
|
|
|
52267
52353
|
}
|
|
52268
52354
|
else {
|
|
52269
52355
|
absoluteTop = this.getRowsHeight(0, row - 1);
|
|
52270
|
-
absoluteTop += this.scrollTop;
|
|
52271
52356
|
}
|
|
52272
52357
|
}
|
|
52273
52358
|
else {
|
|
@@ -52364,20 +52449,19 @@
|
|
|
52364
52449
|
const isFrozenEndCell = this.isFrozenCell(endCol, endRow);
|
|
52365
52450
|
let absoluteLeft = this.getColsWidth(0, startCol - 1) || 0;
|
|
52366
52451
|
let width = this.getColsWidth(startCol, endCol);
|
|
52367
|
-
if (isFrozenStartCell
|
|
52452
|
+
if (isFrozenStartCell?.col) {
|
|
52368
52453
|
const scrollLeft = this.scrollLeft;
|
|
52369
52454
|
absoluteLeft += scrollLeft;
|
|
52370
|
-
if (!isFrozenEndCell
|
|
52455
|
+
if (!isFrozenEndCell?.col) {
|
|
52371
52456
|
width -= scrollLeft;
|
|
52372
52457
|
width = Math.max(width, this.getColsWidth(startCol, this.frozenColCount - 1));
|
|
52373
52458
|
}
|
|
52374
52459
|
}
|
|
52375
|
-
|
|
52460
|
+
const absoluteTop = this.getRowsHeight(0, startRow - 1);
|
|
52376
52461
|
let height = this.getRowsHeight(startRow, endRow);
|
|
52377
|
-
if (isFrozenStartCell
|
|
52462
|
+
if (isFrozenStartCell?.row) {
|
|
52378
52463
|
const scrollTop = this.scrollTop;
|
|
52379
|
-
|
|
52380
|
-
if (!isFrozenEndCell || !isFrozenEndCell.row) {
|
|
52464
|
+
if (!isFrozenEndCell?.row) {
|
|
52381
52465
|
height -= scrollTop;
|
|
52382
52466
|
height = Math.max(height, this.getRowsHeight(startRow, this.frozenRowCount - 1));
|
|
52383
52467
|
}
|
|
@@ -55795,14 +55879,17 @@
|
|
|
55795
55879
|
return;
|
|
55796
55880
|
}
|
|
55797
55881
|
const target = e?.target;
|
|
55798
|
-
|
|
55799
|
-
|
|
55882
|
+
const { editingEditor: editor } = this;
|
|
55883
|
+
if (target) {
|
|
55884
|
+
if (editor.targetIsOnEditor) {
|
|
55885
|
+
if (editor.targetIsOnEditor(target)) {
|
|
55886
|
+
return;
|
|
55887
|
+
}
|
|
55888
|
+
}
|
|
55889
|
+
else if (!editor.isEditorElement || editor.isEditorElement(target)) {
|
|
55800
55890
|
return;
|
|
55801
55891
|
}
|
|
55802
55892
|
}
|
|
55803
|
-
else if (!this.editingEditor.isEditorElement || (target && this.editingEditor.isEditorElement?.(target))) {
|
|
55804
|
-
return;
|
|
55805
|
-
}
|
|
55806
55893
|
if (!this.editingEditor.getValue) ;
|
|
55807
55894
|
const changedValue = this.editingEditor.getValue?.();
|
|
55808
55895
|
this.table.changeCellValue(this.editCell.col, this.editCell.row, changedValue);
|
|
@@ -56391,7 +56478,7 @@
|
|
|
56391
56478
|
else {
|
|
56392
56479
|
hd = this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
|
|
56393
56480
|
}
|
|
56394
|
-
if (hd
|
|
56481
|
+
if (hd.define.sort !== false) {
|
|
56395
56482
|
this.dataSource.sort(hd.field, order, sortFunc);
|
|
56396
56483
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
56397
56484
|
this.scenegraph.sortCell();
|
|
@@ -56451,7 +56538,9 @@
|
|
|
56451
56538
|
else {
|
|
56452
56539
|
hd = this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
|
|
56453
56540
|
}
|
|
56454
|
-
|
|
56541
|
+
if (hd.define.sort !== false) {
|
|
56542
|
+
this.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
|
|
56543
|
+
}
|
|
56455
56544
|
}
|
|
56456
56545
|
}
|
|
56457
56546
|
this.refreshRowColCount();
|
|
@@ -57076,70 +57165,9 @@
|
|
|
57076
57165
|
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeys.valueArr();
|
|
57077
57166
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys);
|
|
57078
57167
|
this.resetRowHeaderLevelCount();
|
|
57079
|
-
|
|
57080
|
-
this.columnHeaderObjs = this._addHeaders(this._columnHeaderCellIds, 0, this.columnDimensionTree.tree.children, []);
|
|
57081
|
-
}
|
|
57082
|
-
if (this.columnHeaderTitle) {
|
|
57083
|
-
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
57084
|
-
const id = ++this.sharedVar.seqId;
|
|
57085
|
-
const firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
|
|
57086
|
-
this._columnHeaderCellIds.unshift(firstRowIds);
|
|
57087
|
-
const cell = {
|
|
57088
|
-
id,
|
|
57089
|
-
title: typeof this.columnHeaderTitle.title === 'string'
|
|
57090
|
-
? this.columnHeaderTitle.title
|
|
57091
|
-
: this.columnsDefine.reduce((title, value) => {
|
|
57092
|
-
if (typeof value === 'string') {
|
|
57093
|
-
return title;
|
|
57094
|
-
}
|
|
57095
|
-
return title + (title ? `/${value.title}` : `${value.title}`);
|
|
57096
|
-
}, ''),
|
|
57097
|
-
field: undefined,
|
|
57098
|
-
headerType: this.columnHeaderTitle.headerType ?? 'text',
|
|
57099
|
-
style: this.columnHeaderTitle.headerStyle,
|
|
57100
|
-
define: {
|
|
57101
|
-
id,
|
|
57102
|
-
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
57103
|
-
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
57104
|
-
}
|
|
57105
|
-
};
|
|
57106
|
-
this.columnHeaderObjs.push(cell);
|
|
57107
|
-
this._headerObjects[id] = cell;
|
|
57108
|
-
}
|
|
57168
|
+
this._generateColHeaderIds();
|
|
57109
57169
|
this.colIndex = 0;
|
|
57110
|
-
|
|
57111
|
-
this.rowHeaderObjs =
|
|
57112
|
-
this.rowHierarchyType === 'tree'
|
|
57113
|
-
? this._addHeadersForTreeMode(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, true, this.rowsDefine)
|
|
57114
|
-
: this._addHeaders(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, []);
|
|
57115
|
-
}
|
|
57116
|
-
if (this.rowHeaderTitle) {
|
|
57117
|
-
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
57118
|
-
const id = ++this.sharedVar.seqId;
|
|
57119
|
-
const firstColIds = Array(this._rowHeaderCellIds_FULL[0]?.length ?? this.rowDimensionTree.tree.size).fill(id);
|
|
57120
|
-
this._rowHeaderCellIds_FULL.unshift(firstColIds);
|
|
57121
|
-
const cell = {
|
|
57122
|
-
id,
|
|
57123
|
-
title: typeof this.rowHeaderTitle.title === 'string'
|
|
57124
|
-
? this.rowHeaderTitle.title
|
|
57125
|
-
: this.rowsDefine.reduce((title, value) => {
|
|
57126
|
-
if (typeof value === 'string') {
|
|
57127
|
-
return title;
|
|
57128
|
-
}
|
|
57129
|
-
return title + (title ? `/${value.title}` : `${value.title}`);
|
|
57130
|
-
}, ''),
|
|
57131
|
-
field: undefined,
|
|
57132
|
-
headerType: this.rowHeaderTitle.headerType ?? 'text',
|
|
57133
|
-
style: this.rowHeaderTitle.headerStyle,
|
|
57134
|
-
define: {
|
|
57135
|
-
id,
|
|
57136
|
-
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
57137
|
-
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
57138
|
-
}
|
|
57139
|
-
};
|
|
57140
|
-
this.rowHeaderObjs.push(cell);
|
|
57141
|
-
this._headerObjects[id] = cell;
|
|
57142
|
-
}
|
|
57170
|
+
this._generateRowHeaderIds();
|
|
57143
57171
|
if (this._table.isPivotChart()) {
|
|
57144
57172
|
this.hasTwoIndicatorAxes = this._indicators.some(indicatorObject => {
|
|
57145
57173
|
if (indicatorObject.chartSpec &&
|
|
@@ -57243,6 +57271,73 @@
|
|
|
57243
57271
|
}
|
|
57244
57272
|
this.setColumnWidths();
|
|
57245
57273
|
}
|
|
57274
|
+
_generateColHeaderIds() {
|
|
57275
|
+
if (this.columnDimensionTree.tree.children?.length >= 1) {
|
|
57276
|
+
this.columnHeaderObjs = this._addHeaders(this._columnHeaderCellIds, 0, this.columnDimensionTree.tree.children, []);
|
|
57277
|
+
}
|
|
57278
|
+
if (this.columnHeaderTitle) {
|
|
57279
|
+
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
57280
|
+
const id = ++this.sharedVar.seqId;
|
|
57281
|
+
const firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
|
|
57282
|
+
this._columnHeaderCellIds.unshift(firstRowIds);
|
|
57283
|
+
const cell = {
|
|
57284
|
+
id,
|
|
57285
|
+
title: typeof this.columnHeaderTitle.title === 'string'
|
|
57286
|
+
? this.columnHeaderTitle.title
|
|
57287
|
+
: this.columnsDefine.reduce((title, value) => {
|
|
57288
|
+
if (typeof value === 'string') {
|
|
57289
|
+
return title;
|
|
57290
|
+
}
|
|
57291
|
+
return title + (title ? `/${value.title}` : `${value.title}`);
|
|
57292
|
+
}, ''),
|
|
57293
|
+
field: undefined,
|
|
57294
|
+
headerType: this.columnHeaderTitle.headerType ?? 'text',
|
|
57295
|
+
style: this.columnHeaderTitle.headerStyle,
|
|
57296
|
+
define: {
|
|
57297
|
+
id,
|
|
57298
|
+
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
57299
|
+
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
57300
|
+
}
|
|
57301
|
+
};
|
|
57302
|
+
this.columnHeaderObjs.push(cell);
|
|
57303
|
+
this._headerObjects[id] = cell;
|
|
57304
|
+
}
|
|
57305
|
+
}
|
|
57306
|
+
_generateRowHeaderIds() {
|
|
57307
|
+
if (this.rowDimensionTree.tree.children?.length >= 1) {
|
|
57308
|
+
this.rowHeaderObjs =
|
|
57309
|
+
this.rowHierarchyType === 'tree'
|
|
57310
|
+
? this._addHeadersForTreeMode(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, true, this.rowsDefine)
|
|
57311
|
+
: this._addHeaders(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, []);
|
|
57312
|
+
}
|
|
57313
|
+
if (this.rowHeaderTitle) {
|
|
57314
|
+
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
57315
|
+
const id = ++this.sharedVar.seqId;
|
|
57316
|
+
const firstColIds = Array(this._rowHeaderCellIds_FULL[0]?.length ?? this.rowDimensionTree.tree.size).fill(id);
|
|
57317
|
+
this._rowHeaderCellIds_FULL.unshift(firstColIds);
|
|
57318
|
+
const cell = {
|
|
57319
|
+
id,
|
|
57320
|
+
title: typeof this.rowHeaderTitle.title === 'string'
|
|
57321
|
+
? this.rowHeaderTitle.title
|
|
57322
|
+
: this.rowsDefine.reduce((title, value) => {
|
|
57323
|
+
if (typeof value === 'string') {
|
|
57324
|
+
return title;
|
|
57325
|
+
}
|
|
57326
|
+
return title + (title ? `/${value.title}` : `${value.title}`);
|
|
57327
|
+
}, ''),
|
|
57328
|
+
field: undefined,
|
|
57329
|
+
headerType: this.rowHeaderTitle.headerType ?? 'text',
|
|
57330
|
+
style: this.rowHeaderTitle.headerStyle,
|
|
57331
|
+
define: {
|
|
57332
|
+
id,
|
|
57333
|
+
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
57334
|
+
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
57335
|
+
}
|
|
57336
|
+
};
|
|
57337
|
+
this.rowHeaderObjs.push(cell);
|
|
57338
|
+
this._headerObjects[id] = cell;
|
|
57339
|
+
}
|
|
57340
|
+
}
|
|
57246
57341
|
_addHeaders(_headerCellIds, row, header, roots) {
|
|
57247
57342
|
const _this = this;
|
|
57248
57343
|
function _newRow(row) {
|
|
@@ -59101,7 +59196,24 @@
|
|
|
59101
59196
|
});
|
|
59102
59197
|
return totalCount;
|
|
59103
59198
|
}
|
|
59104
|
-
|
|
59199
|
+
resetHeaderTree() {
|
|
59200
|
+
this._rowHeaderCellIds_FULL = [];
|
|
59201
|
+
this._columnHeaderCellIds = [];
|
|
59202
|
+
const dataset = this.dataset;
|
|
59203
|
+
this.rowTree = dataset.rowHeaderTree;
|
|
59204
|
+
this.columnTree = dataset.colHeaderTree;
|
|
59205
|
+
this.columnDimensionTree = new DimensionTree(this.columnTree ?? [], this.sharedVar);
|
|
59206
|
+
this.rowDimensionTree = new DimensionTree(this.rowTree ?? [], this.sharedVar, this.rowHierarchyType, this.rowHierarchyType === 'tree' ? this.rowExpandLevel : undefined);
|
|
59207
|
+
this._generateColHeaderIds();
|
|
59208
|
+
this.colIndex = 0;
|
|
59209
|
+
this._generateRowHeaderIds();
|
|
59210
|
+
this.resetColumnHeaderLevelCount();
|
|
59211
|
+
this._rowHeaderCellIds_FULL = transpose(this._rowHeaderCellIds_FULL);
|
|
59212
|
+
this._headerObjectMap = this._headerObjects.reduce((o, e) => {
|
|
59213
|
+
o[e.id] = e;
|
|
59214
|
+
return o;
|
|
59215
|
+
}, {});
|
|
59216
|
+
this.setPagination(this.pagination);
|
|
59105
59217
|
}
|
|
59106
59218
|
}
|
|
59107
59219
|
function scaleWholeRangeSize(count, bandwidth, paddingInner, paddingOuter) {
|
|
@@ -59721,14 +59833,14 @@
|
|
|
59721
59833
|
this.needSplitPositiveAndNegative = needSplitPositiveAndNegative ?? false;
|
|
59722
59834
|
this.rowsIsTotal = new Array(this.rows?.length ?? 0).fill(false);
|
|
59723
59835
|
this.colsIsTotal = new Array(this.columns?.length ?? 0).fill(false);
|
|
59724
|
-
if (this.totals?.row
|
|
59836
|
+
if (this.totals?.row && this.totals.row.showSubTotals !== false) {
|
|
59725
59837
|
for (let i = 0, len = this.totals?.row?.subTotalsDimensions?.length; i < len; i++) {
|
|
59726
59838
|
const dimension = this.totals.row.subTotalsDimensions[i];
|
|
59727
59839
|
const dimensionIndex = this.rows.indexOf(dimension);
|
|
59728
59840
|
this.rowsIsTotal[dimensionIndex] = true;
|
|
59729
59841
|
}
|
|
59730
59842
|
}
|
|
59731
|
-
if (this.totals?.column
|
|
59843
|
+
if (this.totals?.column && this.totals.column.showSubTotals !== false) {
|
|
59732
59844
|
for (let i = 0, len = this.totals?.column?.subTotalsDimensions?.length; i < len; i++) {
|
|
59733
59845
|
const dimension = this.totals.column.subTotalsDimensions[i];
|
|
59734
59846
|
const dimensionIndex = this.columns.indexOf(dimension);
|
|
@@ -59971,8 +60083,7 @@
|
|
|
59971
60083
|
isToTalRecord = true;
|
|
59972
60084
|
break;
|
|
59973
60085
|
}
|
|
59974
|
-
else if (this.dataConfig?.totals?.row?.
|
|
59975
|
-
this.dataConfig?.totals?.row?.subTotalsDimensions.indexOf(this.rows[l - 1]) >= 0) {
|
|
60086
|
+
else if (this.dataConfig?.totals?.row?.subTotalsDimensions.indexOf(this.rows[l - 1]) >= 0) {
|
|
59976
60087
|
if (this.rowHierarchyType === 'grid') {
|
|
59977
60088
|
rowKey.push(this.rowSubTotalLabel);
|
|
59978
60089
|
}
|
|
@@ -59996,8 +60107,7 @@
|
|
|
59996
60107
|
isToTalRecord = true;
|
|
59997
60108
|
break;
|
|
59998
60109
|
}
|
|
59999
|
-
else if (this.dataConfig?.totals?.column?.
|
|
60000
|
-
this.dataConfig?.totals?.column?.subTotalsDimensions.indexOf(this.columns[n - 1]) >= 0) {
|
|
60110
|
+
else if (this.dataConfig?.totals?.column?.subTotalsDimensions.indexOf(this.columns[n - 1]) >= 0) {
|
|
60001
60111
|
colKey.push(this.colSubTotalLabel);
|
|
60002
60112
|
isToTalRecord = true;
|
|
60003
60113
|
break;
|
|
@@ -60103,6 +60213,19 @@
|
|
|
60103
60213
|
this.sorted = false;
|
|
60104
60214
|
this.sortRules = sortRules;
|
|
60105
60215
|
this.sortKeys();
|
|
60216
|
+
if (!this.customRowTree) {
|
|
60217
|
+
if (this.rowHierarchyType === 'tree') {
|
|
60218
|
+
this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows, this.indicatorsAsCol ? undefined : this.indicators, this.totals?.row?.showGrandTotals ||
|
|
60219
|
+
(!this.indicatorsAsCol && this.columns.length === 0) ||
|
|
60220
|
+
(this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel);
|
|
60221
|
+
}
|
|
60222
|
+
else {
|
|
60223
|
+
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows, this.indicatorsAsCol ? undefined : this.indicators, this.rowsIsTotal, this.totals?.row?.showGrandTotals || (this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.rowSubTotalLabel, this.totals?.row?.showGrandTotalsOnTop ?? false, this.totals?.row?.showSubTotalsOnTop ?? false);
|
|
60224
|
+
}
|
|
60225
|
+
}
|
|
60226
|
+
if (!this.customColTree) {
|
|
60227
|
+
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns, this.indicatorsAsCol ? this.indicators : undefined, this.colsIsTotal, this.totals?.column?.showGrandTotals || (!this.indicatorsAsCol && this.columns.length === 0), this.colGrandTotalLabel, this.colSubTotalLabel, this.totals?.column?.showGrandTotalsOnLeft ?? false, this.totals?.column?.showSubTotalsOnLeft ?? false);
|
|
60228
|
+
}
|
|
60106
60229
|
}
|
|
60107
60230
|
updateFilterRules(filterRules, isResetTree = false) {
|
|
60108
60231
|
this.filterRules = filterRules;
|
|
@@ -60271,9 +60394,9 @@
|
|
|
60271
60394
|
let bChanged = b;
|
|
60272
60395
|
if (sorter.fieldIndex < fieldArr.length - 1) {
|
|
60273
60396
|
aChanged = a.slice(0, sorter.fieldIndex + 1);
|
|
60274
|
-
aChanged.push(isRow ? that.
|
|
60397
|
+
aChanged.push(isRow ? that.rowSubTotalLabel : that.colSubTotalLabel);
|
|
60275
60398
|
bChanged = b.slice(0, sorter.fieldIndex + 1);
|
|
60276
|
-
bChanged.push(isRow ? that.
|
|
60399
|
+
bChanged.push(isRow ? that.rowSubTotalLabel : that.colSubTotalLabel);
|
|
60277
60400
|
}
|
|
60278
60401
|
comparison = sorter.func(aChanged, bChanged);
|
|
60279
60402
|
}
|
|
@@ -60323,8 +60446,8 @@
|
|
|
60323
60446
|
}
|
|
60324
60447
|
totalStatistics() {
|
|
60325
60448
|
const that = this;
|
|
60326
|
-
if (
|
|
60327
|
-
|
|
60449
|
+
if (that?.totals?.column?.subTotalsDimensions?.length >= 1 ||
|
|
60450
|
+
that?.totals?.row?.subTotalsDimensions?.length >= 1 ||
|
|
60328
60451
|
that?.totals?.column?.showGrandTotals ||
|
|
60329
60452
|
that?.totals?.row?.showGrandTotals) {
|
|
60330
60453
|
const rowTotalKeys = [];
|
|
@@ -60339,7 +60462,7 @@
|
|
|
60339
60462
|
const dimensionIndex = that.columns.indexOf(dimension);
|
|
60340
60463
|
if (dimensionIndex >= 0) {
|
|
60341
60464
|
const colTotalKey = colKey.slice(0, dimensionIndex + 1);
|
|
60342
|
-
colTotalKey.push(that.
|
|
60465
|
+
colTotalKey.push(that.colSubTotalLabel);
|
|
60343
60466
|
const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
|
|
60344
60467
|
if (this.totalRecordsTree?.[flatRowKey]?.[flatColTotalKey]) {
|
|
60345
60468
|
this.tree[flatRowKey][flatColTotalKey] = this.totalRecordsTree?.[flatRowKey]?.[flatColTotalKey];
|
|
@@ -60396,7 +60519,7 @@
|
|
|
60396
60519
|
if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
|
|
60397
60520
|
const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
|
|
60398
60521
|
if (this.rowHierarchyType === 'grid') {
|
|
60399
|
-
rowTotalKey.push(that.
|
|
60522
|
+
rowTotalKey.push(that.rowSubTotalLabel);
|
|
60400
60523
|
}
|
|
60401
60524
|
const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
|
|
60402
60525
|
if (!this.tree[flatRowTotalKey]) {
|
|
@@ -61216,6 +61339,7 @@
|
|
|
61216
61339
|
updateSortRules(sortRules) {
|
|
61217
61340
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
61218
61341
|
this.dataset.updateSortRules(sortRules);
|
|
61342
|
+
this.internalProps.layoutMap.resetHeaderTree();
|
|
61219
61343
|
this.scenegraph.clearCells();
|
|
61220
61344
|
this.refreshHeader();
|
|
61221
61345
|
this.scenegraph.createSceneGraph();
|
|
@@ -61938,7 +62062,10 @@
|
|
|
61938
62062
|
updateSortRules(sortRules) {
|
|
61939
62063
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
61940
62064
|
this.dataset.updateSortRules(sortRules);
|
|
61941
|
-
this.internalProps.layoutMap.
|
|
62065
|
+
this.internalProps.layoutMap.resetHeaderTree();
|
|
62066
|
+
this.scenegraph.clearCells();
|
|
62067
|
+
this.refreshHeader();
|
|
62068
|
+
this.scenegraph.createSceneGraph();
|
|
61942
62069
|
this.render();
|
|
61943
62070
|
}
|
|
61944
62071
|
updatePivotSortState(pivotSortStateConfig) {
|
|
@@ -62987,7 +63114,7 @@
|
|
|
62987
63114
|
}
|
|
62988
63115
|
|
|
62989
63116
|
registerForVrender();
|
|
62990
|
-
const version = "0.19.
|
|
63117
|
+
const version = "0.19.1";
|
|
62991
63118
|
function getIcons() {
|
|
62992
63119
|
return get$1();
|
|
62993
63120
|
}
|