@visactor/vtable-calendar 1.13.0 → 1.13.1-alpha.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 +14 -10
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -46138,7 +46138,7 @@
|
|
|
46138
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);
|
|
46139
46139
|
}), this.table.scenegraph.updateNextFrame();
|
|
46140
46140
|
}
|
|
46141
|
-
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
46141
|
+
arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
|
|
46142
46142
|
var _a;
|
|
46143
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);
|
|
46144
46144
|
if (-1 === index && !customStyleId) return;
|
|
@@ -46154,7 +46154,6 @@
|
|
|
46154
46154
|
customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
|
|
46155
46155
|
}
|
|
46156
46156
|
const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
|
|
46157
|
-
let forceFastUpdate;
|
|
46158
46157
|
if (style) {
|
|
46159
46158
|
forceFastUpdate = !0;
|
|
46160
46159
|
for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
|
|
@@ -46326,7 +46325,7 @@
|
|
|
46326
46325
|
constructor(container) {
|
|
46327
46326
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46328
46327
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46329
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.
|
|
46328
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1-alpha.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");
|
|
46330
46329
|
const {
|
|
46331
46330
|
frozenColCount = 0,
|
|
46332
46331
|
frozenRowCount: frozenRowCount,
|
|
@@ -48021,9 +48020,9 @@
|
|
|
48021
48020
|
var _a;
|
|
48022
48021
|
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.registerCustomCellStyle(customStyleId, customStyle);
|
|
48023
48022
|
}
|
|
48024
|
-
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
48023
|
+
arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
|
|
48025
48024
|
var _a;
|
|
48026
|
-
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
48025
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate);
|
|
48027
48026
|
}
|
|
48028
48027
|
isSeriesNumber(col, row) {
|
|
48029
48028
|
return this.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
@@ -49510,7 +49509,7 @@
|
|
|
49510
49509
|
}
|
|
49511
49510
|
}
|
|
49512
49511
|
|
|
49513
|
-
class
|
|
49512
|
+
class EditManager {
|
|
49514
49513
|
constructor(table) {
|
|
49515
49514
|
this.isValidatingValue = !1, this.table = table, this.bindEvent();
|
|
49516
49515
|
}
|
|
@@ -49586,14 +49585,16 @@
|
|
|
49586
49585
|
} else if (!editor.isEditorElement || editor.isEditorElement(target)) return !1;
|
|
49587
49586
|
if (this.editingEditor.getValue, this.editingEditor.validateValue) {
|
|
49588
49587
|
this.isValidatingValue = !0;
|
|
49589
|
-
const
|
|
49588
|
+
const newValue = this.editingEditor.getValue(),
|
|
49589
|
+
oldValue = this.table.getCellOriginValue(this.editCell.col, this.editCell.row),
|
|
49590
|
+
maybePromiseOrValue = null === (_b = (_a = this.editingEditor).validateValue) || void 0 === _b ? void 0 : _b.call(_a, newValue, oldValue, this.editCell, this.table);
|
|
49590
49591
|
return isPromise(maybePromiseOrValue) ? new Promise((resolve, reject) => {
|
|
49591
49592
|
maybePromiseOrValue.then(result => {
|
|
49592
|
-
result
|
|
49593
|
+
dealWithValidateValue(result, this, oldValue, resolve);
|
|
49593
49594
|
}).catch(err => {
|
|
49594
49595
|
this.isValidatingValue = !1, reject(err);
|
|
49595
49596
|
});
|
|
49596
|
-
}) :
|
|
49597
|
+
}) : dealWithValidateValue(maybePromiseOrValue, this, oldValue);
|
|
49597
49598
|
}
|
|
49598
49599
|
return this.doExit(), !0;
|
|
49599
49600
|
}
|
|
@@ -49614,6 +49615,9 @@
|
|
|
49614
49615
|
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);
|
|
49615
49616
|
}
|
|
49616
49617
|
}
|
|
49618
|
+
function dealWithValidateValue(validateValue, editManager, oldValue, resolve) {
|
|
49619
|
+
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);
|
|
49620
|
+
}
|
|
49617
49621
|
|
|
49618
49622
|
function getGroupByDataConfig(groupByOption) {
|
|
49619
49623
|
if (isString$2(groupByOption)) return {
|
|
@@ -50115,7 +50119,7 @@
|
|
|
50115
50119
|
var _a, _b, _c, _d, _e, _f;
|
|
50116
50120
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
|
|
50117
50121
|
const internalProps = this.internalProps;
|
|
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
|
|
50122
|
+
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 EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
|
|
50119
50123
|
sortState: internalProps.sortState
|
|
50120
50124
|
}) : this.setRecords([]), options.title) {
|
|
50121
50125
|
const Title = Factory.getComponent("title");
|