@visactor/vtable-calendar 1.11.6-alpha.1 → 1.11.6-alpha.3
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 +31 -41
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +3 -3
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.3", 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,
|
|
@@ -50711,21 +50699,19 @@
|
|
|
50711
50699
|
disableTriggerEvent: this.table.options.disableInteraction
|
|
50712
50700
|
}));
|
|
50713
50701
|
legend.name = "legend", this.legendComponent = legend, !1 === this.visible && (legend.setAttributes({
|
|
50714
|
-
|
|
50715
|
-
|
|
50716
|
-
maxHeight: 0,
|
|
50717
|
-
height: 0,
|
|
50718
|
-
clip: !0
|
|
50702
|
+
visible: !1,
|
|
50703
|
+
visibleAll: !1
|
|
50719
50704
|
}), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
|
|
50720
50705
|
}
|
|
50721
50706
|
resize() {
|
|
50722
|
-
this.legendComponent && (this.legendComponent.setAttributes({
|
|
50707
|
+
this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
|
|
50723
50708
|
maxWidth: this.table.tableNoFrameWidth,
|
|
50724
50709
|
maxHeight: this.table.tableNoFrameHeight
|
|
50725
50710
|
}), this.adjustTableSize(this.legendComponent.attribute));
|
|
50726
50711
|
}
|
|
50727
50712
|
adjustTableSize(attrs) {
|
|
50728
50713
|
var _a, _b;
|
|
50714
|
+
if (!this.legendComponent || !1 === this.visible) return;
|
|
50729
50715
|
let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0,
|
|
50730
50716
|
height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
|
|
50731
50717
|
if (width <= 0 || height <= 0) return;
|
|
@@ -50960,16 +50946,20 @@
|
|
|
50960
50946
|
slidable: !0
|
|
50961
50947
|
})) : new SizeContinuousLegend(merge({}, attrs, {
|
|
50962
50948
|
slidable: !0
|
|
50963
|
-
})), legend.name = "legend", this.legendComponent = legend, this.
|
|
50949
|
+
})), legend.name = "legend", this.legendComponent = legend, !1 === this.visible && (legend.setAttributes({
|
|
50950
|
+
visible: !1,
|
|
50951
|
+
visibleAll: !1
|
|
50952
|
+
}), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
|
|
50964
50953
|
}
|
|
50965
50954
|
resize() {
|
|
50966
|
-
this.legendComponent && (this.legendComponent.setAttributes({
|
|
50955
|
+
this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
|
|
50967
50956
|
width: this.table.tableNoFrameWidth,
|
|
50968
50957
|
height: this.table.tableNoFrameHeight
|
|
50969
50958
|
}), this.adjustTableSize(this.legendComponent.attribute));
|
|
50970
50959
|
}
|
|
50971
50960
|
adjustTableSize(attrs) {
|
|
50972
50961
|
var _a, _b;
|
|
50962
|
+
if (!this.legendComponent || !1 === this.visible) return;
|
|
50973
50963
|
let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0,
|
|
50974
50964
|
height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
|
|
50975
50965
|
if (width <= 0 || height <= 0) return;
|