@visactor/vtable 1.22.7 → 1.22.8-alpha.12

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.
Files changed (59) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +6 -3
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/body-helper/style.js +1 -2
  5. package/cjs/core/BaseTable.js +5 -3
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  8. package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
  9. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  10. package/cjs/data/DataSource.d.ts +1 -1
  11. package/cjs/data/DataSource.js +4 -3
  12. package/cjs/data/DataSource.js.map +1 -1
  13. package/cjs/edit/editors.js +1 -2
  14. package/cjs/event/drill.js +2 -1
  15. package/cjs/event/event.js.map +1 -1
  16. package/cjs/index.d.ts +1 -1
  17. package/cjs/index.js +1 -1
  18. package/cjs/index.js.map +1 -1
  19. package/cjs/layout/index.js +1 -2
  20. package/cjs/layout/pivot-header-layout.js +1 -0
  21. package/cjs/plugins/plugin-manager.d.ts +2 -0
  22. package/cjs/plugins/plugin-manager.js +13 -6
  23. package/cjs/plugins/plugin-manager.js.map +1 -1
  24. package/cjs/state/state.js +11 -9
  25. package/cjs/state/state.js.map +1 -1
  26. package/cjs/ts-types/events.d.ts +8 -0
  27. package/cjs/ts-types/events.js.map +1 -1
  28. package/cjs/vrender.js.map +1 -1
  29. package/dist/vtable.js +44 -24
  30. package/dist/vtable.min.js +2 -2
  31. package/es/ListTable.d.ts +1 -0
  32. package/es/ListTable.js +7 -4
  33. package/es/ListTable.js.map +1 -1
  34. package/es/body-helper/style.js +1 -2
  35. package/es/core/BaseTable.js +5 -3
  36. package/es/core/BaseTable.js.map +1 -1
  37. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  38. package/es/core/TABLE_EVENT_TYPE.js +3 -1
  39. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  40. package/es/data/DataSource.d.ts +1 -1
  41. package/es/data/DataSource.js +4 -3
  42. package/es/data/DataSource.js.map +1 -1
  43. package/es/edit/editors.js +1 -2
  44. package/es/event/drill.js +2 -1
  45. package/es/event/event.js.map +1 -1
  46. package/es/index.d.ts +1 -1
  47. package/es/index.js +1 -1
  48. package/es/index.js.map +1 -1
  49. package/es/layout/index.js +1 -2
  50. package/es/layout/pivot-header-layout.js +2 -1
  51. package/es/plugins/plugin-manager.d.ts +2 -0
  52. package/es/plugins/plugin-manager.js +13 -6
  53. package/es/plugins/plugin-manager.js.map +1 -1
  54. package/es/state/state.js +11 -9
  55. package/es/state/state.js.map +1 -1
  56. package/es/ts-types/events.d.ts +8 -0
  57. package/es/ts-types/events.js.map +1 -1
  58. package/es/vrender.js.map +1 -1
  59. package/package.json +5 -5
@@ -25,5 +25,4 @@ export function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style, glob
25
25
  return columnStyle || bodyStyle ? columnStyle instanceof Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
26
26
  globalAutoWrapText && !isValid(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
27
27
  StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle ? new RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : StyleClassDef === SwitchStyle ? new SwitchStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_c = theme.switchStyle) && void 0 !== _c ? _c : {}) : StyleClassDef === ButtonStyle ? new ButtonStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_d = theme.buttonStyle) && void 0 !== _d ? _d : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
28
- }
29
- //# sourceMappingURL=style.js.map
28
+ }
@@ -90,7 +90,7 @@ export class BaseTable extends EventTarget {
90
90
  }
91
91
  constructor(container, options = {}) {
92
92
  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;
93
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.7", this.id = `VTable${Date.now()}`,
93
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.8-alpha.12", this.id = `VTable${Date.now()}`,
94
94
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
95
95
  "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
96
96
  container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
@@ -720,11 +720,13 @@ export class BaseTable extends EventTarget {
720
720
  this.colContentWidthsMap.put(col, width);
721
721
  }
722
722
  getAllRowsHeight() {
723
- if (this.internalProps.rowCount <= 0) return 0;
723
+ var _a;
724
+ if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
724
725
  return this.getRowsHeight(0, this.internalProps.rowCount - 1);
725
726
  }
726
727
  getAllColsWidth() {
727
- if (this.internalProps.colCount <= 0) return 0;
728
+ var _a;
729
+ if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
728
730
  return this.getColsWidth(0, this.internalProps.colCount - 1);
729
731
  }
730
732
  getColsWidths() {