@visactor/vtable-calendar 1.11.2 → 1.11.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 +26 -12
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
package/dist/vtable-calendar.js
CHANGED
|
@@ -31031,8 +31031,8 @@
|
|
|
31031
31031
|
};
|
|
31032
31032
|
}
|
|
31033
31033
|
class ReactCustomLayout {
|
|
31034
|
-
constructor(
|
|
31035
|
-
this.
|
|
31034
|
+
constructor(table) {
|
|
31035
|
+
this.table = table, this.customLayoutFuncCache = new Map(), this.reactRemoveGraphicCache = new Map(), this.reactRemoveAllGraphicCache = new Map(), this.headerCustomLayoutFuncCache = new Map(), this.headerReactRemoveGraphicCache = new Map(), this.headerReactRemoveAllGraphicCache = new Map();
|
|
31036
31036
|
}
|
|
31037
31037
|
hasReactCreateGraphic(componentId, isHeaderCustomLayout) {
|
|
31038
31038
|
return isHeaderCustomLayout ? this.headerCustomLayoutFuncCache.has(componentId) : this.customLayoutFuncCache.has(componentId);
|
|
@@ -31043,6 +31043,9 @@
|
|
|
31043
31043
|
setReactRemoveGraphic(componentId, removeGraphic, isHeaderCustomLayout) {
|
|
31044
31044
|
isHeaderCustomLayout ? this.headerReactRemoveGraphicCache.set(componentId, removeGraphic) : this.reactRemoveGraphicCache.set(componentId, removeGraphic);
|
|
31045
31045
|
}
|
|
31046
|
+
setReactRemoveAllGraphic(componentId, removeGraphic, isHeaderCustomLayout) {
|
|
31047
|
+
isHeaderCustomLayout ? this.headerReactRemoveAllGraphicCache.set(componentId, removeGraphic) : this.reactRemoveAllGraphicCache.set(componentId, removeGraphic);
|
|
31048
|
+
}
|
|
31046
31049
|
updateCustomCell(componentId, isHeaderCustomLayout) {
|
|
31047
31050
|
const table = this.table;
|
|
31048
31051
|
if (table.isPivotTable()) {
|
|
@@ -31088,7 +31091,18 @@
|
|
|
31088
31091
|
removeFun && removeFun(col, row);
|
|
31089
31092
|
}
|
|
31090
31093
|
clearCache() {
|
|
31091
|
-
this.
|
|
31094
|
+
this.reactRemoveAllGraphicCache.forEach(removeFun => {
|
|
31095
|
+
removeFun();
|
|
31096
|
+
}), this.headerReactRemoveAllGraphicCache.forEach(removeFun => {
|
|
31097
|
+
removeFun();
|
|
31098
|
+
});
|
|
31099
|
+
}
|
|
31100
|
+
updateAllCustomCell() {
|
|
31101
|
+
this.customLayoutFuncCache.forEach((createFun, componentId) => {
|
|
31102
|
+
this.updateCustomCell(componentId);
|
|
31103
|
+
}), this.headerCustomLayoutFuncCache.forEach((createFun, componentId) => {
|
|
31104
|
+
this.updateCustomCell(componentId, !0);
|
|
31105
|
+
});
|
|
31092
31106
|
}
|
|
31093
31107
|
}
|
|
31094
31108
|
function getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout) {
|
|
@@ -45513,7 +45527,7 @@
|
|
|
45513
45527
|
constructor(container) {
|
|
45514
45528
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
45515
45529
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45516
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.11.
|
|
45530
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.11.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");
|
|
45517
45531
|
const {
|
|
45518
45532
|
frozenColCount = 0,
|
|
45519
45533
|
frozenRowCount: frozenRowCount,
|
|
@@ -47236,8 +47250,8 @@
|
|
|
47236
47250
|
var _a;
|
|
47237
47251
|
null === (_a = this.dataSource) || void 0 === _a || _a.setSortedIndexMap(field, filedMap);
|
|
47238
47252
|
}
|
|
47239
|
-
checkReactCustomLayout(
|
|
47240
|
-
this.reactCustomLayout || (this.reactCustomLayout = new ReactCustomLayout(
|
|
47253
|
+
checkReactCustomLayout() {
|
|
47254
|
+
this.reactCustomLayout || (this.reactCustomLayout = new ReactCustomLayout(this));
|
|
47241
47255
|
}
|
|
47242
47256
|
get bodyDomContainer() {
|
|
47243
47257
|
return this.internalProps.bodyDomContainer;
|
|
@@ -49088,7 +49102,7 @@
|
|
|
49088
49102
|
}
|
|
49089
49103
|
}
|
|
49090
49104
|
function listTableDeleteRecords(recordIndexs, table) {
|
|
49091
|
-
var _a, _b;
|
|
49105
|
+
var _a, _b, _c, _d, _e, _f;
|
|
49092
49106
|
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.options.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
49093
49107
|
const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
|
|
49094
49108
|
if (0 === deletedRecordIndexs.length) return;
|
|
@@ -49129,7 +49143,7 @@
|
|
|
49129
49143
|
col: 0,
|
|
49130
49144
|
row: row
|
|
49131
49145
|
});
|
|
49132
|
-
table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
|
|
49146
|
+
null === (_c = table.reactCustomLayout) || void 0 === _c || _c.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_d = table.reactCustomLayout) || void 0 === _d || _d.updateAllCustomCell();
|
|
49133
49147
|
}
|
|
49134
49148
|
} else {
|
|
49135
49149
|
const delRows = [],
|
|
@@ -49161,7 +49175,7 @@
|
|
|
49161
49175
|
col: 0,
|
|
49162
49176
|
row: row
|
|
49163
49177
|
});
|
|
49164
|
-
table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows);
|
|
49178
|
+
null === (_e = table.reactCustomLayout) || void 0 === _e || _e.clearCache(), table.transpose ? table.scenegraph.updateCol(delRows, [], updateRows) : table.scenegraph.updateRow(delRows, [], updateRows), null === (_f = table.reactCustomLayout) || void 0 === _f || _f.updateAllCustomCell();
|
|
49165
49179
|
}
|
|
49166
49180
|
}
|
|
49167
49181
|
}
|
|
@@ -49786,13 +49800,13 @@
|
|
|
49786
49800
|
return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, this);
|
|
49787
49801
|
}
|
|
49788
49802
|
addRecord(record, recordIndex) {
|
|
49789
|
-
listTableAddRecord(record, recordIndex, this);
|
|
49803
|
+
listTableAddRecord(record, recordIndex, this), this.internalProps.emptyTip.resetVisible();
|
|
49790
49804
|
}
|
|
49791
49805
|
addRecords(records, recordIndex) {
|
|
49792
|
-
listTableAddRecords(records, recordIndex, this);
|
|
49806
|
+
listTableAddRecords(records, recordIndex, this), this.internalProps.emptyTip.resetVisible();
|
|
49793
49807
|
}
|
|
49794
49808
|
deleteRecords(recordIndexs) {
|
|
49795
|
-
listTableDeleteRecords(recordIndexs, this);
|
|
49809
|
+
listTableDeleteRecords(recordIndexs, this), this.internalProps.emptyTip.resetVisible();
|
|
49796
49810
|
}
|
|
49797
49811
|
updateRecords(records, recordIndexs) {
|
|
49798
49812
|
listTableUpdateRecords(records, recordIndexs, this);
|