@visactor/vtable-calendar 1.13.1-alpha.4 → 1.13.1
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 +15 -16
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
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);
|
|
@@ -46135,7 +46138,7 @@
|
|
|
46135
46138
|
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
46139
|
}), this.table.scenegraph.updateNextFrame();
|
|
46137
46140
|
}
|
|
46138
|
-
arrangeCustomCellStyle(cellPos, customStyleId
|
|
46141
|
+
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
46139
46142
|
var _a;
|
|
46140
46143
|
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
46144
|
if (-1 === index && !customStyleId) return;
|
|
@@ -46151,6 +46154,7 @@
|
|
|
46151
46154
|
customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
|
|
46152
46155
|
}
|
|
46153
46156
|
const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
|
|
46157
|
+
let forceFastUpdate;
|
|
46154
46158
|
if (style) {
|
|
46155
46159
|
forceFastUpdate = !0;
|
|
46156
46160
|
for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
|
|
@@ -46322,7 +46326,7 @@
|
|
|
46322
46326
|
constructor(container) {
|
|
46323
46327
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46324
46328
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46325
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1
|
|
46329
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1", 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
46330
|
const {
|
|
46327
46331
|
frozenColCount = 0,
|
|
46328
46332
|
frozenRowCount: frozenRowCount,
|
|
@@ -48017,9 +48021,9 @@
|
|
|
48017
48021
|
var _a;
|
|
48018
48022
|
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.registerCustomCellStyle(customStyleId, customStyle);
|
|
48019
48023
|
}
|
|
48020
|
-
arrangeCustomCellStyle(cellPos, customStyleId
|
|
48024
|
+
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
48021
48025
|
var _a;
|
|
48022
|
-
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId
|
|
48026
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
48023
48027
|
}
|
|
48024
48028
|
isSeriesNumber(col, row) {
|
|
48025
48029
|
return this.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
@@ -49506,7 +49510,7 @@
|
|
|
49506
49510
|
}
|
|
49507
49511
|
}
|
|
49508
49512
|
|
|
49509
|
-
class
|
|
49513
|
+
class EditManeger {
|
|
49510
49514
|
constructor(table) {
|
|
49511
49515
|
this.isValidatingValue = !1, this.table = table, this.bindEvent();
|
|
49512
49516
|
}
|
|
@@ -49582,16 +49586,14 @@
|
|
|
49582
49586
|
} else if (!editor.isEditorElement || editor.isEditorElement(target)) return !1;
|
|
49583
49587
|
if (this.editingEditor.getValue, this.editingEditor.validateValue) {
|
|
49584
49588
|
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);
|
|
49589
|
+
const maybePromiseOrValue = null === (_b = (_a = this.editingEditor).validateValue) || void 0 === _b ? void 0 : _b.call(_a);
|
|
49588
49590
|
return isPromise(maybePromiseOrValue) ? new Promise((resolve, reject) => {
|
|
49589
49591
|
maybePromiseOrValue.then(result => {
|
|
49590
|
-
|
|
49592
|
+
result ? (this.doExit(), resolve(!0)) : (this.isValidatingValue = !1, resolve(!1));
|
|
49591
49593
|
}).catch(err => {
|
|
49592
49594
|
this.isValidatingValue = !1, reject(err);
|
|
49593
49595
|
});
|
|
49594
|
-
}) :
|
|
49596
|
+
}) : !!maybePromiseOrValue && (this.doExit(), !0);
|
|
49595
49597
|
}
|
|
49596
49598
|
return this.doExit(), !0;
|
|
49597
49599
|
}
|
|
@@ -49612,9 +49614,6 @@
|
|
|
49612
49614
|
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
49615
|
}
|
|
49614
49616
|
}
|
|
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
49617
|
|
|
49619
49618
|
function getGroupByDataConfig(groupByOption) {
|
|
49620
49619
|
if (isString$2(groupByOption)) return {
|
|
@@ -49699,7 +49698,7 @@
|
|
|
49699
49698
|
oldValue = oldValues[i][j],
|
|
49700
49699
|
value = rowValues[j],
|
|
49701
49700
|
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) ||
|
|
49701
|
+
isCanChange = !!isPromise(maybePromiseOrValue) || maybePromiseOrValue;
|
|
49703
49702
|
}
|
|
49704
49703
|
if (isCanChange) {
|
|
49705
49704
|
const value = rowValues[j],
|
|
@@ -50116,7 +50115,7 @@
|
|
|
50116
50115
|
var _a, _b, _c, _d, _e, _f;
|
|
50117
50116
|
"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
50117
|
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
|
|
50118
|
+
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
50119
|
sortState: internalProps.sortState
|
|
50121
50120
|
}) : this.setRecords([]), options.title) {
|
|
50122
50121
|
const Title = Factory.getComponent("title");
|