@visactor/vtable-calendar 1.11.3-alpha.0 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vtable-calendar.js +104 -53
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
package/dist/vtable-calendar.js
CHANGED
|
@@ -35602,8 +35602,9 @@
|
|
|
35602
35602
|
const define = table.getHeaderDefine(col, row);
|
|
35603
35603
|
cellDisable = null == define ? void 0 : define.disableHeaderSelect;
|
|
35604
35604
|
} else {
|
|
35605
|
-
const define = table.getBodyColumnDefine(col, row)
|
|
35606
|
-
|
|
35605
|
+
const define = table.getBodyColumnDefine(col, row),
|
|
35606
|
+
disableSelect = null == define ? void 0 : define.disableSelect;
|
|
35607
|
+
cellDisable = "function" == typeof disableSelect ? disableSelect(col, row, table) : disableSelect;
|
|
35607
35608
|
}
|
|
35608
35609
|
cellDisable && (selectMode = void 0);
|
|
35609
35610
|
}
|
|
@@ -35622,8 +35623,9 @@
|
|
|
35622
35623
|
}
|
|
35623
35624
|
function isCellDisableSelect(table, col, row) {
|
|
35624
35625
|
const columnDefine = table.getBodyColumnDefine(col, row),
|
|
35625
|
-
isHeader = table.isHeader(col, row)
|
|
35626
|
-
|
|
35626
|
+
isHeader = table.isHeader(col, row),
|
|
35627
|
+
disableSelect = null == columnDefine ? void 0 : columnDefine.disableSelect;
|
|
35628
|
+
return !(!("function" == typeof disableSelect ? disableSelect(col, row, table) : disableSelect) || isHeader) || !(!isHeader || !(null == columnDefine ? void 0 : columnDefine.disableHeaderSelect));
|
|
35627
35629
|
}
|
|
35628
35630
|
|
|
35629
35631
|
var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -38562,13 +38564,25 @@
|
|
|
38562
38564
|
layout = table.internalProps.layoutMap,
|
|
38563
38565
|
columnResizeType = -1 === col ? "all" : table.internalProps.columnResizeType;
|
|
38564
38566
|
if ("column" === columnResizeType) {
|
|
38565
|
-
const columnGroup = scenegraph.getColGroup(col)
|
|
38567
|
+
const columnGroup = scenegraph.getColGroup(col),
|
|
38568
|
+
columnHeaderGroup = scenegraph.getColGroup(col, !0),
|
|
38569
|
+
columnBottomGroup = scenegraph.getColGroupInBottom(col, !0);
|
|
38566
38570
|
if (null == columnGroup || columnGroup.forEachChildren(cellNode => {
|
|
38567
38571
|
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38572
|
+
}), null == columnHeaderGroup || columnHeaderGroup.forEachChildren(cellNode => {
|
|
38573
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38574
|
+
}), null == columnBottomGroup || columnBottomGroup.forEachChildren(cellNode => {
|
|
38575
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38568
38576
|
}), "adaptive" === table.widthMode && col < table.colCount - 1) {
|
|
38569
|
-
const columnGroup = scenegraph.getColGroup(col + 1)
|
|
38577
|
+
const columnGroup = scenegraph.getColGroup(col + 1),
|
|
38578
|
+
columnHeaderGroup = scenegraph.getColGroup(col + 1, !0),
|
|
38579
|
+
columnBottomGroup = scenegraph.getColGroupInBottom(col + 1, !0);
|
|
38570
38580
|
null == columnGroup || columnGroup.forEachChildren(cellNode => {
|
|
38571
38581
|
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38582
|
+
}), null == columnHeaderGroup || columnHeaderGroup.forEachChildren(cellNode => {
|
|
38583
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38584
|
+
}), null == columnBottomGroup || columnBottomGroup.forEachChildren(cellNode => {
|
|
38585
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38572
38586
|
});
|
|
38573
38587
|
}
|
|
38574
38588
|
} else {
|
|
@@ -38590,7 +38604,9 @@
|
|
|
38590
38604
|
startCol = node.startInTotal + table.frozenColCount, endCol = node.startInTotal + table.frozenColCount + node.size - 1;
|
|
38591
38605
|
}
|
|
38592
38606
|
for (let c = startCol; c <= endCol; c++) {
|
|
38593
|
-
const columnGroup = scenegraph.getColGroup(c)
|
|
38607
|
+
const columnGroup = scenegraph.getColGroup(c),
|
|
38608
|
+
columnHeaderGroup = scenegraph.getColGroup(c, !0),
|
|
38609
|
+
columnBottomGroup = scenegraph.getColGroupInBottom(c, !0);
|
|
38594
38610
|
if (columnGroup) {
|
|
38595
38611
|
if ("indicator" === columnResizeType) {
|
|
38596
38612
|
const indicatorKey = layout.getIndicatorKey(c, table.columnHeaderLevelCount);
|
|
@@ -38603,6 +38619,10 @@
|
|
|
38603
38619
|
}
|
|
38604
38620
|
columnGroup.forEachChildren(cellNode => {
|
|
38605
38621
|
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38622
|
+
}), null == columnHeaderGroup || columnHeaderGroup.forEachChildren(cellNode => {
|
|
38623
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38624
|
+
}), null == columnBottomGroup || columnBottomGroup.forEachChildren(cellNode => {
|
|
38625
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38606
38626
|
});
|
|
38607
38627
|
}
|
|
38608
38628
|
}
|
|
@@ -38633,27 +38653,43 @@
|
|
|
38633
38653
|
node = layout.getHeadNodeByRowOrColDimensions(headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length - 1));
|
|
38634
38654
|
startRow = node.startInTotal + table.frozenRowCount, endRow = node.startInTotal + table.frozenRowCount + node.size - 1;
|
|
38635
38655
|
}
|
|
38636
|
-
|
|
38637
|
-
|
|
38638
|
-
|
|
38639
|
-
|
|
38640
|
-
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
}
|
|
38644
|
-
|
|
38645
|
-
|
|
38646
|
-
|
|
38647
|
-
|
|
38648
|
-
|
|
38649
|
-
|
|
38650
|
-
|
|
38656
|
+
const colsRange = [{
|
|
38657
|
+
startCol: scenegraph.proxy.colStart,
|
|
38658
|
+
endCol: scenegraph.proxy.colEnd
|
|
38659
|
+
}];
|
|
38660
|
+
table.frozenColCount && colsRange.push({
|
|
38661
|
+
startCol: 0,
|
|
38662
|
+
endCol: table.frozenColCount - 1
|
|
38663
|
+
}), table.rightFrozenColCount && colsRange.push({
|
|
38664
|
+
startCol: table.colCount - table.rightFrozenColCount,
|
|
38665
|
+
endCol: table.colCount - 1
|
|
38666
|
+
}), colsRange.forEach(_ref => {
|
|
38667
|
+
let {
|
|
38668
|
+
startCol: startCol,
|
|
38669
|
+
endCol: endCol
|
|
38670
|
+
} = _ref;
|
|
38671
|
+
for (let col = startCol; col <= endCol; col++) if ("row" === rowResizeType) {
|
|
38672
|
+
const cellNode = scenegraph.highPerformanceGetCell(col, row);
|
|
38673
|
+
if ("cell" !== cellNode.role) continue;
|
|
38674
|
+
if (updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row)), "adaptive" === table.heightMode && row < table.rowCount - 1) {
|
|
38675
|
+
const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);
|
|
38676
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38651
38677
|
}
|
|
38678
|
+
} else for (let r = startRow; r <= endRow; r++) {
|
|
38679
|
+
if ("indicator" === rowResizeType) {
|
|
38680
|
+
const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);
|
|
38681
|
+
if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) continue;
|
|
38682
|
+
if (layout.indicatorsAsCol) {
|
|
38683
|
+
const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r),
|
|
38684
|
+
headerPath = null == headerPaths ? void 0 : headerPaths.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
|
|
38685
|
+
if (!headerPath || resizeDimensionKey !== headerPath.dimensionKey || resizeDimensionValue !== headerPath.value) continue;
|
|
38686
|
+
}
|
|
38687
|
+
}
|
|
38688
|
+
const cellNode = scenegraph.highPerformanceGetCell(col, r);
|
|
38689
|
+
if ("cell" !== cellNode.role) continue;
|
|
38690
|
+
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38652
38691
|
}
|
|
38653
|
-
|
|
38654
|
-
if ("cell" !== cellNode.role) continue;
|
|
38655
|
-
updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
|
|
38656
|
-
}
|
|
38692
|
+
});
|
|
38657
38693
|
}
|
|
38658
38694
|
function clearChartCacheImage(scenegraph) {
|
|
38659
38695
|
var _a;
|
|
@@ -39304,6 +39340,12 @@
|
|
|
39304
39340
|
return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightTopCornerGroup.getColGroup(col) : !isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightFrozenGroup.getColGroup(col) : isCornerOrColHeader ? this.colHeaderGroup.getColGroup(col) : this.bodyGroup.getColGroup(col), element || void 0;
|
|
39305
39341
|
}
|
|
39306
39342
|
getColGroupInBottom(col) {
|
|
39343
|
+
let isCornerOrColHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
39344
|
+
var _a;
|
|
39345
|
+
if (isCornerOrColHeader) {
|
|
39346
|
+
const element = null !== (_a = this.getColGroupInLeftBottomCorner(col)) && void 0 !== _a ? _a : this.getColGroupInRightBottomCorner(col);
|
|
39347
|
+
if (element) return element;
|
|
39348
|
+
}
|
|
39307
39349
|
if (this.table.bottomFrozenRowCount > 0) return this.bottomFrozenGroup.getColGroup(col);
|
|
39308
39350
|
}
|
|
39309
39351
|
getColGroupInLeftBottomCorner(col) {
|
|
@@ -40023,7 +40065,7 @@
|
|
|
40023
40065
|
let makeSelectCellVisible = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
40024
40066
|
let skipBodyMerge = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : !1;
|
|
40025
40067
|
let forceSelect = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : !1;
|
|
40026
|
-
var _a, _b;
|
|
40068
|
+
var _a, _b, _c, _d;
|
|
40027
40069
|
const {
|
|
40028
40070
|
table: table,
|
|
40029
40071
|
interactionState: interactionState
|
|
@@ -40035,8 +40077,10 @@
|
|
|
40035
40077
|
highlightScope: highlightScope,
|
|
40036
40078
|
disableHeader: disableHeader,
|
|
40037
40079
|
cellPos: cellPos
|
|
40038
|
-
} = state.select
|
|
40039
|
-
|
|
40080
|
+
} = state.select,
|
|
40081
|
+
disableSelect = null === (_b = null === (_a = table.options) || void 0 === _a ? void 0 : _a.select) || void 0 === _b ? void 0 : _b.disableSelect,
|
|
40082
|
+
cellDisable = "function" == typeof disableSelect ? disableSelect(col, row, table) : disableSelect;
|
|
40083
|
+
if ((disableHeader && table.isHeader(col, row) || "none" === highlightScope || cellDisable) && !1 === forceSelect && (-1 !== col && -1 !== row && makeSelectCellVisible && table._makeVisibleCell(col, row), col = -1, row = -1), -1 !== col && -1 !== row && makeSelectCellVisible) if (interactionState === InteractionState.grabing && state.select.ranges.length > 0) {
|
|
40040
40084
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
40041
40085
|
col > currentRange.start.col && col > currentRange.end.col && table._makeVisibleCell(col + 1, row), row > currentRange.start.row && row > currentRange.end.row && table._makeVisibleCell(col, row + 1), col < currentRange.start.col && col < currentRange.end.col && table._makeVisibleCell(col - 1, row), row < currentRange.start.row && row < currentRange.end.row && table._makeVisibleCell(col, row - 1);
|
|
40042
40086
|
} else table._makeVisibleCell(col, row);
|
|
@@ -40047,7 +40091,7 @@
|
|
|
40047
40091
|
const {
|
|
40048
40092
|
disableHeaderSelect: disableHeaderSelect,
|
|
40049
40093
|
disableRowSeriesNumberSelect: disableRowSeriesNumberSelect
|
|
40050
|
-
} = (null === (
|
|
40094
|
+
} = (null === (_c = table.options.keyboardOptions) || void 0 === _c ? void 0 : _c.selectAllOnCtrlA) || {};
|
|
40051
40095
|
disableHeaderSelect && (_startCol = table.rowHeaderLevelCount, _startRow = table.columnHeaderLevelCount), (disableRowSeriesNumberSelect || disableHeaderSelect && table.transpose) && table.options.rowSeriesNumber && (_startCol += 1), state.select.ranges.push({
|
|
40052
40096
|
start: {
|
|
40053
40097
|
col: _startCol,
|
|
@@ -40316,7 +40360,7 @@
|
|
|
40316
40360
|
});
|
|
40317
40361
|
}
|
|
40318
40362
|
cellPos.col = col, cellPos.row = row;
|
|
40319
|
-
const currentRange = null === (
|
|
40363
|
+
const currentRange = null === (_d = state.select.ranges) || void 0 === _d ? void 0 : _d[state.select.ranges.length - 1];
|
|
40320
40364
|
currentRange && scenegraph.updateCellSelectBorder(currentRange, extendSelectRange);
|
|
40321
40365
|
}
|
|
40322
40366
|
}
|
|
@@ -40777,7 +40821,7 @@
|
|
|
40777
40821
|
for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
|
|
40778
40822
|
isNeedInitHeaderCheckedStateFromRecord = !0;
|
|
40779
40823
|
}
|
|
40780
|
-
isNeedInitHeaderCheckedStateFromRecord && records.forEach((record, index) => {
|
|
40824
|
+
isNeedInitHeaderCheckedStateFromRecord && (null == records || records.forEach((record, index) => {
|
|
40781
40825
|
state._checkboxCellTypeFields.forEach(field => {
|
|
40782
40826
|
const value = record[field];
|
|
40783
40827
|
let isChecked;
|
|
@@ -40796,7 +40840,7 @@
|
|
|
40796
40840
|
}
|
|
40797
40841
|
state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
|
|
40798
40842
|
});
|
|
40799
|
-
});
|
|
40843
|
+
}));
|
|
40800
40844
|
}
|
|
40801
40845
|
function updateHeaderCheckedState(field, state, col, row) {
|
|
40802
40846
|
const allChecked = state.checkedState.every((check_state, index) => {
|
|
@@ -41110,7 +41154,7 @@
|
|
|
41110
41154
|
highlightMode: "cell",
|
|
41111
41155
|
highlightInRange: !1
|
|
41112
41156
|
}, this.table.options.select);
|
|
41113
|
-
this.select.highlightScope = 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.highlightInRange = highlightInRange;
|
|
41157
|
+
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.highlightInRange = highlightInRange;
|
|
41114
41158
|
}
|
|
41115
41159
|
isSelected(col, row) {
|
|
41116
41160
|
let seled = !1;
|
|
@@ -42948,16 +42992,18 @@
|
|
|
42948
42992
|
} = eventArgsSet;
|
|
42949
42993
|
if (eventArgs) {
|
|
42950
42994
|
if ("checkbox" === eventArgs.target.name || "radio" === eventArgs.target.name) return !1;
|
|
42951
|
-
const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row)
|
|
42995
|
+
const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row),
|
|
42996
|
+
disableSelect = null == define ? void 0 : define.disableSelect,
|
|
42997
|
+
cellDisable = "function" == typeof disableSelect ? disableSelect(eventArgs.col, eventArgs.row, this.table) : disableSelect;
|
|
42952
42998
|
if (this.table.isHeader(eventArgs.col, eventArgs.row) && ((null == define ? void 0 : define.disableHeaderSelect) || (null === (_a = this.table.stateManager.select) || void 0 === _a ? void 0 : _a.disableHeader))) return isSelectMoving || this.table.stateManager.updateSelectPos(-1, -1), !1;
|
|
42953
|
-
if (!this.table.isHeader(eventArgs.col, eventArgs.row) &&
|
|
42999
|
+
if (!this.table.isHeader(eventArgs.col, eventArgs.row) && cellDisable) {
|
|
42954
43000
|
if (!isSelectMoving) {
|
|
42955
43001
|
const isHasSelected = !!(null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
|
|
42956
43002
|
this.table.stateManager.updateSelectPos(-1, -1), isHasSelected && this.table.stateManager.endSelectCells(!0, isHasSelected);
|
|
42957
43003
|
}
|
|
42958
43004
|
return !1;
|
|
42959
43005
|
}
|
|
42960
|
-
return !this.table.isPivotChart() || "axis-label" !== (null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target.name) && "chart" !== (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type) ? (this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey, !1, null === (_f = null === (_e = this.table.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f), !0) : (this.table.stateManager.updateSelectPos(-1, -1), !1);
|
|
43006
|
+
return !this.table.isPivotChart() || "axis-label" !== (null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target.name) && "chart" !== (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type) ? (this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey, !1, !isSelectMoving && (null === (_f = null === (_e = this.table.options.select) || void 0 === _e ? void 0 : _e.makeSelectCellVisible) || void 0 === _f || _f)), !0) : (this.table.stateManager.updateSelectPos(-1, -1), !1);
|
|
42961
43007
|
}
|
|
42962
43008
|
return !1;
|
|
42963
43009
|
}
|
|
@@ -44426,7 +44472,7 @@
|
|
|
44426
44472
|
style: customStyle
|
|
44427
44473
|
}, this.customCellStyleArrangement.forEach(cellStyle => {
|
|
44428
44474
|
const cellPos = cellStyle.cellPosition;
|
|
44429
|
-
if (cellStyle.customStyleId === customStyleId) if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) this.table.scenegraph.updateCellContent(col, row);else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
|
|
44475
|
+
if (cellStyle.customStyleId === customStyleId) if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) this.table.scenegraph.updateCellContent(col, row);else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
|
|
44430
44476
|
}), this.table.scenegraph.updateNextFrame();
|
|
44431
44477
|
}
|
|
44432
44478
|
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
@@ -44443,7 +44489,7 @@
|
|
|
44443
44489
|
if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
|
|
44444
44490
|
customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
|
|
44445
44491
|
}
|
|
44446
|
-
if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {
|
|
44492
|
+
if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
|
|
44447
44493
|
const range = this.table.getCellRange(col, row);
|
|
44448
44494
|
for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
|
|
44449
44495
|
} else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
|
|
@@ -45527,7 +45573,7 @@
|
|
|
45527
45573
|
constructor(container) {
|
|
45528
45574
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
45529
45575
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45530
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.11.3
|
|
45576
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.11.3", 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");
|
|
45531
45577
|
const {
|
|
45532
45578
|
frozenColCount = 0,
|
|
45533
45579
|
frozenRowCount: frozenRowCount,
|
|
@@ -46745,7 +46791,9 @@
|
|
|
46745
46791
|
}
|
|
46746
46792
|
_canDragHeaderPosition(col, row) {
|
|
46747
46793
|
var _a, _b, _c;
|
|
46748
|
-
|
|
46794
|
+
const disableSelect = null === (_a = this.options.select) || void 0 === _a ? void 0 : _a.disableSelect,
|
|
46795
|
+
cellDisable = "function" == typeof disableSelect ? disableSelect(col, row, this) : disableSelect;
|
|
46796
|
+
if (this.isHeader(col, row) && (this.stateManager.isSelected(col, row) || "body" === (null === (_b = this.options.select) || void 0 === _b ? void 0 : _b.headerSelectMode) && checkCellInSelect(col, row, [this.getCellRange(this.stateManager.select.cellPos.col, this.stateManager.select.cellPos.row)]) || (null === (_c = this.options.select) || void 0 === _c ? void 0 : _c.disableHeaderSelect) || cellDisable)) {
|
|
46749
46797
|
if ("disabled" === this.internalProps.frozenColDragHeaderMode && this.isFrozenColumn(col)) return !1;
|
|
46750
46798
|
if (this.stateManager.isSelected(col, row)) {
|
|
46751
46799
|
const selectRange = this.stateManager.select.ranges[0];
|
|
@@ -49258,7 +49306,7 @@
|
|
|
49258
49306
|
|
|
49259
49307
|
class ListTable extends BaseTable {
|
|
49260
49308
|
constructor(container, options) {
|
|
49261
|
-
var _a, _b, _c, _d;
|
|
49309
|
+
var _a, _b, _c, _d, _e, _f;
|
|
49262
49310
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
|
|
49263
49311
|
const internalProps = this.internalProps;
|
|
49264
49312
|
if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : isValid$1(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, "node" !== Env.mode && (this.editorManager = new EditManeger(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
|
|
@@ -49267,9 +49315,9 @@
|
|
|
49267
49315
|
const Title = Factory.getComponent("title");
|
|
49268
49316
|
internalProps.title = new Title(options.title, this), this.scenegraph.resize();
|
|
49269
49317
|
}
|
|
49270
|
-
if (this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible();else {
|
|
49318
|
+
if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_e = this.internalProps.emptyTip) || void 0 === _e || _e.resetVisible();else {
|
|
49271
49319
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
49272
|
-
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
|
|
49320
|
+
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_f = this.internalProps.emptyTip) || void 0 === _f || _f.resetVisible();
|
|
49273
49321
|
}
|
|
49274
49322
|
if (options.enableTreeStickCell) {
|
|
49275
49323
|
const ListTreeStickCellPlugin = Factory.getComponent("listTreeStickCellPlugin");
|
|
@@ -49473,7 +49521,7 @@
|
|
|
49473
49521
|
return ifCan;
|
|
49474
49522
|
}
|
|
49475
49523
|
updateOption(options) {
|
|
49476
|
-
var _a, _b, _c, _d;
|
|
49524
|
+
var _a, _b, _c, _d, _e, _f;
|
|
49477
49525
|
const internalProps = this.internalProps;
|
|
49478
49526
|
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_c = null !== (_b = options.enableTreeNodeMerge) && void 0 !== _b ? _b : isValid$1(options.groupBy)) && void 0 !== _c && _c, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
|
|
49479
49527
|
var _a;
|
|
@@ -49484,9 +49532,9 @@
|
|
|
49484
49532
|
const Title = Factory.getComponent("title");
|
|
49485
49533
|
internalProps.title = new Title(options.title, this), this.scenegraph.resize();
|
|
49486
49534
|
}
|
|
49487
|
-
if (this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible();else {
|
|
49535
|
+
if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_e = this.internalProps.emptyTip) || void 0 === _e || _e.resetVisible();else {
|
|
49488
49536
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
49489
|
-
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
|
|
49537
|
+
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_f = this.internalProps.emptyTip) || void 0 === _f || _f.resetVisible();
|
|
49490
49538
|
}
|
|
49491
49539
|
return new Promise(resolve => {
|
|
49492
49540
|
setTimeout(resolve, 0);
|
|
@@ -49709,7 +49757,7 @@
|
|
|
49709
49757
|
setCellRadioState(col, row, index, this);
|
|
49710
49758
|
}
|
|
49711
49759
|
setRecords(records, option) {
|
|
49712
|
-
var _a, _b;
|
|
49760
|
+
var _a, _b, _c, _d;
|
|
49713
49761
|
let sort;
|
|
49714
49762
|
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);
|
|
49715
49763
|
"undefined" != typeof window && window.performance.now();
|
|
@@ -49732,9 +49780,9 @@
|
|
|
49732
49780
|
}
|
|
49733
49781
|
this.refreshRowColCount();
|
|
49734
49782
|
} else _setRecords(this, records);
|
|
49735
|
-
if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(), this.internalProps.title.resize(), this.scenegraph.resize()), this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible();else {
|
|
49783
|
+
if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(), this.internalProps.title.resize(), this.scenegraph.resize()), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
|
|
49736
49784
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
49737
|
-
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
|
|
49785
|
+
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();
|
|
49738
49786
|
}
|
|
49739
49787
|
this.render(), isValid$1(oldHoverState.col) && isValid$1(oldHoverState.row) && oldHoverState.col >= 0 && oldHoverState.row >= 0 && setTimeout(() => {
|
|
49740
49788
|
var _a;
|
|
@@ -49800,13 +49848,16 @@
|
|
|
49800
49848
|
return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, this);
|
|
49801
49849
|
}
|
|
49802
49850
|
addRecord(record, recordIndex) {
|
|
49803
|
-
|
|
49851
|
+
var _a;
|
|
49852
|
+
listTableAddRecord(record, recordIndex, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
|
|
49804
49853
|
}
|
|
49805
49854
|
addRecords(records, recordIndex) {
|
|
49806
|
-
|
|
49855
|
+
var _a;
|
|
49856
|
+
listTableAddRecords(records, recordIndex, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
|
|
49807
49857
|
}
|
|
49808
49858
|
deleteRecords(recordIndexs) {
|
|
49809
|
-
|
|
49859
|
+
var _a;
|
|
49860
|
+
listTableDeleteRecords(recordIndexs, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
|
|
49810
49861
|
}
|
|
49811
49862
|
updateRecords(records, recordIndexs) {
|
|
49812
49863
|
listTableUpdateRecords(records, recordIndexs, this);
|