@visactor/vtable-calendar 1.13.2-alpha.0 → 1.13.3-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 +119 -67
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -28557,8 +28557,6 @@
|
|
|
28557
28557
|
const DEFAULTBORDERLINEDASH = [];
|
|
28558
28558
|
const DEFAULTFONTCOLOR = "#000";
|
|
28559
28559
|
const regUrl = /^(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/;
|
|
28560
|
-
const ResizeColumnHotSpotSize = 16;
|
|
28561
|
-
const ResizeRowHotSpotSize = 16;
|
|
28562
28560
|
const IndicatorDimensionKeyPlaceholder = "$$indicator$$";
|
|
28563
28561
|
const DrillDown = '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><rect x="0" y="0" width="1024" height="1024" rx="20%" ry="20%" fill="#ffffff" /><path d="M810.666667 85.333333c70.688 0 128 57.312 128 128v597.333334c0 70.688-57.312 128-128 128H213.333333c-70.688 0-128-57.312-128-128V213.333333c0-70.688 57.312-128 128-128h597.333334z m0 85.333334H213.333333a42.666667 42.666667 0 0 0-42.613333 40.533333L170.666667 213.333333v597.333334a42.666667 42.666667 0 0 0 40.533333 42.613333L213.333333 853.333333h597.333334a42.666667 42.666667 0 0 0 42.613333-40.533333L853.333333 810.666667V213.333333a42.666667 42.666667 0 0 0-40.533333-42.613333L810.666667 170.666667zM549.333333 288a5.333333 5.333333 0 0 1 5.333334 5.333333V469.333333h176a5.333333 5.333333 0 0 1 5.333333 5.333334v74.666666a5.333333 5.333333 0 0 1-5.333333 5.333334H554.666667v176a5.333333 5.333333 0 0 1-5.333334 5.333333h-74.666666a5.333333 5.333333 0 0 1-5.333334-5.333333V554.666667H293.333333a5.333333 5.333333 0 0 1-5.333333-5.333334v-74.666666a5.333333 5.333333 0 0 1 5.333333-5.333334H469.333333V293.333333a5.333333 5.333333 0 0 1 5.333334-5.333333h74.666666z"></path></svg>';
|
|
28564
28562
|
const DrillUp = '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><rect x="0" y="0" width="1024" height="1024" rx="20%" ry="20%" fill="#ffffff" /><path d="M810.666667 85.333333c70.688 0 128 57.312 128 128v597.333334c0 70.688-57.312 128-128 128H213.333333c-70.688 0-128-57.312-128-128V213.333333c0-70.688 57.312-128 128-128h597.333334z m0 85.333334H213.333333a42.666667 42.666667 0 0 0-42.613333 40.533333L170.666667 213.333333v597.333334a42.666667 42.666667 0 0 0 40.533333 42.613333L213.333333 853.333333h597.333334a42.666667 42.666667 0 0 0 42.613333-40.533333L853.333333 810.666667V213.333333a42.666667 42.666667 0 0 0-40.533333-42.613333L810.666667 170.666667zM693.333333 469.333333a42.666667 42.666667 0 1 1 0 85.333334H330.666667a42.666667 42.666667 0 1 1 0-85.333334h362.666666z"></path></svg>';
|
|
@@ -29071,6 +29069,10 @@
|
|
|
29071
29069
|
var _a;
|
|
29072
29070
|
return null !== (_a = columnResize.width) && void 0 !== _a ? _a : columnResize.lineWidth + 2;
|
|
29073
29071
|
},
|
|
29072
|
+
get resizeHotSpotSize() {
|
|
29073
|
+
var _a;
|
|
29074
|
+
return null !== (_a = columnResize.resizeHotSpotSize) && void 0 !== _a ? _a : 16;
|
|
29075
|
+
},
|
|
29074
29076
|
get labelColor() {
|
|
29075
29077
|
var _a;
|
|
29076
29078
|
return null !== (_a = columnResize.labelColor) && void 0 !== _a ? _a : "#FFF";
|
|
@@ -32501,6 +32503,24 @@
|
|
|
32501
32503
|
cursor: "pointer"
|
|
32502
32504
|
};
|
|
32503
32505
|
},
|
|
32506
|
+
get loading() {
|
|
32507
|
+
return {
|
|
32508
|
+
type: "image",
|
|
32509
|
+
src: "https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/media/loading-circle.gif",
|
|
32510
|
+
width: collapse_size,
|
|
32511
|
+
height: collapse_size,
|
|
32512
|
+
name: "loading",
|
|
32513
|
+
positionType: IconPosition.contentLeft,
|
|
32514
|
+
marginLeft: 0,
|
|
32515
|
+
marginRight: 4,
|
|
32516
|
+
hover: {
|
|
32517
|
+
width: collapse_size_2,
|
|
32518
|
+
height: collapse_size_2,
|
|
32519
|
+
bgColor: "rgba(101, 117, 168, 0.1)"
|
|
32520
|
+
},
|
|
32521
|
+
isGif: !0
|
|
32522
|
+
};
|
|
32523
|
+
},
|
|
32504
32524
|
get drillDown() {
|
|
32505
32525
|
return {
|
|
32506
32526
|
name: "drillDown",
|
|
@@ -40526,7 +40546,7 @@
|
|
|
40526
40546
|
createFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, this.bodyGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.rowHeaderGroup, this.isPivot || this.table.internalProps.transpose ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
|
|
40527
40547
|
}
|
|
40528
40548
|
getResizeColAt(abstractX, abstractY, cellGroup) {
|
|
40529
|
-
|
|
40549
|
+
const offset = this.table.theme.columnResize.resizeHotSpotSize / 2;
|
|
40530
40550
|
let cell;
|
|
40531
40551
|
if (!cellGroup) {
|
|
40532
40552
|
const drawRange = this.table.getDrawRange();
|
|
@@ -40552,7 +40572,7 @@
|
|
|
40552
40572
|
};
|
|
40553
40573
|
}
|
|
40554
40574
|
getResizeRowAt(abstractX, abstractY, cellGroup) {
|
|
40555
|
-
|
|
40575
|
+
const offset = this.table.theme.columnResize.resizeHotSpotSize / 2;
|
|
40556
40576
|
if (cellGroup) {
|
|
40557
40577
|
let cell;
|
|
40558
40578
|
if (abstractY < cellGroup.globalAABBBounds.y1 + offset ? cell = {
|
|
@@ -41524,8 +41544,10 @@
|
|
|
41524
41544
|
function setCheckedState(col, row, field, checked, state) {
|
|
41525
41545
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
41526
41546
|
if (recordIndex >= 0) {
|
|
41527
|
-
const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
|
|
41528
|
-
state.checkedState
|
|
41547
|
+
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
41548
|
+
state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
|
|
41549
|
+
[field]: checked
|
|
41550
|
+
});
|
|
41529
41551
|
}
|
|
41530
41552
|
}
|
|
41531
41553
|
function setHeaderCheckedState(field, checked, state) {
|
|
@@ -41539,21 +41561,23 @@
|
|
|
41539
41561
|
if (state.table.isHeader(col, row)) {
|
|
41540
41562
|
if (isValid$1(state.headerCheckedState[field])) return state.headerCheckedState[field];
|
|
41541
41563
|
if ("function" == typeof checked) return;
|
|
41542
|
-
if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.
|
|
41564
|
+
if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.size) > 0) {
|
|
41543
41565
|
return state.updateHeaderCheckedState(field, col, row);
|
|
41544
41566
|
}
|
|
41545
41567
|
return state.headerCheckedState[field];
|
|
41546
41568
|
}
|
|
41547
41569
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
41548
41570
|
if (recordIndex >= 0) {
|
|
41549
|
-
const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
|
|
41550
|
-
if (isValid$1(null === (_b = state.checkedState
|
|
41551
|
-
state.checkedState
|
|
41571
|
+
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
41572
|
+
if (isValid$1(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
|
|
41573
|
+
state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
|
|
41574
|
+
[field]: checked
|
|
41575
|
+
});
|
|
41552
41576
|
}
|
|
41553
41577
|
return checked;
|
|
41554
41578
|
}
|
|
41555
41579
|
function initCheckedState(records, state) {
|
|
41556
|
-
state.checkedState
|
|
41580
|
+
state.checkedState.clear(), state.headerCheckedState = {}, state.radioState = {};
|
|
41557
41581
|
let isNeedInitHeaderCheckedStateFromRecord = !1;
|
|
41558
41582
|
if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
|
|
41559
41583
|
if ("checkbox" === hd.headerType) {
|
|
@@ -41564,46 +41588,29 @@
|
|
|
41564
41588
|
for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
|
|
41565
41589
|
isNeedInitHeaderCheckedStateFromRecord = !0;
|
|
41566
41590
|
}
|
|
41567
|
-
isNeedInitHeaderCheckedStateFromRecord && (
|
|
41568
|
-
state._checkboxCellTypeFields.forEach(field => {
|
|
41569
|
-
const value = record[field];
|
|
41570
|
-
let isChecked;
|
|
41571
|
-
if (isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value), null == isChecked) {
|
|
41572
|
-
const headerCheckFunc = state._headerCheckFuncs[field];
|
|
41573
|
-
if (headerCheckFunc) {
|
|
41574
|
-
const cellAddr = state.table.getCellAddrByFieldRecord(field, index);
|
|
41575
|
-
isChecked = getOrApply(headerCheckFunc, {
|
|
41576
|
-
col: cellAddr.col,
|
|
41577
|
-
row: cellAddr.row,
|
|
41578
|
-
table: state.table,
|
|
41579
|
-
context: null,
|
|
41580
|
-
value: value
|
|
41581
|
-
});
|
|
41582
|
-
}
|
|
41583
|
-
}
|
|
41584
|
-
state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
|
|
41585
|
-
});
|
|
41586
|
-
}));
|
|
41591
|
+
isNeedInitHeaderCheckedStateFromRecord && initRecordCheckState(state);
|
|
41587
41592
|
}
|
|
41588
41593
|
function updateHeaderCheckedState(field, state, col, row) {
|
|
41589
|
-
|
|
41590
|
-
|
|
41591
|
-
|
|
41592
|
-
|
|
41593
|
-
|
|
41594
|
-
|
|
41595
|
-
|
|
41596
|
-
|
|
41597
|
-
|
|
41598
|
-
|
|
41594
|
+
let allChecked = !0,
|
|
41595
|
+
allUnChecked = !0,
|
|
41596
|
+
hasChecked = !1;
|
|
41597
|
+
return state.checkedState.forEach((check_state, index) => {
|
|
41598
|
+
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
41599
|
+
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
41600
|
+
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
41601
|
+
data = state.table.dataSource.get(index);
|
|
41602
|
+
mergeCell || data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
41603
|
+
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
41599
41604
|
}
|
|
41600
41605
|
function initLeftRecordsCheckState(records, state) {
|
|
41601
|
-
for (let index = state.checkedState.
|
|
41606
|
+
for (let index = state.checkedState.size; index < records.length; index++) {
|
|
41602
41607
|
const record = records[index];
|
|
41603
41608
|
state._checkboxCellTypeFields.forEach(field => {
|
|
41604
41609
|
const value = record[field];
|
|
41605
41610
|
let isChecked;
|
|
41606
|
-
isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value)
|
|
41611
|
+
isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value);
|
|
41612
|
+
const dataIndex = index.toString();
|
|
41613
|
+
state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
|
|
41607
41614
|
});
|
|
41608
41615
|
}
|
|
41609
41616
|
}
|
|
@@ -41636,14 +41643,35 @@
|
|
|
41636
41643
|
checkedState: checkedState,
|
|
41637
41644
|
table: table
|
|
41638
41645
|
} = state;
|
|
41639
|
-
|
|
41640
|
-
|
|
41641
|
-
|
|
41642
|
-
|
|
41646
|
+
let source, target;
|
|
41647
|
+
if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.getRecordIndexByCell(0, sourceIndex), target = table.getRecordIndexByCell(0, targetIndex)), isNumber$2(source) && isNumber$2(target)) {
|
|
41648
|
+
if (sourceIndex > targetIndex) {
|
|
41649
|
+
const sourceRecord = checkedState.get(sourceIndex.toString());
|
|
41650
|
+
for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
|
|
41651
|
+
checkedState.set(targetIndex.toString(), sourceRecord);
|
|
41652
|
+
} else if (sourceIndex < targetIndex) {
|
|
41653
|
+
const sourceRecord = checkedState.get(sourceIndex.toString());
|
|
41654
|
+
for (let i = sourceIndex; i < targetIndex; i++) checkedState.set(i.toString(), checkedState.get((i + 1).toString()));
|
|
41655
|
+
checkedState.set(targetIndex.toString(), sourceRecord);
|
|
41656
|
+
}
|
|
41657
|
+
} else if (isArray$1(source) && isArray$1(target)) if ((sourceIndex = source[source.length - 1]) > (targetIndex = target[target.length - 1])) {
|
|
41658
|
+
const sourceRecord = checkedState.get(source.toString());
|
|
41659
|
+
for (let i = sourceIndex; i > targetIndex; i--) {
|
|
41660
|
+
const now = [...source];
|
|
41661
|
+
now[now.length - 1] = i;
|
|
41662
|
+
const last = [...source];
|
|
41663
|
+
last[last.length - 1] = i - 1, checkedState.set(now.toString(), checkedState.get(last.toString()));
|
|
41664
|
+
}
|
|
41665
|
+
checkedState.set(target.toString(), sourceRecord);
|
|
41643
41666
|
} else if (sourceIndex < targetIndex) {
|
|
41644
|
-
const sourceRecord = checkedState
|
|
41645
|
-
for (let i = sourceIndex; i < targetIndex; i++)
|
|
41646
|
-
|
|
41667
|
+
const sourceRecord = checkedState.get(source.toString());
|
|
41668
|
+
for (let i = sourceIndex; i < targetIndex; i++) {
|
|
41669
|
+
const now = [...source];
|
|
41670
|
+
now[now.length - 1] = i;
|
|
41671
|
+
const next = [...source];
|
|
41672
|
+
next[next.length - 1] = i + 1, checkedState.set(now.toString(), checkedState.get(next.toString()));
|
|
41673
|
+
}
|
|
41674
|
+
checkedState.set(target.toString(), sourceRecord);
|
|
41647
41675
|
}
|
|
41648
41676
|
}
|
|
41649
41677
|
function getGroupCheckboxState(table) {
|
|
@@ -41655,10 +41683,37 @@
|
|
|
41655
41683
|
const {
|
|
41656
41684
|
vtableOriginIndex: vtableOriginIndex
|
|
41657
41685
|
} = dataSource.getRawRecord(indexArr);
|
|
41658
|
-
result[vtableOriginIndex] = table.stateManager.checkedState
|
|
41686
|
+
result[vtableOriginIndex] = table.stateManager.checkedState.get(indexArr.toString());
|
|
41659
41687
|
}
|
|
41660
41688
|
}), result;
|
|
41661
41689
|
}
|
|
41690
|
+
function initRecordCheckState(state) {
|
|
41691
|
+
const table = state.table,
|
|
41692
|
+
start = table.internalProps.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
|
|
41693
|
+
end = table.internalProps.transpose ? table.colCount : table.rowCount;
|
|
41694
|
+
for (let index = 0; index + start < end; index++) {
|
|
41695
|
+
const record = table.dataSource.get(index);
|
|
41696
|
+
state._checkboxCellTypeFields.forEach(field => {
|
|
41697
|
+
const value = record[field];
|
|
41698
|
+
let isChecked;
|
|
41699
|
+
if (isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value), null == isChecked) {
|
|
41700
|
+
const headerCheckFunc = state._headerCheckFuncs[field];
|
|
41701
|
+
if (headerCheckFunc) {
|
|
41702
|
+
const cellAddr = state.table.getCellAddrByFieldRecord(field, index);
|
|
41703
|
+
isChecked = getOrApply(headerCheckFunc, {
|
|
41704
|
+
col: cellAddr.col,
|
|
41705
|
+
row: cellAddr.row,
|
|
41706
|
+
table: state.table,
|
|
41707
|
+
context: null,
|
|
41708
|
+
value: value
|
|
41709
|
+
});
|
|
41710
|
+
}
|
|
41711
|
+
}
|
|
41712
|
+
const dataIndex = state.table.dataSource.getIndexKey(index).toString();
|
|
41713
|
+
state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
|
|
41714
|
+
});
|
|
41715
|
+
}
|
|
41716
|
+
}
|
|
41662
41717
|
|
|
41663
41718
|
function updateResizeRow(xInTable, yInTable, state) {
|
|
41664
41719
|
xInTable = Math.ceil(xInTable), yInTable = Math.ceil(yInTable);
|
|
@@ -41746,7 +41801,7 @@
|
|
|
41746
41801
|
|
|
41747
41802
|
class StateManager {
|
|
41748
41803
|
constructor(table) {
|
|
41749
|
-
this.fastScrolling = !1, this.checkedState =
|
|
41804
|
+
this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
|
|
41750
41805
|
this.updateInteractionState(null != state ? state : InteractionState.default);
|
|
41751
41806
|
}, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
|
|
41752
41807
|
}
|
|
@@ -42031,10 +42086,7 @@
|
|
|
42031
42086
|
}, 0), this.table.scenegraph.updateChartSizeForResizeColWidth(this.columnResize.col), this.checkFrozen(), this.table.scenegraph.component.hideResizeCol(), this.table.scenegraph.updateNextFrame();
|
|
42032
42087
|
}
|
|
42033
42088
|
startResizeCol(col, x, y, isRightFrozen) {
|
|
42034
|
-
|
|
42035
|
-
this.columnResize.resizing = !0, this.columnResize.col = col, this.columnResize.x = x, this.columnResize.isRightFrozen = isRightFrozen, this.table.scenegraph.component.showResizeCol(col, y, isRightFrozen);
|
|
42036
|
-
const isHasSelected = !!(null === (_a = this.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
42037
|
-
this.updateSelectPos(-1, -1), this.endSelectCells(!0, isHasSelected), this.table.scenegraph.updateNextFrame();
|
|
42089
|
+
this.columnResize.resizing = !0, this.columnResize.col = col, this.columnResize.x = x, this.columnResize.isRightFrozen = isRightFrozen, this.table.scenegraph.component.showResizeCol(col, y, isRightFrozen), this.table.scenegraph.updateNextFrame();
|
|
42038
42090
|
}
|
|
42039
42091
|
updateResizeCol(xInTable, yInTable) {
|
|
42040
42092
|
updateResizeColumn(xInTable, yInTable, this);
|
|
@@ -42429,7 +42481,7 @@
|
|
|
42429
42481
|
return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
|
|
42430
42482
|
}
|
|
42431
42483
|
changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
|
|
42432
|
-
this.checkedState.
|
|
42484
|
+
this.checkedState.size && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
|
|
42433
42485
|
}
|
|
42434
42486
|
setCustomSelectRanges(customSelectRanges) {
|
|
42435
42487
|
deletaCustomSelectRanges(this), addCustomSelectRanges(customSelectRanges, this);
|
|
@@ -42667,7 +42719,7 @@
|
|
|
42667
42719
|
event: e.nativeEvent,
|
|
42668
42720
|
target: null === (_e = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.target,
|
|
42669
42721
|
mergeCellInfo: null === (_f = eventArgsSet.eventArgs) || void 0 === _f ? void 0 : _f.mergeInfo
|
|
42670
|
-
}), stateManager.interactionState === InteractionState.grabing && !(null === (_g = table.editorManager) || void 0 === _g ? void 0 : _g.editingEditor)) return void (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1 && (stateManager.isResizeCol() || (stateManager.isMoveCol() ? eventManager.dealColumnMover(eventArgsSet) : stateManager.isFillHandle() ? eventManager.dealFillSelect(eventArgsSet, !0) : (null === (_h = table.options.select) || void 0 === _h ? void 0 : _h.disableDragSelect) || eventManager.dealTableSelect(eventArgsSet, !0))));
|
|
42722
|
+
}), stateManager.interactionState === InteractionState.grabing && !(null === (_g = table.editorManager) || void 0 === _g ? void 0 : _g.editingEditor)) return void (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1 && (stateManager.isResizeCol() || stateManager.isResizeRow() || (stateManager.isMoveCol() ? eventManager.dealColumnMover(eventArgsSet) : stateManager.isFillHandle() ? eventManager.dealFillSelect(eventArgsSet, !0) : (null === (_h = table.options.select) || void 0 === _h ? void 0 : _h.disableDragSelect) || eventManager.dealTableSelect(eventArgsSet, !0))));
|
|
42671
42723
|
!(null === (_j = table.options.select) || void 0 === _j ? void 0 : _j.disableDragSelect) && table.eventManager.isDraging && stateManager.isSelecting() && !(null === (_k = table.editorManager) || void 0 === _k ? void 0 : _k.editingEditor) && eventManager.dealTableSelect(eventArgsSet, !0);
|
|
42672
42724
|
const cellGoup = e.path.find(node => "cell" === node.role);
|
|
42673
42725
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && (-1 === table.stateManager.hover.cellPos.col || -1 === table.stateManager.hover.cellPos.row || (null == cellGoup ? void 0 : cellGoup.col) === table.stateManager.hover.cellPos.col && (null == cellGoup ? void 0 : cellGoup.row) === table.stateManager.hover.cellPos.row || table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
@@ -42752,7 +42804,7 @@
|
|
|
42752
42804
|
event: e.nativeEvent
|
|
42753
42805
|
});
|
|
42754
42806
|
}), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
|
|
42755
|
-
stateManager.isResizeCol() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor()), (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideHorizontalScrollBar(), (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && -1 !== table.stateManager.hover.cellPos.col && -1 !== table.stateManager.hover.cellPos.row && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
42807
|
+
stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor()), (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideHorizontalScrollBar(), (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && -1 !== table.stateManager.hover.cellPos.col && -1 !== table.stateManager.hover.cellPos.row && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
42756
42808
|
col: table.stateManager.hover.cellPos.col,
|
|
42757
42809
|
row: table.stateManager.hover.cellPos.row,
|
|
42758
42810
|
cellRange: table.getCellRangeRelativeRect({
|
|
@@ -42955,14 +43007,14 @@
|
|
|
42955
43007
|
eventArgs: eventArgs
|
|
42956
43008
|
} = eventArgsSet;
|
|
42957
43009
|
if (!(null == eventArgs ? void 0 : eventArgs.targetCell)) {
|
|
42958
|
-
table.getCellAt(eventArgsSet.abstractPos.x -
|
|
43010
|
+
table.getCellAt(eventArgsSet.abstractPos.x - table.theme.columnResize.resizeHotSpotSize / 2, eventArgsSet.abstractPos.y) && table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE) && table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
42959
43011
|
event: e.nativeEvent
|
|
42960
43012
|
});
|
|
42961
43013
|
}
|
|
42962
43014
|
}
|
|
42963
43015
|
});
|
|
42964
43016
|
}), table.scenegraph.stage.addEventListener("pointerup", e => {
|
|
42965
|
-
"grabing" === stateManager.interactionState && (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizeCol()
|
|
43017
|
+
"grabing" === stateManager.interactionState && (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizeCol() ? endResizeCol(table) : stateManager.isResizeRow() && endResizeRow(table));
|
|
42966
43018
|
}), table.scenegraph.stage.addEventListener("pointertap", e => {
|
|
42967
43019
|
var _a, _b, _c;
|
|
42968
43020
|
const target = e.target;
|
|
@@ -46355,7 +46407,7 @@
|
|
|
46355
46407
|
constructor(container) {
|
|
46356
46408
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46357
46409
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46358
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.
|
|
46410
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-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");
|
|
46359
46411
|
const {
|
|
46360
46412
|
frozenColCount = 0,
|
|
46361
46413
|
frozenRowCount: frozenRowCount,
|
|
@@ -50557,11 +50609,11 @@
|
|
|
50557
50609
|
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph();
|
|
50558
50610
|
}
|
|
50559
50611
|
getCheckboxState(field) {
|
|
50560
|
-
if (this.stateManager.checkedState.
|
|
50561
|
-
let stateArr = this.stateManager.checkedState;
|
|
50612
|
+
if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
|
|
50613
|
+
let stateArr = this.stateManager.checkedState.values();
|
|
50562
50614
|
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), stateArr.map(state => state[field]);
|
|
50563
50615
|
}
|
|
50564
|
-
return this.stateManager.checkedState;
|
|
50616
|
+
return new Array(...this.stateManager.checkedState.values());
|
|
50565
50617
|
}
|
|
50566
50618
|
getCellCheckboxState(col, row) {
|
|
50567
50619
|
var _a;
|
|
@@ -50569,8 +50621,8 @@
|
|
|
50569
50621
|
field = null == define ? void 0 : define.field,
|
|
50570
50622
|
cellType = this.getCellType(col, row);
|
|
50571
50623
|
if (isValid$1(field) && "checkbox" === cellType) {
|
|
50572
|
-
const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row));
|
|
50573
|
-
return null === (_a = this.stateManager.checkedState
|
|
50624
|
+
const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)).toString();
|
|
50625
|
+
return null === (_a = this.stateManager.checkedState.get(dataIndex)) || void 0 === _a ? void 0 : _a[field];
|
|
50574
50626
|
}
|
|
50575
50627
|
}
|
|
50576
50628
|
getRadioState(field) {
|