@visactor/vtable 1.17.3-alpha.0 → 1.17.3-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/cjs/PivotTable.d.ts +0 -5
- package/cjs/PivotTable.js +0 -13
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.js +13 -14
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +4 -6
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +3 -5
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js +2 -13
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/state/state.js +47 -79
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +0 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +1 -3
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/events.d.ts +1 -3
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +0 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +62 -184
- package/dist/vtable.min.js +1 -1
- package/es/PivotTable.d.ts +0 -5
- package/es/PivotTable.js +0 -13
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.js +13 -14
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +4 -6
- package/es/dataset/dataset.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +3 -5
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js +2 -13
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/state/state.js +47 -79
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +0 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +1 -3
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/events.d.ts +1 -3
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +0 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/cjs/core/BaseTable.js
CHANGED
|
@@ -43,7 +43,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
43
43
|
}
|
|
44
44
|
constructor(container, options = {}) {
|
|
45
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
46
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.
|
|
46
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.1", this.id = `VTable${Date.now()}`,
|
|
47
47
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
48
48
|
!container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
49
49
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vrender_1.vglobal.isImageAnonymous = !1);
|
|
@@ -413,7 +413,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
_updateSize() {
|
|
416
|
-
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
|
|
416
|
+
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;
|
|
417
417
|
const {padding: padding} = this;
|
|
418
418
|
let widthP = 0, heightP = 0;
|
|
419
419
|
if (this.tableX = 0, this.tableY = 0, this.options.canvas && this.options.viewBox) widthP = this.options.viewBox.x2 - this.options.viewBox.x1,
|
|
@@ -432,25 +432,24 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
432
432
|
const {canvas: canvas} = this.internalProps;
|
|
433
433
|
widthP = (null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 1) - (this.options.tableSizeAntiJitter ? 1 : 0),
|
|
434
434
|
heightP = (null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 1) - (this.options.tableSizeAntiJitter ? 1 : 0),
|
|
435
|
-
(null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage)
|
|
435
|
+
(null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "",
|
|
436
436
|
canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`,
|
|
437
|
-
canvas.style.height = `${heightP}px`)
|
|
438
|
-
heightP = this.options.viewBox.y2 - this.options.viewBox.y1), (null === (_h = null == this ? void 0 : this.scenegraph) || void 0 === _h ? void 0 : _h.stage) && (this.options.viewBox ? this.scenegraph.stage.setViewBox(this.options.viewBox, !1) : this.scenegraph.stage.resize(widthP, heightP));
|
|
437
|
+
canvas.style.height = `${heightP}px`);
|
|
439
438
|
} else "node" === env_1.Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
|
|
440
439
|
const width = Math.floor(widthP - style.getVerticalScrollBarSize(this.getTheme().scrollStyle)), height = Math.floor(heightP - style.getHorizontalScrollBarSize(this.getTheme().scrollStyle));
|
|
441
|
-
if (null === (
|
|
442
|
-
const lineWidths = toBoxArray(null !== (
|
|
443
|
-
(null === (
|
|
444
|
-
this.tableY = 0, this.tableNoFrameWidth = width - (null !== (
|
|
445
|
-
this.tableNoFrameHeight = height - (null !== (
|
|
446
|
-
this.tableY = (null !== (
|
|
447
|
-
this.tableNoFrameWidth = width - ((null !== (
|
|
448
|
-
this.tableNoFrameHeight = height - ((null !== (
|
|
440
|
+
if (null === (_g = this.internalProps.theme) || void 0 === _g ? void 0 : _g.frameStyle) {
|
|
441
|
+
const lineWidths = toBoxArray(null !== (_j = null === (_h = this.internalProps.theme.frameStyle) || void 0 === _h ? void 0 : _h.borderLineWidth) && void 0 !== _j ? _j : [ null ]), shadowWidths = toBoxArray(null !== (_l = null === (_k = this.internalProps.theme.frameStyle) || void 0 === _k ? void 0 : _k.shadowBlur) && void 0 !== _l ? _l : [ 0 ]);
|
|
442
|
+
(null === (_m = this.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? (this.tableX = 0,
|
|
443
|
+
this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_o = shadowWidths[1]) && void 0 !== _o ? _o : 0),
|
|
444
|
+
this.tableNoFrameHeight = height - (null !== (_p = shadowWidths[2]) && void 0 !== _p ? _p : 0)) : (this.tableX = (null !== (_q = lineWidths[3]) && void 0 !== _q ? _q : 0) + (null !== (_r = shadowWidths[3]) && void 0 !== _r ? _r : 0),
|
|
445
|
+
this.tableY = (null !== (_s = lineWidths[0]) && void 0 !== _s ? _s : 0) + (null !== (_t = shadowWidths[0]) && void 0 !== _t ? _t : 0),
|
|
446
|
+
this.tableNoFrameWidth = width - ((null !== (_u = lineWidths[1]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[1]) && void 0 !== _v ? _v : 0)) - ((null !== (_w = lineWidths[3]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[3]) && void 0 !== _x ? _x : 0)),
|
|
447
|
+
this.tableNoFrameHeight = height - ((null !== (_y = lineWidths[0]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[0]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[2]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[2]) && void 0 !== _1 ? _1 : 0)));
|
|
449
448
|
}
|
|
450
449
|
}
|
|
451
450
|
updateViewBox(newViewBox) {
|
|
452
451
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
453
|
-
const oldWidth = (null !== (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox.x2) && void 0 !== _b ? _b : 0
|
|
452
|
+
const oldWidth = null !== (_d = null !== (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox.x2) && void 0 !== _b ? _b : 0 - (null === (_c = this.options) || void 0 === _c ? void 0 : _c.viewBox.x1)) && void 0 !== _d ? _d : 0, oldHeight = null !== (_h = null !== (_f = null === (_e = this.options) || void 0 === _e ? void 0 : _e.viewBox.y2) && void 0 !== _f ? _f : 0 - (null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox.y1)) && void 0 !== _h ? _h : 0, newWidth = newViewBox.x2 - newViewBox.x1, newHeight = newViewBox.y2 - newViewBox.y1;
|
|
454
453
|
this.options.viewBox = newViewBox, oldWidth !== newWidth || oldHeight !== newHeight ? this.resize() : this.scenegraph.stage.setViewBox(this.options.viewBox, !0);
|
|
455
454
|
}
|
|
456
455
|
setViewBoxTransform(a, b, c, d, e, f) {
|