@visactor/vtable 0.12.0 → 0.12.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/PivotChart.js +3 -2
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js +3 -13
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +3 -13
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/components/title/title.d.ts +1 -0
- package/cjs/components/title/title.js +18 -17
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +4 -14
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +6 -2
- package/cjs/core/BaseTable.js +20 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +1 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/EventHandler.js +3 -2
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +6 -6
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +4 -4
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +8 -4
- package/cjs/layout/pivot-header-layout.js +47 -14
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +7 -3
- package/cjs/layout/simple-header-layout.js +36 -8
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +6 -3
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +6 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/dist/vtable.js +230 -118
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.js +3 -2
- package/es/PivotChart.js.map +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js +3 -13
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +3 -13
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/components/title/title.d.ts +1 -0
- package/es/components/title/title.js +18 -17
- package/es/components/title/title.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +4 -14
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/core/BaseTable.d.ts +6 -2
- package/es/core/BaseTable.js +20 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +1 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/EventHandler.js +3 -2
- package/es/event/EventHandler.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +6 -6
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +4 -4
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +8 -4
- package/es/layout/pivot-header-layout.js +47 -14
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +7 -3
- package/es/layout/simple-header-layout.js +37 -7
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +6 -3
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/ts-types/base-table.d.ts +6 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +4 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -3365,7 +3365,7 @@
|
|
|
3365
3365
|
if (id == null) {
|
|
3366
3366
|
return;
|
|
3367
3367
|
}
|
|
3368
|
-
const obj = this.listeners[id];
|
|
3368
|
+
const obj = this.listeners?.[id];
|
|
3369
3369
|
if (!obj) {
|
|
3370
3370
|
return;
|
|
3371
3371
|
}
|
|
@@ -3415,7 +3415,7 @@
|
|
|
3415
3415
|
return;
|
|
3416
3416
|
}
|
|
3417
3417
|
this.clear();
|
|
3418
|
-
this.listeners =
|
|
3418
|
+
this.listeners = {};
|
|
3419
3419
|
}
|
|
3420
3420
|
}
|
|
3421
3421
|
|
|
@@ -39797,7 +39797,7 @@
|
|
|
39797
39797
|
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
39798
39798
|
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
39799
39799
|
: layout.dataset.collectedValues[defaultKey];
|
|
39800
|
-
const colPath = layout.getColKeysPath(col);
|
|
39800
|
+
const colPath = layout.getColKeysPath(col, row);
|
|
39801
39801
|
const range = merge$1({}, data?.[colPath ?? ''] ?? { min: 0, max: 1 });
|
|
39802
39802
|
if (range.positiveMax && range.positiveMax > range.max) {
|
|
39803
39803
|
range.max = range.positiveMax;
|
|
@@ -39852,7 +39852,7 @@
|
|
|
39852
39852
|
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
39853
39853
|
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
39854
39854
|
: layout.dataset.collectedValues[defaultKey];
|
|
39855
|
-
const colPath = layout.getColKeysPath(col);
|
|
39855
|
+
const colPath = layout.getColKeysPath(col, row);
|
|
39856
39856
|
const range = merge$1({}, data?.[colPath ?? ''] ?? { min: 0, max: 1 });
|
|
39857
39857
|
if (range.positiveMax && range.positiveMax > range.max) {
|
|
39858
39858
|
range.max = range.positiveMax;
|
|
@@ -39914,7 +39914,7 @@
|
|
|
39914
39914
|
rowDimensionKey = rowDimensionKey[0];
|
|
39915
39915
|
}
|
|
39916
39916
|
const data = layout.dataset.collectedValues[rowDimensionKey] ?? [];
|
|
39917
|
-
const rowPath = layout.getRowKeysPath(row);
|
|
39917
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
39918
39918
|
const domain = data[rowPath ?? ''] ?? [];
|
|
39919
39919
|
const { axisOption, isPercent } = getAxisOption(col + 1, row, 'left', layout);
|
|
39920
39920
|
if (axisOption?.visible === false) {
|
|
@@ -39944,7 +39944,7 @@
|
|
|
39944
39944
|
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
39945
39945
|
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
39946
39946
|
: layout.dataset.collectedValues[defaultKey];
|
|
39947
|
-
const rowPath = layout.getRowKeysPath(row);
|
|
39947
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
39948
39948
|
const range = merge$1({}, data?.[rowPath ?? ''] ?? { min: 0, max: 1 });
|
|
39949
39949
|
if (range.positiveMax && range.positiveMax > range.max) {
|
|
39950
39950
|
range.max = range.positiveMax;
|
|
@@ -40014,7 +40014,7 @@
|
|
|
40014
40014
|
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
40015
40015
|
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
40016
40016
|
: layout.dataset.collectedValues[defaultKey];
|
|
40017
|
-
const rowPath = layout.getRowKeysPath(row);
|
|
40017
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
40018
40018
|
const range = merge$1({}, data?.[rowPath ?? ''] ?? { min: 0, max: 1 });
|
|
40019
40019
|
if (range.positiveMax && range.positiveMax > range.max) {
|
|
40020
40020
|
range.max = range.positiveMax;
|
|
@@ -40068,7 +40068,7 @@
|
|
|
40068
40068
|
columnDimensionKey = columnDimensionKey[0];
|
|
40069
40069
|
}
|
|
40070
40070
|
const data = layout.dataset.collectedValues[columnDimensionKey] ?? [];
|
|
40071
|
-
const colPath = layout.getColKeysPath(col);
|
|
40071
|
+
const colPath = layout.getColKeysPath(col, row);
|
|
40072
40072
|
const domain = data?.[colPath ?? ''] ?? [];
|
|
40073
40073
|
const { axisOption, isPercent } = getAxisOption(col, row - 1, 'bottom', layout);
|
|
40074
40074
|
if (axisOption?.visible === false) {
|
|
@@ -45766,7 +45766,7 @@
|
|
|
45766
45766
|
function updateChartSize(scenegraph, col) {
|
|
45767
45767
|
for (let c = col; c <= scenegraph.proxy.colEnd; c++) {
|
|
45768
45768
|
const columnGroup = scenegraph.getColGroup(c);
|
|
45769
|
-
columnGroup.getChildren()
|
|
45769
|
+
columnGroup.getChildren()?.forEach((cellNode) => {
|
|
45770
45770
|
const width = scenegraph.table.getColWidth(cellNode.col);
|
|
45771
45771
|
const height = scenegraph.table.getRowHeight(cellNode.row);
|
|
45772
45772
|
cellNode.children.forEach((node) => {
|
|
@@ -45782,7 +45782,7 @@
|
|
|
45782
45782
|
function clearChartCacheImage(scenegraph) {
|
|
45783
45783
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
45784
45784
|
const columnGroup = scenegraph.getColGroup(c);
|
|
45785
|
-
columnGroup.getChildren()
|
|
45785
|
+
columnGroup.getChildren()?.forEach((cellNode) => {
|
|
45786
45786
|
cellNode.children.forEach((node) => {
|
|
45787
45787
|
if (node.type === 'chart') {
|
|
45788
45788
|
node.cacheCanvas = null;
|
|
@@ -45796,7 +45796,7 @@
|
|
|
45796
45796
|
const table = scenegraph.table;
|
|
45797
45797
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
45798
45798
|
const columnGroup = scenegraph.getColGroup(c);
|
|
45799
|
-
columnGroup.getChildren()
|
|
45799
|
+
columnGroup.getChildren()?.forEach((cellNode) => {
|
|
45800
45800
|
const col = cellNode.col;
|
|
45801
45801
|
const row = cellNode.row;
|
|
45802
45802
|
cellNode.children.forEach((node) => {
|
|
@@ -50677,23 +50677,13 @@
|
|
|
50677
50677
|
const rect = table.getCellRangeRelativeRect({ col, row });
|
|
50678
50678
|
const element = table.getElement();
|
|
50679
50679
|
const { top, bottom, left, right } = rect;
|
|
50680
|
-
|
|
50681
|
-
|
|
50682
|
-
const frozenRect = table.getCellRangeRelativeRect({ col, row: frozenRowCount - 1 });
|
|
50683
|
-
if (bottom < frozenRect.bottom) {
|
|
50684
|
-
return false;
|
|
50685
|
-
}
|
|
50686
|
-
}
|
|
50687
|
-
else if (bottom < 0) {
|
|
50688
|
-
return false;
|
|
50689
|
-
}
|
|
50690
|
-
if (col >= frozenColCount && frozenColCount > 0) {
|
|
50691
|
-
const frozenRect = table.getCellRangeRelativeRect({ col: frozenColCount - 1, row });
|
|
50692
|
-
if (right < frozenRect.right) {
|
|
50693
|
-
return false;
|
|
50694
|
-
}
|
|
50680
|
+
if (table.isFrozenCell(col, row)) {
|
|
50681
|
+
return true;
|
|
50695
50682
|
}
|
|
50696
|
-
else if (
|
|
50683
|
+
else if (bottom < table.getFrozenRowsHeight() ||
|
|
50684
|
+
right < table.getFrozenColsWidth() ||
|
|
50685
|
+
left > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ||
|
|
50686
|
+
top > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight()) {
|
|
50697
50687
|
return false;
|
|
50698
50688
|
}
|
|
50699
50689
|
const { offsetHeight, offsetWidth } = element;
|
|
@@ -51353,31 +51343,21 @@
|
|
|
51353
51343
|
_canBindToCell(table, col, row) {
|
|
51354
51344
|
const rect = table.getCellRangeRelativeRect({ col, row });
|
|
51355
51345
|
const element = table.getElement();
|
|
51356
|
-
const { bottom, left, right } = rect;
|
|
51357
|
-
|
|
51358
|
-
|
|
51359
|
-
const frozenRect = table.getCellRangeRelativeRect({ col, row: frozenRowCount - 1 });
|
|
51360
|
-
if (bottom < frozenRect.bottom) {
|
|
51361
|
-
return false;
|
|
51362
|
-
}
|
|
51363
|
-
}
|
|
51364
|
-
else if (bottom < 0) {
|
|
51365
|
-
return false;
|
|
51366
|
-
}
|
|
51367
|
-
if (col >= frozenColCount && frozenColCount > 0) {
|
|
51368
|
-
const frozenRect = table.getCellRangeRelativeRect({ col: frozenColCount - 1, row });
|
|
51369
|
-
if (right < frozenRect.right) {
|
|
51370
|
-
return false;
|
|
51371
|
-
}
|
|
51346
|
+
const { bottom, left, right, top } = rect;
|
|
51347
|
+
if (table.isFrozenCell(col, row)) {
|
|
51348
|
+
return true;
|
|
51372
51349
|
}
|
|
51373
|
-
else if (
|
|
51350
|
+
else if (bottom < table.getFrozenRowsHeight() ||
|
|
51351
|
+
right < table.getFrozenColsWidth() ||
|
|
51352
|
+
left > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ||
|
|
51353
|
+
top > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight()) {
|
|
51374
51354
|
return false;
|
|
51375
51355
|
}
|
|
51376
51356
|
const { offsetHeight, offsetWidth } = element;
|
|
51377
|
-
if (
|
|
51357
|
+
if (top > offsetHeight) {
|
|
51378
51358
|
return false;
|
|
51379
51359
|
}
|
|
51380
|
-
if (
|
|
51360
|
+
if (left > offsetWidth) {
|
|
51381
51361
|
return false;
|
|
51382
51362
|
}
|
|
51383
51363
|
return true;
|
|
@@ -51870,23 +51850,13 @@
|
|
|
51870
51850
|
const rect = table.getCellRangeRelativeRect({ col, row });
|
|
51871
51851
|
const element = table.getElement();
|
|
51872
51852
|
const { top, bottom, left, right } = rect;
|
|
51873
|
-
|
|
51874
|
-
|
|
51875
|
-
const frozenRect = table.getCellRangeRelativeRect({ col, row: frozenRowCount - 1 });
|
|
51876
|
-
if (bottom < frozenRect.bottom) {
|
|
51877
|
-
return false;
|
|
51878
|
-
}
|
|
51879
|
-
}
|
|
51880
|
-
else if (bottom < 0) {
|
|
51881
|
-
return false;
|
|
51882
|
-
}
|
|
51883
|
-
if (col >= frozenColCount && frozenColCount > 0) {
|
|
51884
|
-
const frozenRect = table.getCellRangeRelativeRect({ col: frozenColCount - 1, row });
|
|
51885
|
-
if (right < frozenRect.right) {
|
|
51886
|
-
return false;
|
|
51887
|
-
}
|
|
51853
|
+
if (table.isFrozenCell(col, row)) {
|
|
51854
|
+
return true;
|
|
51888
51855
|
}
|
|
51889
|
-
else if (
|
|
51856
|
+
else if (bottom < table.getFrozenRowsHeight() ||
|
|
51857
|
+
right < table.getFrozenColsWidth() ||
|
|
51858
|
+
left > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ||
|
|
51859
|
+
top > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight()) {
|
|
51890
51860
|
return false;
|
|
51891
51861
|
}
|
|
51892
51862
|
const { offsetHeight, offsetWidth } = element;
|
|
@@ -52776,7 +52746,7 @@
|
|
|
52776
52746
|
return TABLE_EVENT_TYPE;
|
|
52777
52747
|
}
|
|
52778
52748
|
options;
|
|
52779
|
-
version = "0.12.
|
|
52749
|
+
version = "0.12.1-alpha.1";
|
|
52780
52750
|
pagination;
|
|
52781
52751
|
id = `VTable${Date.now()}`;
|
|
52782
52752
|
headerStyleCache;
|
|
@@ -53503,9 +53473,8 @@
|
|
|
53503
53473
|
return this.getCellsRectWidth(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row);
|
|
53504
53474
|
}
|
|
53505
53475
|
isFrozenCell(col, row) {
|
|
53506
|
-
const
|
|
53507
|
-
const
|
|
53508
|
-
const isFrozenCol = (frozenColCount > 0 && col < frozenColCount) || this.isRightFrozenColumn(col, row);
|
|
53476
|
+
const isFrozenRow = this.isFrozenRow(row) || this.isBottomFrozenRow(row);
|
|
53477
|
+
const isFrozenCol = this.isFrozenRow(col) || this.isRightFrozenColumn(col);
|
|
53509
53478
|
if (isFrozenRow || isFrozenCol) {
|
|
53510
53479
|
return {
|
|
53511
53480
|
row: isFrozenRow,
|
|
@@ -54228,6 +54197,11 @@
|
|
|
54228
54197
|
_setRecords(this, records);
|
|
54229
54198
|
}
|
|
54230
54199
|
this.scenegraph.createSceneGraph();
|
|
54200
|
+
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
54201
|
+
this._updateSize();
|
|
54202
|
+
this.internalProps.title.resize();
|
|
54203
|
+
this.scenegraph.resize();
|
|
54204
|
+
}
|
|
54231
54205
|
this.render();
|
|
54232
54206
|
}
|
|
54233
54207
|
setRecord(record, col, row) {
|
|
@@ -54252,9 +54226,21 @@
|
|
|
54252
54226
|
isCornerHeader(col, row) {
|
|
54253
54227
|
return this.internalProps.layoutMap?.isCornerHeader(col, row);
|
|
54254
54228
|
}
|
|
54229
|
+
isFrozenColumn(col, row) {
|
|
54230
|
+
return this.internalProps.layoutMap?.isFrozenColumn(col, row);
|
|
54231
|
+
}
|
|
54232
|
+
isLeftFrozenColumn(col, row) {
|
|
54233
|
+
return this.internalProps.layoutMap?.isFrozenColumn(col, row);
|
|
54234
|
+
}
|
|
54255
54235
|
isRightFrozenColumn(col, row) {
|
|
54256
54236
|
return this.internalProps.layoutMap?.isRightFrozenColumn(col, row);
|
|
54257
54237
|
}
|
|
54238
|
+
isFrozenRow(col, row) {
|
|
54239
|
+
return this.internalProps.layoutMap?.isFrozenRow(col, row);
|
|
54240
|
+
}
|
|
54241
|
+
isTopFrozenRow(col, row) {
|
|
54242
|
+
return this.internalProps.layoutMap?.isFrozenRow(col, row);
|
|
54243
|
+
}
|
|
54258
54244
|
isBottomFrozenRow(col, row) {
|
|
54259
54245
|
return this.internalProps.layoutMap?.isBottomFrozenRow(col, row);
|
|
54260
54246
|
}
|
|
@@ -54991,7 +54977,7 @@
|
|
|
54991
54977
|
const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
54992
54978
|
? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
54993
54979
|
: layout.dataset.collectedValues[key];
|
|
54994
|
-
const colPath = layout.getColKeysPath(col);
|
|
54980
|
+
const colPath = layout.getColKeysPath(col, row);
|
|
54995
54981
|
const range = merge$1({}, data?.[colPath ?? ''] ?? { min: 0, max: 1 });
|
|
54996
54982
|
if (range.positiveMax && range.positiveMax > range.max) {
|
|
54997
54983
|
range.max = range.positiveMax;
|
|
@@ -55038,7 +55024,7 @@
|
|
|
55038
55024
|
const data = layout.dataset.cacheCollectedValues[rowDimensionKey] ||
|
|
55039
55025
|
layout.dataset.collectedValues[rowDimensionKey] ||
|
|
55040
55026
|
[];
|
|
55041
|
-
const rowPath = layout.getRowKeysPath(row);
|
|
55027
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
55042
55028
|
const domain = data[rowPath ?? ''];
|
|
55043
55029
|
const { axisOption, isPercent } = getAxisOption(col, row, 'left', layout);
|
|
55044
55030
|
axes.push(merge$1({
|
|
@@ -55056,7 +55042,7 @@
|
|
|
55056
55042
|
}
|
|
55057
55043
|
else {
|
|
55058
55044
|
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
55059
|
-
const rowPath = layout.getRowKeysPath(row);
|
|
55045
|
+
const rowPath = layout.getRowKeysPath(col, row);
|
|
55060
55046
|
indicatorKeys.forEach((key, index) => {
|
|
55061
55047
|
if (isArray$5(key)) {
|
|
55062
55048
|
key = key[0];
|
|
@@ -55111,7 +55097,7 @@
|
|
|
55111
55097
|
const data = layout.dataset.cacheCollectedValues[columnDimensionKey] ||
|
|
55112
55098
|
layout.dataset.collectedValues[columnDimensionKey] ||
|
|
55113
55099
|
[];
|
|
55114
|
-
const colPath = layout.getColKeysPath(col);
|
|
55100
|
+
const colPath = layout.getColKeysPath(col, row);
|
|
55115
55101
|
const domain = data?.[colPath ?? ''] ?? [];
|
|
55116
55102
|
const { axisOption, isPercent } = getAxisOption(col, row, 'bottom', layout);
|
|
55117
55103
|
axes.push(merge$1({
|
|
@@ -55211,25 +55197,73 @@
|
|
|
55211
55197
|
}
|
|
55212
55198
|
return 'body';
|
|
55213
55199
|
}
|
|
55200
|
+
isRowHeader(col, row) {
|
|
55201
|
+
if (this.transpose && col < this.headerLevelCount) {
|
|
55202
|
+
return true;
|
|
55203
|
+
}
|
|
55204
|
+
return false;
|
|
55205
|
+
}
|
|
55214
55206
|
isColumnHeader(col, row) {
|
|
55215
55207
|
if (!this.transpose && row < this.headerLevelCount) {
|
|
55216
55208
|
return true;
|
|
55217
55209
|
}
|
|
55218
55210
|
return false;
|
|
55219
55211
|
}
|
|
55212
|
+
isFrozenColumn(col, row) {
|
|
55213
|
+
if (isValid$6(row)) {
|
|
55214
|
+
if (col < this.frozenColCount && row >= this.frozenRowCount && row < this.rowCount - this.bottomFrozenRowCount) {
|
|
55215
|
+
return true;
|
|
55216
|
+
}
|
|
55217
|
+
}
|
|
55218
|
+
else {
|
|
55219
|
+
if (this.frozenColCount > 0 && col < this.frozenColCount) {
|
|
55220
|
+
return true;
|
|
55221
|
+
}
|
|
55222
|
+
}
|
|
55223
|
+
return false;
|
|
55224
|
+
}
|
|
55220
55225
|
isRightFrozenColumn(col, row) {
|
|
55221
|
-
if (
|
|
55222
|
-
|
|
55223
|
-
|
|
55224
|
-
|
|
55226
|
+
if (isValid$6(row)) {
|
|
55227
|
+
if (col >= this.colCount - this.rightFrozenColCount &&
|
|
55228
|
+
row >= this.frozenRowCount &&
|
|
55229
|
+
row < this.rowCount - this.bottomFrozenRowCount) {
|
|
55230
|
+
return true;
|
|
55231
|
+
}
|
|
55232
|
+
}
|
|
55233
|
+
else {
|
|
55234
|
+
if (this.rightFrozenColCount > 0 && col >= this.colCount - this.rightFrozenColCount) {
|
|
55235
|
+
return true;
|
|
55236
|
+
}
|
|
55237
|
+
}
|
|
55238
|
+
return false;
|
|
55239
|
+
}
|
|
55240
|
+
isFrozenRow(col, row) {
|
|
55241
|
+
if (isValid$6(row)) {
|
|
55242
|
+
if (row < this.frozenRowCount && col >= this.frozenColCount && col < this.colCount - this.rightFrozenColCount) {
|
|
55243
|
+
return true;
|
|
55244
|
+
}
|
|
55245
|
+
}
|
|
55246
|
+
else {
|
|
55247
|
+
row = col;
|
|
55248
|
+
if (this.frozenRowCount > 0 && row < this.frozenRowCount) {
|
|
55249
|
+
return true;
|
|
55250
|
+
}
|
|
55225
55251
|
}
|
|
55226
55252
|
return false;
|
|
55227
55253
|
}
|
|
55228
55254
|
isBottomFrozenRow(col, row) {
|
|
55229
|
-
if (
|
|
55230
|
-
row >= this.rowCount - this.bottomFrozenRowCount &&
|
|
55231
|
-
|
|
55232
|
-
|
|
55255
|
+
if (isValid$6(row)) {
|
|
55256
|
+
if (row >= this.rowCount - this.bottomFrozenRowCount &&
|
|
55257
|
+
col >= this.frozenColCount &&
|
|
55258
|
+
col < this.colCount - this.rightFrozenColCount) {
|
|
55259
|
+
return true;
|
|
55260
|
+
}
|
|
55261
|
+
}
|
|
55262
|
+
else {
|
|
55263
|
+
row = col;
|
|
55264
|
+
if (this.frozenRowCount > 0 && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
55265
|
+
return true;
|
|
55266
|
+
}
|
|
55233
55267
|
}
|
|
55234
55268
|
return false;
|
|
55235
55269
|
}
|
|
@@ -55254,12 +55288,6 @@
|
|
|
55254
55288
|
isCornerHeader(col, row) {
|
|
55255
55289
|
return false;
|
|
55256
55290
|
}
|
|
55257
|
-
isRowHeader(col, row) {
|
|
55258
|
-
if (this.transpose && col < this.headerLevelCount) {
|
|
55259
|
-
return true;
|
|
55260
|
-
}
|
|
55261
|
-
return false;
|
|
55262
|
-
}
|
|
55263
55291
|
getColumnHeaderRange() {
|
|
55264
55292
|
if (this.transpose) {
|
|
55265
55293
|
return {
|
|
@@ -55308,11 +55336,17 @@
|
|
|
55308
55336
|
get rowHeaderLevelCount() {
|
|
55309
55337
|
return this.transpose ? this.headerLevelCount : 0;
|
|
55310
55338
|
}
|
|
55339
|
+
get frozenColCount() {
|
|
55340
|
+
return this._table.internalProps.frozenColCount ?? 0;
|
|
55341
|
+
}
|
|
55342
|
+
get frozenRowCount() {
|
|
55343
|
+
return this._table.internalProps.frozenRowCount ?? 0;
|
|
55344
|
+
}
|
|
55311
55345
|
get bottomFrozenRowCount() {
|
|
55312
|
-
return 0;
|
|
55346
|
+
return this._table.internalProps.bottomFrozenRowCount ?? 0;
|
|
55313
55347
|
}
|
|
55314
55348
|
get rightFrozenColCount() {
|
|
55315
|
-
return 0;
|
|
55349
|
+
return this._table.internalProps.rightFrozenColCount ?? 0;
|
|
55316
55350
|
}
|
|
55317
55351
|
get colCount() {
|
|
55318
55352
|
return this.transpose ? this.headerLevelCount + this.recordsCount : this._columns.length;
|
|
@@ -55826,6 +55860,7 @@
|
|
|
55826
55860
|
class Title {
|
|
55827
55861
|
table;
|
|
55828
55862
|
_titleOption;
|
|
55863
|
+
isReleased = false;
|
|
55829
55864
|
_titleComponent;
|
|
55830
55865
|
_cacheAttrs;
|
|
55831
55866
|
constructor(titleOption, table) {
|
|
@@ -55855,6 +55890,8 @@
|
|
|
55855
55890
|
const padding = getQuadProps(this._titleOption.padding ?? 10);
|
|
55856
55891
|
const realWidth = this._titleOption.width ??
|
|
55857
55892
|
Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) - padding[1] - padding[3];
|
|
55893
|
+
const realHeight = this._titleOption.height ??
|
|
55894
|
+
Math.min(this.table.tableNoFrameHeight, this.table.getDrawRange().height) - padding[0] - padding[2];
|
|
55858
55895
|
this._titleComponent.setAttributes({
|
|
55859
55896
|
x: this._titleOption.x ?? this._titleOption.orient === 'right'
|
|
55860
55897
|
? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width)
|
|
@@ -55862,7 +55899,12 @@
|
|
|
55862
55899
|
y: this._titleOption.y ?? this._titleOption.orient === 'bottom'
|
|
55863
55900
|
? this.table.tableY + this.table.tableNoFrameHeight
|
|
55864
55901
|
: this.table.tableY,
|
|
55865
|
-
width:
|
|
55902
|
+
width: this._titleOption.orient === 'top' || this._titleOption.orient === 'bottom'
|
|
55903
|
+
? realWidth
|
|
55904
|
+
: this._titleOption.width,
|
|
55905
|
+
height: this._titleOption.orient === 'left' || this._titleOption.orient === 'right'
|
|
55906
|
+
? realHeight
|
|
55907
|
+
: this._titleOption.height,
|
|
55866
55908
|
textStyle: {
|
|
55867
55909
|
width: realWidth,
|
|
55868
55910
|
...this._titleOption.textStyle
|
|
@@ -55906,11 +55948,14 @@
|
|
|
55906
55948
|
release() {
|
|
55907
55949
|
this._titleComponent && this.table.scenegraph.stage.defaultLayer.removeChild(this._titleComponent);
|
|
55908
55950
|
this._titleComponent = null;
|
|
55951
|
+
this.isReleased = true;
|
|
55909
55952
|
}
|
|
55910
55953
|
_getTitleAttrs() {
|
|
55911
55954
|
const padding = getQuadProps(this._titleOption.padding ?? 10);
|
|
55912
55955
|
const realWidth = this._titleOption.width ??
|
|
55913
55956
|
Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) - padding[1] - padding[3];
|
|
55957
|
+
const realHeight = this._titleOption.height ??
|
|
55958
|
+
Math.min(this.table.tableNoFrameHeight, this.table.getDrawRange().height) - padding[0] - padding[2];
|
|
55914
55959
|
return {
|
|
55915
55960
|
text: this._titleOption.text ?? '',
|
|
55916
55961
|
subtext: this._titleOption.subtext ?? '',
|
|
@@ -55922,8 +55967,10 @@
|
|
|
55922
55967
|
: this.table.tableY,
|
|
55923
55968
|
width: this._titleOption.orient === 'top' || this._titleOption.orient === 'bottom'
|
|
55924
55969
|
? realWidth
|
|
55970
|
+
: this._titleOption.width,
|
|
55971
|
+
height: this._titleOption.orient === 'left' || this._titleOption.orient === 'right'
|
|
55972
|
+
? realHeight
|
|
55925
55973
|
: this._titleOption.height,
|
|
55926
|
-
height: this._titleOption.height,
|
|
55927
55974
|
minWidth: this._titleOption.minWidth,
|
|
55928
55975
|
maxWidth: this._titleOption.maxWidth,
|
|
55929
55976
|
minHeight: this._titleOption.minHeight,
|
|
@@ -56757,6 +56804,16 @@
|
|
|
56757
56804
|
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(rowKeys);
|
|
56758
56805
|
});
|
|
56759
56806
|
}
|
|
56807
|
+
if (this._table.isPivotChart()) {
|
|
56808
|
+
this.hasTwoIndicatorAxes = this._indicators.some(indicatorObject => {
|
|
56809
|
+
if (indicatorObject.chartSpec &&
|
|
56810
|
+
indicatorObject.chartSpec.series &&
|
|
56811
|
+
indicatorObject.chartSpec.series.length > 1) {
|
|
56812
|
+
return true;
|
|
56813
|
+
}
|
|
56814
|
+
return false;
|
|
56815
|
+
});
|
|
56816
|
+
}
|
|
56760
56817
|
if (this.cornerSetting.titleOnDimension === 'column') {
|
|
56761
56818
|
this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [''].concat(this.colDimensionKeys) : this.colDimensionKeys, this.columnsDefine);
|
|
56762
56819
|
}
|
|
@@ -56795,14 +56852,6 @@
|
|
|
56795
56852
|
}
|
|
56796
56853
|
this.setPagination(table.options.pagination);
|
|
56797
56854
|
if (this._table.isPivotChart()) {
|
|
56798
|
-
this.hasTwoIndicatorAxes = this._indicators.some(indicatorObject => {
|
|
56799
|
-
if (indicatorObject.chartSpec &&
|
|
56800
|
-
indicatorObject.chartSpec.series &&
|
|
56801
|
-
indicatorObject.chartSpec.series.length > 1) {
|
|
56802
|
-
return true;
|
|
56803
|
-
}
|
|
56804
|
-
return false;
|
|
56805
|
-
});
|
|
56806
56855
|
this._chartItemSpanSize = 0;
|
|
56807
56856
|
this._chartItemBandSize = 0;
|
|
56808
56857
|
this._indicators.find(indicatorObject => {
|
|
@@ -57290,19 +57339,61 @@
|
|
|
57290
57339
|
}
|
|
57291
57340
|
return false;
|
|
57292
57341
|
}
|
|
57342
|
+
isFrozenColumn(col, row) {
|
|
57343
|
+
if (isValid$6(row)) {
|
|
57344
|
+
if (col < this.frozenColCount && row >= this.frozenRowCount && row < this.rowCount - this.bottomFrozenRowCount) {
|
|
57345
|
+
return true;
|
|
57346
|
+
}
|
|
57347
|
+
}
|
|
57348
|
+
else {
|
|
57349
|
+
if (this.frozenColCount > 0 && col < this.frozenColCount) {
|
|
57350
|
+
return true;
|
|
57351
|
+
}
|
|
57352
|
+
}
|
|
57353
|
+
return false;
|
|
57354
|
+
}
|
|
57293
57355
|
isRightFrozenColumn(col, row) {
|
|
57294
|
-
if (
|
|
57295
|
-
|
|
57296
|
-
|
|
57297
|
-
|
|
57356
|
+
if (isValid$6(row)) {
|
|
57357
|
+
if (col >= this.colCount - this.rightFrozenColCount &&
|
|
57358
|
+
row >= this.frozenRowCount &&
|
|
57359
|
+
row < this.rowCount - this.bottomFrozenRowCount) {
|
|
57360
|
+
return true;
|
|
57361
|
+
}
|
|
57362
|
+
}
|
|
57363
|
+
else {
|
|
57364
|
+
if (this.rightFrozenColCount > 0 && col >= this.colCount - this.rightFrozenColCount) {
|
|
57365
|
+
return true;
|
|
57366
|
+
}
|
|
57367
|
+
}
|
|
57368
|
+
return false;
|
|
57369
|
+
}
|
|
57370
|
+
isFrozenRow(col, row) {
|
|
57371
|
+
if (isValid$6(row)) {
|
|
57372
|
+
if (row < this.frozenRowCount && col >= this.frozenColCount && col < this.colCount - this.rightFrozenColCount) {
|
|
57373
|
+
return true;
|
|
57374
|
+
}
|
|
57375
|
+
}
|
|
57376
|
+
else {
|
|
57377
|
+
row = col;
|
|
57378
|
+
if (this.frozenRowCount > 0 && row < this.frozenRowCount) {
|
|
57379
|
+
return true;
|
|
57380
|
+
}
|
|
57298
57381
|
}
|
|
57299
57382
|
return false;
|
|
57300
57383
|
}
|
|
57301
57384
|
isBottomFrozenRow(col, row) {
|
|
57302
|
-
if (
|
|
57303
|
-
row >= this.rowCount - this.bottomFrozenRowCount &&
|
|
57304
|
-
|
|
57305
|
-
|
|
57385
|
+
if (isValid$6(row)) {
|
|
57386
|
+
if (row >= this.rowCount - this.bottomFrozenRowCount &&
|
|
57387
|
+
col >= this.frozenColCount &&
|
|
57388
|
+
col < this.colCount - this.rightFrozenColCount) {
|
|
57389
|
+
return true;
|
|
57390
|
+
}
|
|
57391
|
+
}
|
|
57392
|
+
else {
|
|
57393
|
+
row = col;
|
|
57394
|
+
if (this.frozenRowCount > 0 && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
57395
|
+
return true;
|
|
57396
|
+
}
|
|
57306
57397
|
}
|
|
57307
57398
|
return false;
|
|
57308
57399
|
}
|
|
@@ -57350,6 +57441,12 @@
|
|
|
57350
57441
|
}
|
|
57351
57442
|
resetCellIds() {
|
|
57352
57443
|
}
|
|
57444
|
+
get frozenColCount() {
|
|
57445
|
+
return this._table.internalProps.frozenColCount ?? 0;
|
|
57446
|
+
}
|
|
57447
|
+
get frozenRowCount() {
|
|
57448
|
+
return this._table.internalProps.frozenRowCount ?? 0;
|
|
57449
|
+
}
|
|
57353
57450
|
get headerLevelCount() {
|
|
57354
57451
|
return this.columnHeaderLevelCount;
|
|
57355
57452
|
}
|
|
@@ -57371,6 +57468,9 @@
|
|
|
57371
57468
|
if (this.columnHeaderTitle) {
|
|
57372
57469
|
count += 1;
|
|
57373
57470
|
}
|
|
57471
|
+
if (this._table.isPivotChart() && this.indicatorsAsCol && !this.hasTwoIndicatorAxes) {
|
|
57472
|
+
count -= 1;
|
|
57473
|
+
}
|
|
57374
57474
|
return count;
|
|
57375
57475
|
}
|
|
57376
57476
|
return 0;
|
|
@@ -57403,7 +57503,7 @@
|
|
|
57403
57503
|
return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.rightFrozenColCount;
|
|
57404
57504
|
}
|
|
57405
57505
|
get rowCount() {
|
|
57406
|
-
return
|
|
57506
|
+
return (this._rowHeaderCellIds?.length ?? 0) + this.columnHeaderLevelCount + this.bottomFrozenRowCount;
|
|
57407
57507
|
}
|
|
57408
57508
|
get bodyRowCount() {
|
|
57409
57509
|
return this.rowDimensionTree.tree.size;
|
|
@@ -58513,18 +58613,28 @@
|
|
|
58513
58613
|
get bottomAxesCount() {
|
|
58514
58614
|
return this.bottomFrozenRowCount;
|
|
58515
58615
|
}
|
|
58516
|
-
getColKeysPath(col) {
|
|
58517
|
-
const
|
|
58518
|
-
|
|
58519
|
-
|
|
58520
|
-
|
|
58616
|
+
getColKeysPath(col, row) {
|
|
58617
|
+
const path = this.getCellHeaderPaths(col, row);
|
|
58618
|
+
const colKey = [];
|
|
58619
|
+
if (path.colHeaderPaths.length) {
|
|
58620
|
+
path.colHeaderPaths.forEach(path => {
|
|
58621
|
+
if (path.dimensionKey) {
|
|
58622
|
+
colKey.push(path.value);
|
|
58623
|
+
}
|
|
58624
|
+
});
|
|
58625
|
+
}
|
|
58521
58626
|
return colKey?.join(this.dataset.stringJoinChar);
|
|
58522
58627
|
}
|
|
58523
|
-
getRowKeysPath(row) {
|
|
58524
|
-
const
|
|
58525
|
-
|
|
58526
|
-
|
|
58527
|
-
|
|
58628
|
+
getRowKeysPath(col, row) {
|
|
58629
|
+
const path = this.getCellHeaderPaths(col, row);
|
|
58630
|
+
const rowKey = [];
|
|
58631
|
+
if (path.rowHeaderPaths.length) {
|
|
58632
|
+
path.rowHeaderPaths.forEach(path => {
|
|
58633
|
+
if (path.dimensionKey) {
|
|
58634
|
+
rowKey.push(path.value);
|
|
58635
|
+
}
|
|
58636
|
+
});
|
|
58637
|
+
}
|
|
58528
58638
|
return rowKey?.join(this.dataset.stringJoinChar);
|
|
58529
58639
|
}
|
|
58530
58640
|
getIndicatorInfo(indicatorKey, indicatorValue = '') {
|
|
@@ -59327,7 +59437,9 @@
|
|
|
59327
59437
|
this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows, indicatorsAsCol ? undefined : indicators);
|
|
59328
59438
|
}
|
|
59329
59439
|
else {
|
|
59330
|
-
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows, indicatorsAsCol ? undefined : indicators, this.rowsIsTotal, this?.totals?.row?.showGrandTotals ||
|
|
59440
|
+
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows, indicatorsAsCol ? undefined : indicators, this.rowsIsTotal, this?.totals?.row?.showGrandTotals ||
|
|
59441
|
+
(!indicatorsAsCol && this.columns.length === 0) ||
|
|
59442
|
+
(indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.rowSubTotalLabel);
|
|
59331
59443
|
}
|
|
59332
59444
|
}
|
|
59333
59445
|
if (customColTree) {
|
|
@@ -60772,7 +60884,7 @@
|
|
|
60772
60884
|
!options.indicatorsAsCol && !options.rows?.length && !options.rowTree ? [] : cloneDeep$1(options.rowTree);
|
|
60773
60885
|
this.setCustomStateNameToSpec();
|
|
60774
60886
|
internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
60775
|
-
internalProps.dataConfig = {};
|
|
60887
|
+
internalProps.dataConfig = { isPivotChart: true };
|
|
60776
60888
|
this._axes = isArray$5(options.axes) ? options.axes : [];
|
|
60777
60889
|
if (options.rows || options.columns) {
|
|
60778
60890
|
const rowKeys = options.rows.reduce((keys, rowObj) => {
|
|
@@ -62281,7 +62393,7 @@
|
|
|
62281
62393
|
return new Tag(params ? params.attribute : {});
|
|
62282
62394
|
}
|
|
62283
62395
|
|
|
62284
|
-
const version = "0.12.
|
|
62396
|
+
const version = "0.12.1-alpha.1";
|
|
62285
62397
|
function getIcons() {
|
|
62286
62398
|
return get$1();
|
|
62287
62399
|
}
|