@visactor/vtable-calendar 1.17.6-alpha.3 → 1.17.7-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 +201 -70
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
package/dist/vtable-calendar.js
CHANGED
|
@@ -27753,7 +27753,8 @@
|
|
|
27753
27753
|
DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
|
|
27754
27754
|
EMPTY_TIP_CLICK: "empty_tip_click",
|
|
27755
27755
|
EMPTY_TIP_DBLCLICK: "empty_tip_dblclick",
|
|
27756
|
-
BUTTON_CLICK: "button_click"
|
|
27756
|
+
BUTTON_CLICK: "button_click",
|
|
27757
|
+
BEFORE_CACHE_CHART_IMAGE: "before_cache_chart_image"
|
|
27757
27758
|
};
|
|
27758
27759
|
|
|
27759
27760
|
const judgeType = value => {
|
|
@@ -36677,6 +36678,9 @@
|
|
|
36677
36678
|
}
|
|
36678
36679
|
null === (_g = chartInstance.updateFullDataSync) || void 0 === _g || _g.call(chartInstance, dataBatch);
|
|
36679
36680
|
}
|
|
36681
|
+
table.fireListeners("before_cache_chart_image", {
|
|
36682
|
+
chartInstance: chartInstance
|
|
36683
|
+
});
|
|
36680
36684
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
36681
36685
|
}
|
|
36682
36686
|
function startRenderChartQueue(table) {
|
|
@@ -37398,7 +37402,7 @@
|
|
|
37398
37402
|
if (stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
|
|
37399
37403
|
const deltaWidth = 0,
|
|
37400
37404
|
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) => {
|
|
37405
|
+
"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
37406
|
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
37407
|
})), context.stroke());
|
|
37404
37408
|
}
|
|
@@ -38098,7 +38102,7 @@
|
|
|
38098
38102
|
rightBottomCornerGroup: rightBottomCornerGroup
|
|
38099
38103
|
} = table.scenegraph;
|
|
38100
38104
|
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({
|
|
38105
|
+
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
38106
|
x: table.getFrozenColsWidth(),
|
|
38103
38107
|
y: table.getFrozenRowsHeight()
|
|
38104
38108
|
}), 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 +38938,7 @@
|
|
|
38934
38938
|
}
|
|
38935
38939
|
createColGroup(onceCount) {
|
|
38936
38940
|
const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
|
|
38937
|
-
computeColsWidth(this.table, this.currentCol + 1, endCol), this.colEnd = endCol;
|
|
38941
|
+
"adaptive" !== this.table.widthMode && computeColsWidth(this.table, this.currentCol + 1, endCol), this.colEnd = endCol;
|
|
38938
38942
|
for (let row = 0; row < this.table.rowCount; row++) {
|
|
38939
38943
|
const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
|
|
38940
38944
|
"cell" === cellGroup.role && isNumber$4(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol && this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
|
|
@@ -39016,7 +39020,7 @@
|
|
|
39016
39020
|
}
|
|
39017
39021
|
updateColGroups(count) {
|
|
39018
39022
|
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;
|
|
39023
|
+
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, this.colUpdatePos, distCol), updateColContent(this.colUpdatePos, distCol, this), this.colUpdatePos = distCol + 1;
|
|
39020
39024
|
}
|
|
39021
39025
|
updateCellGroupPosition(cellGroup, newRow, y) {
|
|
39022
39026
|
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 +41836,77 @@
|
|
|
41832
41836
|
},
|
|
41833
41837
|
skipBodyMerge: !0
|
|
41834
41838
|
});
|
|
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
|
-
|
|
41839
|
+
} else if (table.internalProps.layoutMap.isSeriesNumberInHeader(col, row)) {
|
|
41840
|
+
extendSelectRange = !1;
|
|
41841
|
+
const {
|
|
41842
|
+
cornerHeaderSelectMode: cornerHeaderSelectMode
|
|
41843
|
+
} = state.select;
|
|
41844
|
+
if ("body" === cornerHeaderSelectMode) state.select.ranges.push({
|
|
41845
|
+
start: {
|
|
41846
|
+
col: table.leftRowSeriesNumberCount,
|
|
41847
|
+
row: table.columnHeaderLevelCount
|
|
41848
|
+
},
|
|
41849
|
+
end: {
|
|
41850
|
+
col: table.colCount - 1,
|
|
41851
|
+
row: table.rowCount - 1
|
|
41852
|
+
},
|
|
41853
|
+
skipBodyMerge: !0
|
|
41854
|
+
});else if ("inline" === cornerHeaderSelectMode) {
|
|
41855
|
+
const cellRange = skipBodyMerge ? {
|
|
41856
|
+
start: {
|
|
41857
|
+
col: col,
|
|
41858
|
+
row: row
|
|
41859
|
+
},
|
|
41860
|
+
end: {
|
|
41861
|
+
col: col,
|
|
41862
|
+
row: row
|
|
41863
|
+
}
|
|
41864
|
+
} : table.getCellRange(col, row);
|
|
41865
|
+
state.select.ranges.push({
|
|
41866
|
+
start: {
|
|
41867
|
+
col: cellRange.start.col,
|
|
41868
|
+
row: cellRange.start.row
|
|
41869
|
+
},
|
|
41870
|
+
end: {
|
|
41871
|
+
col: cellRange.end.col,
|
|
41872
|
+
row: table.rowCount - 1
|
|
41873
|
+
},
|
|
41874
|
+
skipBodyMerge: !0
|
|
41875
|
+
});
|
|
41876
|
+
} else if ("cell" === cornerHeaderSelectMode) {
|
|
41877
|
+
const cellRange = skipBodyMerge ? {
|
|
41878
|
+
start: {
|
|
41879
|
+
col: col,
|
|
41880
|
+
row: row
|
|
41881
|
+
},
|
|
41882
|
+
end: {
|
|
41883
|
+
col: col,
|
|
41884
|
+
row: row
|
|
41885
|
+
}
|
|
41886
|
+
} : table.getCellRange(col, row);
|
|
41887
|
+
state.select.ranges.push({
|
|
41888
|
+
start: {
|
|
41889
|
+
col: cellRange.start.col,
|
|
41890
|
+
row: cellRange.start.row
|
|
41891
|
+
},
|
|
41892
|
+
end: {
|
|
41893
|
+
col: cellRange.end.col,
|
|
41894
|
+
row: cellRange.end.row
|
|
41895
|
+
},
|
|
41896
|
+
skipBodyMerge: skipBodyMerge || void 0
|
|
41897
|
+
});
|
|
41898
|
+
} else state.select.ranges.push({
|
|
41899
|
+
start: {
|
|
41900
|
+
col: 0,
|
|
41901
|
+
row: 0
|
|
41902
|
+
},
|
|
41903
|
+
end: {
|
|
41904
|
+
col: table.colCount - 1,
|
|
41905
|
+
row: table.rowCount - 1
|
|
41906
|
+
},
|
|
41907
|
+
skipBodyMerge: !0
|
|
41908
|
+
});
|
|
41909
|
+
} else if (table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) extendSelectRange = !1, "body" === state.select.headerSelectMode ? state.select.ranges.push({
|
|
41856
41910
|
start: {
|
|
41857
41911
|
col: table.leftRowSeriesNumberCount,
|
|
41858
41912
|
row: row
|
|
@@ -41872,27 +41926,77 @@
|
|
|
41872
41926
|
row: row
|
|
41873
41927
|
},
|
|
41874
41928
|
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
|
-
|
|
41929
|
+
});else if (table.internalProps.layoutMap.isCornerHeader(col, row)) {
|
|
41930
|
+
extendSelectRange = !1;
|
|
41931
|
+
const {
|
|
41932
|
+
cornerHeaderSelectMode: cornerHeaderSelectMode
|
|
41933
|
+
} = state.select;
|
|
41934
|
+
if ("body" === cornerHeaderSelectMode) state.select.ranges.push({
|
|
41935
|
+
start: {
|
|
41936
|
+
col: table.rowHeaderLevelCount + table.leftRowSeriesNumberCount,
|
|
41937
|
+
row: table.columnHeaderLevelCount
|
|
41938
|
+
},
|
|
41939
|
+
end: {
|
|
41940
|
+
col: table.colCount - 1,
|
|
41941
|
+
row: table.rowCount - 1
|
|
41942
|
+
},
|
|
41943
|
+
skipBodyMerge: !0
|
|
41944
|
+
});else if ("cell" === cornerHeaderSelectMode) {
|
|
41945
|
+
const cellRange = skipBodyMerge ? {
|
|
41946
|
+
start: {
|
|
41947
|
+
col: col,
|
|
41948
|
+
row: row
|
|
41949
|
+
},
|
|
41950
|
+
end: {
|
|
41951
|
+
col: col,
|
|
41952
|
+
row: row
|
|
41953
|
+
}
|
|
41954
|
+
} : table.getCellRange(col, row);
|
|
41955
|
+
state.select.ranges.push({
|
|
41956
|
+
start: {
|
|
41957
|
+
col: cellRange.start.col,
|
|
41958
|
+
row: cellRange.start.row
|
|
41959
|
+
},
|
|
41960
|
+
end: {
|
|
41961
|
+
col: cellRange.end.col,
|
|
41962
|
+
row: cellRange.end.row
|
|
41963
|
+
},
|
|
41964
|
+
skipBodyMerge: skipBodyMerge || void 0
|
|
41965
|
+
});
|
|
41966
|
+
} else if ("inline" === cornerHeaderSelectMode) {
|
|
41967
|
+
const cellRange = skipBodyMerge ? {
|
|
41968
|
+
start: {
|
|
41969
|
+
col: col,
|
|
41970
|
+
row: row
|
|
41971
|
+
},
|
|
41972
|
+
end: {
|
|
41973
|
+
col: col,
|
|
41974
|
+
row: row
|
|
41975
|
+
}
|
|
41976
|
+
} : table.getCellRange(col, row);
|
|
41977
|
+
state.select.ranges.push({
|
|
41978
|
+
start: {
|
|
41979
|
+
col: cellRange.start.col,
|
|
41980
|
+
row: cellRange.start.row
|
|
41981
|
+
},
|
|
41982
|
+
end: {
|
|
41983
|
+
col: cellRange.end.col,
|
|
41984
|
+
row: table.rowCount - 1
|
|
41985
|
+
},
|
|
41986
|
+
skipBodyMerge: !0
|
|
41987
|
+
});
|
|
41988
|
+
} else state.select.ranges.push({
|
|
41989
|
+
start: {
|
|
41990
|
+
col: table.leftRowSeriesNumberCount,
|
|
41991
|
+
row: 0
|
|
41992
|
+
},
|
|
41993
|
+
end: {
|
|
41994
|
+
col: table.colCount - 1,
|
|
41995
|
+
row: table.rowCount - 1
|
|
41996
|
+
},
|
|
41997
|
+
skipBodyMerge: !0
|
|
41998
|
+
});
|
|
41999
|
+
} else if (col >= 0 && row >= 0) {
|
|
41896
42000
|
const cellRange = skipBodyMerge ? {
|
|
41897
42001
|
start: {
|
|
41898
42002
|
col: col,
|
|
@@ -42342,7 +42446,7 @@
|
|
|
42342
42446
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
42343
42447
|
if (recordIndex >= 0) {
|
|
42344
42448
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
42345
|
-
state.checkedState.
|
|
42449
|
+
state.checkedState.get(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
|
|
42346
42450
|
[field]: checked
|
|
42347
42451
|
});
|
|
42348
42452
|
}
|
|
@@ -42367,7 +42471,7 @@
|
|
|
42367
42471
|
if (recordIndex >= 0) {
|
|
42368
42472
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
42369
42473
|
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.
|
|
42474
|
+
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
|
|
42371
42475
|
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
42372
42476
|
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
42373
42477
|
[field]: !0
|
|
@@ -42749,21 +42853,22 @@
|
|
|
42749
42853
|
});
|
|
42750
42854
|
}
|
|
42751
42855
|
setSelectState() {
|
|
42752
|
-
var _a;
|
|
42856
|
+
var _a, _b, _c, _d, _e;
|
|
42753
42857
|
const {
|
|
42754
|
-
|
|
42755
|
-
|
|
42756
|
-
|
|
42757
|
-
|
|
42758
|
-
|
|
42759
|
-
|
|
42760
|
-
|
|
42761
|
-
|
|
42762
|
-
|
|
42763
|
-
|
|
42764
|
-
|
|
42765
|
-
|
|
42766
|
-
|
|
42858
|
+
headerSelectMode: headerSelectMode,
|
|
42859
|
+
disableSelect: disableSelect,
|
|
42860
|
+
disableHeaderSelect: disableHeaderSelect,
|
|
42861
|
+
highlightMode: highlightMode,
|
|
42862
|
+
highlightInRange: highlightInRange
|
|
42863
|
+
} = Object.assign({}, {
|
|
42864
|
+
headerSelectMode: "inline",
|
|
42865
|
+
disableSelect: !1,
|
|
42866
|
+
disableHeaderSelect: !1,
|
|
42867
|
+
highlightMode: "cell",
|
|
42868
|
+
highlightInRange: !1
|
|
42869
|
+
}, this.table.options.select),
|
|
42870
|
+
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";
|
|
42871
|
+
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
42872
|
}
|
|
42768
42873
|
isSelected(col, row) {
|
|
42769
42874
|
let seled = !1;
|
|
@@ -43940,7 +44045,7 @@
|
|
|
43940
44045
|
var _a;
|
|
43941
44046
|
if (!1 === isCompleteEdit) return;
|
|
43942
44047
|
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 {
|
|
44048
|
+
if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
|
|
43944
44049
|
table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
|
|
43945
44050
|
const {
|
|
43946
44051
|
eventArgs: eventArgs
|
|
@@ -44538,6 +44643,7 @@
|
|
|
44538
44643
|
right = !1,
|
|
44539
44644
|
left = !1;
|
|
44540
44645
|
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) => {
|
|
44646
|
+
var _a;
|
|
44541
44647
|
let selectX, selectY;
|
|
44542
44648
|
handleWhell({
|
|
44543
44649
|
deltaX: -dx,
|
|
@@ -44548,7 +44654,7 @@
|
|
|
44548
44654
|
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
44655
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
|
|
44550
44656
|
targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
44551
|
-
isValid$3(targetCol) && isValid$3(targetRow) && table.stateManager.updateSelectPos(targetCol.col, targetRow.row, !1, !1, !1, !1);
|
|
44657
|
+
!(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
44658
|
});
|
|
44553
44659
|
} else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
|
|
44554
44660
|
}
|
|
@@ -47703,7 +47809,7 @@
|
|
|
47703
47809
|
constructor(container) {
|
|
47704
47810
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47705
47811
|
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.
|
|
47812
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.7-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");
|
|
47707
47813
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47708
47814
|
const {
|
|
47709
47815
|
frozenColCount = 0,
|
|
@@ -51032,9 +51138,10 @@
|
|
|
51032
51138
|
|
|
51033
51139
|
class SimpleHeaderLayoutMap {
|
|
51034
51140
|
constructor(table, columns, showHeader, hierarchyIndent) {
|
|
51035
|
-
|
|
51141
|
+
var _a, _b;
|
|
51142
|
+
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
51143
|
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);
|
|
51144
|
+
}, 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
51145
|
}
|
|
51039
51146
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
51040
51147
|
var _a;
|
|
@@ -51550,11 +51657,14 @@
|
|
|
51550
51657
|
headerType: null !== (_b = hd.headerType) && void 0 !== _b ? _b : "text",
|
|
51551
51658
|
dropDownMenu: hd.dropDownMenu,
|
|
51552
51659
|
define: hd,
|
|
51660
|
+
hierarchyState: hd.hierarchyState,
|
|
51553
51661
|
columnWidthComputeMode: hd.columnWidthComputeMode
|
|
51554
51662
|
};
|
|
51555
51663
|
results[id] = cell;
|
|
51556
51664
|
for (let r = row - 1; r >= 0; r--) this._headerCellIds[r] && (this._headerCellIds[r][col] = roots[r]);
|
|
51557
|
-
|
|
51665
|
+
hideColumnsSubHeader ? this._headerCellIds[row - 1] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
|
|
51666
|
+
const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
|
|
51667
|
+
if (hd.columns && expand) {
|
|
51558
51668
|
!hd.columns.every(c => c.hide) && this._addHeaders(row + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader).forEach(c => results.push(c));
|
|
51559
51669
|
} else {
|
|
51560
51670
|
const colDef = {
|
|
@@ -52735,6 +52845,8 @@
|
|
|
52735
52845
|
return null;
|
|
52736
52846
|
}
|
|
52737
52847
|
getHierarchyState(col, row) {
|
|
52848
|
+
var _a;
|
|
52849
|
+
if (this.isHeader(col, row)) return null === (_a = this._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.hierarchyState;
|
|
52738
52850
|
if (!this.options.groupBy || isArray$7(this.options.groupBy) && 0 === this.options.groupBy.length) {
|
|
52739
52851
|
if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
|
|
52740
52852
|
}
|
|
@@ -52745,7 +52857,26 @@
|
|
|
52745
52857
|
let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
52746
52858
|
this.stateManager.updateHoverIcon(col, row, void 0, void 0);
|
|
52747
52859
|
const hierarchyState = this.getHierarchyState(col, row);
|
|
52748
|
-
if (
|
|
52860
|
+
if (this.isHeader(col, row)) {
|
|
52861
|
+
const headerTreeNode = this.internalProps.layoutMap.getHeader(col, row),
|
|
52862
|
+
{
|
|
52863
|
+
hierarchyState: rawHierarchyState,
|
|
52864
|
+
define: columnDefine
|
|
52865
|
+
} = headerTreeNode;
|
|
52866
|
+
if (![HierarchyState.collapse, HierarchyState.expand].includes(rawHierarchyState) || !columnDefine) return;
|
|
52867
|
+
const children = columnDefine.columns;
|
|
52868
|
+
if (Array.isArray(children) && children.length > 0) {
|
|
52869
|
+
const hierarchyState = rawHierarchyState === HierarchyState.expand ? HierarchyState.collapse : HierarchyState.expand;
|
|
52870
|
+
headerTreeNode.hierarchyState = hierarchyState, headerTreeNode.define.hierarchyState = hierarchyState, this.updateColumns(this.internalProps.columns);
|
|
52871
|
+
}
|
|
52872
|
+
this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
|
|
52873
|
+
col: col,
|
|
52874
|
+
row: row,
|
|
52875
|
+
hierarchyState: hierarchyState,
|
|
52876
|
+
originData: headerTreeNode,
|
|
52877
|
+
cellLocation: this.getCellLocation(col, row)
|
|
52878
|
+
});
|
|
52879
|
+
} else if (hierarchyState === HierarchyState.expand) this._refreshHierarchyState(col, row, recalculateColWidths), this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
|
|
52749
52880
|
col: col,
|
|
52750
52881
|
row: row,
|
|
52751
52882
|
hierarchyState: HierarchyState.collapse
|