@visactor/vtable-calendar 1.13.1-alpha.4 → 1.13.1-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vtable-calendar.js +78 -51
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -12229,7 +12229,10 @@
|
|
|
12229
12229
|
const {
|
|
12230
12230
|
context: context
|
|
12231
12231
|
} = drawContext;
|
|
12232
|
-
|
|
12232
|
+
context.highPerformanceSave();
|
|
12233
|
+
const t1 = graphic.parent.globalTransMatrix,
|
|
12234
|
+
t2 = graphic.stage.window.getViewBoxTransform().clone().multiply(t1.a, t1.b, t1.c, t1.d, t1.e, t1.f);
|
|
12235
|
+
if (graphic.parent && context.setTransformFromMatrix(t2, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
12233
12236
|
tempDirtyBounds.copy(drawContribution.dirtyBounds), tempBackupDirtyBounds.copy(drawContribution.backupDirtyBounds);
|
|
12234
12237
|
const m = graphic.globalTransMatrix.getInverse();
|
|
12235
12238
|
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m), drawContribution.backupDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
@@ -41521,8 +41524,10 @@
|
|
|
41521
41524
|
function setCheckedState(col, row, field, checked, state) {
|
|
41522
41525
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
41523
41526
|
if (recordIndex >= 0) {
|
|
41524
|
-
const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
|
|
41525
|
-
state.checkedState
|
|
41527
|
+
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
41528
|
+
state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
|
|
41529
|
+
[field]: checked
|
|
41530
|
+
});
|
|
41526
41531
|
}
|
|
41527
41532
|
}
|
|
41528
41533
|
function setHeaderCheckedState(field, checked, state) {
|
|
@@ -41536,21 +41541,23 @@
|
|
|
41536
41541
|
if (state.table.isHeader(col, row)) {
|
|
41537
41542
|
if (isValid$1(state.headerCheckedState[field])) return state.headerCheckedState[field];
|
|
41538
41543
|
if ("function" == typeof checked) return;
|
|
41539
|
-
if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.
|
|
41544
|
+
if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.size) > 0) {
|
|
41540
41545
|
return state.updateHeaderCheckedState(field, col, row);
|
|
41541
41546
|
}
|
|
41542
41547
|
return state.headerCheckedState[field];
|
|
41543
41548
|
}
|
|
41544
41549
|
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
|
|
41545
41550
|
if (recordIndex >= 0) {
|
|
41546
|
-
const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
|
|
41547
|
-
if (isValid$1(null === (_b = state.checkedState
|
|
41548
|
-
state.checkedState
|
|
41551
|
+
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
41552
|
+
if (isValid$1(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
|
|
41553
|
+
state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
|
|
41554
|
+
[field]: checked
|
|
41555
|
+
});
|
|
41549
41556
|
}
|
|
41550
41557
|
return checked;
|
|
41551
41558
|
}
|
|
41552
41559
|
function initCheckedState(records, state) {
|
|
41553
|
-
state.checkedState
|
|
41560
|
+
state.checkedState.clear(), state.headerCheckedState = {}, state.radioState = {};
|
|
41554
41561
|
let isNeedInitHeaderCheckedStateFromRecord = !1;
|
|
41555
41562
|
if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
|
|
41556
41563
|
if ("checkbox" === hd.headerType) {
|
|
@@ -41578,29 +41585,32 @@
|
|
|
41578
41585
|
});
|
|
41579
41586
|
}
|
|
41580
41587
|
}
|
|
41581
|
-
|
|
41588
|
+
const dataIndex = state.table.dataSource.getIndexKey(index).toString();
|
|
41589
|
+
state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
|
|
41582
41590
|
});
|
|
41583
41591
|
}));
|
|
41584
41592
|
}
|
|
41585
41593
|
function updateHeaderCheckedState(field, state, col, row) {
|
|
41586
|
-
|
|
41587
|
-
|
|
41588
|
-
|
|
41589
|
-
|
|
41590
|
-
|
|
41591
|
-
|
|
41592
|
-
|
|
41593
|
-
|
|
41594
|
-
|
|
41595
|
-
|
|
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");
|
|
41596
41604
|
}
|
|
41597
41605
|
function initLeftRecordsCheckState(records, state) {
|
|
41598
|
-
for (let index = state.checkedState.
|
|
41606
|
+
for (let index = state.checkedState.size; index < records.length; index++) {
|
|
41599
41607
|
const record = records[index];
|
|
41600
41608
|
state._checkboxCellTypeFields.forEach(field => {
|
|
41601
41609
|
const value = record[field];
|
|
41602
41610
|
let isChecked;
|
|
41603
|
-
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;
|
|
41604
41614
|
});
|
|
41605
41615
|
}
|
|
41606
41616
|
}
|
|
@@ -41633,14 +41643,35 @@
|
|
|
41633
41643
|
checkedState: checkedState,
|
|
41634
41644
|
table: table
|
|
41635
41645
|
} = state;
|
|
41636
|
-
|
|
41637
|
-
|
|
41638
|
-
|
|
41639
|
-
|
|
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);
|
|
41640
41666
|
} else if (sourceIndex < targetIndex) {
|
|
41641
|
-
const sourceRecord = checkedState
|
|
41642
|
-
for (let i = sourceIndex; i < targetIndex; i++)
|
|
41643
|
-
|
|
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);
|
|
41644
41675
|
}
|
|
41645
41676
|
}
|
|
41646
41677
|
function getGroupCheckboxState(table) {
|
|
@@ -41652,7 +41683,7 @@
|
|
|
41652
41683
|
const {
|
|
41653
41684
|
vtableOriginIndex: vtableOriginIndex
|
|
41654
41685
|
} = dataSource.getRawRecord(indexArr);
|
|
41655
|
-
result[vtableOriginIndex] = table.stateManager.checkedState
|
|
41686
|
+
result[vtableOriginIndex] = table.stateManager.checkedState.get(indexArr.toString());
|
|
41656
41687
|
}
|
|
41657
41688
|
}), result;
|
|
41658
41689
|
}
|
|
@@ -41743,7 +41774,7 @@
|
|
|
41743
41774
|
|
|
41744
41775
|
class StateManager {
|
|
41745
41776
|
constructor(table) {
|
|
41746
|
-
this.fastScrolling = !1, this.checkedState =
|
|
41777
|
+
this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
|
|
41747
41778
|
this.updateInteractionState(null != state ? state : InteractionState.default);
|
|
41748
41779
|
}, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
|
|
41749
41780
|
}
|
|
@@ -42426,7 +42457,7 @@
|
|
|
42426
42457
|
return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
|
|
42427
42458
|
}
|
|
42428
42459
|
changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
|
|
42429
|
-
this.checkedState.
|
|
42460
|
+
this.checkedState.size && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
|
|
42430
42461
|
}
|
|
42431
42462
|
setCustomSelectRanges(customSelectRanges) {
|
|
42432
42463
|
deletaCustomSelectRanges(this), addCustomSelectRanges(customSelectRanges, this);
|
|
@@ -46135,7 +46166,7 @@
|
|
|
46135
46166
|
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);
|
|
46136
46167
|
}), this.table.scenegraph.updateNextFrame();
|
|
46137
46168
|
}
|
|
46138
|
-
arrangeCustomCellStyle(cellPos, customStyleId
|
|
46169
|
+
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
46139
46170
|
var _a;
|
|
46140
46171
|
const index = this.customCellStyleArrangement.findIndex(style => style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row);
|
|
46141
46172
|
if (-1 === index && !customStyleId) return;
|
|
@@ -46151,6 +46182,7 @@
|
|
|
46151
46182
|
customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
|
|
46152
46183
|
}
|
|
46153
46184
|
const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
|
|
46185
|
+
let forceFastUpdate;
|
|
46154
46186
|
if (style) {
|
|
46155
46187
|
forceFastUpdate = !0;
|
|
46156
46188
|
for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
|
|
@@ -46322,7 +46354,7 @@
|
|
|
46322
46354
|
constructor(container) {
|
|
46323
46355
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46324
46356
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46325
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1-alpha.
|
|
46357
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46326
46358
|
const {
|
|
46327
46359
|
frozenColCount = 0,
|
|
46328
46360
|
frozenRowCount: frozenRowCount,
|
|
@@ -48017,9 +48049,9 @@
|
|
|
48017
48049
|
var _a;
|
|
48018
48050
|
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.registerCustomCellStyle(customStyleId, customStyle);
|
|
48019
48051
|
}
|
|
48020
|
-
arrangeCustomCellStyle(cellPos, customStyleId
|
|
48052
|
+
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
48021
48053
|
var _a;
|
|
48022
|
-
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId
|
|
48054
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
48023
48055
|
}
|
|
48024
48056
|
isSeriesNumber(col, row) {
|
|
48025
48057
|
return this.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
@@ -49506,7 +49538,7 @@
|
|
|
49506
49538
|
}
|
|
49507
49539
|
}
|
|
49508
49540
|
|
|
49509
|
-
class
|
|
49541
|
+
class EditManeger {
|
|
49510
49542
|
constructor(table) {
|
|
49511
49543
|
this.isValidatingValue = !1, this.table = table, this.bindEvent();
|
|
49512
49544
|
}
|
|
@@ -49582,16 +49614,14 @@
|
|
|
49582
49614
|
} else if (!editor.isEditorElement || editor.isEditorElement(target)) return !1;
|
|
49583
49615
|
if (this.editingEditor.getValue, this.editingEditor.validateValue) {
|
|
49584
49616
|
this.isValidatingValue = !0;
|
|
49585
|
-
const
|
|
49586
|
-
oldValue = this.table.getCellOriginValue(this.editCell.col, this.editCell.row),
|
|
49587
|
-
maybePromiseOrValue = null === (_b = (_a = this.editingEditor).validateValue) || void 0 === _b ? void 0 : _b.call(_a, newValue, oldValue, this.editCell, this.table);
|
|
49617
|
+
const maybePromiseOrValue = null === (_b = (_a = this.editingEditor).validateValue) || void 0 === _b ? void 0 : _b.call(_a);
|
|
49588
49618
|
return isPromise(maybePromiseOrValue) ? new Promise((resolve, reject) => {
|
|
49589
49619
|
maybePromiseOrValue.then(result => {
|
|
49590
|
-
|
|
49620
|
+
result ? (this.doExit(), resolve(!0)) : (this.isValidatingValue = !1, resolve(!1));
|
|
49591
49621
|
}).catch(err => {
|
|
49592
49622
|
this.isValidatingValue = !1, reject(err);
|
|
49593
49623
|
});
|
|
49594
|
-
}) :
|
|
49624
|
+
}) : !!maybePromiseOrValue && (this.doExit(), !0);
|
|
49595
49625
|
}
|
|
49596
49626
|
return this.doExit(), !0;
|
|
49597
49627
|
}
|
|
@@ -49612,9 +49642,6 @@
|
|
|
49612
49642
|
this.editingEditor && (null === (_b = (_a = this.editingEditor).exit) || void 0 === _b || _b.call(_a), null === (_d = (_c = this.editingEditor).onEnd) || void 0 === _d || _d.call(_c), this.editingEditor = null);
|
|
49613
49643
|
}
|
|
49614
49644
|
}
|
|
49615
|
-
function dealWithValidateValue(validateValue, editManager, oldValue, resolve) {
|
|
49616
|
-
return editManager.isValidatingValue = !1, "validate-return" === validateValue ? (editManager.doExit(), null == resolve || resolve(!0), !0) : "invalidate-return" === validateValue ? (editManager.editingEditor.setValue(oldValue), editManager.doExit(), null == resolve || resolve(!0), !0) : "validate-not-return" === validateValue || "invalidate-not-return" === validateValue ? (null == resolve || resolve(!1), !1) : !0 === validateValue ? (editManager.doExit(), null == resolve || resolve(!0), !0) : (null == resolve || resolve(!1), !1);
|
|
49617
|
-
}
|
|
49618
49645
|
|
|
49619
49646
|
function getGroupByDataConfig(groupByOption) {
|
|
49620
49647
|
if (isString$2(groupByOption)) return {
|
|
@@ -49699,7 +49726,7 @@
|
|
|
49699
49726
|
oldValue = oldValues[i][j],
|
|
49700
49727
|
value = rowValues[j],
|
|
49701
49728
|
maybePromiseOrValue = null === (_b = null === (_a = null == editor ? void 0 : editor.validateValue) || void 0 === _a ? void 0 : _a.call(editor, value, oldValue)) || void 0 === _b || _b;
|
|
49702
|
-
isCanChange = !!isPromise(maybePromiseOrValue) ||
|
|
49729
|
+
isCanChange = !!isPromise(maybePromiseOrValue) || maybePromiseOrValue;
|
|
49703
49730
|
}
|
|
49704
49731
|
if (isCanChange) {
|
|
49705
49732
|
const value = rowValues[j],
|
|
@@ -50116,7 +50143,7 @@
|
|
|
50116
50143
|
var _a, _b, _c, _d, _e, _f;
|
|
50117
50144
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
|
|
50118
50145
|
const internalProps = this.internalProps;
|
|
50119
|
-
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
|
|
50146
|
+
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, {
|
|
50120
50147
|
sortState: internalProps.sortState
|
|
50121
50148
|
}) : this.setRecords([]), options.title) {
|
|
50122
50149
|
const Title = Factory.getComponent("title");
|
|
@@ -50529,11 +50556,11 @@
|
|
|
50529
50556
|
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();
|
|
50530
50557
|
}
|
|
50531
50558
|
getCheckboxState(field) {
|
|
50532
|
-
if (this.stateManager.checkedState.
|
|
50533
|
-
let stateArr = this.stateManager.checkedState;
|
|
50559
|
+
if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
|
|
50560
|
+
let stateArr = this.stateManager.checkedState.values();
|
|
50534
50561
|
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), stateArr.map(state => state[field]);
|
|
50535
50562
|
}
|
|
50536
|
-
return this.stateManager.checkedState;
|
|
50563
|
+
return new Array(...this.stateManager.checkedState.values());
|
|
50537
50564
|
}
|
|
50538
50565
|
getCellCheckboxState(col, row) {
|
|
50539
50566
|
var _a;
|
|
@@ -50541,8 +50568,8 @@
|
|
|
50541
50568
|
field = null == define ? void 0 : define.field,
|
|
50542
50569
|
cellType = this.getCellType(col, row);
|
|
50543
50570
|
if (isValid$1(field) && "checkbox" === cellType) {
|
|
50544
|
-
const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row));
|
|
50545
|
-
return null === (_a = this.stateManager.checkedState
|
|
50571
|
+
const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)).toString();
|
|
50572
|
+
return null === (_a = this.stateManager.checkedState.get(dataIndex)) || void 0 === _a ? void 0 : _a[field];
|
|
50546
50573
|
}
|
|
50547
50574
|
}
|
|
50548
50575
|
getRadioState(field) {
|