@visactor/vtable-calendar 1.15.2 → 1.16.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/dist/vtable-calendar.js +113 -35
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -27789,8 +27789,10 @@
|
|
|
27789
27789
|
this.adjustOrder(index + 1, index, lastIndex - index), this.delLast();
|
|
27790
27790
|
}
|
|
27791
27791
|
addAndReorder(index, newValue) {
|
|
27792
|
-
|
|
27793
|
-
|
|
27792
|
+
if (isValid$3(newValue)) {
|
|
27793
|
+
const lastIndex = this.getLastIndex();
|
|
27794
|
+
this.adjustOrder(index, index + 1, lastIndex - index), this.put(index, newValue);
|
|
27795
|
+
}
|
|
27794
27796
|
}
|
|
27795
27797
|
}
|
|
27796
27798
|
|
|
@@ -29286,7 +29288,7 @@
|
|
|
29286
29288
|
}
|
|
29287
29289
|
constructor(dataSourceObj, dataConfig, pagination, columns, rowHierarchyType, hierarchyExpandLevel) {
|
|
29288
29290
|
var _a;
|
|
29289
|
-
super(), this.currentIndexedData = [], this.hierarchyExpandLevel = 0, this.hasHierarchyStateExpand = !1, this.beforeChangedRecordsMap = new Map(), this.registedAggregators = {}, this.fieldAggregators = [], this.registerAggregators(), this.dataSourceObj = dataSourceObj, this.dataConfig = dataConfig, this._get = null == dataSourceObj ? void 0 : dataSourceObj.get, this.columns = columns, this._source = (null == dataSourceObj ? void 0 : dataSourceObj.records) ? this.processRecords(null == dataSourceObj ? void 0 : dataSourceObj.records) : dataSourceObj, this._sourceLength = (null === (_a = this._source) || void 0 === _a ? void 0 : _a.length) || 0, this.sortedIndexMap = new Map(), this._currentPagerIndexedData = [], this.userPagination = pagination, this.pagination = pagination || {
|
|
29291
|
+
super(), this.currentIndexedData = [], this.hierarchyExpandLevel = 0, this.hasHierarchyStateExpand = !1, this.beforeChangedRecordsMap = new Map(), this.registedAggregators = {}, this.rowHierarchyType = "grid", this.fieldAggregators = [], this.registerAggregators(), this.dataSourceObj = dataSourceObj, this.dataConfig = dataConfig, this._get = null == dataSourceObj ? void 0 : dataSourceObj.get, this.columns = columns, this._source = (null == dataSourceObj ? void 0 : dataSourceObj.records) ? this.processRecords(null == dataSourceObj ? void 0 : dataSourceObj.records) : dataSourceObj, this._sourceLength = (null === (_a = this._source) || void 0 === _a ? void 0 : _a.length) || 0, this.sortedIndexMap = new Map(), this._currentPagerIndexedData = [], this.userPagination = pagination, this.pagination = pagination || {
|
|
29290
29292
|
totalCount: this._sourceLength,
|
|
29291
29293
|
perPageCount: this._sourceLength,
|
|
29292
29294
|
currentPage: 0
|
|
@@ -33095,7 +33097,7 @@
|
|
|
33095
33097
|
const layoutMap = table.internalProps.layoutMap;
|
|
33096
33098
|
if (layoutMap.isHeader(col, row)) {
|
|
33097
33099
|
const hd = layoutMap.getHeader(col, row);
|
|
33098
|
-
isValid$3(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_a = hd.hierarchyLevel) && void 0 !== _a ? _a : 0) * (null !== (_b = layoutMap.rowHierarchyIndent) && void 0 !== _b ? _b : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
|
|
33100
|
+
isValid$3(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_a = hd.hierarchyLevel) && void 0 !== _a ? _a : 0) * ("tree" === layoutMap.rowHierarchyType && null !== (_b = layoutMap.rowHierarchyIndent) && void 0 !== _b ? _b : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
|
|
33099
33101
|
} else if (table.options.groupBy || (null === (_c = table.getBodyColumnDefine(col, row)) || void 0 === _c ? void 0 : _c.tree)) {
|
|
33100
33102
|
const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row)),
|
|
33101
33103
|
groupLength = null !== (_d = table.dataSource.getGroupLength()) && void 0 !== _d ? _d : 0;
|
|
@@ -37313,7 +37315,7 @@
|
|
|
37313
37315
|
if (layoutMap.isHeader(col, row)) {
|
|
37314
37316
|
const hd = layoutMap.getHeader(col, row);
|
|
37315
37317
|
if ("only-body" === (null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.columnWidthComputeMode)) continue;
|
|
37316
|
-
isValid$3(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_c = hd.hierarchyLevel) && void 0 !== _c ? _c : 0) * (null !== (_d = layoutMap.rowHierarchyIndent) && void 0 !== _d ? _d : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
|
|
37318
|
+
isValid$3(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_c = hd.hierarchyLevel) && void 0 !== _c ? _c : 0) * ("tree" === layoutMap.rowHierarchyType && null !== (_d = layoutMap.rowHierarchyIndent) && void 0 !== _d ? _d : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
|
|
37317
37319
|
} else if (table.isListTable()) {
|
|
37318
37320
|
deltaRow = prepareDeltaRow;
|
|
37319
37321
|
const define = table.getBodyColumnDefine(col, row);
|
|
@@ -37888,7 +37890,8 @@
|
|
|
37888
37890
|
if ("cell" !== cellGroup.role || !cellGroup.row) continue;
|
|
37889
37891
|
let y;
|
|
37890
37892
|
if (cellGroup._prev) y = (null === (_a = cellGroup._prev) || void 0 === _a ? void 0 : _a.attribute.y) + table.getRowHeight(cellGroup._prev.row);else if (part) {
|
|
37891
|
-
|
|
37893
|
+
const baseRowIndex = rowEnd === table.rowCount - table.bottomFrozenRowCount - 1 ? rowEnd : rowEnd + 1;
|
|
37894
|
+
if (y = table.scenegraph.highPerformanceGetCell(col, baseRowIndex, !0).attribute.y, isValid$3(y)) for (let r = row; r < baseRowIndex; r++) y -= table.getRowHeight(r);
|
|
37892
37895
|
} else y = getEstimatePosition(cellGroup.row, table);
|
|
37893
37896
|
isValid$3(y) && cellGroup.setAttribute("y", y);
|
|
37894
37897
|
} else for (let col = colStart; col <= colEnd; col++) for (let row = rowEnd; row >= rowStart; row--) {
|
|
@@ -37896,8 +37899,11 @@
|
|
|
37896
37899
|
if ("cell" !== cellGroup.role || !cellGroup.row) continue;
|
|
37897
37900
|
let y;
|
|
37898
37901
|
if (cellGroup._next) y = (null === (_b = cellGroup._next) || void 0 === _b ? void 0 : _b.attribute.y) - table.getRowHeight(cellGroup.row);else if (part) {
|
|
37899
|
-
|
|
37900
|
-
|
|
37902
|
+
const baseRowIndex = rowStart <= table.frozenRowCount ? table.frozenRowCount : rowStart - 1;
|
|
37903
|
+
if (rowStart <= table.frozenRowCount) y = 0;else {
|
|
37904
|
+
y = table.scenegraph.highPerformanceGetCell(col, baseRowIndex, !0).attribute.y;
|
|
37905
|
+
}
|
|
37906
|
+
for (let r = baseRowIndex; r < row; r++) {
|
|
37901
37907
|
y += table.getRowHeight(r);
|
|
37902
37908
|
}
|
|
37903
37909
|
} else y = getEstimatePosition(cellGroup.row, table);
|
|
@@ -38401,6 +38407,9 @@
|
|
|
38401
38407
|
get bodyLeftCol() {
|
|
38402
38408
|
return this.table.frozenColCount;
|
|
38403
38409
|
}
|
|
38410
|
+
get bodyTopRow() {
|
|
38411
|
+
return this.table.frozenRowCount;
|
|
38412
|
+
}
|
|
38404
38413
|
setParamsForColumn() {
|
|
38405
38414
|
this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
|
|
38406
38415
|
const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
|
|
@@ -38414,7 +38423,7 @@
|
|
|
38414
38423
|
this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth), this.firstScreenColLimit = Math.max(15, this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth))), this.colUpdatePos = this.bodyRightCol;
|
|
38415
38424
|
}
|
|
38416
38425
|
setParamsForRow() {
|
|
38417
|
-
this.
|
|
38426
|
+
this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
|
|
38418
38427
|
const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
|
|
38419
38428
|
this.totalActualBodyRowCount = totalActualBodyRowCount, this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow, this.rowEnd = this.totalRow;
|
|
38420
38429
|
const defaultRowHeight = this.table.defaultRowHeight;
|
|
@@ -38426,7 +38435,7 @@
|
|
|
38426
38435
|
this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight), this.firstScreenRowLimit = Math.max(30, this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight))), this.rowUpdatePos = this.bodyBottomRow;
|
|
38427
38436
|
}
|
|
38428
38437
|
refreshRowCount() {
|
|
38429
|
-
this.
|
|
38438
|
+
this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
|
|
38430
38439
|
const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
|
|
38431
38440
|
this.totalActualBodyRowCount = totalActualBodyRowCount, this.totalRow = this.rowStart + totalActualBodyRowCount - 1;
|
|
38432
38441
|
}
|
|
@@ -39068,6 +39077,7 @@
|
|
|
39068
39077
|
}
|
|
39069
39078
|
|
|
39070
39079
|
function updateRow(removeCells, addCells, updateCells, table, skipUpdateProxy) {
|
|
39080
|
+
var _a, _b;
|
|
39071
39081
|
const scene = table.scenegraph,
|
|
39072
39082
|
removeRows = deduplication$1(removeCells.map(cell => cell.row)).sort((a, b) => b - a),
|
|
39073
39083
|
addRows = deduplication$1(addCells.map(cell => cell.row)).sort((a, b) => a - b),
|
|
@@ -39117,7 +39127,7 @@
|
|
|
39117
39127
|
rowUpdatePos = isValid$3(rowUpdatePos) ? isValid$3(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
|
|
39118
39128
|
}
|
|
39119
39129
|
if (isNumber$4(updateAfter)) {
|
|
39120
|
-
for (let col = 0; col < table.colCount; col++) for (let row = updateAfter; row < table.rowCount; row++) {
|
|
39130
|
+
for (let col = 0; col < Math.max(table.colCount, null !== (_a = table.internalProps._oldColCount) && void 0 !== _a ? _a : table.colCount); col++) for (let row = updateAfter; row < Math.max(table.rowCount, null !== (_b = table.internalProps._oldRowCount) && void 0 !== _b ? _b : table.rowCount); row++) {
|
|
39121
39131
|
const cellGroup = scene.highPerformanceGetCell(col, row, !0);
|
|
39122
39132
|
cellGroup && (cellGroup.needUpdate = !0);
|
|
39123
39133
|
}
|
|
@@ -39128,7 +39138,7 @@
|
|
|
39128
39138
|
const minRow = Math.min(...addRows);
|
|
39129
39139
|
scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
|
|
39130
39140
|
}
|
|
39131
|
-
scene.proxy.rowUpdateDirection = "
|
|
39141
|
+
scene.proxy.rowUpdateDirection = "down", scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount), updateBottomFrozeCellGroups();
|
|
39132
39142
|
} else removeRows.length && (setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene), scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount), updateBottomFrozeCellGroups());
|
|
39133
39143
|
scene.proxy.progress();
|
|
39134
39144
|
const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);
|
|
@@ -39587,6 +39597,62 @@
|
|
|
39587
39597
|
function insertBefore(container, newNode, targetGroup) {
|
|
39588
39598
|
newNode && container && (targetGroup ? container.insertBefore(newNode, targetGroup) : container.appendChild(newNode));
|
|
39589
39599
|
}
|
|
39600
|
+
function resetRowFrozen(scene) {
|
|
39601
|
+
var _a, _b, _c, _d, _e;
|
|
39602
|
+
if (scene.frozenRowCount > scene.table.frozenRowCount) {
|
|
39603
|
+
scene.bodyGroup.setAttribute("width", scene.colHeaderGroup.attribute.width), scene.bodyGroup.setAttribute("x", scene.colHeaderGroup.attribute.x), scene.rowHeaderGroup.setAttribute("width", scene.cornerHeaderGroup.attribute.width);
|
|
39604
|
+
for (let i = 0; i < scene.frozenRowCount - scene.table.frozenRowCount; i++) moveRowFromColHeaderToBody(scene), moveRowFromCornerHeaderToRowHeader(scene), moveRowFromTopRightCornerToRight(scene);
|
|
39605
|
+
} else if (scene.frozenRowCount < scene.table.frozenRowCount) {
|
|
39606
|
+
scene.colHeaderGroup.setAttribute("width", scene.bodyGroup.attribute.width), scene.colHeaderGroup.setAttribute("x", scene.bodyGroup.attribute.x), scene.cornerHeaderGroup.setAttribute("width", scene.rowHeaderGroup.attribute.width);
|
|
39607
|
+
for (let i = 0; i < scene.table.frozenRowCount - scene.frozenRowCount; i++) moveRowFromBodyToColHeader(scene), moveRowFromRowHeaderToCornerHeader(scene), moveRowFromRightToTopRightCorner(scene);
|
|
39608
|
+
}
|
|
39609
|
+
updateReactComponentContainer(scene), scene.recreateAllSelectRangeComponents(), scene.frozenRowCount = scene.table.frozenRowCount, scene.frozenColCount = null !== (_b = null === (_a = scene.rowHeaderGroup) || void 0 === _a ? void 0 : _a.childrenCount) && void 0 !== _b ? _b : 0, scene.proxy.rowStart = null !== (_e = null === (_d = null === (_c = scene.bodyGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild) || void 0 === _d ? void 0 : _d.row) && void 0 !== _e ? _e : scene.table.frozenRowCount, scene.bodyGroup.setAttribute("y", scene.colHeaderGroup.attribute.height), scene.rowHeaderGroup.setAttribute("y", scene.cornerHeaderGroup.attribute.height), scene.updateContainer(), scene.updateBorderSizeAndPosition(), scene.hasFrozen = !0;
|
|
39610
|
+
}
|
|
39611
|
+
function moveRowFromBodyToColHeader(scene) {
|
|
39612
|
+
var _a;
|
|
39613
|
+
let hasSetedHeight = !1;
|
|
39614
|
+
for (let i = 0; i < scene.bodyGroup.childrenCount; i++) {
|
|
39615
|
+
const rowCell = scene.bodyGroup.children[i].firstChild;
|
|
39616
|
+
null === (_a = scene.colHeaderGroup.children[i]) || void 0 === _a || _a.appendChild(rowCell), hasSetedHeight || (scene.colHeaderGroup.setAttribute("height", scene.colHeaderGroup.attribute.height + rowCell.attribute.height), scene.bodyGroup.setAttribute("height", scene.bodyGroup.attribute.height - rowCell.attribute.height), hasSetedHeight = !0);
|
|
39617
|
+
}
|
|
39618
|
+
}
|
|
39619
|
+
function moveRowFromRowHeaderToCornerHeader(scene) {
|
|
39620
|
+
var _a;
|
|
39621
|
+
let hasSetedHeight = !1;
|
|
39622
|
+
for (let i = 0; i < scene.rowHeaderGroup.childrenCount; i++) {
|
|
39623
|
+
const rowCell = scene.rowHeaderGroup.children[i].firstChild;
|
|
39624
|
+
null === (_a = scene.cornerHeaderGroup.children[i]) || void 0 === _a || _a.appendChild(rowCell), hasSetedHeight || (scene.cornerHeaderGroup.setAttribute("height", scene.cornerHeaderGroup.attribute.height + rowCell.attribute.height), scene.rowHeaderGroup.setAttribute("height", scene.rowHeaderGroup.attribute.height - rowCell.attribute.height), hasSetedHeight = !0);
|
|
39625
|
+
}
|
|
39626
|
+
}
|
|
39627
|
+
function moveRowFromRightToTopRightCorner(scene) {
|
|
39628
|
+
var _a;
|
|
39629
|
+
let hasSetedHeight = !1;
|
|
39630
|
+
for (let i = 0; i < scene.rightFrozenGroup.childrenCount; i++) {
|
|
39631
|
+
const rowCell = scene.rightFrozenGroup.children[i].firstChild;
|
|
39632
|
+
null === (_a = scene.rightTopCornerGroup.children[i]) || void 0 === _a || _a.appendChild(rowCell), hasSetedHeight || (scene.rightTopCornerGroup.setAttribute("height", scene.rightTopCornerGroup.attribute.height + rowCell.attribute.height), scene.rightFrozenGroup.setAttribute("height", scene.rightFrozenGroup.attribute.height - rowCell.attribute.height), hasSetedHeight = !0);
|
|
39633
|
+
}
|
|
39634
|
+
}
|
|
39635
|
+
function moveRowFromColHeaderToBody(scene) {
|
|
39636
|
+
let hasSetedHeight = !1;
|
|
39637
|
+
for (let i = 0; i < scene.colHeaderGroup.childrenCount; i++) {
|
|
39638
|
+
const rowCell = scene.colHeaderGroup.children[i].lastChild;
|
|
39639
|
+
insertBefore(scene.bodyGroup.children[i], rowCell, scene.bodyGroup.children[i].firstChild), hasSetedHeight || (scene.colHeaderGroup.setAttribute("height", scene.colHeaderGroup.attribute.height - rowCell.attribute.height), scene.bodyGroup.setAttribute("height", scene.bodyGroup.attribute.height + rowCell.attribute.height), hasSetedHeight = !0);
|
|
39640
|
+
}
|
|
39641
|
+
}
|
|
39642
|
+
function moveRowFromCornerHeaderToRowHeader(scene) {
|
|
39643
|
+
let hasSetedHeight = !1;
|
|
39644
|
+
for (let i = 0; i < scene.cornerHeaderGroup.childrenCount; i++) {
|
|
39645
|
+
const rowCell = scene.cornerHeaderGroup.children[i].lastChild;
|
|
39646
|
+
insertBefore(scene.rowHeaderGroup.children[i], rowCell, scene.rowHeaderGroup.children[i].firstChild), hasSetedHeight || (scene.cornerHeaderGroup.setAttribute("height", scene.cornerHeaderGroup.attribute.height - rowCell.attribute.height), scene.rowHeaderGroup.setAttribute("height", scene.rowHeaderGroup.attribute.height + rowCell.attribute.height), hasSetedHeight = !0);
|
|
39647
|
+
}
|
|
39648
|
+
}
|
|
39649
|
+
function moveRowFromTopRightCornerToRight(scene) {
|
|
39650
|
+
let hasSetedHeight = !1;
|
|
39651
|
+
for (let i = 0; i < scene.rightTopCornerGroup.childrenCount; i++) {
|
|
39652
|
+
const rowCell = scene.rightTopCornerGroup.children[i].lastChild;
|
|
39653
|
+
insertBefore(scene.rightFrozenGroup.children[i], rowCell, scene.rightFrozenGroup.children[i].firstChild), hasSetedHeight || (scene.rightTopCornerGroup.setAttribute("height", scene.rightTopCornerGroup.attribute.height - rowCell.attribute.height), scene.rightFrozenGroup.setAttribute("height", scene.rightFrozenGroup.attribute.height + rowCell.attribute.height), hasSetedHeight = !0);
|
|
39654
|
+
}
|
|
39655
|
+
}
|
|
39590
39656
|
|
|
39591
39657
|
function updateChartSizeForResizeColWidth(scenegraph, col) {
|
|
39592
39658
|
const {
|
|
@@ -39999,6 +40065,7 @@
|
|
|
39999
40065
|
}
|
|
40000
40066
|
|
|
40001
40067
|
function updateCol(removeCells, addCells, updateCells, table) {
|
|
40068
|
+
var _a, _b;
|
|
40002
40069
|
const scene = table.scenegraph,
|
|
40003
40070
|
removeCols = deduplication(removeCells.map(cell => cell.col)).sort((a, b) => b - a),
|
|
40004
40071
|
addCols = deduplication(addCells.map(cell => cell.col)).sort((a, b) => a - b),
|
|
@@ -40019,7 +40086,7 @@
|
|
|
40019
40086
|
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) updateCell$1(col, row, scene.table, !1);else updateCell$1(col, row, scene.table, !1);
|
|
40020
40087
|
}
|
|
40021
40088
|
}), isNumber$4(updateAfter)) {
|
|
40022
|
-
for (let col = updateAfter; col < table.colCount; col++) for (let row = 0; row < table.rowCount; row++) {
|
|
40089
|
+
for (let col = updateAfter; col < Math.max(table.colCount, null !== (_a = table.internalProps._oldColCount) && void 0 !== _a ? _a : table.colCount); col++) for (let row = 0; row < Math.max(table.rowCount, null !== (_b = table.internalProps._oldRowCount) && void 0 !== _b ? _b : table.rowCount); row++) {
|
|
40023
40090
|
const cellGroup = scene.highPerformanceGetCell(col, row, !0);
|
|
40024
40091
|
cellGroup && (cellGroup.needUpdate = !0);
|
|
40025
40092
|
}
|
|
@@ -40051,6 +40118,8 @@
|
|
|
40051
40118
|
colGroup && colGroup.parent === scene.bodyGroup && scene.bodyGroup.removeChild(colGroup);
|
|
40052
40119
|
const bottomColGroup = scene.getColGroupInBottom(col);
|
|
40053
40120
|
bottomColGroup && bottomColGroup.parent === scene.bottomFrozenGroup && scene.bottomFrozenGroup.removeChild(bottomColGroup);
|
|
40121
|
+
const headerColGroup = scene.getColGroup(col, !0);
|
|
40122
|
+
headerColGroup && headerColGroup.parent === scene.colHeaderGroup && scene.colHeaderGroup.removeChild(headerColGroup);
|
|
40054
40123
|
}
|
|
40055
40124
|
col >= proxy.colStart && col <= proxy.colEnd && (proxy.colEnd--, proxy.currentCol--), proxy.bodyRightCol--;
|
|
40056
40125
|
const totalActualBodyColCount = Math.min(proxy.colLimit, proxy.bodyRightCol - proxy.bodyLeftCol + 1);
|
|
@@ -40762,6 +40831,9 @@
|
|
|
40762
40831
|
resetFrozen() {
|
|
40763
40832
|
resetFrozen(this);
|
|
40764
40833
|
}
|
|
40834
|
+
resetRowFrozen() {
|
|
40835
|
+
resetRowFrozen(this);
|
|
40836
|
+
}
|
|
40765
40837
|
updateCellLayoutWidthCertainWidth(columnGroup, detaRow, col) {
|
|
40766
40838
|
const width = columnGroup.attribute.width;
|
|
40767
40839
|
let isUpdate = !1;
|
|
@@ -40862,6 +40934,9 @@
|
|
|
40862
40934
|
updateFrozen() {
|
|
40863
40935
|
this.clear || (this.resetFrozen(), this.component.updateScrollBar());
|
|
40864
40936
|
}
|
|
40937
|
+
updateRowFrozen() {
|
|
40938
|
+
this.clear || (this.resetRowFrozen(), this.component.updateScrollBar());
|
|
40939
|
+
}
|
|
40865
40940
|
dealWidthRightFrozen(rightFrozenColCount) {
|
|
40866
40941
|
this.clear ? this.table.internalProps.rightFrozenColCount = rightFrozenColCount : dealRightFrozen(rightFrozenColCount, this);
|
|
40867
40942
|
}
|
|
@@ -40923,6 +40998,15 @@
|
|
|
40923
40998
|
let updateCells = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
40924
40999
|
updateCol(removeCells, addCells, updateCells, this.table), this.recalculateColWidths(), this.recalculateRowHeights(), this.table.stateManager.checkFrozen(), this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount && this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.component.updateScrollBar(), this.updateNextFrame();
|
|
40925
41000
|
}
|
|
41001
|
+
updateCornerHeaderCells() {
|
|
41002
|
+
for (let col = 0; col < this.table.frozenColCount; col++) for (let row = 0; row < this.table.frozenRowCount; row++) updateCell$1(col, row, this.table, !1);
|
|
41003
|
+
}
|
|
41004
|
+
updateRowHeaderCells() {
|
|
41005
|
+
for (let col = 0; col < this.table.frozenColCount; col++) for (let row = this.table.frozenRowCount; row < this.table.rowCount; row++) updateCell$1(col, row, this.table, !1);
|
|
41006
|
+
}
|
|
41007
|
+
updateColumnHeaderCells() {
|
|
41008
|
+
for (let row = 0; row < this.table.frozenRowCount; row++) for (let col = this.table.frozenColCount; col < this.table.colCount; col++) updateCell$1(col, row, this.table, !1);
|
|
41009
|
+
}
|
|
40926
41010
|
getColumnGroupX(col) {
|
|
40927
41011
|
return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.bottomFrozenRowCount, col - 1) : 0;
|
|
40928
41012
|
}
|
|
@@ -42118,7 +42202,8 @@
|
|
|
42118
42202
|
row: -1,
|
|
42119
42203
|
order: "normal"
|
|
42120
42204
|
}], this.frozen = {
|
|
42121
|
-
col: -1
|
|
42205
|
+
col: -1,
|
|
42206
|
+
row: -1
|
|
42122
42207
|
}, this.tablePosition = {
|
|
42123
42208
|
absoluteX: 0,
|
|
42124
42209
|
absoluteY: 0
|
|
@@ -42182,7 +42267,8 @@
|
|
|
42182
42267
|
row: -1,
|
|
42183
42268
|
order: "normal"
|
|
42184
42269
|
}], this.frozen = {
|
|
42185
|
-
col: -1
|
|
42270
|
+
col: -1,
|
|
42271
|
+
row: -1
|
|
42186
42272
|
}, this.scroll = {
|
|
42187
42273
|
horizontalBarPos: 0,
|
|
42188
42274
|
verticalBarPos: 0
|
|
@@ -42419,6 +42505,9 @@
|
|
|
42419
42505
|
setFrozenCol(col) {
|
|
42420
42506
|
col !== this.frozen.col ? (this.frozen.col = col, this.table.scenegraph.updateFrozen(), this.table.scenegraph.updateFrozenIcon(0, this.table.colCount - 1)) : this.table.scenegraph.updateFrozenIcon(0, this.table.colCount - 1);
|
|
42421
42507
|
}
|
|
42508
|
+
setFrozenRow(row) {
|
|
42509
|
+
row !== this.frozen.row && (this.frozen.row = row, this.table.scenegraph.updateRowFrozen());
|
|
42510
|
+
}
|
|
42422
42511
|
checkVerticalScrollBarEnd() {
|
|
42423
42512
|
var _a, _b;
|
|
42424
42513
|
const totalHeight = this.table.getAllRowsHeight(),
|
|
@@ -45646,13 +45735,13 @@
|
|
|
45646
45735
|
size: 0,
|
|
45647
45736
|
startInTotal: 0,
|
|
45648
45737
|
hierarchyState: void 0
|
|
45649
|
-
}, this.totalLevel = 0, this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.cache = new Map(), this.sizeIncludeParent = null != rowExpandLevel, this.
|
|
45738
|
+
}, this.totalLevel = 0, this.expandedMaxLevel = 0, this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.cache = new Map(), this.sizeIncludeParent = null != rowExpandLevel, this.setExpandLevel = rowExpandLevel, this.hierarchyType = hierarchyType, this.sharedVar = sharedVar, this.reset(tree);
|
|
45650
45739
|
}
|
|
45651
45740
|
reset(tree) {
|
|
45652
|
-
this.hasHideNode = !1, this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
45741
|
+
this.totalLevel = 0, this.expandedMaxLevel = 0, this.hasHideNode = !1, this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
45653
45742
|
}
|
|
45654
45743
|
setTreeNode(node, startIndex, parent) {
|
|
45655
|
-
var _a, _b;
|
|
45744
|
+
var _a, _b, _c, _d;
|
|
45656
45745
|
node.startIndex = startIndex, node.startInTotal = (null !== (_a = parent.startInTotal) && void 0 !== _a ? _a : 0) + node.startIndex, node.hide && (this.hasHideNode = !0), (null !== (_b = node.dimensionKey) && void 0 !== _b ? _b : node.indicatorKey) && (node.virtual || this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeys.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), this.dimensionKeysIncludeVirtual.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeysIncludeVirtual.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), node.id || (node.id = ++this.sharedVar.seqId));
|
|
45657
45746
|
let size = node.dimensionKey && this.sizeIncludeParent ? 1 : 0;
|
|
45658
45747
|
const children = node.children || node.columns;
|
|
@@ -45661,14 +45750,14 @@
|
|
|
45661
45750
|
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
45662
45751
|
}) : size = 1 : node.hierarchyState === HierarchyState.expand && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
45663
45752
|
var _a;
|
|
45664
|
-
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
45753
|
+
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.expandedMaxLevel = Math.max(this.expandedMaxLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
45665
45754
|
}) : node.hierarchyState === HierarchyState.collapse && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
45666
45755
|
var _a;
|
|
45667
45756
|
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.setTreeNode(n, size, node);
|
|
45668
|
-
}) : !node.hierarchyState && node.level + 1 < this.
|
|
45757
|
+
}) : !node.hierarchyState && node.level + 1 < this.setExpandLevel && ((null == children ? void 0 : children.length) >= 1 || !0 === children) ? ((null === (_c = children[0]) || void 0 === _c ? void 0 : _c.indicatorKey) && "grid-tree" === this.hierarchyType || (node.hierarchyState = HierarchyState.expand), (null == children ? void 0 : children.length) >= 1 && children.forEach(n => {
|
|
45669
45758
|
var _a;
|
|
45670
|
-
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
45671
|
-
})) : (null == children ? void 0 : children.length) >= 1 || !0 === children ? (node.hierarchyState = HierarchyState.collapse, (null == children ? void 0 : children.length) >= 1 && children.forEach(n => {
|
|
45759
|
+
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.expandedMaxLevel = Math.max(this.expandedMaxLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
45760
|
+
})) : (null == children ? void 0 : children.length) >= 1 || !0 === children ? ((null === (_d = children[0]) || void 0 === _d ? void 0 : _d.indicatorKey) && "grid-tree" === this.hierarchyType || (node.hierarchyState = HierarchyState.collapse), (null == children ? void 0 : children.length) >= 1 && children.forEach(n => {
|
|
45672
45761
|
var _a;
|
|
45673
45762
|
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.setTreeNode(n, size, node);
|
|
45674
45763
|
})) : (node.hierarchyState = HierarchyState.none, size = 1), node.size = size, size;
|
|
@@ -45678,17 +45767,6 @@
|
|
|
45678
45767
|
const path = [];
|
|
45679
45768
|
return this.searchPath(index, this.tree, path, maxDeep), path.shift(), path;
|
|
45680
45769
|
}
|
|
45681
|
-
getTreePathByCellIds(ids) {
|
|
45682
|
-
const path = [];
|
|
45683
|
-
let nodes = this.tree.children;
|
|
45684
|
-
for (let i = 0; i < ids.length; i++) {
|
|
45685
|
-
const id = ids[i],
|
|
45686
|
-
pathNode = this.findNodeById(nodes, id);
|
|
45687
|
-
if (!pathNode) break;
|
|
45688
|
-
path.push(pathNode), nodes = pathNode.children;
|
|
45689
|
-
}
|
|
45690
|
-
return path;
|
|
45691
|
-
}
|
|
45692
45770
|
findNodeById(nodes, id) {
|
|
45693
45771
|
return nodes.find(node => node.id === id);
|
|
45694
45772
|
}
|
|
@@ -46846,7 +46924,7 @@
|
|
|
46846
46924
|
constructor(container) {
|
|
46847
46925
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46848
46926
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
46849
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.
|
|
46927
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.16.0-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46850
46928
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
46851
46929
|
const {
|
|
46852
46930
|
frozenColCount = 0,
|
|
@@ -47031,7 +47109,7 @@
|
|
|
47031
47109
|
return null !== (_e = null !== (_c = null === (_b = null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.layoutMap) || void 0 === _b ? void 0 : _b.frozenRowCount) && void 0 !== _c ? _c : null === (_d = this.internalProps) || void 0 === _d ? void 0 : _d.frozenRowCount) && void 0 !== _e ? _e : 0;
|
|
47032
47110
|
}
|
|
47033
47111
|
set frozenRowCount(frozenRowCount) {
|
|
47034
|
-
this.internalProps.frozenRowCount = frozenRowCount;
|
|
47112
|
+
this.internalProps.frozenRowCount = frozenRowCount, this.stateManager.setFrozenRow(this.internalProps.frozenRowCount);
|
|
47035
47113
|
}
|
|
47036
47114
|
get rightFrozenColCount() {
|
|
47037
47115
|
var _a, _b, _c, _d, _e;
|