@visactor/vtable-sheet 1.23.1-alpha.0 → 1.23.1-alpha.2

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.1-alpha.0";
5
+ export declare const version = "1.23.1-alpha.2";
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.1-alpha.0", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.23.1-alpha.2", (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,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"]}
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.2\";\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._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");
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.2", 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
@@ -60552,11 +60552,17 @@
60552
60552
  resize() {
60553
60553
  var _a;
60554
60554
  this._updateSize();
60555
- (null !== (_a = this.options.componentLayoutOrder) && void 0 !== _a ? _a : ["legend", "title"]).forEach(component => {
60556
- var _a, _b;
60555
+ const layoutOrder = null !== (_a = this.options.componentLayoutOrder) && void 0 !== _a ? _a : ["legend", "title"];
60556
+ layoutOrder.forEach(component => {
60557
+ var _a, _b, _c, _d;
60557
60558
  "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());
60559
+ "bottom" !== legend.orient && "right" !== legend.orient || null == legend || legend.resize();
60560
+ }) : "title" === component && ("bottom" !== (null === (_b = this.internalProps.title) || void 0 === _b ? void 0 : _b._titleOption.orient) && "right" !== (null === (_c = this.internalProps.title) || void 0 === _c ? void 0 : _c._titleOption.orient) || null === (_d = this.internalProps.title) || void 0 === _d || _d.resize());
60561
+ }), layoutOrder.forEach(component => {
60562
+ var _a, _b, _c, _d;
60563
+ "legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
60564
+ "top" !== legend.orient && "left" !== legend.orient || null == legend || legend.resize();
60565
+ }) : "title" === component && ("top" !== (null === (_b = this.internalProps.title) || void 0 === _b ? void 0 : _b._titleOption.orient) && "left" !== (null === (_c = this.internalProps.title) || void 0 === _c ? void 0 : _c._titleOption.orient) || null === (_d = this.internalProps.title) || void 0 === _d || _d.resize());
60560
60566
  }), this.internalProps.emptyTip && this.internalProps.emptyTip.resize(), this.scenegraph.resize();
60561
60567
  }
60562
60568
  get rowCount() {
@@ -64878,8 +64884,8 @@
64878
64884
  const ListTreeStickCellPlugin = Factory.getComponent("listTreeStickCellPlugin");
64879
64885
  this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
64880
64886
  }
64881
- setTimeout(() => {
64882
- this.isReleased || (this.resize(), this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null));
64887
+ this.resize(), setTimeout(() => {
64888
+ this.isReleased || this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
64883
64889
  }, 0);
64884
64890
  }
64885
64891
  isListTable() {
@@ -65151,13 +65157,13 @@
65151
65157
  sortState: options.sortState
65152
65158
  }) : (this.refreshRowColCount(), this._resetFrozenColCount(), this.scenegraph.createSceneGraph(), this.render()), options.title) {
65153
65159
  const Title = Factory.getComponent("title");
65154
- internalProps.title = new Title(options.title, this), this.scenegraph.resize();
65160
+ internalProps.title = new Title(options.title, this);
65155
65161
  }
65156
65162
  if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_h = this.internalProps.emptyTip) || void 0 === _h || _h.resetVisible();else {
65157
65163
  const EmptyTip = Factory.getComponent("emptyTip");
65158
65164
  this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_j = this.internalProps.emptyTip) || void 0 === _j || _j.resetVisible();
65159
65165
  }
65160
- return this.pluginManager.updatePlugins(options.plugins), setTimeout(() => {
65166
+ return this.pluginManager.updatePlugins(options.plugins), this.resize(), setTimeout(() => {
65161
65167
  this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
65162
65168
  }, 0), new Promise(resolve => {
65163
65169
  setTimeout(resolve, 0);
@@ -65422,7 +65428,7 @@
65422
65428
  this.setCellCheckboxState(col, row, checked);
65423
65429
  }
65424
65430
  setRecords(records, option) {
65425
- var _a, _b, _c, _d;
65431
+ var _a, _b, _c, _d, _e;
65426
65432
  let sort;
65427
65433
  clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
65428
65434
  "undefined" != typeof window && window.performance.now();
@@ -65445,9 +65451,15 @@
65445
65451
  }
65446
65452
  this.refreshRowColCount();
65447
65453
  } else _setRecords(this, records);
65448
- if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize(), this.internalProps.title && !this.internalProps.title.isReleased && this.internalProps.title.resize(), this.scenegraph.resize(), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
65454
+ this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize();
65455
+ if ((null !== (_c = this.options.componentLayoutOrder) && void 0 !== _c ? _c : ["legend", "title"]).forEach(component => {
65456
+ var _a, _b;
65457
+ "legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach(legend => {
65458
+ null == legend || legend.resize();
65459
+ }) : "title" === component && (null === (_b = this.internalProps.title) || void 0 === _b || _b.resize());
65460
+ }), this.scenegraph.resize(), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();else {
65449
65461
  const EmptyTip = Factory.getComponent("emptyTip");
65450
- this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();
65462
+ this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_e = this.internalProps.emptyTip) || void 0 === _e || _e.resetVisible();
65451
65463
  }
65452
65464
  this.render(), isValid$2(oldHoverState.col) && isValid$2(oldHoverState.row) && oldHoverState.col >= 0 && oldHoverState.row >= 0 && setTimeout(() => {
65453
65465
  var _a;
@@ -92306,7 +92318,7 @@
92306
92318
  importStyle();
92307
92319
  }
92308
92320
 
92309
- const version = "1.23.1-alpha.0";
92321
+ const version = "1.23.1-alpha.2";
92310
92322
  importStyles();
92311
92323
 
92312
92324
  exports.TYPES = index;