@visactor/vtable 0.16.2 → 0.16.3
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/components/axis/axis.d.ts +1 -1
- package/cjs/components/axis/axis.js +2 -2
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/core/BaseTable.js +2 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +2 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +9 -0
- package/cjs/dataset/statistics-helper.js +18 -1
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/event/scroll.js +1 -0
- package/cjs/event/util.js +0 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/cjs/layout/chart-helper/get-axis-config.js +25 -16
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +15 -5
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout-helper.js +3 -1
- package/cjs/layout/pivot-layout-helper.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +1 -1
- package/cjs/scenegraph/component/custom.js +10 -4
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js +4 -2
- package/cjs/scenegraph/graphic/chart.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/layout/compute-col-width.js +7 -2
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +8 -3
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +3 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +4 -2
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -0
- package/cjs/scenegraph/scenegraph.js +3 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +12 -0
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.js +12 -9
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/themes/BRIGHT.js +2 -1
- package/cjs/themes/DARK.js +1 -2
- package/cjs/ts-types/component/axis.d.ts +2 -0
- package/cjs/ts-types/component/axis.js.map +1 -1
- package/cjs/ts-types/customLayout.d.ts +1 -0
- package/cjs/ts-types/customLayout.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +0 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +1 -0
- package/cjs/ts-types/new-data-set.js +3 -2
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +2 -0
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +2 -0
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +4 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.d.ts +2 -0
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/dist/vtable.js +160 -47
- package/dist/vtable.min.js +2 -2
- package/es/components/axis/axis.d.ts +1 -1
- package/es/components/axis/axis.js +2 -2
- package/es/components/axis/axis.js.map +1 -1
- package/es/core/BaseTable.js +2 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +3 -2
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +9 -0
- package/es/dataset/statistics-helper.js +15 -0
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/event/scroll.js +2 -1
- package/es/event/util.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/es/layout/chart-helper/get-axis-config.js +25 -16
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/pivot-header-layout.js +15 -5
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout-helper.js +3 -1
- package/es/layout/pivot-layout-helper.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +1 -1
- package/es/scenegraph/component/custom.js +10 -4
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/graphic/chart.js +4 -2
- package/es/scenegraph/graphic/chart.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/layout/compute-col-width.js +6 -2
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +7 -3
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +2 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +1 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -0
- package/es/scenegraph/scenegraph.js +3 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +12 -0
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/state/hover/is-cell-hover.js +12 -9
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/themes/BRIGHT.js +2 -1
- package/es/themes/DARK.js +1 -2
- package/es/ts-types/component/axis.d.ts +2 -0
- package/es/ts-types/component/axis.js.map +1 -1
- package/es/ts-types/customLayout.d.ts +1 -0
- package/es/ts-types/customLayout.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +0 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +1 -0
- package/es/ts-types/new-data-set.js +3 -2
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +2 -0
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +2 -0
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +4 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/title.d.ts +2 -0
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/package.json +4 -4
package/dist/vtable.js
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
var AggregationType;
|
|
37
37
|
(function (AggregationType) {
|
|
38
38
|
AggregationType["RECORD"] = "RECORD";
|
|
39
|
+
AggregationType["NONE"] = "NONE";
|
|
39
40
|
AggregationType["SUM"] = "SUM";
|
|
40
41
|
AggregationType["MIN"] = "MIN";
|
|
41
42
|
AggregationType["MAX"] = "MAX";
|
|
@@ -48997,11 +48998,11 @@
|
|
|
48997
48998
|
tickData;
|
|
48998
48999
|
scale;
|
|
48999
49000
|
component;
|
|
49000
|
-
constructor(option, width, height, padding,
|
|
49001
|
+
constructor(option, width, height, padding, table) {
|
|
49001
49002
|
this.table = table;
|
|
49002
49003
|
this.orient = option.orient ?? 'left';
|
|
49003
49004
|
this.type = option.type ?? 'band';
|
|
49004
|
-
this.option = merge$1({}, getCommonAxis(
|
|
49005
|
+
this.option = merge$1({}, getCommonAxis(option.__vtableChartTheme), getTableAxisTheme(this.orient, table.theme), getChartSpecAxisTheme(this.orient, this.type, option.__vtableChartTheme), option);
|
|
49005
49006
|
if (this.orient === 'left' || this.orient === 'right') {
|
|
49006
49007
|
this.width = width;
|
|
49007
49008
|
this.height = height - padding[2];
|
|
@@ -50654,8 +50655,9 @@
|
|
|
50654
50655
|
}
|
|
50655
50656
|
};
|
|
50656
50657
|
|
|
50657
|
-
function dealWithCustom(customLayout, customRender, col, row, width, height, autoWidth, autoHeight, table) {
|
|
50658
|
+
function dealWithCustom(customLayout, customRender, col, row, width, height, autoWidth, autoHeight, padding, table) {
|
|
50658
50659
|
let renderDefault = true;
|
|
50660
|
+
let enableCellPadding = false;
|
|
50659
50661
|
let expectedWidth;
|
|
50660
50662
|
let expectedHeight;
|
|
50661
50663
|
let customElements;
|
|
@@ -50685,6 +50687,7 @@
|
|
|
50685
50687
|
elementsGroup.name = 'custom-container';
|
|
50686
50688
|
}
|
|
50687
50689
|
renderDefault = customRenderObj.renderDefault;
|
|
50690
|
+
enableCellPadding = customRenderObj.enableCellPadding;
|
|
50688
50691
|
}
|
|
50689
50692
|
else if (typeof customRender === 'function') {
|
|
50690
50693
|
const arg = {
|
|
@@ -50720,6 +50723,14 @@
|
|
|
50720
50723
|
const value = table.getCellValue(col, row);
|
|
50721
50724
|
elementsGroup = adjustElementToGroup(customElements, autoWidth ? expectedWidth : width, autoHeight ? expectedHeight : height, value);
|
|
50722
50725
|
}
|
|
50726
|
+
if (enableCellPadding) {
|
|
50727
|
+
elementsGroup.setAttributes({
|
|
50728
|
+
x: padding[3],
|
|
50729
|
+
y: padding[0],
|
|
50730
|
+
width: width - padding[1] - padding[3],
|
|
50731
|
+
height: height - padding[0] - padding[2]
|
|
50732
|
+
});
|
|
50733
|
+
}
|
|
50723
50734
|
dealPercentCalc(elementsGroup, width, height);
|
|
50724
50735
|
return {
|
|
50725
50736
|
elementsGroup,
|
|
@@ -52414,13 +52425,13 @@
|
|
|
52414
52425
|
static temp = 1;
|
|
52415
52426
|
deactivate() {
|
|
52416
52427
|
this.active = false;
|
|
52417
|
-
this.activeChartInstance
|
|
52428
|
+
this.activeChartInstance?.updateViewBox({
|
|
52418
52429
|
x1: -1000,
|
|
52419
52430
|
x2: -800,
|
|
52420
52431
|
y1: -1000,
|
|
52421
52432
|
y2: -800
|
|
52422
52433
|
}, false, false);
|
|
52423
|
-
this.activeChartInstance
|
|
52434
|
+
this.activeChartInstance?.release();
|
|
52424
52435
|
this.activeChartInstance = null;
|
|
52425
52436
|
}
|
|
52426
52437
|
updateData(data) {
|
|
@@ -53545,15 +53556,14 @@
|
|
|
53545
53556
|
customLayout = define?.customLayout;
|
|
53546
53557
|
}
|
|
53547
53558
|
if (customLayout || customRender) {
|
|
53548
|
-
const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, false, table.heightMode === 'autoHeight', table);
|
|
53559
|
+
const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, false, table.heightMode === 'autoHeight', padding, table);
|
|
53549
53560
|
customElementsGroup = customResult.elementsGroup;
|
|
53550
53561
|
renderDefault = customResult.renderDefault;
|
|
53551
53562
|
}
|
|
53552
53563
|
cellGroup = createCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme);
|
|
53553
53564
|
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
|
|
53554
53565
|
if (axisConfig) {
|
|
53555
|
-
const
|
|
53556
|
-
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, spec?.theme, table);
|
|
53566
|
+
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, table);
|
|
53557
53567
|
cellGroup.clear();
|
|
53558
53568
|
cellGroup.appendChild(axis.component);
|
|
53559
53569
|
axis.overlap();
|
|
@@ -54240,7 +54250,7 @@
|
|
|
54240
54250
|
if (!axisRange) {
|
|
54241
54251
|
return;
|
|
54242
54252
|
}
|
|
54243
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54253
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54244
54254
|
if (isZeroAlign) {
|
|
54245
54255
|
const subAxisRange = getRange$1('bottom', col, row + 1, col, layout.columnHeaderLevelCount - 1, col, row, 0, layout);
|
|
54246
54256
|
if (subAxisRange) {
|
|
@@ -54272,7 +54282,8 @@
|
|
|
54272
54282
|
label: {
|
|
54273
54283
|
flush: true
|
|
54274
54284
|
},
|
|
54275
|
-
__ticksForVTable: ticks
|
|
54285
|
+
__ticksForVTable: ticks,
|
|
54286
|
+
__vtableChartTheme: theme
|
|
54276
54287
|
});
|
|
54277
54288
|
}
|
|
54278
54289
|
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
@@ -54290,7 +54301,7 @@
|
|
|
54290
54301
|
if (!axisRange) {
|
|
54291
54302
|
return;
|
|
54292
54303
|
}
|
|
54293
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54304
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54294
54305
|
if (isZeroAlign) {
|
|
54295
54306
|
const subAxisRange = getRange$1('top', col, row - 1, col, row, col, row, 1, layout);
|
|
54296
54307
|
if (subAxisRange) {
|
|
@@ -54326,7 +54337,8 @@
|
|
|
54326
54337
|
label: {
|
|
54327
54338
|
flush: true
|
|
54328
54339
|
},
|
|
54329
|
-
__ticksForVTable: ticks
|
|
54340
|
+
__ticksForVTable: ticks,
|
|
54341
|
+
__vtableChartTheme: theme
|
|
54330
54342
|
});
|
|
54331
54343
|
}
|
|
54332
54344
|
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
@@ -54339,7 +54351,7 @@
|
|
|
54339
54351
|
const data = layout.dataset.collectedValues[rowDimensionKey] ?? [];
|
|
54340
54352
|
const rowPath = layout.getRowKeysPath(col, row);
|
|
54341
54353
|
const domain = data[rowPath ?? ''] ?? [];
|
|
54342
|
-
const { axisOption, isPercent } = getAxisOption(col + 1, row, 'left', layout);
|
|
54354
|
+
const { axisOption, isPercent, theme } = getAxisOption(col + 1, row, 'left', layout);
|
|
54343
54355
|
if (axisOption?.visible === false) {
|
|
54344
54356
|
return;
|
|
54345
54357
|
}
|
|
@@ -54350,7 +54362,8 @@
|
|
|
54350
54362
|
}
|
|
54351
54363
|
}, axisOption, {
|
|
54352
54364
|
orient: 'left',
|
|
54353
|
-
type: 'band'
|
|
54365
|
+
type: 'band',
|
|
54366
|
+
__vtableChartTheme: theme
|
|
54354
54367
|
});
|
|
54355
54368
|
}
|
|
54356
54369
|
}
|
|
@@ -54370,7 +54383,7 @@
|
|
|
54370
54383
|
if (!axisRange) {
|
|
54371
54384
|
return;
|
|
54372
54385
|
}
|
|
54373
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54386
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54374
54387
|
if (isZeroAlign) {
|
|
54375
54388
|
const subAxisRange = getRange$1('right', col + 1, row, col, row, col, row, 1, layout);
|
|
54376
54389
|
if (subAxisRange) {
|
|
@@ -54407,7 +54420,8 @@
|
|
|
54407
54420
|
label: {
|
|
54408
54421
|
flush: true
|
|
54409
54422
|
},
|
|
54410
|
-
__ticksForVTable: ticks
|
|
54423
|
+
__ticksForVTable: ticks,
|
|
54424
|
+
__vtableChartTheme: theme
|
|
54411
54425
|
});
|
|
54412
54426
|
}
|
|
54413
54427
|
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
@@ -54417,7 +54431,7 @@
|
|
|
54417
54431
|
if (!axisRange) {
|
|
54418
54432
|
return;
|
|
54419
54433
|
}
|
|
54420
|
-
const { range, ticks, axisOption, isZeroAlign } = axisRange;
|
|
54434
|
+
const { range, ticks, axisOption, isZeroAlign, theme } = axisRange;
|
|
54421
54435
|
if (isZeroAlign) {
|
|
54422
54436
|
const subAxisRange = getRange$1('left', col - 1, row, layout.rowHeaderLevelCount - 1, row, col, row, 0, layout);
|
|
54423
54437
|
if (subAxisRange) {
|
|
@@ -54452,7 +54466,8 @@
|
|
|
54452
54466
|
label: {
|
|
54453
54467
|
flush: true
|
|
54454
54468
|
},
|
|
54455
|
-
__ticksForVTable: ticks
|
|
54469
|
+
__ticksForVTable: ticks,
|
|
54470
|
+
__vtableChartTheme: theme
|
|
54456
54471
|
});
|
|
54457
54472
|
}
|
|
54458
54473
|
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
@@ -54465,7 +54480,7 @@
|
|
|
54465
54480
|
const data = layout.dataset.collectedValues[columnDimensionKey] ?? [];
|
|
54466
54481
|
const colPath = layout.getColKeysPath(col, row);
|
|
54467
54482
|
const domain = data?.[colPath ?? ''] ?? [];
|
|
54468
|
-
const { axisOption, isPercent } = getAxisOption(col, row - 1, 'bottom', layout);
|
|
54483
|
+
const { axisOption, isPercent, theme } = getAxisOption(col, row - 1, 'bottom', layout);
|
|
54469
54484
|
if (axisOption?.visible === false) {
|
|
54470
54485
|
return;
|
|
54471
54486
|
}
|
|
@@ -54473,7 +54488,8 @@
|
|
|
54473
54488
|
domain: Array.from(domain)
|
|
54474
54489
|
}, axisOption, {
|
|
54475
54490
|
orient: 'bottom',
|
|
54476
|
-
type: 'band'
|
|
54491
|
+
type: 'band',
|
|
54492
|
+
__vtableChartTheme: theme
|
|
54477
54493
|
});
|
|
54478
54494
|
}
|
|
54479
54495
|
}
|
|
@@ -54498,7 +54514,8 @@
|
|
|
54498
54514
|
axisOption,
|
|
54499
54515
|
isPercent: spec.percent,
|
|
54500
54516
|
isZeroAlign: checkZeroAlign(spec, orient, layout),
|
|
54501
|
-
seriesIndice
|
|
54517
|
+
seriesIndice,
|
|
54518
|
+
theme: spec.theme
|
|
54502
54519
|
};
|
|
54503
54520
|
}
|
|
54504
54521
|
}
|
|
@@ -54508,7 +54525,8 @@
|
|
|
54508
54525
|
return {
|
|
54509
54526
|
axisOption,
|
|
54510
54527
|
isPercent: false,
|
|
54511
|
-
isZeroAlign: checkZeroAlign(spec, orient, layout)
|
|
54528
|
+
isZeroAlign: checkZeroAlign(spec, orient, layout),
|
|
54529
|
+
theme: spec.theme
|
|
54512
54530
|
};
|
|
54513
54531
|
}
|
|
54514
54532
|
function checkZeroAlign(spec, orient, layout) {
|
|
@@ -54588,7 +54606,7 @@
|
|
|
54588
54606
|
return range;
|
|
54589
54607
|
}
|
|
54590
54608
|
function getRange$1(position, colForAxisOption, rowForAxisOption, colForIndicatorKey, rowForIndicatorKey, col, row, defaultSeriesIndice, layout) {
|
|
54591
|
-
const { axisOption, isPercent, isZeroAlign, seriesIndice } = getAxisOption(colForAxisOption, rowForAxisOption, position, layout);
|
|
54609
|
+
const { axisOption, isPercent, isZeroAlign, seriesIndice, theme } = getAxisOption(colForAxisOption, rowForAxisOption, position, layout);
|
|
54592
54610
|
if (axisOption?.visible === false) {
|
|
54593
54611
|
return undefined;
|
|
54594
54612
|
}
|
|
@@ -54627,7 +54645,8 @@
|
|
|
54627
54645
|
axisOption,
|
|
54628
54646
|
isZeroAlign,
|
|
54629
54647
|
range,
|
|
54630
|
-
ticks
|
|
54648
|
+
ticks,
|
|
54649
|
+
theme
|
|
54631
54650
|
};
|
|
54632
54651
|
}
|
|
54633
54652
|
function isTopOrBottomAxis(col, row, layout) {
|
|
@@ -55023,6 +55042,7 @@
|
|
|
55023
55042
|
}
|
|
55024
55043
|
actualHeight += rowHeight;
|
|
55025
55044
|
}
|
|
55045
|
+
table.scenegraph._dealAutoFillHeightOriginRowsHeight = actualHeight;
|
|
55026
55046
|
if (actualHeight < canvasHeight && actualHeight - actualHeaderHeight > 0) {
|
|
55027
55047
|
const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);
|
|
55028
55048
|
for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {
|
|
@@ -55200,6 +55220,7 @@
|
|
|
55200
55220
|
let spanRow = 1;
|
|
55201
55221
|
let height = 0;
|
|
55202
55222
|
let renderDefault = false;
|
|
55223
|
+
let enableCellPadding = false;
|
|
55203
55224
|
if (table.isHeader(col, row) || table.getBodyColumnDefine(col, row)?.mergeCell) {
|
|
55204
55225
|
const cellRange = table.getCellRange(col, row);
|
|
55205
55226
|
spanRow = cellRange.end.row - cellRange.start.row + 1;
|
|
@@ -55220,6 +55241,7 @@
|
|
|
55220
55241
|
customLayoutObj.rootContainer.setStage(table.scenegraph.stage);
|
|
55221
55242
|
height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
|
|
55222
55243
|
renderDefault = customLayoutObj.renderDefault;
|
|
55244
|
+
enableCellPadding = customLayoutObj.enableCellPadding;
|
|
55223
55245
|
}
|
|
55224
55246
|
else {
|
|
55225
55247
|
height = 0;
|
|
@@ -55234,6 +55256,11 @@
|
|
|
55234
55256
|
height = customRender?.expectedHeight ?? 0;
|
|
55235
55257
|
renderDefault = customRender?.renderDefault;
|
|
55236
55258
|
}
|
|
55259
|
+
if (enableCellPadding) {
|
|
55260
|
+
const actStyle = table._getCellStyle(col, row);
|
|
55261
|
+
const padding = getQuadProps(getProp('padding', actStyle, col, row, table));
|
|
55262
|
+
height += padding[0] + padding[2];
|
|
55263
|
+
}
|
|
55237
55264
|
return {
|
|
55238
55265
|
height: height / spanRow,
|
|
55239
55266
|
renderDefault
|
|
@@ -55471,7 +55498,9 @@
|
|
|
55471
55498
|
customLayout = define?.customLayout;
|
|
55472
55499
|
}
|
|
55473
55500
|
if (customLayout || customRender) {
|
|
55474
|
-
const
|
|
55501
|
+
const style = scene.table._getCellStyle(col, row);
|
|
55502
|
+
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
55503
|
+
const customResult = dealWithCustom(customLayout, customRender, col, row, cell.attribute.width, cell.attribute.height, false, scene.table.heightMode === 'autoHeight', padding, scene.table);
|
|
55475
55504
|
customElementsGroup = customResult.elementsGroup;
|
|
55476
55505
|
renderDefault = customResult.renderDefault;
|
|
55477
55506
|
}
|
|
@@ -55706,8 +55735,7 @@
|
|
|
55706
55735
|
const cellStyle = scene.table._getCellStyle(col, row);
|
|
55707
55736
|
const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));
|
|
55708
55737
|
if (axisConfig) {
|
|
55709
|
-
const
|
|
55710
|
-
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, spec?.theme, scene.table);
|
|
55738
|
+
const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table);
|
|
55711
55739
|
cellGroup.clear();
|
|
55712
55740
|
cellGroup.appendChild(axis.component);
|
|
55713
55741
|
axis.overlap();
|
|
@@ -55737,7 +55765,9 @@
|
|
|
55737
55765
|
customLayout = define?.customLayout;
|
|
55738
55766
|
}
|
|
55739
55767
|
if (customLayout || customRender) {
|
|
55740
|
-
const
|
|
55768
|
+
const style = scene.table._getCellStyle(col, row);
|
|
55769
|
+
const padding = getQuadProps(getProp('padding', style, col, row, scene.table));
|
|
55770
|
+
const customResult = dealWithCustom(customLayout, customRender, col, row, cellGroup.attribute.width, cellGroup.attribute.height, false, scene.table.heightMode === 'autoHeight', padding, scene.table);
|
|
55741
55771
|
customElementsGroup = customResult.elementsGroup;
|
|
55742
55772
|
renderDefault = customResult.renderDefault;
|
|
55743
55773
|
isHeightChange = true;
|
|
@@ -57147,27 +57177,42 @@
|
|
|
57147
57177
|
if (isHeader && disableHeader) {
|
|
57148
57178
|
return undefined;
|
|
57149
57179
|
}
|
|
57180
|
+
let hoverMode;
|
|
57150
57181
|
if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row) {
|
|
57151
|
-
|
|
57182
|
+
hoverMode = 'cellBgColor';
|
|
57152
57183
|
}
|
|
57153
57184
|
else if (highlightScope === HighlightScope.column && cellPos.col === col) {
|
|
57154
|
-
|
|
57185
|
+
hoverMode = 'inlineColumnBgColor';
|
|
57155
57186
|
}
|
|
57156
57187
|
else if (highlightScope === HighlightScope.row && cellPos.row === row) {
|
|
57157
|
-
|
|
57188
|
+
hoverMode = 'inlineRowBgColor';
|
|
57158
57189
|
}
|
|
57159
57190
|
else if (highlightScope === HighlightScope.cross) {
|
|
57160
57191
|
if (cellPos.col === col && cellPos.row === row) {
|
|
57161
|
-
|
|
57192
|
+
hoverMode = 'cellBgColor';
|
|
57162
57193
|
}
|
|
57163
57194
|
else if (cellPos.col === col) {
|
|
57164
|
-
|
|
57195
|
+
hoverMode = 'inlineColumnBgColor';
|
|
57165
57196
|
}
|
|
57166
57197
|
else if (cellPos.row === row) {
|
|
57167
|
-
|
|
57198
|
+
hoverMode = 'inlineRowBgColor';
|
|
57168
57199
|
}
|
|
57169
57200
|
}
|
|
57170
|
-
|
|
57201
|
+
if (hoverMode) {
|
|
57202
|
+
let cellDisable;
|
|
57203
|
+
if (isHeader) {
|
|
57204
|
+
const define = table.getHeaderDefine(col, row);
|
|
57205
|
+
cellDisable = define.disableHeaderHover;
|
|
57206
|
+
}
|
|
57207
|
+
else {
|
|
57208
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
57209
|
+
cellDisable = define.disableHover;
|
|
57210
|
+
}
|
|
57211
|
+
if (cellDisable) {
|
|
57212
|
+
hoverMode = undefined;
|
|
57213
|
+
}
|
|
57214
|
+
}
|
|
57215
|
+
return hoverMode;
|
|
57171
57216
|
}
|
|
57172
57217
|
|
|
57173
57218
|
let SplitGroupBeforeRenderContribution = class SplitGroupBeforeRenderContribution {
|
|
@@ -57841,6 +57886,7 @@
|
|
|
57841
57886
|
let spanCol = 1;
|
|
57842
57887
|
let width = 0;
|
|
57843
57888
|
let renderDefault = false;
|
|
57889
|
+
let enableCellPadding = false;
|
|
57844
57890
|
if (table.isHeader(col, row) || table.getBodyColumnDefine(col, row)?.mergeCell) {
|
|
57845
57891
|
const cellRange = table.getCellRange(col, row);
|
|
57846
57892
|
spanCol = cellRange.end.col - cellRange.start.col + 1;
|
|
@@ -57861,6 +57907,7 @@
|
|
|
57861
57907
|
customLayoutObj.rootContainer.setStage(table.scenegraph.stage);
|
|
57862
57908
|
width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
|
|
57863
57909
|
renderDefault = customLayoutObj.renderDefault;
|
|
57910
|
+
enableCellPadding = customLayoutObj.enableCellPadding;
|
|
57864
57911
|
}
|
|
57865
57912
|
else {
|
|
57866
57913
|
width = 0;
|
|
@@ -57875,6 +57922,11 @@
|
|
|
57875
57922
|
width = customRender?.expectedWidth ?? 0;
|
|
57876
57923
|
renderDefault = customRender?.renderDefault;
|
|
57877
57924
|
}
|
|
57925
|
+
if (enableCellPadding) {
|
|
57926
|
+
const actStyle = table._getCellStyle(col, row);
|
|
57927
|
+
const padding = getQuadProps(getProp('padding', actStyle, col, row, table));
|
|
57928
|
+
width += padding[1] + padding[3];
|
|
57929
|
+
}
|
|
57878
57930
|
return {
|
|
57879
57931
|
width: width / spanCol,
|
|
57880
57932
|
renderDefault
|
|
@@ -59399,6 +59451,29 @@
|
|
|
59399
59451
|
? scene.bottomFrozenGroup
|
|
59400
59452
|
: scene.rightBottomCornerGroup);
|
|
59401
59453
|
}
|
|
59454
|
+
const diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2);
|
|
59455
|
+
if (endCol === scene.table.colCount - 1) {
|
|
59456
|
+
selectComp.rect.setAttributes({
|
|
59457
|
+
width: selectComp.rect.attribute.width - diffSize
|
|
59458
|
+
});
|
|
59459
|
+
}
|
|
59460
|
+
if (startCol === 0) {
|
|
59461
|
+
selectComp.rect.setAttributes({
|
|
59462
|
+
x: selectComp.rect.attribute.x + diffSize,
|
|
59463
|
+
width: selectComp.rect.attribute.width - diffSize
|
|
59464
|
+
});
|
|
59465
|
+
}
|
|
59466
|
+
if (endRow === scene.table.rowCount - 1) {
|
|
59467
|
+
selectComp.rect.setAttributes({
|
|
59468
|
+
height: selectComp.rect.attribute.height - diffSize
|
|
59469
|
+
});
|
|
59470
|
+
}
|
|
59471
|
+
if (startRow === 0) {
|
|
59472
|
+
selectComp.rect.setAttributes({
|
|
59473
|
+
y: selectComp.rect.attribute.y + diffSize,
|
|
59474
|
+
height: selectComp.rect.attribute.height - diffSize
|
|
59475
|
+
});
|
|
59476
|
+
}
|
|
59402
59477
|
}
|
|
59403
59478
|
function updateCellSelectBorder(scene, newStartCol, newStartRow, newEndCol, newEndRow) {
|
|
59404
59479
|
let startCol = Math.min(newEndCol, newStartCol);
|
|
@@ -60570,8 +60645,7 @@
|
|
|
60570
60645
|
const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(cell.col, cell.row);
|
|
60571
60646
|
const cellStyle = table._getCellStyle(cell.col, cell.row);
|
|
60572
60647
|
const padding = getQuadProps(getProp('padding', cellStyle, cell.col, cell.row, table));
|
|
60573
|
-
const
|
|
60574
|
-
const axis = new CartesianAxis(axisConfig, cell.attribute.width, cell.attribute.height, padding, spec?.theme, table);
|
|
60648
|
+
const axis = new CartesianAxis(axisConfig, cell.attribute.width, cell.attribute.height, padding, table);
|
|
60575
60649
|
cell.clear();
|
|
60576
60650
|
cell.appendChild(axis.component);
|
|
60577
60651
|
axis.overlap();
|
|
@@ -61438,6 +61512,7 @@
|
|
|
61438
61512
|
frozenRowCount;
|
|
61439
61513
|
clear;
|
|
61440
61514
|
mergeMap;
|
|
61515
|
+
_dealAutoFillHeightOriginRowsHeight;
|
|
61441
61516
|
constructor(table) {
|
|
61442
61517
|
this.table = table;
|
|
61443
61518
|
this.hasFrozen = false;
|
|
@@ -61896,9 +61971,12 @@
|
|
|
61896
61971
|
this.dealWidthMode();
|
|
61897
61972
|
}
|
|
61898
61973
|
}
|
|
61899
|
-
if (this.table.heightMode === 'adaptive'
|
|
61974
|
+
if (this.table.heightMode === 'adaptive') {
|
|
61900
61975
|
this.recalculateRowHeights();
|
|
61901
61976
|
}
|
|
61977
|
+
else if (this.table.autoFillHeight) {
|
|
61978
|
+
this.dealHeightMode();
|
|
61979
|
+
}
|
|
61902
61980
|
this.resetFrozen();
|
|
61903
61981
|
this.updateTableSize();
|
|
61904
61982
|
this.updateBorderSizeAndPosition();
|
|
@@ -62180,7 +62258,8 @@
|
|
|
62180
62258
|
}
|
|
62181
62259
|
actualHeight += rowHeight;
|
|
62182
62260
|
}
|
|
62183
|
-
if (actualHeight < canvasHeight &&
|
|
62261
|
+
if ((this._dealAutoFillHeightOriginRowsHeight ?? actualHeight) < canvasHeight &&
|
|
62262
|
+
actualHeight - actualHeaderHeight > 0) {
|
|
62184
62263
|
const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);
|
|
62185
62264
|
for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {
|
|
62186
62265
|
let rowHeight;
|
|
@@ -68471,7 +68550,7 @@
|
|
|
68471
68550
|
return TABLE_EVENT_TYPE;
|
|
68472
68551
|
}
|
|
68473
68552
|
options;
|
|
68474
|
-
version = "0.16.
|
|
68553
|
+
version = "0.16.3";
|
|
68475
68554
|
pagination;
|
|
68476
68555
|
id = `VTable${Date.now()}`;
|
|
68477
68556
|
headerStyleCache;
|
|
@@ -70249,6 +70328,9 @@
|
|
|
70249
70328
|
return false;
|
|
70250
70329
|
}
|
|
70251
70330
|
const define = this.getHeaderDefine(col, row);
|
|
70331
|
+
if (!define) {
|
|
70332
|
+
return false;
|
|
70333
|
+
}
|
|
70252
70334
|
if (define.dragHeader === undefined) {
|
|
70253
70335
|
if (this.internalProps.dragHeaderMode === 'all') {
|
|
70254
70336
|
return true;
|
|
@@ -73229,7 +73311,9 @@
|
|
|
73229
73311
|
imageAutoSizing: dimensionInfo?.imageAutoSizing,
|
|
73230
73312
|
headerCustomRender: dimensionInfo?.headerCustomRender,
|
|
73231
73313
|
headerCustomLayout: dimensionInfo?.headerCustomLayout,
|
|
73232
|
-
dragHeader: dimensionInfo?.dragHeader
|
|
73314
|
+
dragHeader: dimensionInfo?.dragHeader,
|
|
73315
|
+
disableHeaderHover: !!dimensionInfo?.disableHeaderHover,
|
|
73316
|
+
disableHeaderSelect: !!dimensionInfo?.disableHeaderSelect
|
|
73233
73317
|
}),
|
|
73234
73318
|
fieldFormat: dimensionInfo?.headerFormat,
|
|
73235
73319
|
dropDownMenu: dimensionInfo?.dropDownMenu,
|
|
@@ -73415,7 +73499,9 @@
|
|
|
73415
73499
|
headerType: this.columnHeaderTitle.headerType ?? 'text',
|
|
73416
73500
|
style: this.columnHeaderTitle.headerStyle,
|
|
73417
73501
|
define: {
|
|
73418
|
-
id
|
|
73502
|
+
id,
|
|
73503
|
+
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
73504
|
+
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
73419
73505
|
}
|
|
73420
73506
|
};
|
|
73421
73507
|
this.columnHeaderObjs.push(cell);
|
|
@@ -73446,7 +73532,9 @@
|
|
|
73446
73532
|
headerType: this.rowHeaderTitle.headerType ?? 'text',
|
|
73447
73533
|
style: this.rowHeaderTitle.headerStyle,
|
|
73448
73534
|
define: {
|
|
73449
|
-
id
|
|
73535
|
+
id,
|
|
73536
|
+
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
73537
|
+
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
73450
73538
|
}
|
|
73451
73539
|
};
|
|
73452
73540
|
this.rowHeaderObjs.push(cell);
|
|
@@ -73621,7 +73709,9 @@
|
|
|
73621
73709
|
define: {
|
|
73622
73710
|
dimensionKey: '维度名称',
|
|
73623
73711
|
id,
|
|
73624
|
-
value: dimensionKey
|
|
73712
|
+
value: dimensionKey,
|
|
73713
|
+
disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
|
|
73714
|
+
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
73625
73715
|
},
|
|
73626
73716
|
dropDownMenu: dimensionInfo?.cornerDropDownMenu,
|
|
73627
73717
|
pivotInfo: {
|
|
@@ -73662,7 +73752,9 @@
|
|
|
73662
73752
|
define: {
|
|
73663
73753
|
dimensionKey: '维度名称',
|
|
73664
73754
|
id,
|
|
73665
|
-
value: ''
|
|
73755
|
+
value: '',
|
|
73756
|
+
disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
|
|
73757
|
+
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
73666
73758
|
}
|
|
73667
73759
|
};
|
|
73668
73760
|
results[id] = cell;
|
|
@@ -74461,7 +74553,9 @@
|
|
|
74461
74553
|
define: {
|
|
74462
74554
|
field: '',
|
|
74463
74555
|
headerType: 'text',
|
|
74464
|
-
cellType: 'text'
|
|
74556
|
+
cellType: 'text',
|
|
74557
|
+
disableHeaderHover: !!this.columnHeaderTitle.disableHeaderHover,
|
|
74558
|
+
disableHeaderSelect: !!this.columnHeaderTitle.disableHeaderSelect
|
|
74465
74559
|
}
|
|
74466
74560
|
};
|
|
74467
74561
|
this.rowHeaderObjs.push(cell);
|
|
@@ -75536,6 +75630,24 @@
|
|
|
75536
75630
|
this.records = [];
|
|
75537
75631
|
}
|
|
75538
75632
|
}
|
|
75633
|
+
class NoneAggregator extends Aggregator {
|
|
75634
|
+
type = AggregationType.NONE;
|
|
75635
|
+
isRecord = true;
|
|
75636
|
+
fieldValue;
|
|
75637
|
+
push(record) {
|
|
75638
|
+
if (this.isRecord) {
|
|
75639
|
+
this.records = [record];
|
|
75640
|
+
}
|
|
75641
|
+
this.fieldValue = record[this.field];
|
|
75642
|
+
}
|
|
75643
|
+
value() {
|
|
75644
|
+
return this.fieldValue;
|
|
75645
|
+
}
|
|
75646
|
+
reset() {
|
|
75647
|
+
this.records = [];
|
|
75648
|
+
this.fieldValue = undefined;
|
|
75649
|
+
}
|
|
75650
|
+
}
|
|
75539
75651
|
class SumAggregator extends Aggregator {
|
|
75540
75652
|
type = AggregationType.SUM;
|
|
75541
75653
|
sum = 0;
|
|
@@ -75974,6 +76086,7 @@
|
|
|
75974
76086
|
this.registerAggregator(AggregationType.MAX, MaxAggregator);
|
|
75975
76087
|
this.registerAggregator(AggregationType.MIN, MinAggregator);
|
|
75976
76088
|
this.registerAggregator(AggregationType.AVG, AvgAggregator);
|
|
76089
|
+
this.registerAggregator(AggregationType.NONE, NoneAggregator);
|
|
75977
76090
|
}
|
|
75978
76091
|
processCollectedValuesWithSumBy() {
|
|
75979
76092
|
for (const field in this.collectedValues) {
|
|
@@ -78914,7 +79027,7 @@
|
|
|
78914
79027
|
return new Tag$1(params ? params.attribute : {});
|
|
78915
79028
|
}
|
|
78916
79029
|
|
|
78917
|
-
const version = "0.16.
|
|
79030
|
+
const version = "0.16.3";
|
|
78918
79031
|
function getIcons() {
|
|
78919
79032
|
return get$2();
|
|
78920
79033
|
}
|