@visactor/vtable 0.14.4-alpha.2 → 0.14.4-alpha.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/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/DataSource.js +1 -1
- package/cjs/data/DataSource.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/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +14 -11
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +1 -0
- package/cjs/layout/simple-header-layout.js +3 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +4 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +30 -59
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +1 -3
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +18 -3
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +4 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/dist/vtable.js +59 -19
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/DataSource.js +1 -1
- package/es/data/DataSource.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.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +14 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +1 -0
- package/es/layout/simple-header-layout.js +3 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +4 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +29 -57
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +1 -3
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +20 -2
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.js +2 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -33111,7 +33111,7 @@
|
|
|
33111
33111
|
return maybePromiseOrValue;
|
|
33112
33112
|
}
|
|
33113
33113
|
function getField(record, field, col, row, table, promiseCallBack) {
|
|
33114
|
-
if (record === null) {
|
|
33114
|
+
if (record === null || record === undefined) {
|
|
33115
33115
|
return undefined;
|
|
33116
33116
|
}
|
|
33117
33117
|
if (isPromise$1(record)) {
|
|
@@ -37123,6 +37123,13 @@
|
|
|
37123
37123
|
axis.overlap();
|
|
37124
37124
|
}
|
|
37125
37125
|
else if (table.internalProps.layoutMap.isEmpty(col, row)) {
|
|
37126
|
+
cellGroup.setAttributes({
|
|
37127
|
+
fill: false,
|
|
37128
|
+
stroke: false
|
|
37129
|
+
});
|
|
37130
|
+
cellGroup.clear();
|
|
37131
|
+
}
|
|
37132
|
+
else if (table.internalProps.layoutMap.isAxisCell(col, row)) {
|
|
37126
37133
|
cellGroup.clear();
|
|
37127
37134
|
}
|
|
37128
37135
|
}
|
|
@@ -41364,7 +41371,7 @@
|
|
|
41364
41371
|
containerGroup.setAttribute('height', heightMax);
|
|
41365
41372
|
}
|
|
41366
41373
|
|
|
41367
|
-
|
|
41374
|
+
function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
41368
41375
|
const { table } = proxy;
|
|
41369
41376
|
const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;
|
|
41370
41377
|
proxy.setParamsForRow();
|
|
@@ -41403,18 +41410,14 @@
|
|
|
41403
41410
|
createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
41404
41411
|
createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', table);
|
|
41405
41412
|
if (table.bottomFrozenRowCount > 0) {
|
|
41406
|
-
|
|
41407
|
-
createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? 'body' : 'rowHeader', table);
|
|
41408
|
-
}
|
|
41413
|
+
createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? 'body' : 'rowHeader', table);
|
|
41409
41414
|
createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? 'rowHeader' : 'body', table);
|
|
41410
41415
|
}
|
|
41411
41416
|
if (table.rightFrozenColCount > 0) {
|
|
41412
|
-
|
|
41413
|
-
createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
41414
|
-
}
|
|
41417
|
+
createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
41415
41418
|
createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? 'rowHeader' : 'body', table);
|
|
41416
41419
|
}
|
|
41417
|
-
if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0
|
|
41420
|
+
if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {
|
|
41418
41421
|
createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, 'body', table);
|
|
41419
41422
|
}
|
|
41420
41423
|
createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, 'body', table);
|
|
@@ -41438,7 +41441,7 @@
|
|
|
41438
41441
|
proxy.colEnd = proxy.currentCol;
|
|
41439
41442
|
proxy.colUpdatePos = proxy.colEnd + 1;
|
|
41440
41443
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
41441
|
-
|
|
41444
|
+
proxy.progress();
|
|
41442
41445
|
}
|
|
41443
41446
|
}
|
|
41444
41447
|
|
|
@@ -42098,8 +42101,8 @@
|
|
|
42098
42101
|
this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));
|
|
42099
42102
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
42100
42103
|
}
|
|
42101
|
-
|
|
42102
|
-
|
|
42104
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
|
|
42105
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
42103
42106
|
}
|
|
42104
42107
|
async progress() {
|
|
42105
42108
|
if (this.isProgressing) {
|
|
@@ -43389,6 +43392,12 @@
|
|
|
43389
43392
|
scene.leftBottomCornerGroup.appendChild(column);
|
|
43390
43393
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width + column.attribute.width);
|
|
43391
43394
|
scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);
|
|
43395
|
+
column.forEachChildren((child) => {
|
|
43396
|
+
child.setAttributes({
|
|
43397
|
+
stroke: false,
|
|
43398
|
+
fill: false
|
|
43399
|
+
});
|
|
43400
|
+
});
|
|
43392
43401
|
}
|
|
43393
43402
|
}
|
|
43394
43403
|
function moveColumnFromLeftBottomCornerToBottom(scene) {
|
|
@@ -43399,6 +43408,15 @@
|
|
|
43399
43408
|
insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild);
|
|
43400
43409
|
scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);
|
|
43401
43410
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width - column.attribute.width);
|
|
43411
|
+
column.forEachChildren((child) => {
|
|
43412
|
+
const cellStyle = scene.table._getCellStyle(child.col, child.row);
|
|
43413
|
+
const range = scene.table.getCellRange(child.col, child.row);
|
|
43414
|
+
const cellTheme = getStyleTheme(cellStyle, scene.table, range ? range.start.col : child.col, range ? range.start.row : child.row, getProp).theme;
|
|
43415
|
+
child.setAttributes({
|
|
43416
|
+
fill: cellTheme?.group?.fill ?? undefined,
|
|
43417
|
+
stroke: cellTheme?.group?.stroke ?? undefined
|
|
43418
|
+
});
|
|
43419
|
+
});
|
|
43402
43420
|
}
|
|
43403
43421
|
}
|
|
43404
43422
|
function dealRightFrozen(distRightFrozenCol, scene) {
|
|
@@ -44986,18 +45004,19 @@
|
|
|
44986
45004
|
updateContainerAttrWidthAndX() {
|
|
44987
45005
|
const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0);
|
|
44988
45006
|
const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0);
|
|
44989
|
-
const colHeaderX = this.colHeaderGroup.hasChildNodes()
|
|
45007
|
+
const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild
|
|
44990
45008
|
? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0
|
|
44991
45009
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.colHeaderGroup.firstChild.col - 1)
|
|
44992
45010
|
: 0)
|
|
44993
45011
|
: 0;
|
|
44994
|
-
const bodyX = this.bodyGroup.hasChildNodes()
|
|
45012
|
+
const bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild
|
|
44995
45013
|
? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0
|
|
44996
45014
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
|
|
44997
45015
|
: 0)
|
|
44998
45016
|
: 0;
|
|
44999
45017
|
const rightX = updateContainerChildrenX(this.rightFrozenGroup, 0);
|
|
45000
45018
|
this.bottomFrozenGroup.hasChildNodes() &&
|
|
45019
|
+
this.bottomFrozenGroup.firstChild &&
|
|
45001
45020
|
updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
|
|
45002
45021
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bottomFrozenGroup.firstChild.col - 1)
|
|
45003
45022
|
: 0);
|
|
@@ -51046,7 +51065,7 @@
|
|
|
51046
51065
|
return TABLE_EVENT_TYPE;
|
|
51047
51066
|
}
|
|
51048
51067
|
options;
|
|
51049
|
-
version = "0.14.4-alpha.
|
|
51068
|
+
version = "0.14.4-alpha.3";
|
|
51050
51069
|
pagination;
|
|
51051
51070
|
id = `VTable${Date.now()}`;
|
|
51052
51071
|
headerStyleCache;
|
|
@@ -54265,6 +54284,9 @@
|
|
|
54265
54284
|
isEmpty(col, row) {
|
|
54266
54285
|
return false;
|
|
54267
54286
|
}
|
|
54287
|
+
isAxisCell(col, row) {
|
|
54288
|
+
return false;
|
|
54289
|
+
}
|
|
54268
54290
|
getChartAxes(col, row) {
|
|
54269
54291
|
return [];
|
|
54270
54292
|
}
|
|
@@ -56804,7 +56826,25 @@
|
|
|
56804
56826
|
if (!this._table.isPivotChart()) {
|
|
56805
56827
|
return false;
|
|
56806
56828
|
}
|
|
56807
|
-
if (
|
|
56829
|
+
if (this.isLeftBottomCorner(col, row)) {
|
|
56830
|
+
return true;
|
|
56831
|
+
}
|
|
56832
|
+
if (this.isRightBottomCorner(col, row)) {
|
|
56833
|
+
return true;
|
|
56834
|
+
}
|
|
56835
|
+
if (this.isRightTopCorner(col, row)) {
|
|
56836
|
+
return true;
|
|
56837
|
+
}
|
|
56838
|
+
return false;
|
|
56839
|
+
}
|
|
56840
|
+
isAxisCell(col, row) {
|
|
56841
|
+
if (!this._table.isPivotChart()) {
|
|
56842
|
+
return false;
|
|
56843
|
+
}
|
|
56844
|
+
if (this.isBottomFrozenRow(col, row) || this.isRightFrozenColumn(col, row)) {
|
|
56845
|
+
return true;
|
|
56846
|
+
}
|
|
56847
|
+
if (this.isRowHeader(col, row) && col === this.rowHeaderLevelCount - 1) {
|
|
56808
56848
|
return true;
|
|
56809
56849
|
}
|
|
56810
56850
|
if (this.hasTwoIndicatorAxes && this.indicatorsAsCol && row === this.columnHeaderLevelCount - 1) {
|
|
@@ -57026,7 +57066,7 @@
|
|
|
57026
57066
|
for (const key in this.dataset.collectValuesBy) {
|
|
57027
57067
|
if (this.dataset.collectValuesBy[key].type === 'yField' && !this.dataset.collectValuesBy[key].range) {
|
|
57028
57068
|
collectedValues =
|
|
57029
|
-
this.dataset.collectedValues[key][path
|
|
57069
|
+
this.dataset.collectedValues[key]?.[path
|
|
57030
57070
|
.map(pathObj => {
|
|
57031
57071
|
return pathObj.value;
|
|
57032
57072
|
})
|
|
@@ -57051,7 +57091,7 @@
|
|
|
57051
57091
|
for (const key in this.dataset.collectValuesBy) {
|
|
57052
57092
|
if (this.dataset.collectValuesBy[key].type === 'xField' && !this.dataset.collectValuesBy[key].range) {
|
|
57053
57093
|
collectedValues =
|
|
57054
|
-
this.dataset.collectedValues[key][path
|
|
57094
|
+
this.dataset.collectedValues[key]?.[path
|
|
57055
57095
|
.map(pathObj => {
|
|
57056
57096
|
return pathObj.value;
|
|
57057
57097
|
})
|
|
@@ -60449,7 +60489,7 @@
|
|
|
60449
60489
|
return new Tag$1(params ? params.attribute : {});
|
|
60450
60490
|
}
|
|
60451
60491
|
|
|
60452
|
-
const version = "0.14.4-alpha.
|
|
60492
|
+
const version = "0.14.4-alpha.3";
|
|
60453
60493
|
function getIcons() {
|
|
60454
60494
|
return get$1();
|
|
60455
60495
|
}
|