@visactor/vtable 1.3.1 → 1.4.0-alpha.0
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 +11 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +10 -7
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +6 -8
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.js +3 -2
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +2 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -0
- package/cjs/core/BaseTable.js +45 -25
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.d.ts +1 -0
- package/cjs/core/FouseInput.js +5 -2
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/event/event.js +2 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +3 -4
- package/cjs/event/listener/container-dom.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/pivot-header-layout.js +2 -2
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/row-height-map.js +0 -1
- package/cjs/layout/row-height-map.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js +4 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +1 -0
- package/cjs/scenegraph/graphic/chart.js +34 -20
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +20 -8
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +2 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +40 -24
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -2
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -4
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +4 -12
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +1 -0
- package/cjs/scenegraph/refresh-node/update-chart.js +9 -2
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +12 -6
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/cell-move/index.js +1 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/sort/index.js +2 -2
- package/cjs/state/sort/index.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +14 -4
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +234 -149
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +12 -13
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +12 -10
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +7 -9
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.js +3 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +2 -1
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -0
- package/es/core/BaseTable.js +44 -24
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.d.ts +1 -0
- package/es/core/FouseInput.js +5 -2
- package/es/core/FouseInput.js.map +1 -1
- package/es/event/event.js +2 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +3 -4
- package/es/event/listener/container-dom.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/pivot-header-layout.js +1 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/row-height-map.js +0 -1
- package/es/layout/row-height-map.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js +4 -1
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +1 -0
- package/es/scenegraph/graphic/chart.js +33 -21
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +20 -8
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.d.ts +2 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +41 -25
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -4
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +4 -12
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +1 -0
- package/es/scenegraph/refresh-node/update-chart.js +6 -0
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +12 -6
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/cell-move/index.js +1 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/sort/index.js +2 -2
- package/es/state/sort/index.js.map +1 -1
- package/es/ts-types/base-table.d.ts +14 -4
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -32684,7 +32684,9 @@
|
|
|
32684
32684
|
const axisStylrAttrs = getAxisAttributes(this.option);
|
|
32685
32685
|
const attrs = this.getUpdateAttribute();
|
|
32686
32686
|
attrs.verticalFactor = this.orient === 'top' || this.orient === 'right' ? -1 : 1;
|
|
32687
|
-
this.component = new LineAxis(merge({
|
|
32687
|
+
this.component = new LineAxis(merge({
|
|
32688
|
+
disableTriggerEvent: this.table.options.disableInteraction
|
|
32689
|
+
}, axisStylrAttrs, attrs));
|
|
32688
32690
|
this.component.setAttributes(this.setLayoutStartPosition({ x: 0, y: 0 }));
|
|
32689
32691
|
this.component.originAxis = this;
|
|
32690
32692
|
}
|
|
@@ -35274,8 +35276,8 @@
|
|
|
35274
35276
|
function getCellEventArgsSet(e) {
|
|
35275
35277
|
const tableEvent = {
|
|
35276
35278
|
abstractPos: {
|
|
35277
|
-
x: e.x,
|
|
35278
|
-
y: e.y
|
|
35279
|
+
x: e.viewport.x,
|
|
35280
|
+
y: e.viewport.y
|
|
35279
35281
|
}
|
|
35280
35282
|
};
|
|
35281
35283
|
const targetCell = getTargetCell(e.target);
|
|
@@ -37413,7 +37415,7 @@
|
|
|
37413
37415
|
this.numberType = CHART_NUMBER_TYPE;
|
|
37414
37416
|
this.isShareChartSpec = isShareChartSpec;
|
|
37415
37417
|
if (!params.chartInstance) {
|
|
37416
|
-
const chartInstance = new params.ClassType(params.spec, {
|
|
37418
|
+
const chartInstance = (this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
|
|
37417
37419
|
renderCanvas: params.canvas,
|
|
37418
37420
|
mode: this.attribute.mode === 'node' ? 'node' : 'desktop-browser',
|
|
37419
37421
|
modeParams: this.attribute.modeParams,
|
|
@@ -37423,8 +37425,9 @@
|
|
|
37423
37425
|
interactive: false,
|
|
37424
37426
|
animation: false,
|
|
37425
37427
|
autoFit: false
|
|
37426
|
-
});
|
|
37428
|
+
})));
|
|
37427
37429
|
chartInstance.renderSync();
|
|
37430
|
+
chartInstance.getStage().enableDirtyBounds();
|
|
37428
37431
|
params.chartInstance = this.chartInstance = chartInstance;
|
|
37429
37432
|
}
|
|
37430
37433
|
else {
|
|
@@ -37442,34 +37445,53 @@
|
|
|
37442
37445
|
y1: y1 - table.scrollTop,
|
|
37443
37446
|
y2: y2 - table.scrollTop
|
|
37444
37447
|
});
|
|
37445
|
-
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, {
|
|
37448
|
+
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
|
|
37446
37449
|
renderCanvas: this.attribute.canvas,
|
|
37447
37450
|
mode: 'desktop-browser',
|
|
37448
37451
|
canvasControled: false,
|
|
37449
37452
|
viewBox: {
|
|
37450
|
-
x1:
|
|
37451
|
-
x2: x2 -
|
|
37452
|
-
y1:
|
|
37453
|
-
y2: y2 -
|
|
37453
|
+
x1: 0,
|
|
37454
|
+
x2: x2 - x1,
|
|
37455
|
+
y1: 0,
|
|
37456
|
+
y2: y2 - y1
|
|
37454
37457
|
},
|
|
37455
37458
|
dpr: table.internalProps.pixelRatio,
|
|
37456
37459
|
animation: false,
|
|
37457
37460
|
interactive: true,
|
|
37458
37461
|
autoFit: false,
|
|
37459
|
-
beforeRender: (
|
|
37460
|
-
const
|
|
37462
|
+
beforeRender: (chartStage) => {
|
|
37463
|
+
const stage = this.stage;
|
|
37464
|
+
const ctx = chartStage.window.getContext();
|
|
37465
|
+
const stageMatrix = stage.window.getViewBoxTransform();
|
|
37466
|
+
const viewBox = stage.window.getViewBox();
|
|
37461
37467
|
ctx.inuse = true;
|
|
37462
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);
|
|
37463
37471
|
ctx.setTransformForCurrent(true);
|
|
37464
37472
|
ctx.beginPath();
|
|
37465
37473
|
ctx.rect(clipBound.x1, clipBound.y1, clipBound.x2 - clipBound.x1, clipBound.y2 - clipBound.y1);
|
|
37466
37474
|
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
|
+
}
|
|
37467
37481
|
},
|
|
37468
37482
|
afterRender(stage) {
|
|
37469
37483
|
const ctx = stage.window.getContext();
|
|
37470
37484
|
ctx.inuse = false;
|
|
37485
|
+
stage.needRender = false;
|
|
37486
|
+
chartStage.resumeRender();
|
|
37471
37487
|
}
|
|
37472
|
-
});
|
|
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);
|
|
37473
37495
|
this.activeChartInstance.renderSync();
|
|
37474
37496
|
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(this.activeChartInstance);
|
|
37475
37497
|
this.activeChartInstance.on('click', (params) => {
|
|
@@ -37505,11 +37527,12 @@
|
|
|
37505
37527
|
const cellGroup = this.parent;
|
|
37506
37528
|
const padding = this.attribute.cellPadding;
|
|
37507
37529
|
const table = this.stage.table;
|
|
37530
|
+
const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
|
|
37508
37531
|
return {
|
|
37509
|
-
x1: Math.ceil(
|
|
37510
|
-
x2: Math.ceil(
|
|
37511
|
-
y1: Math.ceil(
|
|
37512
|
-
y2: Math.ceil(
|
|
37532
|
+
x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
|
|
37533
|
+
x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
|
|
37534
|
+
y1: Math.ceil(y1 + padding[0] + table.scrollTop + (table.options.viewBox?.y1 ?? 0)),
|
|
37535
|
+
y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (table.options.viewBox?.y1 ?? 0))
|
|
37513
37536
|
};
|
|
37514
37537
|
}
|
|
37515
37538
|
}
|
|
@@ -37540,6 +37563,10 @@
|
|
|
37540
37563
|
bodyBound.x1 = tableBound.x1 + table.getFrozenColsWidth();
|
|
37541
37564
|
bodyBound.x2 = tableBound.x2 - table.getRightFrozenColsWidth();
|
|
37542
37565
|
}
|
|
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);
|
|
37543
37570
|
return bodyBound;
|
|
37544
37571
|
}
|
|
37545
37572
|
|
|
@@ -37621,7 +37648,8 @@
|
|
|
37621
37648
|
data: table.getCellValue(col, row),
|
|
37622
37649
|
cellPadding: padding,
|
|
37623
37650
|
dpr: table.internalProps.pixelRatio,
|
|
37624
|
-
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : []
|
|
37651
|
+
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
|
|
37652
|
+
tableChartOption: table.options.chartOption
|
|
37625
37653
|
});
|
|
37626
37654
|
cellGroup.appendChild(chartGroup);
|
|
37627
37655
|
table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
|
|
@@ -39305,10 +39333,10 @@
|
|
|
39305
39333
|
for (let col = range.start.col; col <= range.end.col; col++) {
|
|
39306
39334
|
for (let row = range.start.row; row <= range.end.row; row++) {
|
|
39307
39335
|
const cellGroup = table.scenegraph.getCell(col, row, true);
|
|
39308
|
-
if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.
|
|
39336
|
+
if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.contentWidth !== cellWidth) {
|
|
39309
39337
|
updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline);
|
|
39310
39338
|
}
|
|
39311
|
-
if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.
|
|
39339
|
+
if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.contentHeight !== cellHeight) {
|
|
39312
39340
|
updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph);
|
|
39313
39341
|
}
|
|
39314
39342
|
cellGroup.contentWidth = cellWidth;
|
|
@@ -40997,9 +41025,6 @@
|
|
|
40997
41025
|
return true;
|
|
40998
41026
|
}
|
|
40999
41027
|
function fillRowsHeight(height, startRow, endRow, table, newHeights) {
|
|
41000
|
-
if (table.internalProps.useOneRowHeightFillAll) {
|
|
41001
|
-
return;
|
|
41002
|
-
}
|
|
41003
41028
|
for (let row = startRow; row <= endRow; row++) {
|
|
41004
41029
|
if (newHeights) {
|
|
41005
41030
|
newHeights[row] = height;
|
|
@@ -41008,7 +41033,6 @@
|
|
|
41008
41033
|
table._setRowHeight(row, height);
|
|
41009
41034
|
}
|
|
41010
41035
|
}
|
|
41011
|
-
table.internalProps.useOneRowHeightFillAll = true;
|
|
41012
41036
|
}
|
|
41013
41037
|
function computeCustomRenderHeight(col, row, table) {
|
|
41014
41038
|
const customRender = table.getCustomRender(col, row);
|
|
@@ -43262,48 +43286,65 @@
|
|
|
43262
43286
|
if (viewBox.y2 <= viewBox.y1) {
|
|
43263
43287
|
viewBox.y2 = viewBox.y1 + 1;
|
|
43264
43288
|
}
|
|
43265
|
-
axes?.forEach((axis, index) => {
|
|
43266
|
-
if (axis.type === 'band') {
|
|
43267
|
-
chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
43268
|
-
}
|
|
43269
|
-
else {
|
|
43270
|
-
chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
|
|
43271
|
-
}
|
|
43272
|
-
});
|
|
43273
43289
|
chartInstance.updateViewBox({
|
|
43274
|
-
x1:
|
|
43275
|
-
x2: viewBox.x2 -
|
|
43276
|
-
y1:
|
|
43277
|
-
y2: viewBox.y2 -
|
|
43290
|
+
x1: 0,
|
|
43291
|
+
x2: viewBox.x2 - viewBox.x1,
|
|
43292
|
+
y1: 0,
|
|
43293
|
+
y2: viewBox.y2 - viewBox.y1
|
|
43278
43294
|
}, false, false);
|
|
43279
|
-
const
|
|
43280
|
-
|
|
43281
|
-
|
|
43282
|
-
|
|
43283
|
-
|
|
43284
|
-
|
|
43285
|
-
|
|
43286
|
-
|
|
43287
|
-
|
|
43288
|
-
|
|
43289
|
-
|
|
43290
|
-
|
|
43291
|
-
|
|
43292
|
-
|
|
43293
|
-
|
|
43294
|
-
|
|
43295
|
-
|
|
43296
|
-
|
|
43297
|
-
|
|
43298
|
-
|
|
43299
|
-
|
|
43300
|
-
|
|
43301
|
-
|
|
43302
|
-
|
|
43303
|
-
|
|
43295
|
+
const chartStage = chartInstance.getStage();
|
|
43296
|
+
const matrix = chart.globalTransMatrix.clone();
|
|
43297
|
+
const stageMatrix = chart.stage.window.getViewBoxTransform();
|
|
43298
|
+
matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
43299
|
+
chartStage.window.setViewBoxTransform &&
|
|
43300
|
+
chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
|
|
43301
|
+
const { table } = chart.getRootNode();
|
|
43302
|
+
let updateSpec = false;
|
|
43303
|
+
if (table.options.specFormat) {
|
|
43304
|
+
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
43305
|
+
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
43306
|
+
const spec = formatResult.spec;
|
|
43307
|
+
chartInstance.updateSpecSync(spec);
|
|
43308
|
+
updateSpec = true;
|
|
43309
|
+
}
|
|
43310
|
+
}
|
|
43311
|
+
if (!updateSpec) {
|
|
43312
|
+
axes?.forEach((axis, index) => {
|
|
43313
|
+
if (axis.type === 'band') {
|
|
43314
|
+
chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
43315
|
+
}
|
|
43316
|
+
else {
|
|
43317
|
+
chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
|
|
43318
|
+
}
|
|
43319
|
+
});
|
|
43320
|
+
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
|
|
43321
|
+
if (typeof dataId === 'string') {
|
|
43322
|
+
chartInstance.updateDataSync(dataId, data ?? []);
|
|
43323
|
+
}
|
|
43324
|
+
else {
|
|
43325
|
+
const dataBatch = [];
|
|
43326
|
+
for (const dataIdStr in dataId) {
|
|
43327
|
+
const dataIdAndField = dataId[dataIdStr];
|
|
43328
|
+
const series = spec.series.find((item) => item?.data?.id === dataIdStr);
|
|
43329
|
+
dataBatch.push({
|
|
43330
|
+
id: dataIdStr,
|
|
43331
|
+
values: dataIdAndField
|
|
43332
|
+
? data?.filter((item) => {
|
|
43333
|
+
return item.hasOwnProperty(dataIdAndField);
|
|
43334
|
+
}) ?? []
|
|
43335
|
+
: data ?? [],
|
|
43336
|
+
fields: series?.data?.fields
|
|
43337
|
+
});
|
|
43338
|
+
if (!chartInstance.updateFullDataSync) {
|
|
43339
|
+
chartInstance.updateDataSync(dataIdStr, dataIdAndField
|
|
43340
|
+
? data?.filter((item) => {
|
|
43341
|
+
return item.hasOwnProperty(dataIdAndField);
|
|
43342
|
+
}) ?? []
|
|
43343
|
+
: data ?? []);
|
|
43344
|
+
}
|
|
43304
43345
|
}
|
|
43346
|
+
chartInstance.updateFullDataSync?.(dataBatch);
|
|
43305
43347
|
}
|
|
43306
|
-
chartInstance.updateFullDataSync?.(dataBatch);
|
|
43307
43348
|
}
|
|
43308
43349
|
const sg = chartInstance.getStage();
|
|
43309
43350
|
cacheStageCanvas(sg, chart);
|
|
@@ -43365,7 +43406,7 @@
|
|
|
43365
43406
|
}
|
|
43366
43407
|
|
|
43367
43408
|
const ChartRender = Symbol.for('ChartRender');
|
|
43368
|
-
let DefaultCanvasChartRender = class DefaultCanvasChartRender {
|
|
43409
|
+
let DefaultCanvasChartRender = class DefaultCanvasChartRender extends BaseRender {
|
|
43369
43410
|
type;
|
|
43370
43411
|
numberType = CHART_NUMBER_TYPE;
|
|
43371
43412
|
drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
@@ -43373,6 +43414,7 @@
|
|
|
43373
43414
|
const { dataId, data, spec } = chart.attribute;
|
|
43374
43415
|
chart.getViewBox();
|
|
43375
43416
|
const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
|
|
43417
|
+
const { table } = chart.getRootNode();
|
|
43376
43418
|
const { active, cacheCanvas, activeChartInstance } = chart;
|
|
43377
43419
|
if (!active && cacheCanvas) {
|
|
43378
43420
|
if (isArray$1(cacheCanvas)) {
|
|
@@ -43386,6 +43428,27 @@
|
|
|
43386
43428
|
}
|
|
43387
43429
|
}
|
|
43388
43430
|
else if (activeChartInstance) {
|
|
43431
|
+
if (table.options.specFormat) {
|
|
43432
|
+
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
43433
|
+
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
43434
|
+
const spec = formatResult.spec;
|
|
43435
|
+
activeChartInstance.updateSpecSync(spec);
|
|
43436
|
+
return;
|
|
43437
|
+
}
|
|
43438
|
+
}
|
|
43439
|
+
const viewBox = chart.getViewBox();
|
|
43440
|
+
activeChartInstance.updateViewBox({
|
|
43441
|
+
x1: 0,
|
|
43442
|
+
x2: viewBox.x2 - viewBox.x1,
|
|
43443
|
+
y1: 0,
|
|
43444
|
+
y2: viewBox.y2 - viewBox.y1
|
|
43445
|
+
}, false, false);
|
|
43446
|
+
const chartStage = activeChartInstance.getStage();
|
|
43447
|
+
chartStage.needRender = true;
|
|
43448
|
+
const matrix = chart.globalTransMatrix.clone();
|
|
43449
|
+
const stageMatrix = chart.stage.window.getViewBoxTransform().clone();
|
|
43450
|
+
stageMatrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
|
|
43451
|
+
chartStage.window.setViewBoxTransform(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
43389
43452
|
if (typeof dataId === 'string') {
|
|
43390
43453
|
activeChartInstance.updateDataSync(dataId, data ?? []);
|
|
43391
43454
|
}
|
|
@@ -43415,13 +43478,13 @@
|
|
|
43415
43478
|
}
|
|
43416
43479
|
}
|
|
43417
43480
|
else {
|
|
43418
|
-
if (
|
|
43481
|
+
if (table.internalProps.renderChartAsync) {
|
|
43419
43482
|
if (chartRenderKeys.indexOf(`${chart.parent.col}+${chart.parent.row}`) === -1) {
|
|
43420
43483
|
chartRenderKeys.push(`${chart.parent.col}+${chart.parent.row}`);
|
|
43421
43484
|
chartRenderQueueList.push(chart);
|
|
43422
43485
|
}
|
|
43423
43486
|
if (!IsHandlingChartQueue()) {
|
|
43424
|
-
startRenderChartQueue(
|
|
43487
|
+
startRenderChartQueue(table);
|
|
43425
43488
|
}
|
|
43426
43489
|
}
|
|
43427
43490
|
else {
|
|
@@ -43430,31 +43493,7 @@
|
|
|
43430
43493
|
}
|
|
43431
43494
|
}
|
|
43432
43495
|
draw(chart, renderService, drawContext, params) {
|
|
43433
|
-
|
|
43434
|
-
if (!context) {
|
|
43435
|
-
return;
|
|
43436
|
-
}
|
|
43437
|
-
const { clip } = chart.attribute;
|
|
43438
|
-
if (clip) {
|
|
43439
|
-
context.save();
|
|
43440
|
-
}
|
|
43441
|
-
else {
|
|
43442
|
-
context.highPerformanceSave();
|
|
43443
|
-
}
|
|
43444
|
-
context.transformFromMatrix(chart.transMatrix, true);
|
|
43445
|
-
context.beginPath();
|
|
43446
|
-
if (params.skipDraw) {
|
|
43447
|
-
this.drawShape(chart, context, 0, 0, drawContext, params, () => false, () => false);
|
|
43448
|
-
}
|
|
43449
|
-
else {
|
|
43450
|
-
this.drawShape(chart, context, 0, 0, drawContext);
|
|
43451
|
-
}
|
|
43452
|
-
if (clip) {
|
|
43453
|
-
context.restore();
|
|
43454
|
-
}
|
|
43455
|
-
else {
|
|
43456
|
-
context.highPerformanceRestore();
|
|
43457
|
-
}
|
|
43496
|
+
this._draw(chart, {}, false, drawContext, params);
|
|
43458
43497
|
}
|
|
43459
43498
|
};
|
|
43460
43499
|
DefaultCanvasChartRender = __decorate([
|
|
@@ -47919,9 +47958,6 @@
|
|
|
47919
47958
|
}
|
|
47920
47959
|
}
|
|
47921
47960
|
else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {
|
|
47922
|
-
scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);
|
|
47923
|
-
scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);
|
|
47924
|
-
scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);
|
|
47925
47961
|
for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) {
|
|
47926
47962
|
moveColumnFromRowHeaderToBody(scene);
|
|
47927
47963
|
moveColumnFromCornerHeaderToColHeader(scene);
|
|
@@ -47948,9 +47984,6 @@
|
|
|
47948
47984
|
}
|
|
47949
47985
|
function resetFrozen(scene) {
|
|
47950
47986
|
if (scene.frozenColCount > scene.table.frozenColCount) {
|
|
47951
|
-
scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);
|
|
47952
|
-
scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);
|
|
47953
|
-
scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);
|
|
47954
47987
|
for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) {
|
|
47955
47988
|
moveColumnFromRowHeaderToBody(scene);
|
|
47956
47989
|
moveColumnFromCornerHeaderToColHeader(scene);
|
|
@@ -48289,6 +48322,15 @@
|
|
|
48289
48322
|
});
|
|
48290
48323
|
}
|
|
48291
48324
|
}
|
|
48325
|
+
function clearCellChartCacheImage(col, row, scenegraph) {
|
|
48326
|
+
const cellGroup = scenegraph.getCell(col, row);
|
|
48327
|
+
cellGroup.children.forEach((node) => {
|
|
48328
|
+
if (node.type === 'chart') {
|
|
48329
|
+
node.cacheCanvas = null;
|
|
48330
|
+
node.addUpdateBoundTag();
|
|
48331
|
+
}
|
|
48332
|
+
});
|
|
48333
|
+
}
|
|
48292
48334
|
function updateChartData(scenegraph) {
|
|
48293
48335
|
const table = scenegraph.table;
|
|
48294
48336
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
@@ -49150,7 +49192,12 @@
|
|
|
49150
49192
|
setPoptipTheme(this.table.theme.textPopTipStyle);
|
|
49151
49193
|
let width;
|
|
49152
49194
|
let height;
|
|
49153
|
-
if (
|
|
49195
|
+
if (table.options.canvas && table.options.viewBox) {
|
|
49196
|
+
vglobal.setEnv('browser');
|
|
49197
|
+
width = table.options.viewBox.x2 - table.options.viewBox.x1;
|
|
49198
|
+
height = table.options.viewBox.y2 - table.options.viewBox.y1;
|
|
49199
|
+
}
|
|
49200
|
+
else if (Env.mode === 'node') {
|
|
49154
49201
|
vglobal.setEnv('node', table.options.modeParams);
|
|
49155
49202
|
width = table.canvasWidth;
|
|
49156
49203
|
height = table.canvasHeight;
|
|
@@ -49168,9 +49215,15 @@
|
|
|
49168
49215
|
background: table.theme.underlayBackgroundColor,
|
|
49169
49216
|
dpr: table.internalProps.pixelRatio,
|
|
49170
49217
|
enableLayout: true,
|
|
49171
|
-
|
|
49218
|
+
beforeRender: (stage) => {
|
|
49219
|
+
this.table.options.beforeRender && this.table.options.beforeRender(stage);
|
|
49220
|
+
},
|
|
49221
|
+
afterRender: (stage) => {
|
|
49222
|
+
this.table.options.afterRender && this.table.options.afterRender(stage);
|
|
49172
49223
|
this.table.fireListeners('after_render', null);
|
|
49173
49224
|
},
|
|
49225
|
+
canvasControled: !table.options.canvas,
|
|
49226
|
+
viewBox: table.options.viewBox,
|
|
49174
49227
|
...table.options.renderOption
|
|
49175
49228
|
});
|
|
49176
49229
|
this.stage.defaultLayer.setTheme({
|
|
@@ -49618,7 +49671,6 @@
|
|
|
49618
49671
|
computeColsWidth(this.table, 0, this.table.colCount - 1, true);
|
|
49619
49672
|
}
|
|
49620
49673
|
recalculateRowHeights() {
|
|
49621
|
-
this.table.internalProps.useOneRowHeightFillAll = false;
|
|
49622
49674
|
computeRowsHeight(this.table, 0, this.table.rowCount - 1, true, true);
|
|
49623
49675
|
}
|
|
49624
49676
|
resize() {
|
|
@@ -50331,7 +50383,6 @@
|
|
|
50331
50383
|
}
|
|
50332
50384
|
updateRow(removeCells, addCells, updateCells = []) {
|
|
50333
50385
|
this.table.internalProps.layoutMap.clearCellRangeMap();
|
|
50334
|
-
this.table.internalProps.useOneRowHeightFillAll = false;
|
|
50335
50386
|
const addRows = deduplication$1(addCells.map(cell => cell.row)).sort((a, b) => a - b);
|
|
50336
50387
|
const updateRows = deduplication$1(updateCells.map(cell => cell.row)).sort((a, b) => a - b);
|
|
50337
50388
|
const isNotFillHeight = this.table.getAllRowsHeight() -
|
|
@@ -50658,7 +50709,6 @@
|
|
|
50658
50709
|
if (headerC?.sort) {
|
|
50659
50710
|
executeSort(tableState, table, headerC);
|
|
50660
50711
|
}
|
|
50661
|
-
table.internalProps.useOneRowHeightFillAll = false;
|
|
50662
50712
|
table.internalProps.layoutMap.clearCellRangeMap();
|
|
50663
50713
|
table.scenegraph.sortCell();
|
|
50664
50714
|
table.stateManager.updateSelectPos(-1, -1);
|
|
@@ -51205,7 +51255,6 @@
|
|
|
51205
51255
|
const oldTargetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);
|
|
51206
51256
|
const moveContext = state.table._moveHeaderPosition({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col: state.columnMove.colTarget, row: state.columnMove.rowTarget });
|
|
51207
51257
|
if (moveContext) {
|
|
51208
|
-
state.table.internalProps.useOneRowHeightFillAll = false;
|
|
51209
51258
|
state.table.internalProps.layoutMap.clearCellRangeMap();
|
|
51210
51259
|
const sourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);
|
|
51211
51260
|
const targetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);
|
|
@@ -54355,17 +54404,19 @@
|
|
|
54355
54404
|
e.preventDefault();
|
|
54356
54405
|
}
|
|
54357
54406
|
});
|
|
54358
|
-
|
|
54359
|
-
|
|
54360
|
-
|
|
54361
|
-
|
|
54362
|
-
|
|
54363
|
-
table.
|
|
54364
|
-
|
|
54365
|
-
|
|
54366
|
-
|
|
54367
|
-
|
|
54368
|
-
|
|
54407
|
+
if (!table.options.canvas) {
|
|
54408
|
+
handler.on(table.getContainer(), 'resize', e => {
|
|
54409
|
+
if (e.width === 0 && e.height === 0) {
|
|
54410
|
+
return;
|
|
54411
|
+
}
|
|
54412
|
+
if (!isValid$1(table.options.pixelRatio)) {
|
|
54413
|
+
table.setPixelRatio(getPixelRatio());
|
|
54414
|
+
}
|
|
54415
|
+
if (!e.windowSizeNotChange) {
|
|
54416
|
+
table.resize();
|
|
54417
|
+
}
|
|
54418
|
+
});
|
|
54419
|
+
}
|
|
54369
54420
|
function pasteHtmlToTable(item) {
|
|
54370
54421
|
const ranges = table.stateManager.select.ranges;
|
|
54371
54422
|
const selectRangeLength = ranges.length;
|
|
@@ -54630,11 +54681,7 @@
|
|
|
54630
54681
|
}
|
|
54631
54682
|
}
|
|
54632
54683
|
table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
54633
|
-
|
|
54634
|
-
const targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
54635
|
-
if (isValid$1(targetCol) && isValid$1(targetRow)) {
|
|
54636
|
-
table.stateManager.updateSelectPos(targetCol.col, targetRow.row, false, false, false, true);
|
|
54637
|
-
}
|
|
54684
|
+
table.stateManager.updateSelectPos(table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX).col, table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY).row, false, false, false, true);
|
|
54638
54685
|
});
|
|
54639
54686
|
}
|
|
54640
54687
|
else if (table.eventManager.inertiaScroll.isInertiaScrolling()) {
|
|
@@ -54913,7 +54960,7 @@
|
|
|
54913
54960
|
this.table = table;
|
|
54914
54961
|
this.handleTextStickBindId = [];
|
|
54915
54962
|
this.inertiaScroll = new InertiaScroll(table.stateManager);
|
|
54916
|
-
if (Env.mode === 'node') {
|
|
54963
|
+
if (Env.mode === 'node' || table.options.disableInteraction) {
|
|
54917
54964
|
return;
|
|
54918
54965
|
}
|
|
54919
54966
|
this.bindOuterEvent();
|
|
@@ -57475,6 +57522,7 @@
|
|
|
57475
57522
|
}
|
|
57476
57523
|
|
|
57477
57524
|
class FocusInput extends EventTarget {
|
|
57525
|
+
_container;
|
|
57478
57526
|
_table;
|
|
57479
57527
|
_input;
|
|
57480
57528
|
constructor(table, parentElement) {
|
|
@@ -57494,6 +57542,7 @@
|
|
|
57494
57542
|
input.dataset.vtable = 'vtable';
|
|
57495
57543
|
input.readOnly = true;
|
|
57496
57544
|
parentElement.appendChild(div);
|
|
57545
|
+
this._container = div;
|
|
57497
57546
|
}
|
|
57498
57547
|
focus() {
|
|
57499
57548
|
this._input.focus({ preventScroll: true });
|
|
@@ -57513,6 +57562,7 @@
|
|
|
57513
57562
|
return this._input;
|
|
57514
57563
|
}
|
|
57515
57564
|
release() {
|
|
57565
|
+
this._container.parentElement?.removeChild(this._container);
|
|
57516
57566
|
}
|
|
57517
57567
|
}
|
|
57518
57568
|
|
|
@@ -57632,7 +57682,8 @@
|
|
|
57632
57682
|
height: this.table.tableNoFrameHeight
|
|
57633
57683
|
});
|
|
57634
57684
|
const legend = new DiscreteLegend(merge({}, attrs, {
|
|
57635
|
-
defaultSelected: this.selectedData
|
|
57685
|
+
defaultSelected: this.selectedData,
|
|
57686
|
+
disableTriggerEvent: this.table.options.disableInteraction
|
|
57636
57687
|
}));
|
|
57637
57688
|
legend.name = 'legend';
|
|
57638
57689
|
this.legendComponent = legend;
|
|
@@ -58140,9 +58191,6 @@
|
|
|
58140
58191
|
put(position, newValue) {
|
|
58141
58192
|
if (this.data.has(position)) {
|
|
58142
58193
|
const oldValue = this.data.get(position);
|
|
58143
|
-
if (oldValue === newValue) {
|
|
58144
|
-
return;
|
|
58145
|
-
}
|
|
58146
58194
|
this.data.set(position, newValue);
|
|
58147
58195
|
const difference = newValue - oldValue;
|
|
58148
58196
|
this.totalSum += difference;
|
|
@@ -59226,7 +59274,7 @@
|
|
|
59226
59274
|
return TABLE_EVENT_TYPE;
|
|
59227
59275
|
}
|
|
59228
59276
|
options;
|
|
59229
|
-
version = "1.
|
|
59277
|
+
version = "1.4.0-alpha.0";
|
|
59230
59278
|
pagination;
|
|
59231
59279
|
id = `VTable${Date.now()}`;
|
|
59232
59280
|
headerStyleCache;
|
|
@@ -59240,7 +59288,7 @@
|
|
|
59240
59288
|
_hasAutoImageColumn;
|
|
59241
59289
|
constructor(container, options = {}) {
|
|
59242
59290
|
super();
|
|
59243
|
-
if (!container && options.mode !== 'node') {
|
|
59291
|
+
if (!container && options.mode !== 'node' && !options.canvas) {
|
|
59244
59292
|
throw new Error("vtable's container is undefined");
|
|
59245
59293
|
}
|
|
59246
59294
|
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;
|
|
@@ -59278,7 +59326,14 @@
|
|
|
59278
59326
|
if (typeof allowFrozenColCount === 'number' && allowFrozenColCount <= 0) {
|
|
59279
59327
|
this.showFrozenIcon = false;
|
|
59280
59328
|
}
|
|
59281
|
-
if (
|
|
59329
|
+
if (this.options.canvas) {
|
|
59330
|
+
internalProps.element = this.options.canvas.parentElement;
|
|
59331
|
+
internalProps.element.style.position = 'relative';
|
|
59332
|
+
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
59333
|
+
internalProps.canvas = this.options.canvas;
|
|
59334
|
+
internalProps.context = internalProps.canvas.getContext('2d');
|
|
59335
|
+
}
|
|
59336
|
+
else if (Env.mode !== 'node') {
|
|
59282
59337
|
internalProps.element = createRootElement(this.padding);
|
|
59283
59338
|
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
59284
59339
|
internalProps.canvas = document.createElement('canvas');
|
|
@@ -59675,7 +59730,21 @@
|
|
|
59675
59730
|
const { padding } = this;
|
|
59676
59731
|
let widthP = 0;
|
|
59677
59732
|
let heightP = 0;
|
|
59678
|
-
|
|
59733
|
+
this.tableX = 0;
|
|
59734
|
+
this.tableY = 0;
|
|
59735
|
+
if (this.options.canvas && this.options.viewBox) {
|
|
59736
|
+
widthP = this.options.viewBox.x2 - this.options.viewBox.x1;
|
|
59737
|
+
heightP = this.options.viewBox.y2 - this.options.viewBox.y1;
|
|
59738
|
+
if (this?.scenegraph?.stage) {
|
|
59739
|
+
if (this.options.viewBox) {
|
|
59740
|
+
this.scenegraph.stage.setViewBox(this.options.viewBox, false);
|
|
59741
|
+
}
|
|
59742
|
+
else {
|
|
59743
|
+
this.scenegraph.stage.resize(widthP, heightP);
|
|
59744
|
+
}
|
|
59745
|
+
}
|
|
59746
|
+
}
|
|
59747
|
+
else if (Env.mode === 'browser') {
|
|
59679
59748
|
const element = this.getElement();
|
|
59680
59749
|
let widthWithoutPadding = 0;
|
|
59681
59750
|
let heightWithoutPadding = 0;
|
|
@@ -59734,6 +59803,23 @@
|
|
|
59734
59803
|
}
|
|
59735
59804
|
}
|
|
59736
59805
|
}
|
|
59806
|
+
updateViewBox(newViewBox) {
|
|
59807
|
+
const oldWidth = this.options?.viewBox.x2 ?? 0 - this.options?.viewBox.x1 ?? 0;
|
|
59808
|
+
const oldHeight = this.options?.viewBox.y2 ?? 0 - this.options?.viewBox.y1 ?? 0;
|
|
59809
|
+
const newWidth = newViewBox.x2 - newViewBox.x1;
|
|
59810
|
+
const newHeight = newViewBox.y2 - newViewBox.y1;
|
|
59811
|
+
this.options.viewBox = newViewBox;
|
|
59812
|
+
if (oldWidth !== newWidth || oldHeight !== newHeight) {
|
|
59813
|
+
this.resize();
|
|
59814
|
+
}
|
|
59815
|
+
else {
|
|
59816
|
+
this.scenegraph.stage.setViewBox(this.options.viewBox, true);
|
|
59817
|
+
}
|
|
59818
|
+
}
|
|
59819
|
+
setViewBoxTransform(a, b, c, d, e, f) {
|
|
59820
|
+
this.internalProps.modifiedViewBoxTransform = true;
|
|
59821
|
+
this.scenegraph.stage.window.setViewBoxTransform(a, b, c, d, e, f);
|
|
59822
|
+
}
|
|
59737
59823
|
get rowHierarchyType() {
|
|
59738
59824
|
return 'grid';
|
|
59739
59825
|
}
|
|
@@ -60287,6 +60373,8 @@
|
|
|
60287
60373
|
const visibleRect = this.getVisibleRect();
|
|
60288
60374
|
rect.offsetLeft(this.tableX - (relativeX ? visibleRect.left : 0));
|
|
60289
60375
|
rect.offsetTop(this.tableY - (relativeY ? visibleRect.top : 0));
|
|
60376
|
+
rect.offsetLeft(this.options.viewBox?.x1 ?? 0);
|
|
60377
|
+
rect.offsetTop(this.options.viewBox?.y1 ?? 0);
|
|
60290
60378
|
return rect;
|
|
60291
60379
|
}
|
|
60292
60380
|
getVisibleRect() {
|
|
@@ -60446,8 +60534,9 @@
|
|
|
60446
60534
|
}
|
|
60447
60535
|
this.scenegraph.stage.release();
|
|
60448
60536
|
this.scenegraph.proxy.release();
|
|
60537
|
+
internalProps.focusControl.release();
|
|
60449
60538
|
const { parentElement } = internalProps.element;
|
|
60450
|
-
if (parentElement) {
|
|
60539
|
+
if (parentElement && !this.options.canvas) {
|
|
60451
60540
|
parentElement.removeChild(internalProps.element);
|
|
60452
60541
|
}
|
|
60453
60542
|
this.editorManager?.editingEditor?.onEnd?.();
|
|
@@ -60602,7 +60691,6 @@
|
|
|
60602
60691
|
renderWithRecreateCells() {
|
|
60603
60692
|
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
60604
60693
|
this.refreshHeader();
|
|
60605
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
60606
60694
|
this.scenegraph.clearCells();
|
|
60607
60695
|
this.clearCellStyleCache();
|
|
60608
60696
|
this.scenegraph.createSceneGraph();
|
|
@@ -60670,9 +60758,14 @@
|
|
|
60670
60758
|
const currentHeight = rect.height;
|
|
60671
60759
|
const originHeight = this.canvas.offsetHeight || currentHeight;
|
|
60672
60760
|
const heightRatio = currentHeight / originHeight;
|
|
60673
|
-
const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0);
|
|
60674
|
-
const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0);
|
|
60675
|
-
|
|
60761
|
+
const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0) - (this.options.viewBox?.x1 ?? 0);
|
|
60762
|
+
const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0) - (this.options.viewBox?.y1 ?? 0);
|
|
60763
|
+
const point = { x, y, inTable };
|
|
60764
|
+
if (this.internalProps.modifiedViewBoxTransform && this.scenegraph.stage.window.getViewBoxTransform()) {
|
|
60765
|
+
const transform = this.scenegraph.stage.window.getViewBoxTransform();
|
|
60766
|
+
transform.transformPoint(point, point);
|
|
60767
|
+
}
|
|
60768
|
+
return point;
|
|
60676
60769
|
}
|
|
60677
60770
|
getTheme() {
|
|
60678
60771
|
return this.internalProps.theme;
|
|
@@ -64203,7 +64296,6 @@
|
|
|
64203
64296
|
this.editorManager = new EditManeger(this);
|
|
64204
64297
|
}
|
|
64205
64298
|
this.refreshHeader();
|
|
64206
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64207
64299
|
if (options.dataSource) {
|
|
64208
64300
|
_setDataSource(this, options.dataSource);
|
|
64209
64301
|
}
|
|
@@ -64255,7 +64347,6 @@
|
|
|
64255
64347
|
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
64256
64348
|
this._hasAutoImageColumn = undefined;
|
|
64257
64349
|
this.refreshHeader();
|
|
64258
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64259
64350
|
this.scenegraph.clearCells();
|
|
64260
64351
|
this.headerStyleCache = new Map();
|
|
64261
64352
|
this.bodyStyleCache = new Map();
|
|
@@ -64275,7 +64366,6 @@
|
|
|
64275
64366
|
this.internalProps.columns = header;
|
|
64276
64367
|
this.options.header = header;
|
|
64277
64368
|
this.refreshHeader();
|
|
64278
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64279
64369
|
this.renderAsync();
|
|
64280
64370
|
}
|
|
64281
64371
|
get transpose() {
|
|
@@ -64448,7 +64538,6 @@
|
|
|
64448
64538
|
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
64449
64539
|
this.transpose = options.transpose ?? false;
|
|
64450
64540
|
this.refreshHeader();
|
|
64451
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64452
64541
|
if (internalProps.releaseList) {
|
|
64453
64542
|
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
64454
64543
|
internalProps.releaseList = null;
|
|
@@ -64491,7 +64580,6 @@
|
|
|
64491
64580
|
pagination.perPageCount &&
|
|
64492
64581
|
(this.pagination.perPageCount = pagination.perPageCount || this.pagination.perPageCount);
|
|
64493
64582
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
64494
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64495
64583
|
this.scenegraph.clearCells();
|
|
64496
64584
|
this.dataSource.updatePagination(this.pagination);
|
|
64497
64585
|
this.refreshRowColCount();
|
|
@@ -64718,7 +64806,6 @@
|
|
|
64718
64806
|
this.refreshRowColCount();
|
|
64719
64807
|
this.clearCellStyleCache();
|
|
64720
64808
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
64721
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64722
64809
|
this.scenegraph.updateHierarchyIcon(col, row);
|
|
64723
64810
|
this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions);
|
|
64724
64811
|
if (checkHasChart) {
|
|
@@ -64798,7 +64885,6 @@
|
|
|
64798
64885
|
if (hd.define.sort !== false) {
|
|
64799
64886
|
this.dataSource.sort(hd.field, order, sortFunc);
|
|
64800
64887
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
64801
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
64802
64888
|
this.scenegraph.sortCell();
|
|
64803
64889
|
}
|
|
64804
64890
|
}
|
|
@@ -67496,7 +67582,6 @@
|
|
|
67496
67582
|
}
|
|
67497
67583
|
setPagination(pagination) {
|
|
67498
67584
|
this.clearCellRangeMap();
|
|
67499
|
-
this._table.internalProps.useOneRowHeightFillAll = false;
|
|
67500
67585
|
this.pagination = pagination;
|
|
67501
67586
|
if (this.rowHierarchyType === 'grid' &&
|
|
67502
67587
|
isValid$1(this.pagination?.perPageCount) &&
|
|
@@ -69532,7 +69617,6 @@
|
|
|
69532
69617
|
this.editorManager = new EditManeger(this);
|
|
69533
69618
|
}
|
|
69534
69619
|
this.refreshHeader();
|
|
69535
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
69536
69620
|
this.stateManager.initCheckedState(records);
|
|
69537
69621
|
this.scenegraph.createSceneGraph();
|
|
69538
69622
|
if (options.title) {
|
|
@@ -69668,7 +69752,6 @@
|
|
|
69668
69752
|
this.pivotSortState = options.pivotSortState;
|
|
69669
69753
|
}
|
|
69670
69754
|
this.refreshHeader();
|
|
69671
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
69672
69755
|
if (internalProps.releaseList) {
|
|
69673
69756
|
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
69674
69757
|
internalProps.releaseList = null;
|
|
@@ -70115,7 +70198,6 @@
|
|
|
70115
70198
|
this.internalProps.layoutMap.resetHeaderTree();
|
|
70116
70199
|
this.scenegraph.clearCells();
|
|
70117
70200
|
this.refreshHeader();
|
|
70118
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
70119
70201
|
this.scenegraph.createSceneGraph();
|
|
70120
70202
|
this.render();
|
|
70121
70203
|
}
|
|
@@ -70451,7 +70533,6 @@
|
|
|
70451
70533
|
}
|
|
70452
70534
|
}
|
|
70453
70535
|
this.refreshHeader();
|
|
70454
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
70455
70536
|
this.scenegraph.clearCells();
|
|
70456
70537
|
this.clearCellStyleCache();
|
|
70457
70538
|
this.scenegraph.createSceneGraph();
|
|
@@ -70882,7 +70963,6 @@
|
|
|
70882
70963
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId);
|
|
70883
70964
|
this.internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
70884
70965
|
this.refreshHeader();
|
|
70885
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
70886
70966
|
this.scenegraph.createSceneGraph();
|
|
70887
70967
|
if (options.title) {
|
|
70888
70968
|
this.internalProps.title = new Title(options.title, this);
|
|
@@ -71040,7 +71120,6 @@
|
|
|
71040
71120
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId);
|
|
71041
71121
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
71042
71122
|
this.refreshHeader();
|
|
71043
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
71044
71123
|
if (internalProps.releaseList) {
|
|
71045
71124
|
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
71046
71125
|
internalProps.releaseList = null;
|
|
@@ -71274,7 +71353,6 @@
|
|
|
71274
71353
|
this.internalProps.layoutMap.resetHeaderTree();
|
|
71275
71354
|
this.scenegraph.clearCells();
|
|
71276
71355
|
this.refreshHeader();
|
|
71277
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
71278
71356
|
this.scenegraph.createSceneGraph();
|
|
71279
71357
|
this.render();
|
|
71280
71358
|
}
|
|
@@ -71575,6 +71653,14 @@
|
|
|
71575
71653
|
updateChartData(this.scenegraph);
|
|
71576
71654
|
this.render();
|
|
71577
71655
|
}
|
|
71656
|
+
clearChartCacheImage(col, row) {
|
|
71657
|
+
if (isNumber$2(col) && isNumber$2(row)) {
|
|
71658
|
+
clearCellChartCacheImage(col, row, this.scenegraph);
|
|
71659
|
+
}
|
|
71660
|
+
else {
|
|
71661
|
+
clearChartCacheImage(this.scenegraph);
|
|
71662
|
+
}
|
|
71663
|
+
}
|
|
71578
71664
|
getLegendSelected() {
|
|
71579
71665
|
const selected = [];
|
|
71580
71666
|
this.internalProps.legends?.forEach(legend => {
|
|
@@ -71743,7 +71829,6 @@
|
|
|
71743
71829
|
}
|
|
71744
71830
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
71745
71831
|
this.refreshHeader();
|
|
71746
|
-
this.internalProps.useOneRowHeightFillAll = false;
|
|
71747
71832
|
this.scenegraph.clearCells();
|
|
71748
71833
|
this.clearCellStyleCache();
|
|
71749
71834
|
this.scenegraph.createSceneGraph();
|
|
@@ -72368,7 +72453,7 @@
|
|
|
72368
72453
|
}
|
|
72369
72454
|
|
|
72370
72455
|
registerForVrender();
|
|
72371
|
-
const version = "1.
|
|
72456
|
+
const version = "1.4.0-alpha.0";
|
|
72372
72457
|
function getIcons() {
|
|
72373
72458
|
return get$2();
|
|
72374
72459
|
}
|