@visactor/vtable-calendar 1.11.6-alpha.1 → 1.11.6-alpha.2
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 +23 -35
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -26675,8 +26675,6 @@
|
|
|
26675
26675
|
HierarchyState.expand = "expand", HierarchyState.collapse = "collapse", HierarchyState.none = "none", HierarchyState.loading = "loading";
|
|
26676
26676
|
}(HierarchyState || (HierarchyState = {}));
|
|
26677
26677
|
|
|
26678
|
-
const cellStyleKeys = ["bgColor", "color", "strokeColor", "borderColor", "linkColor"];
|
|
26679
|
-
|
|
26680
26678
|
var AggregationType;
|
|
26681
26679
|
!function (AggregationType) {
|
|
26682
26680
|
AggregationType.RECORD = "RECORD", AggregationType.NONE = "NONE", AggregationType.SUM = "SUM", AggregationType.MIN = "MIN", AggregationType.MAX = "MAX", AggregationType.AVG = "AVG", AggregationType.COUNT = "COUNT", AggregationType.CUSTOM = "CUSTOM", AggregationType.RECALCULATE = "RECALCULATE";
|
|
@@ -32737,7 +32735,7 @@
|
|
|
32737
32735
|
}
|
|
32738
32736
|
return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
|
|
32739
32737
|
}
|
|
32740
|
-
function updateCell$1(col, row, table, addNew, isShadow
|
|
32738
|
+
function updateCell$1(col, row, table, addNew, isShadow) {
|
|
32741
32739
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
32742
32740
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0),
|
|
32743
32741
|
cellLocation = table.getCellLocation(col, row);
|
|
@@ -32778,7 +32776,7 @@
|
|
|
32778
32776
|
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
|
|
32779
32777
|
autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
|
|
32780
32778
|
cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
|
|
32781
|
-
if (cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), !addNew && !isMerge && !((null == define ? void 0 : define.customLayout) || (null == define ? void 0 : define.customRender) || (null == define ? void 0 : define.headerCustomLayout) || (null == define ? void 0 : define.headerCustomRender)) &&
|
|
32779
|
+
if (cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), !addNew && !isMerge && !((null == define ? void 0 : define.customLayout) || (null == define ? void 0 : define.customRender) || (null == define ? void 0 : define.headerCustomLayout) || (null == define ? void 0 : define.headerCustomRender)) && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table)) {
|
|
32782
32780
|
const cellWidth = table.getColWidth(col),
|
|
32783
32781
|
cellHeight = table.getRowHeight(row);
|
|
32784
32782
|
oldCellGroup.setAttributes({
|
|
@@ -39868,8 +39866,7 @@
|
|
|
39868
39866
|
this.component.drillIcon.update(visible, x, y, drillDown, drillUp, this);
|
|
39869
39867
|
}
|
|
39870
39868
|
updateCellContent(col, row) {
|
|
39871
|
-
|
|
39872
|
-
if (!this.clear) return updateCell$1(col, row, this.table, void 0, void 0, forceFastUpdate);
|
|
39869
|
+
if (!this.clear) return updateCell$1(col, row, this.table);
|
|
39873
39870
|
}
|
|
39874
39871
|
setPixelRatio(pixelRatio) {
|
|
39875
39872
|
this.stage.disableDirtyBounds(), this.stage.window.setDpr(pixelRatio), this.stage.render(), this.stage.enableDirtyBounds();
|
|
@@ -45401,34 +45398,25 @@
|
|
|
45401
45398
|
}), this.table.scenegraph.updateNextFrame();
|
|
45402
45399
|
}
|
|
45403
45400
|
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
45404
|
-
var _a;
|
|
45405
45401
|
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);
|
|
45406
|
-
if (-1
|
|
45407
|
-
|
|
45408
|
-
|
|
45409
|
-
|
|
45410
|
-
|
|
45411
|
-
|
|
45412
|
-
|
|
45413
|
-
|
|
45414
|
-
|
|
45415
|
-
|
|
45416
|
-
|
|
45417
|
-
}
|
|
45418
|
-
const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
|
|
45419
|
-
let forceFastUpdate;
|
|
45420
|
-
if (style) {
|
|
45421
|
-
forceFastUpdate = !0;
|
|
45422
|
-
for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
|
|
45423
|
-
forceFastUpdate = !1;
|
|
45424
|
-
break;
|
|
45402
|
+
if (-1 !== index || customStyleId) {
|
|
45403
|
+
if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
|
|
45404
|
+
cellPosition: {
|
|
45405
|
+
col: cellPos.col,
|
|
45406
|
+
row: cellPos.row,
|
|
45407
|
+
range: cellPos.range
|
|
45408
|
+
},
|
|
45409
|
+
customStyleId: customStyleId
|
|
45410
|
+
});else {
|
|
45411
|
+
if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
|
|
45412
|
+
customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
|
|
45425
45413
|
}
|
|
45414
|
+
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++) {
|
|
45415
|
+
const range = this.table.getCellRange(col, row);
|
|
45416
|
+
for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
|
|
45417
|
+
} else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
|
|
45418
|
+
this.table.scenegraph.updateNextFrame();
|
|
45426
45419
|
}
|
|
45427
|
-
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++) {
|
|
45428
|
-
const range = this.table.getCellRange(col, row);
|
|
45429
|
-
for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r, forceFastUpdate);
|
|
45430
|
-
} else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row, forceFastUpdate);
|
|
45431
|
-
this.table.scenegraph.updateNextFrame();
|
|
45432
45420
|
}
|
|
45433
45421
|
updateCustomCell(customCellStyle, customCellStyleArrangement) {
|
|
45434
45422
|
this.customCellStyle.length = 0, this.customCellStyleArrangement.length = 0, customCellStyle.forEach(cellStyle => {
|
|
@@ -45588,7 +45576,7 @@
|
|
|
45588
45576
|
constructor(container) {
|
|
45589
45577
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
45590
45578
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45591
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.
|
|
45579
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.2", 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");
|
|
45592
45580
|
const {
|
|
45593
45581
|
frozenColCount = 0,
|
|
45594
45582
|
frozenRowCount: frozenRowCount,
|
|
@@ -48823,7 +48811,7 @@
|
|
|
48823
48811
|
height: rect.height
|
|
48824
48812
|
}
|
|
48825
48813
|
};
|
|
48826
|
-
|
|
48814
|
+
editor.beginEditing, null === (_c = editor.beginEditing) || void 0 === _c || _c.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_d = editor.bindSuccessCallback) || void 0 === _d || _d.call(editor, () => {
|
|
48827
48815
|
this.completeEdit();
|
|
48828
48816
|
}), null === (_e = editor.onStart) || void 0 === _e || _e.call(editor, {
|
|
48829
48817
|
value: dataValue,
|
|
@@ -49681,7 +49669,7 @@
|
|
|
49681
49669
|
}
|
|
49682
49670
|
_refreshHierarchyState(col, row) {
|
|
49683
49671
|
let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
49684
|
-
var _a;
|
|
49672
|
+
var _a, _b, _c;
|
|
49685
49673
|
let notFillWidth = !1,
|
|
49686
49674
|
notFillHeight = !1;
|
|
49687
49675
|
const checkHasChart = this.internalProps.layoutMap.checkHasChart();
|
|
@@ -49706,7 +49694,7 @@
|
|
|
49706
49694
|
});
|
|
49707
49695
|
diffPositions.removeCellPositions = [], this.scenegraph.proxy.refreshRowCount();
|
|
49708
49696
|
}
|
|
49709
|
-
this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
|
|
49697
|
+
null === (_b = this.reactCustomLayout) || void 0 === _b || _b.clearCache(), this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
|
|
49710
49698
|
}
|
|
49711
49699
|
_hasHierarchyTreeHeader() {
|
|
49712
49700
|
var _a, _b;
|