@visactor/vtable-calendar 1.13.1-alpha.3 → 1.13.1-alpha.5
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 +11 -15
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
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) {
|
|
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,6 +46154,7 @@
|
|
|
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;
|
|
46157
46158
|
if (style) {
|
|
46158
46159
|
forceFastUpdate = !0;
|
|
46159
46160
|
for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
|
|
@@ -46325,7 +46326,7 @@
|
|
|
46325
46326
|
constructor(container) {
|
|
46326
46327
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46327
46328
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46328
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1-alpha.
|
|
46329
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.1-alpha.5", 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");
|
|
46329
46330
|
const {
|
|
46330
46331
|
frozenColCount = 0,
|
|
46331
46332
|
frozenRowCount: frozenRowCount,
|
|
@@ -48020,9 +48021,9 @@
|
|
|
48020
48021
|
var _a;
|
|
48021
48022
|
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.registerCustomCellStyle(customStyleId, customStyle);
|
|
48022
48023
|
}
|
|
48023
|
-
arrangeCustomCellStyle(cellPos, customStyleId
|
|
48024
|
+
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
48024
48025
|
var _a;
|
|
48025
|
-
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId
|
|
48026
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
48026
48027
|
}
|
|
48027
48028
|
isSeriesNumber(col, row) {
|
|
48028
48029
|
return this.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
@@ -49509,7 +49510,7 @@
|
|
|
49509
49510
|
}
|
|
49510
49511
|
}
|
|
49511
49512
|
|
|
49512
|
-
class
|
|
49513
|
+
class EditManeger {
|
|
49513
49514
|
constructor(table) {
|
|
49514
49515
|
this.isValidatingValue = !1, this.table = table, this.bindEvent();
|
|
49515
49516
|
}
|
|
@@ -49585,16 +49586,14 @@
|
|
|
49585
49586
|
} else if (!editor.isEditorElement || editor.isEditorElement(target)) return !1;
|
|
49586
49587
|
if (this.editingEditor.getValue, this.editingEditor.validateValue) {
|
|
49587
49588
|
this.isValidatingValue = !0;
|
|
49588
|
-
const
|
|
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);
|
|
49589
|
+
const maybePromiseOrValue = null === (_b = (_a = this.editingEditor).validateValue) || void 0 === _b ? void 0 : _b.call(_a);
|
|
49591
49590
|
return isPromise(maybePromiseOrValue) ? new Promise((resolve, reject) => {
|
|
49592
49591
|
maybePromiseOrValue.then(result => {
|
|
49593
|
-
|
|
49592
|
+
result ? (this.doExit(), resolve(!0)) : (this.isValidatingValue = !1, resolve(!1));
|
|
49594
49593
|
}).catch(err => {
|
|
49595
49594
|
this.isValidatingValue = !1, reject(err);
|
|
49596
49595
|
});
|
|
49597
|
-
}) :
|
|
49596
|
+
}) : !!maybePromiseOrValue && (this.doExit(), !0);
|
|
49598
49597
|
}
|
|
49599
49598
|
return this.doExit(), !0;
|
|
49600
49599
|
}
|
|
@@ -49615,9 +49614,6 @@
|
|
|
49615
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);
|
|
49616
49615
|
}
|
|
49617
49616
|
}
|
|
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
|
-
}
|
|
49621
49617
|
|
|
49622
49618
|
function getGroupByDataConfig(groupByOption) {
|
|
49623
49619
|
if (isString$2(groupByOption)) return {
|
|
@@ -49702,7 +49698,7 @@
|
|
|
49702
49698
|
oldValue = oldValues[i][j],
|
|
49703
49699
|
value = rowValues[j],
|
|
49704
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;
|
|
49705
|
-
isCanChange = !!isPromise(maybePromiseOrValue) ||
|
|
49701
|
+
isCanChange = !!isPromise(maybePromiseOrValue) || maybePromiseOrValue;
|
|
49706
49702
|
}
|
|
49707
49703
|
if (isCanChange) {
|
|
49708
49704
|
const value = rowValues[j],
|
|
@@ -50119,7 +50115,7 @@
|
|
|
50119
50115
|
var _a, _b, _c, _d, _e, _f;
|
|
50120
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;
|
|
50121
50117
|
const internalProps = this.internalProps;
|
|
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
|
|
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, {
|
|
50123
50119
|
sortState: internalProps.sortState
|
|
50124
50120
|
}) : this.setRecords([]), options.title) {
|
|
50125
50121
|
const Title = Factory.getComponent("title");
|