@visactor/vtable-calendar 1.17.6-alpha.3 → 1.17.6
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 +196 -69
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
package/dist/vtable-calendar.js
CHANGED
|
@@ -37398,7 +37398,7 @@
|
|
|
37398
37398
|
if (stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
|
|
37399
37399
|
const deltaWidth = 0,
|
|
37400
37400
|
deltaHeight = 0;
|
|
37401
|
-
"border-rect" !== rect.name && "table-border-rect" !== rect.name && ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => 1 & width)) && (x = Math.floor(x) + .5, y = Math.floor(y) + .5), 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
37401
|
+
"border-rect" !== rect.name && "table-border-rect" !== rect.name && ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => 1 & width)) && (x = Math.floor(x) + .5, y = Math.floor(y) + .5), 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, "table-border-rect" !== rect.name ? Math.ceil(width + deltaWidth) : width + deltaWidth, "table-border-rect" !== rect.name ? Math.ceil(height + deltaHeight) : height + deltaHeight) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
37402
37402
|
renderStrokeWithCornerRadius(i, x1, y1, x2, y2, rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
|
|
37403
37403
|
})), context.stroke());
|
|
37404
37404
|
}
|
|
@@ -38098,7 +38098,7 @@
|
|
|
38098
38098
|
rightBottomCornerGroup: rightBottomCornerGroup
|
|
38099
38099
|
} = table.scenegraph;
|
|
38100
38100
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
38101
|
-
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
38101
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
38102
38102
|
x: table.getFrozenColsWidth(),
|
|
38103
38103
|
y: table.getFrozenRowsHeight()
|
|
38104
38104
|
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
@@ -38934,7 +38934,7 @@
|
|
|
38934
38934
|
}
|
|
38935
38935
|
createColGroup(onceCount) {
|
|
38936
38936
|
const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
|
|
38937
|
-
computeColsWidth(this.table, this.currentCol + 1, endCol), this.colEnd = endCol;
|
|
38937
|
+
"adaptive" !== this.table.widthMode && computeColsWidth(this.table, this.currentCol + 1, endCol), this.colEnd = endCol;
|
|
38938
38938
|
for (let row = 0; row < this.table.rowCount; row++) {
|
|
38939
38939
|
const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
|
|
38940
38940
|
"cell" === cellGroup.role && isNumber$4(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol && this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
|
|
@@ -39016,7 +39016,7 @@
|
|
|
39016
39016
|
}
|
|
39017
39017
|
updateColGroups(count) {
|
|
39018
39018
|
const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);
|
|
39019
|
-
computeColsWidth(this.table, this.colUpdatePos, distCol), updateColContent(this.colUpdatePos, distCol, this), this.colUpdatePos = distCol + 1;
|
|
39019
|
+
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, this.colUpdatePos, distCol), updateColContent(this.colUpdatePos, distCol, this), this.colUpdatePos = distCol + 1;
|
|
39020
39020
|
}
|
|
39021
39021
|
updateCellGroupPosition(cellGroup, newRow, y) {
|
|
39022
39022
|
cellGroup.row = newRow, cellGroup.mergeStartCol = void 0, cellGroup.mergeStartRow = void 0, cellGroup.mergeEndCol = void 0, cellGroup.mergeEndRow = void 0, cellGroup.setAttribute("y", y), cellGroup.needUpdate = !0, cellGroup.needUpdateForAutoRowHeight = !0;
|
|
@@ -41832,27 +41832,77 @@
|
|
|
41832
41832
|
},
|
|
41833
41833
|
skipBodyMerge: !0
|
|
41834
41834
|
});
|
|
41835
|
-
} else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row))
|
|
41836
|
-
|
|
41837
|
-
|
|
41838
|
-
|
|
41839
|
-
}
|
|
41840
|
-
|
|
41841
|
-
|
|
41842
|
-
|
|
41843
|
-
|
|
41844
|
-
|
|
41845
|
-
|
|
41846
|
-
|
|
41847
|
-
|
|
41848
|
-
|
|
41849
|
-
|
|
41850
|
-
|
|
41851
|
-
|
|
41852
|
-
|
|
41853
|
-
|
|
41854
|
-
|
|
41855
|
-
|
|
41835
|
+
} else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) {
|
|
41836
|
+
extendSelectRange = !1;
|
|
41837
|
+
const {
|
|
41838
|
+
cornerHeaderSelectMode: cornerHeaderSelectMode
|
|
41839
|
+
} = state.select;
|
|
41840
|
+
if ("body" === cornerHeaderSelectMode) state.select.ranges.push({
|
|
41841
|
+
start: {
|
|
41842
|
+
col: table.leftRowSeriesNumberCount,
|
|
41843
|
+
row: table.columnHeaderLevelCount
|
|
41844
|
+
},
|
|
41845
|
+
end: {
|
|
41846
|
+
col: table.colCount - 1,
|
|
41847
|
+
row: table.rowCount - 1
|
|
41848
|
+
},
|
|
41849
|
+
skipBodyMerge: !0
|
|
41850
|
+
});else if ("inline" === cornerHeaderSelectMode) {
|
|
41851
|
+
const cellRange = skipBodyMerge ? {
|
|
41852
|
+
start: {
|
|
41853
|
+
col: col,
|
|
41854
|
+
row: row
|
|
41855
|
+
},
|
|
41856
|
+
end: {
|
|
41857
|
+
col: col,
|
|
41858
|
+
row: row
|
|
41859
|
+
}
|
|
41860
|
+
} : table.getCellRange(col, row);
|
|
41861
|
+
state.select.ranges.push({
|
|
41862
|
+
start: {
|
|
41863
|
+
col: cellRange.start.col,
|
|
41864
|
+
row: cellRange.start.row
|
|
41865
|
+
},
|
|
41866
|
+
end: {
|
|
41867
|
+
col: cellRange.end.col,
|
|
41868
|
+
row: table.rowCount - 1
|
|
41869
|
+
},
|
|
41870
|
+
skipBodyMerge: !0
|
|
41871
|
+
});
|
|
41872
|
+
} else if ("cell" === cornerHeaderSelectMode) {
|
|
41873
|
+
const cellRange = skipBodyMerge ? {
|
|
41874
|
+
start: {
|
|
41875
|
+
col: col,
|
|
41876
|
+
row: row
|
|
41877
|
+
},
|
|
41878
|
+
end: {
|
|
41879
|
+
col: col,
|
|
41880
|
+
row: row
|
|
41881
|
+
}
|
|
41882
|
+
} : table.getCellRange(col, row);
|
|
41883
|
+
state.select.ranges.push({
|
|
41884
|
+
start: {
|
|
41885
|
+
col: cellRange.start.col,
|
|
41886
|
+
row: cellRange.start.row
|
|
41887
|
+
},
|
|
41888
|
+
end: {
|
|
41889
|
+
col: cellRange.end.col,
|
|
41890
|
+
row: cellRange.end.row
|
|
41891
|
+
},
|
|
41892
|
+
skipBodyMerge: skipBodyMerge || void 0
|
|
41893
|
+
});
|
|
41894
|
+
} else state.select.ranges.push({
|
|
41895
|
+
start: {
|
|
41896
|
+
col: 0,
|
|
41897
|
+
row: 0
|
|
41898
|
+
},
|
|
41899
|
+
end: {
|
|
41900
|
+
col: table.colCount - 1,
|
|
41901
|
+
row: table.rowCount - 1
|
|
41902
|
+
},
|
|
41903
|
+
skipBodyMerge: !0
|
|
41904
|
+
});
|
|
41905
|
+
} else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
|
|
41856
41906
|
start: {
|
|
41857
41907
|
col: table.leftRowSeriesNumberCount,
|
|
41858
41908
|
row: row
|
|
@@ -41872,27 +41922,77 @@
|
|
|
41872
41922
|
row: row
|
|
41873
41923
|
},
|
|
41874
41924
|
skipBodyMerge: !0
|
|
41875
|
-
});else if (table.internalProps.layoutMap.isCornerHeader(col, row))
|
|
41876
|
-
|
|
41877
|
-
|
|
41878
|
-
|
|
41879
|
-
}
|
|
41880
|
-
|
|
41881
|
-
|
|
41882
|
-
|
|
41883
|
-
|
|
41884
|
-
|
|
41885
|
-
|
|
41886
|
-
|
|
41887
|
-
|
|
41888
|
-
|
|
41889
|
-
|
|
41890
|
-
|
|
41891
|
-
|
|
41892
|
-
|
|
41893
|
-
|
|
41894
|
-
|
|
41895
|
-
|
|
41925
|
+
});else if (table.internalProps.layoutMap.isCornerHeader(col, row)) {
|
|
41926
|
+
extendSelectRange = !1;
|
|
41927
|
+
const {
|
|
41928
|
+
cornerHeaderSelectMode: cornerHeaderSelectMode
|
|
41929
|
+
} = state.select;
|
|
41930
|
+
if ("body" === cornerHeaderSelectMode) state.select.ranges.push({
|
|
41931
|
+
start: {
|
|
41932
|
+
col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
|
|
41933
|
+
row: table.columnHeaderLevelCount
|
|
41934
|
+
},
|
|
41935
|
+
end: {
|
|
41936
|
+
col: table.colCount - 1,
|
|
41937
|
+
row: table.rowCount - 1
|
|
41938
|
+
},
|
|
41939
|
+
skipBodyMerge: !0
|
|
41940
|
+
});else if ("cell" === cornerHeaderSelectMode) {
|
|
41941
|
+
const cellRange = skipBodyMerge ? {
|
|
41942
|
+
start: {
|
|
41943
|
+
col: col,
|
|
41944
|
+
row: row
|
|
41945
|
+
},
|
|
41946
|
+
end: {
|
|
41947
|
+
col: col,
|
|
41948
|
+
row: row
|
|
41949
|
+
}
|
|
41950
|
+
} : table.getCellRange(col, row);
|
|
41951
|
+
state.select.ranges.push({
|
|
41952
|
+
start: {
|
|
41953
|
+
col: cellRange.start.col,
|
|
41954
|
+
row: cellRange.start.row
|
|
41955
|
+
},
|
|
41956
|
+
end: {
|
|
41957
|
+
col: cellRange.end.col,
|
|
41958
|
+
row: cellRange.end.row
|
|
41959
|
+
},
|
|
41960
|
+
skipBodyMerge: skipBodyMerge || void 0
|
|
41961
|
+
});
|
|
41962
|
+
} else if ("inline" === cornerHeaderSelectMode) {
|
|
41963
|
+
const cellRange = skipBodyMerge ? {
|
|
41964
|
+
start: {
|
|
41965
|
+
col: col,
|
|
41966
|
+
row: row
|
|
41967
|
+
},
|
|
41968
|
+
end: {
|
|
41969
|
+
col: col,
|
|
41970
|
+
row: row
|
|
41971
|
+
}
|
|
41972
|
+
} : table.getCellRange(col, row);
|
|
41973
|
+
state.select.ranges.push({
|
|
41974
|
+
start: {
|
|
41975
|
+
col: cellRange.start.col,
|
|
41976
|
+
row: cellRange.start.row
|
|
41977
|
+
},
|
|
41978
|
+
end: {
|
|
41979
|
+
col: cellRange.end.col,
|
|
41980
|
+
row: table.rowCount - 1
|
|
41981
|
+
},
|
|
41982
|
+
skipBodyMerge: !0
|
|
41983
|
+
});
|
|
41984
|
+
} else state.select.ranges.push({
|
|
41985
|
+
start: {
|
|
41986
|
+
col: table.leftRowSeriesNumberCount,
|
|
41987
|
+
row: 0
|
|
41988
|
+
},
|
|
41989
|
+
end: {
|
|
41990
|
+
col: table.colCount - 1,
|
|
41991
|
+
row: table.rowCount - 1
|
|
41992
|
+
},
|
|
41993
|
+
skipBodyMerge: !0
|
|
41994
|
+
});
|
|
41995
|
+
} else if (col >= 0 && row >= 0) {
|
|
41896
41996
|
const cellRange = skipBodyMerge ? {
|
|
41897
41997
|
start: {
|
|
41898
41998
|
col: col,
|
|
@@ -42342,7 +42442,7 @@
|
|
|
42342
42442
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
42343
42443
|
if (recordIndex >= 0) {
|
|
42344
42444
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
42345
|
-
state.checkedState.
|
|
42445
|
+
state.checkedState.get(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
|
|
42346
42446
|
[field]: checked
|
|
42347
42447
|
});
|
|
42348
42448
|
}
|
|
@@ -42367,7 +42467,7 @@
|
|
|
42367
42467
|
if (recordIndex >= 0) {
|
|
42368
42468
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
42369
42469
|
if (isValid$3(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
|
|
42370
|
-
if (state.checkedState.
|
|
42470
|
+
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
|
|
42371
42471
|
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
42372
42472
|
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
42373
42473
|
[field]: !0
|
|
@@ -42749,21 +42849,22 @@
|
|
|
42749
42849
|
});
|
|
42750
42850
|
}
|
|
42751
42851
|
setSelectState() {
|
|
42752
|
-
var _a;
|
|
42852
|
+
var _a, _b, _c, _d, _e;
|
|
42753
42853
|
const {
|
|
42754
|
-
|
|
42755
|
-
|
|
42756
|
-
|
|
42757
|
-
|
|
42758
|
-
|
|
42759
|
-
|
|
42760
|
-
|
|
42761
|
-
|
|
42762
|
-
|
|
42763
|
-
|
|
42764
|
-
|
|
42765
|
-
|
|
42766
|
-
|
|
42854
|
+
headerSelectMode: headerSelectMode,
|
|
42855
|
+
disableSelect: disableSelect,
|
|
42856
|
+
disableHeaderSelect: disableHeaderSelect,
|
|
42857
|
+
highlightMode: highlightMode,
|
|
42858
|
+
highlightInRange: highlightInRange
|
|
42859
|
+
} = Object.assign({}, {
|
|
42860
|
+
headerSelectMode: "inline",
|
|
42861
|
+
disableSelect: !1,
|
|
42862
|
+
disableHeaderSelect: !1,
|
|
42863
|
+
highlightMode: "cell",
|
|
42864
|
+
highlightInRange: !1
|
|
42865
|
+
}, this.table.options.select),
|
|
42866
|
+
cornerHeaderSelectMode = (null === (_a = this.table.options.select) || void 0 === _a ? void 0 : _a.cornerHeaderSelectMode) ? null === (_b = this.table.options.select) || void 0 === _b ? void 0 : _b.cornerHeaderSelectMode : "body" === (null === (_c = this.table.options.select) || void 0 === _c ? void 0 : _c.headerSelectMode) ? null === (_d = this.table.options.select) || void 0 === _d ? void 0 : _d.headerSelectMode : "all";
|
|
42867
|
+
this.select.highlightScope = !0 === disableSelect ? HighlightScope.none : "cross" === highlightMode ? HighlightScope.cross : "row" === highlightMode ? HighlightScope.row : "column" === highlightMode ? HighlightScope.column : HighlightScope.single, this.select.singleStyle = !disableSelect, this.select.disableHeader = disableHeaderSelect, this.select.headerSelectMode = headerSelectMode, this.select.cornerHeaderSelectMode = cornerHeaderSelectMode, this.select.highlightInRange = highlightInRange, this.select.disableCtrlMultiSelect = !1 === (null === (_e = this.table.options.keyboardOptions) || void 0 === _e ? void 0 : _e.ctrlMultiSelect);
|
|
42767
42868
|
}
|
|
42768
42869
|
isSelected(col, row) {
|
|
42769
42870
|
let seled = !1;
|
|
@@ -43940,7 +44041,7 @@
|
|
|
43940
44041
|
var _a;
|
|
43941
44042
|
if (!1 === isCompleteEdit) return;
|
|
43942
44043
|
const hitIcon = (null === (_a = e.target.role) || void 0 === _a ? void 0 : _a.startsWith("icon")) ? e.target : void 0;
|
|
43943
|
-
if (eventManager.downIcon = hitIcon, hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
|
|
44044
|
+
if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
|
|
43944
44045
|
table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
|
|
43945
44046
|
const {
|
|
43946
44047
|
eventArgs: eventArgs
|
|
@@ -44538,6 +44639,7 @@
|
|
|
44538
44639
|
right = !1,
|
|
44539
44640
|
left = !1;
|
|
44540
44641
|
y > drawRange.bottom - bottomFrozenRowHeight && canScrollY && table.scrollTop + table.tableNoFrameHeight < table.getAllRowsHeight() ? (bottom = !0, table.eventManager.scrollYSpeed = -(y - drawRange.bottom + bottomFrozenRowHeight) / 50) : y < drawRange.top + topFrozenRowHeight && canScrollY && table.scrollTop > 0 && (top = !0, table.eventManager.scrollYSpeed = -(y - drawRange.top - topFrozenRowHeight) / 50), x > drawRange.right - rightFrozenColsWidth && canScrollX && table.scrollLeft + table.tableNoFrameWidth < table.getAllColsWidth() ? (right = !0, table.eventManager.scrollXSpeed = -(x - drawRange.right + rightFrozenColsWidth) / 50) : x < drawRange.left + leftFrozenColsWidth && canScrollX && table.scrollLeft > 0 && (left = !0, table.eventManager.scrollXSpeed = -(x - drawRange.left - leftFrozenColsWidth) / 50), table.eventManager.inertiaScroll.startInertia(table.eventManager.scrollXSpeed, table.eventManager.scrollYSpeed, 1), table.eventManager.inertiaScroll.setScrollHandle((dx, dy) => {
|
|
44642
|
+
var _a;
|
|
44541
44643
|
let selectX, selectY;
|
|
44542
44644
|
handleWhell({
|
|
44543
44645
|
deltaX: -dx,
|
|
@@ -44548,7 +44650,7 @@
|
|
|
44548
44650
|
right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
44549
44651
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
|
|
44550
44652
|
targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
44551
|
-
isValid$3(targetCol) && isValid$3(targetRow) && table.stateManager.updateSelectPos(targetCol.col, targetRow.row, !1, !1, !1, !1);
|
|
44653
|
+
!(null === (_a = table.options.select) || void 0 === _a ? void 0 : _a.disableDragSelect) && isValid$3(targetCol) && isValid$3(targetRow) && table.stateManager.updateSelectPos(targetCol.col, targetRow.row, !1, !1, !1, !1);
|
|
44552
44654
|
});
|
|
44553
44655
|
} else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
|
|
44554
44656
|
}
|
|
@@ -47703,7 +47805,7 @@
|
|
|
47703
47805
|
constructor(container) {
|
|
47704
47806
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47705
47807
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
47706
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.6
|
|
47808
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.6", 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");
|
|
47707
47809
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47708
47810
|
const {
|
|
47709
47811
|
frozenColCount = 0,
|
|
@@ -51032,9 +51134,10 @@
|
|
|
51032
51134
|
|
|
51033
51135
|
class SimpleHeaderLayoutMap {
|
|
51034
51136
|
constructor(table, columns, showHeader, hierarchyIndent) {
|
|
51035
|
-
|
|
51137
|
+
var _a, _b;
|
|
51138
|
+
this.seqId = 0, this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0, this.bodyRowSpanCount = 1, this._transpose = !1, this._showHeader = !0, this._recordsCount = 0, this._hasAggregation = !1, this._hasAggregationOnTopCount = 0, this._hasAggregationOnBottomCount = 0, this._cellRangeMap = new Map(), this._showHeader = showHeader, this._table = table, this._columns = [], this._columnsIncludeHided = [], this._headerCellIds = [], this.hierarchyIndent = null != hierarchyIndent ? hierarchyIndent : 20, this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment, this.columnHierarchyType = table.options.headerHierarchyType, this.columnExpandLevel = null !== (_a = table.options.headerExpandLevel) && void 0 !== _a ? _a : 1, this.columnTree = new DimensionTree(columns, {
|
|
51036
51139
|
seqId: 0
|
|
51037
|
-
}, null), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
51140
|
+
}, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
51038
51141
|
}
|
|
51039
51142
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
51040
51143
|
var _a;
|
|
@@ -51550,11 +51653,14 @@
|
|
|
51550
51653
|
headerType: null !== (_b = hd.headerType) && void 0 !== _b ? _b : "text",
|
|
51551
51654
|
dropDownMenu: hd.dropDownMenu,
|
|
51552
51655
|
define: hd,
|
|
51656
|
+
hierarchyState: hd.hierarchyState,
|
|
51553
51657
|
columnWidthComputeMode: hd.columnWidthComputeMode
|
|
51554
51658
|
};
|
|
51555
51659
|
results[id] = cell;
|
|
51556
51660
|
for (let r = row - 1; r >= 0; r--) this._headerCellIds[r] && (this._headerCellIds[r][col] = roots[r]);
|
|
51557
|
-
|
|
51661
|
+
hideColumnsSubHeader ? this._headerCellIds[row - 1] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
|
|
51662
|
+
const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
|
|
51663
|
+
if (hd.columns && expand) {
|
|
51558
51664
|
!hd.columns.every(c => c.hide) && this._addHeaders(row + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader).forEach(c => results.push(c));
|
|
51559
51665
|
} else {
|
|
51560
51666
|
const colDef = {
|
|
@@ -52735,6 +52841,8 @@
|
|
|
52735
52841
|
return null;
|
|
52736
52842
|
}
|
|
52737
52843
|
getHierarchyState(col, row) {
|
|
52844
|
+
var _a;
|
|
52845
|
+
if (this.isHeader(col, row)) return null === (_a = this._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.hierarchyState;
|
|
52738
52846
|
if (!this.options.groupBy || isArray$7(this.options.groupBy) && 0 === this.options.groupBy.length) {
|
|
52739
52847
|
if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
|
|
52740
52848
|
}
|
|
@@ -52745,7 +52853,26 @@
|
|
|
52745
52853
|
let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
52746
52854
|
this.stateManager.updateHoverIcon(col, row, void 0, void 0);
|
|
52747
52855
|
const hierarchyState = this.getHierarchyState(col, row);
|
|
52748
|
-
if (
|
|
52856
|
+
if (this.isHeader(col, row)) {
|
|
52857
|
+
const headerTreeNode = this.internalProps.layoutMap.getHeader(col, row),
|
|
52858
|
+
{
|
|
52859
|
+
hierarchyState: rawHierarchyState,
|
|
52860
|
+
define: columnDefine
|
|
52861
|
+
} = headerTreeNode;
|
|
52862
|
+
if (![HierarchyState.collapse, HierarchyState.expand].includes(rawHierarchyState) || !columnDefine) return;
|
|
52863
|
+
const children = columnDefine.columns;
|
|
52864
|
+
if (Array.isArray(children) && children.length > 0) {
|
|
52865
|
+
const hierarchyState = rawHierarchyState === HierarchyState.expand ? HierarchyState.collapse : HierarchyState.expand;
|
|
52866
|
+
headerTreeNode.hierarchyState = hierarchyState, headerTreeNode.define.hierarchyState = hierarchyState, this.updateColumns(this.internalProps.columns);
|
|
52867
|
+
}
|
|
52868
|
+
this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
|
|
52869
|
+
col: col,
|
|
52870
|
+
row: row,
|
|
52871
|
+
hierarchyState: hierarchyState,
|
|
52872
|
+
originData: headerTreeNode,
|
|
52873
|
+
cellLocation: this.getCellLocation(col, row)
|
|
52874
|
+
});
|
|
52875
|
+
} else if (hierarchyState === HierarchyState.expand) this._refreshHierarchyState(col, row, recalculateColWidths), this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
|
|
52749
52876
|
col: col,
|
|
52750
52877
|
row: row,
|
|
52751
52878
|
hierarchyState: HierarchyState.collapse
|