@visactor/vtable-sheet 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/cjs/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
2
2
  import type { ISheetDefine, IVTableSheetOptions } from './ts-types';
3
3
  import * as TYPES from './ts-types';
4
4
  import * as VTable from './vtable';
5
- export declare const version = "1.23.0";
5
+ export declare const version = "1.23.1-alpha.0";
6
6
  export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };
package/cjs/index.js CHANGED
@@ -47,4 +47,4 @@ exports.VTable = VTable;
47
47
 
48
48
  const style_manager_1 = require("./styles/style-manager");
49
49
 
50
- exports.version = "1.23.0", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.23.1-alpha.0", (0, style_manager_1.importStyles)();
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.23.0\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.23.1-alpha.0\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions };\n"]}
@@ -60384,7 +60384,7 @@
60384
60384
  }
60385
60385
  constructor(container, options = {}) {
60386
60386
  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;
60387
- 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$1.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");
60387
+ 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$1.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");
60388
60388
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60389
60389
  options: options,
60390
60390
  container: container
@@ -60551,9 +60551,13 @@
60551
60551
  }
60552
60552
  resize() {
60553
60553
  var _a;
60554
- this._updateSize(), null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
60555
- null == legend || legend.resize();
60556
- }), this.internalProps.title && this.internalProps.title.resize(), this.internalProps.emptyTip && this.internalProps.emptyTip.resize(), this.scenegraph.resize();
60554
+ this._updateSize();
60555
+ (null !== (_a = this.options.componentLayoutOrder) && void 0 !== _a ? _a : ["legend", "title"]).forEach(component => {
60556
+ var _a, _b;
60557
+ "legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
60558
+ null == legend || legend.resize();
60559
+ }) : "title" === component && (null === (_b = this.internalProps.title) || void 0 === _b || _b.resize());
60560
+ }), this.internalProps.emptyTip && this.internalProps.emptyTip.resize(), this.scenegraph.resize();
60557
60561
  }
60558
60562
  get rowCount() {
60559
60563
  return this.internalProps.rowCount;
@@ -60773,7 +60777,7 @@
60773
60777
  }
60774
60778
  }
60775
60779
  _updateSize() {
60776
- 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, _2, _3, _4, _5;
60780
+ 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;
60777
60781
  const {
60778
60782
  padding: padding
60779
60783
  } = this;
@@ -60805,12 +60809,12 @@
60805
60809
  if (null === (_l = this.internalProps.theme) || void 0 === _l ? void 0 : _l.frameStyle) {
60806
60810
  const lineWidths = toBoxArray(null !== (_o = null === (_m = this.internalProps.theme.frameStyle) || void 0 === _m ? void 0 : _m.borderLineWidth) && void 0 !== _o ? _o : [null]),
60807
60811
  shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
60808
- if (null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) this.tableX += this.contentOffsetX, this.tableY += this.contentOffsetY, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0) - this.contentOffsetX, this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0) - this.contentOffsetY;else {
60809
- 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);
60810
- const rightBorder = (null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0);
60811
- this.tableNoFrameWidth = width - (rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)) - this.contentOffsetX;
60812
- const bottomBorder = (null !== (_2 = lineWidths[2]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[2]) && void 0 !== _3 ? _3 : 0);
60813
- this.tableNoFrameHeight = height - (bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) - ((null !== (_4 = lineWidths[0]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[0]) && void 0 !== _5 ? _5 : 0)) - this.contentOffsetY;
60812
+ 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 {
60813
+ this.tableX += this._tableBorderWidth_left, this.tableY += this._tableBorderWidth_top;
60814
+ const rightBorder = this._tableBorderWidth_right;
60815
+ this.tableNoFrameWidth = width - (rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) - this._tableBorderWidth_left - this.contentOffsetX;
60816
+ const bottomBorder = this._tableBorderWidth_bottom;
60817
+ this.tableNoFrameHeight = height - (bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) - this._tableBorderWidth_top - this.contentOffsetY;
60814
60818
  }
60815
60819
  }
60816
60820
  this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
@@ -66492,7 +66496,7 @@
66492
66496
  padding = getQuadProps(null !== (_b = null !== (_a = attrs.padding) && void 0 !== _a ? _a : this.option.padding) && void 0 !== _b ? _b : 10);
66493
66497
  let x = 0,
66494
66498
  y = 0;
66495
- "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]);
66499
+ "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]);
66496
66500
  const layout = "bottom" === this.orient || "top" === this.orient ? "horizontal" : "vertical",
66497
66501
  position = this.position;
66498
66502
  let offsetX = 0,
@@ -66740,7 +66744,7 @@
66740
66744
  padding = getQuadProps(null !== (_b = null !== (_a = attrs.padding) && void 0 !== _a ? _a : this.option.padding) && void 0 !== _b ? _b : 10);
66741
66745
  let x = 0,
66742
66746
  y = 0;
66743
- "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]);
66747
+ "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]);
66744
66748
  const layout = "bottom" === this.orient || "top" === this.orient ? "horizontal" : "vertical",
66745
66749
  position = this.position;
66746
66750
  let offsetX = 0,
@@ -67169,8 +67173,8 @@
67169
67173
  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],
67170
67174
  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];
67171
67175
  this._titleComponent.setAttributes({
67172
- 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,
67173
- y: (null !== (_e = this._titleOption.y) && void 0 !== _e ? _e : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight : this.table.tableY,
67176
+ 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,
67177
+ 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,
67174
67178
  width: "top" === this._titleOption.orient || "bottom" === this._titleOption.orient ? realWidth : this._titleOption.width,
67175
67179
  height: "left" === this._titleOption.orient || "right" === this._titleOption.orient ? realHeight : this._titleOption.height,
67176
67180
  textStyle: Object.assign({
@@ -67202,8 +67206,8 @@
67202
67206
  return {
67203
67207
  text: null !== (_d = this._titleOption.text) && void 0 !== _d ? _d : "",
67204
67208
  subtext: null !== (_e = this._titleOption.subtext) && void 0 !== _e ? _e : "",
67205
- 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,
67206
- y: (null !== (_g = this._titleOption.y) && void 0 !== _g ? _g : "bottom" === this._titleOption.orient) ? this.table.tableY + this.table.tableNoFrameHeight : this.table.tableY,
67209
+ 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,
67210
+ 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,
67207
67211
  width: "top" === this._titleOption.orient || "bottom" === this._titleOption.orient ? realWidth : this._titleOption.width,
67208
67212
  height: "left" === this._titleOption.orient || "right" === this._titleOption.orient ? realHeight : this._titleOption.height,
67209
67213
  minWidth: this._titleOption.minWidth,
@@ -92302,7 +92306,7 @@
92302
92306
  importStyle();
92303
92307
  }
92304
92308
 
92305
- const version = "1.23.0";
92309
+ const version = "1.23.1-alpha.0";
92306
92310
  importStyles();
92307
92311
 
92308
92312
  exports.TYPES = index;