@visactor/vtable 0.9.3-alpha.2 → 0.9.3-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.
- package/cjs/ListTable.js +3 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +4 -4
- package/cjs/PivotChart.js +18 -17
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +6 -7
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.js +1 -1
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/legend/legend.js +3 -3
- package/cjs/components/legend/legend.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.js +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js +3 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +11 -7
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/components/title/title.js +3 -3
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +1 -1
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -12
- package/cjs/core/BaseTable.js +18 -28
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +4 -4
- package/cjs/dataset/dataset.js +16 -13
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +2 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +28 -21
- package/cjs/event/listener/table-group.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 -0
- package/cjs/layout/chart-helper/get-axis-config.js +18 -9
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +13 -7
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +1 -0
- package/cjs/layout/pivot-layout.js +11 -0
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +6 -6
- package/cjs/scenegraph/graphic/chart.js +16 -2
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +4 -2
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +0 -6
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +2 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +7 -6
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +10 -2
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +1 -7
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +9 -8
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/state.d.ts +2 -1
- package/cjs/state/state.js +8 -6
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme.js +2 -2
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +10 -4
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +6 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +445 -367
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.js +3 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +4 -4
- package/es/PivotChart.js +18 -16
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +6 -6
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.js +1 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/legend/legend.js +3 -3
- package/es/components/legend/legend.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.js +1 -1
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js +3 -1
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +11 -7
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/components/title/title.js +3 -3
- package/es/components/title/title.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +1 -1
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -12
- package/es/core/BaseTable.js +18 -28
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.d.ts +4 -4
- package/es/dataset/dataset.js +15 -12
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +2 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +28 -21
- package/es/event/listener/table-group.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 -0
- package/es/layout/chart-helper/get-axis-config.js +16 -7
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +10 -6
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +1 -0
- package/es/layout/pivot-layout.js +11 -0
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +6 -6
- package/es/scenegraph/graphic/chart.js +16 -2
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +4 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +0 -6
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +2 -1
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +7 -6
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +10 -2
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +1 -7
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +9 -8
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/state.d.ts +2 -1
- package/es/state/state.js +8 -6
- package/es/state/state.js.map +1 -1
- package/es/themes/theme.js +2 -2
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +10 -4
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +6 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +10 -10
package/dist/vtable.js
CHANGED
|
@@ -4237,7 +4237,7 @@
|
|
|
4237
4237
|
if (!superTheme.rightFrozenStyle || !obj.rightFrozenStyle) {
|
|
4238
4238
|
return this._rightFrozen;
|
|
4239
4239
|
}
|
|
4240
|
-
const header = ingoreNoneValueMerge({}, this.defaultStyle, superTheme.rightFrozenStyle, obj.rightFrozenStyle);
|
|
4240
|
+
const header = ingoreNoneValueMerge({}, this.defaultStyle, this.rowHeaderStyle, superTheme.rightFrozenStyle, obj.rightFrozenStyle);
|
|
4241
4241
|
this._rightFrozen = this.getStyle(header);
|
|
4242
4242
|
}
|
|
4243
4243
|
return this._rightFrozen;
|
|
@@ -4248,7 +4248,7 @@
|
|
|
4248
4248
|
if (!superTheme.bottomFrozenStyle || !obj.bottomFrozenStyle) {
|
|
4249
4249
|
return this._bottomFrozen;
|
|
4250
4250
|
}
|
|
4251
|
-
const header = ingoreNoneValueMerge({}, this.defaultStyle, superTheme.bottomFrozenStyle, obj.bottomFrozenStyle);
|
|
4251
|
+
const header = ingoreNoneValueMerge({}, this.defaultStyle, this.headerStyle, superTheme.bottomFrozenStyle, obj.bottomFrozenStyle);
|
|
4252
4252
|
this._bottomFrozen = this.getStyle(header);
|
|
4253
4253
|
}
|
|
4254
4254
|
return this._bottomFrozen;
|
|
@@ -36525,7 +36525,7 @@
|
|
|
36525
36525
|
this.table = table;
|
|
36526
36526
|
this.width = width;
|
|
36527
36527
|
this.height = height;
|
|
36528
|
-
this.option = merge$2({},
|
|
36528
|
+
this.option = merge$2({}, commonAxis, option);
|
|
36529
36529
|
this.orient = option.orient ?? 'left';
|
|
36530
36530
|
this.visible = option.visible ?? true;
|
|
36531
36531
|
this.type = option.type ?? 'band';
|
|
@@ -39557,7 +39557,6 @@
|
|
|
39557
39557
|
const absoluteLeftIcons = [];
|
|
39558
39558
|
const absoluteRightIcons = [];
|
|
39559
39559
|
let contentWidth;
|
|
39560
|
-
let contentHeight;
|
|
39561
39560
|
let leftIconWidth = 0;
|
|
39562
39561
|
let leftIconHeight = 0;
|
|
39563
39562
|
let rightIconWidth = 0;
|
|
@@ -39582,7 +39581,7 @@
|
|
|
39582
39581
|
wrapText.name = 'text';
|
|
39583
39582
|
cellGroup.appendChild(wrapText);
|
|
39584
39583
|
contentWidth = wrapText.AABBBounds.width();
|
|
39585
|
-
|
|
39584
|
+
wrapText.AABBBounds.height();
|
|
39586
39585
|
}
|
|
39587
39586
|
}
|
|
39588
39587
|
else {
|
|
@@ -39721,7 +39720,7 @@
|
|
|
39721
39720
|
cellGroup.appendChild(cellContent);
|
|
39722
39721
|
cellContent.layout();
|
|
39723
39722
|
contentWidth = cellContent.AABBBounds.width();
|
|
39724
|
-
|
|
39723
|
+
cellContent.AABBBounds.height();
|
|
39725
39724
|
}
|
|
39726
39725
|
else {
|
|
39727
39726
|
if (cellGroup.firstChild) {
|
|
@@ -39731,15 +39730,13 @@
|
|
|
39731
39730
|
cellGroup.appendChild(textMark);
|
|
39732
39731
|
}
|
|
39733
39732
|
contentWidth = textMark.AABBBounds.width();
|
|
39734
|
-
|
|
39733
|
+
textMark.AABBBounds.height();
|
|
39735
39734
|
}
|
|
39736
39735
|
}
|
|
39737
39736
|
const width = autoColWidth
|
|
39738
39737
|
? leftIconWidth + contentWidth + rightIconWidth
|
|
39739
39738
|
: cellWidth - (padding[1] + padding[3]);
|
|
39740
|
-
const height =
|
|
39741
|
-
? Math.max(leftIconHeight, contentHeight, rightIconHeight)
|
|
39742
|
-
: cellHeight - (padding[0] + padding[2]);
|
|
39739
|
+
const height = cellHeight - (padding[0] + padding[2]);
|
|
39743
39740
|
cellGroup.forEachChildren((child) => {
|
|
39744
39741
|
if (child.role === 'icon-left') {
|
|
39745
39742
|
child.setAttribute('x', child.attribute.x + padding[3]);
|
|
@@ -41646,7 +41643,7 @@
|
|
|
41646
41643
|
renderCanvas: params.canvas,
|
|
41647
41644
|
mode: 'desktop-browser',
|
|
41648
41645
|
canvasControled: false,
|
|
41649
|
-
viewBox:
|
|
41646
|
+
viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },
|
|
41650
41647
|
interactive: false,
|
|
41651
41648
|
animation: false
|
|
41652
41649
|
});
|
|
@@ -41658,7 +41655,7 @@
|
|
|
41658
41655
|
}
|
|
41659
41656
|
activate(table) {
|
|
41660
41657
|
this.active = true;
|
|
41661
|
-
const { x1, y1, x2, y2 } = this.
|
|
41658
|
+
const { x1, y1, x2, y2 } = this.getViewBox();
|
|
41662
41659
|
const tableBound = table.scenegraph.tableGroup.globalAABBBounds;
|
|
41663
41660
|
const bodyBound = new Bounds();
|
|
41664
41661
|
bodyBound.x1 = tableBound.x1 + table.getFrozenColsWidth();
|
|
@@ -41726,6 +41723,17 @@
|
|
|
41726
41723
|
updateData(data) {
|
|
41727
41724
|
this.attribute.data = data;
|
|
41728
41725
|
}
|
|
41726
|
+
getViewBox() {
|
|
41727
|
+
const cellGroup = this.parent;
|
|
41728
|
+
const padding = this.attribute.cellPadding;
|
|
41729
|
+
const table = this.stage.table;
|
|
41730
|
+
return {
|
|
41731
|
+
x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
|
|
41732
|
+
x2: Math.ceil(cellGroup.globalAABBBounds.x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft),
|
|
41733
|
+
y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
|
|
41734
|
+
y2: Math.ceil(cellGroup.globalAABBBounds.y1 + cellGroup.attribute.height - padding[2] + table.scrollTop)
|
|
41735
|
+
};
|
|
41736
|
+
}
|
|
41729
41737
|
}
|
|
41730
41738
|
|
|
41731
41739
|
const ChartRender = Symbol.for('ChartRender');
|
|
@@ -41734,7 +41742,8 @@
|
|
|
41734
41742
|
numberType = CHART_NUMBER_TYPE;
|
|
41735
41743
|
drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
41736
41744
|
const groupAttribute = getTheme(chart, params?.theme).group;
|
|
41737
|
-
const { dataId, data
|
|
41745
|
+
const { dataId, data } = chart.attribute;
|
|
41746
|
+
const viewBox = chart.getViewBox();
|
|
41738
41747
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
41739
41748
|
const { chartInstance, active, cacheCanvas, activeChartInstance } = chart;
|
|
41740
41749
|
if (!active && cacheCanvas) {
|
|
@@ -42444,16 +42453,17 @@
|
|
|
42444
42453
|
}
|
|
42445
42454
|
if (table.widthMode === 'adaptive') {
|
|
42446
42455
|
table._clearColRangeWidthsMap();
|
|
42447
|
-
const totalDrawWidth = table.tableNoFrameWidth;
|
|
42456
|
+
const totalDrawWidth = table.tableNoFrameWidth - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();
|
|
42448
42457
|
let actualWidth = 0;
|
|
42449
|
-
for (let col =
|
|
42458
|
+
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
42450
42459
|
actualWidth += table.getColWidth(col);
|
|
42451
42460
|
}
|
|
42452
42461
|
const factor = totalDrawWidth / actualWidth;
|
|
42453
|
-
for (let col =
|
|
42462
|
+
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
42454
42463
|
let colWidth;
|
|
42455
|
-
if (col === table.colCount - 1) {
|
|
42456
|
-
colWidth =
|
|
42464
|
+
if (col === table.colCount - table.rightFrozenColCount - 1) {
|
|
42465
|
+
colWidth =
|
|
42466
|
+
totalDrawWidth - table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2);
|
|
42457
42467
|
}
|
|
42458
42468
|
else {
|
|
42459
42469
|
colWidth = Math.round(table.getColWidth(col) * factor);
|
|
@@ -42468,14 +42478,14 @@
|
|
|
42468
42478
|
let actualHeaderWidth = 0;
|
|
42469
42479
|
for (let col = 0; col < table.colCount; col++) {
|
|
42470
42480
|
const colWidth = table.getColWidth(col);
|
|
42471
|
-
if (col < table.frozenColCount) {
|
|
42481
|
+
if (col < table.frozenColCount || col >= table.colCount - table.rightFrozenColCount) {
|
|
42472
42482
|
actualHeaderWidth += colWidth;
|
|
42473
42483
|
}
|
|
42474
42484
|
actualWidth += colWidth;
|
|
42475
42485
|
}
|
|
42476
42486
|
if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {
|
|
42477
42487
|
const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);
|
|
42478
|
-
for (let col = table.frozenColCount; col < table.colCount; col++) {
|
|
42488
|
+
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
42479
42489
|
table.setColWidth(col, table.getColWidth(col) * factor, false, true);
|
|
42480
42490
|
}
|
|
42481
42491
|
}
|
|
@@ -42699,7 +42709,7 @@
|
|
|
42699
42709
|
});
|
|
42700
42710
|
function computeRowsHeight(table, rowStart, rowEnd) {
|
|
42701
42711
|
const time = typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
42702
|
-
if (table.heightMode === 'autoHeight') {
|
|
42712
|
+
if (table.heightMode === 'autoHeight' || table.heightMode === 'adaptive') {
|
|
42703
42713
|
rowStart = rowStart ?? 0;
|
|
42704
42714
|
rowEnd = rowEnd ?? table.rowCount - 1;
|
|
42705
42715
|
if (rowStart === 0 && rowEnd === table.rowCount - 1) {
|
|
@@ -42740,7 +42750,7 @@
|
|
|
42740
42750
|
}
|
|
42741
42751
|
}
|
|
42742
42752
|
}
|
|
42743
|
-
|
|
42753
|
+
if (table.heightMode === 'adaptive') {
|
|
42744
42754
|
table._clearRowRangeHeightsMap();
|
|
42745
42755
|
const totalDrawHeight = table.tableNoFrameHeight - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
42746
42756
|
let actualHeight = 0;
|
|
@@ -42764,6 +42774,17 @@
|
|
|
42764
42774
|
}
|
|
42765
42775
|
function computeRowHeight(row, startCol, endCol, table) {
|
|
42766
42776
|
let maxHeight = 0;
|
|
42777
|
+
if (table.isPivotChart() && row >= table.columnHeaderLevelCount) {
|
|
42778
|
+
if (table.internalProps.layoutMap.indicatorsAsCol) {
|
|
42779
|
+
const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
|
|
42780
|
+
if (optimunHeight > 0) {
|
|
42781
|
+
return optimunHeight;
|
|
42782
|
+
}
|
|
42783
|
+
}
|
|
42784
|
+
else {
|
|
42785
|
+
return table.getRowHeight(row);
|
|
42786
|
+
}
|
|
42787
|
+
}
|
|
42767
42788
|
for (let col = startCol; col <= endCol; col++) {
|
|
42768
42789
|
const customHeight = computeCustomRenderHeight(col, row, table);
|
|
42769
42790
|
if (typeof customHeight === 'number') {
|
|
@@ -42974,12 +42995,6 @@
|
|
|
42974
42995
|
dataId,
|
|
42975
42996
|
data: table.getCellValue(col, row),
|
|
42976
42997
|
cellPadding: padding,
|
|
42977
|
-
viewBox: {
|
|
42978
|
-
x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
|
|
42979
|
-
x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width - padding[1] + table.scrollLeft),
|
|
42980
|
-
y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
|
|
42981
|
-
y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height - padding[2] + table.scrollTop)
|
|
42982
|
-
},
|
|
42983
42998
|
axes: table.internalProps.layoutMap.getChartAxes(col, row)
|
|
42984
42999
|
});
|
|
42985
43000
|
cellGroup.appendChild(chartGroup);
|
|
@@ -42999,6 +43014,7 @@
|
|
|
42999
43014
|
if (cellTheme?.text?.textBaseline) {
|
|
43000
43015
|
textBaseline = cellTheme?.text?.textBaseline;
|
|
43001
43016
|
}
|
|
43017
|
+
const autoRowHeight = table.heightMode === 'autoHeight';
|
|
43002
43018
|
const autoColWidth = colWidth === 'auto';
|
|
43003
43019
|
const autoWrapText = headerStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
43004
43020
|
const lineClamp = headerStyle.lineClamp;
|
|
@@ -43029,7 +43045,7 @@
|
|
|
43029
43045
|
if (mayHaveIcon) {
|
|
43030
43046
|
icons = table.getCellIcons(col, row);
|
|
43031
43047
|
}
|
|
43032
|
-
createCellContent(cellGroup, icons, textStr, padding, autoColWidth,
|
|
43048
|
+
createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, typeof lineClamp === 'number' ? lineClamp : undefined, cellWidth, cellHeight, textAlign, textBaseline, table, cellTheme);
|
|
43033
43049
|
if (cellTheme?._vtable?.marked) {
|
|
43034
43050
|
const mark = createArc({
|
|
43035
43051
|
x: cellGroup.attribute.width,
|
|
@@ -43250,7 +43266,12 @@
|
|
|
43250
43266
|
const dataValue = table.getCellOriginValue(col, row);
|
|
43251
43267
|
cellGroup = createCellGroup(table, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, false, null, true, cellTheme);
|
|
43252
43268
|
const progressBarGroup = createProgressBarCell(define, style, colWidth, value, dataValue, col, row, padding, table);
|
|
43253
|
-
|
|
43269
|
+
if (cellGroup.firstChild) {
|
|
43270
|
+
cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);
|
|
43271
|
+
}
|
|
43272
|
+
else {
|
|
43273
|
+
cellGroup.appendChild(progressBarGroup);
|
|
43274
|
+
}
|
|
43254
43275
|
}
|
|
43255
43276
|
else if (type === 'sparkline') {
|
|
43256
43277
|
cellGroup = createSparkLineCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme);
|
|
@@ -43259,6 +43280,9 @@
|
|
|
43259
43280
|
}
|
|
43260
43281
|
function updateCell$1(col, row, table, addNew) {
|
|
43261
43282
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
43283
|
+
if (!addNew && oldCellGroup.role === 'empty') {
|
|
43284
|
+
return undefined;
|
|
43285
|
+
}
|
|
43262
43286
|
const type = table.isHeader(col, row)
|
|
43263
43287
|
? table._getHeaderLayoutMap(col, row).headerType
|
|
43264
43288
|
: table.getBodyColumnType(col, row);
|
|
@@ -43998,6 +44022,10 @@
|
|
|
43998
44022
|
cellCache = new Map();
|
|
43999
44023
|
constructor(table) {
|
|
44000
44024
|
this.table = table;
|
|
44025
|
+
if (this.table.isPivotChart()) {
|
|
44026
|
+
this.rowLimit = 100;
|
|
44027
|
+
this.colLimit = 100;
|
|
44028
|
+
}
|
|
44001
44029
|
if (this.table.internalProps.transpose) {
|
|
44002
44030
|
this.mode = 'row';
|
|
44003
44031
|
}
|
|
@@ -44924,12 +44952,6 @@
|
|
|
44924
44952
|
node.cacheCanvas = null;
|
|
44925
44953
|
node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));
|
|
44926
44954
|
node.setAttribute('height', Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2]));
|
|
44927
|
-
node.setAttribute('viewBox', {
|
|
44928
|
-
x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),
|
|
44929
|
-
x2: Math.ceil(cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft),
|
|
44930
|
-
y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),
|
|
44931
|
-
y2: Math.ceil(cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop)
|
|
44932
|
-
});
|
|
44933
44955
|
}
|
|
44934
44956
|
});
|
|
44935
44957
|
});
|
|
@@ -45787,10 +45809,15 @@
|
|
|
45787
45809
|
return;
|
|
45788
45810
|
}
|
|
45789
45811
|
this.updateColWidth(col, width - oldWidth);
|
|
45812
|
+
this.table._clearColRangeWidthsMap(col);
|
|
45790
45813
|
}
|
|
45791
45814
|
setRowHeight(row, height) {
|
|
45792
45815
|
const oldHeight = this.table.getRowHeight(row);
|
|
45816
|
+
if (oldHeight === height) {
|
|
45817
|
+
return;
|
|
45818
|
+
}
|
|
45793
45819
|
this.updateRowHeight(row, height - oldHeight);
|
|
45820
|
+
this.table._clearRowRangeHeightsMap(row);
|
|
45794
45821
|
}
|
|
45795
45822
|
setX(x) {
|
|
45796
45823
|
this.table.scenegraph.proxy.setX(-x);
|
|
@@ -45833,16 +45860,17 @@
|
|
|
45833
45860
|
dealWidthMode() {
|
|
45834
45861
|
const table = this.table;
|
|
45835
45862
|
if (table.widthMode === 'adaptive') {
|
|
45836
|
-
const totalDrawWidth = table.tableNoFrameWidth;
|
|
45863
|
+
const totalDrawWidth = table.tableNoFrameWidth - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();
|
|
45837
45864
|
let actualWidth = 0;
|
|
45838
|
-
for (let col =
|
|
45865
|
+
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
45839
45866
|
actualWidth += table.getColWidth(col);
|
|
45840
45867
|
}
|
|
45841
45868
|
const factor = totalDrawWidth / actualWidth;
|
|
45842
|
-
for (let col =
|
|
45869
|
+
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
45843
45870
|
let colWidth;
|
|
45844
|
-
if (col === table.colCount - 1) {
|
|
45845
|
-
colWidth =
|
|
45871
|
+
if (col === table.colCount - table.rightFrozenColCount - 1) {
|
|
45872
|
+
colWidth =
|
|
45873
|
+
totalDrawWidth - table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2);
|
|
45846
45874
|
}
|
|
45847
45875
|
else {
|
|
45848
45876
|
colWidth = Math.round(table.getColWidth(col) * factor);
|
|
@@ -45856,14 +45884,14 @@
|
|
|
45856
45884
|
let actualHeaderWidth = 0;
|
|
45857
45885
|
for (let col = 0; col < table.colCount; col++) {
|
|
45858
45886
|
const colWidth = table.getColWidth(col);
|
|
45859
|
-
if (col < table.frozenColCount) {
|
|
45887
|
+
if (col < table.frozenColCount || col >= table.colCount - table.rightFrozenColCount) {
|
|
45860
45888
|
actualHeaderWidth += colWidth;
|
|
45861
45889
|
}
|
|
45862
45890
|
actualWidth += colWidth;
|
|
45863
45891
|
}
|
|
45864
45892
|
if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {
|
|
45865
45893
|
const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);
|
|
45866
|
-
for (let col = table.frozenColCount; col < table.colCount; col++) {
|
|
45894
|
+
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
45867
45895
|
this.setColWidth(col, table.getColWidth(col) * factor);
|
|
45868
45896
|
}
|
|
45869
45897
|
}
|
|
@@ -46943,13 +46971,16 @@
|
|
|
46943
46971
|
constructor(table) {
|
|
46944
46972
|
this.table = table;
|
|
46945
46973
|
this.initState();
|
|
46946
|
-
this.setHoverState();
|
|
46947
|
-
this.setSelectState();
|
|
46948
|
-
this.setFrozenState();
|
|
46949
46974
|
this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this);
|
|
46950
46975
|
this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
|
|
46951
46976
|
}
|
|
46952
46977
|
initState() {
|
|
46978
|
+
this._initState();
|
|
46979
|
+
this.setHoverState();
|
|
46980
|
+
this.setSelectState();
|
|
46981
|
+
this.setFrozenState();
|
|
46982
|
+
}
|
|
46983
|
+
_initState() {
|
|
46953
46984
|
this.interactionState = InteractionState.default;
|
|
46954
46985
|
this.select = {
|
|
46955
46986
|
highlightScope: HighlightScope.single,
|
|
@@ -47194,10 +47225,10 @@
|
|
|
47194
47225
|
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
47195
47226
|
this.table.scenegraph.updateNextFrame();
|
|
47196
47227
|
}
|
|
47197
|
-
updateResizeCol(
|
|
47198
|
-
|
|
47199
|
-
|
|
47200
|
-
let detaX =
|
|
47228
|
+
updateResizeCol(xInTable, yInTable) {
|
|
47229
|
+
xInTable = Math.ceil(xInTable);
|
|
47230
|
+
yInTable = Math.ceil(yInTable);
|
|
47231
|
+
let detaX = xInTable - this.columnResize.x;
|
|
47201
47232
|
if (Math.abs(detaX) < 1) {
|
|
47202
47233
|
return;
|
|
47203
47234
|
}
|
|
@@ -47228,8 +47259,8 @@
|
|
|
47228
47259
|
if (this.table.widthMode === 'adaptive' && this.columnResize.col < this.table.colCount - 1) {
|
|
47229
47260
|
this.table.scenegraph.updateColWidth(this.columnResize.col + 1, -detaX);
|
|
47230
47261
|
}
|
|
47231
|
-
this.columnResize.x =
|
|
47232
|
-
this.table.scenegraph.component.updateResizeCol(this.columnResize.col,
|
|
47262
|
+
this.columnResize.x = xInTable;
|
|
47263
|
+
this.table.scenegraph.component.updateResizeCol(this.columnResize.col, yInTable);
|
|
47233
47264
|
if (this.columnResize.col < this.table.frozenColCount &&
|
|
47234
47265
|
!this.table.isPivotTable() &&
|
|
47235
47266
|
!this.table.transpose) {
|
|
@@ -47744,25 +47775,38 @@
|
|
|
47744
47775
|
function bindTableGroupListener(eventManeger) {
|
|
47745
47776
|
const table = eventManeger.table;
|
|
47746
47777
|
const stateManeger = table.stateManeger;
|
|
47747
|
-
|
|
47778
|
+
document.body.addEventListener('pointermove', (e) => {
|
|
47748
47779
|
if (eventManeger.touchSetTimeout) {
|
|
47749
47780
|
clearTimeout(eventManeger.touchSetTimeout);
|
|
47750
47781
|
eventManeger.touchSetTimeout = undefined;
|
|
47751
47782
|
}
|
|
47752
|
-
const
|
|
47783
|
+
const { x, y } = table._getMouseAbstractPoint(e, false);
|
|
47753
47784
|
if (stateManeger.interactionState === InteractionState.scrolling) {
|
|
47754
47785
|
return;
|
|
47755
47786
|
}
|
|
47756
47787
|
if (stateManeger.interactionState === InteractionState.grabing) {
|
|
47757
47788
|
if (stateManeger.isResizeCol()) {
|
|
47758
|
-
eventManeger.dealColumnResize(
|
|
47759
|
-
if (
|
|
47789
|
+
eventManeger.dealColumnResize(x, y);
|
|
47790
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN)) {
|
|
47760
47791
|
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN, {
|
|
47761
47792
|
col: table.stateManeger.columnResize.col,
|
|
47762
47793
|
colWidth: table.getColWidth(table.stateManeger.columnResize.col)
|
|
47763
47794
|
});
|
|
47764
47795
|
}
|
|
47765
47796
|
}
|
|
47797
|
+
}
|
|
47798
|
+
});
|
|
47799
|
+
table.scenegraph.tableGroup.addEventListener('pointermove', (e) => {
|
|
47800
|
+
if (eventManeger.touchSetTimeout) {
|
|
47801
|
+
clearTimeout(eventManeger.touchSetTimeout);
|
|
47802
|
+
eventManeger.touchSetTimeout = undefined;
|
|
47803
|
+
}
|
|
47804
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
47805
|
+
if (stateManeger.interactionState === InteractionState.scrolling) {
|
|
47806
|
+
return;
|
|
47807
|
+
}
|
|
47808
|
+
if (stateManeger.interactionState === InteractionState.grabing) {
|
|
47809
|
+
if (stateManeger.isResizeCol()) ;
|
|
47766
47810
|
else if (stateManeger.isMoveCol()) {
|
|
47767
47811
|
eventManeger.dealColumnMover(eventArgsSet);
|
|
47768
47812
|
}
|
|
@@ -47771,7 +47815,7 @@
|
|
|
47771
47815
|
}
|
|
47772
47816
|
return;
|
|
47773
47817
|
}
|
|
47774
|
-
if (eventManeger.checkColumnResize(eventArgsSet)) {
|
|
47818
|
+
if (stateManeger.isResizeCol() || eventManeger.checkColumnResize(eventArgsSet)) {
|
|
47775
47819
|
stateManeger.updateCursor('col-resize');
|
|
47776
47820
|
}
|
|
47777
47821
|
else {
|
|
@@ -47875,9 +47919,11 @@
|
|
|
47875
47919
|
}
|
|
47876
47920
|
});
|
|
47877
47921
|
table.scenegraph.tableGroup.addEventListener('pointerleave', (e) => {
|
|
47878
|
-
stateManeger.
|
|
47922
|
+
if (!stateManeger.isResizeCol()) {
|
|
47923
|
+
stateManeger.updateInteractionState(InteractionState.default);
|
|
47924
|
+
stateManeger.updateCursor();
|
|
47925
|
+
}
|
|
47879
47926
|
eventManeger.dealTableHover();
|
|
47880
|
-
stateManeger.updateCursor();
|
|
47881
47927
|
const target = e.target;
|
|
47882
47928
|
if (target && !target.isDescendantsOf(table.scenegraph.tableGroup)) {
|
|
47883
47929
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, {
|
|
@@ -47889,6 +47935,9 @@
|
|
|
47889
47935
|
});
|
|
47890
47936
|
table.scenegraph.tableGroup.addEventListener('pointerupoutside', (e) => {
|
|
47891
47937
|
console.log('pointerupoutside');
|
|
47938
|
+
if (stateManeger.isResizeCol()) {
|
|
47939
|
+
endResizeCol(table);
|
|
47940
|
+
}
|
|
47892
47941
|
stateManeger.updateInteractionState(InteractionState.default);
|
|
47893
47942
|
eventManeger.dealTableHover();
|
|
47894
47943
|
eventManeger.dealTableSelect();
|
|
@@ -47964,17 +48013,7 @@
|
|
|
47964
48013
|
if (stateManeger.interactionState === 'grabing') {
|
|
47965
48014
|
stateManeger.updateInteractionState(InteractionState.default);
|
|
47966
48015
|
if (stateManeger.isResizeCol()) {
|
|
47967
|
-
|
|
47968
|
-
if (table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END)) {
|
|
47969
|
-
const columns = [];
|
|
47970
|
-
for (let col = 0; col < table.colCount; col++) {
|
|
47971
|
-
columns.push(table.getColWidth(col));
|
|
47972
|
-
}
|
|
47973
|
-
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, {
|
|
47974
|
-
col: table.stateManeger.columnResize.col,
|
|
47975
|
-
columns
|
|
47976
|
-
});
|
|
47977
|
-
}
|
|
48016
|
+
endResizeCol(table);
|
|
47978
48017
|
}
|
|
47979
48018
|
else if (stateManeger.isMoveCol()) {
|
|
47980
48019
|
table.stateManeger.endMoveCol();
|
|
@@ -48141,6 +48180,19 @@
|
|
|
48141
48180
|
}
|
|
48142
48181
|
});
|
|
48143
48182
|
}
|
|
48183
|
+
function endResizeCol(table) {
|
|
48184
|
+
table.stateManeger.endResizeCol();
|
|
48185
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END)) {
|
|
48186
|
+
const columns = [];
|
|
48187
|
+
for (let col = 0; col < table.colCount; col++) {
|
|
48188
|
+
columns.push(table.getColWidth(col));
|
|
48189
|
+
}
|
|
48190
|
+
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, {
|
|
48191
|
+
col: table.stateManeger.columnResize.col,
|
|
48192
|
+
columns
|
|
48193
|
+
});
|
|
48194
|
+
}
|
|
48195
|
+
}
|
|
48144
48196
|
|
|
48145
48197
|
function bindScrollBarListener(eventManeger) {
|
|
48146
48198
|
const table = eventManeger.table;
|
|
@@ -48671,8 +48723,8 @@
|
|
|
48671
48723
|
}
|
|
48672
48724
|
return false;
|
|
48673
48725
|
}
|
|
48674
|
-
dealColumnResize(
|
|
48675
|
-
this.table.stateManeger.updateResizeCol(
|
|
48726
|
+
dealColumnResize(xInTable, yInTable) {
|
|
48727
|
+
this.table.stateManeger.updateResizeCol(xInTable, xInTable);
|
|
48676
48728
|
}
|
|
48677
48729
|
chechColumnMover(eventArgsSet) {
|
|
48678
48730
|
const { eventArgs } = eventArgsSet;
|
|
@@ -49179,6 +49231,9 @@
|
|
|
49179
49231
|
this._secondElement = createMenuDomElement$1();
|
|
49180
49232
|
this._secondElement.sub = true;
|
|
49181
49233
|
this._showChildrenIndex = -1;
|
|
49234
|
+
this._rootElement.addEventListener('wheel', e => {
|
|
49235
|
+
e.stopPropagation();
|
|
49236
|
+
});
|
|
49182
49237
|
this._rootElement?.addEventListener('mousedown', e => {
|
|
49183
49238
|
e.stopPropagation();
|
|
49184
49239
|
e.preventDefault();
|
|
@@ -49292,6 +49347,9 @@
|
|
|
49292
49347
|
}, 300);
|
|
49293
49348
|
}
|
|
49294
49349
|
});
|
|
49350
|
+
this._secondElement?.addEventListener('wheel', e => {
|
|
49351
|
+
e.stopPropagation();
|
|
49352
|
+
});
|
|
49295
49353
|
this._secondElement?.addEventListener('mousemove', e => {
|
|
49296
49354
|
if (this._rootElement.classList.contains(HIDDEN_CLASSNAME$1)) {
|
|
49297
49355
|
return;
|
|
@@ -50442,7 +50500,7 @@
|
|
|
50442
50500
|
const { event } = e;
|
|
50443
50501
|
const { left, right, top, bottom } = position.rect;
|
|
50444
50502
|
const abstractPos = table._getMouseAbstractPoint(event, false);
|
|
50445
|
-
if (!(abstractPos &&
|
|
50503
|
+
if (!(abstractPos.inTable &&
|
|
50446
50504
|
abstractPos.x >= left - 5 &&
|
|
50447
50505
|
abstractPos.x <= right + 5 &&
|
|
50448
50506
|
abstractPos.y >= top - 5 &&
|
|
@@ -50541,6 +50599,9 @@
|
|
|
50541
50599
|
constructor(table) {
|
|
50542
50600
|
this._handler = new EventHandler();
|
|
50543
50601
|
this._rootElement = createMenuDomElement();
|
|
50602
|
+
this._rootElement.addEventListener('wheel', e => {
|
|
50603
|
+
e.stopPropagation();
|
|
50604
|
+
});
|
|
50544
50605
|
this._rootElement?.addEventListener('mousedown', e => {
|
|
50545
50606
|
e.stopPropagation();
|
|
50546
50607
|
e.preventDefault();
|
|
@@ -50852,10 +50913,10 @@
|
|
|
50852
50913
|
if (table.internalProps.menu?.renderMode === 'html') {
|
|
50853
50914
|
const abstractPos = table._getMouseAbstractPoint(e.event, false);
|
|
50854
50915
|
let menu = null;
|
|
50855
|
-
if (abstractPos && typeof table.internalProps.menu?.contextMenuItems === 'function') {
|
|
50916
|
+
if (abstractPos.inTable && typeof table.internalProps.menu?.contextMenuItems === 'function') {
|
|
50856
50917
|
menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row);
|
|
50857
50918
|
}
|
|
50858
|
-
else if (abstractPos && Array.isArray(table.internalProps.menu?.contextMenuItems)) {
|
|
50919
|
+
else if (abstractPos.inTable && Array.isArray(table.internalProps.menu?.contextMenuItems)) {
|
|
50859
50920
|
menu = table.internalProps.menu?.contextMenuItems;
|
|
50860
50921
|
}
|
|
50861
50922
|
this._bindToCell(e.col, e.row, 'context-menu', {
|
|
@@ -51120,11 +51181,11 @@
|
|
|
51120
51181
|
});
|
|
51121
51182
|
if (this.orient === 'left') {
|
|
51122
51183
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
51123
|
-
this.table.tableX
|
|
51184
|
+
this.table.tableX += Math.ceil(width);
|
|
51124
51185
|
}
|
|
51125
51186
|
else if (this.orient === 'top') {
|
|
51126
51187
|
this.table.tableNoFrameHeight = this.table.tableNoFrameHeight - Math.ceil(height);
|
|
51127
|
-
this.table.tableY
|
|
51188
|
+
this.table.tableY += Math.ceil(height);
|
|
51128
51189
|
}
|
|
51129
51190
|
else if (this.orient === 'right') {
|
|
51130
51191
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
@@ -51175,6 +51236,7 @@
|
|
|
51175
51236
|
};
|
|
51176
51237
|
}
|
|
51177
51238
|
dispose() {
|
|
51239
|
+
this.table.scenegraph.stage.defaultLayer.removeChild(this.legendComponent);
|
|
51178
51240
|
this.legendComponent = null;
|
|
51179
51241
|
}
|
|
51180
51242
|
}
|
|
@@ -51221,11 +51283,11 @@
|
|
|
51221
51283
|
}
|
|
51222
51284
|
if (this._titleOption.orient === 'left') {
|
|
51223
51285
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
51224
|
-
this.table.tableX
|
|
51286
|
+
this.table.tableX += Math.ceil(width);
|
|
51225
51287
|
}
|
|
51226
51288
|
else if (this._titleOption.orient === 'top') {
|
|
51227
51289
|
this.table.tableNoFrameHeight = this.table.tableNoFrameHeight - Math.ceil(height);
|
|
51228
|
-
this.table.tableY
|
|
51290
|
+
this.table.tableY += Math.ceil(height);
|
|
51229
51291
|
}
|
|
51230
51292
|
else if (this._titleOption.orient === 'right') {
|
|
51231
51293
|
this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);
|
|
@@ -51247,6 +51309,7 @@
|
|
|
51247
51309
|
return this._titleComponent;
|
|
51248
51310
|
}
|
|
51249
51311
|
dispose() {
|
|
51312
|
+
this.table.scenegraph.stage.defaultLayer.removeChild(this._titleComponent);
|
|
51250
51313
|
this._titleComponent = null;
|
|
51251
51314
|
}
|
|
51252
51315
|
_getTitleAttrs() {
|
|
@@ -51314,7 +51377,7 @@
|
|
|
51314
51377
|
return TABLE_EVENT_TYPE;
|
|
51315
51378
|
}
|
|
51316
51379
|
options;
|
|
51317
|
-
version = "0.9.3-alpha.
|
|
51380
|
+
version = "0.9.3-alpha.4";
|
|
51318
51381
|
pagerConf;
|
|
51319
51382
|
id = `VTable${Date.now()}`;
|
|
51320
51383
|
headerStyleCache;
|
|
@@ -51861,7 +51924,8 @@
|
|
|
51861
51924
|
if (this.heightMode === 'standard' &&
|
|
51862
51925
|
this.internalProps.layoutMap &&
|
|
51863
51926
|
endRow >= this.columnHeaderLevelCount &&
|
|
51864
|
-
!this.bottomFrozenRowCount
|
|
51927
|
+
!this.bottomFrozenRowCount &&
|
|
51928
|
+
!this.hasAutoImageColumn()) {
|
|
51865
51929
|
for (let i = startRow; i < this.columnHeaderLevelCount; i++) {
|
|
51866
51930
|
h += this.getRowHeight(i);
|
|
51867
51931
|
}
|
|
@@ -52375,6 +52439,9 @@
|
|
|
52375
52439
|
this.dataSet = new DataSet();
|
|
52376
52440
|
this.scenegraph.clearCells();
|
|
52377
52441
|
this.stateManeger.initState();
|
|
52442
|
+
this._updateSize();
|
|
52443
|
+
this.internalProps.legends?.dispose();
|
|
52444
|
+
this.internalProps.title?.dispose();
|
|
52378
52445
|
if (options.legends) {
|
|
52379
52446
|
internalProps.legends = new TableLegend(options.legends, this);
|
|
52380
52447
|
this.scenegraph.tableGroup.setAttributes({
|
|
@@ -52437,7 +52504,7 @@
|
|
|
52437
52504
|
const table = this;
|
|
52438
52505
|
let e;
|
|
52439
52506
|
if (!evt) {
|
|
52440
|
-
return
|
|
52507
|
+
return { inTable: false, x: undefined, y: undefined };
|
|
52441
52508
|
}
|
|
52442
52509
|
if (isTouchEvent(evt)) {
|
|
52443
52510
|
e = evt.changedTouches[0];
|
|
@@ -52448,11 +52515,12 @@
|
|
|
52448
52515
|
const clientX = e.clientX || e.pageX + window.scrollX;
|
|
52449
52516
|
const clientY = e.clientY || e.pageY + window.scrollY;
|
|
52450
52517
|
const rect = table.internalProps.canvas.getBoundingClientRect();
|
|
52518
|
+
let inTable = true;
|
|
52451
52519
|
if (rect.right <= clientX) {
|
|
52452
|
-
|
|
52520
|
+
inTable = false;
|
|
52453
52521
|
}
|
|
52454
52522
|
if (rect.bottom <= clientY) {
|
|
52455
|
-
|
|
52523
|
+
inTable = false;
|
|
52456
52524
|
}
|
|
52457
52525
|
const currentWidth = rect.width;
|
|
52458
52526
|
const originWidth = this.canvas.offsetWidth || currentWidth;
|
|
@@ -52462,31 +52530,7 @@
|
|
|
52462
52530
|
const heightRatio = currentHeight / originHeight;
|
|
52463
52531
|
const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0) - table.tableX;
|
|
52464
52532
|
const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0) - table.tableY;
|
|
52465
|
-
return { x, y };
|
|
52466
|
-
}
|
|
52467
|
-
_getCellEventArgsSet(e) {
|
|
52468
|
-
const abstractPos = this._getMouseAbstractPoint(e);
|
|
52469
|
-
if (!abstractPos) {
|
|
52470
|
-
return {};
|
|
52471
|
-
}
|
|
52472
|
-
const cell = this.getCellAt(abstractPos.x, abstractPos.y);
|
|
52473
|
-
if (cell.col < 0 || cell.row < 0) {
|
|
52474
|
-
return {
|
|
52475
|
-
abstractPos,
|
|
52476
|
-
cell
|
|
52477
|
-
};
|
|
52478
|
-
}
|
|
52479
|
-
const eventArgs = {
|
|
52480
|
-
col: cell.col,
|
|
52481
|
-
row: cell.row,
|
|
52482
|
-
event: e,
|
|
52483
|
-
rect: cell.rect
|
|
52484
|
-
};
|
|
52485
|
-
return {
|
|
52486
|
-
abstractPos,
|
|
52487
|
-
cell,
|
|
52488
|
-
eventArgs
|
|
52489
|
-
};
|
|
52533
|
+
return { x, y, inTable };
|
|
52490
52534
|
}
|
|
52491
52535
|
getTheme() {
|
|
52492
52536
|
return this.internalProps.theme;
|
|
@@ -52651,7 +52695,7 @@
|
|
|
52651
52695
|
return this.internalProps.layoutMap.columnHeaderLevelCount;
|
|
52652
52696
|
}
|
|
52653
52697
|
get records() {
|
|
52654
|
-
return this.internalProps.records
|
|
52698
|
+
return this.internalProps.records;
|
|
52655
52699
|
}
|
|
52656
52700
|
get dataSource() {
|
|
52657
52701
|
return this.internalProps.dataSource;
|
|
@@ -53336,6 +53380,14 @@
|
|
|
53336
53380
|
}
|
|
53337
53381
|
return customLayout;
|
|
53338
53382
|
}
|
|
53383
|
+
hasAutoImageColumn() {
|
|
53384
|
+
return this.internalProps.layoutMap.columnObjects.find((column) => {
|
|
53385
|
+
if (column.columnType === 'image' && column.define.imageAutoSizing) {
|
|
53386
|
+
return true;
|
|
53387
|
+
}
|
|
53388
|
+
return false;
|
|
53389
|
+
});
|
|
53390
|
+
}
|
|
53339
53391
|
}
|
|
53340
53392
|
|
|
53341
53393
|
var core = /*#__PURE__*/Object.freeze({
|
|
@@ -53470,6 +53522,219 @@
|
|
|
53470
53522
|
numberFormat: numberFormat
|
|
53471
53523
|
});
|
|
53472
53524
|
|
|
53525
|
+
function getAxisConfigInPivotChart(col, row, layout) {
|
|
53526
|
+
if (!layout._table.isPivotChart()) {
|
|
53527
|
+
return undefined;
|
|
53528
|
+
}
|
|
53529
|
+
if (layout.indicatorsAsCol) {
|
|
53530
|
+
if (layout.hasTwoIndicatorAxes &&
|
|
53531
|
+
row === layout.columnHeaderLevelCount - 1 &&
|
|
53532
|
+
col >= layout.rowHeaderLevelCount &&
|
|
53533
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
53534
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);
|
|
53535
|
+
let defaultKey = indicatorKeys[1];
|
|
53536
|
+
if (isArray$3(defaultKey)) {
|
|
53537
|
+
defaultKey = defaultKey[0];
|
|
53538
|
+
}
|
|
53539
|
+
if (!defaultKey) {
|
|
53540
|
+
return undefined;
|
|
53541
|
+
}
|
|
53542
|
+
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53543
|
+
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53544
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
53545
|
+
const index = layout.getRecordIndexByCol(col);
|
|
53546
|
+
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53547
|
+
const axisOption = getAxisOption(col, row, 'top', layout);
|
|
53548
|
+
if (axisOption?.visible === false) {
|
|
53549
|
+
return;
|
|
53550
|
+
}
|
|
53551
|
+
return merge$2({}, axisOption, {
|
|
53552
|
+
orient: 'top',
|
|
53553
|
+
type: 'linear',
|
|
53554
|
+
range: range,
|
|
53555
|
+
label: {
|
|
53556
|
+
flush: true
|
|
53557
|
+
},
|
|
53558
|
+
title: {
|
|
53559
|
+
visible: false
|
|
53560
|
+
}
|
|
53561
|
+
});
|
|
53562
|
+
}
|
|
53563
|
+
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
53564
|
+
col >= layout.rowHeaderLevelCount &&
|
|
53565
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
53566
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
53567
|
+
let defaultKey = indicatorKeys[0];
|
|
53568
|
+
if (isArray$3(defaultKey)) {
|
|
53569
|
+
defaultKey = defaultKey[0];
|
|
53570
|
+
}
|
|
53571
|
+
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53572
|
+
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53573
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
53574
|
+
const index = layout.getRecordIndexByCol(col);
|
|
53575
|
+
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53576
|
+
let indicatorInfo = null;
|
|
53577
|
+
indicatorKeys.forEach(key => {
|
|
53578
|
+
const info = layout.getIndicatorInfo(key);
|
|
53579
|
+
if (info) {
|
|
53580
|
+
indicatorInfo = info;
|
|
53581
|
+
}
|
|
53582
|
+
});
|
|
53583
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53584
|
+
if (axisOption?.visible === false) {
|
|
53585
|
+
return;
|
|
53586
|
+
}
|
|
53587
|
+
return merge$2({}, axisOption, {
|
|
53588
|
+
orient: 'bottom',
|
|
53589
|
+
type: 'linear',
|
|
53590
|
+
range: range,
|
|
53591
|
+
label: {
|
|
53592
|
+
flush: true
|
|
53593
|
+
},
|
|
53594
|
+
title: {
|
|
53595
|
+
text: indicatorInfo?.caption,
|
|
53596
|
+
autoRotate: true
|
|
53597
|
+
}
|
|
53598
|
+
});
|
|
53599
|
+
}
|
|
53600
|
+
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
53601
|
+
row >= layout.columnHeaderLevelCount &&
|
|
53602
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
53603
|
+
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
53604
|
+
if (isArray$3(rowDimensionKey)) {
|
|
53605
|
+
rowDimensionKey = rowDimensionKey[0];
|
|
53606
|
+
}
|
|
53607
|
+
const data = layout.dataset.collectedValues[rowDimensionKey];
|
|
53608
|
+
const recordRow = layout.getRecordIndexByRow(row);
|
|
53609
|
+
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
53610
|
+
const domain = data[rowPath[rowPath.length - 1]];
|
|
53611
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53612
|
+
if (axisOption?.visible === false) {
|
|
53613
|
+
return;
|
|
53614
|
+
}
|
|
53615
|
+
return merge$2({}, axisOption, {
|
|
53616
|
+
orient: 'left',
|
|
53617
|
+
type: 'band',
|
|
53618
|
+
data: Array.from(domain).reverse(),
|
|
53619
|
+
title: {
|
|
53620
|
+
visible: false
|
|
53621
|
+
}
|
|
53622
|
+
});
|
|
53623
|
+
}
|
|
53624
|
+
}
|
|
53625
|
+
else {
|
|
53626
|
+
if (col === layout.rowHeaderLevelCount - 1 &&
|
|
53627
|
+
row >= layout.columnHeaderLevelCount &&
|
|
53628
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
53629
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
53630
|
+
let defaultKey = indicatorKeys[0];
|
|
53631
|
+
if (isArray$3(defaultKey)) {
|
|
53632
|
+
defaultKey = defaultKey[0];
|
|
53633
|
+
}
|
|
53634
|
+
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53635
|
+
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53636
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
53637
|
+
const index = layout.getRecordIndexByRow(row);
|
|
53638
|
+
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53639
|
+
let indicatorInfo = null;
|
|
53640
|
+
indicatorKeys.forEach(key => {
|
|
53641
|
+
const info = layout.getIndicatorInfo(key);
|
|
53642
|
+
if (info) {
|
|
53643
|
+
indicatorInfo = info;
|
|
53644
|
+
}
|
|
53645
|
+
});
|
|
53646
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53647
|
+
if (axisOption?.visible === false) {
|
|
53648
|
+
return;
|
|
53649
|
+
}
|
|
53650
|
+
return merge$2({}, axisOption, {
|
|
53651
|
+
orient: 'left',
|
|
53652
|
+
type: 'linear',
|
|
53653
|
+
range: range,
|
|
53654
|
+
label: {
|
|
53655
|
+
flush: true
|
|
53656
|
+
},
|
|
53657
|
+
title: {
|
|
53658
|
+
text: indicatorInfo?.caption,
|
|
53659
|
+
autoRotate: true
|
|
53660
|
+
}
|
|
53661
|
+
});
|
|
53662
|
+
}
|
|
53663
|
+
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
53664
|
+
row >= layout.columnHeaderLevelCount &&
|
|
53665
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
53666
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);
|
|
53667
|
+
let defaultKey = indicatorKeys[1];
|
|
53668
|
+
if (isArray$3(defaultKey)) {
|
|
53669
|
+
defaultKey = defaultKey[0];
|
|
53670
|
+
}
|
|
53671
|
+
if (!defaultKey) {
|
|
53672
|
+
return undefined;
|
|
53673
|
+
}
|
|
53674
|
+
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53675
|
+
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53676
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
53677
|
+
const index = layout.getRecordIndexByRow(row);
|
|
53678
|
+
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53679
|
+
const axisOption = getAxisOption(col, row, 'right', layout);
|
|
53680
|
+
if (axisOption?.visible === false) {
|
|
53681
|
+
return;
|
|
53682
|
+
}
|
|
53683
|
+
return merge$2({}, axisOption, {
|
|
53684
|
+
orient: 'right',
|
|
53685
|
+
type: 'linear',
|
|
53686
|
+
range: range,
|
|
53687
|
+
label: {
|
|
53688
|
+
flush: true
|
|
53689
|
+
},
|
|
53690
|
+
title: {
|
|
53691
|
+
visible: false
|
|
53692
|
+
}
|
|
53693
|
+
});
|
|
53694
|
+
}
|
|
53695
|
+
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
53696
|
+
col >= layout.rowHeaderLevelCount &&
|
|
53697
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
53698
|
+
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
53699
|
+
if (isArray$3(columnDimensionKey)) {
|
|
53700
|
+
columnDimensionKey = columnDimensionKey[0];
|
|
53701
|
+
}
|
|
53702
|
+
const data = layout.dataset.collectedValues[columnDimensionKey];
|
|
53703
|
+
const recordCol = layout.getRecordIndexByCol(col);
|
|
53704
|
+
const colPath = layout.getColKeysPath()[recordCol];
|
|
53705
|
+
const domain = data[colPath[colPath.length - 1]];
|
|
53706
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53707
|
+
if (axisOption?.visible === false) {
|
|
53708
|
+
return;
|
|
53709
|
+
}
|
|
53710
|
+
return merge$2({}, axisOption, {
|
|
53711
|
+
orient: 'bottom',
|
|
53712
|
+
type: 'band',
|
|
53713
|
+
data: Array.from(domain),
|
|
53714
|
+
title: {
|
|
53715
|
+
visible: false
|
|
53716
|
+
}
|
|
53717
|
+
});
|
|
53718
|
+
}
|
|
53719
|
+
}
|
|
53720
|
+
return undefined;
|
|
53721
|
+
}
|
|
53722
|
+
function getAxisOption(col, row, orient, layout) {
|
|
53723
|
+
const spec = layout.getRawChartSpec(col, row);
|
|
53724
|
+
if (spec && isArray$3(spec.axes)) {
|
|
53725
|
+
const axisOption = spec.axes.find((axis) => {
|
|
53726
|
+
return axis.orient === orient;
|
|
53727
|
+
});
|
|
53728
|
+
if (axisOption) {
|
|
53729
|
+
return axisOption;
|
|
53730
|
+
}
|
|
53731
|
+
}
|
|
53732
|
+
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
53733
|
+
return axisOption.orient === orient;
|
|
53734
|
+
});
|
|
53735
|
+
return axisOption;
|
|
53736
|
+
}
|
|
53737
|
+
|
|
53473
53738
|
function getRawChartSpec(col, row, layout) {
|
|
53474
53739
|
const paths = layout.getCellHeaderPaths(col, row);
|
|
53475
53740
|
let indicatorObj;
|
|
@@ -53507,16 +53772,15 @@
|
|
|
53507
53772
|
? layout.dataset.collectedValues[key + '_align']
|
|
53508
53773
|
: layout.dataset.collectedValues[key];
|
|
53509
53774
|
const range = data[layout.getColKeysPath()[colIndex][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53510
|
-
const axisOption =
|
|
53511
|
-
return axisOption.orient === (index === 0 ? 'bottom' : 'top');
|
|
53512
|
-
});
|
|
53775
|
+
const axisOption = getAxisOption(col, row, index === 0 ? 'bottom' : 'top', layout);
|
|
53513
53776
|
axes.push(merge$2({}, axisOption, {
|
|
53514
53777
|
type: 'linear',
|
|
53515
53778
|
orient: index === 0 ? 'bottom' : 'top',
|
|
53516
53779
|
label: { visible: false },
|
|
53517
53780
|
title: { visible: false },
|
|
53518
53781
|
range,
|
|
53519
|
-
seriesIndex: index
|
|
53782
|
+
seriesIndex: index,
|
|
53783
|
+
height: -1
|
|
53520
53784
|
}));
|
|
53521
53785
|
});
|
|
53522
53786
|
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, col)[0];
|
|
@@ -53527,9 +53791,7 @@
|
|
|
53527
53791
|
const recordRow = layout.getRecordIndexByRow(row);
|
|
53528
53792
|
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
53529
53793
|
const domain = data[rowPath[rowPath.length - 1]];
|
|
53530
|
-
const axisOption =
|
|
53531
|
-
return axisOption.orient === 'left';
|
|
53532
|
-
});
|
|
53794
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53533
53795
|
axes.push(merge$2({}, axisOption, {
|
|
53534
53796
|
type: 'band',
|
|
53535
53797
|
orient: 'left',
|
|
@@ -53553,16 +53815,15 @@
|
|
|
53553
53815
|
? layout.dataset.collectedValues[key + '_align']
|
|
53554
53816
|
: layout.dataset.collectedValues[key];
|
|
53555
53817
|
const range = data[layout.getRowKeysPath()[rowIndex][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53556
|
-
const axisOption =
|
|
53557
|
-
return axisOption.orient === (index === 0 ? 'left' : 'right');
|
|
53558
|
-
});
|
|
53818
|
+
const axisOption = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
53559
53819
|
axes.push(merge$2({}, axisOption, {
|
|
53560
53820
|
type: 'linear',
|
|
53561
53821
|
orient: index === 0 ? 'left' : 'right',
|
|
53562
53822
|
label: { visible: false },
|
|
53563
53823
|
title: { visible: false },
|
|
53564
53824
|
range,
|
|
53565
|
-
seriesIndex: index
|
|
53825
|
+
seriesIndex: index,
|
|
53826
|
+
width: -1
|
|
53566
53827
|
}));
|
|
53567
53828
|
});
|
|
53568
53829
|
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
@@ -53573,9 +53834,7 @@
|
|
|
53573
53834
|
const recordCol = layout.getRecordIndexByCol(col);
|
|
53574
53835
|
const colPath = layout.getColKeysPath()[recordCol];
|
|
53575
53836
|
const domain = data[colPath[colPath.length - 1]];
|
|
53576
|
-
const axisOption =
|
|
53577
|
-
return axisOption.orient === 'bottom';
|
|
53578
|
-
});
|
|
53837
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53579
53838
|
axes.push(merge$2({}, axisOption, {
|
|
53580
53839
|
type: 'band',
|
|
53581
53840
|
orient: 'bottom',
|
|
@@ -54383,7 +54642,6 @@
|
|
|
54383
54642
|
internalProps.disposables.forEach(disposable => disposable?.dispose?.());
|
|
54384
54643
|
internalProps.disposables = null;
|
|
54385
54644
|
}
|
|
54386
|
-
this._updateSize();
|
|
54387
54645
|
if (options.dataSource) {
|
|
54388
54646
|
_setDataSource(this, options.dataSource);
|
|
54389
54647
|
}
|
|
@@ -54494,8 +54752,8 @@
|
|
|
54494
54752
|
}
|
|
54495
54753
|
getCellAddress(findTargetRecord, field) {
|
|
54496
54754
|
let targetRecordIndex;
|
|
54497
|
-
for (let i = 0; i < this.records.length; i++) {
|
|
54498
|
-
const record = this.records[i];
|
|
54755
|
+
for (let i = 0; i < this.internalProps.records.length; i++) {
|
|
54756
|
+
const record = this.internalProps.records[i];
|
|
54499
54757
|
if (typeof findTargetRecord === 'function') {
|
|
54500
54758
|
if (findTargetRecord(record)) {
|
|
54501
54759
|
targetRecordIndex = i;
|
|
@@ -56164,216 +56422,6 @@
|
|
|
56164
56422
|
}
|
|
56165
56423
|
}
|
|
56166
56424
|
|
|
56167
|
-
function getAxisConfigInPivotChart(col, row, layout) {
|
|
56168
|
-
if (!layout._table.isPivotChart()) {
|
|
56169
|
-
return undefined;
|
|
56170
|
-
}
|
|
56171
|
-
if (layout.indicatorsAsCol) {
|
|
56172
|
-
if (layout.hasTwoIndicatorAxes &&
|
|
56173
|
-
row === layout.columnHeaderLevelCount - 1 &&
|
|
56174
|
-
col >= layout.rowHeaderLevelCount &&
|
|
56175
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
56176
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);
|
|
56177
|
-
let defaultKey = indicatorKeys[1];
|
|
56178
|
-
if (isArray$3(defaultKey)) {
|
|
56179
|
-
defaultKey = defaultKey[0];
|
|
56180
|
-
}
|
|
56181
|
-
if (!defaultKey) {
|
|
56182
|
-
return undefined;
|
|
56183
|
-
}
|
|
56184
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56185
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56186
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56187
|
-
const index = layout.getRecordIndexByCol(col);
|
|
56188
|
-
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
56189
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56190
|
-
return axisOption.orient === 'top';
|
|
56191
|
-
});
|
|
56192
|
-
if (axisOption?.visible === false) {
|
|
56193
|
-
return;
|
|
56194
|
-
}
|
|
56195
|
-
return merge$2({}, axisOption, {
|
|
56196
|
-
orient: 'top',
|
|
56197
|
-
type: 'linear',
|
|
56198
|
-
range: range,
|
|
56199
|
-
label: {
|
|
56200
|
-
flush: true
|
|
56201
|
-
},
|
|
56202
|
-
title: {
|
|
56203
|
-
visible: false
|
|
56204
|
-
}
|
|
56205
|
-
});
|
|
56206
|
-
}
|
|
56207
|
-
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
56208
|
-
col >= layout.rowHeaderLevelCount &&
|
|
56209
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
56210
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
56211
|
-
let defaultKey = indicatorKeys[0];
|
|
56212
|
-
if (isArray$3(defaultKey)) {
|
|
56213
|
-
defaultKey = defaultKey[0];
|
|
56214
|
-
}
|
|
56215
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56216
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56217
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56218
|
-
const index = layout.getRecordIndexByCol(col);
|
|
56219
|
-
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
56220
|
-
let indicatorInfo = null;
|
|
56221
|
-
indicatorKeys.forEach(key => {
|
|
56222
|
-
const info = layout.getIndicatorInfo(key);
|
|
56223
|
-
if (info) {
|
|
56224
|
-
indicatorInfo = info;
|
|
56225
|
-
}
|
|
56226
|
-
});
|
|
56227
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56228
|
-
return axisOption.orient === 'bottom';
|
|
56229
|
-
});
|
|
56230
|
-
if (axisOption?.visible === false) {
|
|
56231
|
-
return;
|
|
56232
|
-
}
|
|
56233
|
-
return merge$2({}, axisOption, {
|
|
56234
|
-
orient: 'bottom',
|
|
56235
|
-
type: 'linear',
|
|
56236
|
-
range: range,
|
|
56237
|
-
label: {
|
|
56238
|
-
flush: true
|
|
56239
|
-
},
|
|
56240
|
-
title: {
|
|
56241
|
-
text: indicatorInfo?.caption,
|
|
56242
|
-
autoRotate: true
|
|
56243
|
-
}
|
|
56244
|
-
});
|
|
56245
|
-
}
|
|
56246
|
-
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
56247
|
-
row >= layout.rowHeaderLevelCount &&
|
|
56248
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
56249
|
-
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
56250
|
-
if (isArray$3(rowDimensionKey)) {
|
|
56251
|
-
rowDimensionKey = rowDimensionKey[0];
|
|
56252
|
-
}
|
|
56253
|
-
const data = layout.dataset.collectedValues[rowDimensionKey];
|
|
56254
|
-
const recordRow = layout.getRecordIndexByRow(row);
|
|
56255
|
-
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
56256
|
-
const domain = data[rowPath[rowPath.length - 1]];
|
|
56257
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56258
|
-
return axisOption.orient === 'left';
|
|
56259
|
-
});
|
|
56260
|
-
if (axisOption?.visible === false) {
|
|
56261
|
-
return;
|
|
56262
|
-
}
|
|
56263
|
-
return merge$2({}, axisOption, {
|
|
56264
|
-
orient: 'left',
|
|
56265
|
-
type: 'band',
|
|
56266
|
-
data: Array.from(domain).reverse(),
|
|
56267
|
-
title: {
|
|
56268
|
-
visible: false
|
|
56269
|
-
}
|
|
56270
|
-
});
|
|
56271
|
-
}
|
|
56272
|
-
}
|
|
56273
|
-
else {
|
|
56274
|
-
if (col === layout.rowHeaderLevelCount - 1 &&
|
|
56275
|
-
row >= layout.columnHeaderLevelCount &&
|
|
56276
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
56277
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
56278
|
-
let defaultKey = indicatorKeys[0];
|
|
56279
|
-
if (isArray$3(defaultKey)) {
|
|
56280
|
-
defaultKey = defaultKey[0];
|
|
56281
|
-
}
|
|
56282
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56283
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56284
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56285
|
-
const index = layout.getRecordIndexByRow(row);
|
|
56286
|
-
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
56287
|
-
let indicatorInfo = null;
|
|
56288
|
-
indicatorKeys.forEach(key => {
|
|
56289
|
-
const info = layout.getIndicatorInfo(key);
|
|
56290
|
-
if (info) {
|
|
56291
|
-
indicatorInfo = info;
|
|
56292
|
-
}
|
|
56293
|
-
});
|
|
56294
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56295
|
-
return axisOption.orient === 'left';
|
|
56296
|
-
});
|
|
56297
|
-
if (axisOption?.visible === false) {
|
|
56298
|
-
return;
|
|
56299
|
-
}
|
|
56300
|
-
return merge$2({}, axisOption, {
|
|
56301
|
-
orient: 'left',
|
|
56302
|
-
type: 'linear',
|
|
56303
|
-
range: range,
|
|
56304
|
-
label: {
|
|
56305
|
-
flush: true
|
|
56306
|
-
},
|
|
56307
|
-
title: {
|
|
56308
|
-
text: indicatorInfo?.caption,
|
|
56309
|
-
autoRotate: true
|
|
56310
|
-
}
|
|
56311
|
-
});
|
|
56312
|
-
}
|
|
56313
|
-
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
56314
|
-
row >= layout.columnHeaderLevelCount &&
|
|
56315
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
56316
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);
|
|
56317
|
-
let defaultKey = indicatorKeys[1];
|
|
56318
|
-
if (isArray$3(defaultKey)) {
|
|
56319
|
-
defaultKey = defaultKey[0];
|
|
56320
|
-
}
|
|
56321
|
-
if (!defaultKey) {
|
|
56322
|
-
return undefined;
|
|
56323
|
-
}
|
|
56324
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
56325
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
56326
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
56327
|
-
const index = layout.getRecordIndexByRow(row);
|
|
56328
|
-
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
56329
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56330
|
-
return axisOption.orient === 'right';
|
|
56331
|
-
});
|
|
56332
|
-
if (axisOption?.visible === false) {
|
|
56333
|
-
return;
|
|
56334
|
-
}
|
|
56335
|
-
return merge$2({}, axisOption, {
|
|
56336
|
-
orient: 'right',
|
|
56337
|
-
type: 'linear',
|
|
56338
|
-
range: range,
|
|
56339
|
-
label: {
|
|
56340
|
-
flush: true
|
|
56341
|
-
},
|
|
56342
|
-
title: {
|
|
56343
|
-
visible: false
|
|
56344
|
-
}
|
|
56345
|
-
});
|
|
56346
|
-
}
|
|
56347
|
-
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
56348
|
-
col >= layout.rowHeaderLevelCount &&
|
|
56349
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
56350
|
-
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
56351
|
-
if (isArray$3(columnDimensionKey)) {
|
|
56352
|
-
columnDimensionKey = columnDimensionKey[0];
|
|
56353
|
-
}
|
|
56354
|
-
const data = layout.dataset.collectedValues[columnDimensionKey];
|
|
56355
|
-
const recordCol = layout.getRecordIndexByCol(col);
|
|
56356
|
-
const colPath = layout.getColKeysPath()[recordCol];
|
|
56357
|
-
const domain = data[colPath[colPath.length - 1]];
|
|
56358
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
56359
|
-
return axisOption.orient === 'bottom';
|
|
56360
|
-
});
|
|
56361
|
-
if (axisOption?.visible === false) {
|
|
56362
|
-
return;
|
|
56363
|
-
}
|
|
56364
|
-
return merge$2({}, axisOption, {
|
|
56365
|
-
orient: 'bottom',
|
|
56366
|
-
type: 'band',
|
|
56367
|
-
data: Array.from(domain),
|
|
56368
|
-
title: {
|
|
56369
|
-
visible: false
|
|
56370
|
-
}
|
|
56371
|
-
});
|
|
56372
|
-
}
|
|
56373
|
-
}
|
|
56374
|
-
return undefined;
|
|
56375
|
-
}
|
|
56376
|
-
|
|
56377
56425
|
const EMPTY_HEADER = {
|
|
56378
56426
|
isEmpty: true,
|
|
56379
56427
|
id: undefined,
|
|
@@ -57498,6 +57546,23 @@
|
|
|
57498
57546
|
const barWidth = this._chartItemSpanSize || 25;
|
|
57499
57547
|
return (collectedValues?.length ?? 0) * (barWidth + barWidth / 3);
|
|
57500
57548
|
}
|
|
57549
|
+
getOptimunHeightForChart(row) {
|
|
57550
|
+
const path = this.getCellHeaderPaths(this.rowHeaderLevelCount, row).rowHeaderPaths;
|
|
57551
|
+
let collectedValues;
|
|
57552
|
+
for (const key in this.dataset.collectValuesBy) {
|
|
57553
|
+
if (this.dataset.collectValuesBy[key].type === 'yField' && !this.dataset.collectValuesBy[key].range) {
|
|
57554
|
+
collectedValues =
|
|
57555
|
+
this.dataset.collectedValues[key][path
|
|
57556
|
+
.map(pathObj => {
|
|
57557
|
+
return pathObj.value;
|
|
57558
|
+
})
|
|
57559
|
+
.join(this.dataset.stringJoinChar)];
|
|
57560
|
+
break;
|
|
57561
|
+
}
|
|
57562
|
+
}
|
|
57563
|
+
const barWidth = this._chartItemSpanSize || 25;
|
|
57564
|
+
return (collectedValues?.length ?? 0) * (barWidth + barWidth / 3);
|
|
57565
|
+
}
|
|
57501
57566
|
getIndicatorKeyInChartSpec(_col, _row) {
|
|
57502
57567
|
const chartSpec = this.getRawChartSpec(_col, _row);
|
|
57503
57568
|
const indicatorKeys = [];
|
|
@@ -58278,7 +58343,7 @@
|
|
|
58278
58343
|
if (records) {
|
|
58279
58344
|
this.records = records;
|
|
58280
58345
|
const t0 = typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
58281
|
-
this.setRecords(
|
|
58346
|
+
this.setRecords();
|
|
58282
58347
|
this.processCollectedValuesWithSumBy();
|
|
58283
58348
|
this.processCollectedValuesWithSortBy();
|
|
58284
58349
|
const t1 = typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
@@ -58323,7 +58388,7 @@
|
|
|
58323
58388
|
this.registerAggregator(AggregationType.MIN, MinAggregator);
|
|
58324
58389
|
this.registerAggregator(AggregationType.AVG, AvgAggregator);
|
|
58325
58390
|
}
|
|
58326
|
-
setRecords(
|
|
58391
|
+
setRecords() {
|
|
58327
58392
|
this.processRecords();
|
|
58328
58393
|
}
|
|
58329
58394
|
processCollectedValuesWithSumBy() {
|
|
@@ -58357,10 +58422,22 @@
|
|
|
58357
58422
|
if (this.dataConfig?.filterRules?.length >= 1) {
|
|
58358
58423
|
isNeedFilter = true;
|
|
58359
58424
|
}
|
|
58360
|
-
|
|
58361
|
-
|
|
58362
|
-
|
|
58363
|
-
this.
|
|
58425
|
+
if (Array.isArray(this.records)) {
|
|
58426
|
+
for (let i = 0, len = this.records.length; i < len; i++) {
|
|
58427
|
+
const record = this.records[i];
|
|
58428
|
+
if (!isNeedFilter || this.filterRecord(record)) {
|
|
58429
|
+
this.processRecord(record);
|
|
58430
|
+
}
|
|
58431
|
+
}
|
|
58432
|
+
}
|
|
58433
|
+
else {
|
|
58434
|
+
for (const key in this.records) {
|
|
58435
|
+
for (let i = 0, len = this.records[key].length; i < len; i++) {
|
|
58436
|
+
const record = this.records[key][i];
|
|
58437
|
+
if (!isNeedFilter || this.filterRecord(record)) {
|
|
58438
|
+
this.processRecord(record, key);
|
|
58439
|
+
}
|
|
58440
|
+
}
|
|
58364
58441
|
}
|
|
58365
58442
|
}
|
|
58366
58443
|
this.rowFlatKeys = {};
|
|
@@ -58384,7 +58461,7 @@
|
|
|
58384
58461
|
}
|
|
58385
58462
|
return isReserved;
|
|
58386
58463
|
}
|
|
58387
|
-
processRecord(record) {
|
|
58464
|
+
processRecord(record, assignedIndicatorKey) {
|
|
58388
58465
|
this.derivedFieldRules?.forEach((derivedFieldRule, i) => {
|
|
58389
58466
|
record[derivedFieldRule.fieldName] = derivedFieldRule.derivedFunc(record);
|
|
58390
58467
|
});
|
|
@@ -58464,7 +58541,10 @@
|
|
|
58464
58541
|
if (!this.tree[flatRowKey]?.[flatColKey]?.[i]) {
|
|
58465
58542
|
this.tree[flatRowKey][flatColKey][i] = new this.aggregators[aggRule?.aggregationType ?? AggregationType.SUM](aggRule?.field ?? this.indicatorKeys[i], aggRule?.formatFun);
|
|
58466
58543
|
}
|
|
58467
|
-
if (
|
|
58544
|
+
if (assignedIndicatorKey) {
|
|
58545
|
+
this.indicatorKeys[i] === assignedIndicatorKey && this.tree[flatRowKey]?.[flatColKey]?.[i].push(record);
|
|
58546
|
+
}
|
|
58547
|
+
else if (aggRule?.field) {
|
|
58468
58548
|
if (typeof aggRule?.field === 'string') {
|
|
58469
58549
|
isValid$1(record[aggRule?.field]) && this.tree[flatRowKey]?.[flatColKey]?.[i].push(record);
|
|
58470
58550
|
}
|
|
@@ -59067,7 +59147,6 @@
|
|
|
59067
59147
|
internalProps.disposables.forEach(disposable => disposable?.dispose?.());
|
|
59068
59148
|
internalProps.disposables = null;
|
|
59069
59149
|
}
|
|
59070
|
-
this._updateSize();
|
|
59071
59150
|
if (options.dataSource) {
|
|
59072
59151
|
_setDataSource(this, options.dataSource);
|
|
59073
59152
|
}
|
|
@@ -59289,10 +59368,10 @@
|
|
|
59289
59368
|
if (moveContext) {
|
|
59290
59369
|
if (moveContext.moveType === 'column') {
|
|
59291
59370
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59292
|
-
for (let row = 0; row < this.records.length; row++) {
|
|
59293
|
-
const sourceColumns = this.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59371
|
+
for (let row = 0; row < this.internalProps.records.length; row++) {
|
|
59372
|
+
const sourceColumns = this.internalProps.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59294
59373
|
sourceColumns.unshift(moveContext.targetIndex - this.rowHeaderLevelCount, 0);
|
|
59295
|
-
Array.prototype.splice.apply(this.records[row], sourceColumns);
|
|
59374
|
+
Array.prototype.splice.apply(this.internalProps.records[row], sourceColumns);
|
|
59296
59375
|
}
|
|
59297
59376
|
}
|
|
59298
59377
|
this.colWidthsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
@@ -59308,9 +59387,9 @@
|
|
|
59308
59387
|
}
|
|
59309
59388
|
else if (moveContext.moveType === 'row') {
|
|
59310
59389
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59311
|
-
const sourceRows = this.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59390
|
+
const sourceRows = this.internalProps.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59312
59391
|
sourceRows.unshift(moveContext.targetIndex - this.columnHeaderLevelCount, 0);
|
|
59313
|
-
Array.prototype.splice.apply(this.records, sourceRows);
|
|
59392
|
+
Array.prototype.splice.apply(this.internalProps.records, sourceRows);
|
|
59314
59393
|
}
|
|
59315
59394
|
this.rowHeightsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
59316
59395
|
}
|
|
@@ -59392,9 +59471,8 @@
|
|
|
59392
59471
|
}
|
|
59393
59472
|
this.setCustomStateNameToSpec();
|
|
59394
59473
|
this.internalProps.dataConfig = { isPivotChart: true };
|
|
59395
|
-
this.internalProps.enableDataAnalysis = true;
|
|
59396
59474
|
this._axes = isArray$3(options.axes) ? options.axes : [];
|
|
59397
|
-
if (
|
|
59475
|
+
if (options.rows || options.columns) {
|
|
59398
59476
|
const rowKeys = options.rows.reduce((keys, rowObj) => {
|
|
59399
59477
|
if (typeof rowObj === 'string') {
|
|
59400
59478
|
keys.push(rowObj);
|
|
@@ -59470,8 +59548,7 @@
|
|
|
59470
59548
|
super.updateOption(options);
|
|
59471
59549
|
this.setCustomStateNameToSpec();
|
|
59472
59550
|
internalProps.dataConfig = {};
|
|
59473
|
-
|
|
59474
|
-
if (this.internalProps.enableDataAnalysis && (options.rows || options.columns)) {
|
|
59551
|
+
if (options.rows || options.columns) {
|
|
59475
59552
|
const rowKeys = options.rows.reduce((keys, rowObj) => {
|
|
59476
59553
|
if (typeof rowObj === 'string') {
|
|
59477
59554
|
keys.push(rowObj);
|
|
@@ -59508,7 +59585,6 @@
|
|
|
59508
59585
|
internalProps.disposables.forEach(disposable => disposable?.dispose?.());
|
|
59509
59586
|
internalProps.disposables = null;
|
|
59510
59587
|
}
|
|
59511
|
-
this._updateSize();
|
|
59512
59588
|
if (options.dataSource) {
|
|
59513
59589
|
_setDataSource(this, options.dataSource);
|
|
59514
59590
|
}
|
|
@@ -59529,9 +59605,7 @@
|
|
|
59529
59605
|
if (internalProps.headerEvents) {
|
|
59530
59606
|
internalProps.headerEvents.forEach((id) => this.unlisten(id));
|
|
59531
59607
|
}
|
|
59532
|
-
|
|
59533
|
-
internalProps.layoutMap = new PivotLayoutMap(this, this.dataset);
|
|
59534
|
-
}
|
|
59608
|
+
internalProps.layoutMap = new PivotLayoutMap(this, this.dataset);
|
|
59535
59609
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
59536
59610
|
const { width, minWidth, maxWidth } = internalProps.layoutMap.columnWidths?.[col] ?? {};
|
|
59537
59611
|
if (width && ((typeof width === 'string' && width !== 'auto') || (typeof width === 'number' && width > 0))) {
|
|
@@ -59676,10 +59750,10 @@
|
|
|
59676
59750
|
if (moveContext) {
|
|
59677
59751
|
if (moveContext.moveType === 'column') {
|
|
59678
59752
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59679
|
-
for (let row = 0; row < this.records.length; row++) {
|
|
59680
|
-
const sourceColumns = this.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59753
|
+
for (let row = 0; row < this.internalProps.records.length; row++) {
|
|
59754
|
+
const sourceColumns = this.internalProps.records[row].splice(moveContext.sourceIndex - this.rowHeaderLevelCount, moveContext.moveSize);
|
|
59681
59755
|
sourceColumns.unshift(moveContext.targetIndex - this.rowHeaderLevelCount, 0);
|
|
59682
|
-
Array.prototype.splice.apply(this.records[row], sourceColumns);
|
|
59756
|
+
Array.prototype.splice.apply(this.internalProps.records[row], sourceColumns);
|
|
59683
59757
|
}
|
|
59684
59758
|
}
|
|
59685
59759
|
this.colWidthsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
@@ -59695,9 +59769,9 @@
|
|
|
59695
59769
|
}
|
|
59696
59770
|
else if (moveContext.moveType === 'row') {
|
|
59697
59771
|
if (this.options.records?.[0]?.constructor === Array) {
|
|
59698
|
-
const sourceRows = this.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59772
|
+
const sourceRows = this.internalProps.records.splice(moveContext.sourceIndex - this.columnHeaderLevelCount, moveContext.moveSize);
|
|
59699
59773
|
sourceRows.unshift(moveContext.targetIndex - this.columnHeaderLevelCount, 0);
|
|
59700
|
-
Array.prototype.splice.apply(this.records, sourceRows);
|
|
59774
|
+
Array.prototype.splice.apply(this.internalProps.records, sourceRows);
|
|
59701
59775
|
}
|
|
59702
59776
|
this.rowHeightsMap.adjustOrder(moveContext.sourceIndex, moveContext.targetIndex, moveContext.moveSize);
|
|
59703
59777
|
}
|
|
@@ -59908,9 +59982,12 @@
|
|
|
59908
59982
|
});
|
|
59909
59983
|
}
|
|
59910
59984
|
else {
|
|
59985
|
+
const field = this.options.indicatorsAsCol === false
|
|
59986
|
+
? indicator.chartSpec.yField
|
|
59987
|
+
: indicator.chartSpec.xField;
|
|
59911
59988
|
aggregationRules.push({
|
|
59912
59989
|
indicatorKey: indicator.indicatorKey,
|
|
59913
|
-
field: indicator.indicatorKey,
|
|
59990
|
+
field: field ?? indicator.indicatorKey,
|
|
59914
59991
|
aggregationType: AggregationType.RECORD
|
|
59915
59992
|
});
|
|
59916
59993
|
}
|
|
@@ -59997,7 +60074,8 @@
|
|
|
59997
60074
|
const chartNode = cellGroup?.getChildren()?.[0];
|
|
59998
60075
|
if (chartNode.attribute.chartInstance) {
|
|
59999
60076
|
const chartInstance = chartNode.attribute.chartInstance;
|
|
60000
|
-
const { dataId, data,
|
|
60077
|
+
const { dataId, data, axes } = chartNode.attribute;
|
|
60078
|
+
const viewBox = chartNode.getViewBox();
|
|
60001
60079
|
axes.forEach((axis, index) => {
|
|
60002
60080
|
if (axis.type === 'linear') {
|
|
60003
60081
|
const chartAxis = chartInstance._chart._components[index];
|
|
@@ -60654,7 +60732,7 @@
|
|
|
60654
60732
|
percentCalc: percentCalc
|
|
60655
60733
|
});
|
|
60656
60734
|
|
|
60657
|
-
const version = "0.9.3-alpha.
|
|
60735
|
+
const version = "0.9.3-alpha.4";
|
|
60658
60736
|
function getIcons() {
|
|
60659
60737
|
return get$1();
|
|
60660
60738
|
}
|