@visactor/vtable 1.3.2-alpha.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/PivotChart.d.ts +0 -1
- package/cjs/PivotChart.js +0 -4
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/axis/axis.js +2 -3
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/empty-tip/empty-tip.js +2 -2
- package/cjs/components/empty-tip/empty-tip.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +1 -2
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +1 -3
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +7 -3
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +2 -4
- package/cjs/core/BaseTable.js +197 -62
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.d.ts +0 -1
- package/cjs/core/FouseInput.js +2 -5
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +2 -0
- package/cjs/dataset/dataset.js +8 -7
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.js +1 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +5 -3
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/util.js +2 -2
- package/cjs/event/util.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +57 -37
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js +1 -4
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +0 -1
- package/cjs/scenegraph/graphic/chart.js +20 -34
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
- package/cjs/scenegraph/graphic/contributions/chart-render.js +24 -40
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +3 -0
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +0 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +2 -9
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +4 -10
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/themes/component.js +1 -1
- package/cjs/themes/theme.js +6 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -15
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +2 -0
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/ts-types/tooltip.d.ts +2 -0
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +545 -536
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.d.ts +0 -1
- package/es/PivotChart.js +2 -5
- package/es/PivotChart.js.map +1 -1
- package/es/components/axis/axis.js +1 -3
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/empty-tip/empty-tip.js +2 -2
- package/es/components/empty-tip/empty-tip.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +1 -2
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +1 -3
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +7 -3
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +2 -4
- package/es/core/BaseTable.js +196 -63
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.d.ts +0 -1
- package/es/core/FouseInput.js +2 -5
- package/es/core/FouseInput.js.map +1 -1
- package/es/dataset/dataset.d.ts +2 -0
- package/es/dataset/dataset.js +8 -7
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.js +1 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +5 -3
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/util.js +2 -2
- package/es/event/util.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/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.js +56 -36
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js +1 -4
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +0 -1
- package/es/scenegraph/graphic/chart.js +21 -33
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
- package/es/scenegraph/graphic/contributions/chart-render.js +25 -41
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +3 -0
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +0 -1
- package/es/scenegraph/refresh-node/update-chart.js +0 -6
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +4 -10
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/themes/component.js +1 -1
- package/es/themes/theme.js +6 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -15
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/icon.d.ts +2 -0
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/ts-types/tooltip.d.ts +2 -0
- package/es/ts-types/tooltip.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
- package/cjs/core/utils/get-cell-position.d.ts +0 -42
- package/cjs/core/utils/get-cell-position.js +0 -204
- package/cjs/core/utils/get-cell-position.js.map +0 -1
- package/es/core/utils/get-cell-position.d.ts +0 -42
- package/es/core/utils/get-cell-position.js +0 -192
- package/es/core/utils/get-cell-position.js.map +0 -1
package/dist/vtable.js
CHANGED
|
@@ -25061,6 +25061,12 @@
|
|
|
25061
25061
|
},
|
|
25062
25062
|
get color() {
|
|
25063
25063
|
return tooltip.color ?? '#FFF';
|
|
25064
|
+
},
|
|
25065
|
+
get maxWidth() {
|
|
25066
|
+
return tooltip.maxWidth;
|
|
25067
|
+
},
|
|
25068
|
+
get maxHeight() {
|
|
25069
|
+
return tooltip.maxHeight;
|
|
25064
25070
|
}
|
|
25065
25071
|
};
|
|
25066
25072
|
}
|
|
@@ -32684,9 +32690,7 @@
|
|
|
32684
32690
|
const axisStylrAttrs = getAxisAttributes(this.option);
|
|
32685
32691
|
const attrs = this.getUpdateAttribute();
|
|
32686
32692
|
attrs.verticalFactor = this.orient === 'top' || this.orient === 'right' ? -1 : 1;
|
|
32687
|
-
this.component = new LineAxis(merge({
|
|
32688
|
-
disableTriggerEvent: this.table.options.disableInteraction
|
|
32689
|
-
}, axisStylrAttrs, attrs));
|
|
32693
|
+
this.component = new LineAxis(merge({}, axisStylrAttrs, attrs));
|
|
32690
32694
|
this.component.setAttributes(this.setLayoutStartPosition({ x: 0, y: 0 }));
|
|
32691
32695
|
this.component.originAxis = this;
|
|
32692
32696
|
}
|
|
@@ -35276,8 +35280,8 @@
|
|
|
35276
35280
|
function getCellEventArgsSet(e) {
|
|
35277
35281
|
const tableEvent = {
|
|
35278
35282
|
abstractPos: {
|
|
35279
|
-
x: e.
|
|
35280
|
-
y: e.
|
|
35283
|
+
x: e.x,
|
|
35284
|
+
y: e.y
|
|
35281
35285
|
}
|
|
35282
35286
|
};
|
|
35283
35287
|
const targetCell = getTargetCell(e.target);
|
|
@@ -37415,7 +37419,7 @@
|
|
|
37415
37419
|
this.numberType = CHART_NUMBER_TYPE;
|
|
37416
37420
|
this.isShareChartSpec = isShareChartSpec;
|
|
37417
37421
|
if (!params.chartInstance) {
|
|
37418
|
-
const chartInstance =
|
|
37422
|
+
const chartInstance = new params.ClassType(params.spec, {
|
|
37419
37423
|
renderCanvas: params.canvas,
|
|
37420
37424
|
mode: this.attribute.mode === 'node' ? 'node' : 'desktop-browser',
|
|
37421
37425
|
modeParams: this.attribute.modeParams,
|
|
@@ -37425,9 +37429,8 @@
|
|
|
37425
37429
|
interactive: false,
|
|
37426
37430
|
animation: false,
|
|
37427
37431
|
autoFit: false
|
|
37428
|
-
})
|
|
37432
|
+
});
|
|
37429
37433
|
chartInstance.renderSync();
|
|
37430
|
-
chartInstance.getStage().enableDirtyBounds();
|
|
37431
37434
|
params.chartInstance = this.chartInstance = chartInstance;
|
|
37432
37435
|
}
|
|
37433
37436
|
else {
|
|
@@ -37445,53 +37448,34 @@
|
|
|
37445
37448
|
y1: y1 - table.scrollTop,
|
|
37446
37449
|
y2: y2 - table.scrollTop
|
|
37447
37450
|
});
|
|
37448
|
-
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec,
|
|
37451
|
+
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, {
|
|
37449
37452
|
renderCanvas: this.attribute.canvas,
|
|
37450
37453
|
mode: 'desktop-browser',
|
|
37451
37454
|
canvasControled: false,
|
|
37452
37455
|
viewBox: {
|
|
37453
|
-
x1:
|
|
37454
|
-
x2: x2 -
|
|
37455
|
-
y1:
|
|
37456
|
-
y2: y2 -
|
|
37456
|
+
x1: x1 - table.scrollLeft,
|
|
37457
|
+
x2: x2 - table.scrollLeft,
|
|
37458
|
+
y1: y1 - table.scrollTop,
|
|
37459
|
+
y2: y2 - table.scrollTop
|
|
37457
37460
|
},
|
|
37458
37461
|
dpr: table.internalProps.pixelRatio,
|
|
37459
37462
|
animation: false,
|
|
37460
37463
|
interactive: true,
|
|
37461
37464
|
autoFit: false,
|
|
37462
|
-
beforeRender: (
|
|
37463
|
-
const
|
|
37464
|
-
const ctx = chartStage.window.getContext();
|
|
37465
|
-
const stageMatrix = stage.window.getViewBoxTransform();
|
|
37466
|
-
const viewBox = stage.window.getViewBox();
|
|
37465
|
+
beforeRender: (stage) => {
|
|
37466
|
+
const ctx = stage.window.getContext();
|
|
37467
37467
|
ctx.inuse = true;
|
|
37468
37468
|
ctx.clearMatrix();
|
|
37469
|
-
ctx.setTransform(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f, true);
|
|
37470
|
-
ctx.translate(viewBox.x1, viewBox.y1);
|
|
37471
37469
|
ctx.setTransformForCurrent(true);
|
|
37472
37470
|
ctx.beginPath();
|
|
37473
37471
|
ctx.rect(clipBound.x1, clipBound.y1, clipBound.x2 - clipBound.x1, clipBound.y2 - clipBound.y1);
|
|
37474
37472
|
ctx.clip();
|
|
37475
|
-
ctx.clearMatrix();
|
|
37476
|
-
if (!chartStage.needRender) {
|
|
37477
|
-
chartStage.pauseRender();
|
|
37478
|
-
table.scenegraph.stage.dirtyBounds.union(this.globalAABBBounds);
|
|
37479
|
-
table.scenegraph.updateNextFrame();
|
|
37480
|
-
}
|
|
37481
37473
|
},
|
|
37482
37474
|
afterRender(stage) {
|
|
37483
37475
|
const ctx = stage.window.getContext();
|
|
37484
37476
|
ctx.inuse = false;
|
|
37485
|
-
stage.needRender = false;
|
|
37486
|
-
chartStage.resumeRender();
|
|
37487
37477
|
}
|
|
37488
|
-
})
|
|
37489
|
-
const chartStage = this.activeChartInstance.getStage();
|
|
37490
|
-
const matrix = this.globalTransMatrix.clone();
|
|
37491
|
-
const stageMatrix = this.stage.window.getViewBoxTransform();
|
|
37492
|
-
matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
37493
|
-
chartStage.window.setViewBoxTransform &&
|
|
37494
|
-
chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
|
|
37478
|
+
});
|
|
37495
37479
|
this.activeChartInstance.renderSync();
|
|
37496
37480
|
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(this.activeChartInstance);
|
|
37497
37481
|
this.activeChartInstance.on('click', (params) => {
|
|
@@ -37527,12 +37511,11 @@
|
|
|
37527
37511
|
const cellGroup = this.parent;
|
|
37528
37512
|
const padding = this.attribute.cellPadding;
|
|
37529
37513
|
const table = this.stage.table;
|
|
37530
|
-
const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
|
|
37531
37514
|
return {
|
|
37532
|
-
x1: Math.ceil(x1 + padding[3] + table.scrollLeft
|
|
37533
|
-
x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft
|
|
37534
|
-
y1: Math.ceil(y1 + padding[0] + table.scrollTop
|
|
37535
|
-
y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop
|
|
37515
|
+
x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
|
|
37516
|
+
x2: Math.ceil(cellGroup.globalAABBBounds.x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft),
|
|
37517
|
+
y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
|
|
37518
|
+
y2: Math.ceil(cellGroup.globalAABBBounds.y1 + cellGroup.attribute.height - padding[2] + table.scrollTop)
|
|
37536
37519
|
};
|
|
37537
37520
|
}
|
|
37538
37521
|
}
|
|
@@ -37563,10 +37546,6 @@
|
|
|
37563
37546
|
bodyBound.x1 = tableBound.x1 + table.getFrozenColsWidth();
|
|
37564
37547
|
bodyBound.x2 = tableBound.x2 - table.getRightFrozenColsWidth();
|
|
37565
37548
|
}
|
|
37566
|
-
bodyBound.x1 = bodyBound.x1 + (table.options.viewBox?.x1 ?? 0);
|
|
37567
|
-
bodyBound.x2 = bodyBound.x2 + (table.options.viewBox?.x1 ?? 0);
|
|
37568
|
-
bodyBound.y1 = bodyBound.y1 + (table.options.viewBox?.y1 ?? 0);
|
|
37569
|
-
bodyBound.y2 = bodyBound.y2 + (table.options.viewBox?.y1 ?? 0);
|
|
37570
37549
|
return bodyBound;
|
|
37571
37550
|
}
|
|
37572
37551
|
|
|
@@ -37648,8 +37627,7 @@
|
|
|
37648
37627
|
data: table.getCellValue(col, row),
|
|
37649
37628
|
cellPadding: padding,
|
|
37650
37629
|
dpr: table.internalProps.pixelRatio,
|
|
37651
|
-
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : []
|
|
37652
|
-
tableChartOption: table.options.chartOption
|
|
37630
|
+
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : []
|
|
37653
37631
|
});
|
|
37654
37632
|
cellGroup.appendChild(chartGroup);
|
|
37655
37633
|
table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
|
|
@@ -41751,6 +41729,10 @@
|
|
|
41751
41729
|
const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, renderDefault, scene.table);
|
|
41752
41730
|
isHeightChange = isHeightChange || cellChange;
|
|
41753
41731
|
}
|
|
41732
|
+
if (!autoWrapText) {
|
|
41733
|
+
const style = scene.table._getCellStyle(col, row);
|
|
41734
|
+
autoWrapText = style.autoWrapText;
|
|
41735
|
+
}
|
|
41754
41736
|
return autoRowHeight && autoWrapText ? isHeightChange : false;
|
|
41755
41737
|
}
|
|
41756
41738
|
function updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, renderDefault, table) {
|
|
@@ -43290,65 +43272,48 @@
|
|
|
43290
43272
|
if (viewBox.y2 <= viewBox.y1) {
|
|
43291
43273
|
viewBox.y2 = viewBox.y1 + 1;
|
|
43292
43274
|
}
|
|
43293
|
-
|
|
43294
|
-
|
|
43295
|
-
|
|
43296
|
-
y1: 0,
|
|
43297
|
-
y2: viewBox.y2 - viewBox.y1
|
|
43298
|
-
}, false, false);
|
|
43299
|
-
const chartStage = chartInstance.getStage();
|
|
43300
|
-
const matrix = chart.globalTransMatrix.clone();
|
|
43301
|
-
const stageMatrix = chart.stage.window.getViewBoxTransform();
|
|
43302
|
-
matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
43303
|
-
chartStage.window.setViewBoxTransform &&
|
|
43304
|
-
chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
|
|
43305
|
-
const { table } = chart.getRootNode();
|
|
43306
|
-
let updateSpec = false;
|
|
43307
|
-
if (table.options.specFormat) {
|
|
43308
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
43309
|
-
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
43310
|
-
const spec = formatResult.spec;
|
|
43311
|
-
chartInstance.updateSpecSync(spec);
|
|
43312
|
-
updateSpec = true;
|
|
43313
|
-
}
|
|
43314
|
-
}
|
|
43315
|
-
if (!updateSpec) {
|
|
43316
|
-
axes?.forEach((axis, index) => {
|
|
43317
|
-
if (axis.type === 'band') {
|
|
43318
|
-
chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
43319
|
-
}
|
|
43320
|
-
else {
|
|
43321
|
-
chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
|
|
43322
|
-
}
|
|
43323
|
-
});
|
|
43324
|
-
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
|
|
43325
|
-
if (typeof dataId === 'string') {
|
|
43326
|
-
chartInstance.updateDataSync(dataId, data ?? []);
|
|
43275
|
+
axes?.forEach((axis, index) => {
|
|
43276
|
+
if (axis.type === 'band') {
|
|
43277
|
+
chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
43327
43278
|
}
|
|
43328
43279
|
else {
|
|
43329
|
-
|
|
43330
|
-
|
|
43331
|
-
|
|
43332
|
-
|
|
43333
|
-
|
|
43334
|
-
|
|
43335
|
-
|
|
43336
|
-
|
|
43337
|
-
|
|
43338
|
-
|
|
43339
|
-
|
|
43340
|
-
|
|
43341
|
-
|
|
43342
|
-
|
|
43343
|
-
|
|
43344
|
-
|
|
43345
|
-
|
|
43346
|
-
|
|
43347
|
-
|
|
43348
|
-
|
|
43280
|
+
chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
|
|
43281
|
+
}
|
|
43282
|
+
});
|
|
43283
|
+
chartInstance.updateViewBox({
|
|
43284
|
+
x1: viewBox.x1 - chart.getRootNode().table.scrollLeft,
|
|
43285
|
+
x2: viewBox.x2 - chart.getRootNode().table.scrollLeft,
|
|
43286
|
+
y1: viewBox.y1 - chart.getRootNode().table.scrollTop,
|
|
43287
|
+
y2: viewBox.y2 - chart.getRootNode().table.scrollTop
|
|
43288
|
+
}, false, false);
|
|
43289
|
+
const table = chart.getRootNode().table;
|
|
43290
|
+
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
|
|
43291
|
+
if (typeof dataId === 'string') {
|
|
43292
|
+
chartInstance.updateDataSync(dataId, data ?? []);
|
|
43293
|
+
}
|
|
43294
|
+
else {
|
|
43295
|
+
const dataBatch = [];
|
|
43296
|
+
for (const dataIdStr in dataId) {
|
|
43297
|
+
const dataIdAndField = dataId[dataIdStr];
|
|
43298
|
+
const series = spec.series.find((item) => item?.data?.id === dataIdStr);
|
|
43299
|
+
dataBatch.push({
|
|
43300
|
+
id: dataIdStr,
|
|
43301
|
+
values: dataIdAndField
|
|
43302
|
+
? data?.filter((item) => {
|
|
43303
|
+
return item.hasOwnProperty(dataIdAndField);
|
|
43304
|
+
}) ?? []
|
|
43305
|
+
: data ?? [],
|
|
43306
|
+
fields: series?.data?.fields
|
|
43307
|
+
});
|
|
43308
|
+
if (!chartInstance.updateFullDataSync) {
|
|
43309
|
+
chartInstance.updateDataSync(dataIdStr, dataIdAndField
|
|
43310
|
+
? data?.filter((item) => {
|
|
43311
|
+
return item.hasOwnProperty(dataIdAndField);
|
|
43312
|
+
}) ?? []
|
|
43313
|
+
: data ?? []);
|
|
43349
43314
|
}
|
|
43350
|
-
chartInstance.updateFullDataSync?.(dataBatch);
|
|
43351
43315
|
}
|
|
43316
|
+
chartInstance.updateFullDataSync?.(dataBatch);
|
|
43352
43317
|
}
|
|
43353
43318
|
const sg = chartInstance.getStage();
|
|
43354
43319
|
cacheStageCanvas(sg, chart);
|
|
@@ -43410,7 +43375,7 @@
|
|
|
43410
43375
|
}
|
|
43411
43376
|
|
|
43412
43377
|
const ChartRender = Symbol.for('ChartRender');
|
|
43413
|
-
let DefaultCanvasChartRender = class DefaultCanvasChartRender
|
|
43378
|
+
let DefaultCanvasChartRender = class DefaultCanvasChartRender {
|
|
43414
43379
|
type;
|
|
43415
43380
|
numberType = CHART_NUMBER_TYPE;
|
|
43416
43381
|
drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
@@ -43418,7 +43383,6 @@
|
|
|
43418
43383
|
const { dataId, data, spec } = chart.attribute;
|
|
43419
43384
|
chart.getViewBox();
|
|
43420
43385
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
43421
|
-
const { table } = chart.getRootNode();
|
|
43422
43386
|
const { active, cacheCanvas, activeChartInstance } = chart;
|
|
43423
43387
|
if (!active && cacheCanvas) {
|
|
43424
43388
|
if (isArray$1(cacheCanvas)) {
|
|
@@ -43432,27 +43396,6 @@
|
|
|
43432
43396
|
}
|
|
43433
43397
|
}
|
|
43434
43398
|
else if (activeChartInstance) {
|
|
43435
|
-
if (table.options.specFormat) {
|
|
43436
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
43437
|
-
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
43438
|
-
const spec = formatResult.spec;
|
|
43439
|
-
activeChartInstance.updateSpecSync(spec);
|
|
43440
|
-
return;
|
|
43441
|
-
}
|
|
43442
|
-
}
|
|
43443
|
-
const viewBox = chart.getViewBox();
|
|
43444
|
-
activeChartInstance.updateViewBox({
|
|
43445
|
-
x1: 0,
|
|
43446
|
-
x2: viewBox.x2 - viewBox.x1,
|
|
43447
|
-
y1: 0,
|
|
43448
|
-
y2: viewBox.y2 - viewBox.y1
|
|
43449
|
-
}, false, false);
|
|
43450
|
-
const chartStage = activeChartInstance.getStage();
|
|
43451
|
-
chartStage.needRender = true;
|
|
43452
|
-
const matrix = chart.globalTransMatrix.clone();
|
|
43453
|
-
const stageMatrix = chart.stage.window.getViewBoxTransform().clone();
|
|
43454
|
-
stageMatrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
|
|
43455
|
-
chartStage.window.setViewBoxTransform(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
43456
43399
|
if (typeof dataId === 'string') {
|
|
43457
43400
|
activeChartInstance.updateDataSync(dataId, data ?? []);
|
|
43458
43401
|
}
|
|
@@ -43482,13 +43425,13 @@
|
|
|
43482
43425
|
}
|
|
43483
43426
|
}
|
|
43484
43427
|
else {
|
|
43485
|
-
if (table.internalProps.renderChartAsync) {
|
|
43428
|
+
if (chart.getRootNode().table.internalProps.renderChartAsync) {
|
|
43486
43429
|
if (chartRenderKeys.indexOf(`${chart.parent.col}+${chart.parent.row}`) === -1) {
|
|
43487
43430
|
chartRenderKeys.push(`${chart.parent.col}+${chart.parent.row}`);
|
|
43488
43431
|
chartRenderQueueList.push(chart);
|
|
43489
43432
|
}
|
|
43490
43433
|
if (!IsHandlingChartQueue()) {
|
|
43491
|
-
startRenderChartQueue(table);
|
|
43434
|
+
startRenderChartQueue(chart.getRootNode().table);
|
|
43492
43435
|
}
|
|
43493
43436
|
}
|
|
43494
43437
|
else {
|
|
@@ -43497,7 +43440,31 @@
|
|
|
43497
43440
|
}
|
|
43498
43441
|
}
|
|
43499
43442
|
draw(chart, renderService, drawContext, params) {
|
|
43500
|
-
|
|
43443
|
+
const { context } = drawContext;
|
|
43444
|
+
if (!context) {
|
|
43445
|
+
return;
|
|
43446
|
+
}
|
|
43447
|
+
const { clip } = chart.attribute;
|
|
43448
|
+
if (clip) {
|
|
43449
|
+
context.save();
|
|
43450
|
+
}
|
|
43451
|
+
else {
|
|
43452
|
+
context.highPerformanceSave();
|
|
43453
|
+
}
|
|
43454
|
+
context.transformFromMatrix(chart.transMatrix, true);
|
|
43455
|
+
context.beginPath();
|
|
43456
|
+
if (params.skipDraw) {
|
|
43457
|
+
this.drawShape(chart, context, 0, 0, drawContext, params, () => false, () => false);
|
|
43458
|
+
}
|
|
43459
|
+
else {
|
|
43460
|
+
this.drawShape(chart, context, 0, 0, drawContext);
|
|
43461
|
+
}
|
|
43462
|
+
if (clip) {
|
|
43463
|
+
context.restore();
|
|
43464
|
+
}
|
|
43465
|
+
else {
|
|
43466
|
+
context.highPerformanceRestore();
|
|
43467
|
+
}
|
|
43501
43468
|
}
|
|
43502
43469
|
};
|
|
43503
43470
|
DefaultCanvasChartRender = __decorate([
|
|
@@ -48332,15 +48299,6 @@
|
|
|
48332
48299
|
});
|
|
48333
48300
|
}
|
|
48334
48301
|
}
|
|
48335
|
-
function clearCellChartCacheImage(col, row, scenegraph) {
|
|
48336
|
-
const cellGroup = scenegraph.getCell(col, row);
|
|
48337
|
-
cellGroup.children.forEach((node) => {
|
|
48338
|
-
if (node.type === 'chart') {
|
|
48339
|
-
node.cacheCanvas = null;
|
|
48340
|
-
node.addUpdateBoundTag();
|
|
48341
|
-
}
|
|
48342
|
-
});
|
|
48343
|
-
}
|
|
48344
48302
|
function updateChartData(scenegraph) {
|
|
48345
48303
|
const table = scenegraph.table;
|
|
48346
48304
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
@@ -49202,12 +49160,7 @@
|
|
|
49202
49160
|
setPoptipTheme(this.table.theme.textPopTipStyle);
|
|
49203
49161
|
let width;
|
|
49204
49162
|
let height;
|
|
49205
|
-
if (
|
|
49206
|
-
vglobal.setEnv('browser');
|
|
49207
|
-
width = table.options.viewBox.x2 - table.options.viewBox.x1;
|
|
49208
|
-
height = table.options.viewBox.y2 - table.options.viewBox.y1;
|
|
49209
|
-
}
|
|
49210
|
-
else if (Env.mode === 'node') {
|
|
49163
|
+
if (Env.mode === 'node') {
|
|
49211
49164
|
vglobal.setEnv('node', table.options.modeParams);
|
|
49212
49165
|
width = table.canvasWidth;
|
|
49213
49166
|
height = table.canvasHeight;
|
|
@@ -49225,15 +49178,9 @@
|
|
|
49225
49178
|
background: table.theme.underlayBackgroundColor,
|
|
49226
49179
|
dpr: table.internalProps.pixelRatio,
|
|
49227
49180
|
enableLayout: true,
|
|
49228
|
-
|
|
49229
|
-
this.table.options.beforeRender && this.table.options.beforeRender(stage);
|
|
49230
|
-
},
|
|
49231
|
-
afterRender: (stage) => {
|
|
49232
|
-
this.table.options.afterRender && this.table.options.afterRender(stage);
|
|
49181
|
+
afterRender: () => {
|
|
49233
49182
|
this.table.fireListeners('after_render', null);
|
|
49234
49183
|
},
|
|
49235
|
-
canvasControled: !table.options.canvas,
|
|
49236
|
-
viewBox: table.options.viewBox,
|
|
49237
49184
|
...table.options.renderOption
|
|
49238
49185
|
});
|
|
49239
49186
|
this.stage.defaultLayer.setTheme({
|
|
@@ -53367,6 +53314,9 @@
|
|
|
53367
53314
|
table.editorManager?.completeEdit(e.nativeEvent);
|
|
53368
53315
|
stateManager.updateInteractionState(InteractionState.default);
|
|
53369
53316
|
eventManager.dealTableHover();
|
|
53317
|
+
if (table.options.select?.outsideClickDeselect) {
|
|
53318
|
+
eventManager.dealTableSelect();
|
|
53319
|
+
}
|
|
53370
53320
|
});
|
|
53371
53321
|
table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
|
|
53372
53322
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
@@ -53653,8 +53603,10 @@
|
|
|
53653
53603
|
!target.isDescendantsOf(table.scenegraph.tableGroup)) {
|
|
53654
53604
|
stateManager.updateInteractionState(InteractionState.default);
|
|
53655
53605
|
eventManager.dealTableHover();
|
|
53656
|
-
eventManager.dealTableSelect();
|
|
53657
53606
|
stateManager.endSelectCells();
|
|
53607
|
+
if (table.options.select?.blankAreaClickDeselect ?? true) {
|
|
53608
|
+
eventManager.dealTableSelect();
|
|
53609
|
+
}
|
|
53658
53610
|
stateManager.updateCursor();
|
|
53659
53611
|
table.scenegraph.updateChartState(null);
|
|
53660
53612
|
}
|
|
@@ -54418,19 +54370,17 @@
|
|
|
54418
54370
|
e.preventDefault();
|
|
54419
54371
|
}
|
|
54420
54372
|
});
|
|
54421
|
-
|
|
54422
|
-
|
|
54423
|
-
|
|
54424
|
-
|
|
54425
|
-
|
|
54426
|
-
|
|
54427
|
-
|
|
54428
|
-
|
|
54429
|
-
|
|
54430
|
-
|
|
54431
|
-
|
|
54432
|
-
});
|
|
54433
|
-
}
|
|
54373
|
+
handler.on(table.getContainer(), 'resize', e => {
|
|
54374
|
+
if (e.width === 0 && e.height === 0) {
|
|
54375
|
+
return;
|
|
54376
|
+
}
|
|
54377
|
+
if (!isValid$1(table.options.pixelRatio)) {
|
|
54378
|
+
table.setPixelRatio(getPixelRatio());
|
|
54379
|
+
}
|
|
54380
|
+
if (!e.windowSizeNotChange) {
|
|
54381
|
+
table.resize();
|
|
54382
|
+
}
|
|
54383
|
+
});
|
|
54434
54384
|
function pasteHtmlToTable(item) {
|
|
54435
54385
|
const ranges = table.stateManager.select.ranges;
|
|
54436
54386
|
const selectRangeLength = ranges.length;
|
|
@@ -54978,7 +54928,7 @@
|
|
|
54978
54928
|
this.table = table;
|
|
54979
54929
|
this.handleTextStickBindId = [];
|
|
54980
54930
|
this.inertiaScroll = new InertiaScroll(table.stateManager);
|
|
54981
|
-
if (Env.mode === 'node'
|
|
54931
|
+
if (Env.mode === 'node') {
|
|
54982
54932
|
return;
|
|
54983
54933
|
}
|
|
54984
54934
|
this.bindOuterEvent();
|
|
@@ -56658,12 +56608,30 @@
|
|
|
56658
56608
|
white-space: pre-wrap;
|
|
56659
56609
|
margin: 0;
|
|
56660
56610
|
box-sizing: border-box;
|
|
56661
|
-
overflow:
|
|
56611
|
+
overflow: auto;
|
|
56662
56612
|
word-wrap: break-word;
|
|
56663
56613
|
position: relative;
|
|
56664
56614
|
background-color: #FFF;
|
|
56665
56615
|
z-index: 2;
|
|
56666
|
-
border-radius: 4px
|
|
56616
|
+
border-radius: 4px;
|
|
56617
|
+
}
|
|
56618
|
+
/* WebKit Microsoft Edge(新版): */
|
|
56619
|
+
.vtable__bubble-tooltip-element__content::-webkit-scrollbar {
|
|
56620
|
+
width: 0;
|
|
56621
|
+
height: 0;
|
|
56622
|
+
background-color: transparent;
|
|
56623
|
+
}
|
|
56624
|
+
/* Opera Firefox */
|
|
56625
|
+
.vtable__bubble-tooltip-element__content > scrollbar-track {
|
|
56626
|
+
width: 0;
|
|
56627
|
+
height: 0;
|
|
56628
|
+
background-color: transparent;
|
|
56629
|
+
}
|
|
56630
|
+
/* Internet Explorer 11 和 Microsoft Edge(旧版) */
|
|
56631
|
+
.vtable__bubble-tooltip-element__content > scrollbar {
|
|
56632
|
+
width: 0;
|
|
56633
|
+
height: 0;
|
|
56634
|
+
background-color: transparent;
|
|
56667
56635
|
}
|
|
56668
56636
|
.vtable__bubble-tooltip-element__triangle {
|
|
56669
56637
|
/* font-size: .75rem; */
|
|
@@ -56697,7 +56665,7 @@
|
|
|
56697
56665
|
constructor() {
|
|
56698
56666
|
this._handler = new EventHandler();
|
|
56699
56667
|
const rootElement = (this._rootElement = createElement('div', [TOOLTIP_CLASS, HIDDEN_CLASS]));
|
|
56700
|
-
const messageElement = createElement('
|
|
56668
|
+
const messageElement = createElement('div', [CONTENT_CLASS]);
|
|
56701
56669
|
const triangle = createElement('span', [TRIANGLE_CLASS]);
|
|
56702
56670
|
rootElement.appendChild(triangle);
|
|
56703
56671
|
rootElement.appendChild(messageElement);
|
|
@@ -56710,6 +56678,9 @@
|
|
|
56710
56678
|
this._disappearDelay = undefined;
|
|
56711
56679
|
this.unbindFromCell();
|
|
56712
56680
|
});
|
|
56681
|
+
messageElement.addEventListener('wheel', e => {
|
|
56682
|
+
e.stopPropagation();
|
|
56683
|
+
});
|
|
56713
56684
|
}
|
|
56714
56685
|
bindToCell(table, col, row, tooltipInstanceInfo, confine) {
|
|
56715
56686
|
this._disappearDelay = tooltipInstanceInfo?.disappearDelay;
|
|
@@ -56734,6 +56705,10 @@
|
|
|
56734
56705
|
tooltipInstanceInfo?.style?.color && (messageElement.style.color = tooltipInstanceInfo?.style?.color);
|
|
56735
56706
|
tooltipInstanceInfo?.style?.padding &&
|
|
56736
56707
|
(messageElement.style.padding = `${tooltipInstanceInfo?.style?.padding.join('px ')}px`);
|
|
56708
|
+
tooltipInstanceInfo?.style?.maxHeight &&
|
|
56709
|
+
(messageElement.style.maxHeight = `${tooltipInstanceInfo?.style?.maxHeight}px`);
|
|
56710
|
+
tooltipInstanceInfo?.style?.maxWidth &&
|
|
56711
|
+
(messageElement.style.maxWidth = `${tooltipInstanceInfo?.style?.maxWidth}px`);
|
|
56737
56712
|
messageElement && (messageElement.textContent = tooltipInstanceInfo?.content);
|
|
56738
56713
|
const binded = this._bindToCell(table, col, row, tooltipInstanceInfo?.position, tooltipInstanceInfo?.referencePosition, confine, tooltipInstanceInfo?.style?.arrowMark);
|
|
56739
56714
|
if (binded) {
|
|
@@ -57112,7 +57087,7 @@
|
|
|
57112
57087
|
rect
|
|
57113
57088
|
},
|
|
57114
57089
|
disappearDelay: table.internalProps.tooltip.overflowTextTooltipDisappearDelay ?? 0,
|
|
57115
|
-
style:
|
|
57090
|
+
style: table.theme.tooltipStyle
|
|
57116
57091
|
};
|
|
57117
57092
|
}
|
|
57118
57093
|
else if (table.internalProps.tooltip?.isShowOverflowTextTooltip) {
|
|
@@ -57540,7 +57515,6 @@
|
|
|
57540
57515
|
}
|
|
57541
57516
|
|
|
57542
57517
|
class FocusInput extends EventTarget {
|
|
57543
|
-
_container;
|
|
57544
57518
|
_table;
|
|
57545
57519
|
_input;
|
|
57546
57520
|
constructor(table, parentElement) {
|
|
@@ -57560,7 +57534,6 @@
|
|
|
57560
57534
|
input.dataset.vtable = 'vtable';
|
|
57561
57535
|
input.readOnly = true;
|
|
57562
57536
|
parentElement.appendChild(div);
|
|
57563
|
-
this._container = div;
|
|
57564
57537
|
}
|
|
57565
57538
|
focus() {
|
|
57566
57539
|
this._input.focus({ preventScroll: true });
|
|
@@ -57580,7 +57553,6 @@
|
|
|
57580
57553
|
return this._input;
|
|
57581
57554
|
}
|
|
57582
57555
|
release() {
|
|
57583
|
-
this._container.parentElement?.removeChild(this._container);
|
|
57584
57556
|
}
|
|
57585
57557
|
}
|
|
57586
57558
|
|
|
@@ -57700,8 +57672,7 @@
|
|
|
57700
57672
|
height: this.table.tableNoFrameHeight
|
|
57701
57673
|
});
|
|
57702
57674
|
const legend = new DiscreteLegend(merge({}, attrs, {
|
|
57703
|
-
defaultSelected: this.selectedData
|
|
57704
|
-
disableTriggerEvent: this.table.options.disableInteraction
|
|
57675
|
+
defaultSelected: this.selectedData
|
|
57705
57676
|
}));
|
|
57706
57677
|
legend.name = 'legend';
|
|
57707
57678
|
this.legendComponent = legend;
|
|
@@ -59263,246 +59234,6 @@
|
|
|
59263
59234
|
return customTree;
|
|
59264
59235
|
}
|
|
59265
59236
|
|
|
59266
|
-
function getRowAt(absoluteY, _this) {
|
|
59267
|
-
const frozen = _getTargetFrozenRowAt(_this, absoluteY);
|
|
59268
|
-
if (frozen) {
|
|
59269
|
-
return frozen;
|
|
59270
|
-
}
|
|
59271
|
-
let row = getTargetRowAt(absoluteY, _this);
|
|
59272
|
-
if (!row) {
|
|
59273
|
-
row = {
|
|
59274
|
-
top: -1,
|
|
59275
|
-
row: -1,
|
|
59276
|
-
bottom: -1,
|
|
59277
|
-
height: -1
|
|
59278
|
-
};
|
|
59279
|
-
}
|
|
59280
|
-
return row;
|
|
59281
|
-
}
|
|
59282
|
-
function getColAt(absoluteX, _this) {
|
|
59283
|
-
const frozen = _getTargetFrozenColAt(_this, absoluteX);
|
|
59284
|
-
if (frozen) {
|
|
59285
|
-
return frozen;
|
|
59286
|
-
}
|
|
59287
|
-
let col = getTargetColAt(absoluteX, _this);
|
|
59288
|
-
if (!col) {
|
|
59289
|
-
col = {
|
|
59290
|
-
left: -1,
|
|
59291
|
-
col: -1,
|
|
59292
|
-
right: -1,
|
|
59293
|
-
width: 1
|
|
59294
|
-
};
|
|
59295
|
-
}
|
|
59296
|
-
return col;
|
|
59297
|
-
}
|
|
59298
|
-
function getCellAt(absoluteX, absoluteY, _this) {
|
|
59299
|
-
const rowInfo = getRowAt(absoluteY, _this);
|
|
59300
|
-
const { row, top, bottom, height } = rowInfo;
|
|
59301
|
-
const colInfo = getColAt(absoluteX, _this);
|
|
59302
|
-
const { col, left, right, width } = colInfo;
|
|
59303
|
-
const rect = {
|
|
59304
|
-
left,
|
|
59305
|
-
right,
|
|
59306
|
-
top,
|
|
59307
|
-
bottom,
|
|
59308
|
-
width,
|
|
59309
|
-
height
|
|
59310
|
-
};
|
|
59311
|
-
return {
|
|
59312
|
-
row,
|
|
59313
|
-
col,
|
|
59314
|
-
rect
|
|
59315
|
-
};
|
|
59316
|
-
}
|
|
59317
|
-
function getTargetColAt(absoluteX, _this) {
|
|
59318
|
-
if (absoluteX === 0) {
|
|
59319
|
-
return { left: 0, col: 0, right: 0, width: 0 };
|
|
59320
|
-
}
|
|
59321
|
-
const findBefore = (startCol, startRight) => {
|
|
59322
|
-
let right = startRight;
|
|
59323
|
-
for (let col = startCol; col >= 0; col--) {
|
|
59324
|
-
const width = _this.getColWidth(col);
|
|
59325
|
-
const left = right - width;
|
|
59326
|
-
if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
|
|
59327
|
-
return {
|
|
59328
|
-
left,
|
|
59329
|
-
col,
|
|
59330
|
-
right,
|
|
59331
|
-
width
|
|
59332
|
-
};
|
|
59333
|
-
}
|
|
59334
|
-
right = left;
|
|
59335
|
-
}
|
|
59336
|
-
return null;
|
|
59337
|
-
};
|
|
59338
|
-
const findAfter = (startCol, startRight) => {
|
|
59339
|
-
let left = startRight - _this.getColWidth(startCol);
|
|
59340
|
-
const { colCount } = _this.internalProps;
|
|
59341
|
-
for (let col = startCol; col < colCount; col++) {
|
|
59342
|
-
const width = _this.getColWidth(col);
|
|
59343
|
-
const right = left + width;
|
|
59344
|
-
if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
|
|
59345
|
-
return {
|
|
59346
|
-
left,
|
|
59347
|
-
col,
|
|
59348
|
-
right,
|
|
59349
|
-
width
|
|
59350
|
-
};
|
|
59351
|
-
}
|
|
59352
|
-
left = right;
|
|
59353
|
-
}
|
|
59354
|
-
return null;
|
|
59355
|
-
};
|
|
59356
|
-
const candCol = computeTargetColByX(absoluteX, _this);
|
|
59357
|
-
const right = _this.getColsWidth(0, candCol);
|
|
59358
|
-
if (absoluteX >= right) {
|
|
59359
|
-
return findAfter(candCol, right);
|
|
59360
|
-
}
|
|
59361
|
-
return findBefore(candCol, right);
|
|
59362
|
-
}
|
|
59363
|
-
function getTargetRowAt(absoluteY, _this) {
|
|
59364
|
-
if (absoluteY === 0) {
|
|
59365
|
-
return { top: 0, row: 0, bottom: 0, height: 0 };
|
|
59366
|
-
}
|
|
59367
|
-
const findBefore = (startRow, startBottom) => {
|
|
59368
|
-
let bottom = startBottom;
|
|
59369
|
-
for (let row = startRow; row >= 0; row--) {
|
|
59370
|
-
const height = _this.getRowHeight(row);
|
|
59371
|
-
const top = bottom - height;
|
|
59372
|
-
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
|
|
59373
|
-
return {
|
|
59374
|
-
top,
|
|
59375
|
-
row,
|
|
59376
|
-
bottom,
|
|
59377
|
-
height
|
|
59378
|
-
};
|
|
59379
|
-
}
|
|
59380
|
-
bottom = top;
|
|
59381
|
-
}
|
|
59382
|
-
return null;
|
|
59383
|
-
};
|
|
59384
|
-
const findAfter = (startRow, startBottom) => {
|
|
59385
|
-
let top = startBottom - _this.getRowHeight(startRow);
|
|
59386
|
-
const { rowCount } = _this.internalProps;
|
|
59387
|
-
for (let row = startRow; row < rowCount; row++) {
|
|
59388
|
-
const height = _this.getRowHeight(row);
|
|
59389
|
-
const bottom = top + height;
|
|
59390
|
-
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
|
|
59391
|
-
return {
|
|
59392
|
-
top,
|
|
59393
|
-
row,
|
|
59394
|
-
bottom,
|
|
59395
|
-
height
|
|
59396
|
-
};
|
|
59397
|
-
}
|
|
59398
|
-
top = bottom;
|
|
59399
|
-
}
|
|
59400
|
-
return null;
|
|
59401
|
-
};
|
|
59402
|
-
const candRow = computeTargetRowByY(absoluteY, _this);
|
|
59403
|
-
const bottom = _this.getRowsHeight(0, candRow);
|
|
59404
|
-
if (absoluteY >= bottom) {
|
|
59405
|
-
return findAfter(candRow, bottom);
|
|
59406
|
-
}
|
|
59407
|
-
return findBefore(candRow, bottom);
|
|
59408
|
-
}
|
|
59409
|
-
function getTargetColAtConsiderRightFrozen(absoluteX, isConsider, _this) {
|
|
59410
|
-
if (absoluteX === 0) {
|
|
59411
|
-
return { left: 0, col: 0, right: 0, width: 0 };
|
|
59412
|
-
}
|
|
59413
|
-
if (isConsider &&
|
|
59414
|
-
absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() &&
|
|
59415
|
-
absoluteX < _this.tableNoFrameWidth) {
|
|
59416
|
-
for (let i = 0; i < _this.rightFrozenColCount; i++) {
|
|
59417
|
-
if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) {
|
|
59418
|
-
return {
|
|
59419
|
-
col: _this.colCount - i - 1,
|
|
59420
|
-
left: undefined,
|
|
59421
|
-
right: undefined,
|
|
59422
|
-
width: undefined
|
|
59423
|
-
};
|
|
59424
|
-
}
|
|
59425
|
-
}
|
|
59426
|
-
}
|
|
59427
|
-
return getTargetColAt(absoluteX, _this);
|
|
59428
|
-
}
|
|
59429
|
-
function getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider, _this) {
|
|
59430
|
-
if (absoluteY === 0) {
|
|
59431
|
-
return { top: 0, row: 0, bottom: 0, height: 0 };
|
|
59432
|
-
}
|
|
59433
|
-
if (isConsider &&
|
|
59434
|
-
absoluteY > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() &&
|
|
59435
|
-
absoluteY < _this.tableNoFrameHeight) {
|
|
59436
|
-
for (let i = 0; i < _this.rightFrozenColCount; i++) {
|
|
59437
|
-
if (absoluteY > _this.tableNoFrameHeight - _this.getRowsHeight(_this.rowCount - i - 1, _this.rowCount - 1)) {
|
|
59438
|
-
return {
|
|
59439
|
-
row: _this.rowCount - i - 1,
|
|
59440
|
-
top: undefined,
|
|
59441
|
-
bottom: undefined,
|
|
59442
|
-
height: undefined
|
|
59443
|
-
};
|
|
59444
|
-
}
|
|
59445
|
-
}
|
|
59446
|
-
}
|
|
59447
|
-
return getTargetRowAt(absoluteY, _this);
|
|
59448
|
-
}
|
|
59449
|
-
function computeTargetRowByY(absoluteY, _this) {
|
|
59450
|
-
let defaultRowHeight = _this.internalProps.defaultRowHeight;
|
|
59451
|
-
if (_this._rowRangeHeightsMap.get(`$0$${_this.rowCount - 1}`)) {
|
|
59452
|
-
defaultRowHeight = _this._rowRangeHeightsMap.get(`$0$${_this.rowCount - 1}`) / _this.rowCount;
|
|
59453
|
-
}
|
|
59454
|
-
return Math.min(Math.ceil(absoluteY / defaultRowHeight), _this.rowCount - 1);
|
|
59455
|
-
}
|
|
59456
|
-
function computeTargetColByX(absoluteX, _this) {
|
|
59457
|
-
if (_this._colRangeWidthsMap.get(`$0$${_this.colCount - 1}`)) {
|
|
59458
|
-
let startCol = 0;
|
|
59459
|
-
let endCol = _this.colCount - 1;
|
|
59460
|
-
while (endCol - startCol > 1) {
|
|
59461
|
-
const midCol = Math.floor((startCol + endCol) / 2);
|
|
59462
|
-
if (absoluteX < _this._colRangeWidthsMap.get(`$0$${midCol}`)) {
|
|
59463
|
-
endCol = midCol;
|
|
59464
|
-
}
|
|
59465
|
-
else if (absoluteX > _this._colRangeWidthsMap.get(`$0$${midCol}`)) {
|
|
59466
|
-
startCol = midCol;
|
|
59467
|
-
}
|
|
59468
|
-
else {
|
|
59469
|
-
return midCol;
|
|
59470
|
-
}
|
|
59471
|
-
}
|
|
59472
|
-
return endCol;
|
|
59473
|
-
}
|
|
59474
|
-
return Math.min(Math.ceil(absoluteX / _this.internalProps.defaultColWidth), _this.colCount - 1);
|
|
59475
|
-
}
|
|
59476
|
-
function getCellAtRelativePosition(x, y, _this) {
|
|
59477
|
-
x -= _this.tableX;
|
|
59478
|
-
y -= _this.tableY;
|
|
59479
|
-
let bottomFrozen = false;
|
|
59480
|
-
if (y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight) {
|
|
59481
|
-
bottomFrozen = true;
|
|
59482
|
-
}
|
|
59483
|
-
let rightFrozen = false;
|
|
59484
|
-
if (x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth) {
|
|
59485
|
-
rightFrozen = true;
|
|
59486
|
-
}
|
|
59487
|
-
const colInfo = getTargetColAtConsiderRightFrozen(rightFrozen ? x : x + _this.scrollLeft, rightFrozen, _this);
|
|
59488
|
-
const rowInfo = getTargetRowAtConsiderBottomFrozen(bottomFrozen ? y : y + _this.scrollTop, bottomFrozen, _this);
|
|
59489
|
-
const { row, top, bottom, height } = rowInfo;
|
|
59490
|
-
const { col, left, right, width } = colInfo;
|
|
59491
|
-
const rect = {
|
|
59492
|
-
left,
|
|
59493
|
-
right,
|
|
59494
|
-
top,
|
|
59495
|
-
bottom,
|
|
59496
|
-
width,
|
|
59497
|
-
height
|
|
59498
|
-
};
|
|
59499
|
-
return {
|
|
59500
|
-
row,
|
|
59501
|
-
col,
|
|
59502
|
-
rect
|
|
59503
|
-
};
|
|
59504
|
-
}
|
|
59505
|
-
|
|
59506
59237
|
const { toBoxArray } = style;
|
|
59507
59238
|
const { isTouchEvent } = event;
|
|
59508
59239
|
const rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
@@ -59535,7 +59266,7 @@
|
|
|
59535
59266
|
return TABLE_EVENT_TYPE;
|
|
59536
59267
|
}
|
|
59537
59268
|
options;
|
|
59538
|
-
version = "1.3.2
|
|
59269
|
+
version = "1.3.2";
|
|
59539
59270
|
pagination;
|
|
59540
59271
|
id = `VTable${Date.now()}`;
|
|
59541
59272
|
headerStyleCache;
|
|
@@ -59549,7 +59280,7 @@
|
|
|
59549
59280
|
_hasAutoImageColumn;
|
|
59550
59281
|
constructor(container, options = {}) {
|
|
59551
59282
|
super();
|
|
59552
|
-
if (!container && options.mode !== 'node'
|
|
59283
|
+
if (!container && options.mode !== 'node') {
|
|
59553
59284
|
throw new Error("vtable's container is undefined");
|
|
59554
59285
|
}
|
|
59555
59286
|
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight, clearDOM = true } = options;
|
|
@@ -59587,14 +59318,7 @@
|
|
|
59587
59318
|
if (typeof allowFrozenColCount === 'number' && allowFrozenColCount <= 0) {
|
|
59588
59319
|
this.showFrozenIcon = false;
|
|
59589
59320
|
}
|
|
59590
|
-
if (
|
|
59591
|
-
internalProps.element = this.options.canvas.parentElement;
|
|
59592
|
-
internalProps.element.style.position = 'relative';
|
|
59593
|
-
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
59594
|
-
internalProps.canvas = this.options.canvas;
|
|
59595
|
-
internalProps.context = internalProps.canvas.getContext('2d');
|
|
59596
|
-
}
|
|
59597
|
-
else if (Env.mode !== 'node') {
|
|
59321
|
+
if (Env.mode !== 'node') {
|
|
59598
59322
|
internalProps.element = createRootElement(this.padding);
|
|
59599
59323
|
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
59600
59324
|
internalProps.canvas = document.createElement('canvas');
|
|
@@ -59991,21 +59715,7 @@
|
|
|
59991
59715
|
const { padding } = this;
|
|
59992
59716
|
let widthP = 0;
|
|
59993
59717
|
let heightP = 0;
|
|
59994
|
-
|
|
59995
|
-
this.tableY = 0;
|
|
59996
|
-
if (this.options.canvas && this.options.viewBox) {
|
|
59997
|
-
widthP = this.options.viewBox.x2 - this.options.viewBox.x1;
|
|
59998
|
-
heightP = this.options.viewBox.y2 - this.options.viewBox.y1;
|
|
59999
|
-
if (this?.scenegraph?.stage) {
|
|
60000
|
-
if (this.options.viewBox) {
|
|
60001
|
-
this.scenegraph.stage.setViewBox(this.options.viewBox, false);
|
|
60002
|
-
}
|
|
60003
|
-
else {
|
|
60004
|
-
this.scenegraph.stage.resize(widthP, heightP);
|
|
60005
|
-
}
|
|
60006
|
-
}
|
|
60007
|
-
}
|
|
60008
|
-
else if (Env.mode === 'browser') {
|
|
59718
|
+
if (Env.mode === 'browser') {
|
|
60009
59719
|
const element = this.getElement();
|
|
60010
59720
|
let widthWithoutPadding = 0;
|
|
60011
59721
|
let heightWithoutPadding = 0;
|
|
@@ -60064,23 +59774,6 @@
|
|
|
60064
59774
|
}
|
|
60065
59775
|
}
|
|
60066
59776
|
}
|
|
60067
|
-
updateViewBox(newViewBox) {
|
|
60068
|
-
const oldWidth = this.options?.viewBox.x2 ?? 0 - this.options?.viewBox.x1 ?? 0;
|
|
60069
|
-
const oldHeight = this.options?.viewBox.y2 ?? 0 - this.options?.viewBox.y1 ?? 0;
|
|
60070
|
-
const newWidth = newViewBox.x2 - newViewBox.x1;
|
|
60071
|
-
const newHeight = newViewBox.y2 - newViewBox.y1;
|
|
60072
|
-
this.options.viewBox = newViewBox;
|
|
60073
|
-
if (oldWidth !== newWidth || oldHeight !== newHeight) {
|
|
60074
|
-
this.resize();
|
|
60075
|
-
}
|
|
60076
|
-
else {
|
|
60077
|
-
this.scenegraph.stage.setViewBox(this.options.viewBox, true);
|
|
60078
|
-
}
|
|
60079
|
-
}
|
|
60080
|
-
setViewBoxTransform(a, b, c, d, e, f) {
|
|
60081
|
-
this.internalProps.modifiedViewBoxTransform = true;
|
|
60082
|
-
this.scenegraph.stage.window.setViewBoxTransform(a, b, c, d, e, f);
|
|
60083
|
-
}
|
|
60084
59777
|
get rowHierarchyType() {
|
|
60085
59778
|
return 'grid';
|
|
60086
59779
|
}
|
|
@@ -60531,16 +60224,55 @@
|
|
|
60531
60224
|
return null;
|
|
60532
60225
|
}
|
|
60533
60226
|
getRowAt(absoluteY) {
|
|
60534
|
-
|
|
60227
|
+
const frozen = _getTargetFrozenRowAt(this, absoluteY);
|
|
60228
|
+
if (frozen) {
|
|
60229
|
+
return frozen;
|
|
60230
|
+
}
|
|
60231
|
+
let row = this.getTargetRowAt(absoluteY);
|
|
60232
|
+
if (!row) {
|
|
60233
|
+
row = {
|
|
60234
|
+
top: -1,
|
|
60235
|
+
row: -1,
|
|
60236
|
+
bottom: -1,
|
|
60237
|
+
height: -1
|
|
60238
|
+
};
|
|
60239
|
+
}
|
|
60240
|
+
return row;
|
|
60535
60241
|
}
|
|
60536
60242
|
getColAt(absoluteX) {
|
|
60537
|
-
|
|
60243
|
+
const frozen = _getTargetFrozenColAt(this, absoluteX);
|
|
60244
|
+
if (frozen) {
|
|
60245
|
+
return frozen;
|
|
60246
|
+
}
|
|
60247
|
+
let col = this.getTargetColAt(absoluteX);
|
|
60248
|
+
if (!col) {
|
|
60249
|
+
col = {
|
|
60250
|
+
left: -1,
|
|
60251
|
+
col: -1,
|
|
60252
|
+
right: -1,
|
|
60253
|
+
width: 1
|
|
60254
|
+
};
|
|
60255
|
+
}
|
|
60256
|
+
return col;
|
|
60538
60257
|
}
|
|
60539
60258
|
getCellAt(absoluteX, absoluteY) {
|
|
60540
|
-
|
|
60541
|
-
|
|
60542
|
-
|
|
60543
|
-
|
|
60259
|
+
const rowInfo = this.getRowAt(absoluteY);
|
|
60260
|
+
const { row, top, bottom, height } = rowInfo;
|
|
60261
|
+
const colInfo = this.getColAt(absoluteX);
|
|
60262
|
+
const { col, left, right, width } = colInfo;
|
|
60263
|
+
const rect = {
|
|
60264
|
+
left,
|
|
60265
|
+
right,
|
|
60266
|
+
top,
|
|
60267
|
+
bottom,
|
|
60268
|
+
width,
|
|
60269
|
+
height
|
|
60270
|
+
};
|
|
60271
|
+
return {
|
|
60272
|
+
row,
|
|
60273
|
+
col,
|
|
60274
|
+
rect
|
|
60275
|
+
};
|
|
60544
60276
|
}
|
|
60545
60277
|
_checkRowCol(col, row) {
|
|
60546
60278
|
if (col >= 0 && col < this.colCount && row >= 0 && row < this.rowCount) {
|
|
@@ -60595,8 +60327,6 @@
|
|
|
60595
60327
|
const visibleRect = this.getVisibleRect();
|
|
60596
60328
|
rect.offsetLeft(this.tableX - (relativeX ? visibleRect.left : 0));
|
|
60597
60329
|
rect.offsetTop(this.tableY - (relativeY ? visibleRect.top : 0));
|
|
60598
|
-
rect.offsetLeft(this.options.viewBox?.x1 ?? 0);
|
|
60599
|
-
rect.offsetTop(this.options.viewBox?.y1 ?? 0);
|
|
60600
60330
|
return rect;
|
|
60601
60331
|
}
|
|
60602
60332
|
getVisibleRect() {
|
|
@@ -60756,9 +60486,8 @@
|
|
|
60756
60486
|
}
|
|
60757
60487
|
this.scenegraph.stage.release();
|
|
60758
60488
|
this.scenegraph.proxy.release();
|
|
60759
|
-
internalProps.focusControl.release();
|
|
60760
60489
|
const { parentElement } = internalProps.element;
|
|
60761
|
-
if (parentElement
|
|
60490
|
+
if (parentElement) {
|
|
60762
60491
|
parentElement.removeChild(internalProps.element);
|
|
60763
60492
|
}
|
|
60764
60493
|
this.editorManager?.editingEditor?.onEnd?.();
|
|
@@ -60981,29 +60710,171 @@
|
|
|
60981
60710
|
const currentHeight = rect.height;
|
|
60982
60711
|
const originHeight = this.canvas.offsetHeight || currentHeight;
|
|
60983
60712
|
const heightRatio = currentHeight / originHeight;
|
|
60984
|
-
const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0)
|
|
60985
|
-
const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0)
|
|
60986
|
-
|
|
60987
|
-
if (this.internalProps.modifiedViewBoxTransform && this.scenegraph.stage.window.getViewBoxTransform()) {
|
|
60988
|
-
const transform = this.scenegraph.stage.window.getViewBoxTransform();
|
|
60989
|
-
transform.transformPoint(point, point);
|
|
60990
|
-
}
|
|
60991
|
-
return point;
|
|
60713
|
+
const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0);
|
|
60714
|
+
const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0);
|
|
60715
|
+
return { x, y, inTable };
|
|
60992
60716
|
}
|
|
60993
60717
|
getTheme() {
|
|
60994
60718
|
return this.internalProps.theme;
|
|
60995
60719
|
}
|
|
60996
60720
|
getTargetColAt(absoluteX) {
|
|
60997
|
-
|
|
60721
|
+
if (absoluteX === 0) {
|
|
60722
|
+
return { left: 0, col: 0, right: 0, width: 0 };
|
|
60723
|
+
}
|
|
60724
|
+
const findBefore = (startCol, startRight) => {
|
|
60725
|
+
let right = startRight;
|
|
60726
|
+
for (let col = startCol; col >= 0; col--) {
|
|
60727
|
+
const width = this.getColWidth(col);
|
|
60728
|
+
const left = right - width;
|
|
60729
|
+
if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
|
|
60730
|
+
return {
|
|
60731
|
+
left,
|
|
60732
|
+
col,
|
|
60733
|
+
right,
|
|
60734
|
+
width
|
|
60735
|
+
};
|
|
60736
|
+
}
|
|
60737
|
+
right = left;
|
|
60738
|
+
}
|
|
60739
|
+
return null;
|
|
60740
|
+
};
|
|
60741
|
+
const findAfter = (startCol, startRight) => {
|
|
60742
|
+
let left = startRight - this.getColWidth(startCol);
|
|
60743
|
+
const { colCount } = this.internalProps;
|
|
60744
|
+
for (let col = startCol; col < colCount; col++) {
|
|
60745
|
+
const width = this.getColWidth(col);
|
|
60746
|
+
const right = left + width;
|
|
60747
|
+
if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) {
|
|
60748
|
+
return {
|
|
60749
|
+
left,
|
|
60750
|
+
col,
|
|
60751
|
+
right,
|
|
60752
|
+
width
|
|
60753
|
+
};
|
|
60754
|
+
}
|
|
60755
|
+
left = right;
|
|
60756
|
+
}
|
|
60757
|
+
return null;
|
|
60758
|
+
};
|
|
60759
|
+
const candCol = this.computeTargetColByX(absoluteX);
|
|
60760
|
+
const right = this.getColsWidth(0, candCol);
|
|
60761
|
+
if (absoluteX >= right) {
|
|
60762
|
+
return findAfter(candCol, right);
|
|
60763
|
+
}
|
|
60764
|
+
return findBefore(candCol, right);
|
|
60998
60765
|
}
|
|
60999
60766
|
getTargetRowAt(absoluteY) {
|
|
61000
|
-
|
|
60767
|
+
if (absoluteY === 0) {
|
|
60768
|
+
return { top: 0, row: 0, bottom: 0, height: 0 };
|
|
60769
|
+
}
|
|
60770
|
+
const findBefore = (startRow, startBottom) => {
|
|
60771
|
+
let bottom = startBottom;
|
|
60772
|
+
for (let row = startRow; row >= 0; row--) {
|
|
60773
|
+
const height = this.getRowHeight(row);
|
|
60774
|
+
const top = bottom - height;
|
|
60775
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
|
|
60776
|
+
return {
|
|
60777
|
+
top,
|
|
60778
|
+
row,
|
|
60779
|
+
bottom,
|
|
60780
|
+
height
|
|
60781
|
+
};
|
|
60782
|
+
}
|
|
60783
|
+
bottom = top;
|
|
60784
|
+
}
|
|
60785
|
+
return null;
|
|
60786
|
+
};
|
|
60787
|
+
const findAfter = (startRow, startBottom) => {
|
|
60788
|
+
let top = startBottom - this.getRowHeight(startRow);
|
|
60789
|
+
const { rowCount } = this.internalProps;
|
|
60790
|
+
for (let row = startRow; row < rowCount; row++) {
|
|
60791
|
+
const height = this.getRowHeight(row);
|
|
60792
|
+
const bottom = top + height;
|
|
60793
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) {
|
|
60794
|
+
return {
|
|
60795
|
+
top,
|
|
60796
|
+
row,
|
|
60797
|
+
bottom,
|
|
60798
|
+
height
|
|
60799
|
+
};
|
|
60800
|
+
}
|
|
60801
|
+
top = bottom;
|
|
60802
|
+
}
|
|
60803
|
+
return null;
|
|
60804
|
+
};
|
|
60805
|
+
const candRow = this.computeTargetRowByY(absoluteY);
|
|
60806
|
+
const bottom = this.getRowsHeight(0, candRow);
|
|
60807
|
+
if (absoluteY >= bottom) {
|
|
60808
|
+
return findAfter(candRow, bottom);
|
|
60809
|
+
}
|
|
60810
|
+
return findBefore(candRow, bottom);
|
|
61001
60811
|
}
|
|
61002
60812
|
getTargetColAtConsiderRightFrozen(absoluteX, isConsider) {
|
|
61003
|
-
|
|
60813
|
+
if (absoluteX === 0) {
|
|
60814
|
+
return { left: 0, col: 0, right: 0, width: 0 };
|
|
60815
|
+
}
|
|
60816
|
+
if (isConsider &&
|
|
60817
|
+
absoluteX > this.tableNoFrameWidth - this.getRightFrozenColsWidth() &&
|
|
60818
|
+
absoluteX < this.tableNoFrameWidth) {
|
|
60819
|
+
for (let i = 0; i < this.rightFrozenColCount; i++) {
|
|
60820
|
+
if (absoluteX > this.tableNoFrameWidth - this.getColsWidth(this.colCount - i - 1, this.colCount - 1)) {
|
|
60821
|
+
return {
|
|
60822
|
+
col: this.colCount - i - 1,
|
|
60823
|
+
left: undefined,
|
|
60824
|
+
right: undefined,
|
|
60825
|
+
width: undefined
|
|
60826
|
+
};
|
|
60827
|
+
}
|
|
60828
|
+
}
|
|
60829
|
+
}
|
|
60830
|
+
return this.getTargetColAt(absoluteX);
|
|
61004
60831
|
}
|
|
61005
60832
|
getTargetRowAtConsiderBottomFrozen(absoluteY, isConsider) {
|
|
61006
|
-
|
|
60833
|
+
if (absoluteY === 0) {
|
|
60834
|
+
return { top: 0, row: 0, bottom: 0, height: 0 };
|
|
60835
|
+
}
|
|
60836
|
+
if (isConsider &&
|
|
60837
|
+
absoluteY > this.tableNoFrameHeight - this.getBottomFrozenRowsHeight() &&
|
|
60838
|
+
absoluteY < this.tableNoFrameHeight) {
|
|
60839
|
+
for (let i = 0; i < this.rightFrozenColCount; i++) {
|
|
60840
|
+
if (absoluteY > this.tableNoFrameHeight - this.getRowsHeight(this.rowCount - i - 1, this.rowCount - 1)) {
|
|
60841
|
+
return {
|
|
60842
|
+
row: this.rowCount - i - 1,
|
|
60843
|
+
top: undefined,
|
|
60844
|
+
bottom: undefined,
|
|
60845
|
+
height: undefined
|
|
60846
|
+
};
|
|
60847
|
+
}
|
|
60848
|
+
}
|
|
60849
|
+
}
|
|
60850
|
+
return this.getTargetRowAt(absoluteY);
|
|
60851
|
+
}
|
|
60852
|
+
computeTargetRowByY(absoluteY) {
|
|
60853
|
+
let defaultRowHeight = this.internalProps.defaultRowHeight;
|
|
60854
|
+
if (this._rowRangeHeightsMap.get(`$0$${this.rowCount - 1}`)) {
|
|
60855
|
+
defaultRowHeight = this._rowRangeHeightsMap.get(`$0$${this.rowCount - 1}`) / this.rowCount;
|
|
60856
|
+
}
|
|
60857
|
+
return Math.min(Math.ceil(absoluteY / defaultRowHeight), this.rowCount - 1);
|
|
60858
|
+
}
|
|
60859
|
+
computeTargetColByX(absoluteX) {
|
|
60860
|
+
if (this._colRangeWidthsMap.get(`$0$${this.colCount - 1}`)) {
|
|
60861
|
+
let startCol = 0;
|
|
60862
|
+
let endCol = this.colCount - 1;
|
|
60863
|
+
while (endCol - startCol > 1) {
|
|
60864
|
+
const midCol = Math.floor((startCol + endCol) / 2);
|
|
60865
|
+
if (absoluteX < this._colRangeWidthsMap.get(`$0$${midCol}`)) {
|
|
60866
|
+
endCol = midCol;
|
|
60867
|
+
}
|
|
60868
|
+
else if (absoluteX > this._colRangeWidthsMap.get(`$0$${midCol}`)) {
|
|
60869
|
+
startCol = midCol;
|
|
60870
|
+
}
|
|
60871
|
+
else {
|
|
60872
|
+
return midCol;
|
|
60873
|
+
}
|
|
60874
|
+
}
|
|
60875
|
+
return endCol;
|
|
60876
|
+
}
|
|
60877
|
+
return Math.min(Math.ceil(absoluteX / this.internalProps.defaultColWidth), this.colCount - 1);
|
|
61007
60878
|
}
|
|
61008
60879
|
clearSelected() {
|
|
61009
60880
|
this.stateManager.updateSelectPos(-1, -1);
|
|
@@ -61946,35 +61817,69 @@
|
|
|
61946
61817
|
if (col < this.frozenColCount && row < this.frozenRowCount) {
|
|
61947
61818
|
return true;
|
|
61948
61819
|
}
|
|
61949
|
-
|
|
61950
|
-
|
|
61951
|
-
|
|
61952
|
-
|
|
61953
|
-
|
|
61954
|
-
|
|
61955
|
-
|
|
61956
|
-
|
|
61957
|
-
|
|
61958
|
-
|
|
61959
|
-
|
|
61960
|
-
|
|
61961
|
-
|
|
61962
|
-
|
|
61963
|
-
|
|
61964
|
-
|
|
61965
|
-
|
|
61966
|
-
|
|
61967
|
-
|
|
61968
|
-
|
|
61820
|
+
let colHeaderRangeRect;
|
|
61821
|
+
if (this.frozenRowCount >= 1) {
|
|
61822
|
+
colHeaderRangeRect = this.getCellRangeRelativeRect({
|
|
61823
|
+
start: {
|
|
61824
|
+
col: 0,
|
|
61825
|
+
row: 0
|
|
61826
|
+
},
|
|
61827
|
+
end: {
|
|
61828
|
+
col: this.colCount - 1,
|
|
61829
|
+
row: this.frozenRowCount - 1
|
|
61830
|
+
}
|
|
61831
|
+
});
|
|
61832
|
+
}
|
|
61833
|
+
let rowHeaderRangeRect;
|
|
61834
|
+
if (this.frozenColCount >= 1) {
|
|
61835
|
+
rowHeaderRangeRect = this.getCellRangeRelativeRect({
|
|
61836
|
+
start: {
|
|
61837
|
+
col: 0,
|
|
61838
|
+
row: 0
|
|
61839
|
+
},
|
|
61840
|
+
end: {
|
|
61841
|
+
col: this.frozenColCount - 1,
|
|
61842
|
+
row: this.rowCount - 1
|
|
61843
|
+
}
|
|
61844
|
+
});
|
|
61845
|
+
}
|
|
61846
|
+
let bottomFrozenRangeRect;
|
|
61847
|
+
if (this.bottomFrozenRowCount >= 1) {
|
|
61848
|
+
bottomFrozenRangeRect = this.getCellRangeRelativeRect({
|
|
61849
|
+
start: {
|
|
61850
|
+
col: 0,
|
|
61851
|
+
row: this.rowCount - this.bottomFrozenRowCount
|
|
61852
|
+
},
|
|
61853
|
+
end: {
|
|
61854
|
+
col: this.colCount - 1,
|
|
61855
|
+
row: this.rowCount - 1
|
|
61856
|
+
}
|
|
61857
|
+
});
|
|
61858
|
+
}
|
|
61859
|
+
let rightFrozenRangeRect;
|
|
61860
|
+
if (this.rightFrozenColCount >= 1) {
|
|
61861
|
+
rightFrozenRangeRect = this.getCellRangeRelativeRect({
|
|
61862
|
+
start: {
|
|
61863
|
+
col: this.colCount - this.rightFrozenColCount,
|
|
61864
|
+
row: 0
|
|
61865
|
+
},
|
|
61866
|
+
end: {
|
|
61867
|
+
col: this.colCount - 1,
|
|
61868
|
+
row: this.rowCount - 1
|
|
61869
|
+
}
|
|
61870
|
+
});
|
|
61871
|
+
}
|
|
61969
61872
|
if (rect.top >= drawRange.top &&
|
|
61970
61873
|
rect.bottom <= drawRange.bottom &&
|
|
61971
61874
|
rect.left >= drawRange.left &&
|
|
61972
61875
|
rect.right <= drawRange.right) {
|
|
61973
|
-
if (this.
|
|
61876
|
+
if (this.isFrozenCell(col, row)) {
|
|
61974
61877
|
return true;
|
|
61975
61878
|
}
|
|
61976
|
-
else if (
|
|
61977
|
-
|
|
61879
|
+
else if (rect.top >= (colHeaderRangeRect?.bottom ?? rect.top) &&
|
|
61880
|
+
rect.left >= (rowHeaderRangeRect?.right ?? rect.left) &&
|
|
61881
|
+
rect.bottom <= (bottomFrozenRangeRect?.top ?? rect.bottom) &&
|
|
61882
|
+
rect.right <= (rightFrozenRangeRect?.left ?? rect.right)) {
|
|
61978
61883
|
return true;
|
|
61979
61884
|
}
|
|
61980
61885
|
}
|
|
@@ -64269,10 +64174,12 @@
|
|
|
64269
64174
|
const topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol
|
|
64270
64175
|
? this.table.getFrozenRowsHeight()
|
|
64271
64176
|
: 0;
|
|
64272
|
-
const width = (this.table.columnHeaderLevelCount > 0
|
|
64273
|
-
|
|
64274
|
-
|
|
64275
|
-
|
|
64177
|
+
const width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable()
|
|
64178
|
+
? this.table.getDrawRange().width
|
|
64179
|
+
: this.table.tableNoFrameWidth) - leftHeaderWidth;
|
|
64180
|
+
const height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable()
|
|
64181
|
+
? this.table.getDrawRange().height
|
|
64182
|
+
: this.table.tableNoFrameHeight) - topHeaderHeight;
|
|
64276
64183
|
this._emptyTipComponent.setAttributes({
|
|
64277
64184
|
spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
|
|
64278
64185
|
x: this.table.tableX + leftHeaderWidth,
|
|
@@ -64315,10 +64222,12 @@
|
|
|
64315
64222
|
const topHeaderHeight = !this.table.transpose || this.table.options.indicatorsAsCol
|
|
64316
64223
|
? this.table.getFrozenRowsHeight()
|
|
64317
64224
|
: 0;
|
|
64318
|
-
const width = (this.table.columnHeaderLevelCount > 0
|
|
64319
|
-
|
|
64320
|
-
|
|
64321
|
-
|
|
64225
|
+
const width = (this.table.columnHeaderLevelCount > 0 && this.table.isListTable()
|
|
64226
|
+
? this.table.getDrawRange().width
|
|
64227
|
+
: this.table.tableNoFrameWidth) - leftHeaderWidth;
|
|
64228
|
+
const height = (this.table.rowHeaderLevelCount > 0 && this.table.isListTable()
|
|
64229
|
+
? this.table.getDrawRange().height
|
|
64230
|
+
: this.table.tableNoFrameHeight) - topHeaderHeight;
|
|
64322
64231
|
return {
|
|
64323
64232
|
spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,
|
|
64324
64233
|
x: this.table.tableX + leftHeaderWidth,
|
|
@@ -65813,11 +65722,8 @@
|
|
|
65813
65722
|
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeys.valueArr();
|
|
65814
65723
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys);
|
|
65815
65724
|
this.resetRowHeaderLevelCount();
|
|
65816
|
-
this._generateColHeaderIds();
|
|
65817
|
-
this.colIndex = 0;
|
|
65818
|
-
this._generateRowHeaderIds();
|
|
65819
65725
|
if (this._table.isPivotChart()) {
|
|
65820
|
-
this.hasTwoIndicatorAxes = this.
|
|
65726
|
+
this.hasTwoIndicatorAxes = this.indicatorsDefine.some((indicatorObject) => {
|
|
65821
65727
|
if (indicatorObject.chartSpec &&
|
|
65822
65728
|
indicatorObject.chartSpec.series &&
|
|
65823
65729
|
indicatorObject.chartSpec.series.length > 1) {
|
|
@@ -65836,6 +65742,9 @@
|
|
|
65836
65742
|
});
|
|
65837
65743
|
}
|
|
65838
65744
|
this.resetColumnHeaderLevelCount();
|
|
65745
|
+
this._generateColHeaderIds();
|
|
65746
|
+
this.colIndex = 0;
|
|
65747
|
+
this._generateRowHeaderIds();
|
|
65839
65748
|
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL);
|
|
65840
65749
|
if (table.options.rowHierarchyType === 'tree' && this.extensionRows?.length >= 1) {
|
|
65841
65750
|
this.generateExtensionRowTree();
|
|
@@ -65855,7 +65764,21 @@
|
|
|
65855
65764
|
}
|
|
65856
65765
|
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
65857
65766
|
if (this.cornerSetting.titleOnDimension === 'column') {
|
|
65858
|
-
|
|
65767
|
+
let colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
65768
|
+
if (this.dataset &&
|
|
65769
|
+
(this.dataset.records?.length ?? 0) === 0 &&
|
|
65770
|
+
!this.dataset.customColTree &&
|
|
65771
|
+
!this.dataset.customRowTree) {
|
|
65772
|
+
colDimensionKeys = this.columnsDefine.map(define => {
|
|
65773
|
+
if (typeof define === 'string') {
|
|
65774
|
+
return define;
|
|
65775
|
+
}
|
|
65776
|
+
return define.dimensionKey;
|
|
65777
|
+
});
|
|
65778
|
+
if (this.indicatorsAsCol) {
|
|
65779
|
+
colDimensionKeys.push(this.indicatorDimensionKey);
|
|
65780
|
+
}
|
|
65781
|
+
}
|
|
65859
65782
|
this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [''].concat(colDimensionKeys) : colDimensionKeys, this.columnsDefine);
|
|
65860
65783
|
}
|
|
65861
65784
|
else if (this.cornerSetting.titleOnDimension === 'row') {
|
|
@@ -65871,7 +65794,21 @@
|
|
|
65871
65794
|
this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [''].concat(rowTreeFirstKey) : rowTreeFirstKey, this.rowsDefine.concat(extensionRowDimensions));
|
|
65872
65795
|
}
|
|
65873
65796
|
else {
|
|
65874
|
-
|
|
65797
|
+
let rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
65798
|
+
if (this.dataset &&
|
|
65799
|
+
(this.dataset.records?.length ?? 0) === 0 &&
|
|
65800
|
+
!this.dataset.customColTree &&
|
|
65801
|
+
!this.dataset.customRowTree) {
|
|
65802
|
+
rowDimensionKeys = this.rowsDefine.map(define => {
|
|
65803
|
+
if (typeof define === 'string') {
|
|
65804
|
+
return define;
|
|
65805
|
+
}
|
|
65806
|
+
return define.dimensionKey;
|
|
65807
|
+
});
|
|
65808
|
+
if (!this.indicatorsAsCol) {
|
|
65809
|
+
rowDimensionKeys.push(this.indicatorDimensionKey);
|
|
65810
|
+
}
|
|
65811
|
+
}
|
|
65875
65812
|
this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [''].concat(rowDimensionKeys) : rowDimensionKeys, this.rowsDefine);
|
|
65876
65813
|
}
|
|
65877
65814
|
}
|
|
@@ -65977,12 +65914,24 @@
|
|
|
65977
65914
|
}
|
|
65978
65915
|
_generateColHeaderIds() {
|
|
65979
65916
|
if (this.columnDimensionTree.tree.children?.length >= 1) {
|
|
65980
|
-
|
|
65917
|
+
let startRow = 0;
|
|
65918
|
+
if (this.dataset &&
|
|
65919
|
+
(this.dataset.records?.length ?? 0) === 0 &&
|
|
65920
|
+
!this.dataset.customColTree &&
|
|
65921
|
+
!this.dataset.customRowTree &&
|
|
65922
|
+
this.indicatorsAsCol &&
|
|
65923
|
+
this.columnDimensionTree.totalLevel < this.columnHeaderLevelCount) {
|
|
65924
|
+
startRow = this.columnHeaderLevelCount - this.columnDimensionTree.totalLevel;
|
|
65925
|
+
for (let i = 0; i < startRow; i++) {
|
|
65926
|
+
this._columnHeaderCellFullPathIds.unshift([]);
|
|
65927
|
+
}
|
|
65928
|
+
}
|
|
65929
|
+
this._addHeaders(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs);
|
|
65981
65930
|
}
|
|
65982
65931
|
if (this.columnHeaderTitle) {
|
|
65983
65932
|
this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
|
|
65984
65933
|
const id = ++this.sharedVar.seqId;
|
|
65985
|
-
const firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
|
|
65934
|
+
const firstRowIds = Array(this.colCount - this.rowHeaderLevelCount - this.rightFrozenColCount).fill(id);
|
|
65986
65935
|
this._columnHeaderCellFullPathIds.unshift(firstRowIds);
|
|
65987
65936
|
const cell = {
|
|
65988
65937
|
id,
|
|
@@ -66013,7 +65962,19 @@
|
|
|
66013
65962
|
this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, true, this.rowsDefine, this.rowHeaderObjs);
|
|
66014
65963
|
}
|
|
66015
65964
|
else {
|
|
66016
|
-
|
|
65965
|
+
let startRow = 0;
|
|
65966
|
+
if (this.dataset &&
|
|
65967
|
+
(this.dataset.records?.length ?? 0) === 0 &&
|
|
65968
|
+
!this.dataset.customColTree &&
|
|
65969
|
+
!this.dataset.customRowTree &&
|
|
65970
|
+
!this.indicatorsAsCol &&
|
|
65971
|
+
this.rowDimensionTree.totalLevel < this.rowHeaderLevelCount) {
|
|
65972
|
+
startRow = this.rowHeaderLevelCount - this.rowDimensionTree.totalLevel;
|
|
65973
|
+
for (let i = 0; i < startRow; i++) {
|
|
65974
|
+
this._rowHeaderCellFullPathIds_FULL.unshift([]);
|
|
65975
|
+
}
|
|
65976
|
+
}
|
|
65977
|
+
this._addHeaders(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs);
|
|
66017
65978
|
}
|
|
66018
65979
|
}
|
|
66019
65980
|
if (this.rowHeaderTitle) {
|
|
@@ -66538,6 +66499,25 @@
|
|
|
66538
66499
|
checkHasCartesianChart(this.indicatorsDefine)) {
|
|
66539
66500
|
count -= 1;
|
|
66540
66501
|
}
|
|
66502
|
+
if (count === 0 && this.dataset && !this.dataset.customColTree && !this.dataset.customRowTree) {
|
|
66503
|
+
if (this.cornerSetting.titleOnDimension === 'row') {
|
|
66504
|
+
count = 1;
|
|
66505
|
+
}
|
|
66506
|
+
else if ((this.dataset.records?.length ?? 0) === 0 && this.cornerSetting.titleOnDimension === 'column') {
|
|
66507
|
+
count = this.columnsDefine.length ?? 0;
|
|
66508
|
+
}
|
|
66509
|
+
}
|
|
66510
|
+
else if (this.dataset &&
|
|
66511
|
+
(this.dataset.records?.length ?? 0) === 0 &&
|
|
66512
|
+
!this.dataset.customColTree &&
|
|
66513
|
+
!this.dataset.customRowTree) {
|
|
66514
|
+
if (this.cornerSetting.titleOnDimension === 'column') {
|
|
66515
|
+
count = this.columnsDefine.length ?? 0;
|
|
66516
|
+
if (!this.hideIndicatorName && this.indicatorsAsCol) {
|
|
66517
|
+
count++;
|
|
66518
|
+
}
|
|
66519
|
+
}
|
|
66520
|
+
}
|
|
66541
66521
|
this.columnHeaderLevelCount = count;
|
|
66542
66522
|
return;
|
|
66543
66523
|
}
|
|
@@ -66565,6 +66545,25 @@
|
|
|
66565
66545
|
if (this.rowHeaderTitle) {
|
|
66566
66546
|
count += 1;
|
|
66567
66547
|
}
|
|
66548
|
+
if (count === 0 && this.dataset && !this.dataset.customColTree && !this.dataset.customRowTree) {
|
|
66549
|
+
if (this.cornerSetting.titleOnDimension === 'column') {
|
|
66550
|
+
count = 1;
|
|
66551
|
+
}
|
|
66552
|
+
else if ((this.dataset.records?.length ?? 0) === 0 && this.cornerSetting.titleOnDimension === 'row') {
|
|
66553
|
+
count = this.rowsDefine.length ?? 0;
|
|
66554
|
+
}
|
|
66555
|
+
}
|
|
66556
|
+
else if (this.dataset &&
|
|
66557
|
+
(this.dataset.records?.length ?? 0) === 0 &&
|
|
66558
|
+
!this.dataset.customColTree &&
|
|
66559
|
+
!this.dataset.customRowTree) {
|
|
66560
|
+
if (this.cornerSetting.titleOnDimension === 'row') {
|
|
66561
|
+
count = this.rowsDefine.length;
|
|
66562
|
+
if (!this.hideIndicatorName && !this.indicatorsAsCol) {
|
|
66563
|
+
count++;
|
|
66564
|
+
}
|
|
66565
|
+
}
|
|
66566
|
+
}
|
|
66568
66567
|
this.rowHeaderLevelCount = count;
|
|
66569
66568
|
return;
|
|
66570
66569
|
}
|
|
@@ -66676,16 +66675,16 @@
|
|
|
66676
66675
|
return '';
|
|
66677
66676
|
}
|
|
66678
66677
|
else if (this.isCornerHeader(col, row)) {
|
|
66679
|
-
return this._cornerHeaderCellIds[row][col - this.leftRowSeriesNumberColumnCount];
|
|
66678
|
+
return this._cornerHeaderCellIds[row]?.[col - this.leftRowSeriesNumberColumnCount];
|
|
66680
66679
|
}
|
|
66681
66680
|
else if (this.isColumnHeader(col, row)) {
|
|
66682
|
-
return this._columnHeaderCellIds[row][col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
|
|
66681
|
+
return this._columnHeaderCellIds[row]?.[col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
|
|
66683
66682
|
}
|
|
66684
66683
|
else if (this.isRowHeader(col, row)) {
|
|
66685
66684
|
return this._rowHeaderCellIds[row - this.columnHeaderLevelCount]?.[col - this.leftRowSeriesNumberColumnCount];
|
|
66686
66685
|
}
|
|
66687
66686
|
else if (this.isRightFrozenColumn(col, row)) {
|
|
66688
|
-
return this._rowHeaderCellIds[row - this.columnHeaderLevelCount][this.rowHeaderLevelCount - 1];
|
|
66687
|
+
return this._rowHeaderCellIds[row - this.columnHeaderLevelCount]?.[this.rowHeaderLevelCount - 1];
|
|
66689
66688
|
}
|
|
66690
66689
|
else if (this.isBottomFrozenRow(col, row)) {
|
|
66691
66690
|
return this._columnHeaderCellIds[this.columnHeaderLevelCount - 1]?.[col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
|
|
@@ -68077,10 +68076,10 @@
|
|
|
68077
68076
|
this.columnTree = dataset.colHeaderTree;
|
|
68078
68077
|
this.columnDimensionTree = new DimensionTree(this.columnTree ?? [], this.sharedVar);
|
|
68079
68078
|
this.rowDimensionTree = new DimensionTree(this.rowTree ?? [], this.sharedVar, this.rowHierarchyType, this.rowHierarchyType === 'tree' ? this.rowExpandLevel : undefined);
|
|
68079
|
+
this.resetColumnHeaderLevelCount();
|
|
68080
68080
|
this._generateColHeaderIds();
|
|
68081
68081
|
this.colIndex = 0;
|
|
68082
68082
|
this._generateRowHeaderIds();
|
|
68083
|
-
this.resetColumnHeaderLevelCount();
|
|
68084
68083
|
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL);
|
|
68085
68084
|
this._headerObjectMap = this._headerObjects.reduce((o, e) => {
|
|
68086
68085
|
o[e.id] = e;
|
|
@@ -68520,7 +68519,9 @@
|
|
|
68520
68519
|
collectedValues = {};
|
|
68521
68520
|
cacheCollectedValues = {};
|
|
68522
68521
|
rows;
|
|
68522
|
+
rowsHasValue;
|
|
68523
68523
|
columns;
|
|
68524
|
+
columnsHasValue;
|
|
68524
68525
|
indicatorKeys;
|
|
68525
68526
|
customRowTree;
|
|
68526
68527
|
customColTree;
|
|
@@ -68580,6 +68581,8 @@
|
|
|
68580
68581
|
this.rowFlatKeys = {};
|
|
68581
68582
|
this.colKeys = [];
|
|
68582
68583
|
this.rowKeys = [];
|
|
68584
|
+
this.rowsHasValue = [];
|
|
68585
|
+
this.columnsHasValue = [];
|
|
68583
68586
|
if (records) {
|
|
68584
68587
|
this.records = records;
|
|
68585
68588
|
typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
@@ -68600,19 +68603,25 @@
|
|
|
68600
68603
|
}
|
|
68601
68604
|
else {
|
|
68602
68605
|
if (this.rowHierarchyType === 'tree') {
|
|
68603
|
-
this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows,
|
|
68606
|
+
this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows.filter((key, index) => {
|
|
68607
|
+
return this.rowsHasValue[index];
|
|
68608
|
+
}), this.indicatorsAsCol ? undefined : this.indicators, this.totals?.row?.showGrandTotals ||
|
|
68604
68609
|
(!this.indicatorsAsCol && this.columns.length === 0) ||
|
|
68605
68610
|
(this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel);
|
|
68606
68611
|
}
|
|
68607
68612
|
else {
|
|
68608
|
-
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows
|
|
68613
|
+
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows.filter((key, index) => {
|
|
68614
|
+
return this.rowsHasValue[index];
|
|
68615
|
+
}), 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);
|
|
68609
68616
|
}
|
|
68610
68617
|
}
|
|
68611
68618
|
if (this.customColTree) {
|
|
68612
68619
|
this.colHeaderTree = this.customColTree;
|
|
68613
68620
|
}
|
|
68614
68621
|
else {
|
|
68615
|
-
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns
|
|
68622
|
+
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns.filter((key, index) => {
|
|
68623
|
+
return this.columnsHasValue[index];
|
|
68624
|
+
}), 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);
|
|
68616
68625
|
}
|
|
68617
68626
|
typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
68618
68627
|
if (this.dataConfig?.isPivotChart) {
|
|
@@ -68809,6 +68818,7 @@
|
|
|
68809
68818
|
for (let l = 0, len1 = this.rows.length; l < len1; l++) {
|
|
68810
68819
|
const rowAttr = this.rows[l];
|
|
68811
68820
|
if (rowAttr in record) {
|
|
68821
|
+
this.rowsHasValue[l] = true;
|
|
68812
68822
|
rowKey.push(record[rowAttr]);
|
|
68813
68823
|
}
|
|
68814
68824
|
else if (rowAttr !== IndicatorDimensionKeyPlaceholder) {
|
|
@@ -68834,6 +68844,7 @@
|
|
|
68834
68844
|
for (let n = 0, len2 = this.columns.length; n < len2; n++) {
|
|
68835
68845
|
const colAttr = this.columns[n];
|
|
68836
68846
|
if (colAttr in record) {
|
|
68847
|
+
this.columnsHasValue[n] = true;
|
|
68837
68848
|
colKey.push(record[colAttr]);
|
|
68838
68849
|
}
|
|
68839
68850
|
else if (colAttr !== IndicatorDimensionKeyPlaceholder) {
|
|
@@ -68959,16 +68970,22 @@
|
|
|
68959
68970
|
this.sortKeys();
|
|
68960
68971
|
if (!this.customRowTree) {
|
|
68961
68972
|
if (this.rowHierarchyType === 'tree') {
|
|
68962
|
-
this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows,
|
|
68973
|
+
this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows.filter((key, index) => {
|
|
68974
|
+
return this.rowsHasValue[index];
|
|
68975
|
+
}), this.indicatorsAsCol ? undefined : this.indicators, this.totals?.row?.showGrandTotals ||
|
|
68963
68976
|
(!this.indicatorsAsCol && this.columns.length === 0) ||
|
|
68964
68977
|
(this.indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel);
|
|
68965
68978
|
}
|
|
68966
68979
|
else {
|
|
68967
|
-
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows
|
|
68980
|
+
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows.filter((key, index) => {
|
|
68981
|
+
return this.rowsHasValue[index];
|
|
68982
|
+
}), 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);
|
|
68968
68983
|
}
|
|
68969
68984
|
}
|
|
68970
68985
|
if (!this.customColTree) {
|
|
68971
|
-
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns
|
|
68986
|
+
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns.filter((key, index) => {
|
|
68987
|
+
return this.columnsHasValue[index];
|
|
68988
|
+
}), 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);
|
|
68972
68989
|
}
|
|
68973
68990
|
}
|
|
68974
68991
|
updateFilterRules(filterRules, isResetTree = false) {
|
|
@@ -71744,14 +71761,6 @@
|
|
|
71744
71761
|
updateChartData(this.scenegraph);
|
|
71745
71762
|
this.render();
|
|
71746
71763
|
}
|
|
71747
|
-
clearChartCacheImage(col, row) {
|
|
71748
|
-
if (isNumber$2(col) && isNumber$2(row)) {
|
|
71749
|
-
clearCellChartCacheImage(col, row, this.scenegraph);
|
|
71750
|
-
}
|
|
71751
|
-
else {
|
|
71752
|
-
clearChartCacheImage(this.scenegraph);
|
|
71753
|
-
}
|
|
71754
|
-
}
|
|
71755
71764
|
getLegendSelected() {
|
|
71756
71765
|
const selected = [];
|
|
71757
71766
|
this.internalProps.legends?.forEach(legend => {
|
|
@@ -72545,7 +72554,7 @@
|
|
|
72545
72554
|
}
|
|
72546
72555
|
|
|
72547
72556
|
registerForVrender();
|
|
72548
|
-
const version = "1.3.2
|
|
72557
|
+
const version = "1.3.2";
|
|
72549
72558
|
function getIcons() {
|
|
72550
72559
|
return get$2();
|
|
72551
72560
|
}
|