@visactor/vtable-calendar 1.17.5-alpha.1 → 1.17.5
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 +137 -71
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -29234,10 +29234,6 @@
|
|
|
29234
29234
|
get selectionFillMode() {
|
|
29235
29235
|
var _a;
|
|
29236
29236
|
return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.selectionFillMode) && void 0 !== _a ? _a : "overlay";
|
|
29237
|
-
},
|
|
29238
|
-
get dynamicUpdateSelectionSize() {
|
|
29239
|
-
var _a;
|
|
29240
|
-
return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.dynamicUpdateSelectionSize) && void 0 !== _a && _a;
|
|
29241
29237
|
}
|
|
29242
29238
|
};
|
|
29243
29239
|
}
|
|
@@ -32243,15 +32239,16 @@
|
|
|
32243
32239
|
}
|
|
32244
32240
|
function getCellCornerRadius(col, row, table) {
|
|
32245
32241
|
const tableCornerRadius = table.theme.frameStyle.cornerRadius;
|
|
32246
|
-
if (table.theme.cellInnerBorder) {
|
|
32247
|
-
if (
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32242
|
+
if (table.theme.cellInnerBorder) if (Array.isArray(tableCornerRadius)) {
|
|
32243
|
+
if (0 === col && 0 === row) return [tableCornerRadius[0], 0, 0, 0];
|
|
32244
|
+
if (col === table.colCount - 1 && 0 === row) return [0, tableCornerRadius[1], 0, 0];
|
|
32245
|
+
if (0 === col && row === table.rowCount - 1) return [0, 0, 0, tableCornerRadius[3]];
|
|
32246
|
+
if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius[2], 0];
|
|
32247
|
+
} else if (tableCornerRadius) {
|
|
32248
|
+
if (0 === col && 0 === row) return [tableCornerRadius, 0, 0, 0];
|
|
32249
|
+
if (col === table.colCount - 1 && 0 === row) return [0, tableCornerRadius, 0, 0];
|
|
32250
|
+
if (0 === col && row === table.rowCount - 1) return [0, 0, 0, tableCornerRadius];
|
|
32251
|
+
if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius, 0];
|
|
32255
32252
|
}
|
|
32256
32253
|
return 0;
|
|
32257
32254
|
}
|
|
@@ -34052,7 +34049,7 @@
|
|
|
34052
34049
|
function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
|
|
34053
34050
|
let customElementsGroup,
|
|
34054
34051
|
renderDefault = !0;
|
|
34055
|
-
if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else if (null == range ? void 0 : range.isCustom) ;else {
|
|
34052
|
+
if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else if ((null == range ? void 0 : range.isCustom) && !table.isCornerHeader(col, row)) ;else {
|
|
34056
34053
|
let customRender, customLayout;
|
|
34057
34054
|
if ("body" !== table.getCellLocation(col, row) ? (customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender, customLayout = null == define ? void 0 : define.customLayout), customLayout || customRender) {
|
|
34058
34055
|
const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
|
|
@@ -36579,13 +36576,17 @@
|
|
|
36579
36576
|
}
|
|
36580
36577
|
Chart.temp = 1;
|
|
36581
36578
|
|
|
36582
|
-
|
|
36583
|
-
|
|
36584
|
-
let
|
|
36579
|
+
let chartRenderKeys = [];
|
|
36580
|
+
let chartRenderQueueList = [];
|
|
36581
|
+
let requestAnimationFrameId,
|
|
36582
|
+
batchRenderChartCount = 5,
|
|
36585
36583
|
isHandlingChartQueue = !1;
|
|
36586
36584
|
function setBatchRenderChartCount(count) {
|
|
36587
36585
|
isValid$3(count) && (batchRenderChartCount = count);
|
|
36588
36586
|
}
|
|
36587
|
+
function clearChartRenderQueue() {
|
|
36588
|
+
chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, cancelAnimationFrame(requestAnimationFrameId);
|
|
36589
|
+
}
|
|
36589
36590
|
function IsHandlingChartQueue() {
|
|
36590
36591
|
return isHandlingChartQueue;
|
|
36591
36592
|
}
|
|
@@ -36679,7 +36680,7 @@
|
|
|
36679
36680
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
36680
36681
|
}
|
|
36681
36682
|
function startRenderChartQueue(table) {
|
|
36682
|
-
isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrame(() => {
|
|
36683
|
+
isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrameId = requestAnimationFrame(() => {
|
|
36683
36684
|
const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);
|
|
36684
36685
|
chartRenderKeys.splice(0, batchRenderChartCount), chartsToRender.forEach(chart => {
|
|
36685
36686
|
renderChart(chart), chart.addUpdateBoundTag();
|
|
@@ -38823,7 +38824,7 @@
|
|
|
38823
38824
|
};
|
|
38824
38825
|
class SceneProxy {
|
|
38825
38826
|
constructor(table) {
|
|
38826
|
-
this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount);
|
|
38827
|
+
this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight(table.columnHeaderLevelCount) ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount), this.table.options.maintainedColumnCount && (this.colLimit = this.table.options.maintainedColumnCount), "adaptive" === this.table.heightMode && (this.rowLimit = this.table.rowCount), "adaptive" === this.table.widthMode && (this.colLimit = this.table.colCount);
|
|
38827
38828
|
}
|
|
38828
38829
|
get bodyLeftCol() {
|
|
38829
38830
|
return this.table.frozenColCount;
|
|
@@ -38899,7 +38900,7 @@
|
|
|
38899
38900
|
}
|
|
38900
38901
|
createRowCellGroup(onceCount) {
|
|
38901
38902
|
const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
|
|
38902
|
-
if (computeRowsHeight(this.table, this.currentRow + 1, endRow, !1), this.rowEnd = endRow, this.table.frozenColCount) {
|
|
38903
|
+
if ("adaptive" !== this.table.heightMode && computeRowsHeight(this.table, this.currentRow + 1, endRow, !1), this.rowEnd = endRow, this.table.frozenColCount) {
|
|
38903
38904
|
let maxHeight = 0;
|
|
38904
38905
|
for (let col = 0; col < this.table.frozenColCount; col++) {
|
|
38905
38906
|
const colGroup = this.table.scenegraph.getColGroup(col),
|
|
@@ -39161,7 +39162,7 @@
|
|
|
39161
39162
|
});
|
|
39162
39163
|
}
|
|
39163
39164
|
function updateComponent(selectComp, key, scene) {
|
|
39164
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39165
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
39165
39166
|
const table = scene.table,
|
|
39166
39167
|
[startColStr, startRowStr, endColStr, endRowStr] = key.split("-"),
|
|
39167
39168
|
startCol = parseInt(startColStr, 10),
|
|
@@ -39194,21 +39195,32 @@
|
|
|
39194
39195
|
}
|
|
39195
39196
|
const colsWidth = table.getColsWidth(computeRectCellRangeStartCol, computeRectCellRangeEndCol),
|
|
39196
39197
|
rowsHeight = table.getRowsHeight(computeRectCellRangeStartRow, computeRectCellRangeEndRow),
|
|
39197
|
-
firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds
|
|
39198
|
-
|
|
39199
|
-
selectComp.rect.setAttributes({
|
|
39198
|
+
firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds;
|
|
39199
|
+
if (selectComp.rect.setAttributes({
|
|
39200
39200
|
x: firstCellBound.x1 - scene.tableGroup.attribute.x,
|
|
39201
39201
|
y: firstCellBound.y1 - scene.tableGroup.attribute.y,
|
|
39202
39202
|
width: colsWidth,
|
|
39203
39203
|
height: rowsHeight,
|
|
39204
39204
|
visible: !0
|
|
39205
|
-
}), selectComp.fillhandle
|
|
39206
|
-
|
|
39207
|
-
|
|
39208
|
-
|
|
39209
|
-
|
|
39210
|
-
|
|
39211
|
-
|
|
39205
|
+
}), selectComp.fillhandle) {
|
|
39206
|
+
const fillHandle = null === (_a = scene.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle;
|
|
39207
|
+
let lastCellBound,
|
|
39208
|
+
visible = !0;
|
|
39209
|
+
"function" == typeof fillHandle && (visible = fillHandle({
|
|
39210
|
+
selectRanges: scene.table.stateManager.select.ranges,
|
|
39211
|
+
table: scene.table
|
|
39212
|
+
})), lastCellBound = computeRectCellRangeEndCol < table.colCount - 1 ? scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeEndRow).globalAABBBounds : scene.highPerformanceGetCell(computeRectCellRangeStartCol - 1, computeRectCellRangeEndRow).globalAABBBounds;
|
|
39213
|
+
const handlerX = lastCellBound.x2 - scene.tableGroup.attribute.x - 3;
|
|
39214
|
+
lastCellBound = computeRectCellRangeEndRow < table.rowCount - 1 ? scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeEndRow).globalAABBBounds : scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeStartRow - 1).globalAABBBounds;
|
|
39215
|
+
const handlerY = lastCellBound.y2 - scene.tableGroup.attribute.y - 3;
|
|
39216
|
+
null === (_b = selectComp.fillhandle) || void 0 === _b || _b.setAttributes({
|
|
39217
|
+
x: handlerX,
|
|
39218
|
+
y: handlerY,
|
|
39219
|
+
width: 6,
|
|
39220
|
+
height: 6,
|
|
39221
|
+
visible: visible
|
|
39222
|
+
});
|
|
39223
|
+
}
|
|
39212
39224
|
let isNearRowHeader = !!table.frozenColCount && startCol === table.frozenColCount;
|
|
39213
39225
|
if (!isNearRowHeader && table.frozenColCount && table.scrollLeft > 0 && startCol >= table.frozenColCount) {
|
|
39214
39226
|
table.getColsWidth(0, startCol - 1) - table.scrollLeft < table.getFrozenColsWidth() && (isNearRowHeader = !0);
|
|
@@ -39225,16 +39237,13 @@
|
|
|
39225
39237
|
if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
|
|
39226
39238
|
table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
|
|
39227
39239
|
}
|
|
39228
|
-
|
|
39229
|
-
dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
|
|
39230
|
-
} = table.theme.selectionStyle;
|
|
39231
|
-
if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
|
|
39240
|
+
if (isNearRowHeader && selectComp.rect.attribute.stroke[3] || isNearRightRowHeader && selectComp.rect.attribute.stroke[1] || isNearColHeader && selectComp.rect.attribute.stroke[0] || isNearBottomColHeader && selectComp.rect.attribute.stroke[2]) {
|
|
39232
39241
|
if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
|
|
39233
39242
|
const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
|
|
39234
39243
|
selectComp.rect.setAttributes({
|
|
39235
39244
|
x: selectComp.rect.attribute.x + (table.getFrozenColsWidth() - selectComp.rect.attribute.x),
|
|
39236
39245
|
width: width > 0 ? width : 0
|
|
39237
|
-
}), null === (
|
|
39246
|
+
}), null === (_c = selectComp.fillhandle) || void 0 === _c || _c.setAttributes({
|
|
39238
39247
|
visible: width > 0
|
|
39239
39248
|
});
|
|
39240
39249
|
}
|
|
@@ -39243,7 +39252,7 @@
|
|
|
39243
39252
|
selectComp.rect.setAttributes({
|
|
39244
39253
|
x: selectComp.rect.attribute.x,
|
|
39245
39254
|
width: width > 0 ? width : 0
|
|
39246
|
-
}), null === (
|
|
39255
|
+
}), null === (_d = selectComp.fillhandle) || void 0 === _d || _d.setAttributes({
|
|
39247
39256
|
visible: width - colsWidth > 0
|
|
39248
39257
|
});
|
|
39249
39258
|
}
|
|
@@ -39252,7 +39261,7 @@
|
|
|
39252
39261
|
selectComp.rect.setAttributes({
|
|
39253
39262
|
y: selectComp.rect.attribute.y + (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y),
|
|
39254
39263
|
height: height > 0 ? height : 0
|
|
39255
|
-
}), null === (
|
|
39264
|
+
}), null === (_e = selectComp.fillhandle) || void 0 === _e || _e.setAttributes({
|
|
39256
39265
|
visible: height > 0
|
|
39257
39266
|
});
|
|
39258
39267
|
}
|
|
@@ -39261,20 +39270,20 @@
|
|
|
39261
39270
|
selectComp.rect.setAttributes({
|
|
39262
39271
|
y: selectComp.rect.attribute.y,
|
|
39263
39272
|
height: height > 0 ? height : 0
|
|
39264
|
-
}), null === (
|
|
39273
|
+
}), null === (_f = selectComp.fillhandle) || void 0 === _f || _f.setAttributes({
|
|
39265
39274
|
visible: height - rowsHeight > 0
|
|
39266
39275
|
});
|
|
39267
39276
|
}
|
|
39268
39277
|
} else scene.tableGroup.insertAfter(selectComp.rect, "body" === selectComp.role ? scene.bodyGroup : "columnHeader" === selectComp.role ? scene.colHeaderGroup : "rowHeader" === selectComp.role ? scene.rowHeaderGroup : "cornerHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightTopCorner" === selectComp.role ? scene.rightTopCornerGroup : "rightFrozen" === selectComp.role ? scene.rightFrozenGroup : "leftBottomCorner" === selectComp.role ? scene.leftBottomCornerGroup : "bottomFrozen" === selectComp.role ? scene.bottomFrozenGroup : scene.rightBottomCornerGroup);
|
|
39269
39278
|
let diffSize = 0;
|
|
39270
|
-
"number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
39279
|
+
"number" == typeof selectComp.rect.attribute.lineWidth && (diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2)), endCol === table.colCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_g = selectComp.rect.attribute.lineWidth[1]) && void 0 !== _g ? _g : 0) / 2)), selectComp.rect.setAttributes({
|
|
39271
39280
|
width: selectComp.rect.attribute.width - diffSize
|
|
39272
|
-
})), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
39281
|
+
})), 0 === startCol && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_h = selectComp.rect.attribute.lineWidth[3]) && void 0 !== _h ? _h : 0) / 2)), selectComp.rect.setAttributes({
|
|
39273
39282
|
x: selectComp.rect.attribute.x + diffSize,
|
|
39274
39283
|
width: selectComp.rect.attribute.width - diffSize
|
|
39275
|
-
})), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
39284
|
+
})), endRow === table.rowCount - 1 && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_j = selectComp.rect.attribute.lineWidth[2]) && void 0 !== _j ? _j : 0) / 2)), selectComp.rect.setAttributes({
|
|
39276
39285
|
height: selectComp.rect.attribute.height - diffSize
|
|
39277
|
-
})), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (
|
|
39286
|
+
})), 0 === startRow && (Array.isArray(selectComp.rect.attribute.lineWidth) && (diffSize = Math.ceil((null !== (_k = selectComp.rect.attribute.lineWidth[0]) && void 0 !== _k ? _k : 0) / 2)), selectComp.rect.setAttributes({
|
|
39278
39287
|
y: selectComp.rect.attribute.y + diffSize,
|
|
39279
39288
|
height: selectComp.rect.attribute.height - diffSize
|
|
39280
39289
|
}));
|
|
@@ -42326,6 +42335,10 @@
|
|
|
42326
42335
|
}
|
|
42327
42336
|
|
|
42328
42337
|
function setCheckedState(col, row, field, checked, state) {
|
|
42338
|
+
const cellRange = state.table.getCellRange(col, row);
|
|
42339
|
+
if (cellRange.start.col !== cellRange.end.col || cellRange.start.row !== cellRange.end.row) for (let i = cellRange.start.col; i <= cellRange.end.col; i++) for (let j = cellRange.start.row; j <= cellRange.end.row; j++) setSingleCheckedState(i, j, field, checked, state);else setSingleCheckedState(col, row, field, checked, state);
|
|
42340
|
+
}
|
|
42341
|
+
function setSingleCheckedState(col, row, field, checked, state) {
|
|
42329
42342
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
42330
42343
|
if (recordIndex >= 0) {
|
|
42331
42344
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
@@ -45015,19 +45028,27 @@
|
|
|
45015
45028
|
return "checkbox" === this.table.getCellType(eventArgs.col, eventArgs.row) && "checkbox" === target.name;
|
|
45016
45029
|
}
|
|
45017
45030
|
checkCellFillhandle(eventArgsSet, update) {
|
|
45018
|
-
var _a, _b, _c, _d;
|
|
45019
|
-
|
|
45031
|
+
var _a, _b, _c, _d, _e;
|
|
45032
|
+
let isFillHandle = !1;
|
|
45033
|
+
if (isFillHandle = "function" == typeof (null === (_a = this.table.options.excelOptions) || void 0 === _a ? void 0 : _a.fillHandle) ? this.table.options.excelOptions.fillHandle({
|
|
45034
|
+
selectRanges: this.table.stateManager.select.ranges,
|
|
45035
|
+
table: this.table
|
|
45036
|
+
}) : null === (_b = this.table.options.excelOptions) || void 0 === _b ? void 0 : _b.fillHandle, isFillHandle) {
|
|
45020
45037
|
const {
|
|
45021
45038
|
eventArgs: eventArgs
|
|
45022
45039
|
} = eventArgsSet;
|
|
45023
|
-
if (eventArgs && (null === (
|
|
45040
|
+
if (eventArgs && (null === (_d = null === (_c = this.table.stateManager.select) || void 0 === _c ? void 0 : _c.ranges) || void 0 === _d ? void 0 : _d.length)) {
|
|
45024
45041
|
const lastCol = Math.max(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.col, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.col),
|
|
45025
45042
|
lastRow = Math.max(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.row, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.row),
|
|
45026
|
-
|
|
45027
|
-
|
|
45028
|
-
|
|
45043
|
+
startCol = Math.min(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.col, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.col),
|
|
45044
|
+
startRow = Math.min(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.row, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.row);
|
|
45045
|
+
let lastCellBound;
|
|
45046
|
+
lastCellBound = lastCol < this.table.colCount - 1 ? this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds : this.table.scenegraph.highPerformanceGetCell(startCol - 1, lastRow).globalAABBBounds;
|
|
45047
|
+
const distanceX = Math.abs(eventArgsSet.abstractPos.x - lastCellBound.x2);
|
|
45048
|
+
lastCellBound = lastRow < this.table.rowCount - 1 ? this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds : this.table.scenegraph.highPerformanceGetCell(lastCol, startRow - 1).globalAABBBounds;
|
|
45049
|
+
const distanceY = Math.abs(eventArgsSet.abstractPos.y - lastCellBound.y2),
|
|
45029
45050
|
squareSize = 18;
|
|
45030
|
-
if ((null === (
|
|
45051
|
+
if ((null === (_e = this.table.stateManager.fillHandle) || void 0 === _e ? void 0 : _e.isFilling) || distanceX <= squareSize / 2 && distanceY <= squareSize / 2) return update && this.table.stateManager.startFillSelect(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y), !0;
|
|
45031
45052
|
}
|
|
45032
45053
|
}
|
|
45033
45054
|
return !1;
|
|
@@ -47682,7 +47703,7 @@
|
|
|
47682
47703
|
constructor(container) {
|
|
47683
47704
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47684
47705
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
47685
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.5
|
|
47706
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.5", 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");
|
|
47686
47707
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47687
47708
|
const {
|
|
47688
47709
|
frozenColCount = 0,
|
|
@@ -48067,7 +48088,6 @@
|
|
|
48067
48088
|
shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
|
|
48068
48089
|
(null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0)) : (this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0), this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)), this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
|
|
48069
48090
|
}
|
|
48070
|
-
this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
|
|
48071
48091
|
}
|
|
48072
48092
|
updateViewBox(newViewBox) {
|
|
48073
48093
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -48081,7 +48101,7 @@
|
|
|
48081
48101
|
this.internalProps.modifiedViewBoxTransform = !0, this.scenegraph.stage.window.setViewBoxTransform(a, b, c, d, e, f);
|
|
48082
48102
|
}
|
|
48083
48103
|
get rowHierarchyType() {
|
|
48084
|
-
return
|
|
48104
|
+
return this.dataSource.rowHierarchyType;
|
|
48085
48105
|
}
|
|
48086
48106
|
getColsWidth(startCol, endCol) {
|
|
48087
48107
|
var _a;
|
|
@@ -48509,7 +48529,7 @@
|
|
|
48509
48529
|
const {
|
|
48510
48530
|
parentElement: parentElement
|
|
48511
48531
|
} = internalProps.element;
|
|
48512
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache();
|
|
48532
|
+
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache(), clearChartRenderQueue();
|
|
48513
48533
|
}
|
|
48514
48534
|
fireListeners(type, event) {
|
|
48515
48535
|
return super.fireListeners(type, event);
|
|
@@ -48558,7 +48578,7 @@
|
|
|
48558
48578
|
const internalProps = this.internalProps;
|
|
48559
48579
|
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_a = options.columnWidthComputeMode) && void 0 !== _a ? _a : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.columnResizeMode = null !== (_b = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _b ? _b : columnResizeMode, internalProps.rowResizeMode = null !== (_c = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _c ? _c : rowResizeMode, internalProps.dragHeaderMode = null !== (_e = null !== (_d = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _d ? _d : dragHeaderMode) && void 0 !== _e ? _e : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_f = options.theme) && void 0 !== _f ? _f : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_g = options.allowFrozenColCount) && void 0 !== _g ? _g : 0, internalProps.limitMaxAutoWidth = null !== (_h = options.limitMaxAutoWidth) && void 0 !== _h ? _h : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_j = internalProps.legends) || void 0 === _j || _j.forEach(legend => {
|
|
48560
48580
|
null == legend || legend.release();
|
|
48561
|
-
}), null === (_k = internalProps.title) || void 0 === _k || _k.release(), internalProps.title = null, null === (_l = internalProps.emptyTip) || void 0 === _l || _l.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
48581
|
+
}), null === (_k = internalProps.title) || void 0 === _k || _k.release(), internalProps.title = null, null === (_l = internalProps.emptyTip) || void 0 === _l || _l.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
48562
48582
|
internalProps.legends = [];
|
|
48563
48583
|
const createLegend = Factory.getFunction("createLegend");
|
|
48564
48584
|
if (Array.isArray(options.legends)) {
|
|
@@ -52856,7 +52876,7 @@
|
|
|
52856
52876
|
setRecords(records, option) {
|
|
52857
52877
|
var _a, _b, _c, _d;
|
|
52858
52878
|
let sort;
|
|
52859
|
-
null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
|
|
52879
|
+
clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
|
|
52860
52880
|
"undefined" != typeof window && window.performance.now();
|
|
52861
52881
|
const oldHoverState = {
|
|
52862
52882
|
col: this.stateManager.hover.cellPos.col,
|
|
@@ -56886,8 +56906,65 @@
|
|
|
56886
56906
|
return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), cellGroup;
|
|
56887
56907
|
}
|
|
56888
56908
|
|
|
56909
|
+
function createMark(marked, cellGroup, table) {
|
|
56910
|
+
if ("boolean" == typeof marked) {
|
|
56911
|
+
const mark = createArc({
|
|
56912
|
+
x: cellGroup.attribute.width,
|
|
56913
|
+
y: 0,
|
|
56914
|
+
startAngle: Math.PI / 2,
|
|
56915
|
+
endAngle: Math.PI,
|
|
56916
|
+
outerRadius: 6,
|
|
56917
|
+
fill: "#3073F2",
|
|
56918
|
+
pickable: !1
|
|
56919
|
+
});
|
|
56920
|
+
mark.name = "mark", cellGroup.appendChild(mark);
|
|
56921
|
+
} else {
|
|
56922
|
+
const {
|
|
56923
|
+
bgColor = "#3073F2",
|
|
56924
|
+
shape = "sector",
|
|
56925
|
+
position = "right-top",
|
|
56926
|
+
size = 10,
|
|
56927
|
+
offset = 0
|
|
56928
|
+
} = marked;
|
|
56929
|
+
let x, y, startAngle, endAngle, fill, mark;
|
|
56930
|
+
if ("sector" === shape) "right-top" === position ? (x = cellGroup.attribute.width - offset, y = offset, startAngle = Math.PI / 2, endAngle = Math.PI) : "left-top" === position ? (x = offset, y = offset, startAngle = 0, endAngle = Math.PI / 2) : "right-bottom" === position ? (x = cellGroup.attribute.width - offset, y = cellGroup.attribute.height - offset, startAngle = Math.PI, endAngle = Math.PI / 2 * 3) : "left-bottom" === position && (x = offset, y = cellGroup.attribute.height - offset, startAngle = Math.PI / 2 * 3, endAngle = 2 * Math.PI), fill = bgColor, mark = createArc({
|
|
56931
|
+
x: x,
|
|
56932
|
+
y: y,
|
|
56933
|
+
startAngle: startAngle,
|
|
56934
|
+
endAngle: endAngle,
|
|
56935
|
+
outerRadius: size,
|
|
56936
|
+
fill: fill,
|
|
56937
|
+
pickable: !1
|
|
56938
|
+
});else if ("triangle" === shape) {
|
|
56939
|
+
let x2, y2, x3, y3;
|
|
56940
|
+
"right-top" === position ? (x = cellGroup.attribute.width - offset, y = offset, x2 = x - size, y2 = y, x3 = x, y3 = y + size) : "left-top" === position ? (x = offset, y = offset, x2 = x + size, y2 = y, x3 = x, y3 = y + size) : "right-bottom" === position ? (x = cellGroup.attribute.width - offset, y = cellGroup.attribute.height - offset, x2 = x - size, y2 = y, x3 = x, y3 = y - size) : "left-bottom" === position && (x = offset, y = cellGroup.attribute.height - offset, x2 = x + size, y2 = y, x3 = x, y3 = y - size), fill = bgColor, mark = createPolygon({
|
|
56941
|
+
points: [{
|
|
56942
|
+
x: x,
|
|
56943
|
+
y: y
|
|
56944
|
+
}, {
|
|
56945
|
+
x: x2,
|
|
56946
|
+
y: y2
|
|
56947
|
+
}, {
|
|
56948
|
+
x: x3,
|
|
56949
|
+
y: y3
|
|
56950
|
+
}],
|
|
56951
|
+
fill: fill,
|
|
56952
|
+
pickable: !1
|
|
56953
|
+
});
|
|
56954
|
+
} else "rect" === shape && ("right-top" === position ? (x = cellGroup.attribute.width - size - offset, y = offset) : "left-top" === position ? (x = offset, y = offset) : "right-bottom" === position ? (x = cellGroup.attribute.width - size - offset, y = cellGroup.attribute.height - size - offset) : "left-bottom" === position && (x = offset, y = cellGroup.attribute.height - size - offset), fill = bgColor, mark = createRect({
|
|
56955
|
+
x: x,
|
|
56956
|
+
y: y,
|
|
56957
|
+
width: size,
|
|
56958
|
+
height: size,
|
|
56959
|
+
fill: fill,
|
|
56960
|
+
pickable: !1
|
|
56961
|
+
}));
|
|
56962
|
+
mark.name = "mark", cellGroup.appendChild(mark);
|
|
56963
|
+
}
|
|
56964
|
+
}
|
|
56965
|
+
|
|
56889
56966
|
function createCellGroup(table, value, columnGroup, xOrigin, yOrigin, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync) {
|
|
56890
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
56967
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
56891
56968
|
const headerStyle = table._getCellStyle(col, row),
|
|
56892
56969
|
functionalPadding = getFunctionalProp("padding", headerStyle, col, row, table);
|
|
56893
56970
|
isValid$3(functionalPadding) && (padding = functionalPadding), (null === (_a = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _a ? void 0 : _a.textAlign) && (textAlign = null === (_b = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _b ? void 0 : _b.textAlign), (null === (_c = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _c ? void 0 : _c.textBaseline) && (textBaseline = null === (_d = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _d ? void 0 : _d.textBaseline);
|
|
@@ -56935,22 +57012,11 @@
|
|
|
56935
57012
|
iconRow = row;
|
|
56936
57013
|
range && (iconCol = range.start.col, iconRow = range.start.row), icons = table.getCellIcons(iconCol, iconRow);
|
|
56937
57014
|
}
|
|
56938
|
-
|
|
56939
|
-
const mark = createArc({
|
|
56940
|
-
x: cellGroup.attribute.width,
|
|
56941
|
-
y: 0,
|
|
56942
|
-
startAngle: Math.PI / 2,
|
|
56943
|
-
endAngle: Math.PI,
|
|
56944
|
-
outerRadius: 6,
|
|
56945
|
-
fill: "#3073F2",
|
|
56946
|
-
pickable: !1
|
|
56947
|
-
});
|
|
56948
|
-
mark.name = "mark", cellGroup.appendChild(mark);
|
|
56949
|
-
}
|
|
57015
|
+
createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, "number" == typeof lineClamp ? lineClamp : void 0, cellGroup.attribute.width, cellGroup.attribute.height, textAlign, textBaseline, table, cellTheme, range), (null === (_5 = null == cellTheme ? void 0 : cellTheme._vtable) || void 0 === _5 ? void 0 : _5.marked) && createMark(null === (_6 = null == cellTheme ? void 0 : cellTheme._vtable) || void 0 === _6 ? void 0 : _6.marked, cellGroup);
|
|
56950
57016
|
}
|
|
56951
57017
|
return customElementsGroup && cellGroup.setAttributes({
|
|
56952
|
-
width: Math.max(cellGroup.attribute.width, null !== (
|
|
56953
|
-
height: Math.max(cellGroup.attribute.height, null !== (
|
|
57018
|
+
width: Math.max(cellGroup.attribute.width, null !== (_7 = customElementsGroup.attribute.width) && void 0 !== _7 ? _7 : 0),
|
|
57019
|
+
height: Math.max(cellGroup.attribute.height, null !== (_8 = customElementsGroup.attribute.height) && void 0 !== _8 ? _8 : 0)
|
|
56954
57020
|
}), cellGroup;
|
|
56955
57021
|
}
|
|
56956
57022
|
|