@visactor/vtable-calendar 1.23.0 → 1.23.1-alpha.0
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 +21 -17
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -56371,7 +56371,7 @@
|
|
|
56371
56371
|
}
|
|
56372
56372
|
constructor(container, options = {}) {
|
|
56373
56373
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
56374
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.23.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
56374
|
+
if (super(), this.showFrozenIcon = !0, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.23.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
56375
56375
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
56376
56376
|
options: options,
|
|
56377
56377
|
container: container
|
|
@@ -56538,9 +56538,13 @@
|
|
|
56538
56538
|
}
|
|
56539
56539
|
resize() {
|
|
56540
56540
|
var _a;
|
|
56541
|
-
this._updateSize()
|
|
56542
|
-
|
|
56543
|
-
|
|
56541
|
+
this._updateSize();
|
|
56542
|
+
(null !== (_a = this.options.componentLayoutOrder) && void 0 !== _a ? _a : ["legend", "title"]).forEach(component => {
|
|
56543
|
+
var _a, _b;
|
|
56544
|
+
"legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
|
|
56545
|
+
null == legend || legend.resize();
|
|
56546
|
+
}) : "title" === component && (null === (_b = this.internalProps.title) || void 0 === _b || _b.resize());
|
|
56547
|
+
}), this.internalProps.emptyTip && this.internalProps.emptyTip.resize(), this.scenegraph.resize();
|
|
56544
56548
|
}
|
|
56545
56549
|
get rowCount() {
|
|
56546
56550
|
return this.internalProps.rowCount;
|
|
@@ -56760,7 +56764,7 @@
|
|
|
56760
56764
|
}
|
|
56761
56765
|
}
|
|
56762
56766
|
_updateSize() {
|
|
56763
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1
|
|
56767
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
56764
56768
|
const {
|
|
56765
56769
|
padding: padding
|
|
56766
56770
|
} = this;
|
|
@@ -56792,12 +56796,12 @@
|
|
|
56792
56796
|
if (null === (_l = this.internalProps.theme) || void 0 === _l ? void 0 : _l.frameStyle) {
|
|
56793
56797
|
const lineWidths = toBoxArray(null !== (_o = null === (_m = this.internalProps.theme.frameStyle) || void 0 === _m ? void 0 : _m.borderLineWidth) && void 0 !== _o ? _o : [null]),
|
|
56794
56798
|
shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
|
|
56795
|
-
if (null
|
|
56796
|
-
this.tableX +=
|
|
56797
|
-
const rightBorder =
|
|
56798
|
-
this.tableNoFrameWidth = width - (rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) -
|
|
56799
|
-
const bottomBorder =
|
|
56800
|
-
this.tableNoFrameHeight = height - (bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) -
|
|
56799
|
+
if (this._tableBorderWidth_left = (null !== (_r = lineWidths[3]) && void 0 !== _r ? _r : 0) + (null !== (_s = shadowWidths[3]) && void 0 !== _s ? _s : 0), this._tableBorderWidth_right = (null !== (_t = lineWidths[1]) && void 0 !== _t ? _t : 0) + (null !== (_u = shadowWidths[1]) && void 0 !== _u ? _u : 0), this._tableBorderWidth_top = (null !== (_v = lineWidths[0]) && void 0 !== _v ? _v : 0) + (null !== (_w = shadowWidths[0]) && void 0 !== _w ? _w : 0), this._tableBorderWidth_bottom = (null !== (_x = lineWidths[2]) && void 0 !== _x ? _x : 0) + (null !== (_y = shadowWidths[2]) && void 0 !== _y ? _y : 0), null === (_z = this.theme.frameStyle) || void 0 === _z ? void 0 : _z.innerBorder) this.tableX += this.contentOffsetX, this.tableY += this.contentOffsetY, this.tableNoFrameWidth = width - (null !== (_0 = shadowWidths[1]) && void 0 !== _0 ? _0 : 0) - this.contentOffsetX, this.tableNoFrameHeight = height - (null !== (_1 = shadowWidths[2]) && void 0 !== _1 ? _1 : 0) - this.contentOffsetY;else {
|
|
56800
|
+
this.tableX += this._tableBorderWidth_left, this.tableY += this._tableBorderWidth_top;
|
|
56801
|
+
const rightBorder = this._tableBorderWidth_right;
|
|
56802
|
+
this.tableNoFrameWidth = width - (rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) - this._tableBorderWidth_left - this.contentOffsetX;
|
|
56803
|
+
const bottomBorder = this._tableBorderWidth_bottom;
|
|
56804
|
+
this.tableNoFrameHeight = height - (bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) - this._tableBorderWidth_top - this.contentOffsetY;
|
|
56801
56805
|
}
|
|
56802
56806
|
}
|
|
56803
56807
|
this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
|
|
@@ -62443,7 +62447,7 @@
|
|
|
62443
62447
|
padding = getQuadProps(null !== (_b = null !== (_a = attrs.padding) && void 0 !== _a ? _a : this.option.padding) && void 0 !== _b ? _b : 10);
|
|
62444
62448
|
let x = 0,
|
|
62445
62449
|
y = 0;
|
|
62446
|
-
"left" === this.orient ? (x = padding[3], y = 0, width += padding[1] + padding[3]) : "top" === this.orient ? (x = 0, y = padding[0], height += padding[0] + padding[2]) : "right" === this.orient ? (x = rectWidth - width - padding[1], y = 0, width += padding[1] + padding[3]) : "bottom" === this.orient && (x = 0, y = rectHeight - height - padding[2], height += padding[0] + padding[2]);
|
|
62450
|
+
"left" === this.orient ? (x = padding[3] + this.table.tableX - this.table._tableBorderWidth_left, y = 0 + this.table.tableY - this.table._tableBorderWidth_top, width += padding[1] + padding[3]) : "top" === this.orient ? (x = 0 + this.table.tableX - this.table._tableBorderWidth_left, y = padding[0] + this.table.tableY - this.table._tableBorderWidth_top, height += padding[0] + padding[2]) : "right" === this.orient ? (x = rectWidth - width - padding[1], y = 0 + this.table.tableY - this.table._tableBorderWidth_top, width += padding[1] + padding[3]) : "bottom" === this.orient && (x = 0 + this.table.tableX - this.table._tableBorderWidth_left, y = rectHeight - height - padding[2], height += padding[0] + padding[2]);
|
|
62447
62451
|
const layout = "bottom" === this.orient || "top" === this.orient ? "horizontal" : "vertical",
|
|
62448
62452
|
position = this.position;
|
|
62449
62453
|
let offsetX = 0,
|
|
@@ -62691,7 +62695,7 @@
|
|
|
62691
62695
|
padding = getQuadProps(null !== (_b = null !== (_a = attrs.padding) && void 0 !== _a ? _a : this.option.padding) && void 0 !== _b ? _b : 10);
|
|
62692
62696
|
let x = 0,
|
|
62693
62697
|
y = 0;
|
|
62694
|
-
"left" === this.orient ? (x = padding[3], y = 0, width += padding[1] + padding[3]) : "top" === this.orient ? (x = 0, y = padding[0], height += padding[0] + padding[2]) : "right" === this.orient ? (x = rectWidth - width - padding[1], y = 0, width += padding[1] + padding[3]) : "bottom" === this.orient && (x = 0, y = rectHeight - height - padding[2], height += padding[0] + padding[2]);
|
|
62698
|
+
"left" === this.orient ? (x = padding[3] + this.table.tableX - this.table._tableBorderWidth_left, y = 0 + this.table.tableY - this.table._tableBorderWidth_top, width += padding[1] + padding[3]) : "top" === this.orient ? (x = 0 + this.table.tableX - this.table._tableBorderWidth_left, y = padding[0] + this.table.tableY - this.table._tableBorderWidth_top, height += padding[0] + padding[2]) : "right" === this.orient ? (x = rectWidth - width - padding[1], y = 0 + this.table.tableY - this.table._tableBorderWidth_top, width += padding[1] + padding[3]) : "bottom" === this.orient && (x = 0 + this.table.tableX - this.table._tableBorderWidth_left, y = rectHeight - height - padding[2], height += padding[0] + padding[2]);
|
|
62695
62699
|
const layout = "bottom" === this.orient || "top" === this.orient ? "horizontal" : "vertical",
|
|
62696
62700
|
position = this.position;
|
|
62697
62701
|
let offsetX = 0,
|
|
@@ -63120,8 +63124,8 @@
|
|
|
63120
63124
|
realWidth = null !== (_b = this._titleOption.width) && void 0 !== _b ? _b : ("adaptive" === this.table.widthMode ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width)) - padding[1] - padding[3],
|
|
63121
63125
|
realHeight = null !== (_c = this._titleOption.height) && void 0 !== _c ? _c : ("adaptive" === this.table.heightMode ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, this.table.getDrawRange().height)) - padding[0] - padding[2];
|
|
63122
63126
|
this._titleComponent.setAttributes({
|
|
63123
|
-
x: (null !== (_d = this._titleOption.x) && void 0 !== _d ? _d : "right" === this._titleOption.orient) ? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) : this.table.tableX,
|
|
63124
|
-
y: (null !== (_e = this._titleOption.y) && void 0 !== _e ? _e : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight : this.table.tableY,
|
|
63127
|
+
x: (null !== (_d = this._titleOption.x) && void 0 !== _d ? _d : "right" === this._titleOption.orient) ? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) - this.table._tableBorderWidth_left : this.table.tableX - this.table._tableBorderWidth_left,
|
|
63128
|
+
y: (null !== (_e = this._titleOption.y) && void 0 !== _e ? _e : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight - this.table._tableBorderWidth_top : this.table.tableY - this.table._tableBorderWidth_top,
|
|
63125
63129
|
width: "top" === this._titleOption.orient || "bottom" === this._titleOption.orient ? realWidth : this._titleOption.width,
|
|
63126
63130
|
height: "left" === this._titleOption.orient || "right" === this._titleOption.orient ? realHeight : this._titleOption.height,
|
|
63127
63131
|
textStyle: Object.assign({
|
|
@@ -63153,8 +63157,8 @@
|
|
|
63153
63157
|
return {
|
|
63154
63158
|
text: null !== (_d = this._titleOption.text) && void 0 !== _d ? _d : "",
|
|
63155
63159
|
subtext: null !== (_e = this._titleOption.subtext) && void 0 !== _e ? _e : "",
|
|
63156
|
-
x: (null !== (_f = this._titleOption.x) && void 0 !== _f ? _f : "right" === this._titleOption.orient) ? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) : this.table.tableX,
|
|
63157
|
-
y: (null !== (_g = this._titleOption.y) && void 0 !== _g ? _g : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight : this.table.tableY,
|
|
63160
|
+
x: (null !== (_f = this._titleOption.x) && void 0 !== _f ? _f : "right" === this._titleOption.orient) ? this.table.tableX + Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) - this.table._tableBorderWidth_left : this.table.tableX - this.table._tableBorderWidth_left,
|
|
63161
|
+
y: (null !== (_g = this._titleOption.y) && void 0 !== _g ? _g : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight - this.table._tableBorderWidth_top : this.table.tableY - this.table._tableBorderWidth_top,
|
|
63158
63162
|
width: "top" === this._titleOption.orient || "bottom" === this._titleOption.orient ? realWidth : this._titleOption.width,
|
|
63159
63163
|
height: "left" === this._titleOption.orient || "right" === this._titleOption.orient ? realHeight : this._titleOption.height,
|
|
63160
63164
|
minWidth: this._titleOption.minWidth,
|