@visactor/vtable-calendar 1.17.4 → 1.17.5-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 +24 -17
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -29234,6 +29234,10 @@
|
|
|
29234
29234
|
get selectionFillMode() {
|
|
29235
29235
|
var _a;
|
|
29236
29236
|
return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.selectionFillMode) && void 0 !== _a ? _a : "overlay";
|
|
29237
|
+
},
|
|
29238
|
+
get dynamicUpdateSelectionSize() {
|
|
29239
|
+
var _a;
|
|
29240
|
+
return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.dynamicUpdateSelectionSize) && void 0 !== _a && _a;
|
|
29237
29241
|
}
|
|
29238
29242
|
};
|
|
29239
29243
|
}
|
|
@@ -32239,16 +32243,15 @@
|
|
|
32239
32243
|
}
|
|
32240
32244
|
function getCellCornerRadius(col, row, table) {
|
|
32241
32245
|
const tableCornerRadius = table.theme.frameStyle.cornerRadius;
|
|
32242
|
-
if (table.theme.cellInnerBorder)
|
|
32243
|
-
if (
|
|
32244
|
-
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius, 0];
|
|
32246
|
+
if (table.theme.cellInnerBorder) {
|
|
32247
|
+
if (Array.isArray(tableCornerRadius)) {
|
|
32248
|
+
const radius = [0, 0, 0, 0];
|
|
32249
|
+
return 0 === col && 0 === row && (radius[0] = tableCornerRadius[0]), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius[1]), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius[3]), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius[2]), radius;
|
|
32250
|
+
}
|
|
32251
|
+
if (tableCornerRadius) {
|
|
32252
|
+
const radius = [0, 0, 0, 0];
|
|
32253
|
+
return 0 === col && 0 === row && (radius[0] = tableCornerRadius), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius), radius;
|
|
32254
|
+
}
|
|
32252
32255
|
}
|
|
32253
32256
|
return 0;
|
|
32254
32257
|
}
|
|
@@ -39222,7 +39225,10 @@
|
|
|
39222
39225
|
if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
|
|
39223
39226
|
table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
|
|
39224
39227
|
}
|
|
39225
|
-
|
|
39228
|
+
const {
|
|
39229
|
+
dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
|
|
39230
|
+
} = table.theme.selectionStyle;
|
|
39231
|
+
if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
|
|
39226
39232
|
if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
|
|
39227
39233
|
const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
|
|
39228
39234
|
selectComp.rect.setAttributes({
|
|
@@ -41156,9 +41162,9 @@
|
|
|
41156
41162
|
this.table.scenegraph.proxy.setY(-y, isEnd);
|
|
41157
41163
|
}
|
|
41158
41164
|
setBodyAndRowHeaderY(y) {
|
|
41159
|
-
var _a, _b;
|
|
41160
|
-
const firstBodyCell = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild,
|
|
41161
|
-
lastBodyCell = null === (
|
|
41165
|
+
var _a, _b, _c, _d, _e, _f;
|
|
41166
|
+
const firstBodyCell = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild) && void 0 !== _b ? _b : null === (_c = this.rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild,
|
|
41167
|
+
lastBodyCell = null !== (_e = null === (_d = this.bodyGroup.firstChild) || void 0 === _d ? void 0 : _d.lastChild) && void 0 !== _e ? _e : null === (_f = this.rowHeaderGroup.firstChild) || void 0 === _f ? void 0 : _f.lastChild;
|
|
41162
41168
|
0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + lastBodyCell.attribute.height + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - lastBodyCell.attribute.height), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.updateNextFrame());
|
|
41163
41169
|
}
|
|
41164
41170
|
setBodyAndColHeaderX(x) {
|
|
@@ -46472,7 +46478,7 @@
|
|
|
46472
46478
|
return "grid" === this.hierarchyType || null === this.hierarchyType ? (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
46473
46479
|
var _a, _b, _c;
|
|
46474
46480
|
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, "grid" === this.hierarchyType && (n.afterSpanLevel = (null !== (_b = node.afterSpanLevel) && void 0 !== _b ? _b : 0) + (null !== (_c = node.levelSpan) && void 0 !== _c ? _c : 1)), this.totalLevel = Math.max(this.totalLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
46475
|
-
}) : size = 1 : node.hierarchyState === HierarchyState.expand && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
46481
|
+
}) : size = -1 === node.level ? 0 : 1 : node.hierarchyState === HierarchyState.expand && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
46476
46482
|
var _a;
|
|
46477
46483
|
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.expandedMaxLevel = Math.max(this.expandedMaxLevel, n.level + 1), size += this.setTreeNode(n, size, node);
|
|
46478
46484
|
}) : node.hierarchyState === HierarchyState.collapse && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
@@ -46484,7 +46490,7 @@
|
|
|
46484
46490
|
})) : (null == children ? void 0 : children.length) >= 1 || !0 === children ? ((null === (_d = children[0]) || void 0 === _d ? void 0 : _d.indicatorKey) && "grid-tree" === this.hierarchyType || (node.hierarchyState = HierarchyState.collapse), (null == children ? void 0 : children.length) >= 1 && children.forEach(n => {
|
|
46485
46491
|
var _a;
|
|
46486
46492
|
n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.setTreeNode(n, size, node);
|
|
46487
|
-
})) : (node.hierarchyState = HierarchyState.none, size = 1), node.size = size, size;
|
|
46493
|
+
})) : (node.hierarchyState = HierarchyState.none, size = -1 === node.level ? 0 : 1), node.size = size, size;
|
|
46488
46494
|
}
|
|
46489
46495
|
getTreePath(index) {
|
|
46490
46496
|
let maxDeep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
|
|
@@ -47676,7 +47682,7 @@
|
|
|
47676
47682
|
constructor(container) {
|
|
47677
47683
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47678
47684
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
47679
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.
|
|
47685
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.5-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");
|
|
47680
47686
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47681
47687
|
const {
|
|
47682
47688
|
frozenColCount = 0,
|
|
@@ -48061,6 +48067,7 @@
|
|
|
48061
48067
|
shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
|
|
48062
48068
|
(null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0)) : (this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0), this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)), this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
|
|
48063
48069
|
}
|
|
48070
|
+
this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
|
|
48064
48071
|
}
|
|
48065
48072
|
updateViewBox(newViewBox) {
|
|
48066
48073
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|